aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--AUTHORS16
-rw-r--r--COPYRIGHT2
-rw-r--r--Makefile.common13
-rw-r--r--NEWS67
-rw-r--r--README52
-rw-r--r--audio/audiostream.cpp8
-rw-r--r--audio/decoders/adpcm.cpp57
-rw-r--r--audio/decoders/adpcm.h8
-rw-r--r--audio/decoders/adpcm_intern.h7
-rw-r--r--audio/decoders/aiff.h2
-rw-r--r--audio/decoders/qdm2.cpp2
-rw-r--r--audio/decoders/quicktime.cpp2
-rw-r--r--audio/decoders/quicktime_intern.h2
-rw-r--r--audio/fmopl.cpp2
-rw-r--r--audio/fmopl.h4
-rw-r--r--audio/mididrv.h4
-rw-r--r--audio/midiparser.cpp1
-rw-r--r--audio/midiparser.h1
-rw-r--r--audio/midiparser_qt.cpp496
-rw-r--r--audio/midiparser_qt.h134
-rw-r--r--audio/midiparser_smf.cpp2
-rw-r--r--audio/midiparser_xmidi.cpp7
-rw-r--r--audio/mixer.cpp6
-rw-r--r--audio/mixer_intern.h1
-rw-r--r--audio/mods/maxtrax.cpp6
-rw-r--r--audio/mods/maxtrax.h2
-rw-r--r--audio/mods/paula.cpp9
-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/module.mk1
-rw-r--r--audio/softsynth/adlib.cpp1901
-rw-r--r--audio/softsynth/fluidsynth.cpp52
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_midi.cpp12
-rw-r--r--audio/softsynth/mt32.cpp255
-rw-r--r--audio/softsynth/mt32/AReverbModel.cpp264
-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.cpp88
-rw-r--r--audio/softsynth/mt32/DelayReverb.h9
-rw-r--r--audio/softsynth/mt32/FreeverbModel.cpp10
-rw-r--r--audio/softsynth/mt32/FreeverbModel.h4
-rw-r--r--audio/softsynth/mt32/LA32Ramp.cpp11
-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.cpp162
-rw-r--r--audio/softsynth/mt32/Part.h24
-rw-r--r--audio/softsynth/mt32/Partial.cpp435
-rw-r--r--audio/softsynth/mt32/Partial.h21
-rw-r--r--audio/softsynth/mt32/PartialManager.cpp6
-rw-r--r--audio/softsynth/mt32/PartialManager.h2
-rw-r--r--audio/softsynth/mt32/Poly.cpp14
-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.cpp257
-rw-r--r--audio/softsynth/mt32/Synth.h134
-rw-r--r--audio/softsynth/mt32/TVA.cpp18
-rw-r--r--audio/softsynth/mt32/TVA.h2
-rw-r--r--audio/softsynth/mt32/TVF.cpp6
-rw-r--r--audio/softsynth/mt32/TVF.h2
-rw-r--r--audio/softsynth/mt32/TVP.cpp12
-rw-r--r--audio/softsynth/mt32/TVP.h2
-rw-r--r--audio/softsynth/mt32/Tables.cpp63
-rw-r--r--audio/softsynth/mt32/Tables.h25
-rw-r--r--audio/softsynth/mt32/mmath.h2
-rw-r--r--audio/softsynth/mt32/module.mk4
-rw-r--r--audio/softsynth/mt32/mt32emu.h23
-rw-r--r--audio/softsynth/opl/dosbox.cpp27
-rw-r--r--audio/softsynth/opl/mame.cpp2
-rw-r--r--audio/softsynth/sid.cpp2
-rw-r--r--backends/audiocd/audiocd.h2
-rw-r--r--backends/events/default/default-events.cpp2
-rw-r--r--backends/fs/abstract-fs.h2
-rw-r--r--backends/fs/ds/ds-fs.h2
-rw-r--r--backends/graphics/opengl/gltexture.cpp54
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp4
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp2
-rw-r--r--backends/keymapper/keymapper.h2
-rw-r--r--backends/midi/coreaudio.cpp117
-rw-r--r--backends/midi/seq.cpp11
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp2
-rw-r--r--backends/platform/android/android.cpp6
-rw-r--r--backends/platform/android/android.h2
-rw-r--r--backends/platform/android/android.mk25
-rw-r--r--backends/platform/android/asset-archive.cpp26
-rw-r--r--backends/platform/android/events.cpp78
-rw-r--r--backends/platform/android/jni.cpp4
-rw-r--r--backends/platform/android/org/scummvm/scummvm/MouseHelper.java129
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java22
-rw-r--r--backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java51
-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/iphone_video.mm6
-rw-r--r--backends/platform/iphone/osys_main.cpp4
-rw-r--r--backends/platform/iphone/osys_video.mm5
-rw-r--r--backends/platform/maemo/debian/changelog10
-rw-r--r--backends/platform/n64/osys_n64.h4
-rw-r--r--backends/platform/n64/osys_n64_base.cpp19
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp51
-rw-r--r--backends/platform/ps2/Gs2dScreen.h27
-rw-r--r--backends/platform/ps2/ps2pad.cpp3
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/audio.cpp2
-rw-r--r--backends/platform/sdl/macosx/appmenu_osx.mm11
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp11
-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--backends/platform/wii/osystem_gfx.cpp2
-rw-r--r--backends/platform/wince/CEgui/GUIElement.cpp8
-rw-r--r--backends/platform/wince/CEgui/GUIElement.h8
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.cpp8
-rw-r--r--backends/updates/macosx/macosx-updates.mm8
-rw-r--r--base/commandLine.cpp54
-rw-r--r--base/internal_version.h2
-rw-r--r--common/archive.cpp6
-rw-r--r--common/archive.h6
-rw-r--r--common/bufferedstream.h2
-rw-r--r--common/c++11-compat.h42
-rw-r--r--common/config-file.cpp11
-rw-r--r--common/config-file.h3
-rw-r--r--common/config-manager.h2
-rw-r--r--common/cosinetables.cpp6
-rw-r--r--common/cosinetables.h9
-rw-r--r--common/debug-channels.h2
-rw-r--r--common/debug.cpp2
-rw-r--r--common/fft.h1
-rw-r--r--common/file.cpp2
-rw-r--r--common/forbidden.h25
-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/macresman.cpp4
-rw-r--r--common/memorypool.h2
-rw-r--r--common/memstream.h2
-rw-r--r--common/mutex.cpp2
-rw-r--r--common/platform.cpp4
-rw-r--r--common/platform.h6
-rw-r--r--common/quicktime.cpp8
-rw-r--r--common/quicktime.h5
-rw-r--r--common/random.cpp2
-rw-r--r--common/random.h2
-rw-r--r--common/rdft.h36
-rw-r--r--common/rect.h2
-rw-r--r--common/scummsys.h7
-rw-r--r--common/sinetables.cpp12
-rw-r--r--common/sinetables.h7
-rw-r--r--common/singleton.h2
-rw-r--r--common/str.cpp6
-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/util.cpp5
-rw-r--r--common/util.h13
-rw-r--r--common/winexe.cpp2
-rw-r--r--common/winexe_ne.cpp32
-rw-r--r--common/winexe_ne.h50
-rw-r--r--common/xmlparser.cpp2
-rw-r--r--common/zlib.cpp12
-rw-r--r--common/zlib.h6
-rwxr-xr-xconfigure110
-rw-r--r--devtools/create_kyradat/create_kyradat.cpp43
-rw-r--r--devtools/create_kyradat/create_kyradat.h5
-rw-r--r--devtools/create_kyradat/extract.cpp40
-rw-r--r--devtools/create_kyradat/games.cpp206
-rw-r--r--devtools/create_kyradat/tables.cpp910
-rw-r--r--devtools/create_neverhood/create_neverhood.cpp566
-rw-r--r--devtools/create_neverhood/create_neverhood.h28
-rw-r--r--devtools/create_neverhood/md5.cpp (renamed from devtools/create_teenagent/md5.cpp)9
-rw-r--r--devtools/create_neverhood/md5.h (renamed from devtools/create_teenagent/md5.h)1
-rw-r--r--devtools/create_neverhood/module.mk13
-rw-r--r--devtools/create_neverhood/tables.h718
-rw-r--r--devtools/create_neverhood/util.cpp152
-rw-r--r--devtools/create_neverhood/util.h57
-rw-r--r--devtools/create_project/config.h2
-rw-r--r--devtools/create_teenagent/create_teenagent.cpp140
-rw-r--r--devtools/create_teenagent/module.mk2
-rw-r--r--devtools/create_teenagent/static_tables.h16317
-rw-r--r--devtools/create_teenagent/util.cpp152
-rw-r--r--devtools/create_teenagent/util.h1
-rwxr-xr-xdevtools/credits.pl52
-rw-r--r--devtools/md5table.c2
-rw-r--r--devtools/scumm-md5.txt6
-rw-r--r--dists/android/AndroidManifest.xml2
-rw-r--r--dists/android/plugin-manifest.xml2
-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/neverhood.datbin0 -> 25416 bytes
-rw-r--r--dists/engine-data/wintermute.zipbin0 -> 4057 bytes
-rw-r--r--dists/gph/README-GPH2
-rw-r--r--dists/gph/scummvm.ini2
-rw-r--r--dists/iphone/Info.plist4
-rw-r--r--dists/irix/scummvm.spec2
-rw-r--r--dists/macosx/Info.plist8
-rw-r--r--dists/macosx/Info.plist.in4
-rw-r--r--dists/openpandora/PXML.xml8
-rw-r--r--dists/openpandora/README-OPENPANDORA2
-rw-r--r--dists/openpandora/README-PND.txt2
-rw-r--r--dists/openpandora/index.html4
-rw-r--r--dists/redhat/scummvm-tools.spec2
-rw-r--r--dists/redhat/scummvm.spec4
-rw-r--r--dists/redhat/scummvm.spec.in2
-rw-r--r--dists/scummvm.rc38
-rw-r--r--dists/scummvm.rc.in29
-rwxr-xr-xdists/slackware/scummvm.SlackBuild2
-rw-r--r--dists/wii/meta.xml2
-rw-r--r--dists/win32/ScummVM.iss2
-rw-r--r--dists/win32/migration.bat2
-rw-r--r--dists/win32/scummvm.nsi6
-rw-r--r--dists/win32/scummvm.nsi.in2
-rw-r--r--doc/cz/PrectiMe37
-rw-r--r--doc/de/Liesmich36
-rw-r--r--doc/de/Neues95
-rw-r--r--doc/se/LasMig141
-rw-r--r--engines/advancedDetector.cpp2
-rw-r--r--engines/agi/agi.cpp21
-rw-r--r--engines/agi/agi.h2
-rw-r--r--engines/agi/console.cpp22
-rw-r--r--engines/agi/console.h4
-rw-r--r--engines/agi/cycle.cpp35
-rw-r--r--engines/agi/detection.cpp4
-rw-r--r--engines/agi/detection_tables.h66
-rw-r--r--engines/agi/loader_v1.cpp2
-rw-r--r--engines/agi/loader_v2.cpp2
-rw-r--r--engines/agi/loader_v3.cpp2
-rw-r--r--engines/agi/logic.h2
-rw-r--r--engines/agi/lzw.h2
-rw-r--r--engines/agi/op_cmd.cpp8
-rw-r--r--engines/agi/op_test.cpp9
-rw-r--r--engines/agi/opcodes.cpp12
-rw-r--r--engines/agi/preagi_winnie.cpp9
-rw-r--r--engines/agi/preagi_winnie.h2
-rw-r--r--engines/agi/saveload.cpp4
-rw-r--r--engines/agi/sound.cpp27
-rw-r--r--engines/agi/sound.h9
-rw-r--r--engines/agi/sound_2gs.cpp4
-rw-r--r--engines/agi/sound_2gs.h4
-rw-r--r--engines/agi/sound_midi.cpp2
-rw-r--r--engines/agi/sound_midi.h4
-rw-r--r--engines/agi/wagparser.cpp4
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/detection.cpp10
-rw-r--r--engines/agos/detection_tables.h112
-rw-r--r--engines/agos/feeble.cpp1
-rw-r--r--engines/agos/gfx.cpp4
-rw-r--r--engines/agos/icons.cpp2
-rw-r--r--engines/agos/res.cpp2
-rw-r--r--engines/agos/saveload.cpp12
-rw-r--r--engines/agos/sound.cpp2
-rw-r--r--engines/agos/verb.cpp2
-rw-r--r--engines/agos/vga_pn.cpp2
-rw-r--r--engines/cge/bitmap.cpp6
-rw-r--r--engines/cge/cge.h6
-rw-r--r--engines/cge/detection.cpp106
-rw-r--r--engines/cge/events.cpp2
-rw-r--r--engines/cge/snail.cpp10
-rw-r--r--engines/cge/text.cpp4
-rw-r--r--engines/cge/vga13h.cpp1
-rw-r--r--engines/cine/cine.cpp2
-rw-r--r--engines/cine/console.cpp1
-rw-r--r--engines/cine/detection.cpp2
-rw-r--r--engines/cine/detection_tables.h30
-rw-r--r--engines/cine/part.cpp2
-rw-r--r--engines/cine/script_fw.cpp4
-rw-r--r--engines/cine/script_os.cpp2
-rw-r--r--engines/cine/various.cpp2
-rw-r--r--engines/composer/composer.cpp5
-rw-r--r--engines/composer/composer.h2
-rw-r--r--engines/composer/detection.cpp2
-rw-r--r--engines/composer/graphics.cpp14
-rw-r--r--engines/composer/resource.cpp2
-rw-r--r--engines/configure.engines10
-rw-r--r--engines/cruise/cruise.h4
-rw-r--r--engines/cruise/dataLoader.cpp3
-rw-r--r--engines/cruise/detection.cpp53
-rw-r--r--engines/cruise/linker.h2
-rw-r--r--engines/cruise/staticres.cpp4
-rw-r--r--engines/cruise/volume.cpp2
-rw-r--r--engines/draci/console.cpp1
-rw-r--r--engines/draci/detection.cpp8
-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.cpp305
-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.cpp54
-rw-r--r--engines/drascula/objects.cpp4
-rw-r--r--engines/drascula/rooms.cpp34
-rw-r--r--engines/drascula/saveload.cpp527
-rw-r--r--engines/dreamweb/backdrop.cpp40
-rw-r--r--engines/dreamweb/console.cpp1
-rw-r--r--engines/dreamweb/detection_tables.h24
-rw-r--r--engines/dreamweb/dreamweb.cpp50
-rw-r--r--engines/dreamweb/dreamweb.h20
-rw-r--r--engines/dreamweb/keypad.cpp17
-rw-r--r--engines/dreamweb/monitor.cpp126
-rw-r--r--engines/dreamweb/newplace.cpp2
-rw-r--r--engines/dreamweb/object.cpp168
-rw-r--r--engines/dreamweb/pathfind.cpp2
-rw-r--r--engines/dreamweb/people.cpp2
-rw-r--r--engines/dreamweb/print.cpp16
-rw-r--r--engines/dreamweb/rain.cpp4
-rw-r--r--engines/dreamweb/saveload.cpp63
-rw-r--r--engines/dreamweb/sprite.cpp2
-rw-r--r--engines/dreamweb/stubs.cpp166
-rw-r--r--engines/dreamweb/titles.cpp116
-rw-r--r--engines/dreamweb/use.cpp2
-rw-r--r--engines/dreamweb/vgafades.cpp10
-rw-r--r--engines/dreamweb/vgagrafx.cpp80
-rw-r--r--engines/engine.cpp7
-rw-r--r--engines/engines.mk10
-rw-r--r--engines/gob/anifile.cpp2
-rw-r--r--engines/gob/cmpfile.cpp5
-rw-r--r--engines/gob/detection/tables_adi2.h20
-rw-r--r--engines/gob/detection/tables_adi4.h26
-rw-r--r--engines/gob/detection/tables_adibou.h28
-rw-r--r--engines/gob/detection/tables_ajworld.h2
-rw-r--r--engines/gob/detection/tables_bargon.h10
-rw-r--r--engines/gob/detection/tables_dynasty.h12
-rw-r--r--engines/gob/detection/tables_fallback.h52
-rw-r--r--engines/gob/detection/tables_fascin.h22
-rw-r--r--engines/gob/detection/tables_geisha.h26
-rw-r--r--engines/gob/detection/tables_gob1.h44
-rw-r--r--engines/gob/detection/tables_gob2.h46
-rw-r--r--engines/gob/detection/tables_gob3.h50
-rw-r--r--engines/gob/detection/tables_inca2.h18
-rw-r--r--engines/gob/detection/tables_lit.h38
-rw-r--r--engines/gob/detection/tables_littlered.h10
-rw-r--r--engines/gob/detection/tables_onceupon.h10
-rw-r--r--engines/gob/detection/tables_playtoons.h50
-rw-r--r--engines/gob/detection/tables_urban.h16
-rw-r--r--engines/gob/detection/tables_ween.h28
-rw-r--r--engines/gob/detection/tables_woodruff.h52
-rw-r--r--engines/gob/draw.cpp2
-rw-r--r--engines/gob/expression.cpp17
-rw-r--r--engines/gob/hotspots.cpp3
-rw-r--r--engines/gob/init_v2.cpp2
-rw-r--r--engines/gob/inter.h2
-rw-r--r--engines/gob/inter_fascin.cpp2
-rw-r--r--engines/gob/inter_playtoons.cpp2
-rw-r--r--engines/gob/inter_v2.cpp2
-rw-r--r--engines/gob/inter_v7.cpp52
-rw-r--r--engines/gob/map_v1.cpp2
-rw-r--r--engines/gob/mult_v2.cpp6
-rw-r--r--engines/gob/pregob/onceupon/stork.h2
-rw-r--r--engines/gob/pregob/onceupon/title.cpp2
-rw-r--r--engines/gob/save/saveconverter.cpp1
-rw-r--r--engines/gob/save/saveload.h4
-rw-r--r--engines/gob/sound/adlib.cpp6
-rw-r--r--engines/gob/sound/sound.cpp2
-rw-r--r--engines/gob/sound/soundblaster.cpp2
-rw-r--r--engines/gob/surface.cpp124
-rw-r--r--engines/gob/surface.h32
-rw-r--r--engines/groovie/cursor.cpp3
-rw-r--r--engines/groovie/detection.cpp148
-rw-r--r--engines/groovie/groovie.cpp28
-rw-r--r--engines/groovie/groovie.h10
-rw-r--r--engines/groovie/module.mk1
-rw-r--r--engines/groovie/music.cpp54
-rw-r--r--engines/groovie/music.h12
-rw-r--r--engines/groovie/stuffit.cpp537
-rw-r--r--engines/groovie/stuffit.h43
-rw-r--r--engines/groovie/vdx.cpp2
-rw-r--r--engines/groovie/vdx.h6
-rw-r--r--engines/hopkins/anim.cpp797
-rw-r--r--engines/hopkins/anim.h78
-rw-r--r--engines/hopkins/computer.cpp1226
-rw-r--r--engines/hopkins/computer.h106
-rw-r--r--engines/hopkins/debugger.cpp90
-rw-r--r--engines/hopkins/debugger.h50
-rw-r--r--engines/hopkins/detection.cpp192
-rw-r--r--engines/hopkins/detection_tables.h197
-rw-r--r--engines/hopkins/dialogs.cpp783
-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.cpp496
-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.cpp1933
-rw-r--r--engines/hopkins/graphics.h193
-rw-r--r--engines/hopkins/hopkins.cpp2903
-rw-r--r--engines/hopkins/hopkins.h188
-rw-r--r--engines/hopkins/lines.cpp2956
-rw-r--r--engines/hopkins/lines.h198
-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.cpp4061
-rw-r--r--engines/hopkins/objects.h338
-rw-r--r--engines/hopkins/saveload.cpp337
-rw-r--r--engines/hopkins/saveload.h78
-rw-r--r--engines/hopkins/script.cpp2628
-rw-r--r--engines/hopkins/script.h50
-rw-r--r--engines/hopkins/sound.cpp905
-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/hugo/detection.cpp6
-rw-r--r--engines/hugo/file.cpp7
-rw-r--r--engines/hugo/hugo.cpp27
-rw-r--r--engines/hugo/intro.cpp2
-rw-r--r--engines/hugo/mouse.cpp2
-rw-r--r--engines/hugo/parser.cpp2
-rw-r--r--engines/kyra/chargen.cpp48
-rw-r--r--engines/kyra/darkmoon.cpp29
-rw-r--r--engines/kyra/darkmoon.h18
-rw-r--r--engines/kyra/debugger.cpp192
-rw-r--r--engines/kyra/debugger.h9
-rw-r--r--engines/kyra/detection.cpp2
-rw-r--r--engines/kyra/detection_tables.h205
-rw-r--r--engines/kyra/eob.cpp29
-rw-r--r--engines/kyra/eob.h6
-rw-r--r--engines/kyra/eobcommon.cpp56
-rw-r--r--engines/kyra/eobcommon.h27
-rw-r--r--engines/kyra/gui_eob.cpp150
-rw-r--r--engines/kyra/gui_eob.h2
-rw-r--r--engines/kyra/gui_hof.cpp2
-rw-r--r--engines/kyra/gui_lol.cpp136
-rw-r--r--engines/kyra/gui_lol.h18
-rw-r--r--engines/kyra/gui_mr.cpp2
-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.cpp21
-rw-r--r--engines/kyra/kyra_hof.cpp92
-rw-r--r--engines/kyra/kyra_hof.h284
-rw-r--r--engines/kyra/kyra_lok.cpp8
-rw-r--r--engines/kyra/kyra_lok.h78
-rw-r--r--engines/kyra/kyra_mr.cpp6
-rw-r--r--engines/kyra/kyra_mr.h6
-rw-r--r--engines/kyra/kyra_rpg.cpp25
-rw-r--r--engines/kyra/kyra_rpg.h9
-rw-r--r--engines/kyra/kyra_v1.cpp141
-rw-r--r--engines/kyra/kyra_v1.h15
-rw-r--r--engines/kyra/lol.cpp255
-rw-r--r--engines/kyra/lol.h42
-rw-r--r--engines/kyra/magic_eob.cpp22
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource.h27
-rw-r--r--engines/kyra/resource_intern.cpp36
-rw-r--r--engines/kyra/resource_intern.h2
-rw-r--r--engines/kyra/saveload.cpp4
-rw-r--r--engines/kyra/saveload_eob.cpp371
-rw-r--r--engines/kyra/saveload_lok.cpp2
-rw-r--r--engines/kyra/saveload_lol.cpp6
-rw-r--r--engines/kyra/scene_eob.cpp102
-rw-r--r--engines/kyra/scene_hof.cpp2
-rw-r--r--engines/kyra/scene_lol.cpp64
-rw-r--r--engines/kyra/scene_mr.cpp2
-rw-r--r--engines/kyra/scene_rpg.cpp98
-rw-r--r--engines/kyra/screen.cpp179
-rw-r--r--engines/kyra/screen.h31
-rw-r--r--engines/kyra/screen_eob.cpp418
-rw-r--r--engines/kyra/screen_eob.h17
-rw-r--r--engines/kyra/screen_hof.cpp60
-rw-r--r--engines/kyra/screen_hof.h3
-rw-r--r--engines/kyra/screen_lol.cpp84
-rw-r--r--engines/kyra/screen_lol.h1
-rw-r--r--engines/kyra/screen_v2.cpp90
-rw-r--r--engines/kyra/screen_v2.h6
-rw-r--r--engines/kyra/script_eob.cpp50
-rw-r--r--engines/kyra/script_eob.h4
-rw-r--r--engines/kyra/script_hof.cpp46
-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.cpp30
-rw-r--r--engines/kyra/sequences_darkmoon.cpp9
-rw-r--r--engines/kyra/sequences_eob.cpp4
-rw-r--r--engines/kyra/sequences_hof.cpp4145
-rw-r--r--engines/kyra/sequences_hof.h74
-rw-r--r--engines/kyra/sequences_lok.cpp4
-rw-r--r--engines/kyra/sequences_lol.cpp51
-rw-r--r--engines/kyra/sound.cpp52
-rw-r--r--engines/kyra/sound.h156
-rw-r--r--engines/kyra/sound_adlib.cpp37
-rw-r--r--engines/kyra/sound_adlib.h9
-rw-r--r--engines/kyra/sound_amiga.cpp18
-rw-r--r--engines/kyra/sound_digital.cpp8
-rw-r--r--engines/kyra/sound_digital.h119
-rw-r--r--engines/kyra/sound_intern.h154
-rw-r--r--engines/kyra/sound_lol.cpp34
-rw-r--r--engines/kyra/sound_midi.cpp31
-rw-r--r--engines/kyra/sound_towns.cpp148
-rw-r--r--engines/kyra/sprites_eob.cpp34
-rw-r--r--engines/kyra/sprites_lol.cpp108
-rw-r--r--engines/kyra/sprites_rpg.cpp4
-rw-r--r--engines/kyra/staticres.cpp297
-rw-r--r--engines/kyra/staticres_eob.cpp66
-rw-r--r--engines/kyra/staticres_lol.cpp153
-rw-r--r--engines/kyra/text_hof.cpp6
-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.cpp15
-rw-r--r--engines/kyra/timer_lol.cpp12
-rw-r--r--engines/kyra/vqa.cpp8
-rw-r--r--engines/lastexpress/entities/august.cpp3
-rw-r--r--engines/lastexpress/entities/kahina.cpp3
-rw-r--r--engines/lure/debugger.cpp4
-rw-r--r--engines/lure/detection.cpp16
-rw-r--r--engines/lure/hotspots.cpp2
-rw-r--r--engines/lure/menu.cpp5
-rw-r--r--engines/lure/res_struct.cpp4
-rw-r--r--engines/lure/room.cpp2
-rw-r--r--engines/lure/scripts.cpp2
-rw-r--r--engines/made/console.cpp1
-rw-r--r--engines/made/database.cpp24
-rw-r--r--engines/made/detection.cpp48
-rw-r--r--engines/mohawk/console.cpp4
-rw-r--r--engines/mohawk/cursors.cpp5
-rw-r--r--engines/mohawk/detection.cpp1
-rw-r--r--engines/mohawk/detection_tables.h89
-rw-r--r--engines/mohawk/dialogs.cpp12
-rw-r--r--engines/mohawk/installer_archive.cpp2
-rw-r--r--engines/mohawk/livingbooks.cpp28
-rw-r--r--engines/mohawk/livingbooks_code.cpp79
-rw-r--r--engines/mohawk/livingbooks_code.h3
-rw-r--r--engines/mohawk/livingbooks_lbx.cpp17
-rw-r--r--engines/mohawk/myst.cpp78
-rw-r--r--engines/mohawk/myst.h19
-rw-r--r--engines/mohawk/myst_areas.cpp43
-rw-r--r--engines/mohawk/myst_graphics.cpp283
-rw-r--r--engines/mohawk/myst_graphics.h10
-rw-r--r--engines/mohawk/myst_scripts.cpp118
-rw-r--r--engines/mohawk/myst_scripts.h8
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp7
-rw-r--r--engines/mohawk/myst_stacks/demo.cpp4
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp6
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp280
-rw-r--r--engines/mohawk/myst_stacks/mechanical.h10
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp175
-rw-r--r--engines/mohawk/myst_stacks/myst.h16
-rw-r--r--engines/mohawk/myst_stacks/preview.cpp32
-rw-r--r--engines/mohawk/myst_stacks/preview.h3
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp8
-rw-r--r--engines/mohawk/myst_stacks/slides.cpp2
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp14
-rw-r--r--engines/mohawk/resource.cpp2
-rw-r--r--engines/mohawk/riven.cpp10
-rw-r--r--engines/mohawk/riven_external.cpp6
-rw-r--r--engines/mohawk/video.cpp14
-rw-r--r--engines/mohawk/video.h4
-rw-r--r--engines/mohawk/view.cpp4
-rw-r--r--engines/neverhood/background.cpp60
-rw-r--r--engines/neverhood/background.h49
-rw-r--r--engines/neverhood/blbarchive.cpp159
-rw-r--r--engines/neverhood/blbarchive.h77
-rw-r--r--engines/neverhood/console.cpp172
-rw-r--r--engines/neverhood/console.h47
-rw-r--r--engines/neverhood/detection.cpp271
-rw-r--r--engines/neverhood/diskplayerscene.cpp507
-rw-r--r--engines/neverhood/diskplayerscene.h111
-rw-r--r--engines/neverhood/entity.cpp159
-rw-r--r--engines/neverhood/entity.h120
-rw-r--r--engines/neverhood/gamemodule.cpp839
-rw-r--r--engines/neverhood/gamemodule.h89
-rw-r--r--engines/neverhood/gamevars.cpp134
-rw-r--r--engines/neverhood/gamevars.h195
-rw-r--r--engines/neverhood/graphics.cpp349
-rw-r--r--engines/neverhood/graphics.h161
-rw-r--r--engines/neverhood/klaymen.cpp6141
-rw-r--r--engines/neverhood/klaymen.h771
-rw-r--r--engines/neverhood/menumodule.cpp1118
-rw-r--r--engines/neverhood/menumodule.h265
-rw-r--r--engines/neverhood/messages.h37
-rw-r--r--engines/neverhood/microtiles.cpp160
-rw-r--r--engines/neverhood/microtiles.h64
-rw-r--r--engines/neverhood/module.cpp123
-rw-r--r--engines/neverhood/module.h72
-rw-r--r--engines/neverhood/module.mk59
-rw-r--r--engines/neverhood/modules/module1000.cpp1697
-rw-r--r--engines/neverhood/modules/module1000.h300
-rw-r--r--engines/neverhood/modules/module1100.cpp701
-rw-r--r--engines/neverhood/modules/module1100.h130
-rw-r--r--engines/neverhood/modules/module1200.cpp1102
-rw-r--r--engines/neverhood/modules/module1200.h216
-rw-r--r--engines/neverhood/modules/module1300.cpp1837
-rw-r--r--engines/neverhood/modules/module1300.h295
-rw-r--r--engines/neverhood/modules/module1400.cpp1621
-rw-r--r--engines/neverhood/modules/module1400.h281
-rw-r--r--engines/neverhood/modules/module1500.cpp134
-rw-r--r--engines/neverhood/modules/module1500.h58
-rw-r--r--engines/neverhood/modules/module1600.cpp1412
-rw-r--r--engines/neverhood/modules/module1600.h185
-rw-r--r--engines/neverhood/modules/module1700.cpp279
-rw-r--r--engines/neverhood/modules/module1700.h72
-rw-r--r--engines/neverhood/modules/module1800.cpp181
-rw-r--r--engines/neverhood/modules/module1800.h46
-rw-r--r--engines/neverhood/modules/module1900.cpp650
-rw-r--r--engines/neverhood/modules/module1900.h143
-rw-r--r--engines/neverhood/modules/module2000.cpp160
-rw-r--r--engines/neverhood/modules/module2000.h55
-rw-r--r--engines/neverhood/modules/module2100.cpp336
-rw-r--r--engines/neverhood/modules/module2100.h92
-rw-r--r--engines/neverhood/modules/module2200.cpp2563
-rw-r--r--engines/neverhood/modules/module2200.h375
-rw-r--r--engines/neverhood/modules/module2300.cpp186
-rw-r--r--engines/neverhood/modules/module2300.h48
-rw-r--r--engines/neverhood/modules/module2400.cpp992
-rw-r--r--engines/neverhood/modules/module2400.h182
-rw-r--r--engines/neverhood/modules/module2500.cpp546
-rw-r--r--engines/neverhood/modules/module2500.h101
-rw-r--r--engines/neverhood/modules/module2600.cpp348
-rw-r--r--engines/neverhood/modules/module2600.h74
-rw-r--r--engines/neverhood/modules/module2700.cpp1211
-rw-r--r--engines/neverhood/modules/module2700.h182
-rw-r--r--engines/neverhood/modules/module2800.cpp3187
-rw-r--r--engines/neverhood/modules/module2800.h505
-rw-r--r--engines/neverhood/modules/module2900.cpp439
-rw-r--r--engines/neverhood/modules/module2900.h102
-rw-r--r--engines/neverhood/modules/module3000.cpp1536
-rw-r--r--engines/neverhood/modules/module3000.h257
-rw-r--r--engines/neverhood/mouse.cpp256
-rw-r--r--engines/neverhood/mouse.h63
-rw-r--r--engines/neverhood/navigationscene.cpp216
-rw-r--r--engines/neverhood/navigationscene.h60
-rw-r--r--engines/neverhood/neverhood.cpp208
-rw-r--r--engines/neverhood/neverhood.h146
-rw-r--r--engines/neverhood/palette.cpp201
-rw-r--r--engines/neverhood/palette.h68
-rw-r--r--engines/neverhood/resource.cpp583
-rw-r--r--engines/neverhood/resource.h205
-rw-r--r--engines/neverhood/resourceman.cpp128
-rw-r--r--engines/neverhood/resourceman.h94
-rw-r--r--engines/neverhood/saveload.cpp164
-rw-r--r--engines/neverhood/scene.cpp596
-rw-r--r--engines/neverhood/scene.h229
-rw-r--r--engines/neverhood/screen.cpp420
-rw-r--r--engines/neverhood/screen.h106
-rw-r--r--engines/neverhood/smackerplayer.cpp257
-rw-r--r--engines/neverhood/smackerplayer.h91
-rw-r--r--engines/neverhood/smackerscene.cpp122
-rw-r--r--engines/neverhood/smackerscene.h54
-rw-r--r--engines/neverhood/sound.cpp818
-rw-r--r--engines/neverhood/sound.h290
-rw-r--r--engines/neverhood/sprite.cpp486
-rw-r--r--engines/neverhood/sprite.h192
-rw-r--r--engines/neverhood/staticdata.cpp200
-rw-r--r--engines/neverhood/staticdata.h116
-rw-r--r--engines/neverhood/todo.txt45
-rw-r--r--engines/parallaction/balloons.cpp2
-rw-r--r--engines/parallaction/callables_ns.cpp2
-rw-r--r--engines/parallaction/detection.cpp6
-rw-r--r--engines/parallaction/dialogue.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.cpp59
-rw-r--r--engines/parallaction/font.cpp4
-rw-r--r--engines/parallaction/gfxbase.cpp2
-rw-r--r--engines/parallaction/graphics.cpp4
-rw-r--r--engines/parallaction/graphics.h2
-rw-r--r--engines/parallaction/gui_br.cpp4
-rw-r--r--engines/parallaction/input.cpp8
-rw-r--r--engines/parallaction/module.mk1
-rw-r--r--engines/parallaction/parallaction.cpp5
-rw-r--r--engines/parallaction/parallaction_br.cpp4
-rw-r--r--engines/parallaction/parallaction_ns.cpp4
-rw-r--r--engines/parallaction/parser_br.cpp1
-rw-r--r--engines/parallaction/parser_ns.cpp4
-rw-r--r--engines/parallaction/sound_br.cpp4
-rw-r--r--engines/parallaction/staticres.cpp4
-rw-r--r--engines/pegasus/cursor.cpp28
-rw-r--r--engines/pegasus/detection.cpp56
-rw-r--r--engines/pegasus/elements.cpp2
-rw-r--r--engines/pegasus/energymonitor.cpp2
-rw-r--r--engines/pegasus/interface.cpp30
-rw-r--r--engines/pegasus/interface.h3
-rw-r--r--engines/pegasus/items/inventorypicture.h1
-rw-r--r--engines/pegasus/menu.cpp10
-rw-r--r--engines/pegasus/movie.cpp7
-rw-r--r--engines/pegasus/neighborhood/caldoria/caldoria.cpp7
-rw-r--r--engines/pegasus/neighborhood/mars/mars.cpp16
-rw-r--r--engines/pegasus/neighborhood/mars/reactor.cpp6
-rw-r--r--engines/pegasus/neighborhood/neighborhood.cpp8
-rw-r--r--engines/pegasus/neighborhood/norad/delta/globegame.cpp10
-rw-r--r--engines/pegasus/neighborhood/norad/pressuredoor.cpp5
-rw-r--r--engines/pegasus/neighborhood/prehistoric/prehistoric.cpp56
-rw-r--r--engines/pegasus/neighborhood/tsa/fulltsa.cpp7
-rw-r--r--engines/pegasus/neighborhood/wsc/wsc.cpp18
-rw-r--r--engines/pegasus/pegasus.cpp156
-rw-r--r--engines/pegasus/pegasus.h7
-rw-r--r--engines/pegasus/sound.cpp3
-rw-r--r--engines/pegasus/surface.cpp12
-rw-r--r--engines/pegasus/surface.h2
-rw-r--r--engines/pegasus/timers.cpp33
-rw-r--r--engines/pegasus/timers.h6
-rw-r--r--engines/plugins_table.h6
-rw-r--r--engines/queen/cutaway.cpp2
-rw-r--r--engines/queen/display.cpp92
-rw-r--r--engines/queen/display.h4
-rw-r--r--engines/queen/graphics.cpp6
-rw-r--r--engines/queen/input.cpp4
-rw-r--r--engines/queen/input.h4
-rw-r--r--engines/queen/journal.cpp4
-rw-r--r--engines/queen/logic.cpp8
-rw-r--r--engines/queen/queen.cpp2
-rw-r--r--engines/queen/resource.cpp4
-rw-r--r--engines/queen/sound.cpp6
-rw-r--r--engines/queen/sound.h2
-rw-r--r--engines/queen/talk.cpp7
-rw-r--r--engines/queen/talk.h2
-rw-r--r--engines/saga/actor.cpp2
-rw-r--r--engines/saga/detection.cpp8
-rw-r--r--engines/saga/detection_tables.h32
-rw-r--r--engines/saga/events.cpp22
-rw-r--r--engines/saga/interface.cpp4
-rw-r--r--engines/saga/music.cpp63
-rw-r--r--engines/saga/music.h1
-rw-r--r--engines/saga/resource.cpp12
-rw-r--r--engines/saga/saga.cpp2
-rw-r--r--engines/saga/saga.h4
-rw-r--r--engines/saga/saveload.cpp13
-rw-r--r--engines/saga/scene.cpp19
-rw-r--r--engines/saga/sfuncs_ihnm.cpp18
-rw-r--r--engines/saga/shorten.cpp2
-rw-r--r--engines/saga/sndres.cpp9
-rw-r--r--engines/saga/sndres.h1
-rw-r--r--engines/sci/console.cpp20
-rw-r--r--engines/sci/console.h1
-rw-r--r--engines/sci/decompressor.cpp2
-rw-r--r--engines/sci/detection.cpp15
-rw-r--r--engines/sci/detection_tables.h652
-rw-r--r--engines/sci/engine/features.cpp12
-rw-r--r--engines/sci/engine/kernel.cpp15
-rw-r--r--engines/sci/engine/kernel.h13
-rw-r--r--engines/sci/engine/kernel_tables.h7
-rw-r--r--engines/sci/engine/kevent.cpp9
-rw-r--r--engines/sci/engine/kfile.cpp36
-rw-r--r--engines/sci/engine/kgraphics.cpp13
-rw-r--r--engines/sci/engine/kgraphics32.cpp55
-rw-r--r--engines/sci/engine/klists.cpp3
-rw-r--r--engines/sci/engine/kmath.cpp82
-rw-r--r--engines/sci/engine/kpathing.cpp13
-rw-r--r--engines/sci/engine/ksound.cpp28
-rw-r--r--engines/sci/engine/kstring.cpp89
-rw-r--r--engines/sci/engine/message.cpp41
-rw-r--r--engines/sci/engine/message.h2
-rw-r--r--engines/sci/engine/savegame.cpp5
-rw-r--r--engines/sci/engine/script_patches.cpp147
-rw-r--r--engines/sci/engine/scriptdebug.cpp2
-rw-r--r--engines/sci/engine/seg_manager.cpp3
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/workarounds.cpp13
-rw-r--r--engines/sci/event.cpp10
-rw-r--r--engines/sci/graphics/animate.cpp2
-rw-r--r--engines/sci/graphics/animate.h1
-rw-r--r--engines/sci/graphics/compare.cpp4
-rw-r--r--engines/sci/graphics/compare.h3
-rw-r--r--engines/sci/graphics/controls16.cpp7
-rw-r--r--engines/sci/graphics/controls16.h1
-rw-r--r--engines/sci/graphics/controls32.cpp4
-rw-r--r--engines/sci/graphics/controls32.h3
-rw-r--r--engines/sci/graphics/coordadjuster.h2
-rw-r--r--engines/sci/graphics/cursor.cpp51
-rw-r--r--engines/sci/graphics/cursor.h2
-rw-r--r--engines/sci/graphics/fontsjis.h3
-rw-r--r--engines/sci/graphics/frameout.cpp76
-rw-r--r--engines/sci/graphics/frameout.h8
-rw-r--r--engines/sci/graphics/menu.cpp3
-rw-r--r--engines/sci/graphics/paint16.cpp12
-rw-r--r--engines/sci/graphics/paint16.h3
-rw-r--r--engines/sci/graphics/paint32.cpp4
-rw-r--r--engines/sci/graphics/paint32.h5
-rw-r--r--engines/sci/graphics/palette.cpp13
-rw-r--r--engines/sci/graphics/picture.cpp2
-rw-r--r--engines/sci/graphics/portrait.cpp2
-rw-r--r--engines/sci/graphics/ports.cpp6
-rw-r--r--engines/sci/graphics/screen.cpp2
-rw-r--r--engines/sci/graphics/text16.cpp4
-rw-r--r--engines/sci/graphics/text16.h3
-rw-r--r--engines/sci/parser/grammar.cpp4
-rw-r--r--engines/sci/parser/vocabulary.cpp2
-rw-r--r--engines/sci/resource.cpp29
-rw-r--r--engines/sci/resource_audio.cpp4
-rw-r--r--engines/sci/resource_intern.h2
-rw-r--r--engines/sci/sci.cpp46
-rw-r--r--engines/sci/sci.h1
-rw-r--r--engines/sci/sound/audio.cpp13
-rw-r--r--engines/sci/sound/drivers/adlib.cpp4
-rw-r--r--engines/sci/sound/drivers/cms.cpp2
-rw-r--r--engines/sci/sound/drivers/fb01.cpp2
-rw-r--r--engines/sci/sound/drivers/midi.cpp12
-rw-r--r--engines/sci/sound/midiparser_sci.cpp24
-rw-r--r--engines/sci/sound/music.cpp3
-rw-r--r--engines/sci/sound/soundcmd.cpp102
-rw-r--r--engines/scumm/actor.cpp4
-rw-r--r--engines/scumm/debugger.cpp40
-rw-r--r--engines/scumm/debugger.h1
-rw-r--r--engines/scumm/detection.cpp2
-rw-r--r--engines/scumm/detection_tables.h17
-rw-r--r--engines/scumm/gfx.cpp2
-rw-r--r--engines/scumm/he/animation_he.h1
-rw-r--r--engines/scumm/he/intern_he.h1
-rw-r--r--engines/scumm/he/logic/football.cpp101
-rw-r--r--engines/scumm/he/script_v100he.cpp3
-rw-r--r--engines/scumm/he/script_v60he.cpp4
-rw-r--r--engines/scumm/he/sound_he.cpp26
-rw-r--r--engines/scumm/he/wiz_he.cpp6
-rw-r--r--engines/scumm/imuse/imuse.cpp69
-rw-r--r--engines/scumm/imuse/imuse.h2
-rw-r--r--engines/scumm/imuse/imuse_internal.h3
-rw-r--r--engines/scumm/imuse/imuse_part.cpp15
-rw-r--r--engines/scumm/imuse_digi/dimuse.cpp5
-rw-r--r--engines/scumm/insane/insane.cpp28
-rw-r--r--engines/scumm/insane/insane_ben.cpp43
-rw-r--r--engines/scumm/insane/insane_enemy.cpp85
-rw-r--r--engines/scumm/insane/insane_iact.cpp2
-rw-r--r--engines/scumm/insane/insane_scenes.cpp30
-rw-r--r--engines/scumm/module.mk3
-rw-r--r--engines/scumm/music.h6
-rw-r--r--engines/scumm/object.cpp12
-rw-r--r--engines/scumm/player_mac.cpp415
-rw-r--r--engines/scumm/player_mac.h133
-rw-r--r--engines/scumm/player_v3m.cpp214
-rw-r--r--engines/scumm/player_v3m.h54
-rw-r--r--engines/scumm/player_v5m.cpp246
-rw-r--r--engines/scumm/player_v5m.h57
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/saveload.cpp10
-rw-r--r--engines/scumm/saveload.h16
-rw-r--r--engines/scumm/script.cpp30
-rw-r--r--engines/scumm/script.h13
-rw-r--r--engines/scumm/script_v4.cpp2
-rw-r--r--engines/scumm/script_v5.cpp16
-rw-r--r--engines/scumm/script_v6.cpp2
-rw-r--r--engines/scumm/scumm-md5.h270
-rw-r--r--engines/scumm/scumm.cpp16
-rw-r--r--engines/scumm/smush/smush_player.cpp4
-rw-r--r--engines/scumm/sound.cpp248
-rw-r--r--engines/scumm/vars.cpp4
-rw-r--r--engines/sky/compact.cpp2
-rw-r--r--engines/sky/music/musicbase.cpp5
-rw-r--r--engines/sky/sky.cpp7
-rw-r--r--engines/sword1/animation.cpp2
-rw-r--r--engines/sword1/console.cpp1
-rw-r--r--engines/sword1/control.cpp4
-rw-r--r--engines/sword1/detection.cpp19
-rw-r--r--engines/sword1/resman.cpp9
-rw-r--r--engines/sword1/sound.cpp3
-rw-r--r--engines/sword1/sound.h3
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--engines/sword2/console.cpp2
-rw-r--r--engines/sword2/controls.cpp4
-rw-r--r--engines/sword2/memory.cpp2
-rw-r--r--engines/sword2/memory.h4
-rw-r--r--engines/sword2/palette.cpp10
-rw-r--r--engines/sword2/sound.h1
-rw-r--r--engines/sword2/sprite.cpp5
-rw-r--r--engines/sword2/sword2.cpp58
-rw-r--r--engines/sword25/console.cpp1
-rw-r--r--engines/sword25/gfx/animation.cpp8
-rw-r--r--engines/sword25/gfx/animation.h2
-rw-r--r--engines/sword25/gfx/bitmapresource.h10
-rw-r--r--engines/sword25/gfx/dynamicbitmap.cpp16
-rw-r--r--engines/sword25/gfx/dynamicbitmap.h2
-rw-r--r--engines/sword25/gfx/graphicengine.cpp9
-rw-r--r--engines/sword25/gfx/image/image.h7
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp324
-rw-r--r--engines/sword25/gfx/image/renderedimage.h8
-rw-r--r--engines/sword25/gfx/image/swimage.cpp3
-rw-r--r--engines/sword25/gfx/image/swimage.h3
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp6
-rw-r--r--engines/sword25/gfx/image/vectorimage.h3
-rw-r--r--engines/sword25/gfx/microtiles.cpp164
-rw-r--r--engines/sword25/gfx/microtiles.h65
-rw-r--r--engines/sword25/gfx/panel.cpp14
-rw-r--r--engines/sword25/gfx/panel.h8
-rw-r--r--engines/sword25/gfx/renderobject.cpp56
-rw-r--r--engines/sword25/gfx/renderobject.h41
-rw-r--r--engines/sword25/gfx/renderobjectmanager.cpp73
-rw-r--r--engines/sword25/gfx/renderobjectmanager.h20
-rw-r--r--engines/sword25/gfx/rootrenderobject.h2
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp10
-rw-r--r--engines/sword25/gfx/staticbitmap.h2
-rw-r--r--engines/sword25/gfx/text.cpp12
-rw-r--r--engines/sword25/gfx/text.h2
-rw-r--r--engines/sword25/module.mk1
-rw-r--r--engines/sword25/util/lua/ldo.cpp35
-rw-r--r--engines/sword25/util/lua/llex.cpp2
-rw-r--r--engines/sword25/util/lua/lua.h1
-rw-r--r--engines/sword25/util/lua/luaconf.h2
-rw-r--r--engines/teenagent/actor.cpp87
-rw-r--r--engines/teenagent/actor.h17
-rw-r--r--engines/teenagent/animation.cpp120
-rw-r--r--engines/teenagent/animation.h8
-rw-r--r--engines/teenagent/callbacks.cpp4676
-rw-r--r--engines/teenagent/detection.cpp7
-rw-r--r--engines/teenagent/dialog.cpp117
-rw-r--r--engines/teenagent/dialog.h55
-rw-r--r--engines/teenagent/font.cpp83
-rw-r--r--engines/teenagent/font.h18
-rw-r--r--engines/teenagent/inventory.cpp160
-rw-r--r--engines/teenagent/inventory.h115
-rw-r--r--engines/teenagent/music.cpp48
-rw-r--r--engines/teenagent/music.h7
-rw-r--r--engines/teenagent/objects.cpp53
-rw-r--r--engines/teenagent/objects.h23
-rw-r--r--engines/teenagent/pack.cpp19
-rw-r--r--engines/teenagent/resources.cpp71
-rw-r--r--engines/teenagent/resources.h1149
-rw-r--r--engines/teenagent/scene.cpp884
-rw-r--r--engines/teenagent/scene.h74
-rw-r--r--engines/teenagent/segment.h12
-rw-r--r--engines/teenagent/surface.cpp70
-rw-r--r--engines/teenagent/surface.h11
-rw-r--r--engines/teenagent/surface_list.cpp23
-rw-r--r--engines/teenagent/surface_list.h8
-rw-r--r--engines/teenagent/teenagent.cpp442
-rw-r--r--engines/teenagent/teenagent.h106
-rw-r--r--engines/testbed/config-params.cpp2
-rw-r--r--engines/testbed/config.cpp2
-rw-r--r--engines/testbed/detection.cpp2
-rw-r--r--engines/testbed/midi.cpp6
-rw-r--r--engines/testbed/sound.cpp2
-rw-r--r--engines/tinsel/actors.cpp22
-rw-r--r--engines/tinsel/anim.cpp32
-rw-r--r--engines/tinsel/bg.cpp26
-rw-r--r--engines/tinsel/bmv.cpp18
-rw-r--r--engines/tinsel/cursor.cpp30
-rw-r--r--engines/tinsel/detection.cpp2
-rw-r--r--engines/tinsel/detection_tables.h88
-rw-r--r--engines/tinsel/dialogs.cpp206
-rw-r--r--engines/tinsel/dw.h2
-rw-r--r--engines/tinsel/events.cpp3
-rw-r--r--engines/tinsel/events.h2
-rw-r--r--engines/tinsel/faders.cpp58
-rw-r--r--engines/tinsel/faders.h12
-rw-r--r--engines/tinsel/font.cpp8
-rw-r--r--engines/tinsel/graphics.cpp236
-rw-r--r--engines/tinsel/handle.cpp5
-rw-r--r--engines/tinsel/multiobj.cpp24
-rw-r--r--engines/tinsel/music.cpp209
-rw-r--r--engines/tinsel/object.cpp26
-rw-r--r--engines/tinsel/palette.cpp63
-rw-r--r--engines/tinsel/palette.h12
-rw-r--r--engines/tinsel/pcode.cpp2
-rw-r--r--engines/tinsel/play.cpp104
-rw-r--r--engines/tinsel/polygons.cpp108
-rw-r--r--engines/tinsel/rince.cpp16
-rw-r--r--engines/tinsel/saveload.cpp2
-rw-r--r--engines/tinsel/savescn.cpp3
-rw-r--r--engines/tinsel/scene.cpp58
-rw-r--r--engines/tinsel/sched.cpp12
-rw-r--r--engines/tinsel/sound.cpp140
-rw-r--r--engines/tinsel/sound.h10
-rw-r--r--engines/tinsel/strres.cpp6
-rw-r--r--engines/tinsel/text.cpp46
-rw-r--r--engines/tinsel/timers.cpp2
-rw-r--r--engines/tinsel/tinlib.cpp7
-rw-r--r--engines/tinsel/tinsel.cpp29
-rw-r--r--engines/tinsel/tinsel.h13
-rw-r--r--engines/toltecs/console.cpp79
-rw-r--r--engines/toltecs/console.h45
-rw-r--r--engines/toltecs/detection.cpp69
-rw-r--r--engines/toltecs/menu.cpp200
-rw-r--r--engines/toltecs/menu.h6
-rw-r--r--engines/toltecs/microtiles.cpp4
-rw-r--r--engines/toltecs/module.mk1
-rw-r--r--engines/toltecs/movie.cpp54
-rw-r--r--engines/toltecs/movie.h8
-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.cpp68
-rw-r--r--engines/toltecs/screen.h6
-rw-r--r--engines/toltecs/script.cpp159
-rw-r--r--engines/toltecs/script.h1
-rw-r--r--engines/toltecs/sound.cpp9
-rw-r--r--engines/toltecs/toltecs.cpp42
-rw-r--r--engines/toltecs/toltecs.h2
-rw-r--r--engines/tony/custom.cpp29
-rw-r--r--engines/tony/debugger.cpp1
-rw-r--r--engines/tony/detection.cpp3
-rw-r--r--engines/tony/detection_tables.h58
-rw-r--r--engines/tony/font.cpp12
-rw-r--r--engines/tony/font.h19
-rw-r--r--engines/tony/game.cpp14
-rw-r--r--engines/tony/game.h1
-rw-r--r--engines/tony/gfxcore.cpp56
-rw-r--r--engines/tony/gfxcore.h18
-rw-r--r--engines/tony/gfxengine.cpp13
-rw-r--r--engines/tony/globals.h32
-rw-r--r--engines/tony/input.cpp56
-rw-r--r--engines/tony/input.h18
-rw-r--r--engines/tony/inventory.cpp44
-rw-r--r--engines/tony/inventory.h1
-rw-r--r--engines/tony/loc.cpp67
-rw-r--r--engines/tony/loc.h38
-rw-r--r--engines/tony/mpal/expr.cpp4
-rw-r--r--engines/tony/mpal/expr.h12
-rw-r--r--engines/tony/mpal/loadmpc.cpp11
-rw-r--r--engines/tony/mpal/lzo.cpp622
-rw-r--r--engines/tony/mpal/memory.cpp1
-rw-r--r--engines/tony/mpal/mpal.cpp65
-rw-r--r--engines/tony/mpal/mpal.h103
-rw-r--r--engines/tony/mpal/mpaldll.h63
-rw-r--r--engines/tony/mpal/mpalutils.h12
-rw-r--r--engines/tony/resid.h11
-rw-r--r--engines/tony/sound.cpp45
-rw-r--r--engines/tony/tony.cpp2
-rw-r--r--engines/tony/tony.h2
-rw-r--r--engines/tony/tonychar.cpp10
-rw-r--r--engines/tony/window.cpp3
-rw-r--r--engines/tony/window.h1
-rw-r--r--engines/toon/anim.cpp4
-rw-r--r--engines/toon/console.cpp1
-rw-r--r--engines/toon/detection.cpp14
-rw-r--r--engines/toon/font.cpp8
-rw-r--r--engines/toon/toon.cpp2
-rw-r--r--engines/toon/toon.h5
-rw-r--r--engines/touche/console.cpp19
-rw-r--r--engines/touche/console.h3
-rw-r--r--engines/touche/detection.cpp16
-rw-r--r--engines/touche/menu.cpp8
-rw-r--r--engines/touche/resource.cpp5
-rw-r--r--engines/touche/touche.cpp89
-rw-r--r--engines/touche/touche.h13
-rw-r--r--engines/tsage/blue_force/blueforce_scenes9.cpp4
-rw-r--r--engines/tsage/converse.cpp7
-rw-r--r--engines/tsage/core.cpp42
-rw-r--r--engines/tsage/core.h7
-rw-r--r--engines/tsage/detection_tables.h20
-rw-r--r--engines/tsage/events.h2
-rw-r--r--engines/tsage/graphics.h1
-rw-r--r--engines/tsage/ringworld/ringworld_scenes3.cpp6
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes0.cpp8
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp21
-rw-r--r--engines/tsage/sound.cpp13
-rw-r--r--engines/tucker/console.cpp3
-rw-r--r--engines/tucker/detection.cpp16
-rw-r--r--engines/wintermute/ad/ad_actor.cpp140
-rw-r--r--engines/wintermute/ad/ad_actor.h14
-rw-r--r--engines/wintermute/ad/ad_entity.cpp85
-rw-r--r--engines/wintermute/ad/ad_entity.h27
-rw-r--r--engines/wintermute/ad/ad_game.cpp230
-rw-r--r--engines/wintermute/ad/ad_game.h48
-rw-r--r--engines/wintermute/ad/ad_inventory.cpp12
-rw-r--r--engines/wintermute/ad/ad_inventory.h4
-rw-r--r--engines/wintermute/ad/ad_inventory_box.cpp22
-rw-r--r--engines/wintermute/ad/ad_inventory_box.h12
-rw-r--r--engines/wintermute/ad/ad_item.cpp48
-rw-r--r--engines/wintermute/ad/ad_item.h14
-rw-r--r--engines/wintermute/ad/ad_layer.cpp16
-rw-r--r--engines/wintermute/ad/ad_layer.h14
-rw-r--r--engines/wintermute/ad/ad_node_state.cpp29
-rw-r--r--engines/wintermute/ad/ad_object.cpp148
-rw-r--r--engines/wintermute/ad/ad_object.h92
-rw-r--r--engines/wintermute/ad/ad_path.cpp8
-rw-r--r--engines/wintermute/ad/ad_path.h2
-rw-r--r--engines/wintermute/ad/ad_path_point.cpp8
-rw-r--r--engines/wintermute/ad/ad_path_point.h2
-rw-r--r--engines/wintermute/ad/ad_region.cpp17
-rw-r--r--engines/wintermute/ad/ad_region.h24
-rw-r--r--engines/wintermute/ad/ad_response.cpp64
-rw-r--r--engines/wintermute/ad/ad_response.h22
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp135
-rw-r--r--engines/wintermute/ad/ad_response_box.h42
-rw-r--r--engines/wintermute/ad/ad_response_context.cpp8
-rw-r--r--engines/wintermute/ad/ad_response_context.h8
-rw-r--r--engines/wintermute/ad/ad_rot_level.cpp2
-rw-r--r--engines/wintermute/ad/ad_rot_level.h5
-rw-r--r--engines/wintermute/ad/ad_scale_level.cpp5
-rw-r--r--engines/wintermute/ad/ad_scale_level.h6
-rw-r--r--engines/wintermute/ad/ad_scene.cpp303
-rw-r--r--engines/wintermute/ad/ad_scene.h58
-rw-r--r--engines/wintermute/ad/ad_scene_node.cpp12
-rw-r--r--engines/wintermute/ad/ad_scene_state.cpp9
-rw-r--r--engines/wintermute/ad/ad_scene_state.h2
-rw-r--r--engines/wintermute/ad/ad_sentence.cpp84
-rw-r--r--engines/wintermute/ad/ad_sentence.h4
-rw-r--r--engines/wintermute/ad/ad_sprite_set.cpp38
-rw-r--r--engines/wintermute/ad/ad_sprite_set.h4
-rw-r--r--engines/wintermute/ad/ad_talk_def.cpp36
-rw-r--r--engines/wintermute/ad/ad_talk_def.h2
-rw-r--r--engines/wintermute/ad/ad_talk_holder.cpp24
-rw-r--r--engines/wintermute/ad/ad_talk_holder.h10
-rw-r--r--engines/wintermute/ad/ad_talk_node.cpp36
-rw-r--r--engines/wintermute/ad/ad_talk_node.h2
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.cpp2
-rw-r--r--engines/wintermute/ad/ad_waypoint_group.h15
-rw-r--r--engines/wintermute/base/base.cpp27
-rw-r--r--engines/wintermute/base/base.h2
-rw-r--r--engines/wintermute/base/base_active_rect.cpp19
-rw-r--r--engines/wintermute/base/base_active_rect.h6
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.cpp8
-rw-r--r--engines/wintermute/base/base_dynamic_buffer.h2
-rw-r--r--engines/wintermute/base/base_engine.cpp40
-rw-r--r--engines/wintermute/base/base_engine.h9
-rw-r--r--engines/wintermute/base/base_fader.cpp13
-rw-r--r--engines/wintermute/base/base_fader.h2
-rw-r--r--engines/wintermute/base/base_file_manager.cpp59
-rw-r--r--engines/wintermute/base/base_file_manager.h7
-rw-r--r--engines/wintermute/base/base_frame.cpp41
-rw-r--r--engines/wintermute/base/base_frame.h14
-rw-r--r--engines/wintermute/base/base_game.cpp1096
-rw-r--r--engines/wintermute/base/base_game.h174
-rw-r--r--engines/wintermute/base/base_game_music.cpp506
-rw-r--r--engines/wintermute/base/base_game_music.h73
-rw-r--r--engines/wintermute/base/base_game_settings.cpp222
-rw-r--r--engines/wintermute/base/base_game_settings.h71
-rw-r--r--engines/wintermute/base/base_keyboard_state.cpp12
-rw-r--r--engines/wintermute/base/base_keyboard_state.h17
-rw-r--r--engines/wintermute/base/base_named_object.cpp14
-rw-r--r--engines/wintermute/base/base_named_object.h2
-rw-r--r--engines/wintermute/base/base_object.cpp61
-rw-r--r--engines/wintermute/base/base_object.h18
-rw-r--r--engines/wintermute/base/base_parser.cpp16
-rw-r--r--engines/wintermute/base/base_parser.h10
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp202
-rw-r--r--engines/wintermute/base/base_persistence_manager.h8
-rw-r--r--engines/wintermute/base/base_point.h4
-rw-r--r--engines/wintermute/base/base_quick_msg.cpp22
-rw-r--r--engines/wintermute/base/base_quick_msg.h13
-rw-r--r--engines/wintermute/base/base_region.cpp18
-rw-r--r--engines/wintermute/base/base_region.h18
-rw-r--r--engines/wintermute/base/base_script_holder.cpp47
-rw-r--r--engines/wintermute/base/base_script_holder.h14
-rw-r--r--engines/wintermute/base/base_scriptable.cpp22
-rw-r--r--engines/wintermute/base/base_scriptable.h4
-rw-r--r--engines/wintermute/base/base_sprite.cpp49
-rw-r--r--engines/wintermute/base/base_sprite.h28
-rw-r--r--engines/wintermute/base/base_string_table.cpp35
-rw-r--r--engines/wintermute/base/base_sub_frame.cpp35
-rw-r--r--engines/wintermute/base/base_sub_frame.h8
-rw-r--r--engines/wintermute/base/base_surface_storage.cpp38
-rw-r--r--engines/wintermute/base/base_surface_storage.h2
-rw-r--r--engines/wintermute/base/base_transition_manager.cpp7
-rw-r--r--engines/wintermute/base/base_transition_manager.h2
-rw-r--r--engines/wintermute/base/base_viewport.cpp25
-rw-r--r--engines/wintermute/base/base_viewport.h14
-rw-r--r--engines/wintermute/base/file/base_disk_file.cpp31
-rw-r--r--engines/wintermute/base/file/base_file.h4
-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_package.h2
-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.cpp10
-rw-r--r--engines/wintermute/base/font/base_font.h4
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.cpp42
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.h16
-rw-r--r--engines/wintermute/base/font/base_font_storage.cpp8
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp135
-rw-r--r--engines/wintermute/base/font/base_font_truetype.h29
-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.h56
-rw-r--r--engines/wintermute/base/gfx/base_surface.cpp2
-rw-r--r--engines/wintermute/base/gfx/base_surface.h11
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.cpp324
-rw-r--r--engines/wintermute/base/gfx/osystem/base_render_osystem.h79
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp42
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.h31
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp115
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.h69
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp36
-rw-r--r--engines/wintermute/base/particles/part_emitter.h44
-rw-r--r--engines/wintermute/base/particles/part_particle.cpp12
-rw-r--r--engines/wintermute/base/particles/part_particle.h12
-rw-r--r--engines/wintermute/base/save_thumb_helper.cpp (renamed from engines/wintermute/base/base_save_thumb_helper.cpp)69
-rw-r--r--engines/wintermute/base/save_thumb_helper.h (renamed from engines/wintermute/base/base_save_thumb_helper.h)15
-rw-r--r--engines/wintermute/base/saveload.cpp16
-rw-r--r--engines/wintermute/base/scriptables/script.cpp174
-rw-r--r--engines/wintermute/base/scriptables/script.h12
-rw-r--r--engines/wintermute/base/scriptables/script_engine.cpp43
-rw-r--r--engines/wintermute/base/scriptables/script_engine.h4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.cpp4
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.h2
-rw-r--r--engines/wintermute/base/scriptables/script_ext_date.cpp31
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.cpp22
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.h2
-rw-r--r--engines/wintermute/base/scriptables/script_ext_math.cpp1
-rw-r--r--engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp18
-rw-r--r--engines/wintermute/base/scriptables/script_ext_mem_buffer.h2
-rw-r--r--engines/wintermute/base/scriptables/script_ext_string.cpp53
-rw-r--r--engines/wintermute/base/scriptables/script_ext_string.h2
-rw-r--r--engines/wintermute/base/scriptables/script_stack.cpp45
-rw-r--r--engines/wintermute/base/scriptables/script_stack.h2
-rw-r--r--engines/wintermute/base/scriptables/script_value.cpp86
-rw-r--r--engines/wintermute/base/scriptables/script_value.h6
-rw-r--r--engines/wintermute/base/sound/base_sound.cpp8
-rw-r--r--engines/wintermute/base/sound/base_sound.h2
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp16
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.h4
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp29
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.h7
-rw-r--r--engines/wintermute/base/timer.cpp74
-rw-r--r--engines/wintermute/base/timer.h57
-rw-r--r--engines/wintermute/coll_templ.h97
-rw-r--r--engines/wintermute/dcgf.h6
-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.h378
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp19
-rw-r--r--engines/wintermute/graphics/transparent_surface.h2
-rw-r--r--engines/wintermute/math/math_util.cpp2
-rw-r--r--engines/wintermute/math/matrix4.cpp2
-rw-r--r--engines/wintermute/math/vector2.cpp2
-rw-r--r--engines/wintermute/module.mk8
-rw-r--r--engines/wintermute/persistent.h41
-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.cpp10
-rw-r--r--engines/wintermute/ui/ui_button.cpp106
-rw-r--r--engines/wintermute/ui/ui_button.h12
-rw-r--r--engines/wintermute/ui/ui_edit.cpp44
-rw-r--r--engines/wintermute/ui/ui_edit.h18
-rw-r--r--engines/wintermute/ui/ui_entity.cpp10
-rw-r--r--engines/wintermute/ui/ui_entity.h10
-rw-r--r--engines/wintermute/ui/ui_object.cpp40
-rw-r--r--engines/wintermute/ui/ui_object.h18
-rw-r--r--engines/wintermute/ui/ui_text.cpp14
-rw-r--r--engines/wintermute/ui/ui_text.h12
-rw-r--r--engines/wintermute/ui/ui_tiled_image.cpp23
-rw-r--r--engines/wintermute/ui/ui_tiled_image.h7
-rw-r--r--engines/wintermute/ui/ui_window.cpp76
-rw-r--r--engines/wintermute/ui/ui_window.h12
-rw-r--r--engines/wintermute/utils/string_util.cpp20
-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.h8
-rw-r--r--engines/wintermute/video/video_theora_player.cpp79
-rw-r--r--engines/wintermute/video/video_theora_player.h47
-rw-r--r--engines/wintermute/wintermute.cpp78
-rw-r--r--engines/wintermute/wintermute.h13
-rw-r--r--graphics/decoders/bmp.h1
-rw-r--r--graphics/decoders/iff.cpp241
-rw-r--r--graphics/decoders/iff.h119
-rw-r--r--graphics/decoders/jpeg.cpp16
-rw-r--r--graphics/decoders/jpeg.h1
-rw-r--r--graphics/decoders/pict.cpp11
-rw-r--r--graphics/decoders/png.cpp2
-rw-r--r--graphics/decoders/png.h1
-rw-r--r--graphics/decoders/tga.h2
-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/scaler/aspect.cpp18
-rw-r--r--graphics/thumbnail.cpp96
-rw-r--r--graphics/thumbnail.h2
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/ThemeParser.cpp10
-rw-r--r--gui/about.cpp59
-rw-r--r--gui/browser.cpp18
-rw-r--r--gui/browser.h6
-rw-r--r--gui/browser_osx.mm110
-rw-r--r--gui/credits.h51
-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/predictivedialog.cpp5
-rw-r--r--gui/saveload-dialog.cpp8
-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.datbin370908 -> 441486 bytes
-rw-r--r--gui/widget.cpp4
-rw-r--r--gui/widgets/list.cpp17
-rw-r--r--gui/widgets/list.h1
-rw-r--r--gui/widgets/popup.cpp26
-rw-r--r--po/POTFILES7
-rw-r--r--po/be_BY.po3321
-rw-r--r--po/ca_ES.po670
-rw-r--r--po/cs_CZ.po718
-rw-r--r--po/da_DA.po710
-rw-r--r--po/de_DE.po728
-rw-r--r--po/es_ES.po717
-rw-r--r--po/eu.po686
-rw-r--r--po/fi_FI.po3281
-rw-r--r--po/fr_FR.po734
-rw-r--r--po/gl_ES.po689
-rw-r--r--po/hu_HU.po683
-rw-r--r--po/it_IT.po709
-rw-r--r--po/nb_NO.po772
-rw-r--r--po/nn_NO.po677
-rw-r--r--po/pl_PL.po722
-rw-r--r--po/pt_BR.po686
-rw-r--r--po/ru_RU.po757
-rw-r--r--po/scummvm.pot662
-rw-r--r--po/se_SE.po718
-rw-r--r--po/uk_UA.po714
-rw-r--r--ports.mk30
-rw-r--r--test/common/bitstream.h152
-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/bink_decoder.h2
-rw-r--r--video/codecs/cdtoons.h7
-rw-r--r--video/codecs/cinepak.cpp46
-rw-r--r--video/codecs/cinepak.h13
-rw-r--r--video/codecs/codec.h32
-rw-r--r--video/codecs/indeo3.h7
-rw-r--r--video/codecs/mjpeg.h10
-rw-r--r--video/codecs/msrle.h6
-rw-r--r--video/codecs/msvideo1.h6
-rw-r--r--video/codecs/qtrle.h6
-rw-r--r--video/codecs/rpza.cpp4
-rw-r--r--video/codecs/rpza.h6
-rw-r--r--video/codecs/smc.h6
-rw-r--r--video/codecs/svq1.cpp4
-rw-r--r--video/codecs/svq1.h6
-rw-r--r--video/codecs/truemotion1.h6
-rw-r--r--video/coktel_decoder.cpp2
-rw-r--r--video/flic_decoder.cpp12
-rw-r--r--video/flic_decoder.h1
-rw-r--r--video/psx_decoder.cpp2
-rw-r--r--video/qt_decoder.cpp214
-rw-r--r--video/qt_decoder.h6
-rw-r--r--video/smk_decoder.cpp9
-rw-r--r--video/smk_decoder.h6
-rw-r--r--video/theora_decoder.h1
-rw-r--r--video/video_decoder.cpp230
-rw-r--r--video/video_decoder.h101
1433 files changed, 137468 insertions, 28461 deletions
diff --git a/.gitignore b/.gitignore
index 80adcb7551..b834214a00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -116,8 +116,10 @@ project.xcworkspace
/devtools/create_kyradat/create_kyradat
/devtools/create_lure/create_lure
/devtools/create_mads/create_mads
+/devtools/create_neverhood/create_neverhood
/devtools/create_project/create_project
/devtools/create_teenagent/create_teenagent
+/devtools/create_tony/create_tony
/devtools/create_toon/create_toon
/devtools/create_translations/create_translations
/devtools/qtable/qtable
diff --git a/AUTHORS b/AUTHORS
index 2ae50159c3..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
@@ -411,6 +421,9 @@ Other contributions
Basque:
Mikel Iturbe Urretxa
+ Belarusian:
+ Ivan Lukyanov
+
Catalan:
Jordi Vilalta Prat
@@ -420,6 +433,9 @@ Other contributions
Danish:
Steffen Nyeland
+ Finnish:
+ Toni Saarela
+
French:
Thierry Crozat
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..aec033f0c7 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -78,7 +78,7 @@ endif
$(EXECUTABLE): $(OBJS)
$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
-distclean: clean
+distclean: clean clean-devtools
$(RM) config.h config.mk config.log
clean:
@@ -171,7 +171,7 @@ ifeq ($(origin VER_REV), undefined)
# Are there uncommitted changes? (describe --dirty is only available since 1.6.6)
VER_DIRTY := $(shell cd $(srcdir); git update-index --refresh --unmerged 1>/dev/null 2>&1; git diff-index --quiet HEAD || echo "-dirty")
# Get the working copy base revision
-VER_REV := $(shell cd $(srcdir); git describe --match desc/\* | cut -d '-' -f 2-)$(VER_DIRTY)
+VER_REV := $(shell cd $(srcdir); git describe --long --match desc/\* | cut -d '-' -f 2-)$(VER_DIRTY)
endif
else
GITROOT := git://github.com/scummvm/scummvm.git
@@ -253,6 +253,9 @@ endif
ifdef ENABLE_LURE
DIST_FILES_ENGINEDATA+=lure.dat
endif
+ifdef ENABLE_NEVERHOOD
+DIST_FILES_ENGINEDATA+=neverhood.dat
+endif
ifdef ENABLE_QUEEN
DIST_FILES_ENGINEDATA+=queen.tbl
endif
@@ -262,9 +265,15 @@ endif
ifdef ENABLE_TEENAGENT
DIST_FILES_ENGINEDATA+=teenagent.dat
endif
+ifdef ENABLE_TONY
+DIST_FILES_ENGINEDATA+=tony.dat
+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 923844e32c..cf9a07e8cb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,19 @@
For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
-1.6.0 (????-??-??)
+1.7.0 (????-??-??)
+
+
+1.6.0 (2013-05-31)
+ 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 Hopkins FBI.
+ - 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
supported for resolutions bigger than 640x400. The old chooser is still
@@ -9,16 +21,69 @@ For a more comprehensive changelog of the latest experimental code, see:
select the old one as default too.
- Rewrote VideoDecoder subsystem.
- Added Galician translation.
+ - Added Finnish translation.
+ - 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
+ 'help' command. Previously, players needed to consult the manual for the
+ available commands. Since this reference to the manual is a form of copy
+ protection, this extra line can be toggled by the ScummVM copy protection
+ command line option.
+
+ 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.
+
SCUMM:
- Implemented Monkey Island 2 Macintosh's audio driver. Now we properly
support its sample based audio output. The same output is also used for
the m68k Macintosh version of Indiana Jones and the Fate of Atlantis.
+ - Improved music support for the Macintosh version of Monkey Island 1. It
+ now uses the original instruments, rather than approximating them with
+ 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).
+
+ TOUCHE:
+ - Added support for Enhanced Music by James Woodcock
+ (http://www.jameswoodcock.co.uk/category/scummvm-music-enhancement-project/).
+
1.5.0 (2012-07-27)
New Games:
diff --git a/README b/README
index bbca0ec0cd..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]
@@ -384,21 +389,24 @@ entering any answer. Chances are that it will work.
ScummVM will skip copy protection in the following games:
- * Maniac Mansion
- * Zak McKracken and the Alien Mindbenders
- * Loom (EGA)
- * The Secret of Monkey Island (VGA)
- * Monkey Island 2: LeChuck's Revenge
* Beneath a Steel Sky
-- bypassed with kind permission from Revolution Software.
+ * Dreamweb
+ -- a list of available commands in the in-game terminals is now shown
+ when the player uses the 'help' command
* Inherit the Earth: Quest for the Orb (Floppy version)
-- bypassed with kind permission from Wyrmkeep Entertainment,
since it was bypassed in all CD releases of the game.
+ * Loom (EGA DOS)
+ * Maniac Mansion
+ * Monkey Island 2: LeChuck's Revenge
* Simon the Sorcerer 1 (Floppy version)
* Simon the Sorcerer 2 (Floppy version)
-- bypassed with kind permission from Adventure Soft,
since it was bypassed in all CD releases of the game.
+ * The Secret of Monkey Island (VGA)
* Waxworks
+ * Zak McKracken and the Alien Mindbenders
3.2) Commodore64 games notes:
@@ -2033,9 +2041,10 @@ The following keywords are recognized:
super2xsai, supereagle, advmame2x, advmame3x,
hq2x, hq3x, tv2x, dotmatrix)
- confirm_exit bool Ask for confirmation by the user before quitting
- (SDL backend only).
- console bool Enable the console window (default: enabled) (Windows only).
+ confirm_exit bool Ask for confirmation by the user before
+ quitting (SDL backend only).
+ console bool Enable the console window (default: enabled)
+ (Windows only).
cdrom number Number of CD-ROM unit to use for audio. If
negative, don't even try to access the CD-ROM.
joystick_num number Number of joystick device to use for input
@@ -2063,7 +2072,8 @@ The following keywords are recognized:
supported by some MIDI drivers.)
copy_protection bool Enable copy protection in certain games, in
- those cases where ScummVM disables it by default.
+ those cases where ScummVM disables it by
+ default.
demo_mode bool Start demo in Maniac Mansion
alt_intro bool Use alternative intro for CD versions of
Beneath a Steel Sky and Flight of the Amazon
@@ -2124,8 +2134,9 @@ Lands of Lore: The Throne of Chaos adds the following non-standard keywords:
Space Quest IV CD adds the following non-standard keyword:
- silver_cursors bool If true, an alternate set of silver mouse cursors
- is used instead of the original golden ones
+ silver_cursors bool If true, an alternate set of silver mouse
+ cursors is used instead of the original golden
+ ones
Simon the Sorcerer 1 and 2 add the following non-standard keywords:
@@ -2134,19 +2145,32 @@ Simon the Sorcerer 1 and 2 add the following non-standard keywords:
The Legend of Kyrandia adds the following non-standard keyword:
- walkspeed int The walk speed (0-4)
+ walkspeed number The walk speed (0-4)
+
+The Legend of Kyrandia: The Hand of Fate adds the following non-standard
+keyword:
+
+ walkspeed number The walk speed (3 or 5, resp. fast or
+ slow)
The Legend of Kyrandia: Malcolm's Revenge adds the following non-standard
keywords:
+ walkspeed number The walk speed (3 or 5, resp. fast or
+ slow)
studio_audience bool If true, applause and cheering sounds are heard
whenever Malcolm makes a joke
skip_support bool If true, the player can skip text and cutscenes
- helium_mode bool If true, people sound like they've inhaled Helium
+ helium_mode bool If true, people sound like they've inhaled
+ Helium
The 7th Guest adds the following non-standard keyword:
- t7g_speed string Video playback speed (normal, tweaked, im_an_ios)
+ 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/audiostream.cpp b/audio/audiostream.cpp
index 2d65d4afef..8bd4b95c49 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -98,6 +98,10 @@ LoopingAudioStream::LoopingAudioStream(RewindableAudioStream *stream, uint loops
// TODO: Properly indicate error
_loops = _completeIterations = 1;
}
+ if (stream->endOfData()) {
+ // Apparently this is an empty stream
+ _loops = _completeIterations = 1;
+ }
}
int LoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
@@ -118,6 +122,10 @@ int LoopingAudioStream::readBuffer(int16 *buffer, const int numSamples) {
_loops = _completeIterations = 1;
return samplesRead;
}
+ if (_parent->endOfData()) {
+ // Apparently this is an empty stream
+ _loops = _completeIterations = 1;
+ }
return samplesRead + readBuffer(buffer + samplesRead, remainingSamples);
}
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index 2fe509e1f3..61b0abaaca 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -268,7 +268,6 @@ static const int MSADPCMAdaptationTable[] = {
768, 614, 512, 409, 307, 230, 230, 230
};
-
int16 MS_ADPCMStream::decodeMS(ADPCMChannelStatus *c, byte code) {
int32 predictor;
@@ -290,40 +289,42 @@ int16 MS_ADPCMStream::decodeMS(ADPCMChannelStatus *c, byte code) {
int MS_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
int samples;
byte data;
- int i = 0;
-
- samples = 0;
+ int i;
- while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
- if (_blockPos[0] == _blockAlign) {
- // read block header
- for (i = 0; i < _channels; i++) {
- _status.ch[i].predictor = CLIP(_stream->readByte(), (byte)0, (byte)6);
- _status.ch[i].coeff1 = MSADPCMAdaptCoeff1[_status.ch[i].predictor];
- _status.ch[i].coeff2 = MSADPCMAdaptCoeff2[_status.ch[i].predictor];
- }
+ for (samples = 0; samples < numSamples && !endOfData(); samples++) {
+ if (_decodedSampleCount == 0) {
+ if (_blockPos[0] == _blockAlign) {
+ // read block header
+ for (i = 0; i < _channels; i++) {
+ _status.ch[i].predictor = CLIP(_stream->readByte(), (byte)0, (byte)6);
+ _status.ch[i].coeff1 = MSADPCMAdaptCoeff1[_status.ch[i].predictor];
+ _status.ch[i].coeff2 = MSADPCMAdaptCoeff2[_status.ch[i].predictor];
+ }
- for (i = 0; i < _channels; i++)
- _status.ch[i].delta = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _status.ch[i].delta = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- _status.ch[i].sample1 = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _status.ch[i].sample1 = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- buffer[samples++] = _status.ch[i].sample2 = _stream->readSint16LE();
+ for (i = 0; i < _channels; i++)
+ _decodedSamples[_decodedSampleCount++] = _status.ch[i].sample2 = _stream->readSint16LE();
- for (i = 0; i < _channels; i++)
- buffer[samples++] = _status.ch[i].sample1;
+ for (i = 0; i < _channels; i++)
+ _decodedSamples[_decodedSampleCount++] = _status.ch[i].sample1;
- _blockPos[0] = _channels * 7;
+ _blockPos[0] = _channels * 7;
+ } else {
+ data = _stream->readByte();
+ _blockPos[0]++;
+ _decodedSamples[_decodedSampleCount++] = decodeMS(&_status.ch[0], (data >> 4) & 0x0f);
+ _decodedSamples[_decodedSampleCount++] = decodeMS(&_status.ch[_channels - 1], data & 0x0f);
+ }
}
- for (; samples < numSamples && _blockPos[0] < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
- data = _stream->readByte();
- _blockPos[0]++;
- buffer[samples] = decodeMS(&_status.ch[0], (data >> 4) & 0x0f);
- buffer[samples + 1] = decodeMS(&_status.ch[_channels - 1], data & 0x0f);
- }
+ // (1 - (count - 1)) ensures that _decodedSamples acts as a FIFO of depth 2
+ buffer[samples] = _decodedSamples[1 - (_decodedSampleCount - 1)];
+ _decodedSampleCount--;
}
return samples;
@@ -432,7 +433,7 @@ int16 Ima_ADPCMStream::decodeIMA(byte code, int channel) {
return samp;
}
-RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, ADPCMType type, int rate, int channels, uint32 blockAlign) {
// If size is 0, report the entire size of the stream
if (!size)
size = stream->size();
diff --git a/audio/decoders/adpcm.h b/audio/decoders/adpcm.h
index ac8d529917..d3c46574bf 100644
--- a/audio/decoders/adpcm.h
+++ b/audio/decoders/adpcm.h
@@ -51,7 +51,7 @@ class RewindableAudioStream;
// http://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs
// Usually, if the audio stream we're trying to play has the FourCC header
// string intact, it's easy to discern which encoding is used
-enum typesADPCM {
+enum ADPCMType {
kADPCMOki, // Dialogic/Oki ADPCM (aka VOX)
kADPCMMSIma, // Microsoft IMA ADPCM
kADPCMMS, // Microsoft ADPCM
@@ -76,9 +76,9 @@ enum typesADPCM {
RewindableAudioStream *makeADPCMStream(
Common::SeekableReadStream *stream,
DisposeAfterUse::Flag disposeAfterUse,
- uint32 size, typesADPCM type,
- int rate = 22050,
- int channels = 2,
+ uint32 size, ADPCMType type,
+ int rate,
+ int channels,
uint32 blockAlign = 0);
} // End of namespace Audio
diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 3b8d8c74d0..66a1aa605f 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -206,12 +206,19 @@ public:
if (blockAlign == 0)
error("MS_ADPCMStream(): blockAlign isn't specified for MS ADPCM");
memset(&_status, 0, sizeof(_status));
+ _decodedSampleCount = 0;
}
+ virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos) && (_decodedSampleCount == 0); }
+
virtual int readBuffer(int16 *buffer, const int numSamples);
protected:
int16 decodeMS(ADPCMChannelStatus *c, byte);
+
+private:
+ uint8 _decodedSampleCount;
+ int16 _decodedSamples[4];
};
// Duck DK3 IMA ADPCM Decoder
diff --git a/audio/decoders/aiff.h b/audio/decoders/aiff.h
index afcdb6ae6c..0d96e73c26 100644
--- a/audio/decoders/aiff.h
+++ b/audio/decoders/aiff.h
@@ -48,7 +48,7 @@ class SeekableAudioStream;
* successful. In that case, the stream's seek position will be set to the
* start of the audio data, and size, rate and flags contain information
* necessary for playback. Currently this function only supports uncompressed
- * raw PCM data as well as IMA ADPCM.
+ * raw PCM.
*/
extern bool loadAIFFFromStream(Common::SeekableReadStream &stream, int &size, int &rate, byte &flags);
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index 732de311aa..b70fc39e48 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -872,7 +872,7 @@ void initVlcSparse(VLC *vlc, int nb_bits, int nb_codes,
codes, codes_wrap, codes_size,
symbols, symbols_wrap, symbols_size,
0, 0, 4 | 2) < 0) {
- free(&vlc->table);
+ free(vlc->table);
return; // Error
}
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 0588650ec6..787b547495 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -134,7 +134,7 @@ void QuickTimeAudioDecoder::init() {
_audioTracks.push_back(new QuickTimeAudioTrack(this, _tracks[i]));
}
-Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeAudioDecoder::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_AUDIO) {
debug(0, "Audio Codec FourCC: \'%s\'", tag2str(format));
diff --git a/audio/decoders/quicktime_intern.h b/audio/decoders/quicktime_intern.h
index f1ab037d89..bb5ff0cf5c 100644
--- a/audio/decoders/quicktime_intern.h
+++ b/audio/decoders/quicktime_intern.h
@@ -131,7 +131,7 @@ protected:
};
// Common::QuickTimeParser API
- virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format);
+ virtual Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
void init();
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp
index da655643a7..d2fe7dc0e8 100644
--- a/audio/fmopl.cpp
+++ b/audio/fmopl.cpp
@@ -137,7 +137,7 @@ OPL *Config::create(DriverId driver, OplType type) {
return new MAME::OPL();
else
warning("MAME OPL emulator only supports OPL2 emulation");
- return 0;
+ return 0;
#ifndef DISABLE_DOSBOX_OPL
case kDOSBox:
diff --git a/audio/fmopl.h b/audio/fmopl.h
index 323cc3d028..ad1794d873 100644
--- a/audio/fmopl.h
+++ b/audio/fmopl.h
@@ -129,7 +129,9 @@ public:
/**
* Function to directly write to a specific OPL register.
- * This writes to *both* chips for a Dual OPL2.
+ * This writes to *both* chips for a Dual OPL2. We allow
+ * writing to secondary OPL registers by using register
+ * values >= 0x100.
*
* @param r hardware register number to write to
* @param v value, which will be written
diff --git a/audio/mididrv.h b/audio/mididrv.h
index fb3e29bd60..56b4a265cb 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -194,7 +194,9 @@ public:
enum {
// PROP_TIMEDIV = 1,
PROP_OLD_ADLIB = 2,
- PROP_CHANNEL_MASK = 3
+ PROP_CHANNEL_MASK = 3,
+ // HACK: Not so nice, but our SCUMM AdLib code is in audio/
+ PROP_SCUMM_OPL3 = 4
};
/**
diff --git a/audio/midiparser.cpp b/audio/midiparser.cpp
index eec32c05d1..9c144c2479 100644
--- a/audio/midiparser.cpp
+++ b/audio/midiparser.cpp
@@ -46,6 +46,7 @@ _numTracks(0),
_activeTrack(255),
_abortParse(0) {
memset(_activeNotes, 0, sizeof(_activeNotes));
+ memset(_tracks, 0, sizeof(_tracks));
_nextEvent.start = NULL;
_nextEvent.delta = 0;
_nextEvent.event = 0;
diff --git a/audio/midiparser.h b/audio/midiparser.h
index a4dbf174e1..bb9749b97f 100644
--- a/audio/midiparser.h
+++ b/audio/midiparser.h
@@ -394,6 +394,7 @@ public:
static MidiParser *createParser_SMF();
static MidiParser *createParser_XMIDI(XMidiCallbackProc proc = defaultXMidiCallback, void *refCon = 0);
+ static MidiParser *createParser_QT();
static void timerCallback(void *data) { ((MidiParser *) data)->onTimer(); }
};
diff --git a/audio/midiparser_qt.cpp b/audio/midiparser_qt.cpp
new file mode 100644
index 0000000000..6214d28f95
--- /dev/null
+++ b/audio/midiparser_qt.cpp
@@ -0,0 +1,496 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "audio/midiparser_qt.h"
+#include "common/debug.h"
+#include "common/memstream.h"
+
+bool MidiParser_QT::loadMusic(byte *data, uint32 size) {
+ if (size < 8)
+ return false;
+
+ Common::SeekableReadStream *stream = new Common::MemoryReadStream(data, size, DisposeAfterUse::NO);
+
+ // Attempt to detect what format we have
+ bool result;
+ if (READ_BE_UINT32(data + 4) == MKTAG('m', 'u', 's', 'i'))
+ result = loadFromTune(stream);
+ else
+ result = loadFromContainerStream(stream);
+
+ if (!result) {
+ delete stream;
+ return false;
+ }
+
+ return true;
+}
+
+void MidiParser_QT::unloadMusic() {
+ MidiParser::unloadMusic();
+ close();
+
+ // Unlike those lesser formats, we *do* hold track data
+ for (uint i = 0; i < _trackInfo.size(); i++)
+ free(_trackInfo[i].data);
+
+ _trackInfo.clear();
+}
+
+bool MidiParser_QT::loadFromTune(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+ unloadMusic();
+
+ // a tune starts off with a sample description
+ stream->readUint32BE(); // header size
+
+ if (stream->readUint32BE() != MKTAG('m', 'u', 's', 'i'))
+ return false;
+
+ stream->readUint32BE(); // reserved
+ stream->readUint16BE(); // reserved
+ stream->readUint16BE(); // index
+
+ stream->readUint32BE(); // flags, ignore
+
+ MIDITrackInfo trackInfo;
+ trackInfo.size = stream->size() - stream->pos();
+ assert(trackInfo.size > 0);
+
+ trackInfo.data = (byte *)malloc(trackInfo.size);
+ stream->read(trackInfo.data, trackInfo.size);
+
+ trackInfo.timeScale = 600; // the default
+ _trackInfo.push_back(trackInfo);
+
+ initCommon();
+ return true;
+}
+
+bool MidiParser_QT::loadFromContainerStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+ unloadMusic();
+
+ if (!parseStream(stream, disposeAfterUse))
+ return false;
+
+ initFromContainerTracks();
+ return true;
+}
+
+bool MidiParser_QT::loadFromContainerFile(const Common::String &fileName) {
+ unloadMusic();
+
+ if (!parseFile(fileName))
+ return false;
+
+ initFromContainerTracks();
+ return true;
+}
+
+void MidiParser_QT::parseNextEvent(EventInfo &info) {
+ uint32 delta = 0;
+
+ while (_queuedEvents.empty())
+ delta += readNextEvent();
+
+ info = _queuedEvents.pop();
+ info.delta = delta;
+}
+
+uint32 MidiParser_QT::readNextEvent() {
+ if (_position._playPos >= _trackInfo[_activeTrack].data + _trackInfo[_activeTrack].size) {
+ // Manually insert end of track when we reach the end
+ EventInfo info;
+ info.event = 0xFF;
+ info.ext.type = 0x2F;
+ _queuedEvents.push(info);
+ return 0;
+ }
+
+ uint32 control = readUint32();
+
+ switch (control >> 28) {
+ case 0x0:
+ case 0x1:
+ // Rest
+ // We handle this by recursively adding up all the rests into the
+ // next event's delta
+ return readNextEvent() + (control & 0xFFFFFF);
+ case 0x2:
+ case 0x3:
+ // Note event
+ handleNoteEvent((control >> 24) & 0x1F, ((control >> 18) & 0x3F) + 32, (control >> 11) & 0x7F, control & 0x7FF);
+ break;
+ case 0x4:
+ case 0x5:
+ // Controller
+ handleControllerEvent((control >> 16) & 0xFF, (control >> 24) & 0x1F, (control >> 8) & 0xFF, control & 0xFF);
+ break;
+ case 0x6:
+ case 0x7:
+ // Marker
+ // Used for editing only, so we don't need to care about this
+ break;
+ case 0x9: {
+ // Extended note event
+ uint32 extra = readUint32();
+ handleNoteEvent((control >> 16) & 0xFFF, (control >> 8) & 0xFF, (extra >> 22) & 0x7F, extra & 0x3FFFFF);
+ break;
+ }
+ case 0xA: {
+ // Extended controller
+ uint32 extra = readUint32();
+ handleControllerEvent((extra >> 16) & 0x3FFF, (control >> 16) & 0xFFF, (extra >> 8) & 0xFF, extra & 0xFF);
+ break;
+ }
+ case 0xB:
+ // Knob
+ error("Encountered knob event in QuickTime MIDI");
+ break;
+ case 0x8:
+ case 0xC:
+ case 0xD:
+ case 0xE:
+ // Reserved
+ readUint32();
+ break;
+ case 0xF:
+ // General
+ handleGeneralEvent(control);
+ break;
+ }
+
+ return 0;
+}
+
+void MidiParser_QT::handleNoteEvent(uint32 part, byte pitch, byte velocity, uint32 length) {
+ byte channel = getChannel(part);
+
+ EventInfo info;
+ info.event = 0x90 | channel;
+ info.basic.param1 = pitch;
+ info.basic.param2 = velocity;
+ info.length = (velocity == 0) ? 0 : length;
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::handleControllerEvent(uint32 control, uint32 part, byte intPart, byte fracPart) {
+ byte channel = getChannel(part);
+ EventInfo info;
+
+ if (control == 0) {
+ // "Bank select"
+ // QuickTime docs don't list this, but IHNM Mac calls this anyway
+ // We have to ignore this.
+ return;
+ } else if (control == 32) {
+ // Pitch bend
+ info.event = 0xE0 | channel;
+
+ // Actually an 8.8 fixed point number
+ int16 value = (int16)((intPart << 8) | fracPart);
+
+ if (value < -0x200 || value > 0x1FF) {
+ warning("QuickTime MIDI pitch bend value (%d) out of range, clipping", value);
+ value = CLIP<int16>(value, -0x200, 0x1FF);
+ }
+
+ // Now convert the value to 'normal' MIDI values
+ value += 0x200;
+ value *= 16;
+
+ // param1 holds the low 7 bits, param2 holds the high 7 bits
+ info.basic.param1 = value & 0x7F;
+ info.basic.param2 = value >> 7;
+
+ _partMap[part].pitchBend = value;
+ } else {
+ // Regular controller
+ info.event = 0xB0 | channel;
+ info.basic.param1 = control;
+ info.basic.param2 = intPart;
+
+ // TODO: Parse more controls to hold their status
+ switch (control) {
+ case 7:
+ _partMap[part].volume = intPart;
+ break;
+ case 10:
+ _partMap[part].pan = intPart;
+ break;
+ }
+ }
+
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::handleGeneralEvent(uint32 control) {
+ uint32 part = (control >> 16) & 0xFFF;
+ uint32 dataSize = ((control & 0xFFFF) - 2) * 4;
+ byte subType = READ_BE_UINT16(_position._playPos + dataSize) & 0x3FFF;
+
+ switch (subType) {
+ case 1:
+ // Note Request
+ // Currently we're only using the GM number from the request
+ assert(dataSize == 84);
+
+ // We have to remap channels because GM needs percussion to be on the
+ // percussion channel but QuickTime can have that anywhere.
+ definePart(part, READ_BE_UINT32(_position._playPos + 80));
+ break;
+ case 5: // Tune Difference
+ case 8: // MIDI Channel
+ case 10: // No-op
+ case 11: // Used Notes
+ // Should be safe to skip these
+ break;
+ default:
+ warning("Unhandled general event %d", subType);
+ }
+
+ _position._playPos += dataSize + 4;
+}
+
+void MidiParser_QT::definePart(uint32 part, uint32 instrument) {
+ if (_partMap.contains(part))
+ warning("QuickTime MIDI part %d being redefined", part);
+
+ PartStatus partStatus;
+ partStatus.instrument = instrument;
+ partStatus.volume = 127;
+ partStatus.pan = 64;
+ partStatus.pitchBend = 0x2000;
+ _partMap[part] = partStatus;
+}
+
+byte MidiParser_QT::getChannel(uint32 part) {
+ // If we already mapped it, just go with it
+ if (!_channelMap.contains(part)) {
+ byte newChannel = findFreeChannel(part);
+ _channelMap[part] = newChannel;
+ setupPart(part);
+ }
+
+ return _channelMap[part];
+}
+
+byte MidiParser_QT::findFreeChannel(uint32 part) {
+ if (_partMap[part].instrument != 0x4001) {
+ // Normal Instrument -> First Free Channel
+ if (allChannelsAllocated())
+ deallocateFreeChannel();
+
+ for (int i = 0; i < 16; i++)
+ if (i != 9 && !isChannelAllocated(i)) // 9 is reserved for Percussion
+ return i;
+
+ // Can't actually get here
+ }
+
+ // Drum Kit -> Percussion Channel
+ deallocateChannel(9);
+ return 9;
+}
+
+void MidiParser_QT::deallocateFreeChannel() {
+ for (int i = 0; i < 16; i++) {
+ if (i != 9 && !_activeNotes[i]) {
+ // TODO: Improve this by looking for the channel with the longest
+ // time since the last note.
+ deallocateChannel(i);
+ return;
+ }
+ }
+
+ error("Exceeded QuickTime MIDI channel polyphony");
+}
+
+void MidiParser_QT::deallocateChannel(byte channel) {
+ for (ChannelMap::iterator it = _channelMap.begin(); it != _channelMap.end(); it++) {
+ if (it->_value == channel) {
+ _channelMap.erase(it);
+ return;
+ }
+ }
+}
+
+bool MidiParser_QT::isChannelAllocated(byte channel) const {
+ for (ChannelMap::const_iterator it = _channelMap.begin(); it != _channelMap.end(); it++)
+ if (it->_value == channel)
+ return true;
+
+ return false;
+}
+
+bool MidiParser_QT::allChannelsAllocated() const {
+ // Less than 15? We definitely have room
+ if (_channelMap.size() < 15)
+ return false;
+
+ // 15? One of the allocated channels might be the percussion one
+ if (_channelMap.size() == 15)
+ for (ChannelMap::const_iterator it = _channelMap.begin(); it != _channelMap.end(); it++)
+ if (it->_value == 9)
+ return false;
+
+ // 16 -> definitely all allocated
+ return true;
+}
+
+void MidiParser_QT::setupPart(uint32 part) {
+ PartStatus &status = _partMap[part];
+ byte channel = _channelMap[part];
+ EventInfo info;
+
+ // First, the program change
+ if (channel != 9) {
+ // 9 is always percussion
+ info.event = 0xC0 | channel;
+ info.basic.param1 = status.instrument;
+ _queuedEvents.push(info);
+ }
+
+ // Volume
+ info.event = 0xB0 | channel;
+ info.basic.param1 = 7;
+ info.basic.param2 = status.volume;
+ _queuedEvents.push(info);
+
+ // Pan
+ info.event = 0xB0 | channel;
+ info.basic.param1 = 10;
+ info.basic.param2 = status.pan;
+ _queuedEvents.push(info);
+
+ // Pitch Bend
+ info.event = 0xE0 | channel;
+ info.basic.param1 = status.pitchBend & 0x7F;
+ info.basic.param2 = status.pitchBend >> 7;
+ _queuedEvents.push(info);
+}
+
+void MidiParser_QT::resetTracking() {
+ MidiParser::resetTracking();
+ _channelMap.clear();
+ _queuedEvents.clear();
+ _partMap.clear();
+}
+
+Common::QuickTimeParser::SampleDesc *MidiParser_QT::readSampleDesc(Track *track, uint32 format, uint32 descSize) {
+ if (track->codecType == CODEC_TYPE_MIDI) {
+ debug(0, "MIDI Codec FourCC '%s'", tag2str(format));
+
+ _fd->readUint32BE(); // flags, ignore
+ descSize -= 4;
+
+ MIDISampleDesc *entry = new MIDISampleDesc(track, format);
+ entry->_requestSize = descSize;
+ entry->_requestData = (byte *)malloc(descSize);
+ _fd->read(entry->_requestData, descSize);
+ return entry;
+ }
+
+ return 0;
+}
+
+MidiParser_QT::MIDISampleDesc::MIDISampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag) :
+ Common::QuickTimeParser::SampleDesc(parentTrack, codecTag) {
+}
+
+void MidiParser_QT::initFromContainerTracks() {
+ const Common::Array<Common::QuickTimeParser::Track *> &tracks = Common::QuickTimeParser::_tracks;
+
+ for (uint32 i = 0; i < tracks.size(); i++) {
+ if (tracks[i]->codecType == CODEC_TYPE_MIDI) {
+ assert(tracks[i]->sampleDescs.size() == 1);
+
+ if (tracks[i]->editCount != 1)
+ warning("Unhandled QuickTime MIDI edit lists, things may go awry");
+
+ MIDITrackInfo trackInfo;
+ trackInfo.data = readWholeTrack(tracks[i], trackInfo.size);
+ trackInfo.timeScale = tracks[i]->timeScale;
+ _trackInfo.push_back(trackInfo);
+ }
+ }
+
+ initCommon();
+}
+
+void MidiParser_QT::initCommon() {
+ // Now we have all our info needed in _trackInfo from whatever container
+ // form, we can fill in the MidiParser tracks.
+
+ _numTracks = _trackInfo.size();
+ assert(_numTracks > 0);
+
+ for (uint32 i = 0; i < _trackInfo.size(); i++)
+ MidiParser::_tracks[i] = _trackInfo[i].data;
+
+ _ppqn = _trackInfo[0].timeScale;
+ resetTracking();
+ setTempo(1000000);
+ setTrack(0);
+}
+
+byte *MidiParser_QT::readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize) {
+ // This just goes through all chunks and appends them together
+
+ Common::MemoryWriteStreamDynamic output;
+ uint32 curSample = 0;
+
+ // Read in the note request data first
+ MIDISampleDesc *entry = (MIDISampleDesc *)track->sampleDescs[0];
+ output.write(entry->_requestData, entry->_requestSize);
+
+ for (uint i = 0; i < track->chunkCount; i++) {
+ _fd->seek(track->chunkOffsets[i]);
+
+ uint32 sampleCount = 0;
+
+ for (uint32 j = 0; j < track->sampleToChunkCount; j++)
+ if (i >= track->sampleToChunk[j].first)
+ sampleCount = track->sampleToChunk[j].count;
+
+ for (uint32 j = 0; j < sampleCount; j++, curSample++) {
+ uint32 size = (track->sampleSize != 0) ? track->sampleSize : track->sampleSizes[curSample];
+
+ byte *data = new byte[size];
+ _fd->read(data, size);
+ output.write(data, size);
+ delete[] data;
+ }
+ }
+
+ trackSize = output.size();
+ return output.getData();
+}
+
+uint32 MidiParser_QT::readUint32() {
+ uint32 value = READ_BE_UINT32(_position._playPos);
+ _position._playPos += 4;
+ return value;
+}
+
+MidiParser *MidiParser::createParser_QT() {
+ return new MidiParser_QT();
+}
diff --git a/audio/midiparser_qt.h b/audio/midiparser_qt.h
new file mode 100644
index 0000000000..d6d0f40a48
--- /dev/null
+++ b/audio/midiparser_qt.h
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef AUDIO_MIDIPARSER_QT_H
+#define AUDIO_MIDIPARSER_QT_H
+
+#include "audio/midiparser.h"
+#include "common/array.h"
+#include "common/hashmap.h"
+#include "common/queue.h"
+#include "common/quicktime.h"
+
+/**
+ * The QuickTime Music version of MidiParser.
+ *
+ * QuickTime Music is actually a superset of MIDI. It has its own custom
+ * instruments and supports more than 15 non-percussion channels. It also
+ * has custom control changes and a more advanced pitch bend (which we
+ * convert to GM pitch bend as best as possible). We then use the fallback
+ * GM instrument that each QuickTime instrument definition has to provide.
+ *
+ * Furthermore, Apple's documentation on this is terrible. You know
+ * documentation is bad when it contradicts itself three times on the same
+ * subject (like about setting the GM instrument field to percussion).
+ *
+ * This is as close to a proper QuickTime Music parser as we can currently
+ * implement using our MidiParser interface.
+ */
+class MidiParser_QT : public MidiParser, public Common::QuickTimeParser {
+public:
+ MidiParser_QT() {}
+ ~MidiParser_QT() {}
+
+ // MidiParser
+ bool loadMusic(byte *data, uint32 size);
+ void unloadMusic();
+
+ /**
+ * Load the MIDI from a 'Tune' resource
+ */
+ bool loadFromTune(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES);
+
+ /**
+ * Load the MIDI from a QuickTime stream
+ */
+ bool loadFromContainerStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES);
+
+ /**
+ * Load the MIDI from a QuickTime file
+ */
+ bool loadFromContainerFile(const Common::String &fileName);
+
+protected:
+ // MidiParser
+ void parseNextEvent(EventInfo &info);
+ void resetTracking();
+
+ // QuickTimeParser
+ SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize);
+
+private:
+ struct MIDITrackInfo {
+ byte *data;
+ uint32 size;
+ uint32 timeScale;
+ };
+
+ struct PartStatus {
+ uint32 instrument;
+ byte volume;
+ byte pan;
+ uint16 pitchBend;
+ };
+
+ class MIDISampleDesc : public SampleDesc {
+ public:
+ MIDISampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag);
+ ~MIDISampleDesc() {}
+
+ byte *_requestData;
+ uint32 _requestSize;
+ };
+
+ uint32 readNextEvent();
+ void handleGeneralEvent(uint32 control);
+ void handleControllerEvent(uint32 control, uint32 part, byte intPart, byte fracPart);
+ void handleNoteEvent(uint32 part, byte pitch, byte velocity, uint32 length);
+
+ void definePart(uint32 part, uint32 instrument);
+ void setupPart(uint32 part);
+
+ byte getChannel(uint32 part);
+ bool isChannelAllocated(byte channel) const;
+ byte findFreeChannel(uint32 part);
+ void deallocateFreeChannel();
+ void deallocateChannel(byte channel);
+ bool allChannelsAllocated() const;
+
+ byte *readWholeTrack(Common::QuickTimeParser::Track *track, uint32 &trackSize);
+
+ Common::Array<MIDITrackInfo> _trackInfo;
+ Common::Queue<EventInfo> _queuedEvents;
+
+ typedef Common::HashMap<uint, PartStatus> PartMap;
+ PartMap _partMap;
+
+ typedef Common::HashMap<uint, byte> ChannelMap;
+ ChannelMap _channelMap;
+
+ void initFromContainerTracks();
+ void initCommon();
+ uint32 readUint32();
+};
+
+#endif
diff --git a/audio/midiparser_smf.cpp b/audio/midiparser_smf.cpp
index 4b0913cbfe..6c64d1e601 100644
--- a/audio/midiparser_smf.cpp
+++ b/audio/midiparser_smf.cpp
@@ -56,8 +56,10 @@ void MidiParser_SMF::property(int prop, int value) {
switch (prop) {
case mpMalformedPitchBends:
_malformedPitchBends = (value > 0);
+ break;
default:
MidiParser::property(prop, value);
+ break;
}
}
diff --git a/audio/midiparser_xmidi.cpp b/audio/midiparser_xmidi.cpp
index 11690b0214..fcb45fa5ad 100644
--- a/audio/midiparser_xmidi.cpp
+++ b/audio/midiparser_xmidi.cpp
@@ -47,8 +47,13 @@ protected:
uint32 readVLQ2(byte * &data);
void parseNextEvent(EventInfo &info);
+ virtual void resetTracking() {
+ MidiParser::resetTracking();
+ _loopCount = -1;
+ }
+
public:
- MidiParser_XMIDI(XMidiCallbackProc proc, void *data) : _callbackProc(proc), _callbackData(data) {}
+ MidiParser_XMIDI(XMidiCallbackProc proc, void *data) : _callbackProc(proc), _callbackData(data), _loopCount(-1) {}
~MidiParser_XMIDI() { }
bool loadMusic(byte *data, uint32 size);
diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index 965766170d..8ff364b98d 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -171,9 +171,9 @@ private:
#pragma mark --- Mixer ---
#pragma mark -
-
+// TODO: parameter "system" is unused
MixerImpl::MixerImpl(OSystem *system, uint sampleRate)
- : _syst(system), _mutex(), _sampleRate(sampleRate), _mixerReady(false), _handleSeed(0), _soundTypeSettings() {
+ : _mutex(), _sampleRate(sampleRate), _mixerReady(false), _handleSeed(0), _soundTypeSettings() {
assert(sampleRate > 0);
@@ -491,7 +491,7 @@ Channel::Channel(Mixer *mixer, Mixer::SoundType type, AudioStream *stream,
DisposeAfterUse::Flag autofreeStream, bool reverseStereo, int id, bool permanent)
: _type(type), _mixer(mixer), _id(id), _permanent(permanent), _volume(Mixer::kMaxChannelVolume),
_balance(0), _pauseLevel(0), _samplesConsumed(0), _samplesDecoded(0), _mixerTimeStamp(0),
- _pauseStartTime(0), _pauseTime(0), _converter(0),
+ _pauseStartTime(0), _pauseTime(0), _converter(0), _volL(0), _volR(0),
_stream(stream, autofreeStream) {
assert(mixer);
assert(stream);
diff --git a/audio/mixer_intern.h b/audio/mixer_intern.h
index c6dfa55ada..fce13a9812 100644
--- a/audio/mixer_intern.h
+++ b/audio/mixer_intern.h
@@ -54,7 +54,6 @@ private:
NUM_CHANNELS = 16
};
- OSystem *_syst;
Common::Mutex _mutex;
const uint _sampleRate;
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/paula.cpp b/audio/mods/paula.cpp
index 4b49d6e750..d655428ed0 100644
--- a/audio/mods/paula.cpp
+++ b/audio/mods/paula.cpp
@@ -132,7 +132,14 @@ int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
Channel &ch = _voice[voice];
int16 *p = buffer;
int neededSamples = nSamples;
- assert(ch.offset.int_off < ch.length);
+
+ // NOTE: A Protracker (or other module format) player might actually
+ // push the offset past the sample length in its interrupt(), in which
+ // case the first mixBuffer() call should not mix anything, and the loop
+ // should be triggered.
+ // Thus, doing an assert(ch.offset.int_off < ch.length) here is wrong.
+ // An example where this happens is a certain Protracker module played
+ // by the OS/2 version of Hopkins FBI.
// Mix the generated samples into the output buffer
neededSamples -= mixBuffer<stereo>(p, ch.data, ch.offset, rate, neededSamples, ch.length, ch.volume, ch.panning);
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/module.mk b/audio/module.mk
index e3aa0aaa81..4e1c031c83 100644
--- a/audio/module.mk
+++ b/audio/module.mk
@@ -4,6 +4,7 @@ MODULE_OBJS := \
audiostream.o \
fmopl.o \
mididrv.o \
+ midiparser_qt.o \
midiparser_smf.o \
midiparser_xmidi.o \
midiparser.o \
diff --git a/audio/softsynth/adlib.cpp b/audio/softsynth/adlib.cpp
index 32a5f4a910..0cadea7f22 100644
--- a/audio/softsynth/adlib.cpp
+++ b/audio/softsynth/adlib.cpp
@@ -32,7 +32,13 @@
#include "common/translation.h"
#ifdef DEBUG_ADLIB
-static int tick;
+static int g_tick;
+#endif
+
+// Only include OPL3 when we actually have an AdLib emulator builtin, which
+// supports OPL3.
+#ifndef DISABLE_DOSBOX_OPL
+#define ENABLE_OPL3
#endif
class MidiDriver_ADLIB;
@@ -52,21 +58,21 @@ struct InstrumentExtra {
} PACKED_STRUCT;
struct AdLibInstrument {
- byte mod_characteristic;
- byte mod_scalingOutputLevel;
- byte mod_attackDecay;
- byte mod_sustainRelease;
- byte mod_waveformSelect;
- byte car_characteristic;
- byte car_scalingOutputLevel;
- byte car_attackDecay;
- byte car_sustainRelease;
- byte car_waveformSelect;
+ byte modCharacteristic;
+ byte modScalingOutputLevel;
+ byte modAttackDecay;
+ byte modSustainRelease;
+ byte modWaveformSelect;
+ byte carCharacteristic;
+ byte carScalingOutputLevel;
+ byte carAttackDecay;
+ byte carSustainRelease;
+ byte carWaveformSelect;
byte feedback;
- byte flags_a;
- InstrumentExtra extra_a;
- byte flags_b;
- InstrumentExtra extra_b;
+ byte flagsA;
+ InstrumentExtra extraA;
+ byte flagsB;
+ InstrumentExtra extraB;
byte duration;
} PACKED_STRUCT;
#include "common/pack-end.h"
@@ -77,16 +83,20 @@ class AdLibPart : public MidiChannel {
protected:
// AdLibPart *_prev, *_next;
AdLibVoice *_voice;
- int16 _pitchbend;
- byte _pitchbend_factor;
- int8 _transpose_eff;
- byte _vol_eff;
- int8 _detune_eff;
- byte _modwheel;
+ int16 _pitchBend;
+ byte _pitchBendFactor;
+ //int8 _transposeEff;
+ byte _volEff;
+ int8 _detuneEff;
+ byte _modWheel;
bool _pedal;
byte _program;
- byte _pri_eff;
- AdLibInstrument _part_instr;
+ byte _priEff;
+ byte _pan;
+ AdLibInstrument _partInstr;
+#ifdef ENABLE_OPL3
+ AdLibInstrument _partInstrSecondary;
+#endif
protected:
MidiDriver_ADLIB *_owner;
@@ -99,21 +109,25 @@ protected:
public:
AdLibPart() {
_voice = 0;
- _pitchbend = 0;
- _pitchbend_factor = 2;
- _transpose_eff = 0;
- _vol_eff = 0;
- _detune_eff = 0;
- _modwheel = 0;
+ _pitchBend = 0;
+ _pitchBendFactor = 2;
+ //_transposeEff = 0;
+ _volEff = 0;
+ _detuneEff = 0;
+ _modWheel = 0;
_pedal = 0;
_program = 0;
- _pri_eff = 0;
+ _priEff = 0;
+ _pan = 64;
_owner = 0;
_allocated = false;
_channel = 0;
- memset(&_part_instr, 0, sizeof(_part_instr));
+ memset(&_partInstr, 0, sizeof(_partInstr));
+#ifdef ENABLE_OPL3
+ memset(&_partInstrSecondary, 0, sizeof(_partInstrSecondary));
+#endif
}
MidiDriver *device();
@@ -132,7 +146,7 @@ public:
void controlChange(byte control, byte value);
void modulationWheel(byte value);
void volume(byte value);
- void panPosition(byte value) { return; } // Not supported
+ void panPosition(byte value);
void pitchBendFactor(byte value);
void detune(byte value);
void priority(byte value);
@@ -162,7 +176,6 @@ public:
void noteOff(byte note);
void noteOn(byte note, byte velocity);
void programChange(byte program) { }
- void pitchBend(int16 bend) { }
// Control Change messages
void modulationWheel(byte value) { }
@@ -181,26 +194,26 @@ private:
struct Struct10 {
byte active;
- int16 cur_val;
+ int16 curVal;
int16 count;
- uint16 max_value;
- int16 start_value;
+ uint16 maxValue;
+ int16 startValue;
byte loop;
- byte table_a[4];
- byte table_b[4];
+ byte tableA[4];
+ byte tableB[4];
int8 unk3;
- int8 modwheel;
- int8 modwheel_last;
- uint16 speed_lo_max;
- uint16 num_steps;
- int16 speed_hi;
+ int8 modWheel;
+ int8 modWheelLast;
+ uint16 speedLoMax;
+ uint16 numSteps;
+ int16 speedHi;
int8 direction;
- uint16 speed_lo;
- uint16 speed_lo_counter;
+ uint16 speedLo;
+ uint16 speedLoCounter;
};
struct Struct11 {
- int16 modify_val;
+ int16 modifyVal;
byte param, flag0x40, flag0x10;
Struct10 *s10;
};
@@ -208,11 +221,11 @@ struct Struct11 {
struct AdLibVoice {
AdLibPart *_part;
AdLibVoice *_next, *_prev;
- byte _waitforpedal;
+ byte _waitForPedal;
byte _note;
byte _channel;
- byte _twochan;
- byte _vol_1, _vol_2;
+ byte _twoChan;
+ byte _vol1, _vol2;
int16 _duration;
Struct10 _s10a;
@@ -220,26 +233,34 @@ struct AdLibVoice {
Struct10 _s10b;
Struct11 _s11b;
+#ifdef ENABLE_OPL3
+ byte _secTwoChan;
+ byte _secVol1, _secVol2;
+#endif
+
AdLibVoice() { memset(this, 0, sizeof(AdLibVoice)); }
};
struct AdLibSetParams {
- byte a, b, c, d;
+ byte registerBase;
+ byte shift;
+ byte mask;
+ byte inversion;
};
-static const byte channel_mappings[9] = {
+static const byte g_operator1Offsets[9] = {
0, 1, 2, 8,
9, 10, 16, 17,
18
};
-static const byte channel_mappings_2[9] = {
+static const byte g_operator2Offsets[9] = {
3, 4, 5, 11,
12, 13, 19, 20,
21
};
-static const AdLibSetParams adlib_setparam_table[] = {
+static const AdLibSetParams g_setParamTable[] = {
{0x40, 0, 63, 63}, // level
{0xE0, 2, 0, 0}, // unused
{0x40, 6, 192, 0}, // level key scaling
@@ -257,21 +278,21 @@ static const AdLibSetParams adlib_setparam_table[] = {
{0xC0, 1, 14, 0} // feedback
};
-static const byte param_table_1[16] = {
+static const byte g_paramTable1[16] = {
29, 28, 27, 0,
3, 4, 7, 8,
13, 16, 17, 20,
21, 30, 31, 0
};
-static const uint16 maxval_table[16] = {
+static const uint16 g_maxValTable[16] = {
0x2FF, 0x1F, 0x7, 0x3F,
0x0F, 0x0F, 0x0F, 0x3,
0x3F, 0x0F, 0x0F, 0x0F,
0x3, 0x3E, 0x1F, 0
};
-static const uint16 num_steps_table[] = {
+static const uint16 g_numStepsTable[] = {
1, 2, 4, 5,
6, 7, 8, 9,
10, 12, 14, 16,
@@ -282,7 +303,7 @@ static const uint16 num_steps_table[] = {
600, 860, 1200, 1600
};
-static const byte note_to_f_num[] = {
+static const byte g_noteFrequencies[] = {
90, 91, 92, 92, 93, 94, 94, 95,
96, 96, 97, 98, 98, 99, 100, 101,
101, 102, 103, 104, 104, 105, 106, 107,
@@ -303,188 +324,530 @@ static const byte note_to_f_num[] = {
242, 243, 245, 247, 249, 251, 252, 254
};
-static const AdLibInstrument map_gm_to_fm[128] = {
+static const AdLibInstrument g_gmInstruments[128] = {
// 0x00
-{ 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
-{ 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
-{ 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1A },
-{ 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A },
+ { 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x10
-{ 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
-{ 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
-{ 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x19 },
-{ 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0A },
-{ 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0B },
+ { 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 },
+ { 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A },
+ { 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B },
// 0x20
-{ 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x20 },
-{ 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
-{ 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
-{ 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+ { 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 },
+ { 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
// 0x30
-{ 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x40
-{ 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x50
-{ 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x60
-{ 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1C },
-{ 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x12 },
-{ 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
-{ 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+ { 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C },
+ { 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 },
+ { 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
// 0x70
-{ 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0F },
-{ 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x38 },
-{ 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 }
+ { 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F },
+ { 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 },
+ { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 }
};
-static AdLibInstrument gm_percussion_to_fm[39] = {
-{ 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x01 },
-{ 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
-{ 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
-{ 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
-{ 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
-{ 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
-{ 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
-{ 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
-{ 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
-{ 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
-{ 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
-{ 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
-{ 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
-{ 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 }
+static AdLibInstrument g_gmPercussionInstruments[39] = {
+ { 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 },
+ { 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 }
};
-static const byte gm_percussion_lookup[128] = {
+#ifdef ENABLE_OPL3
+static const AdLibInstrument g_gmInstrumentsOPL3[128][2] = {
+ { { 0xC2, 0xC2, 0x0A, 0x6B, 0xA0, 0xC2, 0x08, 0x0D, 0x88, 0xC8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x02, 0x00, 0x0C, 0x78, 0x61, 0x04, 0x4C, 0x0B, 0x9A, 0xC8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 } },
+ { { 0x22, 0x53, 0x0E, 0x8A, 0x60, 0x14, 0x06, 0x1D, 0x7A, 0xB8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x22, 0x5A, 0x0E, 0x8A, 0x40, 0x14, 0x2F, 0x0E, 0x7A, 0x88, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x06, 0x00, 0x1C, 0x79, 0x70, 0x02, 0x00, 0x4B, 0x79, 0xA8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x00, 0x1A, 0x79, 0x60, 0x02, 0x00, 0x4C, 0xA9, 0xC8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x80, 0x0B, 0x89, 0x90, 0xC2, 0x06, 0x1B, 0xA8, 0xB0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x23 },
+ { 0x04, 0x28, 0x5D, 0xB8, 0x01, 0x02, 0x00, 0x3C, 0x70, 0x88, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x40, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x40, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0xD3, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x87, 0x40, 0x3A, 0x5A, 0x94, 0x82, 0x04, 0x3D, 0x59, 0xAC, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x84, 0x40, 0x3B, 0x5A, 0xC3, 0x81, 0x00, 0x3B, 0x5A, 0xFB, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x3B, 0x5A, 0xC3, 0x81, 0x00, 0x3B, 0x5A, 0xFB, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x8C, 0x80, 0x05, 0xEA, 0xA9, 0x82, 0x04, 0x3D, 0xAA, 0xB0, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8C, 0x80, 0x06, 0x98, 0xA9, 0x86, 0x10, 0x36, 0x7A, 0xFD, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x85, 0x40, 0x0D, 0xEC, 0xE1, 0x84, 0x58, 0x3E, 0xCB, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x84, 0x40, 0x0D, 0xEB, 0xE0, 0x84, 0x48, 0x3E, 0xCA, 0xC0, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x8A, 0xC0, 0x0C, 0xDC, 0xA0, 0x88, 0x58, 0x3D, 0xDA, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x8A, 0xC0, 0x0C, 0xDC, 0xA0, 0x88, 0x58, 0x3D, 0xDA, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC9, 0x40, 0x2B, 0x78, 0x8A, 0xC2, 0x0A, 0x4C, 0x8A, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A },
+ { 0xCA, 0x40, 0x47, 0xCA, 0xB4, 0xC2, 0x00, 0x57, 0x8A, 0xB8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1A } },
+ { { 0x2A, 0x0E, 0x17, 0x89, 0x50, 0x22, 0x0C, 0x1B, 0x09, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x2A, 0x1A, 0x19, 0x8A, 0x00, 0x22, 0x38, 0x0B, 0x0A, 0x00, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x9B, 0x08, 0x08, 0x4A, 0xE2, 0x06, 0x0A, 0x08, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x9B, 0x08, 0x08, 0x4A, 0xE2, 0x2F, 0x0A, 0x08, 0x68, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC5, 0x0A, 0x05, 0xDC, 0xB8, 0x84, 0x06, 0x00, 0xEC, 0xC0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x09, 0x10, 0x04, 0x5B, 0xA5, 0x02, 0x08, 0x00, 0xEC, 0x70, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x86, 0x40, 0x5D, 0x5A, 0x81, 0x81, 0x00, 0x0B, 0x5A, 0xFB, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x86, 0x40, 0x5D, 0x5A, 0x81, 0x81, 0x00, 0x0B, 0x5A, 0xFB, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xED, 0x0F, 0x5B, 0xC8, 0xC8, 0xE2, 0x9F, 0x4A, 0xE9, 0xF9, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x40, 0x0A, 0xA7, 0x64, 0xE2, 0x8B, 0x6A, 0x79, 0xB1, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x4F, 0x3A, 0xD7, 0xF8, 0xE2, 0x97, 0x49, 0xF9, 0xF9, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC9, 0x02, 0x16, 0x9A, 0xAB, 0xC4, 0x15, 0x46, 0xBA, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x08, 0x2F, 0xF7, 0xE1, 0xF3, 0x42, 0x8F, 0xC7, 0xC2, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x2D, 0xF7, 0xC1, 0xE4, 0x40, 0x7F, 0xC7, 0xD2, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x01, 0x8C, 0x9F, 0xDA, 0xE8, 0xE4, 0x50, 0x9F, 0xDA, 0xF2, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x80, 0x9F, 0xDA, 0x00, 0xE3, 0x50, 0x9F, 0xD9, 0xFA, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x08, 0xD5, 0x9D, 0xA5, 0x89, 0xE2, 0x3F, 0x9F, 0xD6, 0x91, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x08, 0xD5, 0x9D, 0xA5, 0x89, 0xE2, 0x3F, 0x9F, 0xD6, 0x91, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE5, 0x0F, 0x7D, 0xB8, 0x5A, 0xA2, 0x0C, 0x7C, 0xC7, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x06, 0x4C, 0xAC, 0x56, 0x31, 0x02, 0x08, 0x8D, 0x46, 0xDC, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0xC2, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x00, 0x9F, 0xDB, 0xA9, 0xE1, 0x00, 0x8F, 0xD7, 0xBA, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x88, 0x9C, 0x50, 0xC8, 0xE2, 0x18, 0x70, 0xC4, 0xF8, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9C, 0x50, 0xB0, 0xE4, 0x00, 0x70, 0xC4, 0xA0, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 } },
+ { { 0x42, 0x53, 0x3E, 0xEB, 0x48, 0xD4, 0x05, 0x1D, 0xA9, 0xC9, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 },
+ { 0x42, 0x54, 0x6F, 0xEB, 0x61, 0xD4, 0x02, 0x2E, 0xA9, 0xC8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x18 } },
+ { { 0xC2, 0x00, 0x59, 0x17, 0xB1, 0xC2, 0x1E, 0x6D, 0x98, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 },
+ { 0xC2, 0x00, 0x08, 0xB3, 0x99, 0xC2, 0x06, 0x2B, 0x58, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x19 } },
+ { { 0xC6, 0x01, 0x2D, 0xA7, 0x88, 0xC2, 0x08, 0x0E, 0xA7, 0xC1, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x2D, 0xA7, 0x91, 0xC2, 0x02, 0x0E, 0xA7, 0xD1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x0C, 0x06, 0x06, 0xA9, 0xC2, 0x3F, 0x08, 0xB8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A },
+ { 0xC1, 0x00, 0x68, 0x50, 0xB8, 0xC2, 0x00, 0x48, 0x84, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0A } },
+ { { 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0xB1, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x2F, 0x6F, 0x79, 0x00, 0xC8, 0x0F, 0x5E, 0x98, 0xB9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0xFB, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0xFB, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B },
+ { 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0B } },
+ { { 0xC2, 0x41, 0x3D, 0x96, 0x88, 0xC4, 0xCA, 0x0E, 0xC7, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 },
+ { 0xC2, 0x04, 0x58, 0xC9, 0x90, 0xC2, 0x94, 0x2C, 0xB9, 0xF0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x20 } },
+ { { 0x31, 0x13, 0x2D, 0xD7, 0x78, 0xE2, 0x18, 0x2E, 0xB8, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x31, 0x13, 0x2D, 0xD7, 0x78, 0xE2, 0x18, 0x2E, 0xB8, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x22, 0x86, 0x0D, 0xD7, 0xA0, 0xE4, 0x18, 0x5E, 0xB8, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0x22, 0x86, 0x0D, 0xD7, 0xA0, 0xE4, 0x18, 0x5E, 0xB8, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 } },
+ { { 0xF2, 0x0A, 0x0D, 0xD7, 0x80, 0xE4, 0x1F, 0x5E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x06, 0x9A, 0xD7, 0xA0, 0xC2, 0x1F, 0x59, 0xB8, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x09, 0x4B, 0xD6, 0x90, 0xE4, 0x1F, 0x1C, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 },
+ { 0xF2, 0x09, 0x4B, 0xD6, 0x90, 0xE4, 0x1F, 0x1C, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x28 } },
+ { { 0x62, 0x11, 0x0C, 0xE6, 0x78, 0xE4, 0x1F, 0x0C, 0xC8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x11, 0x0C, 0xE6, 0x78, 0xE4, 0x1F, 0x0C, 0xC8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x12, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x7D, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x12, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x7D, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x13, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x5D, 0xB8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x13, 0x3D, 0xE6, 0x68, 0xE4, 0x1F, 0x5D, 0xB8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xA2, 0x40, 0x5D, 0xBA, 0x7B, 0xE2, 0x00, 0x8F, 0xD8, 0xF1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xA2, 0x40, 0x5D, 0xBA, 0x7B, 0xE2, 0x00, 0x8F, 0xD8, 0xF1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x40, 0x3D, 0xDA, 0x73, 0xE1, 0x00, 0x7E, 0xD8, 0xF2, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x3D, 0xDA, 0x73, 0xE1, 0x00, 0x7E, 0xD8, 0xF2, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x00, 0x6D, 0xFA, 0xB9, 0xE2, 0x00, 0x8F, 0xC8, 0xF1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x6D, 0xFA, 0xB9, 0xE2, 0x00, 0x8F, 0xC8, 0xF1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x4E, 0xDB, 0x92, 0xE3, 0x18, 0x6F, 0xE9, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x6F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x7F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x4E, 0xDB, 0xCA, 0xE2, 0x00, 0x7F, 0xE9, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x02, 0x0F, 0x66, 0xAA, 0xA1, 0x02, 0x64, 0x29, 0xF9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x02, 0x00, 0x65, 0xAA, 0xF1, 0x02, 0x4A, 0x28, 0xF9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x16, 0x4A, 0x04, 0xBA, 0x71, 0xC2, 0x48, 0x2E, 0xCA, 0xF0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x14, 0xC0, 0x66, 0x08, 0x90, 0xC2, 0x48, 0x2C, 0x0A, 0xA0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x02, 0x0A, 0x01, 0x7A, 0xB1, 0x02, 0x12, 0x2A, 0xEA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x06, 0x75, 0x05, 0xB1, 0x01, 0x3F, 0x28, 0xEA, 0xF9, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x16 } },
+ { { 0x62, 0x53, 0x9C, 0xBA, 0x61, 0x62, 0x5A, 0xAD, 0xCA, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x9F, 0x8A, 0x98, 0xE2, 0x11, 0x7F, 0xB8, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x40, 0x6E, 0xDA, 0x91, 0xE2, 0x13, 0x8F, 0xF9, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0x6E, 0xDA, 0x91, 0xE2, 0x13, 0x8F, 0xF9, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x40, 0x8F, 0xFA, 0xA0, 0xF2, 0x04, 0x7F, 0xFA, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x40, 0x8F, 0xFA, 0xA0, 0xF2, 0x04, 0x7F, 0xFA, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x79, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x80, 0x9C, 0x99, 0x82, 0xE2, 0x04, 0x8D, 0x78, 0xC0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE0, 0x44, 0x8A, 0xA9, 0x5B, 0xE1, 0x06, 0x8D, 0x79, 0xBA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x06, 0x7C, 0x7A, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC3, 0x3F, 0x4B, 0xE9, 0xFA, 0xC1, 0x3F, 0x9B, 0xF9, 0xFB, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xC3, 0x3F, 0x4B, 0xE9, 0xFA, 0xC1, 0x3F, 0x9B, 0xF9, 0xFB, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB2, 0x25, 0xAD, 0xE9, 0x00, 0x62, 0x00, 0x8F, 0xC8, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x02, 0xAF, 0xFB, 0x90, 0xF6, 0x54, 0x8F, 0xE9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x9F, 0xFA, 0xB0, 0xF2, 0x58, 0x7F, 0xEA, 0xF8, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x00, 0xAF, 0x88, 0xA8, 0xF2, 0x46, 0x6E, 0xC9, 0xE0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x00, 0x7B, 0x88, 0xA8, 0xD2, 0x4C, 0x69, 0xE9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x8F, 0x4E, 0x78, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x02, 0x85, 0x89, 0xC8, 0xD2, 0x94, 0x77, 0x49, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x02, 0x9F, 0xB8, 0x90, 0x22, 0x8A, 0x9F, 0xE8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x86, 0xB8, 0x98, 0x02, 0x8F, 0x89, 0xE8, 0xF9, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0xF9, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0xF9, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0xF9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x1A, 0x90, 0xF8, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x10, 0x69, 0x18, 0xCF, 0xD4, 0x14, 0x5B, 0x04, 0xFD, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x00, 0x8E, 0xC9, 0x79, 0xE6, 0x00, 0x7E, 0xD8, 0xD0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x8E, 0xC9, 0x79, 0xE6, 0x00, 0x7E, 0xD8, 0xD0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x5F, 0xF9, 0x88, 0xE4, 0x9E, 0x8F, 0xF8, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x97, 0xF9, 0x90, 0xC9, 0x80, 0x69, 0x98, 0xA0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x0C, 0x6E, 0xD8, 0x79, 0x2A, 0x09, 0x7D, 0xD8, 0xC0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x02, 0x04, 0x8A, 0xD8, 0x80, 0x0C, 0x12, 0x85, 0xD8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x7E, 0x89, 0x70, 0xE6, 0x8F, 0x80, 0xF8, 0xF0, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x67, 0x59, 0x70, 0xC6, 0x8A, 0x77, 0xA8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0x6C, 0xD9, 0x60, 0xE2, 0x00, 0x8D, 0xC8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x80, 0x6C, 0xD9, 0x60, 0xE2, 0x00, 0x8D, 0xC8, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x80, 0x88, 0x48, 0x98, 0xE2, 0x1E, 0x8E, 0xC9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xF2, 0x40, 0xA8, 0xB9, 0x80, 0xE2, 0x0C, 0x89, 0x09, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x77, 0xC5, 0xA8, 0xE2, 0x00, 0x9E, 0xD7, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x77, 0xC5, 0xA8, 0xE2, 0x00, 0x9E, 0xD7, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0x86, 0xB9, 0xA8, 0xE2, 0x14, 0x9F, 0xD7, 0xB0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x80, 0x94, 0x09, 0x78, 0xC2, 0x00, 0x97, 0x97, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x68, 0x68, 0xAA, 0xE2, 0x0A, 0x9B, 0xB3, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC2, 0x00, 0x86, 0x68, 0xA0, 0xC2, 0x00, 0x77, 0x47, 0xE0, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0xA6, 0x87, 0x81, 0xE2, 0x0A, 0x7E, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x89, 0x40, 0x79, 0xE2, 0x00, 0x7E, 0xC9, 0x90, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x80, 0xAA, 0xB8, 0x90, 0xE2, 0x00, 0x9E, 0xF9, 0xC0, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x80, 0x9D, 0xB8, 0x51, 0xE2, 0x00, 0x9E, 0xF9, 0xA0, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x80, 0x8E, 0x64, 0xD0, 0xE2, 0x28, 0x6F, 0x73, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0x64, 0xD0, 0xE2, 0x28, 0x6F, 0x73, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x00, 0x7D, 0x99, 0xA8, 0xE6, 0x80, 0x80, 0xF8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x00, 0x7D, 0x99, 0xA8, 0xE6, 0x80, 0x80, 0xF8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x00, 0x9F, 0xB9, 0xD9, 0xE1, 0x00, 0x8F, 0xC8, 0xF9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x00, 0x9F, 0xB9, 0xD9, 0xE1, 0x00, 0x8F, 0xC8, 0xF9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x09, 0x68, 0x92, 0xE2, 0x2B, 0x9E, 0xF3, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x09, 0x68, 0x92, 0xE2, 0x2B, 0x9E, 0xF3, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC4, 0x00, 0x99, 0xE8, 0x73, 0xE2, 0x25, 0x6F, 0x93, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xC4, 0x00, 0x99, 0xE8, 0x73, 0xE2, 0x25, 0x6F, 0x93, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE6, 0x00, 0x6F, 0xDA, 0xC9, 0xE2, 0x05, 0x2F, 0xD8, 0xAA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x4F, 0xDA, 0xC8, 0xE2, 0x00, 0x0F, 0xD8, 0xD0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE3, 0x00, 0x0F, 0xF7, 0xF9, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x00, 0x0F, 0xF7, 0xF9, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x78, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE8, 0x40, 0x0D, 0x89, 0xF9, 0xE2, 0x17, 0x7E, 0xD9, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE8, 0x40, 0x0D, 0x89, 0xF9, 0xE2, 0x17, 0x7E, 0xD9, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0xDF, 0x8A, 0xAA, 0xE2, 0x5E, 0xCF, 0xBA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0xDF, 0x8A, 0xAA, 0xE2, 0x5E, 0xCF, 0xBA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE2, 0x00, 0x0B, 0x68, 0xC0, 0xE2, 0x01, 0x9E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0B, 0x68, 0xC0, 0xE2, 0x01, 0x9E, 0xB8, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEA, 0x00, 0xAE, 0xAB, 0x91, 0xE2, 0x00, 0xAE, 0xBA, 0xD8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0xAE, 0xAB, 0x91, 0xE2, 0x00, 0xAE, 0xBA, 0xD8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEB, 0x80, 0x8C, 0xCB, 0x72, 0xE2, 0x86, 0xAF, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEB, 0xC3, 0x9C, 0xCB, 0xA2, 0xE2, 0x4C, 0xAE, 0xCA, 0xFA, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE5, 0x40, 0xDB, 0x3B, 0x78, 0xE2, 0x80, 0xBE, 0xCA, 0xE1, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x80, 0x8E, 0xCB, 0xC0, 0xE2, 0x90, 0xAE, 0xCA, 0xFB, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE4, 0x00, 0x9E, 0xAA, 0x79, 0xE1, 0x43, 0x0F, 0xBA, 0xFA, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE4, 0x00, 0x9E, 0xAA, 0x79, 0xE1, 0x43, 0x0F, 0xBA, 0xFA, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE7, 0x40, 0xEB, 0xCA, 0x80, 0xE2, 0x03, 0xBF, 0xBA, 0xC2, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE3, 0x80, 0xDB, 0xCA, 0x40, 0xE2, 0x08, 0xDF, 0xBA, 0xC1, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEA, 0x00, 0x68, 0xB8, 0x90, 0xE2, 0x0A, 0x8E, 0xB8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEA, 0x00, 0x68, 0xB8, 0x90, 0xE2, 0x0A, 0x8E, 0xB8, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x61, 0x00, 0xBE, 0x99, 0xFA, 0xE3, 0x40, 0xCF, 0xCA, 0xF9, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0xCE, 0x9A, 0xA8, 0xE2, 0x45, 0xCF, 0xCA, 0xA0, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xCD, 0x00, 0x0B, 0x00, 0x90, 0xC2, 0x58, 0x0C, 0x00, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C },
+ { 0xCD, 0x00, 0x0B, 0x00, 0x90, 0xC2, 0x58, 0x0C, 0x00, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x1C } },
+ { { 0xE2, 0x00, 0x0E, 0x00, 0xA2, 0xE2, 0x58, 0x5F, 0xD0, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE2, 0x00, 0x0E, 0x00, 0xA2, 0xE2, 0x58, 0x5F, 0xD0, 0xF9, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xEC, 0x00, 0x7D, 0xDA, 0x80, 0xE2, 0x00, 0x5E, 0x9B, 0xA8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE6, 0x0A, 0x4C, 0xC9, 0x60, 0xE2, 0x07, 0x0C, 0x7A, 0xB8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE9, 0xC0, 0xEE, 0xD8, 0x83, 0xE2, 0x05, 0xDD, 0xAA, 0xE0, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xED, 0x48, 0xDE, 0xD8, 0xB4, 0xE1, 0x00, 0xDD, 0xAA, 0xA9, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xDA, 0x00, 0x8F, 0xAC, 0x92, 0x22, 0x05, 0x8D, 0x8A, 0xE9, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xEF, 0x00, 0x8C, 0xAA, 0x67, 0x25, 0x00, 0x9D, 0xAB, 0xC1, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x62, 0x82, 0xCB, 0x7A, 0xD8, 0xE6, 0x56, 0xAF, 0xDB, 0xE0, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x84, 0xBB, 0xAA, 0xCA, 0xCF, 0x41, 0xAC, 0xDA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xC2, 0x41, 0xAC, 0xBB, 0xBB, 0xC2, 0x85, 0x0E, 0xCB, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 },
+ { 0xC2, 0x03, 0x6A, 0x5B, 0xA4, 0xC2, 0x0D, 0x2A, 0xBB, 0xFC, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x12 } },
+ { { 0x75, 0x00, 0x0E, 0xBB, 0xB2, 0xE2, 0x1E, 0x0A, 0xA9, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0x62, 0x00, 0x04, 0x9A, 0xE8, 0xE2, 0x00, 0x0A, 0x48, 0xFD, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x41, 0x00, 0x0E, 0xEA, 0xA3, 0xC2, 0x00, 0x08, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x41, 0x00, 0x0E, 0xEA, 0xA3, 0xC2, 0x00, 0x08, 0xCA, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0xC1, 0x40, 0x0C, 0x59, 0xD2, 0xC2, 0x80, 0x3C, 0xAB, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0xC1, 0x40, 0x0C, 0x59, 0xD2, 0xC2, 0x80, 0x3C, 0xAB, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D } },
+ { { 0x4B, 0x00, 0x0A, 0xF5, 0xC1, 0xC2, 0x19, 0x0C, 0xE9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x4B, 0x00, 0x0A, 0xF5, 0xC1, 0xC2, 0x19, 0x0C, 0xE9, 0xF8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x62, 0x00, 0x7F, 0xD8, 0xA8, 0xEA, 0x00, 0x8F, 0xD8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x62, 0x00, 0x7F, 0xD8, 0xA8, 0xEA, 0x00, 0x8F, 0xD8, 0xF9, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xE1, 0x00, 0x7F, 0xD9, 0xAA, 0xE1, 0x00, 0x8F, 0xD8, 0xFA, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0xCF, 0x40, 0x09, 0xEA, 0xA8, 0xC4, 0x00, 0x0C, 0xDB, 0xC8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x09, 0xEA, 0xA8, 0xC4, 0x00, 0x0C, 0xDB, 0xC8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x40, 0x0C, 0xAA, 0xA8, 0xC4, 0x00, 0x18, 0xF9, 0xC8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x40, 0x0C, 0xAA, 0xA8, 0xC4, 0x00, 0x18, 0xF9, 0xC8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xC9, 0x0C, 0x88, 0xD9, 0x6A, 0xC2, 0x14, 0x3A, 0xEA, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0xC5, 0x00, 0x98, 0xD9, 0x92, 0xC1, 0x16, 0x6E, 0xF9, 0xE8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x03, 0x00, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xF8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x00, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xF8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x01, 0x0C, 0x44, 0xE6, 0xE8, 0x01, 0x3F, 0x0C, 0xEA, 0xF8, 0x0C, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x02, 0x3F, 0x05, 0x08, 0xF8, 0x03, 0x3F, 0x3C, 0xF9, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0x00, 0x00, 0x36, 0x67, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x00, 0x36, 0x67, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x02, 0x00, 0x36, 0x68, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x02, 0x00, 0x36, 0x68, 0xF8, 0x01, 0x3F, 0x0E, 0xFA, 0xF8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0xCB, 0x00, 0xAF, 0x00, 0xFA, 0xC0, 0x00, 0xC0, 0x06, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F },
+ { 0xCB, 0x00, 0xAF, 0x00, 0xFA, 0xC0, 0x00, 0xC0, 0x06, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0F } },
+ { { 0x05, 0x0D, 0x80, 0xA6, 0xFB, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x05, 0x0D, 0x80, 0xA6, 0xFB, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x0F, 0x00, 0x90, 0xFA, 0xD0, 0x06, 0x00, 0xA7, 0x39, 0xA8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x0F, 0x00, 0x90, 0xFA, 0xD0, 0x06, 0x00, 0xA7, 0x39, 0xA8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xC9, 0x15, 0xDD, 0xFF, 0xF8, 0x00, 0x00, 0xE7, 0xFC, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 },
+ { 0xC9, 0x15, 0xDD, 0xFF, 0xF8, 0x00, 0x00, 0xE7, 0xFC, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x38 } },
+ { { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x07, 0x80, 0x0B, 0xC8, 0xC9, 0x02, 0x3F, 0x0C, 0xEA, 0xF8, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x07, 0x80, 0x0B, 0xC8, 0xC9, 0x02, 0x3F, 0x0C, 0xEA, 0xF8, 0x0F, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x08, 0x00, 0x0B, 0x3C, 0xF8, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x08, 0x00, 0x0B, 0x3C, 0xF8, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } }
+};
+
+static const AdLibInstrument g_gmPercussionInstrumentsOPL3[39][2] = {
+ { { 0x1A, 0x3F, 0x15, 0x05, 0xF8, 0x02, 0x21, 0x2B, 0xE4, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0x11, 0x18, 0x15, 0x00, 0xF8, 0x12, 0x00, 0x2B, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0x11, 0x12, 0x04, 0x07, 0xF8, 0x02, 0x18, 0x0B, 0xE5, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x11, 0x28, 0x06, 0x04, 0xF8, 0x02, 0x1E, 0x1B, 0x02, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x0A, 0x3F, 0x0B, 0x01, 0xF8, 0x1F, 0x13, 0x46, 0xD0, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 },
+ { 0x04, 0x18, 0x06, 0x01, 0xB0, 0x10, 0x00, 0x07, 0x00, 0x90, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x01 } },
+ { { 0x00, 0x3F, 0x0F, 0x00, 0xF8, 0x10, 0x0A, 0x07, 0x00, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x02, 0x14, 0x04, 0x00, 0xC0, 0x11, 0x08, 0x07, 0x00, 0xC6, 0x02, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x0F, 0x3F, 0x0B, 0x00, 0xF8, 0x1F, 0x07, 0x19, 0xD0, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0E, 0x32, 0x76, 0x03, 0xF8, 0x1F, 0x0F, 0x77, 0xD4, 0xFC, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x00, 0x3F, 0x1F, 0x00, 0xFA, 0x1F, 0x0C, 0x07, 0x00, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x07, 0x11, 0x13, 0x00, 0xA0, 0x13, 0x00, 0x07, 0x00, 0xC8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x12, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x16, 0x4A, 0xD9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x02, 0x22, 0x05, 0xB6, 0xF8, 0x04, 0x0A, 0x59, 0x03, 0xF8, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xFF, 0xFA, 0x00, 0xC0, 0x2D, 0xF7, 0xE3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xD2, 0x7F, 0x04, 0x0F, 0xFA, 0x10, 0xCD, 0x24, 0x07, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x12, 0x3F, 0x05, 0x06, 0xF8, 0x43, 0x17, 0x0C, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x13, 0x09, 0x96, 0xF8, 0x44, 0x0A, 0x07, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xCF, 0xFA, 0x00, 0x40, 0x2A, 0xF8, 0x8B, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0xCF, 0x7F, 0x05, 0x07, 0xFA, 0x00, 0x40, 0x25, 0x08, 0xC3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C } },
+ { { 0x12, 0x3F, 0x06, 0x17, 0xF8, 0x03, 0x1D, 0x0B, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x1A, 0x08, 0x96, 0xF8, 0x44, 0x00, 0x08, 0x03, 0xF8, 0x05, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x7F, 0x08, 0xCD, 0xFA, 0x00, 0x40, 0x1A, 0x69, 0xB3, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C },
+ { 0xCD, 0x3F, 0x36, 0x05, 0xFC, 0x0F, 0x47, 0x46, 0x06, 0xDF, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0C } },
+ { { 0x13, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x0D, 0x0A, 0xD9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x14, 0x09, 0x96, 0xF8, 0x44, 0x02, 0x07, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x15, 0x3F, 0x05, 0x06, 0xF8, 0x03, 0x16, 0x0C, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x00, 0x07, 0x96, 0xE8, 0x44, 0x02, 0x08, 0x03, 0xF8, 0x07, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x2B, 0xFB, 0xFA, 0xC0, 0x16, 0x1A, 0xCA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0xCF, 0x3F, 0x2B, 0xFB, 0xFA, 0xC0, 0x1E, 0x1A, 0xCA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x17, 0x3F, 0x04, 0x09, 0xF8, 0x03, 0x18, 0x0D, 0xE9, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x12, 0x00, 0x07, 0x96, 0xF8, 0x44, 0x02, 0x08, 0xF9, 0xF8, 0x01, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x0F, 0x5E, 0xF8, 0xC6, 0x0C, 0x00, 0xCA, 0xFB, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0xCF, 0x3F, 0x04, 0x57, 0xF8, 0xC5, 0x13, 0x06, 0x05, 0xFF, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0xCF, 0x3F, 0x7E, 0x9D, 0xF8, 0xC8, 0xC0, 0x0A, 0xBA, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 },
+ { 0xCF, 0x3F, 0x77, 0x09, 0xF8, 0xC2, 0xC0, 0x08, 0xB5, 0xEA, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x06 } },
+ { { 0xCF, 0x3F, 0x4D, 0x9F, 0xF8, 0xC6, 0x00, 0x08, 0xDA, 0xAB, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0xCF, 0x3F, 0x47, 0x06, 0xF8, 0xCD, 0x00, 0x07, 0x05, 0xB3, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0xCF, 0x3F, 0x5D, 0xAA, 0xF2, 0xC0, 0x8A, 0x67, 0x99, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x9A, 0x69, 0xF8, 0xCF, 0x88, 0x88, 0x48, 0xFA, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x3F, 0x4A, 0xFD, 0xF8, 0xCF, 0x00, 0x59, 0xEA, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x3F, 0x48, 0x06, 0xF8, 0xCF, 0x00, 0x54, 0x04, 0xF9, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x0F, 0x18, 0x0A, 0xFA, 0xAB, 0x06, 0x06, 0x06, 0x39, 0xF8, 0x0A, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x18, 0x04, 0x09, 0xAC, 0x05, 0x07, 0x08, 0x07, 0xF8, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x3F, 0x2B, 0xFC, 0xF8, 0xCC, 0xC4, 0x0B, 0xEA, 0xFB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 },
+ { 0xCF, 0x3F, 0x25, 0x06, 0xF8, 0xCC, 0xD7, 0x05, 0x02, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x10 } },
+ { { 0x05, 0x1A, 0x04, 0x00, 0xF8, 0x12, 0x08, 0x0C, 0xEA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x01, 0x00, 0x09, 0x08, 0x40, 0x13, 0x00, 0x2A, 0x0A, 0xD8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x04, 0x19, 0x04, 0x00, 0xF8, 0x12, 0x08, 0x2C, 0xEA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 },
+ { 0x04, 0x00, 0x07, 0x08, 0x40, 0x12, 0x00, 0x29, 0x08, 0xE0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x04 } },
+ { { 0x04, 0x0A, 0x04, 0x00, 0xD8, 0x01, 0x02, 0x0D, 0xFA, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 },
+ { 0x04, 0x00, 0x03, 0x09, 0x93, 0x02, 0x00, 0x28, 0x09, 0xE8, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x07 } },
+ { { 0x15, 0x14, 0x05, 0x00, 0xF9, 0x01, 0x03, 0x5C, 0xE9, 0xD8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x05, 0x00, 0x03, 0x03, 0x49, 0x02, 0x00, 0x58, 0x08, 0xE0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x10, 0x10, 0x05, 0x08, 0xF8, 0x01, 0x03, 0x0D, 0xEA, 0xE8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 },
+ { 0x10, 0x00, 0x0C, 0x0C, 0x48, 0x02, 0x00, 0x08, 0xB9, 0xE0, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x05 } },
+ { { 0x11, 0x00, 0x06, 0x87, 0xFB, 0x02, 0x40, 0x09, 0x59, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x15, 0x00, 0x04, 0x87, 0xFB, 0x02, 0x40, 0x09, 0x59, 0xD0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 } },
+ { { 0x13, 0x26, 0x04, 0x6A, 0xFB, 0x01, 0x00, 0x08, 0x5A, 0xE0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 },
+ { 0x12, 0x26, 0x03, 0x6A, 0xFB, 0x02, 0x00, 0x06, 0x5A, 0xC0, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x08 } },
+ { { 0xCF, 0x4D, 0x0C, 0xAA, 0xA0, 0xC4, 0x00, 0x18, 0xF9, 0x90, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x05, 0xA6, 0xA0, 0xC6, 0x00, 0x16, 0xF8, 0x60, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCF, 0x4D, 0x0C, 0xAA, 0xA0, 0xC3, 0x00, 0x18, 0xF8, 0x98, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0xCF, 0x4E, 0x06, 0xAA, 0xA0, 0xC5, 0x00, 0x19, 0xF9, 0x90, 0x04, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xCB, 0x3F, 0x8F, 0x00, 0xFA, 0xC5, 0x06, 0x98, 0xD6, 0xBB, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D },
+ { 0xC0, 0x00, 0xF0, 0x00, 0x00, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x0D } },
+ { { 0x0C, 0x18, 0x87, 0xB3, 0xFB, 0x19, 0x0B, 0x55, 0x75, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x0C, 0x18, 0x87, 0xB3, 0xFB, 0x1B, 0x10, 0x57, 0x75, 0xF8, 0x0E, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x05, 0x11, 0x15, 0x00, 0xC8, 0x02, 0x00, 0x08, 0x00, 0xA8, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x02, 0x11, 0x13, 0x00, 0xC8, 0x02, 0x00, 0x05, 0x00, 0x80, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0x04, 0x08, 0x15, 0x00, 0x90, 0x01, 0x00, 0x08, 0x00, 0xC0, 0x08, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 },
+ { 0x03, 0x08, 0x14, 0x00, 0x90, 0x02, 0x00, 0x07, 0x00, 0xA8, 0x00, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x02 } },
+ { { 0xDA, 0x00, 0x53, 0x30, 0xC0, 0x07, 0x10, 0x49, 0xC4, 0xDA, 0x03, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0xD2, 0x00, 0x56, 0x30, 0x90, 0x06, 0x00, 0x46, 0x56, 0x62, 0x09, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } },
+ { { 0x1C, 0x00, 0x07, 0xBC, 0xC8, 0x0C, 0x0A, 0x0B, 0x6A, 0xF2, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 },
+ { 0x18, 0x00, 0x07, 0xBC, 0x88, 0x09, 0x00, 0x0B, 0x6A, 0xBA, 0x0B, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x03 } },
+ { { 0x0A, 0x0E, 0x7F, 0x00, 0xF9, 0x13, 0x16, 0x28, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 },
+ { 0x01, 0x0E, 0x54, 0x00, 0xF9, 0x15, 0x03, 0x27, 0x03, 0xF8, 0x06, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, { 0, 0, 0, 0, 0, 0, 0, 0 }, 0x00 } }
+};
+#endif
+
+static const byte g_gmPercussionInstrumentMap[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
@@ -495,9 +858,9 @@ static const byte gm_percussion_lookup[128] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
-static byte lookup_table[64][32];
+static byte g_volumeLookupTable[64][32];
-static const byte volume_table[] = {
+static const byte g_volumeTable[] = {
0, 4, 7, 11,
13, 16, 18, 20,
22, 24, 26, 27,
@@ -516,7 +879,7 @@ static const byte volume_table[] = {
62, 63, 63, 63
};
-static int lookup_volume(int a, int b) {
+static int lookupVolume(int a, int b) {
if (b == 0)
return 0;
@@ -529,32 +892,32 @@ static int lookup_volume(int a, int b) {
if (b < 0) {
if (a < 0) {
- return lookup_table[-a][-b];
+ return g_volumeLookupTable[-a][-b];
} else {
- return -lookup_table[a][-b];
+ return -g_volumeLookupTable[a][-b];
}
} else {
if (a < 0) {
- return -lookup_table[-a][b];
+ return -g_volumeLookupTable[-a][b];
} else {
- return lookup_table[a][b];
+ return g_volumeLookupTable[a][b];
}
}
}
-static void create_lookup_table() {
+static void createLookupTable() {
int i, j;
int sum;
for (i = 0; i < 64; i++) {
sum = i;
for (j = 0; j < 32; j++) {
- lookup_table[i][j] = sum >> 5;
+ g_volumeLookupTable[i][j] = sum >> 5;
sum += i;
}
}
for (i = 0; i < 64; i++)
- lookup_table[i][0] = 0;
+ g_volumeLookupTable[i][0] = 0;
}
////////////////////////////////////////
@@ -584,58 +947,75 @@ public:
// AudioStream API
- bool isStereo() const { return false; }
+ bool isStereo() const { return _opl->isStereo(); }
int getRate() const { return _mixer->getOutputRate(); }
private:
- bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games
+ bool _scummSmallHeader; // FIXME: This flag controls a special mode for SCUMM V3 games
+#ifdef ENABLE_OPL3
+ bool _opl3Mode;
+#endif
- FM_OPL *_opl;
- byte *_adlib_reg_cache;
+ OPL::OPL *_opl;
+ byte *_regCache;
+#ifdef ENABLE_OPL3
+ byte *_regCacheSecondary;
+#endif
- int _adlib_timer_counter;
+ int _timerCounter;
- uint16 channel_table_2[9];
- int _voice_index;
- int _timer_p;
- int _timer_q;
- uint16 curnote_table[9];
+ uint16 _channelTable2[9];
+ int _voiceIndex;
+ int _timerIncrease;
+ int _timerThreshold;
+ uint16 _curNotTable[9];
AdLibVoice _voices[9];
AdLibPart _parts[32];
AdLibPercussionChannel _percussion;
void generateSamples(int16 *buf, int len);
void onTimer();
- void part_key_on(AdLibPart *part, AdLibInstrument *instr, byte note, byte velocity);
- void part_key_off(AdLibPart *part, byte note);
-
- void adlib_key_off(int chan);
- void adlib_note_on(int chan, byte note, int mod);
- void adlib_note_on_ex(int chan, byte note, int mod);
- int adlib_get_reg_value_param(int chan, byte data);
- void adlib_setup_channel(int chan, AdLibInstrument *instr, byte vol_1, byte vol_2);
- byte adlib_get_reg_value(byte reg) {
- return _adlib_reg_cache[reg];
- }
- void adlib_set_param(int channel, byte param, int value);
- void adlib_key_onoff(int channel);
- void adlib_write(byte reg, byte value);
- void adlib_playnote(int channel, int note);
-
- AdLibVoice *allocate_voice(byte pri);
-
- void mc_off(AdLibVoice *voice);
-
- static void link_mc(AdLibPart *part, AdLibVoice *voice);
- void mc_inc_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11);
- void mc_init_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11, byte flags,
- InstrumentExtra *ie);
-
- void struct10_init(Struct10 *s10, InstrumentExtra *ie);
- static byte struct10_ontimer(Struct10 *s10, Struct11 *s11);
- static void struct10_setup(Struct10 *s10);
- static int random_nr(int a);
- void mc_key_on(AdLibVoice *voice, AdLibInstrument *instr, byte note, byte velocity);
+ void partKeyOn(AdLibPart *part, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan);
+ void partKeyOff(AdLibPart *part, byte note);
+
+ void adlibKeyOff(int chan);
+ void adlibNoteOn(int chan, byte note, int mod);
+ void adlibNoteOnEx(int chan, byte note, int mod);
+ int adlibGetRegValueParam(int chan, byte data);
+ void adlibSetupChannel(int chan, const AdLibInstrument *instr, byte vol1, byte vol2);
+#ifdef ENABLE_OPL3
+ void adlibSetupChannelSecondary(int chan, const AdLibInstrument *instr, byte vol1, byte vol2, byte pan);
+#endif
+ byte adlibGetRegValue(byte reg) {
+ return _regCache[reg];
+ }
+#ifdef ENABLE_OPL3
+ byte adlibGetRegValueSecondary(byte reg) {
+ return _regCacheSecondary[reg];
+ }
+#endif
+ void adlibSetParam(int channel, byte param, int value, bool primary = true);
+ void adlibKeyOnOff(int channel);
+ void adlibWrite(byte reg, byte value);
+#ifdef ENABLE_OPL3
+ void adlibWriteSecondary(byte reg, byte value);
+#endif
+ void adlibPlayNote(int channel, int note);
+
+ AdLibVoice *allocateVoice(byte pri);
+
+ void mcOff(AdLibVoice *voice);
+
+ static void linkMc(AdLibPart *part, AdLibVoice *voice);
+ void mcIncStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11);
+ void mcInitStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11, byte flags,
+ const InstrumentExtra *ie);
+
+ void struct10Init(Struct10 *s10, const InstrumentExtra *ie);
+ static byte struct10OnTimer(Struct10 *s10, Struct11 *s11);
+ static void struct10Setup(Struct10 *s10);
+ static int randomNr(int a);
+ void mcKeyOn(AdLibVoice *voice, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan);
};
// MidiChannel method implementations
@@ -643,7 +1023,7 @@ private:
void AdLibPart::init(MidiDriver_ADLIB *owner, byte channel) {
_owner = owner;
_channel = channel;
- _pri_eff = 127;
+ _priEff = 127;
programChange(0);
}
@@ -657,41 +1037,64 @@ void AdLibPart::send(uint32 b) {
void AdLibPart::noteOff(byte note) {
#ifdef DEBUG_ADLIB
- debug(6, "%10d: noteOff(%d)", tick, note);
+ debug(6, "%10d: noteOff(%d)", g_tick, note);
#endif
- _owner->part_key_off(this, note);
+ _owner->partKeyOff(this, note);
}
void AdLibPart::noteOn(byte note, byte velocity) {
#ifdef DEBUG_ADLIB
- debug(6, "%10d: noteOn(%d,%d)", tick, note, velocity);
+ debug(6, "%10d: noteOn(%d,%d)", g_tick, note, velocity);
+#endif
+ _owner->partKeyOn(this, &_partInstr, note, velocity,
+#ifdef ENABLE_OPL3
+ &_partInstrSecondary,
+#else
+ NULL,
#endif
- _owner->part_key_on(this, &_part_instr, note, velocity);
+ _pan);
}
void AdLibPart::programChange(byte program) {
if (program > 127)
return;
-/*
+ /*
uint i;
uint count = 0;
- for (i = 0; i < ARRAYSIZE(map_gm_to_fm[0]); ++i)
- count += map_gm_to_fm[program][i];
+ for (i = 0; i < ARRAYSIZE(g_gmInstruments[0]); ++i)
+ count += g_gmInstruments[program][i];
if (!count)
warning("No AdLib instrument defined for GM program %d", (int)program);
-*/
+ */
_program = program;
- memcpy(&_part_instr, &map_gm_to_fm[program], sizeof(AdLibInstrument));
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ memcpy(&_partInstr, &g_gmInstruments[program], sizeof(AdLibInstrument));
+#ifdef ENABLE_OPL3
+ } else {
+ memcpy(&_partInstr, &g_gmInstrumentsOPL3[program][0], sizeof(AdLibInstrument));
+ memcpy(&_partInstrSecondary, &g_gmInstrumentsOPL3[program][1], sizeof(AdLibInstrument));
+ }
+#endif
}
void AdLibPart::pitchBend(int16 bend) {
AdLibVoice *voice;
- _pitchbend = bend;
+ _pitchBend = bend;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
+#ifdef ENABLE_OPL3
+ } else {
+ _owner->adlibNoteOn(voice->_channel, voice->_note, _pitchBend >> 1);
+ }
+#endif
}
}
@@ -699,75 +1102,137 @@ void AdLibPart::controlChange(byte control, byte value) {
switch (control) {
case 0:
case 32:
- break; // Bank select. Not supported
- case 1: modulationWheel(value); break;
- case 7: volume(value); break;
- case 10: break; // Pan position. Not supported.
- case 16: pitchBendFactor(value); break;
- case 17: detune(value); break;
- case 18: priority(value); break;
- case 64: sustain(value > 0); break;
- case 91: break; // Effects level. Not supported.
- case 93: break; // Chorus level. Not supported.
- case 119: break; // Unknown, used in Simon the Sorcerer 2
- case 121: // reset all controllers
+ // Bank select. Not supported
+ break;
+ case 1:
+ modulationWheel(value);
+ break;
+ case 7:
+ volume(value);
+ break;
+ case 10:
+ panPosition(value);
+ break;
+ case 16:
+ pitchBendFactor(value);
+ break;
+ case 17:
+ detune(value);
+ break;
+ case 18:
+ priority(value);
+ break;
+ case 64:
+ sustain(value > 0);
+ break;
+ case 91:
+ // Effects level. Not supported.
+ break;
+ case 93:
+ // Chorus level. Not supported.
+ break;
+ case 119:
+ // Unknown, used in Simon the Sorcerer 2
+ break;
+ case 121:
+ // reset all controllers
modulationWheel(0);
pitchBendFactor(0);
detune(0);
sustain(0);
break;
- case 123: allNotesOff(); break;
+ case 123:
+ allNotesOff();
+ break;
default:
- warning("AdLib: Unknown control change message %d (%d)", (int) control, (int)value);
+ warning("AdLib: Unknown control change message %d (%d)", (int)control, (int)value);
}
}
void AdLibPart::modulationWheel(byte value) {
AdLibVoice *voice;
- _modwheel = value;
+ _modWheel = value;
for (voice = _voice; voice; voice = voice->_next) {
if (voice->_s10a.active && voice->_s11a.flag0x40)
- voice->_s10a.modwheel = _modwheel >> 2;
+ voice->_s10a.modWheel = _modWheel >> 2;
if (voice->_s10b.active && voice->_s11b.flag0x40)
- voice->_s10b.modwheel = _modwheel >> 2;
+ voice->_s10b.modWheel = _modWheel >> 2;
}
}
void AdLibPart::volume(byte value) {
AdLibVoice *voice;
- _vol_eff = value;
+ _volEff = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_set_param(voice->_channel, 0, volume_table[lookup_table[voice->_vol_2][_vol_eff >> 2]]);
- if (voice->_twochan) {
- _owner->adlib_set_param(voice->_channel, 13, volume_table[lookup_table[voice->_vol_1][_vol_eff >> 2]]);
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[g_volumeLookupTable[voice->_vol2][_volEff >> 2]]);
+ if (voice->_twoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[g_volumeLookupTable[voice->_vol1][_volEff >> 2]]);
+ }
+#ifdef ENABLE_OPL3
+ } else {
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[((voice->_vol2 + 1) * _volEff) >> 7], true);
+ _owner->adlibSetParam(voice->_channel, 0, g_volumeTable[((voice->_secVol2 + 1) * _volEff) >> 7], false);
+ if (voice->_twoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[((voice->_vol1 + 1) * _volEff) >> 7], true);
+ }
+ if (voice->_secTwoChan) {
+ _owner->adlibSetParam(voice->_channel, 13, g_volumeTable[((voice->_secVol1 + 1) * _volEff) >> 7], false);
+ }
}
+#endif
}
}
+void AdLibPart::panPosition(byte value) {
+ _pan = value;
+}
+
void AdLibPart::pitchBendFactor(byte value) {
+#ifdef ENABLE_OPL3
+ // Not supported in OPL3 mode.
+ if (_owner->_opl3Mode) {
+ return;
+ }
+#endif
+
AdLibVoice *voice;
- _pitchbend_factor = value;
+ _pitchBendFactor = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
}
}
void AdLibPart::detune(byte value) {
+ // Sam&Max's OPL3 driver uses this for a completly different purpose. It
+ // is related to voice allocation. We ignore this for now.
+ // TODO: We probably need to look how the interpreter side of Sam&Max's
+ // iMuse version handles all this too. Implementing the driver side here
+ // would be not that hard.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ //_maxNotes = value;
+ return;
+ }
+#endif
+
AdLibVoice *voice;
- _detune_eff = value;
+ _detuneEff = value;
for (voice = _voice; voice; voice = voice->_next) {
- _owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ _owner->adlibNoteOn(voice->_channel, voice->_note/* + _transposeEff*/,
+ (_pitchBend * _pitchBendFactor >> 6) + _detuneEff);
}
}
void AdLibPart::priority(byte value) {
- _pri_eff = value;
+ _priEff = value;
}
void AdLibPart::sustain(bool value) {
@@ -776,20 +1241,29 @@ void AdLibPart::sustain(bool value) {
_pedal = value;
if (!value) {
for (voice = _voice; voice; voice = voice->_next) {
- if (voice->_waitforpedal)
- _owner->mc_off(voice);
+ if (voice->_waitForPedal)
+ _owner->mcOff(voice);
}
}
}
void AdLibPart::allNotesOff() {
while (_voice)
- _owner->mc_off(_voice);
+ _owner->mcOff(_voice);
}
void AdLibPart::sysEx_customInstrument(uint32 type, const byte *instr) {
+ // Sam&Max allows for instrument overwrites, but we will not support it
+ // until we can find any track actually using it.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ warning("AdLibPart::sysEx_customInstrument: Used in OPL3 mode");
+ return;
+ }
+#endif
+
if (type == 'ADL ') {
- memcpy(&_part_instr, instr, sizeof(AdLibInstrument));
+ memcpy(&_partInstr, instr, sizeof(AdLibInstrument));
}
}
@@ -803,8 +1277,8 @@ AdLibPercussionChannel::~AdLibPercussionChannel() {
void AdLibPercussionChannel::init(MidiDriver_ADLIB *owner, byte channel) {
AdLibPart::init(owner, channel);
- _pri_eff = 0;
- _vol_eff = 127;
+ _priEff = 0;
+ _volEff = 127;
// Initialize the custom instruments data
memset(_notes, 0, sizeof(_notes));
@@ -812,33 +1286,49 @@ void AdLibPercussionChannel::init(MidiDriver_ADLIB *owner, byte channel) {
}
void AdLibPercussionChannel::noteOff(byte note) {
- // Jamieson630: Unless I run into a specific instrument that
- // may require a key off, I'm going to ignore this message.
- // The rationale is that a percussion instrument should
- // fade out of its own accord, and the AdLib instrument
- // definitions used should follow this rule. Since
- // percussion voices are allocated at the lowest priority
- // anyway, we know that "hanging" percussion sounds will
- // not prevent later musical instruments (or even other
- // percussion sounds) from playing.
-/*
- _owner->part_key_off(this, note);
-*/
+ if (_customInstruments[note]) {
+ note = _notes[note];
+ }
+
+ // This used to ignore note off events, since the builtin percussion
+ // instrument data has a duration value, which causes the percussion notes
+ // to stop automatically. This is not the case for (Groovie's) custom
+ // percussion instruments though. Also the OPL3 driver of Sam&Max actually
+ // does not handle the duration value, so we need it there too.
+ _owner->partKeyOff(this, note);
}
void AdLibPercussionChannel::noteOn(byte note, byte velocity) {
- AdLibInstrument *inst = NULL;
+ const AdLibInstrument *inst = NULL;
+ const AdLibInstrument *sec = NULL;
// The custom instruments have priority over the default mapping
- inst = _customInstruments[note];
- if (inst)
- note = _notes[note];
+ // We do not support custom instruments in OPL3 mode though.
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ inst = _customInstruments[note];
+ if (inst)
+ note = _notes[note];
+#ifdef ENABLE_OPL3
+ }
+#endif
if (!inst) {
- // Use the default GM to FM mapping as a fallback as a fallback
- byte key = gm_percussion_lookup[note];
- if (key != 0xFF)
- inst = &gm_percussion_to_fm[key];
+ // Use the default GM to FM mapping as a fallback
+ byte key = g_gmPercussionInstrumentMap[note];
+ if (key != 0xFF) {
+#ifdef ENABLE_OPL3
+ if (!_owner->_opl3Mode) {
+#endif
+ inst = &g_gmPercussionInstruments[key];
+#ifdef ENABLE_OPL3
+ } else {
+ inst = &g_gmPercussionInstrumentsOPL3[key][0];
+ sec = &g_gmPercussionInstrumentsOPL3[key][1];
+ }
+#endif
+ }
}
if (!inst) {
@@ -846,10 +1336,18 @@ void AdLibPercussionChannel::noteOn(byte note, byte velocity) {
return;
}
- _owner->part_key_on(this, inst, note, velocity);
+ _owner->partKeyOn(this, inst, note, velocity, sec, _pan);
}
void AdLibPercussionChannel::sysEx_customInstrument(uint32 type, const byte *instr) {
+ // We do not allow custom instruments in OPL3 mode right now.
+#ifdef ENABLE_OPL3
+ if (_owner->_opl3Mode) {
+ warning("AdLibPercussionChannel::sysEx_customInstrument: Used in OPL3 mode");
+ return;
+ }
+#endif
+
if (type == 'ADLP') {
byte note = instr[0];
_notes[note] = instr[1];
@@ -861,16 +1359,16 @@ void AdLibPercussionChannel::sysEx_customInstrument(uint32 type, const byte *ins
}
// Save the new instrument data
- _customInstruments[note]->mod_characteristic = instr[2];
- _customInstruments[note]->mod_scalingOutputLevel = instr[3];
- _customInstruments[note]->mod_attackDecay = instr[4];
- _customInstruments[note]->mod_sustainRelease = instr[5];
- _customInstruments[note]->mod_waveformSelect = instr[6];
- _customInstruments[note]->car_characteristic = instr[7];
- _customInstruments[note]->car_scalingOutputLevel = instr[8];
- _customInstruments[note]->car_attackDecay = instr[9];
- _customInstruments[note]->car_sustainRelease = instr[10];
- _customInstruments[note]->car_waveformSelect = instr[11];
+ _customInstruments[note]->modCharacteristic = instr[2];
+ _customInstruments[note]->modScalingOutputLevel = instr[3];
+ _customInstruments[note]->modAttackDecay = instr[4];
+ _customInstruments[note]->modSustainRelease = instr[5];
+ _customInstruments[note]->modWaveformSelect = instr[6];
+ _customInstruments[note]->carCharacteristic = instr[7];
+ _customInstruments[note]->carScalingOutputLevel = instr[8];
+ _customInstruments[note]->carAttackDecay = instr[9];
+ _customInstruments[note]->carSustainRelease = instr[10];
+ _customInstruments[note]->carWaveformSelect = instr[11];
_customInstruments[note]->feedback = instr[12];
}
}
@@ -882,21 +1380,28 @@ MidiDriver_ADLIB::MidiDriver_ADLIB(Audio::Mixer *mixer)
uint i;
_scummSmallHeader = false;
+#ifdef ENABLE_OPL3
+ _opl3Mode = false;
+#endif
- _adlib_reg_cache = 0;
+ _regCache = 0;
+#ifdef ENABLE_OPL3
+ _regCacheSecondary = 0;
+#endif
- _adlib_timer_counter = 0;
- _voice_index = 0;
- for (i = 0; i < ARRAYSIZE(curnote_table); ++i) {
- curnote_table[i] = 0;
+ _timerCounter = 0;
+ _voiceIndex = -1;
+ for (i = 0; i < ARRAYSIZE(_curNotTable); ++i) {
+ _curNotTable[i] = 0;
}
for (i = 0; i < ARRAYSIZE(_parts); ++i) {
_parts[i].init(this, i + ((i >= 9) ? 1 : 0));
}
_percussion.init(this, 9);
- _timer_p = 0xD69;
- _timer_q = 0x411B;
+ _timerIncrease = 0xD69;
+ _timerThreshold = 0x411B;
+ _opl = 0;
}
int MidiDriver_ADLIB::open() {
@@ -914,14 +1419,37 @@ int MidiDriver_ADLIB::open() {
voice->_s11b.s10 = &voice->_s10a;
}
- _adlib_reg_cache = (byte *)calloc(256, 1);
+ // Try to use OPL3 when requested.
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ _opl = OPL::Config::create(OPL::Config::kOpl3);
+ }
- _opl = makeAdLibOPL(getRate());
+ // Initialize plain OPL2 when no OPL3 is intiailized already.
+ if (!_opl) {
+#endif
+ _opl = OPL::Config::create();
+#ifdef ENABLE_OPL3
+ _opl3Mode = false;
+ }
+#endif
+ _opl->init(getRate());
- adlib_write(1, 0x20);
- adlib_write(8, 0x40);
- adlib_write(0xBD, 0x00);
- create_lookup_table();
+ _regCache = (byte *)calloc(256, 1);
+
+ adlibWrite(8, 0x40);
+ adlibWrite(0xBD, 0x00);
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ adlibWrite(1, 0x20);
+ createLookupTable();
+#ifdef ENABLE_OPL3
+ } else {
+ _regCacheSecondary = (byte *)calloc(256, 1);
+ adlibWriteSecondary(5, 1);
+ }
+#endif
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
@@ -938,14 +1466,17 @@ void MidiDriver_ADLIB::close() {
uint i;
for (i = 0; i < ARRAYSIZE(_voices); ++i) {
if (_voices[i]._part)
- mc_off(&_voices[i]);
+ mcOff(&_voices[i]);
}
// Turn off the OPL emulation
- OPLDestroy(_opl);
-// YM3812Shutdown();
+ delete _opl;
+ _opl = 0;
- free(_adlib_reg_cache);
+ free(_regCache);
+#ifdef ENABLE_OPL3
+ free(_regCacheSecondary);
+#endif
}
void MidiDriver_ADLIB::send(uint32 b) {
@@ -954,9 +1485,9 @@ void MidiDriver_ADLIB::send(uint32 b) {
void MidiDriver_ADLIB::send(byte chan, uint32 b) {
//byte param3 = (byte) ((b >> 24) & 0xFF);
- byte param2 = (byte) ((b >> 16) & 0xFF);
- byte param1 = (byte) ((b >> 8) & 0xFF);
- byte cmd = (byte) (b & 0xF0);
+ byte param2 = (byte)((b >> 16) & 0xFF);
+ byte param1 = (byte)((b >> 8) & 0xFF);
+ byte cmd = (byte)(b & 0xF0);
AdLibPart *part;
if (chan == 9)
@@ -997,29 +1528,42 @@ void MidiDriver_ADLIB::send(byte chan, uint32 b) {
uint32 MidiDriver_ADLIB::property(int prop, uint32 param) {
switch (prop) {
- case PROP_OLD_ADLIB: // Older games used a different operator volume algorithm
- _scummSmallHeader = (param > 0);
- if (_scummSmallHeader) {
- _timer_p = 473;
- _timer_q = 1000;
- } else {
- _timer_p = 0xD69;
- _timer_q = 0x411B;
- }
- return 1;
+ case PROP_OLD_ADLIB: // Older games used a different operator volume algorithm
+ _scummSmallHeader = (param > 0);
+ if (_scummSmallHeader) {
+ _timerIncrease = 473;
+ _timerThreshold = 1000;
+ } else {
+ _timerIncrease = 0xD69;
+ _timerThreshold = 0x411B;
+ }
+ return 1;
+
+ case PROP_SCUMM_OPL3: // Sam&Max OPL3 support.
+#ifdef ENABLE_OPL3
+ _opl3Mode = (param > 0);
+#endif
+ return 1;
}
return 0;
}
void MidiDriver_ADLIB::setPitchBendRange(byte channel, uint range) {
+#ifdef ENABLE_OPL3
+ // Not supported in OPL3 mode.
+ if (_opl3Mode) {
+ return;
+ }
+#endif
+
AdLibVoice *voice;
AdLibPart *part = &_parts[channel];
- part->_pitchbend_factor = range;
+ part->_pitchBendFactor = range;
for (voice = part->_voice; voice; voice = voice->_next) {
- adlib_note_on(voice->_channel, voice->_note + part->_transpose_eff,
- (part->_pitchbend * part->_pitchbend_factor >> 6) + part->_detune_eff);
+ adlibNoteOn(voice->_channel, voice->_note/* + part->_transposeEff*/,
+ (part->_pitchBend * part->_pitchBendFactor >> 6) + part->_detuneEff);
}
}
@@ -1043,54 +1587,77 @@ MidiChannel *MidiDriver_ADLIB::allocateChannel() {
// All the code brought over from IMuseAdLib
-void MidiDriver_ADLIB::adlib_write(byte reg, byte value) {
- if (_adlib_reg_cache[reg] == value)
+void MidiDriver_ADLIB::adlibWrite(byte reg, byte value) {
+ if (_regCache[reg] == value) {
return;
+ }
#ifdef DEBUG_ADLIB
- debug(6, "%10d: adlib_write[%x] = %x", tick, reg, value);
+ debug(6, "%10d: adlibWrite[%x] = %x", g_tick, reg, value);
#endif
- _adlib_reg_cache[reg] = value;
+ _regCache[reg] = value;
- OPLWriteReg(_opl, reg, value);
+ _opl->writeReg(reg, value);
}
+#ifdef ENABLE_OPL3
+void MidiDriver_ADLIB::adlibWriteSecondary(byte reg, byte value) {
+ assert(_opl3Mode);
+
+ if (_regCacheSecondary[reg] == value) {
+ return;
+ }
+#ifdef DEBUG_ADLIB
+ debug(6, "%10d: adlibWriteSecondary[%x] = %x", g_tick, reg, value);
+#endif
+ _regCacheSecondary[reg] = value;
+
+ _opl->writeReg(reg | 0x100, value);
+}
+#endif
+
void MidiDriver_ADLIB::generateSamples(int16 *data, int len) {
- memset(data, 0, sizeof(int16) * len);
- YM3812UpdateOne(_opl, data, len);
+ if (_opl->isStereo()) {
+ len *= 2;
+ }
+ _opl->readBuffer(data, len);
}
void MidiDriver_ADLIB::onTimer() {
- AdLibVoice *voice;
- int i;
-
- _adlib_timer_counter += _timer_p;
- while (_adlib_timer_counter >= _timer_q) {
- _adlib_timer_counter -= _timer_q;
+ _timerCounter += _timerIncrease;
+ while (_timerCounter >= _timerThreshold) {
+ _timerCounter -= _timerThreshold;
#ifdef DEBUG_ADLIB
- tick++;
+ g_tick++;
#endif
- voice = _voices;
- for (i = 0; i != ARRAYSIZE(_voices); i++, voice++) {
- if (!voice->_part)
- continue;
- if (voice->_duration && (voice->_duration -= 0x11) <= 0) {
- mc_off(voice);
- return;
- }
- if (voice->_s10a.active) {
- mc_inc_stuff(voice, &voice->_s10a, &voice->_s11a);
- }
- if (voice->_s10b.active) {
- mc_inc_stuff(voice, &voice->_s10b, &voice->_s11b);
+ // Sam&Max's OPL3 driver does not have any timer handling like this.
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ AdLibVoice *voice = _voices;
+ for (int i = 0; i != ARRAYSIZE(_voices); i++, voice++) {
+ if (!voice->_part)
+ continue;
+ if (voice->_duration && (voice->_duration -= 0x11) <= 0) {
+ mcOff(voice);
+ return;
+ }
+ if (voice->_s10a.active) {
+ mcIncStuff(voice, &voice->_s10a, &voice->_s11a);
+ }
+ if (voice->_s10b.active) {
+ mcIncStuff(voice, &voice->_s10b, &voice->_s11b);
+ }
}
+#ifdef ENABLE_OPL3
}
+#endif
}
}
-void MidiDriver_ADLIB::mc_off(AdLibVoice *voice) {
+void MidiDriver_ADLIB::mcOff(AdLibVoice *voice) {
AdLibVoice *tmp;
- adlib_key_off(voice->_channel);
+ adlibKeyOff(voice->_channel);
tmp = voice->_prev;
@@ -1103,57 +1670,62 @@ void MidiDriver_ADLIB::mc_off(AdLibVoice *voice) {
voice->_part = NULL;
}
-void MidiDriver_ADLIB::mc_inc_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11) {
+void MidiDriver_ADLIB::mcIncStuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11) {
byte code;
AdLibPart *part = voice->_part;
- code = struct10_ontimer(s10, s11);
+ code = struct10OnTimer(s10, s11);
if (code & 1) {
switch (s11->param) {
case 0:
- voice->_vol_2 = s10->start_value + s11->modify_val;
+ voice->_vol2 = s10->startValue + s11->modifyVal;
if (!_scummSmallHeader) {
- adlib_set_param(voice->_channel, 0,
- volume_table[lookup_table[voice->_vol_2]
- [part->_vol_eff >> 2]]);
+ adlibSetParam(voice->_channel, 0,
+ g_volumeTable[g_volumeLookupTable[voice->_vol2]
+ [part->_volEff >> 2]]);
} else {
- adlib_set_param(voice->_channel, 0, voice->_vol_2);
+ adlibSetParam(voice->_channel, 0, voice->_vol2);
}
break;
case 13:
- voice->_vol_1 = s10->start_value + s11->modify_val;
- if (voice->_twochan && !_scummSmallHeader) {
- adlib_set_param(voice->_channel, 13,
- volume_table[lookup_table[voice->_vol_1]
- [part->_vol_eff >> 2]]);
+ voice->_vol1 = s10->startValue + s11->modifyVal;
+ if (voice->_twoChan && !_scummSmallHeader) {
+ adlibSetParam(voice->_channel, 13,
+ g_volumeTable[g_volumeLookupTable[voice->_vol1]
+ [part->_volEff >> 2]]);
} else {
- adlib_set_param(voice->_channel, 13, voice->_vol_1);
+ adlibSetParam(voice->_channel, 13, voice->_vol1);
}
break;
case 30:
- s11->s10->modwheel = (char)s11->modify_val;
+ s11->s10->modWheel = (char)s11->modifyVal;
break;
case 31:
- s11->s10->unk3 = (char)s11->modify_val;
+ s11->s10->unk3 = (char)s11->modifyVal;
break;
default:
- adlib_set_param(voice->_channel, s11->param,
- s10->start_value + s11->modify_val);
+ adlibSetParam(voice->_channel, s11->param,
+ s10->startValue + s11->modifyVal);
break;
}
}
if (code & 2 && s11->flag0x10)
- adlib_key_onoff(voice->_channel);
+ adlibKeyOnOff(voice->_channel);
}
-void MidiDriver_ADLIB::adlib_key_off(int chan){
+void MidiDriver_ADLIB::adlibKeyOff(int chan) {
byte reg = chan + 0xB0;
- adlib_write(reg, adlib_get_reg_value(reg) & ~0x20);
+ adlibWrite(reg, adlibGetRegValue(reg) & ~0x20);
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ adlibWriteSecondary(reg, adlibGetRegValueSecondary(reg) & ~0x20);
+ }
+#endif
}
-byte MidiDriver_ADLIB::struct10_ontimer(Struct10 *s10, Struct11 *s11) {
+byte MidiDriver_ADLIB::struct10OnTimer(Struct10 *s10, Struct11 *s11) {
byte result = 0;
int i;
@@ -1162,51 +1734,54 @@ byte MidiDriver_ADLIB::struct10_ontimer(Struct10 *s10, Struct11 *s11) {
return 0;
}
- i = s10->cur_val + s10->speed_hi;
- s10->speed_lo_counter += s10->speed_lo;
- if (s10->speed_lo_counter >= s10->speed_lo_max) {
- s10->speed_lo_counter -= s10->speed_lo_max;
+ i = s10->curVal + s10->speedHi;
+ s10->speedLoCounter += s10->speedLo;
+ if (s10->speedLoCounter >= s10->speedLoMax) {
+ s10->speedLoCounter -= s10->speedLoMax;
i += s10->direction;
}
- if (s10->cur_val != i || s10->modwheel != s10->modwheel_last) {
- s10->cur_val = i;
- s10->modwheel_last = s10->modwheel;
- i = lookup_volume(i, s10->modwheel_last);
- if (i != s11->modify_val) {
- s11->modify_val = i;
+ if (s10->curVal != i || s10->modWheel != s10->modWheelLast) {
+ s10->curVal = i;
+ s10->modWheelLast = s10->modWheel;
+ i = lookupVolume(i, s10->modWheelLast);
+ if (i != s11->modifyVal) {
+ s11->modifyVal = i;
result = 1;
}
}
- if (!--s10->num_steps) {
+ if (!--s10->numSteps) {
s10->active++;
if (s10->active > 4) {
if (s10->loop) {
s10->active = 1;
result |= 2;
- struct10_setup(s10);
+ struct10Setup(s10);
} else {
s10->active = 0;
}
} else {
- struct10_setup(s10);
+ struct10Setup(s10);
}
}
return result;
}
-void MidiDriver_ADLIB::adlib_set_param(int channel, byte param, int value) {
+void MidiDriver_ADLIB::adlibSetParam(int channel, byte param, int value, bool primary) {
const AdLibSetParams *as;
byte reg;
assert(channel >= 0 && channel < 9);
+#ifdef ENABLE_OPL3
+ assert(!_opl3Mode || (param == 0 || param == 13));
+#endif
if (param <= 12) {
- reg = channel_mappings_2[channel];
+ reg = g_operator2Offsets[channel];
} else if (param <= 25) {
param -= 13;
- reg = channel_mappings[channel];
+ reg = g_operator1Offsets[channel];
} else if (param <= 27) {
param -= 13;
reg = channel;
@@ -1216,54 +1791,66 @@ void MidiDriver_ADLIB::adlib_set_param(int channel, byte param, int value) {
else
value -= 383;
value <<= 4;
- channel_table_2[channel] = value;
- adlib_playnote(channel, curnote_table[channel] + value);
+ _channelTable2[channel] = value;
+ adlibPlayNote(channel, _curNotTable[channel] + value);
return;
} else {
return;
}
- as = &adlib_setparam_table[param];
- if (as->d)
- value = as->d - value;
- reg += as->a;
- adlib_write(reg, (adlib_get_reg_value(reg) & ~as->c) | (((byte)value) << as->b));
+ as = &g_setParamTable[param];
+ if (as->inversion)
+ value = as->inversion - value;
+ reg += as->registerBase;
+#ifdef ENABLE_OPL3
+ if (primary) {
+#endif
+ adlibWrite(reg, (adlibGetRegValue(reg) & ~as->mask) | (((byte)value) << as->shift));
+#ifdef ENABLE_OPL3
+ } else {
+ adlibWriteSecondary(reg, (adlibGetRegValueSecondary(reg) & ~as->mask) | (((byte)value) << as->shift));
+ }
+#endif
}
-void MidiDriver_ADLIB::adlib_key_onoff(int channel) {
+void MidiDriver_ADLIB::adlibKeyOnOff(int channel) {
+#ifdef ENABLE_OPL3
+ assert(!_opl3Mode);
+#endif
+
byte val;
byte reg = channel + 0xB0;
assert(channel >= 0 && channel < 9);
- val = adlib_get_reg_value(reg);
- adlib_write(reg, val & ~0x20);
- adlib_write(reg, val | 0x20);
+ val = adlibGetRegValue(reg);
+ adlibWrite(reg, val & ~0x20);
+ adlibWrite(reg, val | 0x20);
}
-void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
+void MidiDriver_ADLIB::struct10Setup(Struct10 *s10) {
int b, c, d, e, f, g, h;
byte t;
b = s10->unk3;
f = s10->active - 1;
- t = s10->table_a[f];
- e = num_steps_table[lookup_table[t & 0x7F][b]];
+ t = s10->tableA[f];
+ e = g_numStepsTable[g_volumeLookupTable[t & 0x7F][b]];
if (t & 0x80) {
- e = random_nr(e);
+ e = randomNr(e);
}
if (e == 0)
e++;
- s10->num_steps = s10->speed_lo_max = e;
+ s10->numSteps = s10->speedLoMax = e;
if (f != 2) {
- c = s10->max_value;
- g = s10->start_value;
- t = s10->table_b[f];
- d = lookup_volume(c, (t & 0x7F) - 31);
+ c = s10->maxValue;
+ g = s10->startValue;
+ t = s10->tableB[f];
+ d = lookupVolume(c, (t & 0x7F) - 31);
if (t & 0x80) {
- d = random_nr(d);
+ d = randomNr(d);
}
if (d + g > c) {
h = c - g;
@@ -1272,12 +1859,12 @@ void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
if (d + g < 0)
h = -g;
}
- h -= s10->cur_val;
+ h -= s10->curVal;
} else {
h = 0;
}
- s10->speed_hi = h / e;
+ s10->speedHi = h / e;
if (h < 0) {
h = -h;
s10->direction = -1;
@@ -1285,11 +1872,11 @@ void MidiDriver_ADLIB::struct10_setup(Struct10 *s10) {
s10->direction = 1;
}
- s10->speed_lo = h % e;
- s10->speed_lo_counter = 0;
+ s10->speedLo = h % e;
+ s10->speedLoCounter = 0;
}
-void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
+void MidiDriver_ADLIB::adlibPlayNote(int channel, int note) {
byte old, oct, notex;
int note2;
int i;
@@ -1304,7 +1891,7 @@ void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
oct <<= 2;
notex = note2 % 12 + 3;
- old = adlib_get_reg_value(channel + 0xB0);
+ old = adlibGetRegValue(channel + 0xB0);
if (old & 0x20) {
old &= ~0x20;
if (oct > old) {
@@ -1321,58 +1908,58 @@ void MidiDriver_ADLIB::adlib_playnote(int channel, int note) {
}
i = (notex << 3) + ((note >> 4) & 0x7);
- adlib_write(channel + 0xA0, note_to_f_num[i]);
- adlib_write(channel + 0xB0, oct | 0x20);
+ adlibWrite(channel + 0xA0, g_noteFrequencies[i]);
+ adlibWrite(channel + 0xB0, oct | 0x20);
}
-int MidiDriver_ADLIB::random_nr(int a) {
- static byte _rand_seed = 1;
- if (_rand_seed & 1) {
- _rand_seed >>= 1;
- _rand_seed ^= 0xB8;
+int MidiDriver_ADLIB::randomNr(int a) {
+ static byte _randSeed = 1;
+ if (_randSeed & 1) {
+ _randSeed >>= 1;
+ _randSeed ^= 0xB8;
} else {
- _rand_seed >>= 1;
+ _randSeed >>= 1;
}
- return _rand_seed * a >> 8;
+ return _randSeed * a >> 8;
}
-void MidiDriver_ADLIB::part_key_off(AdLibPart *part, byte note) {
+void MidiDriver_ADLIB::partKeyOff(AdLibPart *part, byte note) {
AdLibVoice *voice;
for (voice = part->_voice; voice; voice = voice->_next) {
if (voice->_note == note) {
if (part->_pedal)
- voice->_waitforpedal = true;
+ voice->_waitForPedal = true;
else
- mc_off(voice);
+ mcOff(voice);
}
}
}
-void MidiDriver_ADLIB::part_key_on(AdLibPart *part, AdLibInstrument *instr, byte note, byte velocity) {
+void MidiDriver_ADLIB::partKeyOn(AdLibPart *part, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan) {
AdLibVoice *voice;
- voice = allocate_voice(part->_pri_eff);
+ voice = allocateVoice(part->_priEff);
if (!voice)
return;
- link_mc(part, voice);
- mc_key_on(voice, instr, note, velocity);
+ linkMc(part, voice);
+ mcKeyOn(voice, instr, note, velocity, second, pan);
}
-AdLibVoice *MidiDriver_ADLIB::allocate_voice(byte pri) {
+AdLibVoice *MidiDriver_ADLIB::allocateVoice(byte pri) {
AdLibVoice *ac, *best = NULL;
int i;
for (i = 0; i < 9; i++) {
- if (++_voice_index >= 9)
- _voice_index = 0;
- ac = &_voices[_voice_index];
+ if (++_voiceIndex >= 9)
+ _voiceIndex = 0;
+ ac = &_voices[_voiceIndex];
if (!ac->_part)
return ac;
if (!ac->_next) {
- if (ac->_part->_pri_eff <= pri) {
- pri = ac->_part->_pri_eff;
+ if (ac->_part->_priEff <= pri) {
+ pri = ac->_part->_priEff;
best = ac;
}
}
@@ -1383,11 +1970,11 @@ AdLibVoice *MidiDriver_ADLIB::allocate_voice(byte pri) {
return NULL;
if (best)
- mc_off(best);
+ mcOff(best);
return best;
}
-void MidiDriver_ADLIB::link_mc(AdLibPart *part, AdLibVoice *voice) {
+void MidiDriver_ADLIB::linkMc(AdLibPart *part, AdLibVoice *voice) {
voice->_part = part;
voice->_next = (AdLibVoice *)part->_voice;
part->_voice = voice;
@@ -1397,153 +1984,229 @@ void MidiDriver_ADLIB::link_mc(AdLibPart *part, AdLibVoice *voice) {
voice->_next->_prev = voice;
}
-void MidiDriver_ADLIB::mc_key_on(AdLibVoice *voice, AdLibInstrument *instr, byte note, byte velocity) {
+void MidiDriver_ADLIB::mcKeyOn(AdLibVoice *voice, const AdLibInstrument *instr, byte note, byte velocity, const AdLibInstrument *second, byte pan) {
AdLibPart *part = voice->_part;
- int c;
- byte vol_1, vol_2;
+ byte vol1, vol2;
+#ifdef ENABLE_OPL3
+ byte secVol1 = 0, secVol2 = 0;
+#endif
- voice->_twochan = instr->feedback & 1;
+ voice->_twoChan = instr->feedback & 1;
voice->_note = note;
- voice->_waitforpedal = false;
+ voice->_waitForPedal = false;
voice->_duration = instr->duration;
if (voice->_duration != 0)
voice->_duration *= 63;
- if (!_scummSmallHeader)
- vol_1 = (instr->mod_scalingOutputLevel & 0x3F) + lookup_table[velocity >> 1][instr->mod_waveformSelect >> 2];
- else
- vol_1 = 0x3f - (instr->mod_scalingOutputLevel & 0x3F);
- if (vol_1 > 0x3F)
- vol_1 = 0x3F;
- voice->_vol_1 = vol_1;
-
- if (!_scummSmallHeader)
- vol_2 = (instr->car_scalingOutputLevel & 0x3F) + lookup_table[velocity >> 1][instr->car_waveformSelect >> 2];
- else
- vol_2 = 0x3f - (instr->car_scalingOutputLevel & 0x3F);
- if (vol_2 > 0x3F)
- vol_2 = 0x3F;
- voice->_vol_2 = vol_2;
+ if (!_scummSmallHeader) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode)
+ vol1 = (instr->modScalingOutputLevel & 0x3F) + (velocity * ((instr->modWaveformSelect >> 3) + 1)) / 64;
+ else
+#endif
+ vol1 = (instr->modScalingOutputLevel & 0x3F) + g_volumeLookupTable[velocity >> 1][instr->modWaveformSelect >> 2];
+ } else {
+ vol1 = 0x3f - (instr->modScalingOutputLevel & 0x3F);
+ }
+ if (vol1 > 0x3F)
+ vol1 = 0x3F;
+ voice->_vol1 = vol1;
- c = part->_vol_eff >> 2;
+ if (!_scummSmallHeader) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode)
+ vol2 = (instr->carScalingOutputLevel & 0x3F) + (velocity * ((instr->carWaveformSelect >> 3) + 1)) / 64;
+ else
+#endif
+ vol2 = (instr->carScalingOutputLevel & 0x3F) + g_volumeLookupTable[velocity >> 1][instr->carWaveformSelect >> 2];
+ } else {
+ vol2 = 0x3f - (instr->carScalingOutputLevel & 0x3F);
+ }
+ if (vol2 > 0x3F)
+ vol2 = 0x3F;
+ voice->_vol2 = vol2;
+
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ voice->_secTwoChan = second->feedback & 1;
+ secVol1 = (second->modScalingOutputLevel & 0x3F) + (velocity * ((second->modWaveformSelect >> 3) + 1)) / 64;
+ if (secVol1 > 0x3F) {
+ secVol1 = 0x3F;
+ }
+ voice->_secVol1 = secVol1;
+ secVol2 = (second->carScalingOutputLevel & 0x3F) + (velocity * ((second->carWaveformSelect >> 3) + 1)) / 64;
+ if (secVol2 > 0x3F) {
+ secVol2 = 0x3F;
+ }
+ voice->_secVol2 = secVol2;
+ }
+#endif
if (!_scummSmallHeader) {
- vol_2 = volume_table[lookup_table[vol_2][c]];
- if (voice->_twochan)
- vol_1 = volume_table[lookup_table[vol_1][c]];
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ int c = part->_volEff >> 2;
+ vol2 = g_volumeTable[g_volumeLookupTable[vol2][c]];
+ if (voice->_twoChan)
+ vol1 = g_volumeTable[g_volumeLookupTable[vol1][c]];
+#ifdef ENABLE_OPL3
+ } else {
+ vol2 = g_volumeTable[((vol2 + 1) * part->_volEff) >> 7];
+ secVol2 = g_volumeTable[((secVol2 + 1) * part->_volEff) >> 7];
+ if (voice->_twoChan)
+ vol1 = g_volumeTable[((vol1 + 1) * part->_volEff) >> 7];
+ if (voice->_secTwoChan)
+ secVol1 = g_volumeTable[((secVol1 + 1) * part->_volEff) >> 7];
+ }
+#endif
}
- adlib_setup_channel(voice->_channel, instr, vol_1, vol_2);
- adlib_note_on_ex(voice->_channel, part->_transpose_eff + note, part->_detune_eff + (part->_pitchbend * part->_pitchbend_factor >> 6));
+ adlibSetupChannel(voice->_channel, instr, vol1, vol2);
+#ifdef ENABLE_OPL3
+ if (!_opl3Mode) {
+#endif
+ adlibNoteOnEx(voice->_channel, /*part->_transposeEff + */note, part->_detuneEff + (part->_pitchBend * part->_pitchBendFactor >> 6));
- if (instr->flags_a & 0x80) {
- mc_init_stuff(voice, &voice->_s10a, &voice->_s11a, instr->flags_a, &instr->extra_a);
- } else {
- voice->_s10a.active = 0;
- }
+ if (instr->flagsA & 0x80) {
+ mcInitStuff(voice, &voice->_s10a, &voice->_s11a, instr->flagsA, &instr->extraA);
+ } else {
+ voice->_s10a.active = 0;
+ }
- if (instr->flags_b & 0x80) {
- mc_init_stuff(voice, &voice->_s10b, &voice->_s11b, instr->flags_b, &instr->extra_b);
+ if (instr->flagsB & 0x80) {
+ mcInitStuff(voice, &voice->_s10b, &voice->_s11b, instr->flagsB, &instr->extraB);
+ } else {
+ voice->_s10b.active = 0;
+ }
+#ifdef ENABLE_OPL3
} else {
- voice->_s10b.active = 0;
+ adlibSetupChannelSecondary(voice->_channel, second, secVol1, secVol2, pan);
+ adlibNoteOnEx(voice->_channel, note, part->_pitchBend >> 1);
}
+#endif
}
-void MidiDriver_ADLIB::adlib_setup_channel(int chan, AdLibInstrument *instr, byte vol_1, byte vol_2) {
- byte channel;
-
+void MidiDriver_ADLIB::adlibSetupChannel(int chan, const AdLibInstrument *instr, byte vol1, byte vol2) {
assert(chan >= 0 && chan < 9);
- channel = channel_mappings[chan];
- adlib_write(channel + 0x20, instr->mod_characteristic);
- adlib_write(channel + 0x40, (instr->mod_scalingOutputLevel | 0x3F) - vol_1 );
- adlib_write(channel + 0x60, 0xff & (~instr->mod_attackDecay));
- adlib_write(channel + 0x80, 0xff & (~instr->mod_sustainRelease));
- adlib_write(channel + 0xE0, instr->mod_waveformSelect);
-
- channel = channel_mappings_2[chan];
- adlib_write(channel + 0x20, instr->car_characteristic);
- adlib_write(channel + 0x40, (instr->car_scalingOutputLevel | 0x3F) - vol_2 );
- adlib_write(channel + 0x60, 0xff & (~instr->car_attackDecay));
- adlib_write(channel + 0x80, 0xff & (~instr->car_sustainRelease));
- adlib_write(channel + 0xE0, instr->car_waveformSelect);
-
- adlib_write((byte)chan + 0xC0, instr->feedback);
+ byte channel = g_operator1Offsets[chan];
+ adlibWrite(channel + 0x20, instr->modCharacteristic);
+ adlibWrite(channel + 0x40, (instr->modScalingOutputLevel | 0x3F) - vol1);
+ adlibWrite(channel + 0x60, 0xff & (~instr->modAttackDecay));
+ adlibWrite(channel + 0x80, 0xff & (~instr->modSustainRelease));
+ adlibWrite(channel + 0xE0, instr->modWaveformSelect);
+
+ channel = g_operator2Offsets[chan];
+ adlibWrite(channel + 0x20, instr->carCharacteristic);
+ adlibWrite(channel + 0x40, (instr->carScalingOutputLevel | 0x3F) - vol2);
+ adlibWrite(channel + 0x60, 0xff & (~instr->carAttackDecay));
+ adlibWrite(channel + 0x80, 0xff & (~instr->carSustainRelease));
+ adlibWrite(channel + 0xE0, instr->carWaveformSelect);
+
+ adlibWrite((byte)chan + 0xC0, instr->feedback
+#ifdef ENABLE_OPL3
+ | (_opl3Mode ? 0x30 : 0)
+#endif
+ );
}
-void MidiDriver_ADLIB::adlib_note_on_ex(int chan, byte note, int mod) {
- int code;
+#ifdef ENABLE_OPL3
+void MidiDriver_ADLIB::adlibSetupChannelSecondary(int chan, const AdLibInstrument *instr, byte vol1, byte vol2, byte pan) {
assert(chan >= 0 && chan < 9);
- code = (note << 7) + mod;
- curnote_table[chan] = code;
- channel_table_2[chan] = 0;
- adlib_playnote(chan, code);
+ assert(_opl3Mode);
+
+ byte channel = g_operator1Offsets[chan];
+ adlibWriteSecondary(channel + 0x20, instr->modCharacteristic);
+ adlibWriteSecondary(channel + 0x40, (instr->modScalingOutputLevel | 0x3F) - vol1);
+ adlibWriteSecondary(channel + 0x60, 0xff & (~instr->modAttackDecay));
+ adlibWriteSecondary(channel + 0x80, 0xff & (~instr->modSustainRelease));
+ adlibWriteSecondary(channel + 0xE0, instr->modWaveformSelect);
+
+ channel = g_operator2Offsets[chan];
+ adlibWriteSecondary(channel + 0x20, instr->carCharacteristic);
+ adlibWriteSecondary(channel + 0x40, (instr->carScalingOutputLevel | 0x3F) - vol2);
+ adlibWriteSecondary(channel + 0x60, 0xff & (~instr->carAttackDecay));
+ adlibWriteSecondary(channel + 0x80, 0xff & (~instr->carSustainRelease));
+ adlibWriteSecondary(channel + 0xE0, instr->carWaveformSelect);
+
+ // The original uses the following (strange) behavior:
+#if 0
+ if (instr->feedback | (pan > 64)) {
+ adlibWriteSecondary((byte)chan + 0xC0, 0x20);
+ } else {
+ adlibWriteSecondary((byte)chan + 0xC0, 0x10);
+ }
+#else
+ adlibWriteSecondary((byte)chan + 0xC0, instr->feedback | ((pan > 64) ? 0x20 : 0x10));
+#endif
}
+#endif
-void MidiDriver_ADLIB::mc_init_stuff(AdLibVoice *voice, Struct10 *s10,
- Struct11 *s11, byte flags, InstrumentExtra *ie) {
+void MidiDriver_ADLIB::mcInitStuff(AdLibVoice *voice, Struct10 *s10,
+ Struct11 *s11, byte flags, const InstrumentExtra *ie) {
AdLibPart *part = voice->_part;
- s11->modify_val = 0;
+ s11->modifyVal = 0;
s11->flag0x40 = flags & 0x40;
s10->loop = flags & 0x20;
s11->flag0x10 = flags & 0x10;
- s11->param = param_table_1[flags & 0xF];
- s10->max_value = maxval_table[flags & 0xF];
+ s11->param = g_paramTable1[flags & 0xF];
+ s10->maxValue = g_maxValTable[flags & 0xF];
s10->unk3 = 31;
if (s11->flag0x40) {
- s10->modwheel = part->_modwheel >> 2;
+ s10->modWheel = part->_modWheel >> 2;
} else {
- s10->modwheel = 31;
+ s10->modWheel = 31;
}
switch (s11->param) {
case 0:
- s10->start_value = voice->_vol_2;
+ s10->startValue = voice->_vol2;
break;
case 13:
- s10->start_value = voice->_vol_1;
+ s10->startValue = voice->_vol1;
break;
case 30:
- s10->start_value = 31;
- s11->s10->modwheel = 0;
+ s10->startValue = 31;
+ s11->s10->modWheel = 0;
break;
case 31:
- s10->start_value = 0;
+ s10->startValue = 0;
s11->s10->unk3 = 0;
break;
default:
- s10->start_value = adlib_get_reg_value_param(voice->_channel, s11->param);
+ s10->startValue = adlibGetRegValueParam(voice->_channel, s11->param);
}
- struct10_init(s10, ie);
+ struct10Init(s10, ie);
}
-void MidiDriver_ADLIB::struct10_init(Struct10 *s10, InstrumentExtra *ie) {
+void MidiDriver_ADLIB::struct10Init(Struct10 *s10, const InstrumentExtra *ie) {
s10->active = 1;
if (!_scummSmallHeader) {
- s10->cur_val = 0;
+ s10->curVal = 0;
} else {
- s10->cur_val = s10->start_value;
- s10->start_value = 0;
+ s10->curVal = s10->startValue;
+ s10->startValue = 0;
}
- s10->modwheel_last = 31;
+ s10->modWheelLast = 31;
s10->count = ie->a;
if (s10->count)
s10->count *= 63;
- s10->table_a[0] = ie->b;
- s10->table_a[1] = ie->d;
- s10->table_a[2] = ie->f;
- s10->table_a[3] = ie->g;
+ s10->tableA[0] = ie->b;
+ s10->tableA[1] = ie->d;
+ s10->tableA[2] = ie->f;
+ s10->tableA[3] = ie->g;
- s10->table_b[0] = ie->c;
- s10->table_b[1] = ie->e;
- s10->table_b[2] = 0;
- s10->table_b[3] = ie->h;
+ s10->tableB[0] = ie->c;
+ s10->tableB[1] = ie->e;
+ s10->tableB[2] = 0;
+ s10->tableB[3] = ie->h;
- struct10_setup(s10);
+ struct10Setup(s10);
}
-int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
+int MidiDriver_ADLIB::adlibGetRegValueParam(int chan, byte param) {
const AdLibSetParams *as;
byte val;
byte channel;
@@ -1551,10 +2214,10 @@ int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
assert(chan >= 0 && chan < 9);
if (param <= 12) {
- channel = channel_mappings_2[chan];
+ channel = g_operator2Offsets[chan];
} else if (param <= 25) {
param -= 13;
- channel = channel_mappings[chan];
+ channel = g_operator1Offsets[chan];
} else if (param <= 27) {
param -= 13;
channel = chan;
@@ -1566,24 +2229,52 @@ int MidiDriver_ADLIB::adlib_get_reg_value_param(int chan, byte param) {
return 0;
}
- as = &adlib_setparam_table[param];
- val = adlib_get_reg_value(channel + as->a);
- val &= as->c;
- val >>= as->b;
- if (as->d)
- val = as->d - val;
+ as = &g_setParamTable[param];
+ val = adlibGetRegValue(channel + as->registerBase);
+ val &= as->mask;
+ val >>= as->shift;
+ if (as->inversion)
+ val = as->inversion - val;
return val;
}
-void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod) {
- int code;
+void MidiDriver_ADLIB::adlibNoteOn(int chan, byte note, int mod) {
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ adlibNoteOnEx(chan, note, mod);
+ return;
+ }
+#endif
+
assert(chan >= 0 && chan < 9);
- code = (note << 7) + mod;
- curnote_table[chan] = code;
- adlib_playnote(chan, (int16) channel_table_2[chan] + code);
+ int code = (note << 7) + mod;
+ _curNotTable[chan] = code;
+ adlibPlayNote(chan, (int16)_channelTable2[chan] + code);
}
+void MidiDriver_ADLIB::adlibNoteOnEx(int chan, byte note, int mod) {
+ assert(chan >= 0 && chan < 9);
+
+#ifdef ENABLE_OPL3
+ if (_opl3Mode) {
+ const int noteAdjusted = note + (mod >> 8) - 7;
+ const int pitchAdjust = (mod >> 5) & 7;
+
+ adlibWrite(0xA0 + chan, g_noteFrequencies[(noteAdjusted % 12) * 8 + pitchAdjust + 6 * 8]);
+ adlibWriteSecondary(0xA0 + chan, g_noteFrequencies[(noteAdjusted % 12) * 8 + pitchAdjust + 6 * 8]);
+ adlibWrite(0xB0 + chan, (CLIP(noteAdjusted / 12, 0, 7) << 2) | 0x20);
+ adlibWriteSecondary(0xB0 + chan, (CLIP(noteAdjusted / 12, 0, 7) << 2) | 0x20);
+ } else {
+#endif
+ int code = (note << 7) + mod;
+ _curNotTable[chan] = code;
+ _channelTable2[chan] = 0;
+ adlibPlayNote(chan, code);
+#ifdef ENABLE_OPL3
+ }
+#endif
+}
// Plugin interface
diff --git a/audio/softsynth/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/fmtowns_pc98/towns_midi.cpp b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
index b8203944c0..46b1a6406d 100644
--- a/audio/softsynth/fmtowns_pc98/towns_midi.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
@@ -147,17 +147,10 @@ private:
TownsMidiOutputChannel *_out;
uint8 *_instrument;
- uint8 _prg;
uint8 _chanIndex;
- uint8 _effectLevel;
uint8 _priority;
- uint8 _ctrlVolume;
uint8 _tl;
- uint8 _pan;
- uint8 _panEff;
- uint8 _percS;
int8 _transpose;
- uint8 _fld_1f;
int8 _detune;
int8 _modWheel;
uint8 _sustain;
@@ -659,9 +652,8 @@ const uint16 TownsMidiOutputChannel::_freqLSB[] = {
0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B, 0x055B
};
-TownsMidiInputChannel::TownsMidiInputChannel(MidiDriver_TOWNS *driver, int chanIndex) : MidiChannel(), _driver(driver), _out(0), _prg(0), _chanIndex(chanIndex),
- _effectLevel(0), _priority(0), _ctrlVolume(0), _tl(0), _pan(0), _panEff(0), _transpose(0), _percS(0), _pitchBendFactor(0), _pitchBend(0), _sustain(0), _freqLSB(0),
- _fld_1f(0), _detune(0), _modWheel(0), _allocated(false) {
+TownsMidiInputChannel::TownsMidiInputChannel(MidiDriver_TOWNS *driver, int chanIndex) : MidiChannel(), _driver(driver), _out(0), _chanIndex(chanIndex),
+ _priority(0), _tl(0), _transpose(0), _pitchBendFactor(0), _pitchBend(0), _sustain(0), _freqLSB(0), _detune(0), _modWheel(0), _allocated(false) {
_instrument = new uint8[30];
memset(_instrument, 0, 30);
}
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 186118262f..00d0469356 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,43 +145,51 @@ 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.
- // That results in more accurate timing.
- _baseFreq = 10000;
// Unfortunately bugs in the emulator cause inaccurate tuning
// at rates other than 32KHz, thus we produce data at 32KHz and
// rely on Mixer to convert.
_outputRate = 32000; //_mixer->getOutputRate();
_initializing = false;
+
+ // Initialized in open()
+ _controlROM = NULL;
+ _pcmROM = NULL;
+ _controlFile = NULL;
+ _pcmFile = NULL;
}
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 +204,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 +274,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 4ee6c87943..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"
-
-using namespace MT32Emu;
-
-// Default reverb settings for modes 0-2
-
-static const unsigned int NUM_ALLPASSES = 6;
-static const unsigned int NUM_DELAYS = 5;
-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};
+#if MT32EMU_USE_REVERBMODEL == 1
-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};
-
-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};
-
-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};
+#include "AReverbModel.h"
-RingBuffer::RingBuffer(Bit32u newsize) {
- index = 0;
- size = newsize;
+// 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;
+
+// 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
+
+ // the previously stored value
+ float last = buffer[index];
- out = next();
+ // prepare input + feedback
+ float filterIn = in + next() * feedbackFactor;
- // store input
- buffer[index] = in;
+ // store input + feedback processed by a low-pass filter
+ buffer[index] = filterFactor * last - filterIn;
+}
- // return buffer output
- return out;
+float CombFilter::getOutputAt(const Bit32u outIndex) const {
+ return buffer[(size + index - outIndex) % size];
}
-AReverbModel::AReverbModel(const AReverbSettings *useSettings) : allpasses(NULL), delays(NULL), currentSettings(useSettings) {
+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++;
@@ -235,3 +271,7 @@ void AReverbModel::process(const float *inLeft, const float *inRight, float *out
outRight++;
}
}
+
+}
+
+#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 89eebf0d79..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
@@ -20,15 +20,14 @@
#include "mt32emu.h"
#include "DelayReverb.h"
-using namespace MT32Emu;
+namespace MT32Emu {
-
-// CONFIRMED: The values below are found via analysis of digital samples. Checked with all time and level combinations.
+// 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
// Leaving these separate in case it's useful for work on other reverb modes...
-const Bit32u REVERB_TIMINGS[8][3]= {
+static const Bit32u REVERB_TIMINGS[8][3]= {
// {leftDelay, rightDelay, feedbackDelay}
{402, 802, 801},
{626, 1250, 1249},
@@ -40,14 +39,16 @@ const Bit32u REVERB_TIMINGS[8][3]= {
{8002, 16002, 16001}
};
-const float REVERB_FADE[8] = {0.0f, -0.049400051f, -0.08220577f, -0.131861118f, -0.197344907f, -0.262956344f, -0.345162114f, -0.509508615f};
-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);
}
@@ -55,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() {
@@ -92,59 +88,55 @@ 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 c11fa859d8..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
@@ -20,7 +20,7 @@
#include "freeverb.h"
-using namespace MT32Emu;
+namespace MT32Emu {
FreeverbModel::FreeverbModel(float useScaleTuning, float useFiltVal, float useWet, Bit8u useRoom, float useDamp) {
freeverb = NULL;
@@ -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);
}
@@ -76,3 +74,5 @@ bool FreeverbModel::isActive() const {
// FIXME: Not bothering to do this properly since we'll be replacing Freeverb soon...
return false;
}
+
+}
diff --git a/audio/softsynth/mt32/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 9f1f01c3c2..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
@@ -79,11 +79,16 @@ LA32Ramp::LA32Ramp() :
void LA32Ramp::startRamp(Bit8u target, Bit8u increment) {
// CONFIRMED: From sample analysis, this appears to be very accurate.
- // FIXME: We could use a table for this in future
if (increment == 0) {
largeIncrement = 0;
} else {
- largeIncrement = (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f);
+ // Three bits in the fractional part, no need to interpolate
+ // (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 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 75912f38a8..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,16 +533,20 @@ 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;
- // FIXME: This has special handling of key 0 in NoteOff that Mok has not yet confirmed
- // applies to AllNotesOff.
- poly->noteOff(holdpedal);
+ 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.
+ if (poly->canSustain()) {
+ poly->noteOff(holdpedal);
+ }
}
}
@@ -554,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();
}
}
@@ -580,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)) {
@@ -602,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();
}
@@ -615,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 03bec560b8..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
@@ -22,7 +22,7 @@
#include "mt32emu.h"
#include "mmath.h"
-using namespace MT32Emu;
+namespace MT32Emu {
#ifdef INACCURATE_SMOOTH_PAN
// Mok wanted an option for smoother panning, and we love Mok.
@@ -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;
}
}
@@ -133,6 +135,25 @@ void Partial::startPartial(const Part *part, Poly *usePoly, const PatchCache *us
stereoVolume.leftVol = panVal / 7.0f;
stereoVolume.rightVol = 1.0f - stereoVolume.leftVol;
+ // SEMI-CONFIRMED: From sample analysis:
+ // Found that timbres with 3 or 4 partials (i.e. one using two partial pairs) are mixed in two different ways.
+ // Either partial pairs are added or subtracted, it depends on how the partial pairs are allocated.
+ // It seems that partials are grouped into quarters and if the partial pairs are allocated in different quarters the subtraction happens.
+ // Though, this matters little for the majority of timbres, it becomes crucial for timbres which contain several partials that sound very close.
+ // In this case that timbre can sound totally different depending of the way it is mixed up.
+ // Most easily this effect can be displayed with the help of a special timbre consisting of several identical square wave partials (3 or 4).
+ // Say, it is 3-partial timbre. Just play any two notes simultaneously and the polys very probably are mixed differently.
+ // Moreover, the partial allocator retains the last partial assignment it did and all the subsequent notes will sound the same as the last released one.
+ // The situation is better with 4-partial timbres since then a whole quarter is assigned for each poly. However, if a 3-partial timbre broke the normal
+ // whole-quarter assignment or after some partials got aborted, even 4-partial timbres can be found sounding differently.
+ // This behaviour is also confirmed with two more special timbres: one with identical sawtooth partials, and one with PCM wave 02.
+ // For my personal taste, this behaviour rather enriches the sounding and should be emulated.
+ // Also, the current partial allocator model probably needs to be refined.
+ if (debugPartialNum & 8) {
+ stereoVolume.leftVol = -stereoVolume.leftVol;
+ stereoVolume.rightVol = -stereoVolume.rightVol;
+ }
+
if (patchCache->PCMPartial) {
pcmNum = patchCache->pcm;
if (synth->controlROMMap->pcmCount > 128) {
@@ -144,37 +165,75 @@ 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
- pulseWidthVal = (poly->getVelocity() - 64) * (patchCache->srcPartial.wg.pulseWidthVeloSensitivity - 7) + synth->tables.pulseWidth100To255[patchCache->srcPartial.wg.pulseWidth];
+ pulseWidthVal = (poly->getVelocity() - 64) * (patchCache->srcPartial.wg.pulseWidthVeloSensitivity - 7) + Tables::getInstance().pulseWidth100To255[patchCache->srcPartial.wg.pulseWidth];
if (pulseWidthVal < 0) {
pulseWidthVal = 0;
} else if (pulseWidthVal > 255) {
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) {
+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;
}
@@ -182,279 +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;
}
- // 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((32772 - ampRampVal / 2048) / -2048.0f);
-
- Bit16u pitch = tvp->nextPitch();
- float freq = synth->tables.pitchToFreq[pitch];
-
- 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];
- float nextSample = getPCMSample(intPCMPosition + 1);
- sample = firstSample + (nextSample - firstSample) * (pcmPosition - intPCMPosition);
-
- 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;
-
- // EXP2F(1.0f - (32 - res) / 4.0f);
- float resAmp = synth->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
- cosineLen *= synth->tables.cutoffToCosineLen[Bit32u((cutoffVal - 128.0f) * 8.0f)];
-#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 += synth->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 *= synth->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 = -synth->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 = synth->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
- sample *= synth->tables.cutoffToFilterAmp[Bit32u(cutoffVal * 8.0f)];
-#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;
+ 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;
}
-
- // Resonance sine WG
-#if MT32EMU_ACCURATE_WG == 1
- resSample *= sinf(FLOAT_PI * relWavePos / cosineLen);
-#else
- resSample *= synth->tables.sinf10[Bit32u(2048.0f * relWavePos / cosineLen) & 4095];
-#endif
-
- // Resonance sine amp
- float resAmpFade = EXP2F(-synth->tables.resAmpFadeFactor[res >> 2] * (relWavePos / cosineLen)); // seems to be exact
-
- // 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;
- }
-
- // 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 + synth->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 *= synth->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);
}
@@ -486,54 +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 == 1) {
- mixBuffersRingMix(partialBuf + pairNumGenerated, NULL, numGenerated - pairNumGenerated);
- } else {
- mixBuffersRing(partialBuf + pairNumGenerated, NULL, numGenerated - pairNumGenerated);
- }
- }
- }
-
+ unsigned long numGenerated = generateSamples(myBuffer, length);
for (unsigned int i = 0; i < numGenerated; i++) {
- *leftBuf++ = partialBuf[i] * stereoVolume.leftVol;
+ *leftBuf++ = myBuffer[i] * stereoVolume.leftVol;
+ *rightBuf++ = myBuffer[i] * stereoVolume.rightVol;
}
- for (unsigned int i = 0; i < numGenerated; i++) {
- *rightBuf++ = partialBuf[i] * stereoVolume.rightVol;
- }
- while (numGenerated < length) {
+ for (; numGenerated < length; numGenerated++) {
*leftBuf++ = 0.0f;
*rightBuf++ = 0.0f;
- numGenerated++;
}
return true;
}
@@ -555,3 +326,5 @@ void Partial::startDecayAll() {
tvp->startDecay();
tvf->startDecay();
}
+
+}
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 0a6be826d6..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
@@ -20,7 +20,7 @@
#include "mt32emu.h"
#include "PartialManager.h"
-using namespace MT32Emu;
+namespace MT32Emu {
PartialManager::PartialManager(Synth *useSynth, Part **useParts) {
synth = useSynth;
@@ -248,3 +248,5 @@ const Partial *PartialManager::getPartial(unsigned int partialNum) const {
}
return partialTable[partialNum];
}
+
+}
diff --git a/audio/softsynth/mt32/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 a2f00db73c..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) {
@@ -58,6 +59,9 @@ bool Poly::noteOff(bool pedalHeld) {
return false;
}
if (pedalHeld) {
+ if (state == POLY_Held) {
+ return false;
+ }
state = POLY_Held;
} else {
startDecay();
@@ -171,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 7a1b5c2275..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
@@ -36,7 +38,7 @@
namespace MT32Emu {
-const ControlROMMap ControlROMMaps[7] = {
+static const ControlROMMap ControlROMMaps[7] = {
// ID IDc IDbytes PCMmap PCMc tmbrA tmbrAO, tmbrAC tmbrB tmbrBO, tmbrBC tmbrR trC rhythm rhyC rsrv panpot prog rhyMax patMax sysMax timMax
{0x4014, 22, "\000 ver1.04 14 July 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x73A6, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A},
{0x4014, 22, "\000 ver1.05 06 Aug, 87 ", 0x3000, 128, 0x8000, 0x0000, false, 0xC000, 0x4000, false, 0x3200, 30, 0x7414, 85, 0x57C7, 0x57E2, 0x57D0, 0x5252, 0x525E, 0x526E, 0x520A},
@@ -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,26 +420,19 @@ 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
- tables.init();
#if !MT32EMU_REDUCE_REVERB_MEMORY
for (int i = 0; i < 4; i++) {
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));
@@ -441,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();
@@ -455,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
@@ -594,9 +589,6 @@ void Synth::close() {
parts[i] = NULL;
}
- delete[] myProp.baseDir;
- myProp.baseDir = NULL;
-
delete[] pcmWaves;
delete[] pcmROMData;
@@ -627,6 +619,11 @@ void Synth::playMsg(Bit32u msg) {
return;
}
playMsgOnPart(part, code, note, velocity);
+
+ // This ensures minimum 1-sample delay between sequential MIDI events
+ // Without this, a sequence of NoteOn and immediately succeeding NoteOff messages is always silent
+ // Technically, it's also impossible to send events through the MIDI interface faster than about each millisecond
+ prerender();
}
void Synth::playMsgOnPart(unsigned char part, unsigned char code, unsigned char note, unsigned char velocity) {
@@ -1178,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.
@@ -1216,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();
@@ -1244,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
@@ -1254,7 +1251,7 @@ void Synth::refreshSystemReverbParameters() {
if (reverbModel != NULL) {
reverbModel->close();
}
- newReverbModel->open(myProp.sampleRate);
+ newReverbModel->open();
}
#endif
reverbModel = newReverbModel;
@@ -1309,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 ccabce7282..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,14 +283,13 @@ 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];
Bit32u renderedSampleCount;
- Tables tables;
MemParams mt32ram, mt32default;
@@ -337,6 +305,9 @@ private:
bool isOpen;
+ bool isDefaultReportHandler;
+ ReportHandler *reportHandler;
+
PartialManager *partialManager;
Part *parts[9];
@@ -369,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);
@@ -384,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);
@@ -399,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 f3e3f7bbc7..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
@@ -154,7 +160,7 @@ void TVA::reset(const Part *newPart, const TimbreParam::PartialParam *newPartial
playing = true;
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int key = partial->getPoly()->getKey();
int velocity = partial->getPoly()->getVelocity();
@@ -215,7 +221,7 @@ void TVA::recalcSustain() {
return;
}
// We're sustaining. Recalculate all the values
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int newTarget = calcBasicAmp(tables, partial, system_, partialParam, patchTemp, rhythmTemp, biasAmpSubtraction, veloAmpSubtraction, part->getExpression());
newTarget += partialParam->tva.envLevel[3];
// Since we're in TVA_PHASE_SUSTAIN at this point, we know that target has been reached and an interrupt fired, so we can rely on it being the current amp.
@@ -241,7 +247,7 @@ int TVA::getPhase() const {
}
void TVA::nextPhase() {
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
if (phase >= TVA_PHASE_DEAD || !playing) {
partial->getSynth()->printDebug("TVA::nextPhase(): Shouldn't have got here with phase %d, playing=%s", phase, playing ? "true" : "false");
@@ -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 80b592ea67..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
@@ -117,7 +117,7 @@ void TVF::reset(const TimbreParam::PartialParam *newPartialParam, unsigned int b
unsigned int key = partial->getPoly()->getKey();
unsigned int velocity = partial->getPoly()->getVelocity();
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
baseCutoff = calcBaseCutoff(newPartialParam, basePitch, key);
#if MT32EMU_MONITOR_TVF >= 1
@@ -179,7 +179,7 @@ void TVF::startDecay() {
}
void TVF::nextPhase() {
- Tables *tables = &partial->getSynth()->tables;
+ const Tables *tables = &Tables::getInstance();
int newPhase = phase + 1;
switch (newPhase) {
diff --git a/audio/softsynth/mt32/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 0b339e8d71..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) {
@@ -171,9 +170,14 @@ void TVP::updatePitch() {
if (newPitch < 0) {
newPitch = 0;
}
+
+// Note: Temporary #ifdef until we have proper "quirk" configuration
+// This is about right emulation of MT-32 GEN0 quirk exploited in Colonel's Bequest timbre "Lightning"
+#ifndef MT32EMU_QUIRK_PITCH_ENVELOPE_OVERFLOW_MT32
if (newPitch > 59392) {
newPitch = 59392;
}
+#endif
pitch = (Bit16u)newPitch;
// FIXME: We're doing this here because that's what the CM-32L does - we should probably move this somewhere more appropriate in future.
diff --git a/audio/softsynth/mt32/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 c9bd40b7a4..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
@@ -22,18 +22,14 @@
#include "mt32emu.h"
#include "mmath.h"
-using namespace MT32Emu;
+namespace MT32Emu {
-Tables::Tables() {
- initialised = false;
+const Tables &Tables::getInstance() {
+ static const Tables instance;
+ return instance;
}
-void Tables::init() {
- if (initialised) {
- return;
- }
- initialised = true;
-
+Tables::Tables() {
int lf;
for (lf = 0; lf <= 100; lf++) {
// CONFIRMED:KG: This matches a ROM table found by Mok
@@ -76,44 +72,25 @@ void Tables::init() {
//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
- }
-
- for (int i = 0; i < 65536; i++) {
- // Aka (slightly slower): EXP2F(pitchVal / 4096.0f - 16.0f) * 32000.0f
- pitchToFreq[i] = EXP2F(i / 4096.0f - 1.034215715f);
- }
-
- // found from sample analysis
- for (int i = 0; i < 1024; i++) {
- cutoffToCosineLen[i] = EXP2F(i / -128.0f);
+ // 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));
}
- // found from sample analysis
- for (int i = 0; i < 1024; i++) {
- cutoffToFilterAmp[i] = EXP2F(-0.125f * (128.0f - i / 8.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;
+ static const Bit8u resAmpDecayFactorTable[] = {31, 16, 12, 8, 5, 3, 2, 1};
+ resAmpDecayFactor = resAmpDecayFactorTable;
+}
- for (int i = 0; i < 5120; i++) {
- sinf10[i] = sin(FLOAT_PI * i / 2048.0f);
- }
}
diff --git a/audio/softsynth/mt32/Tables.h b/audio/softsynth/mt32/Tables.h
index a2b5ff5d56..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,14 +20,23 @@
namespace MT32Emu {
+// Sample rate to use in mixing. With the progress of development, we've found way too many thing dependent.
+// In order to achieve further advance in emulation accuracy, sample rate made fixed throughout the emulator.
+// 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;
class Synth;
class Tables {
- bool initialised;
+private:
+ Tables();
+ Tables(Tables &);
public:
+ static const Tables &getInstance();
+
// Constant LUTs
// CONFIRMED: This is used to convert several parameters to amp-modifying values in the TVA envelope:
@@ -47,16 +56,10 @@ public:
// CONFIRMED:
Bit8u pulseWidth100To255[101];
- float pulseLenFactor[128];
- float pitchToFreq[65536];
- float cutoffToCosineLen[1024];
- float cutoffToFilterAmp[1024];
- float resAmpMax[32];
- float resAmpFadeFactor[8];
- float sinf10[5120];
+ Bit16u exp9[512];
+ Bit16u logsin9[512];
- Tables();
- void init();
+ const Bit8u *resAmpDecayFactor;
};
}
diff --git a/audio/softsynth/mt32/mmath.h b/audio/softsynth/mt32/mmath.h
index 226d73e27e..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
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 091819b95c..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,13 +59,6 @@
#define MT32EMU_MONITOR_TVA 0
#define MT32EMU_MONITOR_TVF 0
-
-// 0: Use LUTs to speedup WG
-// 1: Use precise float math
-#define MT32EMU_ACCURATE_WG 0
-
-#define MT32EMU_USE_EXTINT 0
-
// Configuration
// The maximum number of partials playing simultaneously
#define MT32EMU_MAX_PARTIALS 32
@@ -77,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
{
@@ -104,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/dosbox.cpp b/audio/softsynth/opl/dosbox.cpp
index e039845b8f..a1a736f9de 100644
--- a/audio/softsynth/opl/dosbox.cpp
+++ b/audio/softsynth/opl/dosbox.cpp
@@ -247,7 +247,7 @@ byte OPL::read(int port) {
}
void OPL::writeReg(int r, int v) {
- byte tempReg = 0;
+ int tempReg = 0;
switch (_type) {
case Config::kOpl2:
case Config::kDualOpl2:
@@ -257,12 +257,27 @@ void OPL::writeReg(int r, int v) {
// Backup old setup register
tempReg = _reg.normal;
- // We need to set the register we want to write to via port 0x388
- write(0x388, r);
- // Do the real writing to the register
- write(0x389, v);
+ // We directly allow writing to secondary OPL3 registers by using
+ // register values >= 0x100.
+ if (_type == Config::kOpl3 && r >= 0x100) {
+ // We need to set the register we want to write to via port 0x222,
+ // since we want to write to the secondary register set.
+ write(0x222, r);
+ // Do the real writing to the register
+ write(0x223, v);
+ } else {
+ // We need to set the register we want to write to via port 0x388
+ write(0x388, r);
+ // Do the real writing to the register
+ write(0x389, v);
+ }
+
// Restore the old register
- write(0x388, tempReg);
+ if (_type == Config::kOpl3 && tempReg >= 0x100) {
+ write(0x222, tempReg & ~0x100);
+ } else {
+ write(0x388, tempReg);
+ }
break;
};
}
diff --git a/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/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index 0afc6af991..76c3998862 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -110,7 +110,7 @@ public:
/**
* Initialize the specified CD drive for audio playback.
* @param drive the drive id
- * @return true if the CD drive was inited succesfully
+ * @return true if the CD drive was inited successfully
*/
virtual bool openCD(int drive) = 0;
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 99d12c73dc..38a0c8d46f 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -51,6 +51,8 @@ DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
// Reset key repeat
_currentKeyDown.keycode = 0;
+ _currentKeyDown.ascii = 0;
+ _currentKeyDown.flags = 0;
#ifdef ENABLE_VKEYBD
_vk = new Common::VirtualKeyboard();
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 54e3958972..2b66a6e6e1 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -100,7 +100,7 @@ public:
* @param mode Mode to use while listing the directory.
* @param hidden Whether to include hidden files or not in the results.
*
- * @return true if succesful, false otherwise (e.g. when the directory does not exist).
+ * @return true if successful, false otherwise (e.g. when the directory does not exist).
*/
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const = 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/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index fed02ef22e..c5605cae87 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -460,6 +460,10 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {
_activeFullscreenMode = -2;
setFullscreenMode(!isFullscreen);
}
+
+ // HACK: We need to force a refresh here, since we change the
+ // fullscreen mode.
+ _transactionDetails.needRefresh = true;
endGFXTransaction();
// Ignore resize events for the next 10 frames
diff --git a/backends/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/keymapper/keymapper.h b/backends/keymapper/keymapper.h
index 1e8d1c08c3..a54a2acbdc 100644
--- a/backends/keymapper/keymapper.h
+++ b/backends/keymapper/keymapper.h
@@ -128,7 +128,7 @@ public:
* @param name name of the keymap to push
* @param transparent if true keymapper will iterate down the
* stack if it cannot find a key in the new map
- * @return true if succesful
+ * @return true if successful
*/
bool pushKeymap(const String& name, bool transparent = false);
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/midi/seq.cpp b/backends/midi/seq.cpp
index 4efad9ceae..37986520bf 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -88,12 +88,9 @@ int MidiDriver_SEQ::open() {
device = ::open((device_name), O_RDWR, 0);
- if ((device_name == NULL) || (device < 0)) {
- if (device_name == NULL)
- warning("Opening /dev/null (no music will be heard) ");
- else
- warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard) ",
- device_name);
+ if (device < 0) {
+ warning("Cannot open rawmidi device %s - using /dev/null (no music will be heard)",
+ device_name);
device = (::open(("/dev/null"), O_RDWR, 0));
if (device < 0)
error("Cannot open /dev/null to dump midi output");
@@ -145,7 +142,7 @@ void MidiDriver_SEQ::send(uint32 b) {
buf[position++] = 0;
break;
default:
- warning("MidiDriver_SEQ::send: unknown : %08x", (int)b);
+ warning("MidiDriver_SEQ::send: unknown: %08x", (int)b);
break;
}
if (write(device, buf, position) == -1)
diff --git a/backends/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.cpp b/backends/platform/android/android.cpp
index 0b31ee717c..f06e4be19e 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -116,7 +116,7 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
_screen_changeid(0),
_egl_surface_width(0),
_egl_surface_height(0),
- _htc_fail(false),
+ _htc_fail(true),
_force_redraw(false),
_game_texture(0),
_overlay_texture(0),
@@ -162,10 +162,10 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
getSystemProperty("ro.product.cpu.abi").c_str());
mf.toLowercase();
- _htc_fail = mf.contains("htc");
+ /*_htc_fail = mf.contains("htc");
if (_htc_fail)
- LOGI("Enabling HTC workaround");
+ LOGI("Enabling HTC workaround");*/
}
OSystem_Android::~OSystem_Android() {
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 4b13ca4b0f..5f2f40b726 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -234,7 +234,7 @@ private:
int _fingersDown;
void clipMouse(Common::Point &p);
- void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true);
+ void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true, bool touchpadMode = false);
void updateEventScale();
void disableCursorPalette();
diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index 9292a16595..f498c671de 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -10,6 +10,7 @@ JAVA_FILES = \
ScummVMApplication.java \
ScummVMActivity.java \
EditableSurfaceView.java \
+ MouseHelper.java \
Unpacker.java
JAVA_FILES_PLUGIN = \
@@ -47,15 +48,9 @@ APKBUILDER = $(ANDROID_SDK)/tools/apkbuilder
JAVAC ?= javac
JAVACFLAGS = -source 1.5 -target 1.5
-# This is a bit silly. I want to compile against the 1.6 android.jar,
-# to make the compiler check that I don't use something that requires
-# a newer Android. However, in order to use android:installLocation,
-# we need to give aapt a version >=8 android.jar - even though the
-# result will work ok on 1.5+.
-ANDROID_JAR = $(ANDROID_SDK)/platforms/android-4/android.jar
-ANDROID_JAR8 = $(ANDROID_SDK)/platforms/android-8/android.jar
+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
@@ -92,9 +87,9 @@ $(FILE_MANIFEST): $(FILE_MANIFEST_SRC)
@$(MKDIR) -p $(@D)
sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@
-$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
+$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR)
@$(MKDIR) -p $(PATH_GEN_TOP)
- $(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8)
+ $(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR)
$(PATH_CLASSES_MAIN)/%.class: $(PATH_GEN)/%.java $(SRC_GEN)
@$(MKDIR) -p $(@D)
@@ -127,13 +122,13 @@ $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scum
@$(MKDIR) -p $(@D)
$(CP) $< $@
-$(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA)
+$(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA)
$(INSTALL) -d $(PATH_BUILD_ASSETS)
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(PATH_BUILD_ASSETS)/
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; \
@@ -141,10 +136,10 @@ $(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FIL
zip -r ../`basename $$i` *; \
done
@$(RM) -rf $(PATH_BUILD_ASSETS)/tmp
- $(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@
+ $(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR) -F $@
-$(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR8)
- $(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR8) -F $@
+$(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR)
+ $(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR) -F $@
# Package installer won't delete old libscummvm.so on upgrade so
# replace it with a zero size file
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index 14840de996..da378fb082 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -97,7 +97,9 @@ JavaInputStream::JavaInputStream(JNIEnv *env, jobject is) :
{
_input_stream = env->NewGlobalRef(is);
_buflen = 8192;
- _buf = (jbyteArray)env->NewGlobalRef(env->NewByteArray(_buflen));
+ jobject buf = env->NewByteArray(_buflen);
+ _buf = (jbyteArray)env->NewGlobalRef(buf);
+ env->DeleteLocalRef(buf);
jclass cls = env->GetObjectClass(_input_stream);
MID_mark = env->GetMethodID(cls, "mark", "(I)V");
@@ -112,6 +114,7 @@ JavaInputStream::JavaInputStream(JNIEnv *env, jobject is) :
assert(MID_reset);
MID_skip = env->GetMethodID(cls, "skip", "(J)J");
assert(MID_skip);
+ env->DeleteLocalRef(cls);
// Mark start of stream, so we can reset back to it.
// readlimit is set to something bigger than anything we might
@@ -142,7 +145,9 @@ uint32 JavaInputStream::read(void *dataPtr, uint32 dataSize) {
_buflen = dataSize;
env->DeleteGlobalRef(_buf);
- _buf = static_cast<jbyteArray>(env->NewGlobalRef(env->NewByteArray(_buflen)));
+ jobject buf = env->NewByteArray(_buflen);
+ _buf = static_cast<jbyteArray>(env->NewGlobalRef(buf));
+ env->DeleteLocalRef(buf);
}
jint ret = env->CallIntMethod(_input_stream, MID_read, _buf, 0, dataSize);
@@ -290,6 +295,7 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) :
jclass cls = env->GetObjectClass(_assetfd);
MID_close = env->GetMethodID(cls, "close", "()V");
assert(MID_close);
+ env->DeleteLocalRef(cls);
jmethodID MID_getStartOffset =
env->GetMethodID(cls, "getStartOffset", "()J");
@@ -311,8 +317,10 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) :
jclass fd_cls = env->GetObjectClass(javafd);
jfieldID FID_descriptor = env->GetFieldID(fd_cls, "descriptor", "I");
assert(FID_descriptor);
+ env->DeleteLocalRef(fd_cls);
_fd = env->GetIntField(javafd, FID_descriptor);
+ env->DeleteLocalRef(javafd);
}
AssetFdReadStream::~AssetFdReadStream() {
@@ -382,6 +390,7 @@ AndroidAssetArchive::AndroidAssetArchive(jobject am) {
MID_list = env->GetMethodID(cls, "list",
"(Ljava/lang/String;)[Ljava/lang/String;");
assert(MID_list);
+ env->DeleteLocalRef(cls);
}
AndroidAssetArchive::~AndroidAssetArchive() {
@@ -452,7 +461,9 @@ int AndroidAssetArchive::listMembers(Common::ArchiveMemberList &member_list) con
member_list.push_back(getMember(thispath));
++count;
} else {
- dirlist.push_back(thispath);
+ // AssetManager is ridiculously slow and we don't care
+ // about subdirectories at the moment, so ignore them.
+ // dirlist.push_back(thispath);
}
}
@@ -481,8 +492,10 @@ Common::SeekableReadStream *AndroidAssetArchive::createReadStreamForMember(const
env->ExceptionClear();
else if (afd != 0) {
// success :)
+ Common::SeekableReadStream *stream = new AssetFdReadStream(env, afd);
env->DeleteLocalRef(jpath);
- return new AssetFdReadStream(env, afd);
+ env->DeleteLocalRef(afd);
+ return stream;
}
// ... and fallback to normal open() if that doesn't work
@@ -498,7 +511,10 @@ Common::SeekableReadStream *AndroidAssetArchive::createReadStreamForMember(const
return 0;
}
- return new JavaInputStream(env, is);
+ Common::SeekableReadStream *stream = new JavaInputStream(env, is);
+ env->DeleteLocalRef(jpath);
+ env->DeleteLocalRef(is);
+ return stream;
}
#endif
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 21d2344fa7..db1261e432 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -59,6 +59,11 @@ enum {
JE_DOUBLE_TAP = 6,
JE_MULTI = 7,
JE_BALL = 8,
+ JE_LMB_DOWN = 9,
+ JE_LMB_UP = 10,
+ JE_RMB_DOWN = 11,
+ JE_RMB_UP = 12,
+ JE_MOUSE_MOVE = 13,
JE_QUIT = 0x1000
};
@@ -272,7 +277,7 @@ void OSystem_Android::clipMouse(Common::Point &p) {
}
void OSystem_Android::scaleMouse(Common::Point &p, int x, int y,
- bool deductDrawRect) {
+ bool deductDrawRect, bool touchpadMode) {
const GLESBaseTexture *tex;
if (_show_overlay)
@@ -282,7 +287,7 @@ void OSystem_Android::scaleMouse(Common::Point &p, int x, int y,
const Common::Rect &r = tex->getDrawRect();
- if (_touchpad_mode) {
+ if (touchpadMode) {
x = x * 100 / _touchpad_scale;
y = y * 100 / _touchpad_scale;
}
@@ -327,11 +332,16 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
}
switch (arg2) {
+
+ // special case. we'll only get it's up event
case JKEYCODE_BACK:
e.kbd.keycode = Common::KEYCODE_ESCAPE;
e.kbd.ascii = Common::ASCII_ESCAPE;
lockMutex(_event_queue_lock);
+ e.type = Common::EVENT_KEYDOWN;
+ _event_queue.push(e);
+ e.type = Common::EVENT_KEYUP;
_event_queue.push(e);
unlockMutex(_event_queue_lock);
@@ -554,7 +564,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
}
scaleMouse(e.mouse, arg3 - _touch_pt_scroll.x,
- arg4 - _touch_pt_scroll.y, false);
+ arg4 - _touch_pt_scroll.y, false, true);
e.mouse += _touch_pt_down;
clipMouse(e.mouse);
} else {
@@ -652,7 +662,7 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
if (_touchpad_mode) {
scaleMouse(e.mouse, arg1 - _touch_pt_dt.x,
- arg2 - _touch_pt_dt.y, false);
+ arg2 - _touch_pt_dt.y, false, true);
e.mouse += _touch_pt_down;
clipMouse(e.mouse);
@@ -757,6 +767,66 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
return;
+ case JE_MOUSE_MOVE:
+ e.type = Common::EVENT_MOUSEMOVE;
+
+ scaleMouse(e.mouse, arg1, arg2);
+ clipMouse(e.mouse);
+
+ lockMutex(_event_queue_lock);
+ _event_queue.push(e);
+ unlockMutex(_event_queue_lock);
+
+ return;
+
+ case JE_LMB_DOWN:
+ e.type = Common::EVENT_LBUTTONDOWN;
+
+ scaleMouse(e.mouse, arg1, arg2);
+ clipMouse(e.mouse);
+
+ lockMutex(_event_queue_lock);
+ _event_queue.push(e);
+ unlockMutex(_event_queue_lock);
+
+ return;
+
+ case JE_LMB_UP:
+ e.type = Common::EVENT_LBUTTONUP;
+
+ scaleMouse(e.mouse, arg1, arg2);
+ clipMouse(e.mouse);
+
+ lockMutex(_event_queue_lock);
+ _event_queue.push(e);
+ unlockMutex(_event_queue_lock);
+
+ return;
+
+ case JE_RMB_DOWN:
+ e.type = Common::EVENT_RBUTTONDOWN;
+
+ scaleMouse(e.mouse, arg1, arg2);
+ clipMouse(e.mouse);
+
+ lockMutex(_event_queue_lock);
+ _event_queue.push(e);
+ unlockMutex(_event_queue_lock);
+
+ return;
+
+ case JE_RMB_UP:
+ e.type = Common::EVENT_RBUTTONUP;
+
+ scaleMouse(e.mouse, arg1, arg2);
+ clipMouse(e.mouse);
+
+ lockMutex(_event_queue_lock);
+ _event_queue.push(e);
+ unlockMutex(_event_queue_lock);
+
+ return;
+
case JE_QUIT:
e.type = Common::EVENT_QUIT;
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index a7ebb87651..2b738dd63f 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -603,10 +603,10 @@ void JNI::setPause(JNIEnv *env, jobject self, jboolean value) {
g_engine->pauseEngine(value);
- if (value &&
+ /*if (value &&
g_engine->hasFeature(Engine::kSupportsSavingDuringRuntime) &&
g_engine->canSaveGameStateCurrently())
- g_engine->saveGameState(0, "Android parachute");
+ g_engine->saveGameState(0, "Android parachute");*/
}
pause = value;
diff --git a/backends/platform/android/org/scummvm/scummvm/MouseHelper.java b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java
new file mode 100644
index 0000000000..999815593f
--- /dev/null
+++ b/backends/platform/android/org/scummvm/scummvm/MouseHelper.java
@@ -0,0 +1,129 @@
+package org.scummvm.scummvm;
+
+import android.view.InputDevice;
+import android.view.MotionEvent;
+import android.view.SurfaceView;
+import android.view.View;
+
+/**
+ * Contains helper methods for mouse/hover events that were introduced in Android 4.0.
+ */
+public class MouseHelper {
+ private View.OnHoverListener _listener;
+ private ScummVM _scummvm;
+ private long _rmbGuardTime;
+ private boolean _rmbPressed;
+ private boolean _lmbPressed;
+
+ /**
+ * Class initialization fails when this throws an exception.
+ * Checking hover availability is done on static class initialization for Android 1.6 compatibility.
+ */
+ static {
+ try {
+ Class.forName("android.view.View$OnHoverListener");
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ /**
+ * Calling this forces class initialization
+ */
+ public static void checkHoverAvailable() {}
+
+ public MouseHelper(ScummVM scummvm) {
+ _scummvm = scummvm;
+ _listener = createListener();
+ }
+
+ private View.OnHoverListener createListener() {
+ return new View.OnHoverListener() {
+ @Override
+ public boolean onHover(View view, MotionEvent e) {
+ return onMouseEvent(e, true);
+ }
+ };
+ }
+
+ public void attach(SurfaceView main_surface) {
+ main_surface.setOnHoverListener(_listener);
+ }
+
+ public static boolean isMouse(MotionEvent e) {
+ if (e == null) {
+ return false;
+ }
+
+ InputDevice device = e.getDevice();
+
+ if (device == null) {
+ return false;
+ }
+
+ int sources = device.getSources();
+
+ return ((sources & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) ||
+ ((sources & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS) ||
+ ((sources & InputDevice.SOURCE_TOUCHPAD) == InputDevice.SOURCE_TOUCHPAD);
+ }
+
+ public boolean onMouseEvent(MotionEvent e, boolean hover) {
+ _scummvm.pushEvent(ScummVMEvents.JE_MOUSE_MOVE, (int)e.getX(), (int)e.getY(), 0, 0, 0);
+
+ int buttonState = e.getButtonState();
+
+ boolean lmbDown = (buttonState & MotionEvent.BUTTON_PRIMARY) == MotionEvent.BUTTON_PRIMARY;
+
+ if (!hover && e.getAction() != MotionEvent.ACTION_UP && buttonState == 0) {
+ // On some device types, ButtonState is 0 even when tapping on the touchpad or using the stylus on the screen etc.
+ lmbDown = true;
+ }
+
+ if (lmbDown) {
+ if (!_lmbPressed) {
+ // left mouse button was pressed just now
+ _scummvm.pushEvent(ScummVMEvents.JE_LMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0);
+ }
+
+ _lmbPressed = true;
+ } else {
+ if (_lmbPressed) {
+ // left mouse button was released just now
+ _scummvm.pushEvent(ScummVMEvents.JE_LMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0);
+ }
+
+ _lmbPressed = false;
+ }
+
+ boolean rmbDown = (buttonState & MotionEvent.BUTTON_SECONDARY) == MotionEvent.BUTTON_SECONDARY;
+ if (rmbDown) {
+ if (!_rmbPressed) {
+ // right mouse button was pressed just now
+ _scummvm.pushEvent(ScummVMEvents.JE_RMB_DOWN, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0);
+ }
+
+ _rmbPressed = true;
+ } else {
+ if (_rmbPressed) {
+ // right mouse button was released just now
+ _scummvm.pushEvent(ScummVMEvents.JE_RMB_UP, (int)e.getX(), (int)e.getY(), e.getButtonState(), 0, 0);
+ _rmbGuardTime = System.currentTimeMillis();
+ }
+
+ _rmbPressed = false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks whether right mouse button is pressed or was pressed just previously. This is used to prevent sending
+ * extra back key on right mouse click which is the default behaviour in some platforms.
+ *
+ * @return true if right mouse button is (or was in the last 200ms) pressed
+ */
+ public boolean getRmbGuard() {
+ return _rmbPressed || _rmbGuardTime + 200 > System.currentTimeMillis();
+ }
+}
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index fbd6513761..829a948435 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -18,6 +18,18 @@ import java.io.File;
public class ScummVMActivity extends Activity {
+ /* Establish whether the hover events are available */
+ private static boolean _hoverAvailable;
+
+ static {
+ try {
+ MouseHelper.checkHoverAvailable(); // this throws exception if we're on too old version
+ _hoverAvailable = true;
+ } catch (Throwable t) {
+ _hoverAvailable = false;
+ }
+ }
+
private class MyScummVM extends ScummVM {
private boolean usingSmallScreen() {
// Multiple screen sizes came in with Android 1.6. Have
@@ -94,6 +106,7 @@ public class ScummVMActivity extends Activity {
private MyScummVM _scummvm;
private ScummVMEvents _events;
+ private MouseHelper _mouseHelper;
private Thread _scummvm_thread;
@Override
@@ -147,11 +160,16 @@ public class ScummVMActivity extends Activity {
"ScummVM",
"--config=" + getFileStreamPath("scummvmrc").getPath(),
"--path=" + Environment.getExternalStorageDirectory().getPath(),
- "--gui-theme=scummmodern",
"--savepath=" + savePath
});
- _events = new ScummVMEvents(this, _scummvm);
+ Log.d(ScummVM.LOG_TAG, "Hover available: " + _hoverAvailable);
+ if (_hoverAvailable) {
+ _mouseHelper = new MouseHelper(_scummvm);
+ _mouseHelper.attach(main_surface);
+ }
+
+ _events = new ScummVMEvents(this, _scummvm, _mouseHelper);
main_surface.setOnKeyListener(_events);
main_surface.setOnTouchListener(_events);
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
index 86227b9352..5f51ffac6c 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
@@ -2,7 +2,6 @@ package org.scummvm.scummvm;
import android.os.Handler;
import android.os.Message;
-import android.util.Log;
import android.content.Context;
import android.view.KeyEvent;
import android.view.KeyCharacterMap;
@@ -27,16 +26,23 @@ public class ScummVMEvents implements
public static final int JE_DOUBLE_TAP = 6;
public static final int JE_MULTI = 7;
public static final int JE_BALL = 8;
+ public static final int JE_LMB_DOWN = 9;
+ public static final int JE_LMB_UP = 10;
+ public static final int JE_RMB_DOWN = 11;
+ public static final int JE_RMB_UP = 12;
+ public static final int JE_MOUSE_MOVE = 13;
public static final int JE_QUIT = 0x1000;
final protected Context _context;
final protected ScummVM _scummvm;
final protected GestureDetector _gd;
final protected int _longPress;
+ final protected MouseHelper _mouseHelper;
- public ScummVMEvents(Context context, ScummVM scummvm) {
+ public ScummVMEvents(Context context, ScummVM scummvm, MouseHelper mouseHelper) {
_context = context;
_scummvm = scummvm;
+ _mouseHelper = mouseHelper;
_gd = new GestureDetector(context, this);
_gd.setOnDoubleTapListener(this);
@@ -64,7 +70,7 @@ public class ScummVMEvents implements
public void handleMessage(Message msg) {
if (msg.what == MSG_MENU_LONG_PRESS) {
InputMethodManager imm = (InputMethodManager)
- _context.getSystemService(_context.INPUT_METHOD_SERVICE);
+ _context.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null)
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
@@ -73,9 +79,30 @@ public class ScummVMEvents implements
};
// OnKeyListener
+ @Override
final public boolean onKey(View v, int keyCode, KeyEvent e) {
final int action = e.getAction();
+ if (keyCode == 238) {
+ // this (undocumented) event is sent when ACTION_HOVER_ENTER or ACTION_HOVER_EXIT occurs
+ return false;
+ }
+
+ if (keyCode == KeyEvent.KEYCODE_BACK) {
+ if (action != KeyEvent.ACTION_UP) {
+ // only send event from back button on up event, since down event is sent on right mouse click and
+ // cannot be caught (thus rmb click would send escape key first)
+ return true;
+ }
+
+ if (_mouseHelper != null) {
+ if (_mouseHelper.getRmbGuard()) {
+ // right mouse button was just clicked which sends an extra back button press
+ return true;
+ }
+ }
+ }
+
if (e.isSystem()) {
// filter what we handle
switch (keyCode) {
@@ -160,7 +187,16 @@ public class ScummVMEvents implements
}
// OnTouchListener
+ @Override
final public boolean onTouch(View v, MotionEvent e) {
+ if (_mouseHelper != null) {
+ boolean isMouse = MouseHelper.isMouse(e);
+ if (isMouse) {
+ // mouse button is pressed
+ return _mouseHelper.onMouseEvent(e, false);
+ }
+ }
+
final int action = e.getAction();
// constants from APIv5:
@@ -177,11 +213,13 @@ public class ScummVMEvents implements
}
// OnGestureListener
+ @Override
final public boolean onDown(MotionEvent e) {
_scummvm.pushEvent(JE_DOWN, (int)e.getX(), (int)e.getY(), 0, 0, 0);
return true;
}
+ @Override
final public boolean onFling(MotionEvent e1, MotionEvent e2,
float velocityX, float velocityY) {
//Log.d(ScummVM.LOG_TAG, String.format("onFling: %s -> %s (%.3f %.3f)",
@@ -191,10 +229,12 @@ public class ScummVMEvents implements
return true;
}
+ @Override
final public void onLongPress(MotionEvent e) {
// disabled, interferes with drag&drop
}
+ @Override
final public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
_scummvm.pushEvent(JE_SCROLL, (int)e1.getX(), (int)e1.getY(),
@@ -203,9 +243,11 @@ public class ScummVMEvents implements
return true;
}
+ @Override
final public void onShowPress(MotionEvent e) {
}
+ @Override
final public boolean onSingleTapUp(MotionEvent e) {
_scummvm.pushEvent(JE_TAP, (int)e.getX(), (int)e.getY(),
(int)(e.getEventTime() - e.getDownTime()), 0, 0);
@@ -214,10 +256,12 @@ public class ScummVMEvents implements
}
// OnDoubleTapListener
+ @Override
final public boolean onDoubleTap(MotionEvent e) {
return true;
}
+ @Override
final public boolean onDoubleTapEvent(MotionEvent e) {
_scummvm.pushEvent(JE_DOUBLE_TAP, (int)e.getX(), (int)e.getY(),
e.getAction(), 0, 0);
@@ -225,6 +269,7 @@ public class ScummVMEvents implements
return true;
}
+ @Override
final public boolean onSingleTapConfirmed(MotionEvent e) {
return true;
}
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/iphone_video.mm b/backends/platform/iphone/iphone_video.mm
index 2ae1b0e692..0bfae30fc7 100644
--- a/backends/platform/iphone/iphone_video.mm
+++ b/backends/platform/iphone/iphone_video.mm
@@ -161,9 +161,9 @@ const char *iPhone_getDocumentsDir() {
- (id)initWithFrame:(struct CGRect)frame {
self = [super initWithFrame: frame];
- if ([[UIScreen mainScreen] respondsToSelector: NSSelectorFromString(@"scale")]) {
- if ([self respondsToSelector: NSSelectorFromString(@"contentScaleFactor")]) {
- //self.contentScaleFactor = [[UIScreen mainScreen] scale];
+ if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) {
+ if ([self respondsToSelector:@selector(setContentScaleFactor:)]) {
+ [self setContentScaleFactor:[[UIScreen mainScreen] scale]];
}
}
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/maemo/debian/changelog b/backends/platform/maemo/debian/changelog
index ea44574e96..568edd0282 100644
--- a/backends/platform/maemo/debian/changelog
+++ b/backends/platform/maemo/debian/changelog
@@ -1,8 +1,14 @@
-scummvm (1.6.0~git) unstable; urgency=low
+scummvm (1.7.0~git) unstable; urgency=low
* Development snapshot
- -- Tarek Soliman <tsoliman@scummvm.org> Tue, 10 Jul 2012 23:02:00 -0500
+ -- Tarek Soliman <tsoliman@scummvm.org> Sat, 01 Jun 2013 21:03:52 -0500
+
+scummvm (1.6.0) unstable; urgency=low
+
+ * 1.6.0 release
+
+ -- Tarek Soliman <tsoliman@scummvm.org> Fri, 31 May 2013 23:02:00 -0500
scummvm (1.5.0) unstable; urgency=low
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 249f72d8fc..bc6b3cb1a5 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -104,9 +104,7 @@ protected:
bool _cursorPaletteDisabled;
bool _dirtyPalette;
- // FIXME: This must be left as "int" for now, to fix the sign-comparison problem
- // there is a little more work involved than an int->uint change
- int _cursorWidth, _cursorHeight;
+ uint _cursorWidth, _cursorHeight;
int _cursorKeycolor;
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 7d6f8f0b5c..1e2aca9e51 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -100,8 +100,8 @@ OSystem_N64::OSystem_N64() {
_cursor_pal = NULL;
_cursor_hic = NULL;
- _cursorWidth = -1;
- _cursorHeight = -1;
+ _cursorWidth = 0;
+ _cursorHeight = 0;
_cursorKeycolor = -1;
_mouseHotspotX = _mouseHotspotY = -1;
@@ -575,19 +575,20 @@ void OSystem_N64::updateScreen() {
horiz_pix_skip = skip_pixels;
}
- int mX = _mouseX - _mouseHotspotX;
- int mY = _mouseY - _mouseHotspotY;
+ for (uint h = 0; h < _cursorHeight; h++) {
+ for (uint w = 0; w < _cursorWidth; w++) {
+ int posX = (_mouseX - _mouseHotspotX) + w;
+ int posY = (_mouseY - _mouseHotspotY) + h;
- for (int h = 0; h < _cursorHeight; h++)
- for (int w = 0; w < _cursorWidth; w++) {
// Draw pixel
- if (((mY + h) >= 0) && ((mY + h) < _mouseMaxY) && ((mX + w) >= 0) && ((mX + w) < _mouseMaxX)) {
+ if ((posY >= 0) && (posY < _mouseMaxY) && (posX >= 0) && (posX < _mouseMaxX)) {
uint16 cursor_pixel_hic = _cursor_hic[(h * _cursorWidth) + w];
if (!(cursor_pixel_hic & 0x00001))
- mouse_framebuffer[((mY + h) * _frameBufferWidth) + ((mX + w) + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
+ mouse_framebuffer[(posY * _frameBufferWidth) + (posX + _offscrPixels + horiz_pix_skip)] = cursor_pixel_hic;
}
}
+ }
}
#ifndef _ENABLE_DEBUG_
@@ -724,7 +725,7 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in
uint16 *dst = _overlayBuffer + (y * _overlayWidth + x);
- if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+ if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {
memcpy(dst, src, h * pitch);
} else {
do {
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index f93166ef67..e818305c29 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -102,8 +102,7 @@ int vblankEndHandler(int cause) {
void createAnimThread(Gs2dScreen *screen);
-Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
-
+Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode mode) {
_systemQuit = false;
ee_sema_t newSema;
newSema.init_count = 1;
@@ -118,7 +117,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_vblankStartId = AddIntcHandler(INT_VBLANK_START, vblankStartHandler, 0);
_vblankEndId = AddIntcHandler(INT_VBLANK_END, vblankEndHandler, 0);
- _dmacId = AddDmacHandler(2, dmacHandler, 0);
+ _dmacId = AddDmacHandler(2, dmacHandler, 0);
_dmaPipe = new DmaPipe(0x2000);
@@ -139,7 +138,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clut[1] = GS_RGBA(0xC0, 0xC0, 0xC0, 0);
clearOverlay();
- if (tvMode == TV_DONT_CARE) {
+ if (mode == TV_DONT_CARE) {
#if 1
char romver[8];
int fd = fioOpen("rom0:ROMVER", O_RDONLY);
@@ -157,12 +156,12 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_tvMode = TV_NTSC;
#endif
} else
- _tvMode = tvMode;
+ _tvMode = mode;
// _tvMode = TV_NTSC;
printf("Setting up %s mode\n", (_tvMode == TV_PAL) ? "PAL" : "NTSC");
- // set screen size, 640x512 for pal, 640x448 for ntsc
+ // set screen size, 640x512 for pal, 640x448 for ntsc
_tvWidth = 640;
_tvHeight = ((_tvMode == TV_PAL) ? 512 /*544*/ : 448);
kFullScreen[0].z = kFullScreen[1].z = 0;
@@ -186,8 +185,8 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clutPtrs[MOUSE] = _clutPtrs[SCREEN] + 0x1000; // the cluts in PSMCT32 take up half a memory page each
_clutPtrs[TEXT] = _clutPtrs[SCREEN] + 0x2000;
_texPtrs[SCREEN] = _clutPtrs[SCREEN] + 0x3000;
- _texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
- _texPtrs[MOUSE] = 128 * 256 * 4;
+ _texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
+ _texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[PRINTF] = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;
_showOverlay = false;
@@ -201,14 +200,14 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_overlayFormat.bytesPerPixel = 2;
_overlayFormat.rLoss = 3;
- _overlayFormat.gLoss = 3;
- _overlayFormat.bLoss = 3;
- _overlayFormat.aLoss = 7;
+ _overlayFormat.gLoss = 3;
+ _overlayFormat.bLoss = 3;
+ _overlayFormat.aLoss = 7;
- _overlayFormat.rShift = 0;
- _overlayFormat.gShift = 5;
- _overlayFormat.bShift = 10;
- _overlayFormat.aShift = 15;
+ _overlayFormat.rShift = 0;
+ _overlayFormat.gShift = 5;
+ _overlayFormat.bShift = 10;
+ _overlayFormat.aShift = 15;
// setup hardware now.
GS_CSR = CSR_RESET; // Reset GS
@@ -249,18 +248,18 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
createAnimTextures();
- // create anim thread
- ee_thread_t animThread, thisThread;
+ // create animation thread
+ ee_thread_t animationThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
_animStack = malloc(ANIM_STACK_SIZE);
- animThread.initial_priority = thisThread.current_priority - 3;
- animThread.stack = _animStack;
- animThread.stack_size = ANIM_STACK_SIZE;
- animThread.func = (void *)runAnimThread;
- animThread.gp_reg = &_gp;
+ animationThread.initial_priority = thisThread.current_priority - 3;
+ animationThread.stack = _animStack;
+ animationThread.stack_size = ANIM_STACK_SIZE;
+ animationThread.func = (void *)runAnimThread;
+ animationThread.gp_reg = &_gp;
- _animTid = CreateThread(&animThread);
+ _animTid = CreateThread(&animationThread);
assert(_animTid >= 0);
StartThread(_animTid, this);
}
@@ -268,13 +267,13 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
void Gs2dScreen::quit(void) {
_systemQuit = true;
ee_thread_t statAnim;
- do { // wait until thread called ExitThread()
+ do { // wait until thread called ExitThread()
SignalSema(g_AnimSema);
ReferThreadStatus(_animTid, &statAnim);
} while (statAnim.status != 0x10);
DeleteThread(_animTid);
free(_animStack);
- _dmaPipe->waitForDma(); // wait for dmac and vblank for the last time
+ _dmaPipe->waitForDma(); // wait for dmac and vblank for the last time
while (g_DmacCmd || g_VblankCmd);
sioprintf("kill handlers\n");
@@ -606,7 +605,7 @@ void Gs2dScreen::grabOverlay(byte *buf, uint16 pitch) {
for (uint32 cnt = 0; cnt < _height; cnt++) {
memcpy(buf, src, _width * 2);
buf += pitch;
- src += _width;
+ src += _width;
}
}
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 005dabc809..1a70dad170 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -29,7 +29,6 @@
#include "backends/platform/ps2/DmaPipe.h"
#include "graphics/surface.h"
-
enum TVMode {
TV_DONT_CARE = 0,
TV_PAL,
@@ -41,10 +40,9 @@ enum GsInterlace {
GS_INTERLACED
};
-
class Gs2dScreen {
public:
- Gs2dScreen(uint16 width, uint16 height, TVMode tvMode);
+ Gs2dScreen(uint16 width, uint16 height, TVMode mode);
~Gs2dScreen(void);
void newScreenSize(uint16 width, uint16 height);
uint8 tvMode(void);
@@ -94,27 +92,26 @@ private:
uint8 _curDrawBuf;
uint32 _frameBufPtr[2]; //
- uint32 _clutPtrs[3]; // vram pointers
+ uint32 _clutPtrs[3]; // vram pointers
uint32 _texPtrs[4]; //
Graphics::Surface _framebuffer;
- /* TODO : check if we do need this */
- struct VideoState {
- bool setup;
+ // TODO : check if we do need this
+ struct VideoState {
+ bool setup;
- bool fullscreen;
- bool aspectRatio;
+ bool fullscreen;
+ bool aspectRatio;
- int mode;
- int scaleFactor;
+ int mode;
+ int scaleFactor;
- int screenWidth, screenHeight;
- int overlayWidth, overlayHeight;
- };
+ int screenWidth, screenHeight;
+ int overlayWidth, overlayHeight;
+ };
VideoState _videoMode;
- /* */
uint16 _width, _height, _pitch;
int16 _mouseX, _mouseY, _hotSpotX, _hotSpotY;
diff --git a/backends/platform/ps2/ps2pad.cpp b/backends/platform/ps2/ps2pad.cpp
index b6afc217e6..607b614691 100644
--- a/backends/platform/ps2/ps2pad.cpp
+++ b/backends/platform/ps2/ps2pad.cpp
@@ -51,6 +51,9 @@ void Ps2Pad::initPad(void) {
} else {
if (checkPadReady(_port, _slot)) {
switch (_padStatus) {
+ case STAT_NONE:
+ printf("Pad Status is None. Shouldn't happen\n");
+ break;
case STAT_OPEN:
_padStatus = STAT_DETECT;
break;
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index 969459dc5b..18833d9f23 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 1.6.0git README
+ScummVM-PSP 1.7.0git README
==============================================================================
Installation
diff --git a/backends/platform/psp/audio.cpp b/backends/platform/psp/audio.cpp
index 4fab9fdd3f..dcbf0b2239 100644
--- a/backends/platform/psp/audio.cpp
+++ b/backends/platform/psp/audio.cpp
@@ -100,8 +100,6 @@ void PspAudio::threadFunction() {
PSP_DEBUG_PRINT("audio thread unpaused\n");
}
- PSP_DEBUG_PRINT("remaining samples[%d]\n", _remainingSamples);
-
PSP_DEBUG_PRINT("filling buffer[%d]\n", _bufferToFill);
_callback(_userData, _buffers[_bufferToFill], _bufferSize); // ask mixer to fill in data
nextBuffer(_bufferToFill);
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
index 97c7edba3e..0d2a2ab7f2 100644
--- a/backends/platform/sdl/macosx/appmenu_osx.mm
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -35,9 +35,8 @@
- (void)setAppleMenu:(NSMenu *)menu;
@end
-NSString *constructNSStringFromCString(const char* rawCString, NSStringEncoding stringEncoding) {
- NSData *nsData = [NSData dataWithBytes:rawCString length:strlen(rawCString)];
- return [[NSString alloc] initWithData:nsData encoding:stringEncoding];
+NSString *constructNSStringFromCString(const char *rawCString, CFStringEncoding stringEncoding) {
+ return (NSString *)CFStringCreateWithCString(NULL, rawCString, stringEncoding);
}
void replaceApplicationMenuItems() {
@@ -59,11 +58,11 @@ void replaceApplicationMenuItems() {
// Get current encoding
#ifdef USE_TRANSLATION
- nsString = constructNSStringFromCString((TransMan.getCurrentCharset()).c_str(), NSASCIIStringEncoding);
- NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString));
+ nsString = constructNSStringFromCString(TransMan.getCurrentCharset().c_str(), NSASCIIStringEncoding);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)nsString);
[nsString release];
#else
- NSStringEncoding stringEncoding = NSASCIIStringEncoding;
+ CFStringEncoding stringEncoding = kCFStringEncodingASCII;
#endif
// Add "About ScummVM" menu item
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index fb76c111f2..85342d62fd 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -39,7 +39,6 @@
#include "ApplicationServices/ApplicationServices.h" // for LSOpenFSRef
#include "CoreFoundation/CoreFoundation.h" // for CF* stuff
-#include "CoreServices/CoreServices.h" // for FSPathMakeRef
OSystem_MacOSX::OSystem_MacOSX()
:
@@ -107,13 +106,9 @@ bool OSystem_MacOSX::displayLogFile() {
if (_logFilePath.empty())
return false;
- FSRef ref;
- OSStatus err;
-
- err = FSPathMakeRef((const UInt8 *)_logFilePath.c_str(), &ref, NULL);
- if (err == noErr) {
- err = LSOpenFSRef(&ref, NULL);
- }
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)_logFilePath.c_str(), _logFilePath.size(), false);
+ OSStatus err = LSOpenCFURLRef(url, NULL);
+ CFRelease(url);
return err != noErr;
}
diff --git a/backends/platform/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/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index fc0802dd4c..a9bcdbb8d1 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -609,7 +609,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x,
return;
uint16 *dst = _overlayPixels + (y * _overlayWidth + x);
- if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) {
+ if (_overlayWidth == (uint16)w && (uint16)pitch == _overlayWidth * sizeof(uint16)) {
memcpy(dst, src, h * pitch);
} else {
do {
diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp
index 241cf514f3..c8e68b87fd 100644
--- a/backends/platform/wince/CEgui/GUIElement.cpp
+++ b/backends/platform/wince/CEgui/GUIElement.cpp
@@ -98,19 +98,19 @@ bool GUIElement::drawn() {
return _drawn;
}
-int GUIElement::x() {
+int GUIElement::getX() {
return _x;
}
-int GUIElement::y() {
+int GUIElement::getY() {
return _y;
}
-int GUIElement::width() {
+int GUIElement::getWidth() {
return _width;
}
-int GUIElement::height() {
+int GUIElement::getHeight() {
return _height;
}
diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h
index 2639de38ca..44c4b3f275 100644
--- a/backends/platform/wince/CEgui/GUIElement.h
+++ b/backends/platform/wince/CEgui/GUIElement.h
@@ -40,10 +40,10 @@ public:
virtual bool draw(SDL_Surface *surface);
virtual ~GUIElement();
void move(int x, int y);
- int width();
- int height();
- int x();
- int y();
+ int getWidth();
+ int getHeight();
+ int getX();
+ int getY();
virtual bool action(int x, int y, bool pushed) = 0;
bool visible();
bool drawn();
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp
index 6f4ac317cd..f3e42e11fa 100644
--- a/backends/platform/wince/CEgui/ToolbarHandler.cpp
+++ b/backends/platform/wince/CEgui/ToolbarHandler.cpp
@@ -96,10 +96,10 @@ bool ToolbarHandler::draw(SDL_Surface *surface, SDL_Rect *rect) {
if (_active) {
bool result = _active->draw(surface);
if (result) {
- rect->x = _active->x();
- rect->y = _active->y();
- rect->w = _active->width();
- rect->h = _active->height();
+ rect->x = _active->getX();
+ rect->y = _active->getY();
+ rect->w = _active->getWidth();
+ rect->h = _active->getHeight();
}
return result;
} else
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index 741e89891c..f3b221cabf 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -59,10 +59,14 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
[sparkleUpdater setFeedURL:[NSURL URLWithString:feedbackURL]];
// Get current encoding
- NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
+ CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
+ CFRelease(encStr);
// Add "Check for Updates..." menu item
- NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:[NSString stringWithCString:_("Check for Updates...") encoding:stringEncoding] action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1];
+ CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates..."), stringEncoding);
+ NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:(NSString *)title action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1];
+ CFRelease(title);
// Set the target of the new menu item
[updateMenuItem setTarget:sparkleUpdater];
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 44007c494a..42a3a64d34 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];
@@ -198,7 +198,7 @@ void registerDefaults() {
// Game specific
ConfMan.registerDefault("path", "");
- ConfMan.registerDefault("platform", Common::kPlatformPC);
+ ConfMan.registerDefault("platform", Common::kPlatformDOS);
ConfMan.registerDefault("language", "en");
ConfMan.registerDefault("subtitles", false);
ConfMan.registerDefault("boot_param", 0);
@@ -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
}
//
@@ -310,12 +332,19 @@ void registerDefaults() {
continue; \
}
+// End an option handler
+#define END_COMMAND \
+ }
+
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];
}
@@ -341,27 +370,27 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
bool isLongCmd = (s[0] == '-' && s[1] == '-');
DO_COMMAND('h', "help")
- END_OPTION
+ END_COMMAND
DO_COMMAND('v', "version")
- END_OPTION
+ END_COMMAND
DO_COMMAND('t', "list-targets")
- END_OPTION
+ END_COMMAND
DO_COMMAND('z', "list-games")
- END_OPTION
+ END_COMMAND
#ifdef DETECTOR_TESTING_HACK
// HACK FIXME TODO: This command is intentionally *not* documented!
DO_LONG_COMMAND("test-detector")
- END_OPTION
+ END_COMMAND
#endif
#ifdef UPGRADE_ALL_TARGETS_HACK
// HACK FIXME TODO: This command is intentionally *not* documented!
DO_LONG_COMMAND("upgrade-targets")
- END_OPTION
+ END_COMMAND
#endif
DO_LONG_OPTION("list-saves")
@@ -387,7 +416,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
DO_LONG_COMMAND("list-audio-devices")
- END_OPTION
+ END_COMMAND
DO_LONG_OPTION_INT("output-rate")
END_OPTION
@@ -517,7 +546,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
DO_LONG_COMMAND("list-themes")
- END_OPTION
+ END_COMMAND
DO_LONG_OPTION("target-md5")
END_OPTION
@@ -579,8 +608,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/base/internal_version.h b/base/internal_version.h
index 40ed67ceec..11f596df79 100644
--- a/base/internal_version.h
+++ b/base/internal_version.h
@@ -16,4 +16,4 @@
#define SCUMMVM_REVISION
#endif
-#define SCUMMVM_VERSION "1.6.0git" SCUMMVM_REVISION
+#define SCUMMVM_VERSION "1.7.0git" SCUMMVM_REVISION
diff --git a/common/archive.cpp b/common/archive.cpp
index 1323f14805..57ebeb2ca6 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -118,7 +118,7 @@ void SearchSet::addDirectory(const String &name, const FSNode &dir, int priority
add(name, new FSDirectory(dir, depth, flat), priority);
}
-void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority) {
+void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority, int depth, bool flat) {
FSList subDirs;
if (!directory.getChildren(subDirs))
return;
@@ -161,9 +161,9 @@ void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPa
}
if (nextPattern.empty())
- addDirectory(name, *i, priority);
+ addDirectory(name, *i, priority, depth, flat);
else
- addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority);
+ addSubDirectoriesMatching(*i, nextPattern, ignoreCase, priority, depth, flat);
}
}
}
diff --git a/common/archive.h b/common/archive.h
index ffd86d786d..2f9736f032 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -184,8 +184,8 @@ public:
* to assume that this method is using anything other than a simple case insensitive compare.
* Thus do not use any tokens like '*' or '?' in the "caselessName" parameter of this function!
*/
- void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0) {
- addSubDirectoriesMatching(directory, caselessName, true, priority);
+ void addSubDirectoryMatching(const FSNode &directory, const String &caselessName, int priority = 0, int depth = 1, bool flat = false) {
+ addSubDirectoriesMatching(directory, caselessName, true, priority, depth, flat);
}
/**
@@ -208,7 +208,7 @@ public:
*
* @see Common::matchString
*/
- void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0);
+ void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0, int depth = 1, bool flat = false);
/**
* Remove an archive from the searchable set.
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..0ce6dcf0c8 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -226,6 +226,15 @@ bool ConfigFile::saveToStream(WriteStream &stream) {
return !stream.err();
}
+void ConfigFile::addSection(const String &section) {
+ Section *s = getSection(section);
+ if (s)
+ return;
+
+ Section newSection;
+ newSection.name = section;
+ _sections.push_back(newSection);
+}
void ConfigFile::removeSection(const String &section) {
assert(isValidName(section));
@@ -380,4 +389,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..8bba851110 100644
--- a/common/config-file.h
+++ b/common/config-file.h
@@ -106,6 +106,7 @@ public:
bool saveToStream(WriteStream &stream);
bool hasSection(const String &section) const;
+ void addSection(const String &section);
void removeSection(const String &section);
void renameSection(const String &oldName, const String &newName);
@@ -134,6 +135,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/cosinetables.cpp b/common/cosinetables.cpp
index fe8f454e14..3b245750fa 100644
--- a/common/cosinetables.cpp
+++ b/common/cosinetables.cpp
@@ -34,10 +34,10 @@ CosineTable::CosineTable(int bitPrecision) {
int m = 1 << _bitPrecision;
double freq = 2 * M_PI / m;
- _table = new float[m];
+ _table = new float[m / 2];
- // Table contains cos(2*pi*x/n) for 0<=x<=n/4,
- // followed by its reverse
+ // Table contains cos(2*pi*i/m) for 0<=i<m/4,
+ // followed by 3m/4<=i<m
for (int i = 0; i <= m / 4; i++)
_table[i] = cos(i * freq);
diff --git a/common/cosinetables.h b/common/cosinetables.h
index f9fb6fd59a..f5c95ec003 100644
--- a/common/cosinetables.h
+++ b/common/cosinetables.h
@@ -36,7 +36,14 @@ public:
~CosineTable();
/**
- * Get pointer to table
+ * Get pointer to table.
+ *
+ * This table contains 2^bitPrecision/2 entries.
+ * The layout of this table is as follows:
+ * - Entries 0 up to (excluding) 2^bitPrecision/4:
+ * cos(0) till (excluding) cos(1/2*pi)
+ * - Entries 2^bitPrecision/4 up to (excluding) 2^bitPrecision/2:
+ * cos(3/2*pi) till (excluding) cos(2*pi)
*/
const float *getTable() { return _table; }
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/fft.h b/common/fft.h
index bc58f1dded..ef5f6e95ad 100644
--- a/common/fft.h
+++ b/common/fft.h
@@ -67,7 +67,6 @@ private:
Complex *_tmpBuf;
int _splitRadix;
- int _permutation;
static int splitRadixPermutation(int i, int n, int inverse);
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/forbidden.h b/common/forbidden.h
index eec80bba59..9050114442 100644
--- a/common/forbidden.h
+++ b/common/forbidden.h
@@ -333,11 +333,21 @@
#define isalpha(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_iscntrl
+ #undef iscntrl
+ #define iscntrl(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isdigit
#undef isdigit
#define isdigit(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isgraph
+ #undef isgraph
+ #define isgraph(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isnumber
#undef isnumber
#define isnumber(a) FORBIDDEN_SYMBOL_REPLACEMENT
@@ -348,6 +358,16 @@
#define islower(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isprint
+ #undef isprint
+ #define isprint(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_ispunct
+ #undef ispunct
+ #define ispunct(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_isspace
#undef isspace
#define isspace(a) FORBIDDEN_SYMBOL_REPLACEMENT
@@ -358,6 +378,11 @@
#define isupper(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_isxdigit
+ #undef isxdigit
+ #define isxdigit(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
#endif // FORBIDDEN_SYMBOL_EXCEPTION_ctype_h
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_mkdir
diff --git a/common/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/macresman.cpp b/common/macresman.cpp
index f2f020c6de..00562f746a 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -360,8 +360,8 @@ bool MacResManager::load(SeekableReadStream &stream) {
_mapLength = stream.readUint32BE();
// do sanity check
- if (_dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
- _dataLength + _mapLength > (uint32)stream.size()) {
+ if (stream.eos() || _dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
+ _dataLength + _mapLength > (uint32)stream.size()) {
_resForkOffset = -1;
_mode = kResForkNone;
return false;
diff --git a/common/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..20ed970385 100644
--- a/common/platform.cpp
+++ b/common/platform.cpp
@@ -31,7 +31,7 @@ const PlatformDescription g_platforms[] = {
{ "amiga", "ami", "amiga", "Amiga", kPlatformAmiga },
{ "atari", "atari-st", "st", "Atari ST", kPlatformAtariST },
{ "c64", "c64", "c64", "Commodore 64", kPlatformC64 },
- { "pc", "dos", "ibm", "DOS", kPlatformPC },
+ { "pc", "dos", "ibm", "DOS", kPlatformDOS },
{ "pc98", "pc98", "pc98", "PC-98", kPlatformPC98 },
{ "wii", "wii", "wii", "Nintendo Wii", kPlatformWii },
{ "coco3", "coco3", "coco3", "CoCo3", kPlatformCoCo3 },
@@ -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..ac8772fa94 100644
--- a/common/platform.h
+++ b/common/platform.h
@@ -35,7 +35,7 @@ class String;
* game in question.
*/
enum Platform {
- kPlatformPC,
+ kPlatformDOS,
kPlatformAmiga,
kPlatformAtariST,
kPlatformMacintosh,
@@ -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 173d3c6a97..a3efc2b443 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -165,6 +165,8 @@ void QuickTimeParser::initParseTable() {
{ &QuickTimeParser::readWAVE, MKTAG('w', 'a', 'v', 'e') },
{ &QuickTimeParser::readESDS, MKTAG('e', 's', 'd', 's') },
{ &QuickTimeParser::readSMI, MKTAG('S', 'M', 'I', ' ') },
+ { &QuickTimeParser::readDefault, MKTAG('g', 'm', 'h', 'd') },
+ { &QuickTimeParser::readLeaf, MKTAG('g', 'm', 'i', 'n') },
{ 0, 0 }
};
@@ -442,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);
@@ -477,6 +479,8 @@ int QuickTimeParser::readHDLR(Atom atom) {
track->codecType = CODEC_TYPE_VIDEO;
else if (type == MKTAG('s', 'o', 'u', 'n'))
track->codecType = CODEC_TYPE_AUDIO;
+ else if (type == MKTAG('m', 'u', 's', 'i'))
+ track->codecType = CODEC_TYPE_MIDI;
_fd->readUint32BE(); // component manufacture
_fd->readUint32BE(); // component flags
@@ -540,7 +544,7 @@ int QuickTimeParser::readSTSD(Atom atom) {
_fd->readUint16BE(); // reserved
_fd->readUint16BE(); // index
- track->sampleDescs[i] = readSampleDesc(track, format);
+ track->sampleDescs[i] = readSampleDesc(track, format, size - 16);
debug(0, "size=%d 4CC= %s codec_type=%d", size, tag2str(format), track->codecType);
diff --git a/common/quicktime.h b/common/quicktime.h
index 641718e13a..caa92578b1 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -120,7 +120,8 @@ protected:
enum CodecType {
CODEC_TYPE_MOV_OTHER,
CODEC_TYPE_VIDEO,
- CODEC_TYPE_AUDIO
+ CODEC_TYPE_AUDIO,
+ CODEC_TYPE_MIDI
};
struct Track {
@@ -161,7 +162,7 @@ protected:
byte objectTypeMP4;
};
- virtual SampleDesc *readSampleDesc(Track *track, uint32 format) = 0;
+ virtual SampleDesc *readSampleDesc(Track *track, uint32 format, uint32 descSize) = 0;
uint32 _timeScale;
uint32 _duration;
diff --git a/common/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/rdft.h b/common/rdft.h
index 3386940404..76e95c363a 100644
--- a/common/rdft.h
+++ b/common/rdft.h
@@ -20,7 +20,7 @@
*
*/
-// Based on eos' (I)RDFT code which is in turn
+// Based on xoreos' (I)RDFT code which is in turn
// Based upon the (I)RDFT code in FFmpeg
// Copyright (c) 2009 Alex Converse <alex dot converse at gmail dot com>
@@ -44,6 +44,40 @@ namespace Common {
*
* Used in engines:
* - scumm
+ *
+ *
+ * It has four modes:
+ *
+ * Below, n = 1 << bits
+ *
+ * (I)DFT_R2C:
+ * input:
+ * n real floats
+ * output:
+ * n/2 complex floats (stored as real part followed by imag part).
+ *
+ * The output represents the first half of the (I)DFT of the input.
+ * If F is the complex (I)DFT of the input, then
+ * output[0] = F[0] + i * F[n/2] and
+ * output[k] = F[k] for k = 1 .. n/2-1.
+ * Note that F[0] and F[k] are real since the input is real, and
+ * the remaining values of F can be reconstructed from symmetry if desired.
+ *
+ * (I)DFT_C2R:
+ * input:
+ * n/2 complex floats
+ * output:
+ * n real floats
+ *
+ * The input encodes a complex vector x of length n that has the
+ * required symmetry to have a real (I)DFT:
+ * x[0] = Re(input[0])
+ * x[k] = input[k] for k = 1 .. n/2-1
+ * x[n/2] = Im(input[0])
+ * x[k] = conj(input[n-k]) for k = n/2+1 .. n-1
+ * The output is then the real (I)DFT of x, divided by 2.
+ *
+ * TODO: Is this division by 2 intentional?
*/
class RDFT {
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/sinetables.cpp b/common/sinetables.cpp
index a6ec99469d..7338166d39 100644
--- a/common/sinetables.cpp
+++ b/common/sinetables.cpp
@@ -34,15 +34,15 @@ SineTable::SineTable(int bitPrecision) {
int m = 1 << _bitPrecision;
double freq = 2 * M_PI / m;
- _table = new float[m];
+ _table = new float[m / 2];
- // Table contains sin(2*pi*x/n) for 0<=x<=n/4,
- // followed by its reverse
- for (int i = 0; i <= m / 4; i++)
+ // Table contains sin(2*pi*i/m) for 0<=i<m/4,
+ // followed by m/2<=i<3m/4
+ for (int i = 0; i < m / 4; i++)
_table[i] = sin(i * freq);
- for (int i = 1; i < m / 4; i++)
- _table[m / 2 - i] = _table[i];
+ for (int i = 0; i < m / 4; i++)
+ _table[m / 4 + i] = -_table[i];
}
SineTable::~SineTable() {
diff --git a/common/sinetables.h b/common/sinetables.h
index 16e203f26d..3489663661 100644
--- a/common/sinetables.h
+++ b/common/sinetables.h
@@ -37,6 +37,13 @@ public:
/**
* Get pointer to table
+ *
+ * This table contains 2^bitPrecision/2 entries.
+ * The layout of this table is as follows:
+ * - Entries 0 up to (excluding) 2^bitPrecision/4:
+ * sin(0) till (excluding) sin(1/2*pi)
+ * - Entries 2^bitPrecision/4 up to (excluding) 2^bitPrecision/2:
+ * sin(pi) till (excluding) sin(3/2*pi)
*/
const float *getTable() { return _table; }
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 84805082ac..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;
@@ -764,7 +764,7 @@ String tag2string(uint32 tag) {
str[4] = '\0';
// Replace non-printable chars by dot
for (int i = 0; i < 4; ++i) {
- if (!isprint((unsigned char)str[i]))
+ if (!Common::isPrint(str[i]))
str[i] = '.';
}
return String(str);
@@ -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/util.cpp b/common/util.cpp
index 4d9ff11c5c..3d40fffff5 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -26,6 +26,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_islower
#define FORBIDDEN_SYMBOL_EXCEPTION_isspace
#define FORBIDDEN_SYMBOL_EXCEPTION_isupper
+#define FORBIDDEN_SYMBOL_EXCEPTION_isprint
#include "common/util.h"
@@ -144,4 +145,8 @@ bool isUpper(int c) {
return isupper((byte)c);
}
+bool isPrint(int c) {
+ ENSURE_ASCII_CHAR(c);
+ return isprint((byte)c);
+}
} // End of namespace Common
diff --git a/common/util.h b/common/util.h
index 78340980d5..4ca1c42929 100644
--- a/common/util.h
+++ b/common/util.h
@@ -165,6 +165,17 @@ bool isSpace(int c);
*/
bool isUpper(int c);
-} // End of namespace Common
+/**
+ * Test whether the given character is printable. This includes the space
+ * character (' ').
+ *
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is printable, false otherwise.
+ */
+bool isPrint(int c);
+} // End of namespace Common
#endif
diff --git a/common/winexe.cpp b/common/winexe.cpp
index 7cfc140452..877ab6baa1 100644
--- a/common/winexe.cpp
+++ b/common/winexe.cpp
@@ -73,7 +73,7 @@ String WinResourceID::toString() const {
if (_idType == kIDTypeString)
return _name;
else if (_idType == kIDTypeNumerical)
- return String::format("%08x", _id);
+ return String::format("0x%08x", _id);
return "";
}
diff --git a/common/winexe_ne.cpp b/common/winexe_ne.cpp
index 8690f6795b..6bb40e0980 100644
--- a/common/winexe_ne.cpp
+++ b/common/winexe_ne.cpp
@@ -187,8 +187,8 @@ uint32 NEResources::getResourceTableOffset() {
static const char *s_resTypeNames[] = {
"", "cursor", "bitmap", "icon", "menu", "dialog", "string",
"font_dir", "font", "accelerator", "rc_data", "msg_table",
- "group_cursor", "group_icon", "version", "dlg_include",
- "plug_play", "vxd", "ani_cursor", "ani_icon", "html",
+ "group_cursor", "group_icon", "", "", "version", "dlg_include",
+ "", "plug_play", "vxd", "ani_cursor", "ani_icon", "html",
"manifest"
};
@@ -200,9 +200,16 @@ bool NEResources::readResourceTable(uint32 offset) {
return false;
uint32 align = 1 << _exe->readUint16LE();
-
uint16 typeID = _exe->readUint16LE();
+
while (typeID != 0) {
+ // High bit of the type means integer type
+ WinResourceID type;
+ if (typeID & 0x8000)
+ type = typeID & 0x7FFF;
+ else
+ type = getResourceString(*_exe, offset + typeID);
+
uint16 resCount = _exe->readUint16LE();
_exe->skip(4); // reserved
@@ -218,17 +225,18 @@ bool NEResources::readResourceTable(uint32 offset) {
res.handle = _exe->readUint16LE();
res.usage = _exe->readUint16LE();
- res.type = typeID;
+ res.type = type;
- if ((id & 0x8000) == 0)
- res.id = getResourceString(*_exe, offset + id);
- else
+ // High bit means integer type
+ if (id & 0x8000)
res.id = id & 0x7FFF;
+ else
+ res.id = getResourceString(*_exe, offset + id);
- if (typeID & 0x8000 && ((typeID & 0x7FFF) < ARRAYSIZE(s_resTypeNames)))
+ if (typeID & 0x8000 && ((typeID & 0x7FFF) < ARRAYSIZE(s_resTypeNames)) && s_resTypeNames[typeID & 0x7FFF][0] != 0)
debug(2, "Found resource %s %s", s_resTypeNames[typeID & 0x7FFF], res.id.toString().c_str());
else
- debug(2, "Found resource %04x %s", typeID, res.id.toString().c_str());
+ debug(2, "Found resource %s %s", type.toString().c_str(), res.id.toString().c_str());
_resources.push_back(res);
}
@@ -257,7 +265,7 @@ String NEResources::getResourceString(SeekableReadStream &exe, uint32 offset) {
return string;
}
-const NEResources::Resource *NEResources::findResource(uint16 type, WinResourceID id) const {
+const NEResources::Resource *NEResources::findResource(const WinResourceID &type, const WinResourceID &id) const {
for (List<Resource>::const_iterator it = _resources.begin(); it != _resources.end(); ++it)
if (it->type == type && it->id == id)
return &*it;
@@ -265,7 +273,7 @@ const NEResources::Resource *NEResources::findResource(uint16 type, WinResourceI
return 0;
}
-SeekableReadStream *NEResources::getResource(uint16 type, WinResourceID id) {
+SeekableReadStream *NEResources::getResource(const WinResourceID &type, const WinResourceID &id) {
const Resource *res = findResource(type, id);
if (!res)
@@ -275,7 +283,7 @@ SeekableReadStream *NEResources::getResource(uint16 type, WinResourceID id) {
return _exe->readStream(res->size);
}
-const Array<WinResourceID> NEResources::getIDList(uint16 type) const {
+const Array<WinResourceID> NEResources::getIDList(const WinResourceID &type) const {
Array<WinResourceID> idArray;
for (List<Resource>::const_iterator it = _resources.begin(); it != _resources.end(); ++it)
diff --git a/common/winexe_ne.h b/common/winexe_ne.h
index 4a1b2343df..f00941412f 100644
--- a/common/winexe_ne.h
+++ b/common/winexe_ne.h
@@ -34,27 +34,27 @@ class SeekableReadStream;
/** The default Windows resources. */
enum NEResourceType {
- kNECursor = 0x8001,
- kNEBitmap = 0x8002,
- kNEIcon = 0x8003,
- kNEMenu = 0x8004,
- kNEDialog = 0x8005,
- kNEString = 0x8006,
- kNEFontDir = 0x8007,
- kNEFont = 0x8008,
- kNEAccelerator = 0x8009,
- kNERCData = 0x800A,
- kNEMessageTable = 0x800B,
- kNEGroupCursor = 0x800C,
- kNEGroupIcon = 0x800D,
- kNEVersion = 0x8010,
- kNEDlgInclude = 0x8011,
- kNEPlugPlay = 0x8013,
- kNEVXD = 0x8014,
- kNEAniCursor = 0x8015,
- kNEAniIcon = 0x8016,
- kNEHTML = 0x8017,
- kNEManifest = 0x8018
+ kNECursor = 0x01,
+ kNEBitmap = 0x02,
+ kNEIcon = 0x03,
+ kNEMenu = 0x04,
+ kNEDialog = 0x05,
+ kNEString = 0x06,
+ kNEFontDir = 0x07,
+ kNEFont = 0x08,
+ kNEAccelerator = 0x09,
+ kNERCData = 0x0A,
+ kNEMessageTable = 0x0B,
+ kNEGroupCursor = 0x0C,
+ kNEGroupIcon = 0x0D,
+ kNEVersion = 0x10,
+ kNEDlgInclude = 0x11,
+ kNEPlugPlay = 0x13,
+ kNEVXD = 0x14,
+ kNEAniCursor = 0x15,
+ kNEAniIcon = 0x16,
+ kNEHTML = 0x17,
+ kNEManifest = 0x18
};
/**
@@ -81,17 +81,17 @@ public:
bool loadFromEXE(SeekableReadStream *stream);
/** Return a list of resources for a given type. */
- const Array<WinResourceID> getIDList(uint16 type) const;
+ const Array<WinResourceID> getIDList(const WinResourceID &type) const;
/** Return a stream to the specified resource (or 0 if non-existent). */
- SeekableReadStream *getResource(uint16 type, WinResourceID id);
+ SeekableReadStream *getResource(const WinResourceID &type, const WinResourceID &id);
private:
/** A resource. */
struct Resource {
WinResourceID id;
- uint16 type; ///< Type of the resource.
+ WinResourceID type; ///< Type of the resource.
uint32 offset; ///< Offset within the EXE.
uint32 size; ///< Size of the data.
@@ -112,7 +112,7 @@ private:
bool readResourceTable(uint32 offset);
/** Find a specific resource. */
- const Resource *findResource(uint16 type, WinResourceID id) const;
+ const Resource *findResource(const WinResourceID &type, const WinResourceID &id) const;
/** Read a resource string. */
static String getResourceString(SeekableReadStream &exe, uint32 offset);
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index f0b7f1cc81..c80d5e15be 100644
--- a/common/xmlparser.cpp
+++ b/common/xmlparser.cpp
@@ -298,7 +298,7 @@ bool XMLParser::closeKey() {
bool XMLParser::parse() {
if (_stream == 0)
- return parserError("XML stream not ready for reading.");
+ return false;
// Make sure we are at the start of the stream.
_stream->seek(0, SEEK_SET);
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 a0119bb1b1..dbd78d3f9d 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
@@ -223,7 +230,11 @@ cc_check_no_clean() {
echo >> "$TMPLOG"
echo "$CXX $LDFLAGS $CXXFLAGS $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG"
rm -f "$TMPO$HOSTEXEEXT"
- ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
+ if test "-c" = "$*" ; then
+ ( $CXX $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
+ else
+ ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1
+ fi
TMPR="$?"
echo "return code: $TMPR" >> "$TMPLOG"
echo >> "$TMPLOG"
@@ -870,6 +881,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 +1121,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 +1435,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
@@ -1557,7 +1570,7 @@ EOF
if test -n "$_host"; then
# In cross-compiling mode, we cannot run the result
- eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp
+ eval "$1 $CXXFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp
else
eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO$HOSTEXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "$TMPO$HOSTEXEEXT 2> /dev/null" && cc_check_clean tmp_cxx_compiler.cpp
fi
@@ -1695,21 +1708,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 +1753,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 +1941,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 +1988,7 @@ case $_host_cpu in
echo "PowerPC"
DEFINES="$DEFINES -DPPC_TARGET"
;;
- x86_64)
+ amd64 | x86_64)
echo "x86_64"
;;
*)
@@ -2521,14 +2558,20 @@ 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"
+ CXXFLAGS="$CXXFLAGS -mfloat-abi=softfp"
CXXFLAGS="$CXXFLAGS -mfpu=neon"
- ASFLAGS="$ASFLAGS -mfloat-abi=soft"
+ CXXFLAGS="$CXXFLAGS -fsingle-precision-constant"
+ ASFLAGS="$ASFLAGS -mfloat-abi=softfp"
_backend="openpandora"
_build_hq_scalers=yes
_vkeybd=no
@@ -2537,6 +2580,16 @@ if test -n "$_host"; then
_port_mk="backends/platform/openpandora/op-bundle.mk"
;;
ppc-amigaos)
+ # Only static builds link successfully on buildbot
+ LDFLAGS=`echo $LDFLAGS | sed 's/-use-dynld//'`
+ LDFLAGS="$LDFLAGS -static"
+
+ # toolchain binaries prefixed by host
+ _ranlib=$_host-ranlib
+ _strip=$_host-strip
+ _ar="$_host-ar cru"
+ _as="$_host-as"
+ _windres=$_host-windres
;;
ps2)
DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE"
@@ -2816,7 +2869,7 @@ esac
# Enable 16bit support only for backends which support it
#
case $_backend in
- android | bada | dingux | dreamcast | gph | iphone | maemo | openpandora | psp | samsungtv | sdl | webos | wii)
+ android | bada | dingux | dc | gph | iphone | maemo | openpandora | psp | samsungtv | sdl | webos | wii)
if test "$_16bit" = auto ; then
_16bit=yes
else
@@ -2862,7 +2915,7 @@ case $_host_os in
amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | ps3 | psp | wii | wince)
_posix=no
;;
- android | beos* | bsd* | darwin* | freebsd* | gph-linux | haiku* | hpux* | iphone | irix* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
+ android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
_posix=yes
;;
os2-emx*)
@@ -2977,7 +3030,7 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwo
freebsd*)
_plugin_prefix="lib"
_plugin_suffix=".so"
- CXXFLAGS="$CXXFLAGS -fpic"
+ CXXFLAGS="$CXXFLAGS -fPIC"
_mak_plugins='
PLUGIN_EXTRA_DEPS =
PLUGIN_LDFLAGS += -shared
@@ -3018,10 +3071,10 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
'
;;
- linux*)
+ linux* | gnu* | k*bsd*-gnu*)
_plugin_prefix="lib"
_plugin_suffix=".so"
- CXXFLAGS="$CXXFLAGS -fpic"
+ CXXFLAGS="$CXXFLAGS -fPIC"
LIBS="$LIBS -ldl"
_mak_plugins='
PLUGIN_EXTRA_DEPS =
@@ -3606,7 +3659,8 @@ if test "$_opengl" = auto ; then
# Test the current header for OpenGL
cat > $TMPC << EOF
#include <$i>
-int main(void) { return GL_VERSION_1_1; }
+#include <stdio.h>
+int main(void) { printf("ANTIVIRUS FALSE POSITIVE WORKAROUND"); return GL_VERSION_1_1; }
EOF
cc_check $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes && break
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index 3b90ad0d85..ca809e0aac 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 },
@@ -745,7 +748,7 @@ byte getLanguageID(int lang) {
}
const TypeTable platformTable[] = {
- { kPlatformPC, 0 },
+ { kPlatformDOS, 0 },
{ kPlatformAmiga, 1 },
{ kPlatformFMTowns, 2 },
{ kPlatformPC98, 3 },
@@ -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..b2f520d0d3 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 },
@@ -176,7 +177,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da
patch = 2;
else if (id == k2SeqplayStrings)
patch = 3;
- } else if (info->platform == kPlatformPC) {
+ } else if (info->platform == kPlatformDOS) {
if (id == k2IngamePakFiles)
patch = 4;
@@ -600,7 +601,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte
int v = extractHofSeqData_isSequence(ptr, info, endOffs - ptr);
if (cycle == 0 && v == 1) {
- if ((info->platform == kPlatformPC && info->special == kNoSpecial && *ptr == 5) || (info->special == kDemoVersion && (ptr - data == 312))) {
+ if ((info->platform == kPlatformDOS && info->special == kNoSpecial && *ptr == 5) || (info->special == kDemoVersion && (ptr - data == 312))) {
// patch for floppy version: skips invalid ferb sequence
// patch for demo: skips invalid title sequence
ptr += 54;
@@ -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..e2ad4f7263 100644
--- a/devtools/create_kyradat/games.cpp
+++ b/devtools/create_kyradat/games.cpp
@@ -33,26 +33,26 @@ namespace {
const Game kyra1Games[] = {
// Demos
- { kKyra1, { EN_ANY, -1, -1 }, kPlatformPC, kDemoVersion, { "7b7504c8560ffc914d34c44c71b3094c", 0 } },
- { kKyra1, { EN_ANY, -1, -1 }, kPlatformPC, kTalkieDemoVersion, { "226fdba99cb11ef1047131d9a50e6292", 0 } },
+ { kKyra1, { EN_ANY, -1, -1 }, kPlatformDOS, kDemoVersion, { "7b7504c8560ffc914d34c44c71b3094c", 0 } },
+ { kKyra1, { EN_ANY, -1, -1 }, kPlatformDOS, kTalkieDemoVersion, { "226fdba99cb11ef1047131d9a50e6292", 0 } },
// Amiga
{ kKyra1, { EN_ANY, -1, -1 }, kPlatformAmiga, kNoSpecial, { "b620564b6b7e0787b053ca9e35bd9f52", 0 } },
{ kKyra1, { DE_DEU, -1, -1 }, kPlatformAmiga, kNoSpecial, { "ceddb4bd4df51698e3851e75106d117a", 0 } },
// Floppy
- { kKyra1, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "76a4fc84e173cadb6369785787e1546e", 0 } },
- { kKyra1, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "9442d6f7db6a41f3dd4aa4de5d36e107", 0 } },
- { kKyra1, { FR_FRA, -1, -1 }, kPlatformPC, kNoSpecial, { "aa9d6d78d8b199deaf48efeca6d19af2", 0 } },
- { kKyra1, { IT_ITA, -1, -1 }, kPlatformPC, kNoSpecial, { "5d7550306b369a3492f9f3402702477c", 0 } },
- { kKyra1, { ES_ESP, -1, -1 }, kPlatformPC, kNoSpecial, { "9ff130d2558bcd674d4074849d93c362", 0 } },
- { kKyra1, { RU_RUS, -1, -1 }, kPlatformPC, kOldFloppy, { "3b4719e1f8a4d67813b7ada29774aead", 0 } },
+ { kKyra1, { EN_ANY, -1, -1 }, kPlatformDOS, kNoSpecial, { "76a4fc84e173cadb6369785787e1546e", 0 } },
+ { kKyra1, { DE_DEU, -1, -1 }, kPlatformDOS, kNoSpecial, { "9442d6f7db6a41f3dd4aa4de5d36e107", 0 } },
+ { kKyra1, { FR_FRA, -1, -1 }, kPlatformDOS, kNoSpecial, { "aa9d6d78d8b199deaf48efeca6d19af2", 0 } },
+ { kKyra1, { IT_ITA, -1, -1 }, kPlatformDOS, kNoSpecial, { "5d7550306b369a3492f9f3402702477c", 0 } },
+ { kKyra1, { ES_ESP, -1, -1 }, kPlatformDOS, kNoSpecial, { "9ff130d2558bcd674d4074849d93c362", 0 } },
+ { kKyra1, { RU_RUS, -1, -1 }, kPlatformDOS, kOldFloppy, { "3b4719e1f8a4d67813b7ada29774aead", 0 } },
// Talkie
- { kKyra1, { EN_ANY, -1, -1 }, kPlatformPC, kTalkieVersion, { "1ebc18f3e7fbb72474a55cb0fa089ed4", 0 } },
- { kKyra1, { DE_DEU, -1, -1 }, kPlatformPC, kTalkieVersion, { "c65d381184f98ac26d9efd2d45baef51", 0 } },
- { kKyra1, { FR_FRA, -1, -1 }, kPlatformPC, kTalkieVersion, { "307c5d4a554d9068ac3d326e350ae4a6", 0 } },
- { kKyra1, { IT_ITA, -1, -1 }, kPlatformPC, kTalkieVersion, { "d0f1752098236083d81b9497bd2b6989", 0 } }, // Italian fan translation
+ { kKyra1, { EN_ANY, -1, -1 }, kPlatformDOS, kTalkieVersion, { "1ebc18f3e7fbb72474a55cb0fa089ed4", 0 } },
+ { kKyra1, { DE_DEU, -1, -1 }, kPlatformDOS, kTalkieVersion, { "c65d381184f98ac26d9efd2d45baef51", 0 } },
+ { kKyra1, { FR_FRA, -1, -1 }, kPlatformDOS, kTalkieVersion, { "307c5d4a554d9068ac3d326e350ae4a6", 0 } },
+ { kKyra1, { IT_ITA, -1, -1 }, kPlatformDOS, kTalkieVersion, { "d0f1752098236083d81b9497bd2b6989", 0 } }, // Italian fan translation
// FM-TOWNS
{ kKyra1, { EN_ANY, JA_JPN, -1 }, kPlatformFMTowns, kNoSpecial, { "5a3ad60ccd0f2e29463e0368cd14a60d", 0 } },
@@ -65,21 +65,21 @@ const Game kyra1Games[] = {
const Game kyra2Games[] = {
// demos
- { kKyra2, { EN_ANY, -1, -1 }, kPlatformPC, kDemoVersion, { "a620a37579dd44ab0403482285e3897f", 0 } },
+ { kKyra2, { EN_ANY, -1, -1 }, kPlatformDOS, kDemoVersion, { "a620a37579dd44ab0403482285e3897f", 0 } },
- { kKyra2, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieDemoVersion, { "85bbc1cc6c4cef6ad31fc6ee79518efb", "fa54d8abfe05f9186c05f7de7eaf1480" } },
+ { kKyra2, { EN_ANY, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieDemoVersion, { "85bbc1cc6c4cef6ad31fc6ee79518efb", "fa54d8abfe05f9186c05f7de7eaf1480" } },
// floppy games
- { kKyra2, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "9b0f5e57b5a2ed88b5b989cbb402b6c7", "7c3eadbe5122722cf2e5e1611e19dfb9" } },
- { kKyra2, { FR_FRA, -1, -1 }, kPlatformPC, kNoSpecial, { "df31cc9e37e1cf68df2fdc75ddf2d87b", "fc2c6782778e6c6d5a553d1cb73c98ad" } },
- { kKyra2, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "0ca4f9a1438264a4c63c3218e064ed3b", "0d9b0eb7b0ad889ec942d74d80dde1bf" } },
- { kKyra2, { IT_ITA, -1, -1 }, kPlatformPC, kNoSpecial, { "178d3ab913f61bfba21d2fb196405e8c", "3a61ed6b7c00ddae383a0361799e2ba6" } },
- { kKyra2, { RU_RUS, -1, -1 }, kPlatformPC, kNoSpecial, { "fd6a388c01de9a578e24e3bbeacd8012", "3a61ed6b7c00ddae383a0361799e2ba6" } },
+ { kKyra2, { EN_ANY, -1, -1 }, kPlatformDOS, kNoSpecial, { "9b0f5e57b5a2ed88b5b989cbb402b6c7", "7c3eadbe5122722cf2e5e1611e19dfb9" } },
+ { kKyra2, { FR_FRA, -1, -1 }, kPlatformDOS, kNoSpecial, { "df31cc9e37e1cf68df2fdc75ddf2d87b", "fc2c6782778e6c6d5a553d1cb73c98ad" } },
+ { kKyra2, { DE_DEU, -1, -1 }, kPlatformDOS, kNoSpecial, { "0ca4f9a1438264a4c63c3218e064ed3b", "0d9b0eb7b0ad889ec942d74d80dde1bf" } },
+ { kKyra2, { IT_ITA, -1, -1 }, kPlatformDOS, kNoSpecial, { "178d3ab913f61bfba21d2fb196405e8c", "3a61ed6b7c00ddae383a0361799e2ba6" } },
+ { kKyra2, { RU_RUS, -1, -1 }, kPlatformDOS, kNoSpecial, { "fd6a388c01de9a578e24e3bbeacd8012", "3a61ed6b7c00ddae383a0361799e2ba6" } },
// talkie games
- { kKyra2, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "85bbc1cc6c4cef6ad31fc6ee79518efb", "e20d0d2e500f01e399ec588247a7e213" } },
- { kKyra2, { IT_ITA, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "130795aa8f2333250c895dae9028b9bb", "e20d0d2e500f01e399ec588247a7e213" } }, // Italian Fan Translation
- { kKyra2, { RU_RUS, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "c3afd22959f515355b2a33cde950f418", "e20d0d2e500f01e399ec588247a7e213" } }, // Russian Fan Translation
+ { kKyra2, { EN_ANY, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "85bbc1cc6c4cef6ad31fc6ee79518efb", "e20d0d2e500f01e399ec588247a7e213" } },
+ { kKyra2, { IT_ITA, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "130795aa8f2333250c895dae9028b9bb", "e20d0d2e500f01e399ec588247a7e213" } }, // Italian Fan Translation
+ { kKyra2, { RU_RUS, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "c3afd22959f515355b2a33cde950f418", "e20d0d2e500f01e399ec588247a7e213" } }, // Russian Fan Translation
// FM-TOWNS games
{ kKyra2, { EN_ANY, JA_JPN, -1 }, kPlatformFMTowns, kNoSpecial, { "74f50d79c919cc8e7196c24942ce43d7", "a9a7fd4f05d00090e9e8bda073e6d431" } },
@@ -92,42 +92,45 @@ const Game kyra2Games[] = {
const Game kyra3Games[] = {
// DOS CD (multi language version, with no language specific strings)
- { kKyra3, { EN_ANY, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } },
- { kKyra3, { EN_ANY, IT_ITA, DE_DEU }, kPlatformPC, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } }, // Fan translation // TODO: Verify md5sum
- { kKyra3, { ES_ESP, FR_FRA, DE_DEU }, kPlatformPC, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } }, // Fan translation // TODO: Verify md5sum
+ { kKyra3, { EN_ANY, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } },
+ { kKyra3, { EN_ANY, IT_ITA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } }, // Fan translation // TODO: Verify md5sum
+ { kKyra3, { ES_ESP, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "bf68701eb591d0b72219f314c0d32688", 0 } }, // Fan translation // TODO: Verify md5sum
GAME_DUMMY_ENTRY
};
const Game eob1Games[] = {
- { kEoB1, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "1bde1dd37b40ab6de8ad11be33a44c5a", "d760a605d1a1302d06975a1f209fdd72" } },
- { kEoB1, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "0fa3c6e00a81171b9f2adb3fdeb8eea3", "756f300c62aabf1dbd3c26b3b04f8c00" } },
+ { kEoB1, { EN_ANY, -1, -1 }, kPlatformDOS, kNoSpecial, { "1bde1dd37b40ab6de8ad11be33a44c5a", "d760a605d1a1302d06975a1f209fdd72" } },
+ { kEoB1, { DE_DEU, -1, -1 }, kPlatformDOS, kNoSpecial, { "0fa3c6e00a81171b9f2adb3fdeb8eea3", "756f300c62aabf1dbd3c26b3b04f8c00" } },
GAME_DUMMY_ENTRY
};
const Game eob2Games[] = {
- { kEoB2, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "e006d031c2d854f748947f777e0c59b0", 0 } },
- { kEoB2, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "6c6c4168deb2a4cb3dee3f1be2d39746", 0 } },
+ { kEoB2, { EN_ANY, -1, -1 }, kPlatformDOS, kNoSpecial, { "e006d031c2d854f748947f777e0c59b0", 0 } },
+ { kEoB2, { DE_DEU, -1, -1 }, kPlatformDOS, kNoSpecial, { "6c6c4168deb2a4cb3dee3f1be2d39746", 0 } },
GAME_DUMMY_ENTRY
};
const Game lolGames[] = {
// DOS demo
- { kLoL, { EN_ANY, -1, -1 }, kPlatformPC, kDemoVersion, { "30bb5af87d38adb47d3e6ce06b1cb042", 0 } },
+ { kLoL, { EN_ANY, -1, -1 }, kPlatformDOS, kDemoVersion, { "30bb5af87d38adb47d3e6ce06b1cb042", 0 } },
// DOS floppy (no language specifc strings except character presets)
- { kLoL, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "0cc764a204f7ba8cefe1a5f14c479619", 0 } },
- { kLoL, { RU_RUS, -1, -1 }, kPlatformPC, kNoSpecial, { "80a9f9bf243bc6ed36d98584fc6988c4", 0 } },
- { kLoL, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } },
- { kLoL, { FR_FRA, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } },
+ { kLoL, { EN_ANY, -1, -1 }, kPlatformDOS, kNoSpecial, { "0cc764a204f7ba8cefe1a5f14c479619", 0 } },
+ { kLoL, { RU_RUS, -1, -1 }, kPlatformDOS, kNoSpecial, { "80a9f9bf243bc6ed36d98584fc6988c4", 0 } },
+ { kLoL, { DE_DEU, -1, -1 }, kPlatformDOS, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } },
+ { kLoL, { FR_FRA, -1, -1 }, kPlatformDOS, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } },
// 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
- { kLoL, { EN_ANY, FR_FRA, RU_RUS }, kPlatformPC, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "5b33478718968676343803911dd5e3e4" } }, // Russian fan translation
+ { kLoL, { EN_ANY, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "263998ec600afca1cc7b935c473df670" } },
+ { kLoL, { IT_ITA, FR_FRA, DE_DEU }, kPlatformDOS, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "f2af366e00f79dbf832fa19701d71ed9" } }, // Italian fan translation
+ { kLoL, { EN_ANY, FR_FRA, RU_RUS }, kPlatformDOS, kTalkieVersion, { "9d1778314de80598c0b0d032e2a1a1cf", "5b33478718968676343803911dd5e3e4" } }, // Russian fan translation
GAME_DUMMY_ENTRY
};
@@ -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,
@@ -1663,44 +1754,45 @@ struct GameNeed {
};
const GameNeed gameNeedTable[] = {
- { kKyra1, kPlatformPC, kNoSpecial, kyra1FloppyNeed },
- { kKyra1, kPlatformPC, kOldFloppy, kyra1FloppyOldNeed },
+ { kKyra1, kPlatformDOS, kNoSpecial, kyra1FloppyNeed },
+ { kKyra1, kPlatformDOS, kOldFloppy, kyra1FloppyOldNeed },
{ kKyra1, kPlatformAmiga, kNoSpecial, kyra1AmigaNeed },
- { kKyra1, kPlatformPC, kTalkieVersion, kyra1CDNeed },
+ { kKyra1, kPlatformDOS, kTalkieVersion, kyra1CDNeed },
{ kKyra1, kPlatformFMTowns, kNoSpecial, kyra1TownsNeed },
{ kKyra1, kPlatformPC98, kNoSpecial, kyra1PC98Need },
- { kKyra1, kPlatformPC, kDemoVersion, kyra1DemoNeed },
+ { kKyra1, kPlatformDOS, kDemoVersion, kyra1DemoNeed },
- { kKyra1, kPlatformPC, kTalkieDemoVersion, kyra1DemoCDNeed },
+ { kKyra1, kPlatformDOS, kTalkieDemoVersion, kyra1DemoCDNeed },
- { kKyra2, kPlatformPC, kNoSpecial, kyra2FloppyNeed },
+ { kKyra2, kPlatformDOS, kNoSpecial, kyra2FloppyNeed },
- { kKyra2, kPlatformPC, kTalkieVersion, kyra2CDNeed },
+ { kKyra2, kPlatformDOS, kTalkieVersion, kyra2CDNeed },
- { kKyra2, kPlatformPC, kTalkieDemoVersion, kyra2CDDemoNeed },
+ { kKyra2, kPlatformDOS, kTalkieDemoVersion, kyra2CDDemoNeed },
{ kKyra2, kPlatformFMTowns, kNoSpecial, kyra2TownsNeed },
{ kKyra2, kPlatformPC98, kNoSpecial, kyra2PC98Need },
- { kKyra2, kPlatformPC, kDemoVersion, kyra2DemoNeed },
+ { kKyra2, kPlatformDOS, kDemoVersion, kyra2DemoNeed },
- { kLoL, kPlatformPC, kDemoVersion, lolDemoNeed },
+ { kLoL, kPlatformDOS, kDemoVersion, lolDemoNeed },
- { kKyra3, kPlatformPC, kTalkieVersion, kyra3Need },
+ { kKyra3, kPlatformDOS, kTalkieVersion, kyra3Need },
- { kLoL, kPlatformPC, kNoSpecial, lolFloppyNeed },
+ { kLoL, kPlatformDOS, kNoSpecial, lolFloppyNeed },
{ kLoL, kPlatformPC98, kNoSpecial, lolPC98Need },
+ { kLoL, kPlatformFMTowns, kNoSpecial, lolFMTownsNeed },
- { kLoL, kPlatformPC, kTalkieVersion, lolCDNeed },
+ { kLoL, kPlatformDOS, kTalkieVersion, lolCDNeed },
- { kEoB1, kPlatformPC, kNoSpecial, eob1FloppyNeed },
+ { kEoB1, kPlatformDOS, kNoSpecial, eob1FloppyNeed },
- { kEoB2, kPlatformPC, kNoSpecial, eob2FloppyNeed },
+ { kEoB2, kPlatformDOS, kNoSpecial, eob2FloppyNeed },
{ -1, -1, -1, 0 }
};
diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp
index 19b69d9410..15f8240e79 100644
--- a/devtools/create_kyradat/tables.cpp
+++ b/devtools/create_kyradat/tables.cpp
@@ -35,7 +35,7 @@ namespace {
// Id provider tables
const ExtractEntrySearchData k1ForestSeqProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000195, 0x00001455, { { 0x86, 0xC2, 0x45, 0xEB, 0x16, 0x8A, 0x44, 0x73, 0xB4, 0x59, 0x13, 0x9B, 0x85, 0x40, 0x82, 0x81 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000195, 0x00001455, { { 0x86, 0xC2, 0x45, 0xEB, 0x16, 0x8A, 0x44, 0x73, 0xB4, 0x59, 0x13, 0x9B, 0x85, 0x40, 0x82, 0x81 } } } }, // floppy
{ UNK_LANG, kPlatformUnknown, { 0x000002DE, 0x00003946, { { 0x85, 0x79, 0xDC, 0xB8, 0x62, 0xAD, 0xD6, 0x01, 0xA5, 0x66, 0x6B, 0xC4, 0x61, 0xCA, 0x82, 0xF5 } } } }, // CD + Amiga
{ UNK_LANG, kPlatformUnknown, { 0x00000273, 0x00001D80, { { 0x18, 0x32, 0xB7, 0xFB, 0xD8, 0x1A, 0x6D, 0x83, 0x75, 0xF5, 0x2B, 0xF7, 0xC0, 0xFD, 0x85, 0xEF } } } }, // Amiga + CD demo
@@ -48,8 +48,8 @@ const ExtractEntrySearchData k1ForestSeqProvider[] = {
};
const ExtractEntrySearchData k1KallakWritingSeqProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000007F5, 0x00006DCD, { { 0x0E, 0x0A, 0x75, 0xA5, 0x71, 0x5A, 0xC6, 0x32, 0x52, 0x7F, 0xEC, 0x2B, 0x0B, 0xF2, 0x22, 0xE6 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000805, 0x0000719E, { { 0xA2, 0xFE, 0x0A, 0xAA, 0xD9, 0x43, 0x5A, 0xBE, 0x56, 0x38, 0x73, 0x42, 0xAC, 0xA9, 0x1B, 0x01 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x000007F5, 0x00006DCD, { { 0x0E, 0x0A, 0x75, 0xA5, 0x71, 0x5A, 0xC6, 0x32, 0x52, 0x7F, 0xEC, 0x2B, 0x0B, 0xF2, 0x22, 0xE6 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000805, 0x0000719E, { { 0xA2, 0xFE, 0x0A, 0xAA, 0xD9, 0x43, 0x5A, 0xBE, 0x56, 0x38, 0x73, 0x42, 0xAC, 0xA9, 0x1B, 0x01 } } } }, // CD
{ UNK_LANG, kPlatformAmiga, { 0x000007F4, 0x00006DAD, { { 0x84, 0x9D, 0x82, 0xD2, 0x4E, 0x8B, 0xE2, 0x86, 0x82, 0x5E, 0xE7, 0x2C, 0x7A, 0xD6, 0xFE, 0x19 } } } },
@@ -62,15 +62,15 @@ const ExtractEntrySearchData k1KallakWritingSeqProvider[] = {
const ExtractEntrySearchData k1KyrandiaLogoSeqProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000005C, 0x000003D3, { { 0x75, 0xC5, 0x55, 0x54, 0x00, 0xD7, 0xE9, 0x26, 0x0F, 0x01, 0xB1, 0xB7, 0xA9, 0x29, 0xF7, 0x69 } } } },
- { UNK_LANG, kPlatformPC, { 0x000000A6, 0x00000A09, { { 0x70, 0x6E, 0x74, 0xBB, 0xD7, 0x09, 0x05, 0xDD, 0xA3, 0x09, 0x96, 0x40, 0xBD, 0x01, 0x19, 0x05 } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x00000054, 0x00000300, { { 0x4E, 0xAD, 0xD0, 0x73, 0xD2, 0x3C, 0xF6, 0x6B, 0x65, 0x23, 0xA2, 0x30, 0xD6, 0xEE, 0x1C, 0x13 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x000000A6, 0x00000A09, { { 0x70, 0x6E, 0x74, 0xBB, 0xD7, 0x09, 0x05, 0xDD, 0xA3, 0x09, 0x96, 0x40, 0xBD, 0x01, 0x19, 0x05 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000054, 0x00000300, { { 0x4E, 0xAD, 0xD0, 0x73, 0xD2, 0x3C, 0xF6, 0x6B, 0x65, 0x23, 0xA2, 0x30, 0xD6, 0xEE, 0x1C, 0x13 } } } }, // demo
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k1KallakMalcolmSeqProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000026B, 0x00002132, { { 0x51, 0x07, 0x32, 0xA2, 0x09, 0x47, 0x97, 0x02, 0x85, 0x31, 0x39, 0x93, 0x3A, 0x53, 0x47, 0xA5 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000267, 0x00002100, { { 0xD9, 0x5E, 0x59, 0xF0, 0x7B, 0xC8, 0xF1, 0x40, 0x4F, 0x68, 0x6F, 0xEC, 0xB5, 0xE8, 0x88, 0xE2 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x0000026B, 0x00002132, { { 0x51, 0x07, 0x32, 0xA2, 0x09, 0x47, 0x97, 0x02, 0x85, 0x31, 0x39, 0x93, 0x3A, 0x53, 0x47, 0xA5 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000267, 0x00002100, { { 0xD9, 0x5E, 0x59, 0xF0, 0x7B, 0xC8, 0xF1, 0x40, 0x4F, 0x68, 0x6F, 0xEC, 0xB5, 0xE8, 0x88, 0xE2 } } } }, // floppy
{ UNK_LANG, kPlatformUnknown, { 0x0000027B, 0x0000220A, { { 0xB7, 0xC1, 0x57, 0x04, 0x9B, 0x67, 0x82, 0x7B, 0x6E, 0xFD, 0x59, 0xF2, 0x10, 0x93, 0x89, 0x12 } } } }, // CD + Amiga
{ UNK_LANG, kPlatformUnknown, { 0x000002B8, 0x0000280B, { { 0x98, 0xC8, 0x36, 0x8C, 0xF8, 0x92, 0xC2, 0xB9, 0x1B, 0x71, 0x6B, 0x4C, 0xA4, 0x6C, 0xF6, 0x30 } } } }, // Amiga + CD demo
@@ -83,8 +83,8 @@ const ExtractEntrySearchData k1KallakMalcolmSeqProvider[] = {
};
const ExtractEntrySearchData k1MalcolmTreeSeqProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000216, 0x000014FB, { { 0xBA, 0x6F, 0x63, 0xD5, 0x44, 0xCE, 0xE8, 0x20, 0xD4, 0x4C, 0x06, 0x58, 0x21, 0x8E, 0x07, 0x8B } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000230, 0x0000192A, { { 0x28, 0xCC, 0x89, 0x40, 0x8A, 0xF7, 0xCB, 0xC0, 0x11, 0x8F, 0x0F, 0xE5, 0x5F, 0x24, 0x2D, 0x32 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000216, 0x000014FB, { { 0xBA, 0x6F, 0x63, 0xD5, 0x44, 0xCE, 0xE8, 0x20, 0xD4, 0x4C, 0x06, 0x58, 0x21, 0x8E, 0x07, 0x8B } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000230, 0x0000192A, { { 0x28, 0xCC, 0x89, 0x40, 0x8A, 0xF7, 0xCB, 0xC0, 0x11, 0x8F, 0x0F, 0xE5, 0x5F, 0x24, 0x2D, 0x32 } } } }, // CD
{ UNK_LANG, kPlatformAmiga, { 0x00000214, 0x000014C4, { { 0xA2, 0x60, 0x16, 0x14, 0x20, 0xE4, 0x8D, 0x89, 0xC4, 0x30, 0x07, 0x21, 0xC9, 0x26, 0xA6, 0x84 } } } },
@@ -97,8 +97,8 @@ const ExtractEntrySearchData k1MalcolmTreeSeqProvider[] = {
const ExtractEntrySearchData k1WestwoodLogoSeqProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x0000004B, 0x000002FE, { { 0x6E, 0xDA, 0x5D, 0x1E, 0xF4, 0x38, 0xAE, 0x7A, 0x9F, 0xBC, 0x00, 0x7C, 0x77, 0x9D, 0x03, 0xAF } } } },
- { UNK_LANG, kPlatformPC, { 0x0000004B, 0x0000032A, { { 0x9A, 0x54, 0x6F, 0x6C, 0x70, 0xD1, 0x02, 0x94, 0xD1, 0xA1, 0xA7, 0xBE, 0x1B, 0x10, 0xBD, 0x2F } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x00000044, 0x00000243, { { 0x00, 0x11, 0x10, 0x64, 0x60, 0xE8, 0xB5, 0x59, 0x00, 0x60, 0xF5, 0x10, 0xB5, 0x63, 0x9D, 0x55 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x0000004B, 0x0000032A, { { 0x9A, 0x54, 0x6F, 0x6C, 0x70, 0xD1, 0x02, 0x94, 0xD1, 0xA1, 0xA7, 0xBE, 0x1B, 0x10, 0xBD, 0x2F } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000044, 0x00000243, { { 0x00, 0x11, 0x10, 0x64, 0x60, 0xE8, 0xB5, 0x59, 0x00, 0x60, 0xF5, 0x10, 0xB5, 0x63, 0x9D, 0x55 } } } }, // demo
{ UNK_LANG, kPlatformAmiga, { 0x0000004D, 0x00000319, { { 0xE9, 0x5D, 0xD4, 0x60, 0x4E, 0xA6, 0x92, 0x30, 0x9C, 0x77, 0x99, 0xBC, 0xB1, 0x97, 0xFB, 0xBD } } } },
@@ -136,9 +136,9 @@ const ExtractEntrySearchData k1AmuleteAnimSeqProvider[] = {
};
const ExtractEntrySearchData k1OutroReunionSeqProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000547, 0x0000781C, { { 0xCF, 0xD6, 0x1D, 0x3D, 0x14, 0x40, 0x88, 0x35, 0x36, 0x4F, 0x0B, 0x1F, 0x9A, 0x1C, 0x3D, 0xAC } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000547, 0x000077E0, { { 0x80, 0xC4, 0xFC, 0xD5, 0xEB, 0xAA, 0xA5, 0x87, 0x58, 0x5E, 0xAA, 0xE7, 0x01, 0x8F, 0x59, 0x3F } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x000005E5, 0x00008918, { { 0x6A, 0x33, 0x8C, 0xB0, 0x16, 0x57, 0x2D, 0xEB, 0xB2, 0xE1, 0x64, 0x80, 0x98, 0x99, 0x98, 0x19 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000547, 0x0000781C, { { 0xCF, 0xD6, 0x1D, 0x3D, 0x14, 0x40, 0x88, 0x35, 0x36, 0x4F, 0x0B, 0x1F, 0x9A, 0x1C, 0x3D, 0xAC } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000547, 0x000077E0, { { 0x80, 0xC4, 0xFC, 0xD5, 0xEB, 0xAA, 0xA5, 0x87, 0x58, 0x5E, 0xAA, 0xE7, 0x01, 0x8F, 0x59, 0x3F } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x000005E5, 0x00008918, { { 0x6A, 0x33, 0x8C, 0xB0, 0x16, 0x57, 0x2D, 0xEB, 0xB2, 0xE1, 0x64, 0x80, 0x98, 0x99, 0x98, 0x19 } } } }, // CD
{ UNK_LANG, kPlatformAmiga, { 0x0000054A, 0x0000785F, { { 0x55, 0xEA, 0xB8, 0x7F, 0x3A, 0x86, 0xCD, 0xA6, 0xBC, 0xA7, 0x9A, 0x39, 0xED, 0xF5, 0x30, 0x0A } } } },
@@ -153,9 +153,9 @@ const ExtractEntrySearchData k1IntroCPSStringsProvider[] = {
{ UNK_LANG, kPlatformFMTowns, { 0x00000015, 0x0000071D, { { 0x59, 0x65, 0x08, 0xF9, 0x4C, 0x81, 0xA1, 0xE3, 0x68, 0xF7, 0xE3, 0xF6, 0x33, 0x5F, 0xF5, 0x36 } } } },
{ UNK_LANG, kPlatformUnknown, { 0x00000014, 0x0000071D, { { 0xBA, 0xB6, 0x58, 0xB3, 0x28, 0x5E, 0x9F, 0x77, 0x69, 0x9D, 0x77, 0x53, 0x9D, 0x0D, 0xB0, 0x29 } } } }, // floppy + PC98
- { UNK_LANG, kPlatformPC, { 0x00000015, 0x00000786, { { 0xCF, 0x09, 0xE1, 0xD9, 0x8E, 0x34, 0x5D, 0xEA, 0xBC, 0xAC, 0xC4, 0xF4, 0x4A, 0xEC, 0xFF, 0xC1 } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x00000019, 0x000008DB, { { 0x3A, 0xDC, 0x1D, 0xAD, 0xF4, 0x5E, 0xC9, 0x19, 0xE9, 0x84, 0xD1, 0x31, 0x89, 0x6B, 0x6C, 0xF7 } } } }, // Old floppy
- { UNK_LANG, kPlatformPC, { 0x0000000C, 0x00000413, { { 0xA1, 0xE3, 0x06, 0x53, 0x23, 0x9A, 0xE0, 0xF1, 0xE4, 0xFD, 0xD9, 0x05, 0x22, 0xA6, 0x28, 0x46 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x00000015, 0x00000786, { { 0xCF, 0x09, 0xE1, 0xD9, 0x8E, 0x34, 0x5D, 0xEA, 0xBC, 0xAC, 0xC4, 0xF4, 0x4A, 0xEC, 0xFF, 0xC1 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000019, 0x000008DB, { { 0x3A, 0xDC, 0x1D, 0xAD, 0xF4, 0x5E, 0xC9, 0x19, 0xE9, 0x84, 0xD1, 0x31, 0x89, 0x6B, 0x6C, 0xF7 } } } }, // Old floppy
+ { UNK_LANG, kPlatformDOS, { 0x0000000C, 0x00000413, { { 0xA1, 0xE3, 0x06, 0x53, 0x23, 0x9A, 0xE0, 0xF1, 0xE4, 0xFD, 0xD9, 0x05, 0x22, 0xA6, 0x28, 0x46 } } } }, // demo
{ UNK_LANG, kPlatformAmiga, { 0x00000016, 0x0000070A, { { 0xD9, 0xDB, 0x91, 0xCD, 0x93, 0x81, 0xC4, 0x3F, 0x14, 0xF1, 0xC5, 0x02, 0xE7, 0x3F, 0x3A, 0x6C } } } },
@@ -165,7 +165,7 @@ const ExtractEntrySearchData k1IntroCPSStringsProvider[] = {
const ExtractEntrySearchData k1IntroCOLStringsProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000030, 0x00000F09, { { 0x05, 0x7B, 0x69, 0xB7, 0x6A, 0xC3, 0x7F, 0xD9, 0x7E, 0x51, 0x87, 0xA5, 0x31, 0xD8, 0x80, 0xB3 } } } },
{ UNK_LANG, kPlatformUnknown, { 0x0000002B, 0x00000F09, { { 0x01, 0x40, 0x65, 0xC1, 0x33, 0xAA, 0x64, 0xA7, 0x44, 0xD5, 0x89, 0x68, 0x17, 0x47, 0xC7, 0x1D } } } }, // floppy(?) + PC98
- { UNK_LANG, kPlatformPC, { 0x00000046, 0x0000174F, { { 0xAA, 0x59, 0x01, 0x20, 0x06, 0xB4, 0x80, 0xC0, 0x84, 0x38, 0xFD, 0x97, 0xBF, 0x78, 0xDD, 0x78 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x00000046, 0x0000174F, { { 0xAA, 0x59, 0x01, 0x20, 0x06, 0xB4, 0x80, 0xC0, 0x84, 0x38, 0xFD, 0x97, 0xBF, 0x78, 0xDD, 0x78 } } } }, // demo
{ UNK_LANG, kPlatformAmiga, { 0x0000002E, 0x00000F09, { { 0x2A, 0x42, 0xB8, 0x4E, 0xC6, 0xF0, 0x5F, 0x4A, 0x08, 0xB4, 0xE3, 0xE5, 0xBD, 0x32, 0x11, 0x06 } } } },
@@ -176,7 +176,7 @@ const ExtractEntrySearchData k1IntroWSAStringsProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000093, 0x00002E5D, { { 0xAB, 0xD1, 0x32, 0x89, 0x2A, 0x8D, 0xC0, 0x2C, 0x87, 0x87, 0xA3, 0x14, 0x2A, 0x2A, 0x22, 0x7F } } } },
{ UNK_LANG, kPlatformUnknown, { 0x00000086, 0x00002E5D, { { 0xD2, 0x8D, 0x62, 0xEF, 0xEB, 0x75, 0x04, 0x13, 0x64, 0x85, 0x6B, 0x6C, 0xE8, 0x6C, 0xCF, 0x52 } } } },
- { UNK_LANG, kPlatformPC, { 0x0000004D, 0x00001AEC, { { 0x15, 0xBC, 0x8C, 0xD9, 0x33, 0x0C, 0xC5, 0x66, 0x87, 0x3B, 0x76, 0xEE, 0x0C, 0x41, 0x4D, 0x1F } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x0000004D, 0x00001AEC, { { 0x15, 0xBC, 0x8C, 0xD9, 0x33, 0x0C, 0xC5, 0x66, 0x87, 0x3B, 0x76, 0xEE, 0x0C, 0x41, 0x4D, 0x1F } } } }, // demo
{ UNK_LANG, kPlatformUnknown, { 0x00000080, 0x00002E5D, { { 0x67, 0x03, 0x20, 0xDF, 0xAA, 0x3C, 0x6A, 0xB5, 0x45, 0xD0, 0x00, 0x2B, 0x30, 0xCC, 0x36, 0xB6 } } } }, // Amiga + CD Demo
@@ -184,22 +184,22 @@ const ExtractEntrySearchData k1IntroWSAStringsProvider[] = {
};
const ExtractEntrySearchData k1IntroStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x000004F5, 0x0001A7B1, { { 0xC7, 0x65, 0x5B, 0x5A, 0x56, 0x43, 0x94, 0x55, 0x5B, 0x00, 0xFD, 0x5D, 0xF4, 0xB5, 0x04, 0x15 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x000004F6, 0x0001A7B1, { { 0xDE, 0x41, 0xB1, 0x98, 0xD5, 0xAD, 0x6B, 0xBA, 0x33, 0x04, 0x19, 0x5D, 0xCC, 0x07, 0xB5, 0x56 } } } }, // CD
- { EN_ANY, kPlatformPC, { 0x000002FA, 0x00010181, { { 0x48, 0xD3, 0x1B, 0x8E, 0x8D, 0xBC, 0x1F, 0x51, 0x35, 0x71, 0xE2, 0xAB, 0xC8, 0xBE, 0xFC, 0x88 } } } }, // demo
+ { EN_ANY, kPlatformDOS, { 0x000004F5, 0x0001A7B1, { { 0xC7, 0x65, 0x5B, 0x5A, 0x56, 0x43, 0x94, 0x55, 0x5B, 0x00, 0xFD, 0x5D, 0xF4, 0xB5, 0x04, 0x15 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x000004F6, 0x0001A7B1, { { 0xDE, 0x41, 0xB1, 0x98, 0xD5, 0xAD, 0x6B, 0xBA, 0x33, 0x04, 0x19, 0x5D, 0xCC, 0x07, 0xB5, 0x56 } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x000002FA, 0x00010181, { { 0x48, 0xD3, 0x1B, 0x8E, 0x8D, 0xBC, 0x1F, 0x51, 0x35, 0x71, 0xE2, 0xAB, 0xC8, 0xBE, 0xFC, 0x88 } } } }, // demo
- { FR_FRA, kPlatformPC, { 0x000005EF, 0x000207E6, { { 0xDC, 0x6C, 0x9A, 0x7C, 0x19, 0x45, 0x2B, 0x25, 0x84, 0xCC, 0xE1, 0x40, 0xFE, 0x8E, 0xF4, 0x51 } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x000005F0, 0x000207E6, { { 0xB8, 0x51, 0xEA, 0x44, 0x64, 0x04, 0xE4, 0x6A, 0x7B, 0xBD, 0x31, 0x62, 0xC0, 0xDD, 0xEA, 0xEF } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x000005EF, 0x000207E6, { { 0xDC, 0x6C, 0x9A, 0x7C, 0x19, 0x45, 0x2B, 0x25, 0x84, 0xCC, 0xE1, 0x40, 0xFE, 0x8E, 0xF4, 0x51 } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x000005F0, 0x000207E6, { { 0xB8, 0x51, 0xEA, 0x44, 0x64, 0x04, 0xE4, 0x6A, 0x7B, 0xBD, 0x31, 0x62, 0xC0, 0xDD, 0xEA, 0xEF } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x00000605, 0x000212AB, { { 0x8F, 0x3A, 0x9D, 0x9A, 0x81, 0xF2, 0x4A, 0x90, 0xBC, 0xBD, 0x62, 0x8B, 0xD8, 0xD6, 0xF4, 0x5D } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000606, 0x000212AB, { { 0xB0, 0x78, 0x86, 0xFB, 0xCB, 0x3D, 0x1E, 0x1E, 0x86, 0xE7, 0x2C, 0x2B, 0x3A, 0x3C, 0x6F, 0x1C } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x00000605, 0x000212AB, { { 0x8F, 0x3A, 0x9D, 0x9A, 0x81, 0xF2, 0x4A, 0x90, 0xBC, 0xBD, 0x62, 0x8B, 0xD8, 0xD6, 0xF4, 0x5D } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000606, 0x000212AB, { { 0xB0, 0x78, 0x86, 0xFB, 0xCB, 0x3D, 0x1E, 0x1E, 0x86, 0xE7, 0x2C, 0x2B, 0x3A, 0x3C, 0x6F, 0x1C } } } }, // CD
- { IT_ITA, kPlatformPC, { 0x0000057C, 0x0001DF02, { { 0x4B, 0x09, 0xBC, 0xBC, 0xB3, 0x3C, 0x69, 0xEB, 0xA6, 0xB5, 0x76, 0xED, 0xC7, 0x57, 0x71, 0xB0 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x000005F0, 0x0001CF13, { { 0x4F, 0xA0, 0x47, 0x57, 0x6D, 0x2D, 0xA6, 0x62, 0x06, 0xBE, 0x86, 0xD2, 0xD7, 0xEA, 0x2E, 0xD6 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000057C, 0x0001DF02, { { 0x4B, 0x09, 0xBC, 0xBC, 0xB3, 0x3C, 0x69, 0xEB, 0xA6, 0xB5, 0x76, 0xED, 0xC7, 0x57, 0x71, 0xB0 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x000005F0, 0x0001CF13, { { 0x4F, 0xA0, 0x47, 0x57, 0x6D, 0x2D, 0xA6, 0x62, 0x06, 0xBE, 0x86, 0xD2, 0xD7, 0xEA, 0x2E, 0xD6 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x000005CF, 0x00020415, { { 0xCC, 0xE5, 0x9F, 0xB8, 0xCA, 0xFA, 0x2D, 0x05, 0xB8, 0xAF, 0x9F, 0x1F, 0x8A, 0xA8, 0x56, 0xDE } } } },
+ { ES_ESP, kPlatformDOS, { 0x000005CF, 0x00020415, { { 0xCC, 0xE5, 0x9F, 0xB8, 0xCA, 0xFA, 0x2D, 0x05, 0xB8, 0xAF, 0x9F, 0x1F, 0x8A, 0xA8, 0x56, 0xDE } } } },
- { RU_RUS, kPlatformPC, { 0x000004F6, 0x000131C6, { { 0x77, 0x76, 0x12, 0xB1, 0xDA, 0x9C, 0xA9, 0xB5, 0x21, 0x1E, 0x49, 0x08, 0x46, 0xB3, 0xE4, 0x61 } } } },
+ { RU_RUS, kPlatformDOS, { 0x000004F6, 0x000131C6, { { 0x77, 0x76, 0x12, 0xB1, 0xDA, 0x9C, 0xA9, 0xB5, 0x21, 0x1E, 0x49, 0x08, 0x46, 0xB3, 0xE4, 0x61 } } } },
{ EN_ANY, kPlatformAmiga, { 0x0000050A, 0x0001A7B1, { { 0x1B, 0x74, 0x71, 0x4C, 0xAB, 0x81, 0x10, 0x59, 0x8A, 0x21, 0x50, 0xBB, 0xFE, 0x6F, 0xD0, 0xE8 } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000626, 0x00021319, { { 0x80, 0x55, 0x54, 0x14, 0x5D, 0x6F, 0x49, 0x04, 0x4A, 0xEF, 0x92, 0xB8, 0x5B, 0x01, 0x0F, 0x97 } } } },
@@ -217,16 +217,16 @@ const ExtractEntrySearchData k1OutroHomeStringProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x00000007, 0x000003E8, { { 0x68, 0x35, 0x87, 0x53, 0xD9, 0x53, 0x1F, 0x13, 0x24, 0x61, 0x0D, 0x8D, 0x33, 0x91, 0xF3, 0x47 } } } },
- { FR_FRA, kPlatformPC, { 0x00000007, 0x00000267, { { 0xD0, 0xC1, 0x11, 0x49, 0x3D, 0x3F, 0xCE, 0x84, 0x8F, 0xEF, 0xE3, 0xFD, 0x43, 0xCA, 0x92, 0xB0 } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000007, 0x00000267, { { 0xD0, 0xC1, 0x11, 0x49, 0x3D, 0x3F, 0xCE, 0x84, 0x8F, 0xEF, 0xE3, 0xFD, 0x43, 0xCA, 0x92, 0xB0 } } } },
{ DE_DEU, kPlatformUnknown, { 0x0000000E, 0x00000473, { { 0xB6, 0xEB, 0xE8, 0x22, 0x67, 0x24, 0xA9, 0xA3, 0x94, 0x55, 0xC6, 0x57, 0x17, 0x15, 0x5B, 0x04 } } } },
- { ES_ESP, kPlatformPC, { 0x00000005, 0x00000178, { { 0x2E, 0x9C, 0x94, 0x0F, 0x29, 0x77, 0x27, 0x1D, 0x77, 0x1E, 0x5A, 0xF8, 0x0E, 0x8D, 0x09, 0x6B } } } },
- { IT_ITA, kPlatformPC, { 0x00000005, 0x00000178, { { 0x2E, 0x9C, 0x94, 0x0F, 0x29, 0x77, 0x27, 0x1D, 0x77, 0x1E, 0x5A, 0xF8, 0x0E, 0x8D, 0x09, 0x6B } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000005, 0x00000178, { { 0x2E, 0x9C, 0x94, 0x0F, 0x29, 0x77, 0x27, 0x1D, 0x77, 0x1E, 0x5A, 0xF8, 0x0E, 0x8D, 0x09, 0x6B } } } },
+ { IT_ITA, kPlatformDOS, { 0x00000005, 0x00000178, { { 0x2E, 0x9C, 0x94, 0x0F, 0x29, 0x77, 0x27, 0x1D, 0x77, 0x1E, 0x5A, 0xF8, 0x0E, 0x8D, 0x09, 0x6B } } } },
- { IT_ITA, kPlatformPC, { 0x00000007, 0x000001B8, { { 0x17, 0x95, 0x5B, 0x4F, 0xE2, 0x07, 0x5A, 0x49, 0xFA, 0xCE, 0x53, 0x8B, 0xE7, 0x46, 0x69, 0xC7 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000007, 0x000001B8, { { 0x17, 0x95, 0x5B, 0x4F, 0xE2, 0x07, 0x5A, 0x49, 0xFA, 0xCE, 0x53, 0x8B, 0xE7, 0x46, 0x69, 0xC7 } } } }, // (fan) CD
- { RU_RUS, kPlatformPC, { 0x00000005, 0x000000EF, { { 0xA0, 0xB4, 0xF2, 0x11, 0x16, 0x92, 0xC8, 0xEB, 0xF2, 0x0C, 0xFE, 0x43, 0xFE, 0x18, 0xF6, 0xBB } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000005, 0x000000EF, { { 0xA0, 0xB4, 0xF2, 0x11, 0x16, 0x92, 0xC8, 0xEB, 0xF2, 0x0C, 0xFE, 0x43, 0xFE, 0x18, 0xF6, 0xBB } } } },
EXTRACT_END_ENTRY
};
@@ -262,7 +262,7 @@ const ExtractEntrySearchData k1CharacterImageFilenamesProvider[] = {
};
const ExtractEntrySearchData k1AudioTracksProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000038, 0x00000D5C, { { 0x65, 0x35, 0x2F, 0xA3, 0x93, 0x22, 0x15, 0xA0, 0xC6, 0x2B, 0x73, 0x7C, 0x3E, 0xB8, 0x7A, 0xB5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000038, 0x00000D5C, { { 0x65, 0x35, 0x2F, 0xA3, 0x93, 0x22, 0x15, 0xA0, 0xC6, 0x2B, 0x73, 0x7C, 0x3E, 0xB8, 0x7A, 0xB5 } } } },
{ UNK_LANG, kPlatformFMTowns, { 0x0000005D, 0x0000154E, { { 0xA7, 0x7E, 0x03, 0x0A, 0x81, 0x54, 0xD2, 0x5D, 0x7B, 0x33, 0x07, 0xBF, 0x70, 0x01, 0x4B, 0x79 } } } },
@@ -270,7 +270,7 @@ const ExtractEntrySearchData k1AudioTracksProvider[] = {
};
const ExtractEntrySearchData k1AudioTracks2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000009, 0x00000363, { { 0x16, 0xA2, 0x68, 0x21, 0x04, 0xA8, 0x39, 0x7E, 0xA1, 0x7D, 0x70, 0xFD, 0x86, 0xC7, 0x69, 0x28 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000009, 0x00000363, { { 0x16, 0xA2, 0x68, 0x21, 0x04, 0xA8, 0x39, 0x7E, 0xA1, 0x7D, 0x70, 0xFD, 0x86, 0xC7, 0x69, 0x28 } } } },
EXTRACT_END_ENTRY
};
@@ -283,18 +283,18 @@ const ExtractEntrySearchData k1AudioTracksIntroProvider[] = {
};
const ExtractEntrySearchData k1ItemNamesProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000468, 0x00018B13, { { 0xCE, 0xFE, 0x19, 0x5D, 0x3F, 0xD7, 0x2A, 0xF6, 0xD0, 0xC5, 0xBC, 0x17, 0x6A, 0x52, 0xDB, 0xFE } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000468, 0x00018B13, { { 0xCE, 0xFE, 0x19, 0x5D, 0x3F, 0xD7, 0x2A, 0xF6, 0xD0, 0xC5, 0xBC, 0x17, 0x6A, 0x52, 0xDB, 0xFE } } } },
- { FR_FRA, kPlatformPC, { 0x00000506, 0x0001C3CC, { { 0x46, 0xD4, 0x19, 0x04, 0x2A, 0x46, 0xCD, 0x63, 0x41, 0x5A, 0x8E, 0xA8, 0x00, 0xDD, 0x02, 0x77 } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000506, 0x0001C3CC, { { 0x46, 0xD4, 0x19, 0x04, 0x2A, 0x46, 0xCD, 0x63, 0x41, 0x5A, 0x8E, 0xA8, 0x00, 0xDD, 0x02, 0x77 } } } },
- { DE_DEU, kPlatformPC, { 0x00000512, 0x0001DD2C, { { 0x5D, 0xB0, 0x6B, 0x8E, 0x9C, 0x70, 0x09, 0x90, 0x3C, 0xC6, 0x58, 0x1F, 0x71, 0x24, 0x76, 0x56 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000512, 0x0001DD2C, { { 0x5D, 0xB0, 0x6B, 0x8E, 0x9C, 0x70, 0x09, 0x90, 0x3C, 0xC6, 0x58, 0x1F, 0x71, 0x24, 0x76, 0x56 } } } },
- { IT_ITA, kPlatformPC, { 0x00000591, 0x0001F869, { { 0x4D, 0xD7, 0x66, 0xBB, 0x9A, 0xD8, 0x79, 0x1E, 0x92, 0x2B, 0xE5, 0xC2, 0x0F, 0x02, 0x0B, 0x35 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000506, 0x0001C1D9, { { 0xF2, 0x2D, 0x18, 0x13, 0x61, 0xFB, 0x57, 0x93, 0x5C, 0xDC, 0x79, 0x44, 0x96, 0x01, 0xA6, 0x90 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000591, 0x0001F869, { { 0x4D, 0xD7, 0x66, 0xBB, 0x9A, 0xD8, 0x79, 0x1E, 0x92, 0x2B, 0xE5, 0xC2, 0x0F, 0x02, 0x0B, 0x35 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000506, 0x0001C1D9, { { 0xF2, 0x2D, 0x18, 0x13, 0x61, 0xFB, 0x57, 0x93, 0x5C, 0xDC, 0x79, 0x44, 0x96, 0x01, 0xA6, 0x90 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000530, 0x0001D90A, { { 0x52, 0xFB, 0xA8, 0x3F, 0xA3, 0x6F, 0xC2, 0x67, 0x55, 0x9F, 0x66, 0x9F, 0xFD, 0x79, 0x44, 0xDF } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000530, 0x0001D90A, { { 0x52, 0xFB, 0xA8, 0x3F, 0xA3, 0x6F, 0xC2, 0x67, 0x55, 0x9F, 0x66, 0x9F, 0xFD, 0x79, 0x44, 0xDF } } } },
- { RU_RUS, kPlatformPC, { 0x000004AE, 0x00011888, { { 0x6F, 0x4D, 0xBE, 0xC8, 0xAE, 0x7C, 0x12, 0x3E, 0x69, 0x0B, 0x39, 0xCB, 0x4D, 0x4B, 0xA8, 0x3A } } } }, // floppy
+ { RU_RUS, kPlatformDOS, { 0x000004AE, 0x00011888, { { 0x6F, 0x4D, 0xBE, 0xC8, 0xAE, 0x7C, 0x12, 0x3E, 0x69, 0x0B, 0x39, 0xCB, 0x4D, 0x4B, 0xA8, 0x3A } } } }, // floppy
{ EN_ANY, kPlatformAmiga, { 0x00000380, 0x00012960, { { 0x2D, 0x81, 0xCF, 0x7A, 0x9D, 0x71, 0x83, 0xB7, 0xE5, 0x00, 0xB0, 0x6E, 0x25, 0x94, 0xCB, 0xA4 } } } },
{ DE_DEU, kPlatformAmiga, { 0x000003E5, 0x0001607D, { { 0x6D, 0xBE, 0xAD, 0xE5, 0xD1, 0x41, 0x6C, 0x42, 0x71, 0x79, 0x9C, 0x78, 0x93, 0x84, 0xC8, 0x11 } } } },
@@ -308,19 +308,19 @@ const ExtractEntrySearchData k1ItemNamesProvider[] = {
};
const ExtractEntrySearchData k1TakenStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000010, 0x000004C2, { { 0x08, 0xC0, 0x66, 0xB1, 0x45, 0x04, 0x78, 0xF9, 0xAF, 0x0F, 0x52, 0xC8, 0x0E, 0x0C, 0x69, 0x86 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000010, 0x000004C2, { { 0x08, 0xC0, 0x66, 0xB1, 0x45, 0x04, 0x78, 0xF9, 0xAF, 0x0F, 0x52, 0xC8, 0x0E, 0x0C, 0x69, 0x86 } } } },
- { FR_FRA, kPlatformPC, { 0x0000001E, 0x000008FA, { { 0xC9, 0xCC, 0x2E, 0x0B, 0xE4, 0xE0, 0x44, 0xBD, 0xC2, 0x10, 0x09, 0xA3, 0x36, 0xB1, 0x5D, 0x1C } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x0000000F, 0x0000047D, { { 0xE8, 0xB5, 0x15, 0xD5, 0x96, 0x81, 0xD2, 0x84, 0xAB, 0x33, 0xC1, 0x1C, 0x47, 0x1B, 0xFE, 0xDB } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x0000001E, 0x000008FA, { { 0xC9, 0xCC, 0x2E, 0x0B, 0xE4, 0xE0, 0x44, 0xBD, 0xC2, 0x10, 0x09, 0xA3, 0x36, 0xB1, 0x5D, 0x1C } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x0000000F, 0x0000047D, { { 0xE8, 0xB5, 0x15, 0xD5, 0x96, 0x81, 0xD2, 0x84, 0xAB, 0x33, 0xC1, 0x1C, 0x47, 0x1B, 0xFE, 0xDB } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x0000001C, 0x000009C0, { { 0xA8, 0x64, 0xDD, 0x9D, 0x91, 0x42, 0x04, 0x26, 0xD0, 0x80, 0x40, 0xED, 0x08, 0x51, 0xC9, 0xBB } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000001C, 0x000009C0, { { 0xA8, 0x64, 0xDD, 0x9D, 0x91, 0x42, 0x04, 0x26, 0xD0, 0x80, 0x40, 0xED, 0x08, 0x51, 0xC9, 0xBB } } } },
- { IT_ITA, kPlatformPC, { 0x00000014, 0x00000588, { { 0x5B, 0x75, 0xAE, 0xD7, 0x50, 0x6C, 0x3E, 0x65, 0x5C, 0xF8, 0x84, 0x34, 0x48, 0x58, 0x0E, 0x6E } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000000F, 0x000002F0, { { 0x37, 0x22, 0x62, 0xE4, 0x1B, 0x1F, 0xD6, 0x9E, 0x94, 0xA3, 0x41, 0x00, 0xD5, 0x29, 0x28, 0x09 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000014, 0x00000588, { { 0x5B, 0x75, 0xAE, 0xD7, 0x50, 0x6C, 0x3E, 0x65, 0x5C, 0xF8, 0x84, 0x34, 0x48, 0x58, 0x0E, 0x6E } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000000F, 0x000002F0, { { 0x37, 0x22, 0x62, 0xE4, 0x1B, 0x1F, 0xD6, 0x9E, 0x94, 0xA3, 0x41, 0x00, 0xD5, 0x29, 0x28, 0x09 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000014, 0x000005D8, { { 0xD6, 0x00, 0x90, 0x6A, 0x75, 0x3B, 0xF1, 0xFE, 0xF4, 0x3E, 0x0E, 0x1D, 0x39, 0xEB, 0x2D, 0xC8 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000014, 0x000005D8, { { 0xD6, 0x00, 0x90, 0x6A, 0x75, 0x3B, 0xF1, 0xFE, 0xF4, 0x3E, 0x0E, 0x1D, 0x39, 0xEB, 0x2D, 0xC8 } } } },
- { RU_RUS, kPlatformPC, { 0x00000010, 0x00000262, { { 0x1E, 0x90, 0x20, 0xC8, 0xD3, 0x08, 0x53, 0x4F, 0x28, 0x95, 0x6A, 0xA4, 0x14, 0x37, 0x05, 0xF0 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000010, 0x00000262, { { 0x1E, 0x90, 0x20, 0xC8, 0xD3, 0x08, 0x53, 0x4F, 0x28, 0x95, 0x6A, 0xA4, 0x14, 0x37, 0x05, 0xF0 } } } },
{ EN_ANY, kPlatformAmiga, { 0x00000008, 0x00000261, { { 0x93, 0x5B, 0x79, 0xE8, 0x89, 0x8E, 0xB5, 0x37, 0x39, 0x2A, 0xB0, 0x04, 0x98, 0x80, 0x5A, 0x4E } } } },
{ DE_DEU, kPlatformAmiga, { 0x0000000E, 0x000004E0, { { 0x52, 0x4D, 0x74, 0x91, 0x70, 0x0D, 0x4C, 0x40, 0x5C, 0x7E, 0xBA, 0xDA, 0x24, 0x49, 0xF3, 0x1A } } } },
@@ -338,16 +338,16 @@ const ExtractEntrySearchData k1PlacedStringsProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x0000000D, 0x0000074C, { { 0x0E, 0x1C, 0x1F, 0xD2, 0xCF, 0xBF, 0x40, 0xE1, 0x59, 0x0F, 0x1B, 0x46, 0xED, 0x8B, 0x96, 0x8E } } } },
- { FR_FRA, kPlatformPC, { 0x00000011, 0x00000545, { { 0x05, 0xEF, 0x74, 0x54, 0x06, 0xB7, 0x64, 0x47, 0x21, 0x56, 0x55, 0x74, 0x70, 0x2D, 0xA8, 0x23 } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000011, 0x00000545, { { 0x05, 0xEF, 0x74, 0x54, 0x06, 0xB7, 0x64, 0x47, 0x21, 0x56, 0x55, 0x74, 0x70, 0x2D, 0xA8, 0x23 } } } },
{ DE_DEU, kPlatformUnknown, { 0x0000000B, 0x00000389, { { 0xB9, 0x74, 0xBE, 0x63, 0xB4, 0xA4, 0x8A, 0x04, 0xD9, 0x50, 0x73, 0xB7, 0x01, 0x9E, 0x77, 0xD3 } } } },
- { IT_ITA, kPlatformPC, { 0x0000000D, 0x0000040D, { { 0x9C, 0x71, 0x53, 0x35, 0xC3, 0xE8, 0x46, 0xB9, 0xD2, 0xFA, 0x1C, 0x8C, 0xC3, 0xFF, 0xBC, 0x1F } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000011, 0x000003B8, { { 0xC8, 0xA6, 0xE4, 0x8A, 0xF7, 0x4C, 0x3F, 0xA6, 0x24, 0x7F, 0xEF, 0xE4, 0x63, 0x8B, 0x72, 0xF3 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000000D, 0x0000040D, { { 0x9C, 0x71, 0x53, 0x35, 0xC3, 0xE8, 0x46, 0xB9, 0xD2, 0xFA, 0x1C, 0x8C, 0xC3, 0xFF, 0xBC, 0x1F } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000011, 0x000003B8, { { 0xC8, 0xA6, 0xE4, 0x8A, 0xF7, 0x4C, 0x3F, 0xA6, 0x24, 0x7F, 0xEF, 0xE4, 0x63, 0x8B, 0x72, 0xF3 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000000D, 0x00000439, { { 0x57, 0xAE, 0x1C, 0xC1, 0xF5, 0xE8, 0x5B, 0x9E, 0x90, 0x02, 0xB9, 0x8D, 0x86, 0x38, 0xFB, 0xA8 } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000000D, 0x00000439, { { 0x57, 0xAE, 0x1C, 0xC1, 0xF5, 0xE8, 0x5B, 0x9E, 0x90, 0x02, 0xB9, 0x8D, 0x86, 0x38, 0xFB, 0xA8 } } } },
- { RU_RUS, kPlatformPC, { 0x00000009, 0x00000203, { { 0x7D, 0xAE, 0x67, 0x94, 0x8E, 0x73, 0x35, 0xC1, 0x11, 0xB4, 0x55, 0x6E, 0x92, 0x25, 0x39, 0xE4 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000009, 0x00000203, { { 0x7D, 0xAE, 0x67, 0x94, 0x8E, 0x73, 0x35, 0xC1, 0x11, 0xB4, 0x55, 0x6E, 0x92, 0x25, 0x39, 0xE4 } } } },
EXTRACT_END_ENTRY
};
@@ -357,31 +357,31 @@ const ExtractEntrySearchData k1DroppedStringsProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x0000000B, 0x0000059F, { { 0xDD, 0x5E, 0x51, 0x7E, 0xD9, 0xFC, 0xCD, 0xAD, 0x6B, 0x93, 0x71, 0xBE, 0x83, 0x63, 0x3F, 0x88 } } } },
- { FR_FRA, kPlatformPC, { 0x00000011, 0x00000579, { { 0x3D, 0x0C, 0x3C, 0xAD, 0x2E, 0xE3, 0x7A, 0x5A, 0x4A, 0x21, 0x1C, 0x96, 0xC5, 0x5A, 0xA7, 0x9E } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000011, 0x00000579, { { 0x3D, 0x0C, 0x3C, 0xAD, 0x2E, 0xE3, 0x7A, 0x5A, 0x4A, 0x21, 0x1C, 0x96, 0xC5, 0x5A, 0xA7, 0x9E } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000011, 0x00000612, { { 0xEC, 0xCD, 0x99, 0x58, 0xF7, 0x08, 0x92, 0x43, 0x95, 0x10, 0x6B, 0xDD, 0x61, 0xF7, 0x5C, 0xA4 } } } },
- { IT_ITA, kPlatformPC, { 0x0000000B, 0x0000031B, { { 0x32, 0x0C, 0xCD, 0x83, 0xF6, 0x97, 0xC8, 0x76, 0x57, 0x6B, 0x7C, 0xAD, 0x51, 0xEB, 0x91, 0x1F } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000011, 0x000003B8, { { 0xC8, 0xA6, 0xE4, 0x8A, 0xF7, 0x4C, 0x3F, 0xA6, 0x24, 0x7F, 0xEF, 0xE4, 0x63, 0x8B, 0x72, 0xF3 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000000B, 0x0000031B, { { 0x32, 0x0C, 0xCD, 0x83, 0xF6, 0x97, 0xC8, 0x76, 0x57, 0x6B, 0x7C, 0xAD, 0x51, 0xEB, 0x91, 0x1F } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000011, 0x000003B8, { { 0xC8, 0xA6, 0xE4, 0x8A, 0xF7, 0x4C, 0x3F, 0xA6, 0x24, 0x7F, 0xEF, 0xE4, 0x63, 0x8B, 0x72, 0xF3 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000008, 0x00000261, { { 0x1D, 0xB5, 0xFB, 0x23, 0x94, 0xA7, 0x86, 0x7A, 0xAC, 0x53, 0xDA, 0x6F, 0xCC, 0x41, 0x0F, 0xD7 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000008, 0x00000261, { { 0x1D, 0xB5, 0xFB, 0x23, 0x94, 0xA7, 0x86, 0x7A, 0xAC, 0x53, 0xDA, 0x6F, 0xCC, 0x41, 0x0F, 0xD7 } } } },
- { RU_RUS, kPlatformPC, { 0x0000000A, 0x000001F5, { { 0xAA, 0x21, 0x88, 0x6D, 0xD0, 0xAB, 0x5C, 0x15, 0x7F, 0xAD, 0x0E, 0x3B, 0x2F, 0x17, 0xBF, 0xAD } } } },
+ { RU_RUS, kPlatformDOS, { 0x0000000A, 0x000001F5, { { 0xAA, 0x21, 0x88, 0x6D, 0xD0, 0xAB, 0x5C, 0x15, 0x7F, 0xAD, 0x0E, 0x3B, 0x2F, 0x17, 0xBF, 0xAD } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k1NoDropStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000047, 0x00001881, { { 0xEF, 0x81, 0x2B, 0x8F, 0x06, 0x0C, 0xA6, 0xBA, 0x50, 0x9C, 0x99, 0x40, 0x53, 0xFD, 0xC1, 0x55 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000047, 0x00001881, { { 0xEF, 0x81, 0x2B, 0x8F, 0x06, 0x0C, 0xA6, 0xBA, 0x50, 0x9C, 0x99, 0x40, 0x53, 0xFD, 0xC1, 0x55 } } } },
- { FR_FRA, kPlatformPC, { 0x0000004C, 0x00001B39, { { 0xFF, 0xD5, 0x5D, 0x1C, 0xF1, 0x8A, 0xA4, 0x21, 0xB1, 0x56, 0x2B, 0xAC, 0x9F, 0x40, 0x30, 0x53 } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000004C, 0x00001B39, { { 0xFF, 0xD5, 0x5D, 0x1C, 0xF1, 0x8A, 0xA4, 0x21, 0xB1, 0x56, 0x2B, 0xAC, 0x9F, 0x40, 0x30, 0x53 } } } },
- { DE_DEU, kPlatformPC, { 0x0000004C, 0x00001AFF, { { 0xE5, 0x05, 0x79, 0x10, 0x91, 0x95, 0x64, 0x40, 0xB2, 0x73, 0x39, 0xFA, 0x50, 0x8D, 0xCE, 0x8A } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000004C, 0x00001AFF, { { 0xE5, 0x05, 0x79, 0x10, 0x91, 0x95, 0x64, 0x40, 0xB2, 0x73, 0x39, 0xFA, 0x50, 0x8D, 0xCE, 0x8A } } } },
- { IT_ITA, kPlatformPC, { 0x00000045, 0x00001850, { { 0x50, 0x34, 0x82, 0xA9, 0x28, 0xDE, 0x44, 0xB3, 0x2D, 0x59, 0x0B, 0x7F, 0xCE, 0x42, 0x1F, 0x73 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000004C, 0x00001650, { { 0x42, 0x7A, 0x04, 0xCD, 0x69, 0xB1, 0x06, 0x9A, 0xD8, 0x7E, 0x7A, 0x14, 0x5B, 0x1C, 0x70, 0xB8 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000045, 0x00001850, { { 0x50, 0x34, 0x82, 0xA9, 0x28, 0xDE, 0x44, 0xB3, 0x2D, 0x59, 0x0B, 0x7F, 0xCE, 0x42, 0x1F, 0x73 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000004C, 0x00001650, { { 0x42, 0x7A, 0x04, 0xCD, 0x69, 0xB1, 0x06, 0x9A, 0xD8, 0x7E, 0x7A, 0x14, 0x5B, 0x1C, 0x70, 0xB8 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000003D, 0x000015FA, { { 0x87, 0x2E, 0xE6, 0x8A, 0xF1, 0xC9, 0xC9, 0xEC, 0xD3, 0x2C, 0x25, 0x7E, 0x36, 0x02, 0xF7, 0xAC } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000003D, 0x000015FA, { { 0x87, 0x2E, 0xE6, 0x8A, 0xF1, 0xC9, 0xC9, 0xEC, 0xD3, 0x2C, 0x25, 0x7E, 0x36, 0x02, 0xF7, 0xAC } } } },
{ EN_ANY, kPlatformAmiga, { 0x00000048, 0x00001881, { { 0x69, 0xA8, 0x0B, 0x47, 0xFD, 0xA0, 0x94, 0x12, 0x82, 0x1D, 0xE0, 0x9C, 0xB1, 0x10, 0x6D, 0x11 } } } },
{ DE_DEU, kPlatformAmiga, { 0x0000004D, 0x00001AFF, { { 0xF8, 0x83, 0x2E, 0x08, 0x88, 0x7B, 0x72, 0x7F, 0x71, 0xD4, 0x05, 0xF3, 0x1A, 0x78, 0xF1, 0x9D } } } },
@@ -399,35 +399,35 @@ const ExtractEntrySearchData k1PutDownStringProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x00000029, 0x0000187D, { { 0xDE, 0xEE, 0x66, 0x88, 0x57, 0xF5, 0xF9, 0x2E, 0xD2, 0x14, 0xF5, 0x83, 0xA0, 0x0D, 0x96, 0x86 } } } },
- { FR_FRA, kPlatformPC, { 0x0000002E, 0x0000101D, { { 0xBC, 0xEA, 0x6C, 0x1F, 0x31, 0xCF, 0x30, 0x26, 0x2D, 0x24, 0xC5, 0xEA, 0x97, 0x49, 0xDC, 0x4C } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000002E, 0x0000101D, { { 0xBC, 0xEA, 0x6C, 0x1F, 0x31, 0xCF, 0x30, 0x26, 0x2D, 0x24, 0xC5, 0xEA, 0x97, 0x49, 0xDC, 0x4C } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000028, 0x00000E7E, { { 0x26, 0x93, 0x76, 0x37, 0x41, 0x2E, 0xF3, 0xED, 0xF5, 0x7B, 0xA7, 0xEB, 0x80, 0x61, 0x3B, 0x84 } } } },
- { IT_ITA, kPlatformPC, { 0x00000034, 0x0000131D, { { 0x36, 0x87, 0x4D, 0x73, 0x2A, 0x67, 0xBA, 0xCE, 0xCB, 0x33, 0x3C, 0x10, 0xCC, 0x3E, 0x7E, 0xAD } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000002E, 0x00000EB2, { { 0x14, 0x08, 0xE6, 0xD1, 0x54, 0x76, 0x2A, 0x9E, 0xBE, 0x5A, 0x15, 0xEB, 0x52, 0x01, 0x52, 0x97 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000034, 0x0000131D, { { 0x36, 0x87, 0x4D, 0x73, 0x2A, 0x67, 0xBA, 0xCE, 0xCB, 0x33, 0x3C, 0x10, 0xCC, 0x3E, 0x7E, 0xAD } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000002E, 0x00000EB2, { { 0x14, 0x08, 0xE6, 0xD1, 0x54, 0x76, 0x2A, 0x9E, 0xBE, 0x5A, 0x15, 0xEB, 0x52, 0x01, 0x52, 0x97 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000002D, 0x00001052, { { 0x12, 0x0A, 0x23, 0x11, 0xDF, 0x8A, 0x59, 0xD4, 0xF2, 0xCA, 0xA5, 0xA7, 0x76, 0x1B, 0x54, 0xB6 } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000002D, 0x00001052, { { 0x12, 0x0A, 0x23, 0x11, 0xDF, 0x8A, 0x59, 0xD4, 0xF2, 0xCA, 0xA5, 0xA7, 0x76, 0x1B, 0x54, 0xB6 } } } },
- { RU_RUS, kPlatformPC, { 0x00000024, 0x0000099F, { { 0x05, 0xD7, 0xB8, 0x32, 0x95, 0x93, 0x29, 0x5F, 0xF3, 0x1A, 0xF0, 0x2E, 0xBA, 0x3A, 0x0D, 0x27 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000024, 0x0000099F, { { 0x05, 0xD7, 0xB8, 0x32, 0x95, 0x93, 0x29, 0x5F, 0xF3, 0x1A, 0xF0, 0x2E, 0xBA, 0x3A, 0x0D, 0x27 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k1WaitAmuletStringProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000003D, 0x0000150D, { { 0x11, 0xC8, 0x7E, 0x83, 0x7A, 0xC3, 0x5D, 0xD9, 0x72, 0xFC, 0x75, 0xCB, 0x57, 0xE9, 0xF1, 0x36 } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000003D, 0x0000150D, { { 0x11, 0xC8, 0x7E, 0x83, 0x7A, 0xC3, 0x5D, 0xD9, 0x72, 0xFC, 0x75, 0xCB, 0x57, 0xE9, 0xF1, 0x36 } } } },
{ JA_JPN, kPlatformUnknown, { 0x00000029, 0x000017A7, { { 0xFD, 0xA3, 0xAD, 0x24, 0x16, 0x49, 0x22, 0x6F, 0x52, 0xE9, 0x50, 0x11, 0x51, 0x38, 0xCA, 0xE0 } } } },
- { FR_FRA, kPlatformPC, { 0x00000049, 0x00001ADD, { { 0xFD, 0xCF, 0x9C, 0xAD, 0xA2, 0xAA, 0x74, 0x11, 0x8E, 0x89, 0x02, 0xCB, 0x2B, 0x5B, 0x2B, 0x1C } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000049, 0x00001ADD, { { 0xFD, 0xCF, 0x9C, 0xAD, 0xA2, 0xAA, 0x74, 0x11, 0x8E, 0x89, 0x02, 0xCB, 0x2B, 0x5B, 0x2B, 0x1C } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000048, 0x000019CF, { { 0x82, 0xDD, 0xBD, 0xA3, 0xD0, 0xE0, 0x19, 0xC0, 0x6D, 0xC5, 0xEE, 0x7A, 0x0B, 0x49, 0x06, 0xCE } } } },
- { IT_ITA, kPlatformPC, { 0x0000004A, 0x00001B4C, { { 0x38, 0x26, 0x54, 0x10, 0x3D, 0x32, 0xCD, 0xAE, 0x3F, 0x96, 0xFE, 0x6F, 0x4A, 0x94, 0x72, 0xB0 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000049, 0x0000184F, { { 0x11, 0x42, 0xB2, 0xD6, 0x76, 0xEA, 0xF9, 0xCA, 0x46, 0xE4, 0xA6, 0x35, 0xE8, 0xB9, 0x8B, 0xE9 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000004A, 0x00001B4C, { { 0x38, 0x26, 0x54, 0x10, 0x3D, 0x32, 0xCD, 0xAE, 0x3F, 0x96, 0xFE, 0x6F, 0x4A, 0x94, 0x72, 0xB0 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000049, 0x0000184F, { { 0x11, 0x42, 0xB2, 0xD6, 0x76, 0xEA, 0xF9, 0xCA, 0x46, 0xE4, 0xA6, 0x35, 0xE8, 0xB9, 0x8B, 0xE9 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000042, 0x000017FD, { { 0x0A, 0x8A, 0x7E, 0x9A, 0x5F, 0x4A, 0x35, 0x06, 0x4D, 0x6B, 0xBF, 0x29, 0x1B, 0xAD, 0xD8, 0x37 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000042, 0x000017FD, { { 0x0A, 0x8A, 0x7E, 0x9A, 0x5F, 0x4A, 0x35, 0x06, 0x4D, 0x6B, 0xBF, 0x29, 0x1B, 0xAD, 0xD8, 0x37 } } } },
- { RU_RUS, kPlatformPC, { 0x0000003C, 0x00000EF1, { { 0xC1, 0x0A, 0xFA, 0xBB, 0x65, 0xC3, 0x31, 0xC9, 0x80, 0x9B, 0x0C, 0x16, 0xED, 0xBF, 0x47, 0xFA } } } },
+ { RU_RUS, kPlatformDOS, { 0x0000003C, 0x00000EF1, { { 0xC1, 0x0A, 0xFA, 0xBB, 0x65, 0xC3, 0x31, 0xC9, 0x80, 0x9B, 0x0C, 0x16, 0xED, 0xBF, 0x47, 0xFA } } } },
{ EN_ANY, kPlatformUnknown, { 0x0000003E, 0x0000150D, { { 0xA8, 0xBF, 0x99, 0x9B, 0xC1, 0x36, 0x21, 0x47, 0x6D, 0x99, 0x4F, 0x34, 0xE6, 0x61, 0x47, 0xFD } } } }, // Amiga + FM-TOWNS
@@ -435,20 +435,20 @@ const ExtractEntrySearchData k1WaitAmuletStringProvider[] = {
};
const ExtractEntrySearchData k1BlackJewelStringProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000023, 0x00000B73, { { 0xBE, 0xE9, 0xBD, 0x65, 0xB9, 0xB1, 0xCD, 0xF0, 0x45, 0x03, 0x01, 0x70, 0xBE, 0xD0, 0x0F, 0x80 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000023, 0x00000B73, { { 0xBE, 0xE9, 0xBD, 0x65, 0xB9, 0xB1, 0xCD, 0xF0, 0x45, 0x03, 0x01, 0x70, 0xBE, 0xD0, 0x0F, 0x80 } } } },
{ JA_JPN, kPlatformUnknown, { 0x00000035, 0x0000205F, { { 0x33, 0xD6, 0x19, 0xEE, 0xEA, 0xDD, 0x9F, 0xB5, 0x77, 0x0C, 0x8E, 0x84, 0x5E, 0x61, 0x22, 0x3E } } } },
- { FR_FRA, kPlatformPC, { 0x0000002B, 0x00000F11, { { 0x68, 0xA0, 0xA3, 0xA0, 0xB6, 0xD1, 0x40, 0x22, 0xB4, 0x10, 0x3D, 0x5A, 0x7F, 0x1F, 0x4B, 0xE7 } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000002B, 0x00000F11, { { 0x68, 0xA0, 0xA3, 0xA0, 0xB6, 0xD1, 0x40, 0x22, 0xB4, 0x10, 0x3D, 0x5A, 0x7F, 0x1F, 0x4B, 0xE7 } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000031, 0x0000113B, { { 0xA5, 0x00, 0xD1, 0xDC, 0x25, 0x99, 0x3E, 0x6B, 0xFF, 0xC8, 0x6C, 0xDA, 0xA4, 0xCF, 0x51, 0xD7 } } } },
- { IT_ITA, kPlatformPC, { 0x00000022, 0x00000B6E, { { 0xAE, 0xA0, 0xDF, 0x07, 0xDD, 0x88, 0x98, 0x6B, 0xDD, 0x9E, 0x2E, 0xC0, 0xBD, 0x45, 0x2E, 0x2B } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000002B, 0x00000D6D, { { 0x08, 0x5E, 0x1F, 0xA8, 0x8F, 0x1F, 0x6A, 0xE0, 0xF3, 0x49, 0xEF, 0x44, 0xA8, 0xCD, 0xDE, 0x45 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000022, 0x00000B6E, { { 0xAE, 0xA0, 0xDF, 0x07, 0xDD, 0x88, 0x98, 0x6B, 0xDD, 0x9E, 0x2E, 0xC0, 0xBD, 0x45, 0x2E, 0x2B } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000002B, 0x00000D6D, { { 0x08, 0x5E, 0x1F, 0xA8, 0x8F, 0x1F, 0x6A, 0xE0, 0xF3, 0x49, 0xEF, 0x44, 0xA8, 0xCD, 0xDE, 0x45 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000025, 0x00000CF6, { { 0x4B, 0x13, 0x39, 0xCB, 0x3F, 0x44, 0x18, 0x46, 0x43, 0xDB, 0x94, 0xC5, 0x3E, 0x6B, 0xC4, 0x74 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000025, 0x00000CF6, { { 0x4B, 0x13, 0x39, 0xCB, 0x3F, 0x44, 0x18, 0x46, 0x43, 0xDB, 0x94, 0xC5, 0x3E, 0x6B, 0xC4, 0x74 } } } },
- { RU_RUS, kPlatformPC, { 0x00000021, 0x000007FF, { { 0x3F, 0x26, 0xB4, 0xB4, 0x11, 0x0C, 0xEF, 0xC0, 0x6A, 0xD1, 0xCC, 0x0E, 0x68, 0x7D, 0xA5, 0x1A } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000021, 0x000007FF, { { 0x3F, 0x26, 0xB4, 0xB4, 0x11, 0x0C, 0xEF, 0xC0, 0x6A, 0xD1, 0xCC, 0x0E, 0x68, 0x7D, 0xA5, 0x1A } } } },
{ EN_ANY, kPlatformUnknown, { 0x00000024, 0x00000B73, { { 0x8D, 0x57, 0x5F, 0x93, 0x85, 0x75, 0xF2, 0xD8, 0x36, 0xC2, 0x7C, 0x0E, 0x3B, 0xEA, 0xE0, 0x0A } } } }, // Amiga + FM-TOWNS
@@ -456,19 +456,19 @@ const ExtractEntrySearchData k1BlackJewelStringProvider[] = {
};
const ExtractEntrySearchData k1PoisonGoneStringProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000002D, 0x00000F59, { { 0x9A, 0x88, 0x07, 0x5A, 0x9C, 0xC3, 0x7B, 0xB0, 0x79, 0x69, 0xE0, 0x84, 0x11, 0x9B, 0x82, 0xCD } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000002D, 0x00000F59, { { 0x9A, 0x88, 0x07, 0x5A, 0x9C, 0xC3, 0x7B, 0xB0, 0x79, 0x69, 0xE0, 0x84, 0x11, 0x9B, 0x82, 0xCD } } } },
- { FR_FRA, kPlatformPC, { 0x00000059, 0x00001E91, { { 0xDA, 0x9C, 0xC4, 0x7A, 0x79, 0x73, 0x60, 0xBF, 0x31, 0xF8, 0x8F, 0xAF, 0xC1, 0x4D, 0x25, 0xEC } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x0000002A, 0x00000EAA, { { 0x0B, 0x4E, 0xDF, 0x03, 0x9E, 0x64, 0x3B, 0x13, 0x10, 0x6A, 0xF9, 0x4C, 0x66, 0x0D, 0x09, 0xC5 } } } }, // (fan) CD
+ { FR_FRA, kPlatformDOS, { 0x00000059, 0x00001E91, { { 0xDA, 0x9C, 0xC4, 0x7A, 0x79, 0x73, 0x60, 0xBF, 0x31, 0xF8, 0x8F, 0xAF, 0xC1, 0x4D, 0x25, 0xEC } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x0000002A, 0x00000EAA, { { 0x0B, 0x4E, 0xDF, 0x03, 0x9E, 0x64, 0x3B, 0x13, 0x10, 0x6A, 0xF9, 0x4C, 0x66, 0x0D, 0x09, 0xC5 } } } }, // (fan) CD
- { DE_DEU, kPlatformPC, { 0x00000036, 0x00001324, { { 0x30, 0x67, 0xEE, 0x7C, 0x4D, 0x36, 0xFE, 0x46, 0x05, 0x44, 0x23, 0xA1, 0xB4, 0x07, 0x16, 0xB5 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000036, 0x00001324, { { 0x30, 0x67, 0xEE, 0x7C, 0x4D, 0x36, 0xFE, 0x46, 0x05, 0x44, 0x23, 0xA1, 0xB4, 0x07, 0x16, 0xB5 } } } },
- { IT_ITA, kPlatformPC, { 0x00000034, 0x0000128D, { { 0x4E, 0x54, 0xFE, 0x58, 0x7F, 0x15, 0xFA, 0xC1, 0x50, 0xF8, 0x47, 0x29, 0x15, 0xE8, 0x83, 0xC7 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000002A, 0x00000DFD, { { 0x57, 0xDC, 0xE0, 0x45, 0x2E, 0x89, 0x77, 0x7F, 0x4B, 0x41, 0xCF, 0x4A, 0xFE, 0x0B, 0xAF, 0xC1 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000034, 0x0000128D, { { 0x4E, 0x54, 0xFE, 0x58, 0x7F, 0x15, 0xFA, 0xC1, 0x50, 0xF8, 0x47, 0x29, 0x15, 0xE8, 0x83, 0xC7 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000002A, 0x00000DFD, { { 0x57, 0xDC, 0xE0, 0x45, 0x2E, 0x89, 0x77, 0x7F, 0x4B, 0x41, 0xCF, 0x4A, 0xFE, 0x0B, 0xAF, 0xC1 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000033, 0x0000127E, { { 0x67, 0xEB, 0xD3, 0x00, 0xF8, 0x4F, 0xF1, 0x79, 0x48, 0xE6, 0x9C, 0xB2, 0xA7, 0xCF, 0x76, 0x07 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000033, 0x0000127E, { { 0x67, 0xEB, 0xD3, 0x00, 0xF8, 0x4F, 0xF1, 0x79, 0x48, 0xE6, 0x9C, 0xB2, 0xA7, 0xCF, 0x76, 0x07 } } } },
- { RU_RUS, kPlatformPC, { 0x00000027, 0x00000952, { { 0x36, 0x64, 0x30, 0x1C, 0x5A, 0xC0, 0x0D, 0x73, 0xE5, 0xA6, 0x2F, 0xD8, 0x64, 0x98, 0x81, 0x56 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000027, 0x00000952, { { 0x36, 0x64, 0x30, 0x1C, 0x5A, 0xC0, 0x0D, 0x73, 0xE5, 0xA6, 0x2F, 0xD8, 0x64, 0x98, 0x81, 0x56 } } } },
{ EN_ANY, kPlatformAmiga, { 0x0000002E, 0x00000F59, { { 0xAD, 0x95, 0xF3, 0xA7, 0xBB, 0x04, 0x08, 0x77, 0xD0, 0x71, 0xFC, 0x8B, 0x33, 0x2A, 0x6D, 0xD3 } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000037, 0x00001324, { { 0xB3, 0xE6, 0x0A, 0x49, 0x37, 0x73, 0x3C, 0xAF, 0x78, 0x9E, 0x7D, 0x13, 0x75, 0xAE, 0xA8, 0x89 } } } },
@@ -482,20 +482,20 @@ const ExtractEntrySearchData k1PoisonGoneStringProvider[] = {
};
const ExtractEntrySearchData k1HealingTipStringProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000002D, 0x00000F04, { { 0xC0, 0xC7, 0x0C, 0x3D, 0xA7, 0x62, 0x14, 0xFB, 0xE8, 0x52, 0x05, 0x0D, 0xFE, 0xF6, 0xC7, 0x28 } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000002D, 0x00000F04, { { 0xC0, 0xC7, 0x0C, 0x3D, 0xA7, 0x62, 0x14, 0xFB, 0xE8, 0x52, 0x05, 0x0D, 0xFE, 0xF6, 0xC7, 0x28 } } } },
{ JA_JPN, kPlatformUnknown, { 0x0000002B, 0x00001949, { { 0xC7, 0xE3, 0x0A, 0x6B, 0x8F, 0xCA, 0xBC, 0x3A, 0xDC, 0x76, 0x48, 0xD3, 0x8B, 0xD9, 0x44, 0x2E } } } },
- { FR_FRA, kPlatformPC, { 0x00000036, 0x0000132C, { { 0x86, 0x65, 0x80, 0x10, 0x40, 0x32, 0x6C, 0x2F, 0x5E, 0x76, 0xFB, 0xDC, 0x19, 0x33, 0x02, 0x3C } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000036, 0x0000132C, { { 0x86, 0x65, 0x80, 0x10, 0x40, 0x32, 0x6C, 0x2F, 0x5E, 0x76, 0xFB, 0xDC, 0x19, 0x33, 0x02, 0x3C } } } },
{ DE_DEU, kPlatformUnknown, { 0x0000003C, 0x00001537, { { 0x78, 0xC2, 0x76, 0x24, 0x0D, 0x1F, 0xC0, 0x13, 0x4E, 0x34, 0x0A, 0x50, 0x4C, 0x35, 0x7E, 0xB1 } } } },
- { IT_ITA, kPlatformPC, { 0x0000003F, 0x0000170E, { { 0x0B, 0x37, 0xA4, 0x5E, 0x05, 0x4A, 0x96, 0x1F, 0x2E, 0x02, 0x43, 0xBE, 0xCC, 0xF9, 0x21, 0x5E } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000036, 0x00001364, { { 0x59, 0x70, 0x13, 0x8D, 0x93, 0x9C, 0x1B, 0x69, 0x2F, 0x13, 0x9A, 0xB2, 0x4C, 0x97, 0x7E, 0x95 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000003F, 0x0000170E, { { 0x0B, 0x37, 0xA4, 0x5E, 0x05, 0x4A, 0x96, 0x1F, 0x2E, 0x02, 0x43, 0xBE, 0xCC, 0xF9, 0x21, 0x5E } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000036, 0x00001364, { { 0x59, 0x70, 0x13, 0x8D, 0x93, 0x9C, 0x1B, 0x69, 0x2F, 0x13, 0x9A, 0xB2, 0x4C, 0x97, 0x7E, 0x95 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000028, 0x00000E0F, { { 0x3E, 0x40, 0xCA, 0x2A, 0x5F, 0xFE, 0x74, 0x30, 0x8C, 0x31, 0x41, 0x09, 0xBD, 0xFD, 0xA3, 0x7E } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000028, 0x00000E0F, { { 0x3E, 0x40, 0xCA, 0x2A, 0x5F, 0xFE, 0x74, 0x30, 0x8C, 0x31, 0x41, 0x09, 0xBD, 0xFD, 0xA3, 0x7E } } } },
- { RU_RUS, kPlatformPC, { 0x00000026, 0x000008EE, { { 0x7C, 0xC0, 0x62, 0x39, 0x66, 0x9E, 0x63, 0xCD, 0x21, 0x3D, 0x72, 0x91, 0xB8, 0xB9, 0xB6, 0x92 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000026, 0x000008EE, { { 0x7C, 0xC0, 0x62, 0x39, 0x66, 0x9E, 0x63, 0xCD, 0x21, 0x3D, 0x72, 0x91, 0xB8, 0xB9, 0xB6, 0x92 } } } },
{ EN_ANY, kPlatformUnknown, { 0x0000002E, 0x00000F04, { { 0x95, 0x39, 0x36, 0x89, 0xC4, 0x60, 0x7C, 0x0C, 0xDC, 0x06, 0xF7, 0x86, 0x1A, 0xF7, 0x93, 0x2B } } } }, // Amiga + FM-TOWNS
@@ -503,22 +503,22 @@ const ExtractEntrySearchData k1HealingTipStringProvider[] = {
};
const ExtractEntrySearchData k1WispJewelStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000053, 0x00001C62, { { 0x9A, 0xF1, 0xCC, 0xB3, 0x09, 0xF0, 0x9C, 0x33, 0x0E, 0xF0, 0xE3, 0xF8, 0x24, 0x63, 0x40, 0x95 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000052, 0x00001CE8, { { 0x6D, 0x69, 0x6D, 0x15, 0x4F, 0xF1, 0xD8, 0xA6, 0x53, 0x9F, 0xE3, 0x77, 0x75, 0x25, 0xE7, 0x93 } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x00000053, 0x00001C62, { { 0x9A, 0xF1, 0xCC, 0xB3, 0x09, 0xF0, 0x9C, 0x33, 0x0E, 0xF0, 0xE3, 0xF8, 0x24, 0x63, 0x40, 0x95 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000052, 0x00001CE8, { { 0x6D, 0x69, 0x6D, 0x15, 0x4F, 0xF1, 0xD8, 0xA6, 0x53, 0x9F, 0xE3, 0x77, 0x75, 0x25, 0xE7, 0x93 } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x0000005B, 0x00001E9A, { { 0xC1, 0x26, 0xF3, 0x64, 0x18, 0x7D, 0xF7, 0x5A, 0xB6, 0x2B, 0x44, 0x57, 0xDC, 0x60, 0x20, 0x3C } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x00000050, 0x00001B8D, { { 0x9A, 0xCE, 0x1D, 0x62, 0xFA, 0xC6, 0x73, 0x80, 0x02, 0x0A, 0x61, 0x24, 0xDC, 0x2A, 0xEF, 0xE6 } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x0000005B, 0x00001E9A, { { 0xC1, 0x26, 0xF3, 0x64, 0x18, 0x7D, 0xF7, 0x5A, 0xB6, 0x2B, 0x44, 0x57, 0xDC, 0x60, 0x20, 0x3C } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x00000050, 0x00001B8D, { { 0x9A, 0xCE, 0x1D, 0x62, 0xFA, 0xC6, 0x73, 0x80, 0x02, 0x0A, 0x61, 0x24, 0xDC, 0x2A, 0xEF, 0xE6 } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x00000061, 0x00002184, { { 0x4B, 0x20, 0xD7, 0xE6, 0x00, 0xBF, 0x32, 0x40, 0xB7, 0xD0, 0xD6, 0xEC, 0x9C, 0x0F, 0x0B, 0xF0 } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000058, 0x00001E88, { { 0x0E, 0x14, 0xD1, 0xF3, 0x03, 0x29, 0x48, 0x1D, 0x32, 0x2A, 0xBB, 0x0B, 0x48, 0xB3, 0x2E, 0x47 } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x00000061, 0x00002184, { { 0x4B, 0x20, 0xD7, 0xE6, 0x00, 0xBF, 0x32, 0x40, 0xB7, 0xD0, 0xD6, 0xEC, 0x9C, 0x0F, 0x0B, 0xF0 } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000058, 0x00001E88, { { 0x0E, 0x14, 0xD1, 0xF3, 0x03, 0x29, 0x48, 0x1D, 0x32, 0x2A, 0xBB, 0x0B, 0x48, 0xB3, 0x2E, 0x47 } } } }, // CD
- { IT_ITA, kPlatformPC, { 0x00000074, 0x00002945, { { 0x17, 0x8B, 0x7E, 0xD9, 0x04, 0x7C, 0xD4, 0x9D, 0xCE, 0xF0, 0x79, 0x00, 0xAC, 0x82, 0x7C, 0x82 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000050, 0x00001A10, { { 0xFB, 0x79, 0x74, 0x14, 0xB9, 0x75, 0x4F, 0x44, 0x83, 0xB1, 0xD4, 0xBE, 0x17, 0x0F, 0xC4, 0xD6 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000074, 0x00002945, { { 0x17, 0x8B, 0x7E, 0xD9, 0x04, 0x7C, 0xD4, 0x9D, 0xCE, 0xF0, 0x79, 0x00, 0xAC, 0x82, 0x7C, 0x82 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000050, 0x00001A10, { { 0xFB, 0x79, 0x74, 0x14, 0xB9, 0x75, 0x4F, 0x44, 0x83, 0xB1, 0xD4, 0xBE, 0x17, 0x0F, 0xC4, 0xD6 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000005F, 0x0000211E, { { 0xE7, 0x0A, 0x85, 0x25, 0x44, 0x41, 0x47, 0x3B, 0x7A, 0xA6, 0x62, 0xAE, 0xAE, 0xD5, 0x92, 0x45 } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000005F, 0x0000211E, { { 0xE7, 0x0A, 0x85, 0x25, 0x44, 0x41, 0x47, 0x3B, 0x7A, 0xA6, 0x62, 0xAE, 0xAE, 0xD5, 0x92, 0x45 } } } },
// only one of two strings translated in the fan translation
- { RU_RUS, kPlatformPC, { 0x00000053, 0x0000191F, { { 0x14, 0xEB, 0x38, 0x54, 0x40, 0x40, 0x04, 0xA6, 0xA0, 0xFE, 0xDB, 0xD0, 0x8C, 0xA6, 0x1F, 0x55 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000053, 0x0000191F, { { 0x14, 0xEB, 0x38, 0x54, 0x40, 0x40, 0x04, 0xA6, 0xA0, 0xFE, 0xDB, 0xD0, 0x8C, 0xA6, 0x1F, 0x55 } } } },
{ EN_ANY, kPlatformAmiga, { 0x00000056, 0x00001C62, { { 0x43, 0x28, 0x3C, 0x0F, 0x78, 0x52, 0xE7, 0x2A, 0x77, 0xF3, 0x21, 0x5A, 0xF0, 0xFC, 0x9E, 0xF8 } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000063, 0x00002184, { { 0x6B, 0xDC, 0x6B, 0xCF, 0xD4, 0xC7, 0x2A, 0x9A, 0x2E, 0x34, 0x71, 0x4E, 0xB7, 0xF6, 0xAF, 0xDA } } } },
@@ -532,20 +532,20 @@ const ExtractEntrySearchData k1WispJewelStringsProvider[] = {
};
const ExtractEntrySearchData k1MagicJewelStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000013, 0x0000069E, { { 0x7C, 0xF2, 0xEE, 0x7C, 0x8A, 0xCE, 0x5B, 0x09, 0x32, 0xDC, 0x31, 0x1F, 0x45, 0x21, 0x84, 0xFF } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000013, 0x0000069E, { { 0x7C, 0xF2, 0xEE, 0x7C, 0x8A, 0xCE, 0x5B, 0x09, 0x32, 0xDC, 0x31, 0x1F, 0x45, 0x21, 0x84, 0xFF } } } },
{ JA_JPN, kPlatformUnknown, { 0x0000000F, 0x0000087E, { { 0xD8, 0xF1, 0x40, 0x9D, 0x9C, 0x15, 0x9E, 0xBD, 0x69, 0xE5, 0xE1, 0x51, 0x34, 0x22, 0xF3, 0x75 } } } },
- { FR_FRA, kPlatformPC, { 0x00000011, 0x000005DB, { { 0x44, 0x99, 0x35, 0x77, 0x9B, 0x3D, 0xF8, 0xAF, 0x7A, 0xA6, 0x14, 0xD0, 0x99, 0xC6, 0x80, 0x7B } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000011, 0x000005DB, { { 0x44, 0x99, 0x35, 0x77, 0x9B, 0x3D, 0xF8, 0xAF, 0x7A, 0xA6, 0x14, 0xD0, 0x99, 0xC6, 0x80, 0x7B } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000014, 0x000006EF, { { 0xDE, 0x77, 0xB6, 0x8C, 0x39, 0x5C, 0x6F, 0xDF, 0x7D, 0x04, 0x0F, 0x65, 0x24, 0x75, 0xED, 0x95 } } } },
- { IT_ITA, kPlatformPC, { 0x0000001D, 0x00000A83, { { 0x60, 0x69, 0x18, 0x6C, 0x34, 0xB0, 0x56, 0xE3, 0x06, 0x7C, 0xB1, 0xDD, 0x26, 0x80, 0xAE, 0x30 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000011, 0x000005E4, { { 0xD5, 0x11, 0xDA, 0x40, 0x09, 0x6A, 0x5D, 0x76, 0x5C, 0x20, 0xC4, 0x43, 0x4D, 0xF3, 0x67, 0xF0 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000001D, 0x00000A83, { { 0x60, 0x69, 0x18, 0x6C, 0x34, 0xB0, 0x56, 0xE3, 0x06, 0x7C, 0xB1, 0xDD, 0x26, 0x80, 0xAE, 0x30 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000011, 0x000005E4, { { 0xD5, 0x11, 0xDA, 0x40, 0x09, 0x6A, 0x5D, 0x76, 0x5C, 0x20, 0xC4, 0x43, 0x4D, 0xF3, 0x67, 0xF0 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000011, 0x000005CD, { { 0x32, 0x2A, 0xFF, 0x9F, 0x10, 0x75, 0x6B, 0xD6, 0x46, 0xAE, 0x55, 0xD3, 0x68, 0x4F, 0xBB, 0x5A } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000011, 0x000005CD, { { 0x32, 0x2A, 0xFF, 0x9F, 0x10, 0x75, 0x6B, 0xD6, 0x46, 0xAE, 0x55, 0xD3, 0x68, 0x4F, 0xBB, 0x5A } } } },
- { RU_RUS, kPlatformPC, { 0x00000012, 0x0000047D, { { 0xB1, 0xC3, 0x66, 0xBC, 0x42, 0xAD, 0x5B, 0xD8, 0xF5, 0x3D, 0xB9, 0x50, 0x77, 0x32, 0xA7, 0x15 } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000012, 0x0000047D, { { 0xB1, 0xC3, 0x66, 0xBC, 0x42, 0xAD, 0x5B, 0xD8, 0xF5, 0x3D, 0xB9, 0x50, 0x77, 0x32, 0xA7, 0x15 } } } },
{ EN_ANY, kPlatformUnknown, { 0x00000014, 0x0000069E, { { 0x6A, 0x1C, 0x9B, 0x85, 0x61, 0xC7, 0x28, 0xA9, 0xA3, 0xF4, 0xFA, 0x47, 0x90, 0x8F, 0x06, 0xB4 } } } }, // Amiga + FM-TOWNS
@@ -553,18 +553,18 @@ const ExtractEntrySearchData k1MagicJewelStringsProvider[] = {
};
const ExtractEntrySearchData k1ThePoisonStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000057, 0x00001C24, { { 0xBC, 0x31, 0x5C, 0x25, 0x50, 0x36, 0x58, 0x20, 0x55, 0xFC, 0x75, 0x47, 0x2D, 0x43, 0x73, 0x78 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000057, 0x00001C24, { { 0xBC, 0x31, 0x5C, 0x25, 0x50, 0x36, 0x58, 0x20, 0x55, 0xFC, 0x75, 0x47, 0x2D, 0x43, 0x73, 0x78 } } } },
- { FR_FRA, kPlatformPC, { 0x00000068, 0x000022D8, { { 0x39, 0xDA, 0xB3, 0xD2, 0xDA, 0x3F, 0xAB, 0x40, 0x1A, 0x4F, 0x9D, 0x02, 0xBA, 0x37, 0xEC, 0x4D } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000068, 0x000022D8, { { 0x39, 0xDA, 0xB3, 0xD2, 0xDA, 0x3F, 0xAB, 0x40, 0x1A, 0x4F, 0x9D, 0x02, 0xBA, 0x37, 0xEC, 0x4D } } } },
- { DE_DEU, kPlatformPC, { 0x00000072, 0x00002690, { { 0xEF, 0x62, 0x85, 0xA3, 0x8B, 0x20, 0x4B, 0x65, 0xF8, 0xE7, 0x2C, 0x02, 0x3F, 0x3F, 0x25, 0x65 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000072, 0x00002690, { { 0xEF, 0x62, 0x85, 0xA3, 0x8B, 0x20, 0x4B, 0x65, 0xF8, 0xE7, 0x2C, 0x02, 0x3F, 0x3F, 0x25, 0x65 } } } },
- { IT_ITA, kPlatformPC, { 0x00000063, 0x000021F8, { { 0x3C, 0x2E, 0xF8, 0xAD, 0xCF, 0xB5, 0xE7, 0x2C, 0x98, 0x7A, 0xB9, 0x6F, 0x7A, 0x42, 0xE1, 0x92 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000068, 0x00002077, { { 0x5D, 0xF4, 0xF9, 0xD9, 0x87, 0x34, 0x14, 0xAB, 0xE4, 0x9A, 0x67, 0xAF, 0x18, 0x8B, 0x40, 0x98 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000063, 0x000021F8, { { 0x3C, 0x2E, 0xF8, 0xAD, 0xCF, 0xB5, 0xE7, 0x2C, 0x98, 0x7A, 0xB9, 0x6F, 0x7A, 0x42, 0xE1, 0x92 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000068, 0x00002077, { { 0x5D, 0xF4, 0xF9, 0xD9, 0x87, 0x34, 0x14, 0xAB, 0xE4, 0x9A, 0x67, 0xAF, 0x18, 0x8B, 0x40, 0x98 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000059, 0x00001DF7, { { 0x16, 0x7B, 0x5F, 0x91, 0x06, 0x5B, 0xFC, 0x9C, 0x88, 0x61, 0xCC, 0x1B, 0x52, 0x4F, 0x91, 0xC5 } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000059, 0x00001DF7, { { 0x16, 0x7B, 0x5F, 0x91, 0x06, 0x5B, 0xFC, 0x9C, 0x88, 0x61, 0xCC, 0x1B, 0x52, 0x4F, 0x91, 0xC5 } } } },
- { RU_RUS, kPlatformPC, { 0x00000052, 0x0000136F, { { 0xEF, 0xD2, 0xA0, 0x5F, 0xD5, 0xE6, 0x77, 0x96, 0xFA, 0xC5, 0x60, 0x7C, 0xB7, 0xA8, 0x7C, 0x7A } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000052, 0x0000136F, { { 0xEF, 0xD2, 0xA0, 0x5F, 0xD5, 0xE6, 0x77, 0x96, 0xFA, 0xC5, 0x60, 0x7C, 0xB7, 0xA8, 0x7C, 0x7A } } } },
{ EN_ANY, kPlatformAmiga, { 0x00000058, 0x00001C24, { { 0xBA, 0x1F, 0xBD, 0x5C, 0x85, 0x3D, 0x3C, 0x92, 0xD1, 0x13, 0xF3, 0x40, 0x2E, 0xBB, 0x1C, 0xE2 } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000073, 0x00002690, { { 0x44, 0xAE, 0xC9, 0xFD, 0x9F, 0x8E, 0x1B, 0xDD, 0x3F, 0xE4, 0x4D, 0x4B, 0x5A, 0x13, 0xE5, 0x99 } } } },
@@ -579,19 +579,19 @@ const ExtractEntrySearchData k1ThePoisonStringsProvider[] = {
const ExtractEntrySearchData k1FluteStringsProvider[] = {
{ EN_ANY, kPlatformUnknown, { 0x0000003C, 0x00001599, { { 0x96, 0x72, 0x5A, 0x8A, 0xA0, 0xEE, 0xA2, 0xCE, 0x4D, 0x21, 0x01, 0x6C, 0xC5, 0x1A, 0xEB, 0x21 } } } }, // floppy + AMIGA
- { EN_ANY, kPlatformPC, { 0x0000009C, 0x00002334, { { 0xA8, 0xA3, 0x1F, 0x0D, 0x36, 0x25, 0x19, 0x98, 0x50, 0xA0, 0x13, 0x65, 0xF4, 0xE8, 0x27, 0x19 } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x0000009C, 0x00002334, { { 0xA8, 0xA3, 0x1F, 0x0D, 0x36, 0x25, 0x19, 0x98, 0x50, 0xA0, 0x13, 0x65, 0xF4, 0xE8, 0x27, 0x19 } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x00000045, 0x000018EE, { { 0x3E, 0x3B, 0x20, 0x46, 0xEB, 0xB0, 0x88, 0x26, 0xB2, 0x0D, 0xD6, 0x8F, 0xF7, 0x53, 0x74, 0xAE } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000045, 0x000018EE, { { 0x3E, 0x3B, 0x20, 0x46, 0xEB, 0xB0, 0x88, 0x26, 0xB2, 0x0D, 0xD6, 0x8F, 0xF7, 0x53, 0x74, 0xAE } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000040, 0x000016F2, { { 0x70, 0xFF, 0x86, 0x73, 0x9E, 0x75, 0xDD, 0x17, 0x27, 0x86, 0x44, 0xE9, 0x78, 0x3D, 0x48, 0xDB } } } },
- { IT_ITA, kPlatformPC, { 0x0000004C, 0x00001BFB, { { 0x06, 0x4F, 0x6A, 0x37, 0x8B, 0x44, 0x27, 0x26, 0xCE, 0x28, 0xB2, 0x47, 0x71, 0xE2, 0x27, 0x73 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000045, 0x00001726, { { 0x5A, 0xCF, 0x64, 0x4B, 0x61, 0x57, 0xEC, 0xB3, 0xBF, 0x32, 0x45, 0x51, 0x5D, 0x02, 0xC5, 0xB6 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000004C, 0x00001BFB, { { 0x06, 0x4F, 0x6A, 0x37, 0x8B, 0x44, 0x27, 0x26, 0xCE, 0x28, 0xB2, 0x47, 0x71, 0xE2, 0x27, 0x73 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000045, 0x00001726, { { 0x5A, 0xCF, 0x64, 0x4B, 0x61, 0x57, 0xEC, 0xB3, 0xBF, 0x32, 0x45, 0x51, 0x5D, 0x02, 0xC5, 0xB6 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000052, 0x00001D8E, { { 0x9D, 0xA5, 0xF1, 0x42, 0xD1, 0x48, 0xEB, 0x8F, 0x4B, 0xDC, 0xD9, 0x10, 0x55, 0xBD, 0x12, 0xBB } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000052, 0x00001D8E, { { 0x9D, 0xA5, 0xF1, 0x42, 0xD1, 0x48, 0xEB, 0x8F, 0x4B, 0xDC, 0xD9, 0x10, 0x55, 0xBD, 0x12, 0xBB } } } },
// not translated in the fan translation
- { RU_RUS, kPlatformPC, { 0x0000003C, 0x00001599, { { 0x96, 0x72, 0x5A, 0x8A, 0xA0, 0xEE, 0xA2, 0xCE, 0x4D, 0x21, 0x01, 0x6C, 0xC5, 0x1A, 0xEB, 0x21 } } } },
+ { RU_RUS, kPlatformDOS, { 0x0000003C, 0x00001599, { { 0x96, 0x72, 0x5A, 0x8A, 0xA0, 0xEE, 0xA2, 0xCE, 0x4D, 0x21, 0x01, 0x6C, 0xC5, 0x1A, 0xEB, 0x21 } } } },
{ EN_ANY, kPlatformFMTowns, { 0x0000005A, 0x000024F9, { { 0xCA, 0x1F, 0x62, 0x23, 0x22, 0x25, 0x4A, 0x94, 0x8A, 0x50, 0x59, 0xD5, 0xB4, 0x4E, 0xF1, 0xA6 } } } },
{ JA_JPN, kPlatformFMTowns, { 0x00000053, 0x00002745, { { 0x7A, 0xBB, 0xFC, 0x30, 0xB6, 0xCE, 0x61, 0xD4, 0xDB, 0xB0, 0xE6, 0xB2, 0xF4, 0x4D, 0x81, 0x35 } } } },
@@ -606,33 +606,33 @@ const ExtractEntrySearchData k1FlaskFullStringProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x0000001F, 0x00001135, { { 0x90, 0x52, 0x4A, 0x95, 0xE4, 0x89, 0xD6, 0x0A, 0xE1, 0x2E, 0x98, 0x11, 0x02, 0xF5, 0x79, 0x37 } } } },
- { FR_FRA, kPlatformPC, { 0x0000001E, 0x00000AC7, { { 0x4E, 0x7A, 0xC8, 0xC5, 0xD4, 0xB8, 0xD0, 0x73, 0x66, 0x2B, 0x2A, 0x13, 0xDE, 0xE1, 0x32, 0xAA } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000001E, 0x00000AC7, { { 0x4E, 0x7A, 0xC8, 0xC5, 0xD4, 0xB8, 0xD0, 0x73, 0x66, 0x2B, 0x2A, 0x13, 0xDE, 0xE1, 0x32, 0xAA } } } },
{ DE_DEU, kPlatformUnknown, { 0x0000001E, 0x00000A71, { { 0x11, 0x88, 0x37, 0x8E, 0x17, 0xF2, 0x82, 0x1E, 0x72, 0xF0, 0xA3, 0x2B, 0x4F, 0x76, 0x5F, 0xBA } } } },
- { IT_ITA, kPlatformPC, { 0x00000021, 0x00000C19, { { 0xC0, 0xFA, 0xD2, 0xB8, 0xCA, 0x94, 0x67, 0x10, 0x65, 0x01, 0x7F, 0xB0, 0x95, 0xC6, 0x0E, 0xFF } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000001E, 0x00000973, { { 0xD3, 0x93, 0x3C, 0xA6, 0xF7, 0x79, 0xE6, 0x05, 0x49, 0x88, 0x89, 0xDE, 0xCA, 0x77, 0x2F, 0x1B } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000021, 0x00000C19, { { 0xC0, 0xFA, 0xD2, 0xB8, 0xCA, 0x94, 0x67, 0x10, 0x65, 0x01, 0x7F, 0xB0, 0x95, 0xC6, 0x0E, 0xFF } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000001E, 0x00000973, { { 0xD3, 0x93, 0x3C, 0xA6, 0xF7, 0x79, 0xE6, 0x05, 0x49, 0x88, 0x89, 0xDE, 0xCA, 0x77, 0x2F, 0x1B } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000001B, 0x0000099D, { { 0x13, 0x23, 0x5D, 0x38, 0x9B, 0xFB, 0x00, 0x5C, 0xA1, 0x3A, 0x22, 0xD6, 0xCD, 0x5C, 0x09, 0xAE } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000001B, 0x0000099D, { { 0x13, 0x23, 0x5D, 0x38, 0x9B, 0xFB, 0x00, 0x5C, 0xA1, 0x3A, 0x22, 0xD6, 0xCD, 0x5C, 0x09, 0xAE } } } },
- { RU_RUS, kPlatformPC, { 0x0000001A, 0x0000066E, { { 0x36, 0x43, 0xB6, 0xB2, 0xED, 0xBA, 0x21, 0x0C, 0x16, 0x54, 0x99, 0xF9, 0x2E, 0x6E, 0x0A, 0x28 } } } },
+ { RU_RUS, kPlatformDOS, { 0x0000001A, 0x0000066E, { { 0x36, 0x43, 0xB6, 0xB2, 0xED, 0xBA, 0x21, 0x0C, 0x16, 0x54, 0x99, 0xF9, 0x2E, 0x6E, 0x0A, 0x28 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k1FullFlaskStringProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000097, 0x00003521, { { 0x9C, 0x30, 0xC7, 0xC9, 0x97, 0xF3, 0x0E, 0xC4, 0x6E, 0xCA, 0x63, 0xC6, 0xD8, 0x06, 0xFF, 0x30 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000097, 0x00003521, { { 0x9C, 0x30, 0xC7, 0xC9, 0x97, 0xF3, 0x0E, 0xC4, 0x6E, 0xCA, 0x63, 0xC6, 0xD8, 0x06, 0xFF, 0x30 } } } },
- { FR_FRA, kPlatformPC, { 0x00000086, 0x00002E16, { { 0x94, 0x6C, 0x6D, 0xB6, 0x4C, 0x84, 0xBB, 0xF6, 0xC8, 0x50, 0x4C, 0x00, 0x38, 0xE3, 0x09, 0x5B } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000086, 0x00002E16, { { 0x94, 0x6C, 0x6D, 0xB6, 0x4C, 0x84, 0xBB, 0xF6, 0xC8, 0x50, 0x4C, 0x00, 0x38, 0xE3, 0x09, 0x5B } } } },
- { DE_DEU, kPlatformPC, { 0x000000AF, 0x00003E38, { { 0x66, 0x86, 0xAF, 0x1A, 0x2D, 0x33, 0x40, 0xE7, 0x96, 0x9B, 0x32, 0x26, 0xFF, 0x9F, 0x79, 0x8B } } } },
+ { DE_DEU, kPlatformDOS, { 0x000000AF, 0x00003E38, { { 0x66, 0x86, 0xAF, 0x1A, 0x2D, 0x33, 0x40, 0xE7, 0x96, 0x9B, 0x32, 0x26, 0xFF, 0x9F, 0x79, 0x8B } } } },
- { IT_ITA, kPlatformPC, { 0x00000086, 0x00002CDB, { { 0xB1, 0xAE, 0x2A, 0x03, 0x28, 0xEC, 0x6D, 0x2F, 0xED, 0x71, 0xBE, 0x60, 0xCF, 0xAB, 0x8C, 0x00 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x000000B5, 0x00004111, { { 0xA3, 0x4D, 0xA0, 0xF5, 0xE5, 0xD7, 0xFE, 0x11, 0xBB, 0x2C, 0xB5, 0xF2, 0xE0, 0x52, 0xF1, 0xF0 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000086, 0x00002CDB, { { 0xB1, 0xAE, 0x2A, 0x03, 0x28, 0xEC, 0x6D, 0x2F, 0xED, 0x71, 0xBE, 0x60, 0xCF, 0xAB, 0x8C, 0x00 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x000000B5, 0x00004111, { { 0xA3, 0x4D, 0xA0, 0xF5, 0xE5, 0xD7, 0xFE, 0x11, 0xBB, 0x2C, 0xB5, 0xF2, 0xE0, 0x52, 0xF1, 0xF0 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000009A, 0x0000363B, { { 0x38, 0x25, 0xE6, 0xB5, 0xCB, 0x78, 0x5E, 0xAD, 0x2D, 0xD4, 0x2E, 0x8B, 0x89, 0x20, 0xB1, 0x95 } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000009A, 0x0000363B, { { 0x38, 0x25, 0xE6, 0xB5, 0xCB, 0x78, 0x5E, 0xAD, 0x2D, 0xD4, 0x2E, 0x8B, 0x89, 0x20, 0xB1, 0x95 } } } },
- { RU_RUS, kPlatformPC, { 0x00000094, 0x0000232B, { { 0xBF, 0x68, 0xF9, 0x8F, 0x82, 0xE9, 0xE7, 0x69, 0x33, 0xD6, 0x41, 0x15, 0x2C, 0xFE, 0x72, 0xAB } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000094, 0x0000232B, { { 0xBF, 0x68, 0xF9, 0x8F, 0x82, 0xE9, 0xE7, 0x69, 0x33, 0xD6, 0x41, 0x15, 0x2C, 0xFE, 0x72, 0xAB } } } },
{ EN_ANY, kPlatformAmiga, { 0x0000009A, 0x00003521, { { 0x26, 0xE5, 0xC8, 0x6D, 0x14, 0x81, 0x9F, 0x90, 0x38, 0x3C, 0x00, 0x9D, 0x8E, 0x72, 0xB1, 0x83 } } } },
{ DE_DEU, kPlatformAmiga, { 0x000000B0, 0x00003E38, { { 0x8A, 0x6D, 0x42, 0x36, 0x29, 0x06, 0xB2, 0xCE, 0xA3, 0x41, 0x14, 0xE8, 0xB1, 0xEF, 0x6E, 0x3B } } } },
@@ -650,17 +650,17 @@ const ExtractEntrySearchData k1VeryCleverStringProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x0000002F, 0x00001BDF, { { 0x32, 0x2C, 0x60, 0x1E, 0xB7, 0xE0, 0xFE, 0x5F, 0xEA, 0xEF, 0xA4, 0x73, 0xAC, 0xCB, 0xBA, 0xFE } } } },
- { FR_FRA, kPlatformPC, { 0x00000027, 0x00000DE1, { { 0x43, 0xC2, 0xC7, 0xD2, 0xA3, 0x70, 0x36, 0x38, 0xB5, 0x5B, 0x22, 0xEF, 0xBA, 0x0D, 0x37, 0x27 } } } },
+ { FR_FRA, kPlatformDOS, { 0x00000027, 0x00000DE1, { { 0x43, 0xC2, 0xC7, 0xD2, 0xA3, 0x70, 0x36, 0x38, 0xB5, 0x5B, 0x22, 0xEF, 0xBA, 0x0D, 0x37, 0x27 } } } },
{ DE_DEU, kPlatformUnknown, { 0x00000043, 0x00001871, { { 0x33, 0x3F, 0xEA, 0x7F, 0x5F, 0x56, 0x98, 0xF3, 0x03, 0x8D, 0x3E, 0xAC, 0xA1, 0x62, 0x2A, 0xD7 } } } },
- { IT_ITA, kPlatformPC, { 0x00000038, 0x000013CF, { { 0x58, 0x7B, 0x59, 0x50, 0x84, 0xBB, 0x5B, 0x70, 0xDF, 0x76, 0x2F, 0xC3, 0x7E, 0xEC, 0x6A, 0x8B } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x00000027, 0x00000D01, { { 0x72, 0x7E, 0x88, 0xFB, 0xDA, 0xC0, 0x9E, 0x31, 0xAC, 0x32, 0xFD, 0x90, 0x7D, 0x01, 0x86, 0xD0 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000038, 0x000013CF, { { 0x58, 0x7B, 0x59, 0x50, 0x84, 0xBB, 0x5B, 0x70, 0xDF, 0x76, 0x2F, 0xC3, 0x7E, 0xEC, 0x6A, 0x8B } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x00000027, 0x00000D01, { { 0x72, 0x7E, 0x88, 0xFB, 0xDA, 0xC0, 0x9E, 0x31, 0xAC, 0x32, 0xFD, 0x90, 0x7D, 0x01, 0x86, 0xD0 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x00000036, 0x000013F8, { { 0x2D, 0x9B, 0x7D, 0x58, 0xD1, 0x94, 0x04, 0x45, 0x6E, 0x81, 0xCC, 0x1E, 0x2F, 0xC5, 0xC9, 0xEA } } } },
+ { ES_ESP, kPlatformDOS, { 0x00000036, 0x000013F8, { { 0x2D, 0x9B, 0x7D, 0x58, 0xD1, 0x94, 0x04, 0x45, 0x6E, 0x81, 0xCC, 0x1E, 0x2F, 0xC5, 0xC9, 0xEA } } } },
// not translated in the fan translation
- { RU_RUS, kPlatformPC, { 0x00000032, 0x0000118D, { { 0x4B, 0x6D, 0xD4, 0xDC, 0x3E, 0xA2, 0x2D, 0x6D, 0x2C, 0x5A, 0xF7, 0x67, 0x4B, 0x6D, 0x40, 0xEF } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000032, 0x0000118D, { { 0x4B, 0x6D, 0xD4, 0xDC, 0x3E, 0xA2, 0x2D, 0x6D, 0x2C, 0x5A, 0xF7, 0x67, 0x4B, 0x6D, 0x40, 0xEF } } } },
EXTRACT_END_ENTRY
};
@@ -670,16 +670,16 @@ const ExtractEntrySearchData k1NewGameStringProvider[] = {
{ JA_JPN, kPlatformUnknown, { 0x0000001B, 0x00000EC8, { { 0x13, 0x9A, 0xBC, 0x8F, 0xE2, 0x4B, 0xD7, 0x0B, 0xC0, 0x81, 0x60, 0x10, 0xC2, 0xA6, 0x9C, 0xFA } } } },
- { FR_FRA, kPlatformPC, { 0x0000001D, 0x0000079B, { { 0x2B, 0x5B, 0x54, 0x29, 0x76, 0x31, 0x5E, 0x89, 0xC2, 0xD1, 0xDB, 0x3B, 0xF0, 0xBC, 0xCD, 0x66 } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000001D, 0x0000079B, { { 0x2B, 0x5B, 0x54, 0x29, 0x76, 0x31, 0x5E, 0x89, 0xC2, 0xD1, 0xDB, 0x3B, 0xF0, 0xBC, 0xCD, 0x66 } } } },
{ DE_DEU, kPlatformUnknown, { 0x0000001D, 0x0000076F, { { 0x5C, 0x84, 0x2A, 0xB1, 0x61, 0xDD, 0x7B, 0xB3, 0xD4, 0x6A, 0xD2, 0xEF, 0xA4, 0x5F, 0x81, 0xFE } } } },
- { IT_ITA, kPlatformPC, { 0x0000001C, 0x0000075E, { { 0xC8, 0xCB, 0x35, 0x5E, 0x73, 0x09, 0xDB, 0xA1, 0xF1, 0x8D, 0x14, 0x54, 0x8D, 0xF7, 0xB1, 0xD3 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000001D, 0x000007BD, { { 0xF4, 0x5C, 0x50, 0x82, 0x91, 0x7E, 0x09, 0x52, 0x44, 0x95, 0xC2, 0x2E, 0xC9, 0x52, 0x12, 0x2B } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x0000001C, 0x0000075E, { { 0xC8, 0xCB, 0x35, 0x5E, 0x73, 0x09, 0xDB, 0xA1, 0xF1, 0x8D, 0x14, 0x54, 0x8D, 0xF7, 0xB1, 0xD3 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000001D, 0x000007BD, { { 0xF4, 0x5C, 0x50, 0x82, 0x91, 0x7E, 0x09, 0x52, 0x44, 0x95, 0xC2, 0x2E, 0xC9, 0x52, 0x12, 0x2B } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000001B, 0x00000701, { { 0x2B, 0x87, 0xC3, 0x82, 0x68, 0xA5, 0xFC, 0xC5, 0x64, 0x9E, 0xAB, 0xD2, 0x8A, 0x07, 0x9C, 0x1E } } } },
+ { ES_ESP, kPlatformDOS, { 0x0000001B, 0x00000701, { { 0x2B, 0x87, 0xC3, 0x82, 0x68, 0xA5, 0xFC, 0xC5, 0x64, 0x9E, 0xAB, 0xD2, 0x8A, 0x07, 0x9C, 0x1E } } } },
- { RU_RUS, kPlatformPC, { 0x00000015, 0x0000035F, { { 0x7E, 0x49, 0xC1, 0xCB, 0x2D, 0x61, 0xA7, 0x4C, 0x20, 0xAC, 0xEC, 0x54, 0x80, 0x14, 0x6A, 0xCA } } } },
+ { RU_RUS, kPlatformDOS, { 0x00000015, 0x0000035F, { { 0x7E, 0x49, 0xC1, 0xCB, 0x2D, 0x61, 0xA7, 0x4C, 0x20, 0xAC, 0xEC, 0x54, 0x80, 0x14, 0x6A, 0xCA } } } },
EXTRACT_END_ENTRY
};
@@ -760,7 +760,7 @@ const ExtractEntrySearchData k1MagicAnimShapesProvider[] = {
};
const ExtractEntrySearchData k1BranStoneShapesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000006E, 0x00001E41, { { 0x77, 0x99, 0x54, 0xED, 0x4C, 0x31, 0x08, 0x50, 0x41, 0x22, 0x6B, 0xED, 0x34, 0xF4, 0x17, 0xA1 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000006E, 0x00001E41, { { 0x77, 0x99, 0x54, 0xED, 0x4C, 0x31, 0x08, 0x50, 0x41, 0x22, 0x6B, 0xED, 0x34, 0xF4, 0x17, 0xA1 } } } },
{ UNK_LANG, kPlatformAmiga, { 0x0000006E, 0x00002026, { { 0x5A, 0xAF, 0x28, 0xF3, 0x0F, 0x82, 0x05, 0xB4, 0x33, 0x83, 0xCE, 0x56, 0xDB, 0xE7, 0x5C, 0xB4 } } } },
@@ -970,21 +970,21 @@ const ExtractEntrySearchData k1SpecialPalette33Provider[] = {
};
const ExtractEntrySearchData k1GUIStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x000001B0, 0x00009562, { { 0x78, 0xB0, 0x81, 0x15, 0x96, 0x09, 0x1E, 0x6C, 0x20, 0x7B, 0xF7, 0xB1, 0x29, 0x2A, 0x3D, 0xE4 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000209, 0x00009788, { { 0xDD, 0xA0, 0x5C, 0x30, 0x60, 0x68, 0xDC, 0x24, 0xBE, 0x3F, 0xA2, 0x31, 0xE0, 0x81, 0x6C, 0xCA } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x000001B0, 0x00009562, { { 0x78, 0xB0, 0x81, 0x15, 0x96, 0x09, 0x1E, 0x6C, 0x20, 0x7B, 0xF7, 0xB1, 0x29, 0x2A, 0x3D, 0xE4 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000209, 0x00009788, { { 0xDD, 0xA0, 0x5C, 0x30, 0x60, 0x68, 0xDC, 0x24, 0xBE, 0x3F, 0xA2, 0x31, 0xE0, 0x81, 0x6C, 0xCA } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x00000234, 0x0000C262, { { 0x08, 0x83, 0x32, 0x4E, 0x48, 0xEC, 0x83, 0x4B, 0x1B, 0x82, 0x58, 0x48, 0xA3, 0x30, 0x05, 0x33 } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x0000025D, 0x0000CBDC, { { 0x36, 0xF0, 0x92, 0x9C, 0x5F, 0xFF, 0x5D, 0x65, 0x5F, 0x0B, 0xC0, 0x72, 0x9F, 0x30, 0x47, 0xAB } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x00000234, 0x0000C262, { { 0x08, 0x83, 0x32, 0x4E, 0x48, 0xEC, 0x83, 0x4B, 0x1B, 0x82, 0x58, 0x48, 0xA3, 0x30, 0x05, 0x33 } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x0000025D, 0x0000CBDC, { { 0x36, 0xF0, 0x92, 0x9C, 0x5F, 0xFF, 0x5D, 0x65, 0x5F, 0x0B, 0xC0, 0x72, 0x9F, 0x30, 0x47, 0xAB } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x00000236, 0x0000BA9C, { { 0xEB, 0xA6, 0x90, 0x9D, 0x99, 0x4B, 0x4F, 0xD9, 0xCE, 0xFF, 0x44, 0x3F, 0x77, 0x6F, 0xE1, 0x71 } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000261, 0x0000C538, { { 0xF3, 0xED, 0x5E, 0x73, 0x6F, 0x6E, 0x06, 0xF8, 0x48, 0xF8, 0x30, 0x69, 0x34, 0x5D, 0x99, 0x0C } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x00000236, 0x0000BA9C, { { 0xEB, 0xA6, 0x90, 0x9D, 0x99, 0x4B, 0x4F, 0xD9, 0xCE, 0xFF, 0x44, 0x3F, 0x77, 0x6F, 0xE1, 0x71 } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000261, 0x0000C538, { { 0xF3, 0xED, 0x5E, 0x73, 0x6F, 0x6E, 0x06, 0xF8, 0x48, 0xF8, 0x30, 0x69, 0x34, 0x5D, 0x99, 0x0C } } } }, // CD
- { IT_ITA, kPlatformPC, { 0x00000225, 0x0000B0E1, { { 0x57, 0xE2, 0x39, 0xA8, 0xF5, 0x70, 0x48, 0xB4, 0x3D, 0xD4, 0x2A, 0x8C, 0x7C, 0x76, 0xB7, 0x8D } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000025D, 0x0000AFD0, { { 0x8E, 0x97, 0xA9, 0x55, 0x16, 0xF7, 0x42, 0x83, 0xA3, 0x68, 0x2F, 0xD6, 0x37, 0x1C, 0x9A, 0xD1 } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000225, 0x0000B0E1, { { 0x57, 0xE2, 0x39, 0xA8, 0xF5, 0x70, 0x48, 0xB4, 0x3D, 0xD4, 0x2A, 0x8C, 0x7C, 0x76, 0xB7, 0x8D } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000025D, 0x0000AFD0, { { 0x8E, 0x97, 0xA9, 0x55, 0x16, 0xF7, 0x42, 0x83, 0xA3, 0x68, 0x2F, 0xD6, 0x37, 0x1C, 0x9A, 0xD1 } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000023A, 0x0000C3BD, { { 0xED, 0x0D, 0xE7, 0x5B, 0xDC, 0x21, 0x41, 0x54, 0x68, 0x7D, 0x8E, 0x97, 0x1A, 0xB1, 0xA1, 0x4A } } } }, // floppy
+ { ES_ESP, kPlatformDOS, { 0x0000023A, 0x0000C3BD, { { 0xED, 0x0D, 0xE7, 0x5B, 0xDC, 0x21, 0x41, 0x54, 0x68, 0x7D, 0x8E, 0x97, 0x1A, 0xB1, 0xA1, 0x4A } } } }, // floppy
- { RU_RUS, kPlatformPC, { 0x000001B1, 0x000065E8, { { 0x91, 0x22, 0x61, 0x8B, 0xCD, 0x7C, 0x0E, 0xD4, 0x32, 0x00, 0xC3, 0x6E, 0x50, 0x7F, 0x3C, 0x82 } } } }, // floppy
+ { RU_RUS, kPlatformDOS, { 0x000001B1, 0x000065E8, { { 0x91, 0x22, 0x61, 0x8B, 0xCD, 0x7C, 0x0E, 0xD4, 0x32, 0x00, 0xC3, 0x6E, 0x50, 0x7F, 0x3C, 0x82 } } } }, // floppy
{ EN_ANY, kPlatformAmiga, { 0x000001DF, 0x00009042, { { 0x0D, 0xD3, 0x1A, 0x92, 0x8D, 0x9C, 0x72, 0x55, 0xEF, 0xFB, 0x81, 0x21, 0x3B, 0x43, 0xA7, 0xE8 } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000237, 0x0000BAF7, { { 0xD7, 0x1A, 0x8E, 0xCC, 0x6D, 0x3E, 0xA9, 0xDD, 0x9A, 0x6B, 0x71, 0xFE, 0xD4, 0x50, 0x30, 0x6E } } } },
@@ -998,22 +998,22 @@ const ExtractEntrySearchData k1GUIStringsProvider[] = {
};
const ExtractEntrySearchData k1ConfigStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000003F, 0x000016E9, { { 0x4F, 0x19, 0x60, 0x67, 0xA8, 0x31, 0x0B, 0xD5, 0x3D, 0x06, 0x39, 0xF1, 0x42, 0xB0, 0xFD, 0x5C } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000061, 0x00002249, { { 0x5D, 0xE2, 0x05, 0xA7, 0xEC, 0x0A, 0x73, 0xF5, 0x01, 0x5B, 0x64, 0x71, 0x83, 0xEC, 0x56, 0x24 } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x0000003F, 0x000016E9, { { 0x4F, 0x19, 0x60, 0x67, 0xA8, 0x31, 0x0B, 0xD5, 0x3D, 0x06, 0x39, 0xF1, 0x42, 0xB0, 0xFD, 0x5C } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000061, 0x00002249, { { 0x5D, 0xE2, 0x05, 0xA7, 0xEC, 0x0A, 0x73, 0xF5, 0x01, 0x5B, 0x64, 0x71, 0x83, 0xEC, 0x56, 0x24 } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x0000004B, 0x00001AE8, { { 0xE3, 0xC9, 0x0F, 0x54, 0x48, 0x31, 0x6E, 0x5F, 0x51, 0x8E, 0xF8, 0xE6, 0xAC, 0x16, 0xAC, 0x1C } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x0000007A, 0x00002C37, { { 0x9E, 0xD8, 0x85, 0xB4, 0x9D, 0x32, 0x9D, 0x80, 0x58, 0xE4, 0x08, 0xC7, 0x75, 0xD2, 0x9C, 0x1E } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x0000004B, 0x00001AE8, { { 0xE3, 0xC9, 0x0F, 0x54, 0x48, 0x31, 0x6E, 0x5F, 0x51, 0x8E, 0xF8, 0xE6, 0xAC, 0x16, 0xAC, 0x1C } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x0000007A, 0x00002C37, { { 0x9E, 0xD8, 0x85, 0xB4, 0x9D, 0x32, 0x9D, 0x80, 0x58, 0xE4, 0x08, 0xC7, 0x75, 0xD2, 0x9C, 0x1E } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x0000005E, 0x00002280, { { 0xC7, 0xD2, 0x22, 0xB5, 0xD3, 0xBC, 0x7A, 0x97, 0x26, 0x04, 0x07, 0x78, 0xAA, 0xAB, 0x1D, 0x5C } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000082, 0x00002E94, { { 0xC5, 0xDC, 0x44, 0x6C, 0x4B, 0x3E, 0x4E, 0x27, 0x0C, 0xCC, 0x65, 0x6C, 0x20, 0x8D, 0x71, 0x07 } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x0000005E, 0x00002280, { { 0xC7, 0xD2, 0x22, 0xB5, 0xD3, 0xBC, 0x7A, 0x97, 0x26, 0x04, 0x07, 0x78, 0xAA, 0xAB, 0x1D, 0x5C } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000082, 0x00002E94, { { 0xC5, 0xDC, 0x44, 0x6C, 0x4B, 0x3E, 0x4E, 0x27, 0x0C, 0xCC, 0x65, 0x6C, 0x20, 0x8D, 0x71, 0x07 } } } }, // CD
- { IT_ITA, kPlatformPC, { 0x00000054, 0x00001E98, { { 0x10, 0x6B, 0x6B, 0x9B, 0x91, 0x05, 0xE9, 0x30, 0xE2, 0x75, 0xE2, 0x45, 0x79, 0x17, 0x73, 0xC9 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x0000007A, 0x00002904, { { 0xD3, 0xD2, 0x96, 0x6E, 0xE7, 0xE8, 0x64, 0x77, 0x73, 0xCD, 0xC2, 0x9E, 0x57, 0xB5, 0xD3, 0xCD } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000054, 0x00001E98, { { 0x10, 0x6B, 0x6B, 0x9B, 0x91, 0x05, 0xE9, 0x30, 0xE2, 0x75, 0xE2, 0x45, 0x79, 0x17, 0x73, 0xC9 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x0000007A, 0x00002904, { { 0xD3, 0xD2, 0x96, 0x6E, 0xE7, 0xE8, 0x64, 0x77, 0x73, 0xCD, 0xC2, 0x9E, 0x57, 0xB5, 0xD3, 0xCD } } } }, // (fan) CD
- { ES_ESP, kPlatformPC, { 0x0000004A, 0x00001B7B, { { 0x6B, 0x69, 0x50, 0x92, 0x9B, 0x35, 0x58, 0xE1, 0xEA, 0xBF, 0x42, 0x0B, 0xEB, 0x88, 0x41, 0x8D } } } }, // floppy
+ { ES_ESP, kPlatformDOS, { 0x0000004A, 0x00001B7B, { { 0x6B, 0x69, 0x50, 0x92, 0x9B, 0x35, 0x58, 0xE1, 0xEA, 0xBF, 0x42, 0x0B, 0xEB, 0x88, 0x41, 0x8D } } } }, // floppy
// not translated in the fan translation
- { RU_RUS, kPlatformPC, { 0x0000003F, 0x00000B0D, { { 0x0E, 0x60, 0x0F, 0x4A, 0xA9, 0xF0, 0x1B, 0x76, 0xBB, 0x33, 0xB2, 0x4B, 0x5C, 0xB5, 0x4A, 0x97 } } } }, // floppy
+ { RU_RUS, kPlatformDOS, { 0x0000003F, 0x00000B0D, { { 0x0E, 0x60, 0x0F, 0x4A, 0xA9, 0xF0, 0x1B, 0x76, 0xBB, 0x33, 0xB2, 0x4B, 0x5C, 0xB5, 0x4A, 0x97 } } } }, // floppy
{ EN_ANY, kPlatformAmiga, { 0x0000002E, 0x00000FA1, { { 0x5E, 0xFF, 0xFF, 0x3D, 0xF8, 0x11, 0x6F, 0x3B, 0xC5, 0x39, 0x8F, 0x25, 0x8F, 0x0F, 0xE9, 0x2B } } } },
{ DE_DEU, kPlatformAmiga, { 0x00000043, 0x00001783, { { 0xB2, 0x2B, 0xAB, 0x27, 0x06, 0x9A, 0x1E, 0x4B, 0xA7, 0xD3, 0xFF, 0xEB, 0xFD, 0x12, 0xDC, 0x94 } } } },
@@ -1089,9 +1089,9 @@ const ExtractEntrySearchData k1AmigaGameSFXTableProvider[] = {
const ExtractEntrySearchData k2SeqplayPakFilesProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000022, 0x000008E0, { { 0xB7, 0x3B, 0x51, 0x46, 0x78, 0x2D, 0x4D, 0x82, 0xD4, 0x30, 0xFC, 0x6E, 0xC4, 0x5B, 0x27, 0x3E } } } }, // DOS floppy + PC98
- { UNK_LANG, kPlatformPC, { 0x00000046, 0x0000121A, { { 0x42, 0xC2, 0x5A, 0xDC, 0x27, 0x2D, 0xB4, 0x44, 0x85, 0x58, 0x0F, 0xB6, 0x6D, 0x76, 0x04, 0x4F } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x00000014, 0x000004FA, { { 0xBB, 0x4C, 0x16, 0xEB, 0x56, 0xEF, 0xAC, 0x68, 0x6B, 0x49, 0x96, 0x3A, 0x9F, 0x00, 0x75, 0xF6 } } } }, // demo
- { UNK_LANG, kPlatformPC, { 0x0000000C, 0x00000308, { { 0xC0, 0xAC, 0x10, 0xF1, 0x12, 0xD1, 0x21, 0x92, 0xA1, 0x62, 0x5B, 0x6E, 0xCF, 0x88, 0x32, 0x7C } } } }, // Lands of Lore demo
+ { UNK_LANG, kPlatformDOS, { 0x00000046, 0x0000121A, { { 0x42, 0xC2, 0x5A, 0xDC, 0x27, 0x2D, 0xB4, 0x44, 0x85, 0x58, 0x0F, 0xB6, 0x6D, 0x76, 0x04, 0x4F } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000014, 0x000004FA, { { 0xBB, 0x4C, 0x16, 0xEB, 0x56, 0xEF, 0xAC, 0x68, 0x6B, 0x49, 0x96, 0x3A, 0x9F, 0x00, 0x75, 0xF6 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x0000000C, 0x00000308, { { 0xC0, 0xAC, 0x10, 0xF1, 0x12, 0xD1, 0x21, 0x92, 0xA1, 0x62, 0x5B, 0x6E, 0xCF, 0x88, 0x32, 0x7C } } } }, // Lands of Lore demo
{ UNK_LANG, kPlatformFMTowns, { 0x00000033, 0x00000BBD, { { 0x92, 0x5B, 0xDA, 0xE3, 0x7C, 0x39, 0xC4, 0x75, 0x24, 0xBA, 0x67, 0x27, 0x6E, 0x21, 0xA3, 0xF7 } } } },
@@ -1102,21 +1102,21 @@ const ExtractEntrySearchData k2SeqplayPakFilesProvider[] = {
};
const ExtractEntrySearchData k2SeqplayStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x000008C8, 0x0002FDE3, { { 0x62, 0xD1, 0x6F, 0xBC, 0xEC, 0xE6, 0xCF, 0xE8, 0xD8, 0xE9, 0xDE, 0xFB, 0x09, 0xAF, 0x34, 0x92 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000916, 0x00031417, { { 0x3E, 0x15, 0xDA, 0xF4, 0x77, 0x44, 0x80, 0x47, 0xDB, 0x32, 0x0E, 0x6D, 0xCA, 0x32, 0x65, 0x1B } } } }, // CD
- { EN_ANY, kPlatformPC, { 0x00000102, 0x00005BD6, { { 0xB3, 0x00, 0xE5, 0x39, 0x02, 0x3D, 0xBF, 0xDD, 0x54, 0x70, 0xEA, 0xC1, 0xCB, 0xAC, 0xAA, 0xF7 } } } }, // Lands of Lore demo
+ { EN_ANY, kPlatformDOS, { 0x000008C8, 0x0002FDE3, { { 0x62, 0xD1, 0x6F, 0xBC, 0xEC, 0xE6, 0xCF, 0xE8, 0xD8, 0xE9, 0xDE, 0xFB, 0x09, 0xAF, 0x34, 0x92 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000916, 0x00031417, { { 0x3E, 0x15, 0xDA, 0xF4, 0x77, 0x44, 0x80, 0x47, 0xDB, 0x32, 0x0E, 0x6D, 0xCA, 0x32, 0x65, 0x1B } } } }, // CD
+ { EN_ANY, kPlatformDOS, { 0x00000102, 0x00005BD6, { { 0xB3, 0x00, 0xE5, 0x39, 0x02, 0x3D, 0xBF, 0xDD, 0x54, 0x70, 0xEA, 0xC1, 0xCB, 0xAC, 0xAA, 0xF7 } } } }, // Lands of Lore demo
- { DE_DEU, kPlatformPC, { 0x000009EC, 0x000370F9, { { 0x56, 0x94, 0xCC, 0xE5, 0x38, 0x19, 0xAD, 0xD1, 0xBB, 0x6A, 0x6E, 0xEC, 0xC5, 0x1B, 0x57, 0x7B } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000A3F, 0x000389F4, { { 0x51, 0xC1, 0x87, 0x16, 0x53, 0x8C, 0x68, 0x8E, 0x9B, 0x81, 0xA1, 0xD2, 0xCE, 0x5F, 0x83, 0x31 } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x000009EC, 0x000370F9, { { 0x56, 0x94, 0xCC, 0xE5, 0x38, 0x19, 0xAD, 0xD1, 0xBB, 0x6A, 0x6E, 0xEC, 0xC5, 0x1B, 0x57, 0x7B } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000A3F, 0x000389F4, { { 0x51, 0xC1, 0x87, 0x16, 0x53, 0x8C, 0x68, 0x8E, 0x9B, 0x81, 0xA1, 0xD2, 0xCE, 0x5F, 0x83, 0x31 } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x000009C9, 0x00036324, { { 0x2C, 0xC2, 0xD9, 0xCF, 0x90, 0x2A, 0xDF, 0xE9, 0x85, 0x9E, 0x5D, 0xBB, 0x1D, 0x9A, 0x14, 0x69 } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x00000995, 0x000352D7, { { 0xED, 0x7C, 0x49, 0x7B, 0x1A, 0x2C, 0x73, 0x61, 0x73, 0xAF, 0x16, 0x89, 0x1E, 0x01, 0xE2, 0xAE } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x000009C9, 0x00036324, { { 0x2C, 0xC2, 0xD9, 0xCF, 0x90, 0x2A, 0xDF, 0xE9, 0x85, 0x9E, 0x5D, 0xBB, 0x1D, 0x9A, 0x14, 0x69 } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x00000995, 0x000352D7, { { 0xED, 0x7C, 0x49, 0x7B, 0x1A, 0x2C, 0x73, 0x61, 0x73, 0xAF, 0x16, 0x89, 0x1E, 0x01, 0xE2, 0xAE } } } }, // CD
- { IT_ITA, kPlatformPC, { 0x00000916, 0x0003188F, { { 0xDC, 0x46, 0x06, 0xE1, 0xB0, 0x66, 0xBC, 0x18, 0x2E, 0x6E, 0x9E, 0xC9, 0xA4, 0x14, 0x8D, 0x08 } } } }, // floppy
- { IT_ITA, kPlatformPC, { 0x000008C8, 0x00030947, { { 0x7F, 0x75, 0x5F, 0x99, 0x94, 0xFE, 0xA1, 0xE6, 0xEF, 0xB8, 0x93, 0x71, 0x83, 0x1B, 0xAC, 0x4A } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000916, 0x0003188F, { { 0xDC, 0x46, 0x06, 0xE1, 0xB0, 0x66, 0xBC, 0x18, 0x2E, 0x6E, 0x9E, 0xC9, 0xA4, 0x14, 0x8D, 0x08 } } } }, // floppy
+ { IT_ITA, kPlatformDOS, { 0x000008C8, 0x00030947, { { 0x7F, 0x75, 0x5F, 0x99, 0x94, 0xFE, 0xA1, 0xE6, 0xEF, 0xB8, 0x93, 0x71, 0x83, 0x1B, 0xAC, 0x4A } } } }, // (fan) CD
- { RU_RUS, kPlatformPC, { 0x00000916, 0x00032C49, { { 0xEA, 0x5C, 0xE5, 0x06, 0x05, 0x5F, 0x36, 0xE8, 0x31, 0x3E, 0xBF, 0x74, 0x73, 0xFB, 0xAB, 0xFF } } } }, // (fan) CD - intro and outro strings haven't been translated in this fan translation
- { RU_RUS, kPlatformPC, { 0x000008C8, 0x00028639, { { 0xF9, 0x1D, 0x6A, 0x85, 0x23, 0x5E, 0x2A, 0x64, 0xBC, 0x45, 0xB2, 0x48, 0x13, 0x49, 0xD4, 0xF7 } } } }, // (fan) floppy
+ { RU_RUS, kPlatformDOS, { 0x00000916, 0x00032C49, { { 0xEA, 0x5C, 0xE5, 0x06, 0x05, 0x5F, 0x36, 0xE8, 0x31, 0x3E, 0xBF, 0x74, 0x73, 0xFB, 0xAB, 0xFF } } } }, // (fan) CD - intro and outro strings haven't been translated in this fan translation
+ { RU_RUS, kPlatformDOS, { 0x000008C8, 0x00028639, { { 0xF9, 0x1D, 0x6A, 0x85, 0x23, 0x5E, 0x2A, 0x64, 0xBC, 0x45, 0xB2, 0x48, 0x13, 0x49, 0xD4, 0xF7 } } } }, // (fan) floppy
{ EN_ANY, kPlatformFMTowns, { 0x00000990, 0x00030C61, { { 0x60, 0x51, 0x11, 0x83, 0x3F, 0x06, 0xC3, 0xA3, 0xE0, 0xC0, 0x2F, 0x41, 0x29, 0xDE, 0x65, 0xB1 } } } },
{ JA_JPN, kPlatformFMTowns, { 0x000008A8, 0x00036831, { { 0x56, 0x5B, 0x23, 0x61, 0xE8, 0x3B, 0xE1, 0x36, 0xD6, 0x62, 0xD0, 0x84, 0x00, 0x04, 0x05, 0xAD } } } },
@@ -1128,10 +1128,10 @@ const ExtractEntrySearchData k2SeqplayStringsProvider[] = {
};
const ExtractEntrySearchData k2SeqplaySfxFilesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000173, 0x00008198, { { 0x2D, 0xF5, 0x5C, 0xAE, 0xDB, 0x71, 0x60, 0xFE, 0x78, 0x04, 0xFC, 0xAD, 0x4B, 0x43, 0xB1, 0x4B } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000234, 0x0000B0B2, { { 0xE4, 0x19, 0x4F, 0x8C, 0x53, 0xFD, 0x5F, 0x2A, 0xFB, 0x77, 0x1C, 0x32, 0xB3, 0x39, 0x25, 0x85 } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x000000DE, 0x00004EA4, { { 0x97, 0xA8, 0x4A, 0xED, 0x12, 0x87, 0xEB, 0x82, 0x42, 0xFA, 0x45, 0x0D, 0x45, 0x8F, 0xFE, 0x76 } } } }, // demo
- { UNK_LANG, kPlatformPC, { 0x000000C5, 0x00004508, { { 0xBF, 0xA9, 0x1A, 0x37, 0x0B, 0xF8, 0x13, 0x9D, 0x2D, 0x67, 0x3D, 0x9B, 0xE9, 0x16, 0x07, 0x0C } } } }, // Lands of Lore demo
+ { UNK_LANG, kPlatformDOS, { 0x00000173, 0x00008198, { { 0x2D, 0xF5, 0x5C, 0xAE, 0xDB, 0x71, 0x60, 0xFE, 0x78, 0x04, 0xFC, 0xAD, 0x4B, 0x43, 0xB1, 0x4B } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000234, 0x0000B0B2, { { 0xE4, 0x19, 0x4F, 0x8C, 0x53, 0xFD, 0x5F, 0x2A, 0xFB, 0x77, 0x1C, 0x32, 0xB3, 0x39, 0x25, 0x85 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x000000DE, 0x00004EA4, { { 0x97, 0xA8, 0x4A, 0xED, 0x12, 0x87, 0xEB, 0x82, 0x42, 0xFA, 0x45, 0x0D, 0x45, 0x8F, 0xFE, 0x76 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x000000C5, 0x00004508, { { 0xBF, 0xA9, 0x1A, 0x37, 0x0B, 0xF8, 0x13, 0x9D, 0x2D, 0x67, 0x3D, 0x9B, 0xE9, 0x16, 0x07, 0x0C } } } }, // Lands of Lore demo
{ UNK_LANG, kPlatformFMTowns, { 0x000001A3, 0x00008098, { { 0xA9, 0xD2, 0xE2, 0x32, 0x59, 0xC4, 0x97, 0x74, 0x11, 0x49, 0x8F, 0x2B, 0xBF, 0x00, 0xF9, 0xF1 } } } },
@@ -1141,23 +1141,23 @@ const ExtractEntrySearchData k2SeqplaySfxFilesProvider[] = {
};
const ExtractEntrySearchData k2SeqplayTlkFilesProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
- { FR_FRA, kPlatformPC, { 0x0000009D, 0x00002878, { { 0x28, 0x5D, 0x7F, 0x5B, 0x57, 0xC2, 0xFF, 0x73, 0xC1, 0x8E, 0xD6, 0xE0, 0x4D, 0x03, 0x99, 0x2C } } } },
- { DE_DEU, kPlatformPC, { 0x0000009D, 0x00002885, { { 0x87, 0x24, 0xB6, 0xE9, 0xD6, 0xAA, 0x68, 0x2D, 0x6B, 0x05, 0xDF, 0xE1, 0x2B, 0xA4, 0x79, 0xE5 } } } },
- { IT_ITA, kPlatformPC, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
- { RU_RUS, kPlatformPC, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
+ { FR_FRA, kPlatformDOS, { 0x0000009D, 0x00002878, { { 0x28, 0x5D, 0x7F, 0x5B, 0x57, 0xC2, 0xFF, 0x73, 0xC1, 0x8E, 0xD6, 0xE0, 0x4D, 0x03, 0x99, 0x2C } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000009D, 0x00002885, { { 0x87, 0x24, 0xB6, 0xE9, 0xD6, 0xAA, 0x68, 0x2D, 0x6B, 0x05, 0xDF, 0xE1, 0x2B, 0xA4, 0x79, 0xE5 } } } },
+ { IT_ITA, kPlatformDOS, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
+ { RU_RUS, kPlatformDOS, { 0x0000009D, 0x0000286B, { { 0x58, 0x30, 0x72, 0x62, 0xC8, 0x77, 0x2A, 0x06, 0xD6, 0x24, 0x1A, 0x7A, 0xAF, 0x79, 0xFF, 0xAE } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k2SeqplaySeqDataProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000006F4, 0x0000F5AD, { { 0x23, 0x1E, 0x30, 0xF0, 0xF1, 0x5B, 0xFF, 0x4B, 0xDF, 0xB1, 0x78, 0xD8, 0x48, 0x7A, 0xA3, 0xDD } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x000006F4, 0x0000FA52, { { 0xC8, 0x33, 0xCC, 0x0A, 0x40, 0x8A, 0x96, 0x4F, 0x42, 0x7E, 0x8B, 0x62, 0x9C, 0x2F, 0x33, 0x0B } } } }, // floppy (French)
- { UNK_LANG, kPlatformPC, { 0x000006F4, 0x0000F8A6, { { 0x8B, 0xF3, 0x80, 0xE1, 0xB8, 0xCA, 0xE1, 0x18, 0x72, 0xA3, 0xF0, 0x4C, 0xBF, 0x81, 0x97, 0x71 } } } }, // floppy (German)
- { UNK_LANG, kPlatformPC, { 0x000006F4, 0x0000FA35, { { 0x4C, 0x26, 0x1B, 0xF6, 0x8E, 0x73, 0xB7, 0xD2, 0x58, 0x59, 0xB8, 0x97, 0x58, 0xFB, 0x0E, 0x2A } } } }, // floppy (Italian)
- { UNK_LANG, kPlatformPC, { 0x000006BE, 0x0000E9FF, { { 0x9A, 0xCD, 0x40, 0x44, 0xEF, 0x9F, 0x05, 0x86, 0xDA, 0x49, 0x8A, 0x85, 0x68, 0xDF, 0xA7, 0x55 } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x0000027C, 0x00007742, { { 0x42, 0x37, 0xF8, 0xDD, 0xA2, 0x8C, 0xA6, 0x26, 0x89, 0x5F, 0xCF, 0x61, 0xDD, 0x8F, 0xC7, 0x1E } } } }, // demo
- { UNK_LANG, kPlatformPC, { 0x0000024C, 0x00004C10, { { 0x21, 0x3A, 0x86, 0x60, 0xA8, 0xFF, 0x42, 0x19, 0x35, 0x32, 0xA5, 0xB9, 0x3A, 0xDD, 0xA9, 0xC7 } } } }, // Lands of Lore demo
+ { UNK_LANG, kPlatformDOS, { 0x000006F4, 0x0000F5AD, { { 0x23, 0x1E, 0x30, 0xF0, 0xF1, 0x5B, 0xFF, 0x4B, 0xDF, 0xB1, 0x78, 0xD8, 0x48, 0x7A, 0xA3, 0xDD } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x000006F4, 0x0000FA52, { { 0xC8, 0x33, 0xCC, 0x0A, 0x40, 0x8A, 0x96, 0x4F, 0x42, 0x7E, 0x8B, 0x62, 0x9C, 0x2F, 0x33, 0x0B } } } }, // floppy (French)
+ { UNK_LANG, kPlatformDOS, { 0x000006F4, 0x0000F8A6, { { 0x8B, 0xF3, 0x80, 0xE1, 0xB8, 0xCA, 0xE1, 0x18, 0x72, 0xA3, 0xF0, 0x4C, 0xBF, 0x81, 0x97, 0x71 } } } }, // floppy (German)
+ { UNK_LANG, kPlatformDOS, { 0x000006F4, 0x0000FA35, { { 0x4C, 0x26, 0x1B, 0xF6, 0x8E, 0x73, 0xB7, 0xD2, 0x58, 0x59, 0xB8, 0x97, 0x58, 0xFB, 0x0E, 0x2A } } } }, // floppy (Italian)
+ { UNK_LANG, kPlatformDOS, { 0x000006BE, 0x0000E9FF, { { 0x9A, 0xCD, 0x40, 0x44, 0xEF, 0x9F, 0x05, 0x86, 0xDA, 0x49, 0x8A, 0x85, 0x68, 0xDF, 0xA7, 0x55 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x0000027C, 0x00007742, { { 0x42, 0x37, 0xF8, 0xDD, 0xA2, 0x8C, 0xA6, 0x26, 0x89, 0x5F, 0xCF, 0x61, 0xDD, 0x8F, 0xC7, 0x1E } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x0000024C, 0x00004C10, { { 0x21, 0x3A, 0x86, 0x60, 0xA8, 0xFF, 0x42, 0x19, 0x35, 0x32, 0xA5, 0xB9, 0x3A, 0xDD, 0xA9, 0xC7 } } } }, // Lands of Lore demo
{ UNK_LANG, kPlatformFMTowns, { 0x000006BC, 0x0000DCE3, { { 0x27, 0x09, 0x22, 0xDC, 0xED, 0xDE, 0x88, 0xAE, 0xDB, 0x97, 0x52, 0x12, 0x96, 0x8D, 0x8D, 0x37 } } } },
@@ -1168,7 +1168,7 @@ const ExtractEntrySearchData k2SeqplaySeqDataProvider[] = {
const ExtractEntrySearchData k2SeqplayCreditsProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000AE8, 0x0002E520, { { 0x19, 0x59, 0xEA, 0x70, 0x23, 0xE2, 0x41, 0x78, 0x2D, 0xF5, 0xE6, 0x28, 0xEA, 0x0C, 0xCF, 0x79 } } } },
- { IT_ITA, kPlatformPC, { 0x00000AE8, 0x0002EE4A, { { 0x3E, 0x5C, 0x6F, 0x9E, 0x72, 0x2D, 0xAB, 0x17, 0x1D, 0x27, 0xFF, 0x32, 0xD3, 0x48, 0x46, 0xBA } } } }, // (fan) CD
+ { IT_ITA, kPlatformDOS, { 0x00000AE8, 0x0002EE4A, { { 0x3E, 0x5C, 0x6F, 0x9E, 0x72, 0x2D, 0xAB, 0x17, 0x1D, 0x27, 0xFF, 0x32, 0xD3, 0x48, 0x46, 0xBA } } } }, // (fan) CD
EXTRACT_END_ENTRY
};
@@ -1180,17 +1180,17 @@ const ExtractEntrySearchData k2SeqplayCreditsSpecialProvider[] = {
};
const ExtractEntrySearchData k2SeqplayIntroTracksProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x00000592, { { 0xDE, 0xD9, 0x5E, 0xCA, 0x5A, 0x9F, 0x8B, 0xB1, 0xE2, 0xDB, 0xA4, 0xA1, 0xAF, 0xD4, 0x75, 0x46 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x000002C9, { { 0xFA, 0x80, 0x3C, 0x78, 0x66, 0x2C, 0xD5, 0x91, 0x5D, 0xF1, 0xE9, 0xC1, 0x6A, 0x65, 0xEB, 0xD6 } } } }, // CD
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x00000542, { { 0xE5, 0xAA, 0x6A, 0xB9, 0x19, 0xAB, 0x35, 0x26, 0x43, 0x70, 0x32, 0xEF, 0xB9, 0x7F, 0x0F, 0x19 } } } }, // demo
- { UNK_LANG, kPlatformPC, { 0x0000001A, 0x0000096C, { { 0xC2, 0xBD, 0x2C, 0x65, 0xD3, 0xFE, 0xF1, 0x6A, 0xE7, 0x34, 0x18, 0x0C, 0x86, 0x95, 0x66, 0x35 } } } }, // Lands of Lore demo
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x00000592, { { 0xDE, 0xD9, 0x5E, 0xCA, 0x5A, 0x9F, 0x8B, 0xB1, 0xE2, 0xDB, 0xA4, 0xA1, 0xAF, 0xD4, 0x75, 0x46 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x000002C9, { { 0xFA, 0x80, 0x3C, 0x78, 0x66, 0x2C, 0xD5, 0x91, 0x5D, 0xF1, 0xE9, 0xC1, 0x6A, 0x65, 0xEB, 0xD6 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x00000542, { { 0xE5, 0xAA, 0x6A, 0xB9, 0x19, 0xAB, 0x35, 0x26, 0x43, 0x70, 0x32, 0xEF, 0xB9, 0x7F, 0x0F, 0x19 } } } }, // demo
+ { UNK_LANG, kPlatformDOS, { 0x0000001A, 0x0000096C, { { 0xC2, 0xBD, 0x2C, 0x65, 0xD3, 0xFE, 0xF1, 0x6A, 0xE7, 0x34, 0x18, 0x0C, 0x86, 0x95, 0x66, 0x35 } } } }, // Lands of Lore demo
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData k2SeqplayFinaleTracksProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000012, 0x00000618, { { 0x22, 0x61, 0x4D, 0x6F, 0xCE, 0x38, 0x64, 0xAB, 0x20, 0xD8, 0x34, 0x33, 0x44, 0x21, 0xE0, 0x23 } } } }, // floppy
- { UNK_LANG, kPlatformPC, { 0x00000009, 0x0000030C, { { 0x24, 0x3F, 0x57, 0xFA, 0x7E, 0x6D, 0x61, 0x6C, 0x53, 0xBC, 0x44, 0x38, 0x61, 0xE9, 0x3E, 0xE6 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000012, 0x00000618, { { 0x22, 0x61, 0x4D, 0x6F, 0xCE, 0x38, 0x64, 0xAB, 0x20, 0xD8, 0x34, 0x33, 0x44, 0x21, 0xE0, 0x23 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x00000009, 0x0000030C, { { 0x24, 0x3F, 0x57, 0xFA, 0x7E, 0x6D, 0x61, 0x6C, 0x53, 0xBC, 0x44, 0x38, 0x61, 0xE9, 0x3E, 0xE6 } } } }, // CD
EXTRACT_END_ENTRY
};
@@ -1214,7 +1214,7 @@ const ExtractEntrySearchData k2SeqplayShapeAnimDataProvider[] = {
};
const ExtractEntrySearchData k2IngamePakFilesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000049F, 0x00012F40, { { 0x4B, 0x2A, 0x84, 0xE3, 0xA5, 0x34, 0xE9, 0xB3, 0xB7, 0x39, 0xF1, 0x1B, 0x4C, 0xE6, 0x43, 0x79 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x0000049F, 0x00012F40, { { 0x4B, 0x2A, 0x84, 0xE3, 0xA5, 0x34, 0xE9, 0xB3, 0xB7, 0x39, 0xF1, 0x1B, 0x4C, 0xE6, 0x43, 0x79 } } } }, // floppy
{ UNK_LANG, kPlatformFMTowns, { 0x0000011C, 0x00003FB8, { { 0x66, 0x34, 0xE8, 0x1C, 0xF9, 0xFF, 0x84, 0x90, 0x20, 0x71, 0x42, 0xA3, 0x2C, 0x4A, 0xE9, 0x46 } } } },
@@ -1224,7 +1224,7 @@ const ExtractEntrySearchData k2IngamePakFilesProvider[] = {
};
const ExtractEntrySearchData k2IngameSfxFilesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000006F1, 0x0001545E, { { 0xD3, 0x8A, 0xA1, 0xD4, 0x83, 0x77, 0x96, 0x6D, 0x87, 0xB1, 0x71, 0x8F, 0x38, 0x6A, 0x34, 0xDC } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000006F1, 0x0001545E, { { 0xD3, 0x8A, 0xA1, 0xD4, 0x83, 0x77, 0x96, 0x6D, 0x87, 0xB1, 0x71, 0x8F, 0x38, 0x6A, 0x34, 0xDC } } } },
{ UNK_LANG, kPlatformFMTowns, { 0x00000967, 0x0002101A, { { 0x09, 0xC7, 0xB7, 0x2A, 0x76, 0xF1, 0x4B, 0x87, 0xC5, 0x83, 0xFF, 0xF3, 0xDB, 0x3C, 0x66, 0x60 } } } },
{ UNK_LANG, kPlatformPC98, { 0x000006F1, 0x0001545E, { { 0xD3, 0x8A, 0xA1, 0xD4, 0x83, 0x77, 0x96, 0x6D, 0x87, 0xB1, 0x71, 0x8F, 0x38, 0x6A, 0x34, 0xDC } } } },
@@ -1232,7 +1232,7 @@ const ExtractEntrySearchData k2IngameSfxFilesProvider[] = {
};
const ExtractEntrySearchData k2IngameSfxIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000358, 0x000074F4, { { 0xC8, 0x30, 0x1D, 0x9C, 0xFC, 0xF8, 0xD5, 0xBA, 0x7E, 0xAB, 0x13, 0x3F, 0x43, 0x50, 0xFA, 0xC4 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000358, 0x000074F4, { { 0xC8, 0x30, 0x1D, 0x9C, 0xFC, 0xF8, 0xD5, 0xBA, 0x7E, 0xAB, 0x13, 0x3F, 0x43, 0x50, 0xFA, 0xC4 } } } }, // CD
{ UNK_LANG, kPlatformUnknown, { 0x00000358, 0x0000747E, { { 0x20, 0x99, 0x4D, 0xB8, 0xF2, 0x05, 0xF2, 0xA7, 0x07, 0x28, 0x97, 0xFB, 0x70, 0x1F, 0x2A, 0x73 } } } }, // floppy + FM-TOWNS
@@ -1252,10 +1252,10 @@ const ExtractEntrySearchData k2IngameCDAProvider[] = {
};
const ExtractEntrySearchData k2IngameTalkObjIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000078, 0x00000A9C, { { 0x27, 0x65, 0xFA, 0xB1, 0xF8, 0x04, 0x7F, 0x93, 0x2B, 0x2D, 0x44, 0x3C, 0x95, 0x13, 0x50, 0xD2 } } } }, // floppy (English)
- { UNK_LANG, kPlatformPC, { 0x00000078, 0x00000A53, { { 0x18, 0x5B, 0x79, 0x92, 0x54, 0xDB, 0x4B, 0x0C, 0x78, 0x89, 0x7C, 0x59, 0xBF, 0x53, 0x37, 0x14 } } } }, // floppy (German + French)
- { UNK_LANG, kPlatformPC, { 0x00000078, 0x00000A7C, { { 0x33, 0x89, 0x69, 0xEF, 0x62, 0x94, 0x3A, 0xC0, 0xB2, 0xBA, 0xFB, 0x0C, 0x86, 0x2C, 0xAC, 0x5C } } } }, // floppy (Italian)
- { UNK_LANG, kPlatformPC, { 0x00000084, 0x00000CD0, { { 0x82, 0x2E, 0xF4, 0xDD, 0x28, 0x75, 0xDD, 0x79, 0x78, 0x62, 0x55, 0x48, 0xDD, 0xF7, 0x16, 0x81 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000078, 0x00000A9C, { { 0x27, 0x65, 0xFA, 0xB1, 0xF8, 0x04, 0x7F, 0x93, 0x2B, 0x2D, 0x44, 0x3C, 0x95, 0x13, 0x50, 0xD2 } } } }, // floppy (English)
+ { UNK_LANG, kPlatformDOS, { 0x00000078, 0x00000A53, { { 0x18, 0x5B, 0x79, 0x92, 0x54, 0xDB, 0x4B, 0x0C, 0x78, 0x89, 0x7C, 0x59, 0xBF, 0x53, 0x37, 0x14 } } } }, // floppy (German + French)
+ { UNK_LANG, kPlatformDOS, { 0x00000078, 0x00000A7C, { { 0x33, 0x89, 0x69, 0xEF, 0x62, 0x94, 0x3A, 0xC0, 0xB2, 0xBA, 0xFB, 0x0C, 0x86, 0x2C, 0xAC, 0x5C } } } }, // floppy (Italian)
+ { UNK_LANG, kPlatformDOS, { 0x00000084, 0x00000CD0, { { 0x82, 0x2E, 0xF4, 0xDD, 0x28, 0x75, 0xDD, 0x79, 0x78, 0x62, 0x55, 0x48, 0xDD, 0xF7, 0x16, 0x81 } } } }, // CD
{ UNK_LANG, kPlatformFMTowns, { 0x0000007A, 0x00000744, { { 0x74, 0x84, 0xB4, 0xA6, 0x9D, 0x91, 0xBF, 0x24, 0x1E, 0xD5, 0xDE, 0xD4, 0x73, 0x93, 0x1F, 0xE6 } } } },
@@ -1272,7 +1272,7 @@ const ExtractEntrySearchData k2IngameTimJpStringsProvider[] = {
};
const ExtractEntrySearchData k2IngameShapeAnimDataProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000348, 0x0001AAEB, { { 0x67, 0xD1, 0x03, 0xBF, 0x4B, 0xEC, 0x80, 0x26, 0x5D, 0x1D, 0x0E, 0x5B, 0xF1, 0xE8, 0x4C, 0x64 } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000348, 0x0001AAEB, { { 0x67, 0xD1, 0x03, 0xBF, 0x4B, 0xEC, 0x80, 0x26, 0x5D, 0x1D, 0x0E, 0x5B, 0xF1, 0xE8, 0x4C, 0x64 } } } }, // CD
{ UNK_LANG, kPlatformUnknown, { 0x00000348, 0x00002473, { { 0xBC, 0x18, 0x51, 0xFA, 0x51, 0x1D, 0x24, 0x7D, 0x44, 0xD0, 0xE2, 0x38, 0x31, 0x33, 0x3B, 0x56 } } } }, // floppy + FM-TOWNS
@@ -1280,9 +1280,9 @@ const ExtractEntrySearchData k2IngameShapeAnimDataProvider[] = {
};
const ExtractEntrySearchData k2IngameTlkDemoStringsProvider[] = {
- { EN_ANY, kPlatformPC, { 0x000000CB, 0x00004741, { { 0xF3, 0x54, 0x37, 0xEE, 0x61, 0x9E, 0xE0, 0x82, 0x64, 0x8B, 0xF3, 0x53, 0xC7, 0x2F, 0x49, 0x1F } } } },
- { FR_FRA, kPlatformPC, { 0x000000BE, 0x00004327, { { 0x8C, 0xF2, 0x5E, 0x85, 0xDA, 0xA1, 0x91, 0x90, 0xE5, 0xC7, 0x2A, 0xBA, 0x48, 0xC3, 0x9A, 0xCA } } } },
- { DE_DEU, kPlatformPC, { 0x000000DC, 0x00004C7B, { { 0xC9, 0x75, 0x3A, 0x4A, 0xF4, 0xB0, 0xE8, 0x61, 0x90, 0x74, 0x34, 0x84, 0x53, 0x54, 0xA2, 0x4F } } } },
+ { EN_ANY, kPlatformDOS, { 0x000000CB, 0x00004741, { { 0xF3, 0x54, 0x37, 0xEE, 0x61, 0x9E, 0xE0, 0x82, 0x64, 0x8B, 0xF3, 0x53, 0xC7, 0x2F, 0x49, 0x1F } } } },
+ { FR_FRA, kPlatformDOS, { 0x000000BE, 0x00004327, { { 0x8C, 0xF2, 0x5E, 0x85, 0xDA, 0xA1, 0x91, 0x90, 0xE5, 0xC7, 0x2A, 0xBA, 0x48, 0xC3, 0x9A, 0xCA } } } },
+ { DE_DEU, kPlatformDOS, { 0x000000DC, 0x00004C7B, { { 0xC9, 0x75, 0x3A, 0x4A, 0xF4, 0xB0, 0xE8, 0x61, 0x90, 0x74, 0x34, 0x84, 0x53, 0x54, 0xA2, 0x4F } } } },
EXTRACT_END_ENTRY
};
@@ -1964,430 +1964,430 @@ const ExtractEntrySearchData kEoBBaseDscShapeCoordsProvider[] = {
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleOffsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000010F, { { 0x7B, 0x7D, 0x03, 0xDE, 0x33, 0x95, 0xB8, 0xFD, 0xAD, 0x72, 0x44, 0x7D, 0x47, 0xFE, 0x04, 0x3D } } } }, // EoB1
- { UNK_LANG, kPlatformPC, { 0x00000035, 0x00000139, { { 0x74, 0x63, 0x18, 0xE7, 0xAB, 0xA4, 0x22, 0xCF, 0x32, 0x19, 0x28, 0x9E, 0x7F, 0x97, 0xA7, 0x37 } } } }, // EoB2
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000010F, { { 0x7B, 0x7D, 0x03, 0xDE, 0x33, 0x95, 0xB8, 0xFD, 0xAD, 0x72, 0x44, 0x7D, 0x47, 0xFE, 0x04, 0x3D } } } }, // EoB1
+ { UNK_LANG, kPlatformDOS, { 0x00000035, 0x00000139, { { 0x74, 0x63, 0x18, 0xE7, 0xAB, 0xA4, 0x22, 0xCF, 0x32, 0x19, 0x28, 0x9E, 0x7F, 0x97, 0xA7, 0x37 } } } }, // EoB2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000026, { { 0x5D, 0x17, 0xFB, 0x6A, 0x7F, 0x51, 0x55, 0xFB, 0x55, 0xB9, 0x50, 0xB0, 0x7F, 0xE4, 0xDF, 0x67 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000026, { { 0x5D, 0x17, 0xFB, 0x6A, 0x7F, 0x51, 0x55, 0xFB, 0x55, 0xB9, 0x50, 0xB0, 0x7F, 0xE4, 0xDF, 0x67 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult3Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000013, { { 0xEE, 0xB6, 0xA5, 0x6E, 0x0C, 0x8E, 0xAB, 0x38, 0xD9, 0x23, 0xC6, 0x21, 0xB3, 0x7E, 0x97, 0x78 } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000019, { { 0x86, 0xD8, 0x04, 0xD2, 0x66, 0x6F, 0x43, 0x24, 0x2E, 0x93, 0xB9, 0xAE, 0xEB, 0x44, 0xCA, 0x48 } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000013, { { 0xEE, 0xB6, 0xA5, 0x6E, 0x0C, 0x8E, 0xAB, 0x38, 0xD9, 0x23, 0xC6, 0x21, 0xB3, 0x7E, 0x97, 0x78 } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000019, { { 0x86, 0xD8, 0x04, 0xD2, 0x66, 0x6F, 0x43, 0x24, 0x2E, 0x93, 0xB9, 0xAE, 0xEB, 0x44, 0xCA, 0x48 } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult4Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult5Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000020, { { 0x37, 0xA1, 0x0D, 0x64, 0xD6, 0x1E, 0xBA, 0xA3, 0xD9, 0x0A, 0x6C, 0xAB, 0x6B, 0xA3, 0x59, 0x24 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000020, { { 0x37, 0xA1, 0x0D, 0x64, 0xD6, 0x1E, 0xBA, 0xA3, 0xD9, 0x0A, 0x6C, 0xAB, 0x6B, 0xA3, 0x59, 0x24 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorScaleMult6Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000006, { { 0x98, 0xD8, 0xF8, 0x0C, 0x98, 0xC4, 0xF1, 0x87, 0x59, 0x32, 0x78, 0x31, 0xFA, 0x98, 0x8A, 0x43 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorType5OffsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000012, { { 0x73, 0xBB, 0x61, 0xD6, 0xA7, 0x75, 0xC8, 0x7B, 0xD6, 0xA4, 0x53, 0x1B, 0x54, 0xE9, 0x30, 0x3F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000012, { { 0x73, 0xBB, 0x61, 0xD6, 0xA7, 0x75, 0xC8, 0x7B, 0xD6, 0xA4, 0x53, 0x1B, 0x54, 0xE9, 0x30, 0x3F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorXEProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000010F, { { 0x7B, 0x7D, 0x03, 0xDE, 0x33, 0x95, 0xB8, 0xFD, 0xAD, 0x72, 0x44, 0x7D, 0x47, 0xFE, 0x04, 0x3D } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000010F, { { 0x7B, 0x7D, 0x03, 0xDE, 0x33, 0x95, 0xB8, 0xFD, 0xAD, 0x72, 0x44, 0x7D, 0x47, 0xFE, 0x04, 0x3D } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000D7, { { 0x25, 0xAE, 0xF4, 0x99, 0xE8, 0x97, 0x47, 0xAE, 0x75, 0xF3, 0xA9, 0x70, 0x4C, 0x70, 0xF3, 0x11 } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000D8, { { 0xB4, 0xAA, 0x0D, 0x91, 0x58, 0x22, 0x16, 0xCF, 0xC5, 0x9D, 0x8D, 0xA1, 0xB4, 0x40, 0x83, 0x0E } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000D7, { { 0x25, 0xAE, 0xF4, 0x99, 0xE8, 0x97, 0x47, 0xAE, 0x75, 0xF3, 0xA9, 0x70, 0x4C, 0x70, 0xF3, 0x11 } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000D8, { { 0xB4, 0xAA, 0x0D, 0x91, 0x58, 0x22, 0x16, 0xCF, 0xC5, 0x9D, 0x8D, 0xA1, 0xB4, 0x40, 0x83, 0x0E } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY3Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000058, { { 0xF0, 0x3C, 0x3B, 0x97, 0x10, 0x95, 0x89, 0x18, 0x3B, 0xA9, 0xE8, 0x77, 0x9B, 0x10, 0xDC, 0xF1 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000058, { { 0xF0, 0x3C, 0x3B, 0x97, 0x10, 0x95, 0x89, 0x18, 0x3B, 0xA9, 0xE8, 0x77, 0x9B, 0x10, 0xDC, 0xF1 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY4Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000076, { { 0x84, 0xB6, 0x8F, 0x7E, 0x9A, 0x17, 0xAC, 0x59, 0xB1, 0x4C, 0xDE, 0x11, 0xA6, 0x95, 0xE3, 0x76 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000076, { { 0x84, 0xB6, 0x8F, 0x7E, 0x9A, 0x17, 0xAC, 0x59, 0xB1, 0x4C, 0xDE, 0x11, 0xA6, 0x95, 0xE3, 0x76 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY5Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000D9, { { 0x5D, 0x27, 0x1D, 0xD6, 0x5F, 0x98, 0xF9, 0x7D, 0x65, 0x7B, 0xE0, 0x67, 0x34, 0xA0, 0xE8, 0x30 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000D9, { { 0x5D, 0x27, 0x1D, 0xD6, 0x5F, 0x98, 0xF9, 0x7D, 0x65, 0x7B, 0xE0, 0x67, 0x34, 0xA0, 0xE8, 0x30 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY6Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000D9, { { 0x4D, 0x15, 0x4A, 0xF1, 0x17, 0x09, 0xC1, 0xA6, 0x08, 0x4A, 0xCD, 0xB2, 0x68, 0xC2, 0x59, 0x52 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000D9, { { 0x4D, 0x15, 0x4A, 0xF1, 0x17, 0x09, 0xC1, 0xA6, 0x08, 0x4A, 0xCD, 0xB2, 0x68, 0xC2, 0x59, 0x52 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorY7Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000DA, { { 0xA9, 0x24, 0x71, 0x8A, 0x18, 0x24, 0x6D, 0x0A, 0x65, 0x12, 0xBB, 0x1F, 0xE7, 0x95, 0xC5, 0xA4 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000DA, { { 0xA9, 0x24, 0x71, 0x8A, 0x18, 0x24, 0x6D, 0x0A, 0x65, 0x12, 0xBB, 0x1F, 0xE7, 0x95, 0xC5, 0xA4 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscDoorCoordsExtProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000048, 0x00000C8E, { { 0x2E, 0x0E, 0xB2, 0xAC, 0xE7, 0x0F, 0xDF, 0x38, 0xDF, 0x92, 0xB7, 0xB5, 0xA2, 0xFD, 0x40, 0x2D } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000048, 0x00000C8E, { { 0x2E, 0x0E, 0xB2, 0xAC, 0xE7, 0x0F, 0xDF, 0x38, 0xDF, 0x92, 0xB7, 0xB5, 0xA2, 0xFD, 0x40, 0x2D } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscItemPosIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x00000018, { { 0x74, 0x90, 0x47, 0xE6, 0xFB, 0xC0, 0x34, 0xDF, 0x92, 0x5B, 0xA1, 0xCB, 0x06, 0x33, 0xCA, 0x6B } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x00000018, { { 0x74, 0x90, 0x47, 0xE6, 0xFB, 0xC0, 0x34, 0xDF, 0x92, 0x5B, 0xA1, 0xCB, 0x06, 0x33, 0xCA, 0x6B } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscItemShpXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000024, 0x00000F2C, { { 0x9E, 0x22, 0x3F, 0x8F, 0x31, 0x83, 0xF7, 0x7C, 0x59, 0x60, 0x7C, 0x0A, 0xEB, 0xD2, 0x18, 0x85 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000024, 0x00000F2C, { { 0x9E, 0x22, 0x3F, 0x8F, 0x31, 0x83, 0xF7, 0x7C, 0x59, 0x60, 0x7C, 0x0A, 0xEB, 0xD2, 0x18, 0x85 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscItemPosUnkProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000012, 0x00000433, { { 0xA4, 0x7B, 0x08, 0x07, 0x81, 0xEA, 0x4F, 0x99, 0x77, 0x74, 0x93, 0x65, 0xBF, 0x0C, 0x3B, 0x94 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000012, 0x00000433, { { 0xA4, 0x7B, 0x08, 0x07, 0x81, 0xEA, 0x4F, 0x99, 0x77, 0x74, 0x93, 0x65, 0xBF, 0x0C, 0x3B, 0x94 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscItemTileIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000012, 0x00000D23, { { 0x0E, 0x17, 0xE1, 0x1F, 0x34, 0x7D, 0x30, 0xF6, 0xAE, 0x0B, 0xAC, 0x9D, 0x21, 0xB6, 0x97, 0xCC } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000012, 0x00000D23, { { 0x0E, 0x17, 0xE1, 0x1F, 0x34, 0x7D, 0x30, 0xF6, 0xAE, 0x0B, 0xAC, 0x9D, 0x21, 0xB6, 0x97, 0xCC } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscItemShapeMapProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000005A, 0x00000B23, { { 0x41, 0x4A, 0x95, 0x7F, 0x82, 0x85, 0x28, 0x55, 0xD4, 0xD5, 0xD6, 0xD8, 0xA9, 0xAE, 0xF4, 0xC0 } } } }, // EoB 1
- { UNK_LANG, kPlatformPC, { 0x00000071, 0x00000860, { { 0xEA, 0x5D, 0x33, 0xB6, 0x38, 0x30, 0x65, 0x29, 0x7F, 0x08, 0x89, 0x04, 0xC5, 0x97, 0x76, 0xCB } } } }, // EoB 2
+ { UNK_LANG, kPlatformDOS, { 0x0000005A, 0x00000B23, { { 0x41, 0x4A, 0x95, 0x7F, 0x82, 0x85, 0x28, 0x55, 0xD4, 0xD5, 0xD6, 0xD8, 0xA9, 0xAE, 0xF4, 0xC0 } } } }, // EoB 1
+ { UNK_LANG, kPlatformDOS, { 0x00000071, 0x00000860, { { 0xEA, 0x5D, 0x33, 0xB6, 0x38, 0x30, 0x65, 0x29, 0x7F, 0x08, 0x89, 0x04, 0xC5, 0x97, 0x76, 0xCB } } } }, // EoB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscTelptrShpCoordsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000009C, 0x00000EBE, { { 0x2D, 0x1D, 0x74, 0x39, 0x29, 0xC3, 0x6F, 0x53, 0xD9, 0xA5, 0x4B, 0x9F, 0xD6, 0xDD, 0x73, 0xE9 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000009C, 0x00000EBE, { { 0x2D, 0x1D, 0x74, 0x39, 0x29, 0xC3, 0x6F, 0x53, 0xD9, 0xA5, 0x4B, 0x9F, 0xD6, 0xDD, 0x73, 0xE9 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBasePortalSeqDataProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000007E, 0x000002D0, { { 0x18, 0x7E, 0x65, 0x17, 0x4C, 0xD2, 0xB5, 0x2E, 0x81, 0xF8, 0x1C, 0xAC, 0x37, 0x21, 0x62, 0x2A } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000007E, 0x000002D0, { { 0x18, 0x7E, 0x65, 0x17, 0x4C, 0xD2, 0xB5, 0x2E, 0x81, 0xF8, 0x1C, 0xAC, 0x37, 0x21, 0x62, 0x2A } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseManDefProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000078, 0x000002CD, { { 0x33, 0x9B, 0x0C, 0x6A, 0x2E, 0x4F, 0xE9, 0x02, 0x7B, 0xEE, 0xF1, 0x04, 0xA3, 0xBA, 0xD4, 0xF3 } } } }, // EoB 1
- { DE_DEU, kPlatformPC, { 0x00000078, 0x000002C4, { { 0x92, 0x20, 0x58, 0x5F, 0x44, 0x09, 0x0B, 0xF0, 0xDA, 0x09, 0xE2, 0x44, 0x0B, 0xB7, 0x95, 0x96 } } } }, // EoB 1
- { EN_ANY, kPlatformPC, { 0x000000C8, 0x00000834, { { 0x18, 0xEA, 0x33, 0xB7, 0x4B, 0x72, 0x23, 0x8D, 0x0E, 0x9F, 0x4E, 0xF5, 0x09, 0xA3, 0x9C, 0xEA } } } }, // EoB 2
- { DE_DEU, kPlatformPC, { 0x000000C8, 0x00000622, { { 0xFE, 0x1D, 0x94, 0x3A, 0x0B, 0x17, 0x89, 0xEF, 0x60, 0x18, 0xB2, 0x43, 0x7A, 0x02, 0xDB, 0x61 } } } }, // EoB 2
+ { EN_ANY, kPlatformDOS, { 0x00000078, 0x000002CD, { { 0x33, 0x9B, 0x0C, 0x6A, 0x2E, 0x4F, 0xE9, 0x02, 0x7B, 0xEE, 0xF1, 0x04, 0xA3, 0xBA, 0xD4, 0xF3 } } } }, // EoB 1
+ { DE_DEU, kPlatformDOS, { 0x00000078, 0x000002C4, { { 0x92, 0x20, 0x58, 0x5F, 0x44, 0x09, 0x0B, 0xF0, 0xDA, 0x09, 0xE2, 0x44, 0x0B, 0xB7, 0x95, 0x96 } } } }, // EoB 1
+ { EN_ANY, kPlatformDOS, { 0x000000C8, 0x00000834, { { 0x18, 0xEA, 0x33, 0xB7, 0x4B, 0x72, 0x23, 0x8D, 0x0E, 0x9F, 0x4E, 0xF5, 0x09, 0xA3, 0x9C, 0xEA } } } }, // EoB 2
+ { DE_DEU, kPlatformDOS, { 0x000000C8, 0x00000622, { { 0xFE, 0x1D, 0x94, 0x3A, 0x0B, 0x17, 0x89, 0xEF, 0x60, 0x18, 0xB2, 0x43, 0x7A, 0x02, 0xDB, 0x61 } } } }, // EoB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseManWordProvider[] = {
- { EN_ANY, kPlatformPC, { 0x000000E0, 0x00005134, { { 0x68, 0x9C, 0x19, 0x2B, 0x5F, 0x38, 0x36, 0x41, 0xA7, 0x7E, 0xB7, 0x51, 0x41, 0x60, 0x1D, 0x67 } } } }, // EoB 1
- { DE_DEU, kPlatformPC, { 0x000000EA, 0x00005458, { { 0xEC, 0x14, 0x11, 0xE9, 0x19, 0xFD, 0xF8, 0xFC, 0xA8, 0x46, 0x3D, 0xCD, 0x56, 0x08, 0xC3, 0x4A } } } }, // EoB 1
- { EN_ANY, kPlatformPC, { 0x0000017E, 0x00008B64, { { 0x66, 0x38, 0x09, 0x5B, 0x2E, 0x50, 0x54, 0x43, 0x1C, 0xEC, 0x56, 0x3B, 0x72, 0x39, 0xF9, 0xC3 } } } }, // EoB 2
- { DE_DEU, kPlatformPC, { 0x0000015B, 0x00007C37, { { 0x44, 0xA3, 0x32, 0x88, 0x9F, 0x63, 0x28, 0xA0, 0xBD, 0x00, 0xF1, 0x08, 0xCA, 0xE5, 0xFE, 0x5F } } } }, // EoB 2
+ { EN_ANY, kPlatformDOS, { 0x000000E0, 0x00005134, { { 0x68, 0x9C, 0x19, 0x2B, 0x5F, 0x38, 0x36, 0x41, 0xA7, 0x7E, 0xB7, 0x51, 0x41, 0x60, 0x1D, 0x67 } } } }, // EoB 1
+ { DE_DEU, kPlatformDOS, { 0x000000EA, 0x00005458, { { 0xEC, 0x14, 0x11, 0xE9, 0x19, 0xFD, 0xF8, 0xFC, 0xA8, 0x46, 0x3D, 0xCD, 0x56, 0x08, 0xC3, 0x4A } } } }, // EoB 1
+ { EN_ANY, kPlatformDOS, { 0x0000017E, 0x00008B64, { { 0x66, 0x38, 0x09, 0x5B, 0x2E, 0x50, 0x54, 0x43, 0x1C, 0xEC, 0x56, 0x3B, 0x72, 0x39, 0xF9, 0xC3 } } } }, // EoB 2
+ { DE_DEU, kPlatformDOS, { 0x0000015B, 0x00007C37, { { 0x44, 0xA3, 0x32, 0x88, 0x9F, 0x63, 0x28, 0xA0, 0xBD, 0x00, 0xF1, 0x08, 0xCA, 0xE5, 0xFE, 0x5F } } } }, // EoB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseManPromptProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000041, 0x000013AC, { { 0x40, 0x2B, 0xB5, 0x99, 0xEF, 0x8F, 0x3C, 0x9F, 0xB1, 0x5A, 0xBE, 0xE4, 0x80, 0x8E, 0xBB, 0x96 } } } }, // EoB 1
- { DE_DEU, kPlatformPC, { 0x00000048, 0x000015A5, { { 0x0B, 0xB4, 0x9E, 0xAD, 0xB3, 0x56, 0x75, 0xC1, 0xAE, 0x29, 0xF7, 0xB5, 0x82, 0x14, 0xD1, 0x27 } } } }, // EoB 1
- { EN_ANY, kPlatformPC, { 0x00000041, 0x000013AC, { { 0x40, 0x2B, 0xB5, 0x99, 0xEF, 0x8F, 0x3C, 0x9F, 0xB1, 0x5A, 0xBE, 0xE4, 0x80, 0x8E, 0xBB, 0x96 } } } }, // EoB 2
- { DE_DEU, kPlatformPC, { 0x0000005C, 0x00001D08, { { 0x10, 0xCE, 0x2D, 0xED, 0xA9, 0xA0, 0x7C, 0xA1, 0x91, 0x3F, 0xD8, 0x43, 0x03, 0x53, 0x97, 0xCA } } } }, // EoB 2
+ { EN_ANY, kPlatformDOS, { 0x00000041, 0x000013AC, { { 0x40, 0x2B, 0xB5, 0x99, 0xEF, 0x8F, 0x3C, 0x9F, 0xB1, 0x5A, 0xBE, 0xE4, 0x80, 0x8E, 0xBB, 0x96 } } } }, // EoB 1
+ { DE_DEU, kPlatformDOS, { 0x00000048, 0x000015A5, { { 0x0B, 0xB4, 0x9E, 0xAD, 0xB3, 0x56, 0x75, 0xC1, 0xAE, 0x29, 0xF7, 0xB5, 0x82, 0x14, 0xD1, 0x27 } } } }, // EoB 1
+ { EN_ANY, kPlatformDOS, { 0x00000041, 0x000013AC, { { 0x40, 0x2B, 0xB5, 0x99, 0xEF, 0x8F, 0x3C, 0x9F, 0xB1, 0x5A, 0xBE, 0xE4, 0x80, 0x8E, 0xBB, 0x96 } } } }, // EoB 2
+ { DE_DEU, kPlatformDOS, { 0x0000005C, 0x00001D08, { { 0x10, 0xCE, 0x2D, 0xED, 0xA9, 0xA0, 0x7C, 0xA1, 0x91, 0x3F, 0xD8, 0x43, 0x03, 0x53, 0x97, 0xCA } } } }, // EoB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscMonsterFrmOffsTbl1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00001000, { { 0x98, 0x27, 0x57, 0x25, 0x3B, 0x04, 0x7D, 0x14, 0x3A, 0xD4, 0xA2, 0x5D, 0xBA, 0x04, 0x45, 0xAC } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00001000, { { 0x98, 0x27, 0x57, 0x25, 0x3B, 0x04, 0x7D, 0x14, 0x3A, 0xD4, 0xA2, 0x5D, 0xBA, 0x04, 0x45, 0xAC } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDscMonsterFrmOffsTbl2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000828, { { 0x7E, 0x8A, 0x0C, 0xEB, 0x5C, 0xBC, 0x6C, 0xBD, 0xD2, 0x48, 0x08, 0xCC, 0xF7, 0x7B, 0x81, 0x03 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000828, { { 0x7E, 0x8A, 0x0C, 0xEB, 0x5C, 0xBC, 0x6C, 0xBD, 0xD2, 0x48, 0x08, 0xCC, 0xF7, 0x7B, 0x81, 0x03 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseInvSlotXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000036, 0x000010BF, { { 0x50, 0x6E, 0x67, 0x2B, 0x7D, 0x6C, 0xF2, 0x21, 0x73, 0xA2, 0xD5, 0xBB, 0xCE, 0x3B, 0x71, 0xAA } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000036, 0x000010BF, { { 0x50, 0x6E, 0x67, 0x2B, 0x7D, 0x6C, 0xF2, 0x21, 0x73, 0xA2, 0xD5, 0xBB, 0xCE, 0x3B, 0x71, 0xAA } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseInvSlotYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001B, 0x00000A5B, { { 0x47, 0x55, 0x7D, 0x84, 0x45, 0x91, 0xC4, 0x44, 0x10, 0xD5, 0x39, 0xC4, 0xC8, 0x4F, 0x01, 0xA4 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001B, 0x00000A5B, { { 0x47, 0x55, 0x7D, 0x84, 0x45, 0x91, 0xC4, 0x44, 0x10, 0xD5, 0x39, 0xC4, 0xC8, 0x4F, 0x01, 0xA4 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSlotValidationFlagsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000036, 0x00001F6B, { { 0x87, 0x4F, 0x9A, 0x97, 0x20, 0x20, 0xB2, 0xA6, 0xF7, 0xC2, 0x5F, 0xAA, 0x17, 0xEA, 0xB4, 0x50 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000036, 0x00001F6B, { { 0x87, 0x4F, 0x9A, 0x97, 0x20, 0x20, 0xB2, 0xA6, 0xF7, 0xC2, 0x5F, 0xAA, 0x17, 0xEA, 0xB4, 0x50 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseProjectileWeaponTypesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x0000061C, { { 0x05, 0x55, 0xA6, 0xD1, 0x3C, 0x12, 0x84, 0xDA, 0xA9, 0x33, 0xCF, 0x07, 0x05, 0x2A, 0xB2, 0x29 } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x0000000F, 0x00000829, { { 0x9F, 0x6A, 0x13, 0x8A, 0xA7, 0x40, 0xE8, 0x40, 0x2E, 0x87, 0x49, 0x6B, 0x67, 0xED, 0xE8, 0xCE } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x0000061C, { { 0x05, 0x55, 0xA6, 0xD1, 0x3C, 0x12, 0x84, 0xDA, 0xA9, 0x33, 0xCF, 0x07, 0x05, 0x2A, 0xB2, 0x29 } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x0000000F, 0x00000829, { { 0x9F, 0x6A, 0x13, 0x8A, 0xA7, 0x40, 0xE8, 0x40, 0x2E, 0x87, 0x49, 0x6B, 0x67, 0xED, 0xE8, 0xCE } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseWandTypesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000007, 0x00000162, { { 0xDB, 0x5D, 0x34, 0x70, 0x41, 0xAB, 0x8F, 0x75, 0xC8, 0x61, 0x8E, 0x44, 0x82, 0xCF, 0x28, 0x03 } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x00000175, { { 0x01, 0xC2, 0xF0, 0xC6, 0x1C, 0xD0, 0x14, 0xD9, 0xB8, 0xF5, 0x9C, 0xFC, 0x22, 0xE4, 0xA0, 0xA7 } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000007, 0x00000162, { { 0xDB, 0x5D, 0x34, 0x70, 0x41, 0xAB, 0x8F, 0x75, 0xC8, 0x61, 0x8E, 0x44, 0x82, 0xCF, 0x28, 0x03 } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x00000175, { { 0x01, 0xC2, 0xF0, 0xC6, 0x1C, 0xD0, 0x14, 0xD9, 0xB8, 0xF5, 0x9C, 0xFC, 0x22, 0xE4, 0xA0, 0xA7 } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseDrawObjPosIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000014, 0x00000028, { { 0x44, 0x46, 0x8C, 0x94, 0x76, 0x24, 0x08, 0xC7, 0x1F, 0x1B, 0x10, 0xD7, 0xDF, 0x18, 0x6C, 0x0D } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000014, 0x00000028, { { 0x44, 0x46, 0x8C, 0x94, 0x76, 0x24, 0x08, 0xC7, 0x1F, 0x1B, 0x10, 0xD7, 0xDF, 0x18, 0x6C, 0x0D } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseFlightObjFlipIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x00000008, { { 0xEB, 0xF0, 0x27, 0x7E, 0xA8, 0x09, 0x3A, 0x95, 0x3B, 0x71, 0x2A, 0x43, 0x2E, 0xCF, 0x22, 0x0B } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x00000008, { { 0xEB, 0xF0, 0x27, 0x7E, 0xA8, 0x09, 0x3A, 0x95, 0x3B, 0x71, 0x2A, 0x43, 0x2E, 0xCF, 0x22, 0x0B } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseFlightObjShpMapProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000058, 0x000051BD, { { 0xC3, 0xD2, 0xD1, 0xE5, 0x78, 0xEE, 0xA7, 0xAA, 0x71, 0xD1, 0xDD, 0xDF, 0x40, 0xBB, 0xAF, 0x66 } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x0000002D, 0x000025E6, { { 0x64, 0x26, 0x3D, 0xDC, 0x6C, 0x1A, 0xFC, 0x36, 0x9E, 0x5A, 0xBF, 0x64, 0xAD, 0xF4, 0xA3, 0x5D } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000058, 0x000051BD, { { 0xC3, 0xD2, 0xD1, 0xE5, 0x78, 0xEE, 0xA7, 0xAA, 0x71, 0xD1, 0xDD, 0xDF, 0x40, 0xBB, 0xAF, 0x66 } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x0000002D, 0x000025E6, { { 0x64, 0x26, 0x3D, 0xDC, 0x6C, 0x1A, 0xFC, 0x36, 0x9E, 0x5A, 0xBF, 0x64, 0xAD, 0xF4, 0xA3, 0x5D } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseFlightObjSclIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000048, 0x00002A0E, { { 0xAC, 0xBB, 0x7D, 0x73, 0x98, 0xF4, 0x1E, 0x4A, 0x77, 0xF0, 0x98, 0x75, 0x11, 0xBF, 0xF7, 0xD5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000048, 0x00002A0E, { { 0xAC, 0xBB, 0x7D, 0x73, 0x98, 0xF4, 0x1E, 0x4A, 0x77, 0xF0, 0x98, 0x75, 0x11, 0xBF, 0xF7, 0xD5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseBookNumbersProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000020, 0x00000AC8, { { 0x35, 0x05, 0x37, 0x4C, 0x05, 0x74, 0x04, 0x08, 0xAD, 0xA3, 0x64, 0xBF, 0xC0, 0x67, 0xF2, 0xF7 } } } },
- { DE_DEU, kPlatformPC, { 0x00000028, 0x00000E5D, { { 0x80, 0x98, 0x05, 0x54, 0x84, 0x90, 0xD3, 0xB3, 0x9B, 0xFB, 0x8F, 0xB9, 0xA0, 0x43, 0xAA, 0xFD } } } },
- { EN_ANY, kPlatformPC, { 0x00000020, 0x00000AC8, { { 0x35, 0x05, 0x37, 0x4C, 0x05, 0x74, 0x04, 0x08, 0xAD, 0xA3, 0x64, 0xBF, 0xC0, 0x67, 0xF2, 0xF7 } } } },
- { DE_DEU, kPlatformPC, { 0x00000022, 0x00000BCA, { { 0x93, 0x0E, 0xE0, 0x6D, 0xDD, 0x40, 0xBC, 0x89, 0x67, 0xBD, 0x8A, 0xCB, 0xD2, 0xCF, 0x78, 0x8D } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000020, 0x00000AC8, { { 0x35, 0x05, 0x37, 0x4C, 0x05, 0x74, 0x04, 0x08, 0xAD, 0xA3, 0x64, 0xBF, 0xC0, 0x67, 0xF2, 0xF7 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000028, 0x00000E5D, { { 0x80, 0x98, 0x05, 0x54, 0x84, 0x90, 0xD3, 0xB3, 0x9B, 0xFB, 0x8F, 0xB9, 0xA0, 0x43, 0xAA, 0xFD } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000020, 0x00000AC8, { { 0x35, 0x05, 0x37, 0x4C, 0x05, 0x74, 0x04, 0x08, 0xAD, 0xA3, 0x64, 0xBF, 0xC0, 0x67, 0xF2, 0xF7 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000022, 0x00000BCA, { { 0x93, 0x0E, 0xE0, 0x6D, 0xDD, 0x40, 0xBC, 0x89, 0x67, 0xBD, 0x8A, 0xCB, 0xD2, 0xCF, 0x78, 0x8D } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMageSpellsListProvider[] = {
- { EN_ANY, kPlatformPC, { 0x00000122, 0x00006304, { { 0xD7, 0x14, 0x28, 0x83, 0x04, 0xC3, 0x42, 0x5A, 0x15, 0x49, 0x91, 0x12, 0x1D, 0x49, 0x17, 0x5B } } } },
- { DE_DEU, kPlatformPC, { 0x0000013A, 0x00007155, { { 0x94, 0x45, 0xB9, 0x15, 0x57, 0x6E, 0xC6, 0x70, 0x66, 0x5F, 0xA7, 0x90, 0xA0, 0xC7, 0xC9, 0xE9 } } } },
- { EN_ANY, kPlatformPC, { 0x00000195, 0x00008AC0, { { 0x55, 0xB8, 0x75, 0x35, 0x09, 0x23, 0x83, 0x11, 0x22, 0xF8, 0x23, 0x1E, 0x8F, 0x08, 0x57, 0x66 } } } },
- { DE_DEU, kPlatformPC, { 0x0000019A, 0x0000929F, { { 0xB3, 0xA0, 0x2D, 0x3B, 0xF3, 0x72, 0x9B, 0x75, 0xA3, 0xC4, 0xD8, 0x72, 0x4B, 0xDE, 0x69, 0x82 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000122, 0x00006304, { { 0xD7, 0x14, 0x28, 0x83, 0x04, 0xC3, 0x42, 0x5A, 0x15, 0x49, 0x91, 0x12, 0x1D, 0x49, 0x17, 0x5B } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000013A, 0x00007155, { { 0x94, 0x45, 0xB9, 0x15, 0x57, 0x6E, 0xC6, 0x70, 0x66, 0x5F, 0xA7, 0x90, 0xA0, 0xC7, 0xC9, 0xE9 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000195, 0x00008AC0, { { 0x55, 0xB8, 0x75, 0x35, 0x09, 0x23, 0x83, 0x11, 0x22, 0xF8, 0x23, 0x1E, 0x8F, 0x08, 0x57, 0x66 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000019A, 0x0000929F, { { 0xB3, 0xA0, 0x2D, 0x3B, 0xF3, 0x72, 0x9B, 0x75, 0xA3, 0xC4, 0xD8, 0x72, 0x4B, 0xDE, 0x69, 0x82 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseClericSpellsListProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000013B, 0x00006BE6, { { 0x34, 0x63, 0x0B, 0xBA, 0xED, 0xC2, 0x9B, 0x31, 0xC3, 0x65, 0x51, 0xFF, 0xEF, 0xD8, 0x25, 0x92 } } } },
- { DE_DEU, kPlatformPC, { 0x0000016D, 0x00007E74, { { 0x6E, 0xDE, 0x28, 0xE6, 0x13, 0x3D, 0xA6, 0x42, 0x80, 0xAB, 0xE7, 0xED, 0xAD, 0xC8, 0x62, 0x48 } } } },
- { EN_ANY, kPlatformPC, { 0x00000164, 0x000079B3, { { 0x93, 0x16, 0x25, 0xFB, 0x76, 0xFF, 0xBC, 0x70, 0x9A, 0xB7, 0x93, 0xFC, 0x2E, 0xC3, 0x61, 0x7F } } } },
- { DE_DEU, kPlatformPC, { 0x0000018B, 0x00008BB1, { { 0x8C, 0x21, 0xED, 0xE0, 0x1F, 0xF1, 0xDB, 0x72, 0xC4, 0x46, 0x36, 0x50, 0x16, 0xD5, 0xA8, 0x68 } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000013B, 0x00006BE6, { { 0x34, 0x63, 0x0B, 0xBA, 0xED, 0xC2, 0x9B, 0x31, 0xC3, 0x65, 0x51, 0xFF, 0xEF, 0xD8, 0x25, 0x92 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000016D, 0x00007E74, { { 0x6E, 0xDE, 0x28, 0xE6, 0x13, 0x3D, 0xA6, 0x42, 0x80, 0xAB, 0xE7, 0xED, 0xAD, 0xC8, 0x62, 0x48 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000164, 0x000079B3, { { 0x93, 0x16, 0x25, 0xFB, 0x76, 0xFF, 0xBC, 0x70, 0x9A, 0xB7, 0x93, 0xFC, 0x2E, 0xC3, 0x61, 0x7F } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000018B, 0x00008BB1, { { 0x8C, 0x21, 0xED, 0xE0, 0x1F, 0xF1, 0xDB, 0x72, 0xC4, 0x46, 0x36, 0x50, 0x16, 0xD5, 0xA8, 0x68 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSpellNamesProvider[] = {
- { EN_ANY, kPlatformPC, { 0x0000029A, 0x0000F1C8, { { 0xCA, 0xE1, 0x30, 0xDC, 0xAB, 0xD1, 0x87, 0xE8, 0x51, 0xA2, 0xA2, 0x1C, 0x23, 0x4A, 0x34, 0x58 } } } },
- { DE_DEU, kPlatformPC, { 0x000002D3, 0x0001080D, { { 0x5F, 0xDB, 0x9E, 0x48, 0x30, 0x03, 0xE1, 0x8E, 0xC7, 0xDC, 0x98, 0x10, 0xCE, 0xA1, 0x28, 0x31 } } } },
- { EN_ANY, kPlatformPC, { 0x00000366, 0x00013B1A, { { 0x15, 0xCB, 0x0E, 0xA9, 0x4E, 0x78, 0x30, 0x99, 0xA1, 0xCF, 0xF7, 0x05, 0xAB, 0x00, 0x66, 0x82 } } } },
- { DE_DEU, kPlatformPC, { 0x000003BA, 0x0001626B, { { 0x0E, 0x4F, 0xF6, 0xFB, 0x78, 0x5E, 0x03, 0xE7, 0x82, 0xC4, 0xE2, 0x7B, 0xD9, 0xB2, 0xD7, 0xB2 } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000029A, 0x0000F1C8, { { 0xCA, 0xE1, 0x30, 0xDC, 0xAB, 0xD1, 0x87, 0xE8, 0x51, 0xA2, 0xA2, 0x1C, 0x23, 0x4A, 0x34, 0x58 } } } },
+ { DE_DEU, kPlatformDOS, { 0x000002D3, 0x0001080D, { { 0x5F, 0xDB, 0x9E, 0x48, 0x30, 0x03, 0xE1, 0x8E, 0xC7, 0xDC, 0x98, 0x10, 0xCE, 0xA1, 0x28, 0x31 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000366, 0x00013B1A, { { 0x15, 0xCB, 0x0E, 0xA9, 0x4E, 0x78, 0x30, 0x99, 0xA1, 0xCF, 0xF7, 0x05, 0xAB, 0x00, 0x66, 0x82 } } } },
+ { DE_DEU, kPlatformDOS, { 0x000003BA, 0x0001626B, { { 0x0E, 0x4F, 0xF6, 0xFB, 0x78, 0x5E, 0x03, 0xE7, 0x82, 0xC4, 0xE2, 0x7B, 0xD9, 0xB2, 0xD7, 0xB2 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings1Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000084, 0x000029B0, { { 0xC6, 0x90, 0x19, 0x61, 0xA1, 0x66, 0xF6, 0x03, 0x7A, 0x1F, 0x10, 0x00, 0xCA, 0x8F, 0x69, 0x3B } } } },
- { DE_DEU, kPlatformPC, { 0x0000009D, 0x000033E4, { { 0x4B, 0xCF, 0x40, 0xCE, 0x0F, 0x86, 0x98, 0x36, 0x03, 0x59, 0xFE, 0x32, 0xFA, 0x4C, 0x14, 0x75 } } } },
- { EN_ANY, kPlatformPC, { 0x00000085, 0x000029BD, { { 0xAB, 0x22, 0x4A, 0x70, 0xBB, 0x29, 0xB8, 0xBD, 0xAF, 0xC5, 0x0D, 0x1F, 0x23, 0x38, 0xBD, 0x06 } } } },
- { DE_DEU, kPlatformPC, { 0x0000008C, 0x00002D68, { { 0x4B, 0x0A, 0x09, 0x22, 0xF7, 0x77, 0x82, 0x4B, 0xFE, 0x0B, 0xF1, 0x8F, 0x1C, 0xEA, 0x1A, 0x0C } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000084, 0x000029B0, { { 0xC6, 0x90, 0x19, 0x61, 0xA1, 0x66, 0xF6, 0x03, 0x7A, 0x1F, 0x10, 0x00, 0xCA, 0x8F, 0x69, 0x3B } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000009D, 0x000033E4, { { 0x4B, 0xCF, 0x40, 0xCE, 0x0F, 0x86, 0x98, 0x36, 0x03, 0x59, 0xFE, 0x32, 0xFA, 0x4C, 0x14, 0x75 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000085, 0x000029BD, { { 0xAB, 0x22, 0x4A, 0x70, 0xBB, 0x29, 0xB8, 0xBD, 0xAF, 0xC5, 0x0D, 0x1F, 0x23, 0x38, 0xBD, 0x06 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000008C, 0x00002D68, { { 0x4B, 0x0A, 0x09, 0x22, 0xF7, 0x77, 0x82, 0x4B, 0xFE, 0x0B, 0xF1, 0x8F, 0x1C, 0xEA, 0x1A, 0x0C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings2Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000051, 0x00001AD6, { { 0x28, 0x18, 0x2B, 0xF0, 0x0E, 0xC6, 0xEB, 0x01, 0xB0, 0x9A, 0x0A, 0x65, 0x05, 0xCB, 0x8F, 0x41 } } } },
- { DE_DEU, kPlatformPC, { 0x0000004F, 0x00001A82, { { 0x77, 0x85, 0x17, 0x25, 0x07, 0x72, 0x4A, 0x7F, 0x4F, 0x39, 0x6C, 0xDD, 0xB6, 0x70, 0x11, 0x02 } } } },
- { EN_ANY, kPlatformPC, { 0x00000090, 0x00002E35, { { 0x39, 0xD7, 0xA3, 0x21, 0xF0, 0xB7, 0x93, 0x9D, 0xDD, 0xEE, 0x33, 0xC2, 0x05, 0xE6, 0xE3, 0x63 } } } },
- { DE_DEU, kPlatformPC, { 0x000000A1, 0x0000365C, { { 0x9A, 0x2D, 0xDB, 0x38, 0xB3, 0xF4, 0x0E, 0xF4, 0x36, 0x87, 0x60, 0xAE, 0xF8, 0x7E, 0xCA, 0x8A } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000051, 0x00001AD6, { { 0x28, 0x18, 0x2B, 0xF0, 0x0E, 0xC6, 0xEB, 0x01, 0xB0, 0x9A, 0x0A, 0x65, 0x05, 0xCB, 0x8F, 0x41 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000004F, 0x00001A82, { { 0x77, 0x85, 0x17, 0x25, 0x07, 0x72, 0x4A, 0x7F, 0x4F, 0x39, 0x6C, 0xDD, 0xB6, 0x70, 0x11, 0x02 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000090, 0x00002E35, { { 0x39, 0xD7, 0xA3, 0x21, 0xF0, 0xB7, 0x93, 0x9D, 0xDD, 0xEE, 0x33, 0xC2, 0x05, 0xE6, 0xE3, 0x63 } } } },
+ { DE_DEU, kPlatformDOS, { 0x000000A1, 0x0000365C, { { 0x9A, 0x2D, 0xDB, 0x38, 0xB3, 0xF4, 0x0E, 0xF4, 0x36, 0x87, 0x60, 0xAE, 0xF8, 0x7E, 0xCA, 0x8A } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings3Provider[] = {
- { EN_ANY, kPlatformPC, { 0x0000008D, 0x00002DC8, { { 0x35, 0x5E, 0xDD, 0x32, 0x2D, 0x55, 0x1E, 0xBC, 0x93, 0x49, 0x55, 0x48, 0x8F, 0xCD, 0x87, 0xEB } } } },
- { DE_DEU, kPlatformPC, { 0x000000A8, 0x0000381C, { { 0x12, 0x95, 0x55, 0x57, 0x2B, 0xA0, 0x1A, 0x75, 0xD3, 0x43, 0xFF, 0x3E, 0x00, 0xB6, 0xEC, 0x35 } } } },
- { EN_ANY, kPlatformPC, { 0x00000088, 0x00002CD4, { { 0xD8, 0xBA, 0x5D, 0x14, 0x92, 0x84, 0x5A, 0x07, 0xC6, 0x76, 0xDF, 0x11, 0x1D, 0x84, 0x7A, 0x98 } } } },
- { DE_DEU, kPlatformPC, { 0x00000081, 0x00002B14, { { 0xC8, 0xB7, 0x77, 0xBC, 0x3A, 0xB6, 0xDC, 0xB7, 0x00, 0xF3, 0x06, 0xEB, 0x77, 0x10, 0x7C, 0x7E } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000008D, 0x00002DC8, { { 0x35, 0x5E, 0xDD, 0x32, 0x2D, 0x55, 0x1E, 0xBC, 0x93, 0x49, 0x55, 0x48, 0x8F, 0xCD, 0x87, 0xEB } } } },
+ { DE_DEU, kPlatformDOS, { 0x000000A8, 0x0000381C, { { 0x12, 0x95, 0x55, 0x57, 0x2B, 0xA0, 0x1A, 0x75, 0xD3, 0x43, 0xFF, 0x3E, 0x00, 0xB6, 0xEC, 0x35 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000088, 0x00002CD4, { { 0xD8, 0xBA, 0x5D, 0x14, 0x92, 0x84, 0x5A, 0x07, 0xC6, 0x76, 0xDF, 0x11, 0x1D, 0x84, 0x7A, 0x98 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000081, 0x00002B14, { { 0xC8, 0xB7, 0x77, 0xBC, 0x3A, 0xB6, 0xDC, 0xB7, 0x00, 0xF3, 0x06, 0xEB, 0x77, 0x10, 0x7C, 0x7E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings4Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000017, 0x0000071C, { { 0x96, 0x50, 0xA8, 0x08, 0x1B, 0x2D, 0x0C, 0xF6, 0x90, 0x6A, 0xE7, 0x9F, 0x65, 0xCC, 0x71, 0xA0 } } } },
- { DE_DEU, kPlatformPC, { 0x0000001B, 0x00000840, { { 0xA2, 0xCF, 0x81, 0x3E, 0x87, 0xA8, 0x10, 0x1B, 0x44, 0x8D, 0x5B, 0x8B, 0xAE, 0x23, 0x30, 0xD3 } } } },
- { EN_ANY, kPlatformPC, { 0x0000000C, 0x000003A5, { { 0x72, 0x64, 0xBD, 0x1C, 0xED, 0x05, 0x28, 0xFC, 0x94, 0x4B, 0x8F, 0x3C, 0x38, 0x08, 0x77, 0xED } } } },
- { DE_DEU, kPlatformPC, { 0x00000010, 0x0000054E, { { 0xD9, 0x97, 0xA8, 0x24, 0x27, 0x7B, 0x01, 0x3F, 0x03, 0xBA, 0x2A, 0x43, 0x81, 0x8F, 0x97, 0x03 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000017, 0x0000071C, { { 0x96, 0x50, 0xA8, 0x08, 0x1B, 0x2D, 0x0C, 0xF6, 0x90, 0x6A, 0xE7, 0x9F, 0x65, 0xCC, 0x71, 0xA0 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000001B, 0x00000840, { { 0xA2, 0xCF, 0x81, 0x3E, 0x87, 0xA8, 0x10, 0x1B, 0x44, 0x8D, 0x5B, 0x8B, 0xAE, 0x23, 0x30, 0xD3 } } } },
+ { EN_ANY, kPlatformDOS, { 0x0000000C, 0x000003A5, { { 0x72, 0x64, 0xBD, 0x1C, 0xED, 0x05, 0x28, 0xFC, 0x94, 0x4B, 0x8F, 0x3C, 0x38, 0x08, 0x77, 0xED } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000010, 0x0000054E, { { 0xD9, 0x97, 0xA8, 0x24, 0x27, 0x7B, 0x01, 0x3F, 0x03, 0xBA, 0x2A, 0x43, 0x81, 0x8F, 0x97, 0x03 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings6Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000029, 0x00000DA4, { { 0x5C, 0x6F, 0xA1, 0xC2, 0x56, 0xDE, 0xFE, 0xD5, 0x01, 0xFB, 0x65, 0x00, 0x24, 0xD1, 0x49, 0x7B } } } },
- { DE_DEU, kPlatformPC, { 0x00000032, 0x00001211, { { 0x13, 0xBC, 0xF1, 0x03, 0x49, 0xDB, 0x16, 0xA5, 0xC3, 0x7C, 0xBF, 0x14, 0x8F, 0x40, 0x07, 0x8E } } } },
- { EN_ANY, kPlatformPC, { 0x00000030, 0x00000FF5, { { 0xE4, 0x2B, 0xB9, 0xF0, 0x26, 0x3D, 0x30, 0xCD, 0xEF, 0xCD, 0xF5, 0xC0, 0x4E, 0xA4, 0xC4, 0x92 } } } },
- { DE_DEU, kPlatformPC, { 0x00000029, 0x00000E6D, { { 0xE1, 0xBD, 0x4B, 0x42, 0x17, 0xA2, 0xB6, 0x6C, 0xF2, 0x7F, 0xEB, 0x41, 0x2C, 0x82, 0x8C, 0x76 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000029, 0x00000DA4, { { 0x5C, 0x6F, 0xA1, 0xC2, 0x56, 0xDE, 0xFE, 0xD5, 0x01, 0xFB, 0x65, 0x00, 0x24, 0xD1, 0x49, 0x7B } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000032, 0x00001211, { { 0x13, 0xBC, 0xF1, 0x03, 0x49, 0xDB, 0x16, 0xA5, 0xC3, 0x7C, 0xBF, 0x14, 0x8F, 0x40, 0x07, 0x8E } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000030, 0x00000FF5, { { 0xE4, 0x2B, 0xB9, 0xF0, 0x26, 0x3D, 0x30, 0xCD, 0xEF, 0xCD, 0xF5, 0xC0, 0x4E, 0xA4, 0xC4, 0x92 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000029, 0x00000E6D, { { 0xE1, 0xBD, 0x4B, 0x42, 0x17, 0xA2, 0xB6, 0x6C, 0xF2, 0x7F, 0xEB, 0x41, 0x2C, 0x82, 0x8C, 0x76 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings7Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000014, 0x00000406, { { 0xBD, 0xE1, 0x0A, 0x75, 0xD1, 0x18, 0xF7, 0x08, 0x2D, 0x2B, 0x65, 0x36, 0xA7, 0x59, 0x2E, 0x13 } } } },
- { DE_DEU, kPlatformPC, { 0x0000000F, 0x000001E5, { { 0x1F, 0xC9, 0x46, 0x8B, 0x41, 0xAD, 0xAD, 0x2B, 0x5A, 0xA9, 0xAB, 0x94, 0x9A, 0x1E, 0x36, 0xAC } } } },
- { EN_ANY, kPlatformPC, { 0x00000065, 0x000021AF, { { 0x76, 0x35, 0xAE, 0x1D, 0xC2, 0x54, 0x36, 0x11, 0x4D, 0x3E, 0x96, 0x11, 0xB2, 0xDC, 0x15, 0x20 } } } },
- { DE_DEU, kPlatformPC, { 0x0000006F, 0x000026BA, { { 0xC9, 0x46, 0xD7, 0xF3, 0xF2, 0x5F, 0xF4, 0xB1, 0x22, 0xC8, 0x30, 0x16, 0x8E, 0x75, 0x4D, 0xA8 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000014, 0x00000406, { { 0xBD, 0xE1, 0x0A, 0x75, 0xD1, 0x18, 0xF7, 0x08, 0x2D, 0x2B, 0x65, 0x36, 0xA7, 0x59, 0x2E, 0x13 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000000F, 0x000001E5, { { 0x1F, 0xC9, 0x46, 0x8B, 0x41, 0xAD, 0xAD, 0x2B, 0x5A, 0xA9, 0xAB, 0x94, 0x9A, 0x1E, 0x36, 0xAC } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000065, 0x000021AF, { { 0x76, 0x35, 0xAE, 0x1D, 0xC2, 0x54, 0x36, 0x11, 0x4D, 0x3E, 0x96, 0x11, 0xB2, 0xDC, 0x15, 0x20 } } } },
+ { DE_DEU, kPlatformDOS, { 0x0000006F, 0x000026BA, { { 0xC9, 0x46, 0xD7, 0xF3, 0xF2, 0x5F, 0xF4, 0xB1, 0x22, 0xC8, 0x30, 0x16, 0x8E, 0x75, 0x4D, 0xA8 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicStrings8Provider[] = {
- { EN_ANY, kPlatformPC, { 0x00000056, 0x00001C95, { { 0x7E, 0x43, 0x73, 0xEC, 0x94, 0x0D, 0xF8, 0x1B, 0xF3, 0x1A, 0x62, 0x19, 0x96, 0x6A, 0x2C, 0xB5 } } } },
- { DE_DEU, kPlatformPC, { 0x00000061, 0x0000213B, { { 0xE2, 0x3B, 0xA7, 0xB7, 0xE6, 0xA5, 0x0D, 0x0F, 0xE0, 0x94, 0x9B, 0xAE, 0xE1, 0x11, 0x97, 0x93 } } } },
- { EN_ANY, kPlatformPC, { 0x00000085, 0x00002C0E, { { 0x6A, 0xEC, 0xF2, 0x5F, 0xA6, 0x3F, 0xB1, 0x1A, 0x74, 0x49, 0x5A, 0x47, 0xB0, 0x7A, 0xE6, 0x99 } } } },
- { DE_DEU, kPlatformPC, { 0x00000096, 0x0000342E, { { 0x83, 0x48, 0x3B, 0xED, 0x73, 0x02, 0x03, 0xCA, 0xA9, 0x4D, 0x40, 0x0F, 0xDE, 0x17, 0x7D, 0x40 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000056, 0x00001C95, { { 0x7E, 0x43, 0x73, 0xEC, 0x94, 0x0D, 0xF8, 0x1B, 0xF3, 0x1A, 0x62, 0x19, 0x96, 0x6A, 0x2C, 0xB5 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000061, 0x0000213B, { { 0xE2, 0x3B, 0xA7, 0xB7, 0xE6, 0xA5, 0x0D, 0x0F, 0xE0, 0x94, 0x9B, 0xAE, 0xE1, 0x11, 0x97, 0x93 } } } },
+ { EN_ANY, kPlatformDOS, { 0x00000085, 0x00002C0E, { { 0x6A, 0xEC, 0xF2, 0x5F, 0xA6, 0x3F, 0xB1, 0x1A, 0x74, 0x49, 0x5A, 0x47, 0xB0, 0x7A, 0xE6, 0x99 } } } },
+ { DE_DEU, kPlatformDOS, { 0x00000096, 0x0000342E, { { 0x83, 0x48, 0x3B, 0xED, 0x73, 0x02, 0x03, 0xCA, 0xA9, 0x4D, 0x40, 0x0F, 0xDE, 0x17, 0x7D, 0x40 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectTlModeProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000012, 0x0000000C, { { 0x98, 0x29, 0x54, 0xCD, 0xED, 0xAC, 0x7B, 0x61, 0x8D, 0x4F, 0x19, 0xE8, 0xA6, 0xB1, 0x51, 0x80 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000012, 0x0000000C, { { 0x98, 0x29, 0x54, 0xCD, 0xED, 0xAC, 0x7B, 0x61, 0x8D, 0x4F, 0x19, 0xE8, 0xA6, 0xB1, 0x51, 0x80 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectTblIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000009, 0x00000005, { { 0xFE, 0xEA, 0xC4, 0x54, 0x62, 0x7E, 0x43, 0x6E, 0x89, 0x48, 0x03, 0xE7, 0x47, 0xBF, 0x7D, 0x9D } } } }, // EOB 1
- { UNK_LANG, kPlatformPC, { 0x0000000E, 0x00000004, { { 0x63, 0x27, 0x19, 0x17, 0xBD, 0xC3, 0x8A, 0xA7, 0x1E, 0xF7, 0xD1, 0x78, 0x39, 0x3B, 0xD4, 0x4F } } } }, // EOB 2
+ { UNK_LANG, kPlatformDOS, { 0x00000009, 0x00000005, { { 0xFE, 0xEA, 0xC4, 0x54, 0x62, 0x7E, 0x43, 0x6E, 0x89, 0x48, 0x03, 0xE7, 0x47, 0xBF, 0x7D, 0x9D } } } }, // EOB 1
+ { UNK_LANG, kPlatformDOS, { 0x0000000E, 0x00000004, { { 0x63, 0x27, 0x19, 0x17, 0xBD, 0xC3, 0x8A, 0xA7, 0x1E, 0xF7, 0xD1, 0x78, 0x39, 0x3B, 0xD4, 0x4F } } } }, // EOB 2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectShpStartProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000034, { { 0x27, 0xC5, 0x09, 0x97, 0x8E, 0xD4, 0xF1, 0x8D, 0x77, 0xEB, 0x1D, 0x34, 0x55, 0xB2, 0x48, 0x38 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000034, { { 0x27, 0xC5, 0x09, 0x97, 0x8E, 0xD4, 0xF1, 0x8D, 0x77, 0xEB, 0x1D, 0x34, 0x55, 0xB2, 0x48, 0x38 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectTbl1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000D, 0x0000005D, { { 0x49, 0xC4, 0x47, 0x55, 0xDC, 0x25, 0x08, 0x03, 0x3D, 0x23, 0xAD, 0x09, 0x5F, 0x9C, 0x34, 0x06 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000D, 0x0000005D, { { 0x49, 0xC4, 0x47, 0x55, 0xDC, 0x25, 0x08, 0x03, 0x3D, 0x23, 0xAD, 0x09, 0x5F, 0x9C, 0x34, 0x06 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectTbl2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000A, 0x0000005C, { { 0xAB, 0x6A, 0x97, 0x35, 0xCC, 0x13, 0xC4, 0x17, 0x0B, 0xF2, 0xD3, 0xFD, 0xA2, 0x1C, 0x6C, 0xA8 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000A, 0x0000005C, { { 0xAB, 0x6A, 0x97, 0x35, 0xCC, 0x13, 0xC4, 0x17, 0x0B, 0xF2, 0xD3, 0xFD, 0xA2, 0x1C, 0x6C, 0xA8 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectTbl3Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000B, 0x00000032, { { 0x59, 0x23, 0xB9, 0xBE, 0x0E, 0xFA, 0xEB, 0xDD, 0x82, 0x68, 0x5B, 0xB0, 0xBE, 0x9B, 0x1D, 0x8E } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000B, 0x00000032, { { 0x59, 0x23, 0xB9, 0xBE, 0x0E, 0xFA, 0xEB, 0xDD, 0x82, 0x68, 0x5B, 0xB0, 0xBE, 0x9B, 0x1D, 0x8E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseExpObjectYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x0000016C, { { 0xCF, 0x5B, 0x04, 0xAB, 0x1A, 0xAF, 0xDD, 0x56, 0xAC, 0xF6, 0x23, 0x86, 0x33, 0x06, 0x5A, 0xC6 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x0000016C, { { 0xCF, 0x5B, 0x04, 0xAB, 0x1A, 0xAF, 0xDD, 0x56, 0xAC, 0xF6, 0x23, 0x86, 0x33, 0x06, 0x5A, 0xC6 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefStepsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x000002FD, { { 0xB5, 0x6F, 0x31, 0x5F, 0xC6, 0x47, 0xE9, 0x23, 0x0E, 0x73, 0xBF, 0x77, 0xC7, 0xEE, 0xDB, 0x27 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x000002FD, { { 0xB5, 0x6F, 0x31, 0x5F, 0xC6, 0x47, 0xE9, 0x23, 0x0E, 0x73, 0xBF, 0x77, 0xC7, 0xEE, 0xDB, 0x27 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefSubStepsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000FF, { { 0x18, 0x27, 0x73, 0x45, 0x26, 0x58, 0x81, 0x82, 0x70, 0x86, 0x7A, 0x0D, 0xDE, 0xC1, 0x08, 0x52 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000FF, { { 0x18, 0x27, 0x73, 0x45, 0x26, 0x58, 0x81, 0x82, 0x70, 0x86, 0x7A, 0x0D, 0xDE, 0xC1, 0x08, 0x52 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefShiftProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x0000000C, { { 0xCC, 0xDC, 0x78, 0xF9, 0xFE, 0x88, 0xF3, 0x87, 0xFD, 0x08, 0xE8, 0x8A, 0x38, 0xD5, 0x4C, 0x53 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x0000000C, { { 0xCC, 0xDC, 0x78, 0xF9, 0xFE, 0x88, 0xF3, 0x87, 0xFD, 0x08, 0xE8, 0x8A, 0x38, 0xD5, 0x4C, 0x53 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefAddProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x0000007F, { { 0x7F, 0x86, 0x2E, 0x14, 0xDB, 0x36, 0xED, 0x99, 0xD9, 0xCE, 0xAF, 0x11, 0xC2, 0x89, 0x21, 0x6B } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x0000007F, { { 0x7F, 0x86, 0x2E, 0x14, 0xDB, 0x36, 0xED, 0x99, 0xD9, 0xCE, 0xAF, 0x11, 0xC2, 0x89, 0x21, 0x6B } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000C, 0x000000A5, { { 0x77, 0xD7, 0xE0, 0x2D, 0xD4, 0x25, 0x94, 0x6E, 0x59, 0x3B, 0xAF, 0x9B, 0x16, 0x4F, 0x6D, 0x4C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000C, 0x000000A5, { { 0x77, 0xD7, 0xE0, 0x2D, 0xD4, 0x25, 0x94, 0x6E, 0x59, 0x3B, 0xAF, 0x9B, 0x16, 0x4F, 0x6D, 0x4C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkDefYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000138, { { 0xB9, 0xA2, 0x72, 0x01, 0x2A, 0xD7, 0x61, 0xAB, 0x02, 0x57, 0x87, 0xC8, 0x86, 0x83, 0xDF, 0xB3 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000138, { { 0xB9, 0xA2, 0x72, 0x01, 0x2A, 0xD7, 0x61, 0xAB, 0x02, 0x57, 0x87, 0xC8, 0x86, 0x83, 0xDF, 0xB3 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkOfFlags1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000002C, 0x00000BF4, { { 0x94, 0x8C, 0x1B, 0x77, 0xBF, 0x3A, 0x51, 0x17, 0x89, 0x16, 0xD0, 0x74, 0x95, 0xBD, 0x85, 0x98 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000002C, 0x00000BF4, { { 0x94, 0x8C, 0x1B, 0x77, 0xBF, 0x3A, 0x51, 0x17, 0x89, 0x16, 0xD0, 0x74, 0x95, 0xBD, 0x85, 0x98 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkOfFlags2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000040, 0x000003FC, { { 0x40, 0x13, 0x5A, 0x9D, 0xBD, 0x29, 0x2E, 0x9C, 0xC1, 0xE7, 0xD4, 0xC9, 0x26, 0xFA, 0xF2, 0x70 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000040, 0x000003FC, { { 0x40, 0x13, 0x5A, 0x9D, 0xBD, 0x29, 0x2E, 0x9C, 0xC1, 0xE7, 0xD4, 0xC9, 0x26, 0xFA, 0xF2, 0x70 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkOfShiftProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x000000F0, { { 0xC5, 0xC8, 0x91, 0x7E, 0x78, 0x2F, 0xF1, 0xE5, 0xE0, 0x06, 0xB2, 0x39, 0xDC, 0x0D, 0x7A, 0x5F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x000000F0, { { 0xC5, 0xC8, 0x91, 0x7E, 0x78, 0x2F, 0xF1, 0xE5, 0xE0, 0x06, 0xB2, 0x39, 0xDC, 0x0D, 0x7A, 0x5F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkOfXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x00000528, { { 0x58, 0xE6, 0x24, 0x6A, 0xD3, 0xA4, 0xEF, 0x58, 0x4A, 0x9C, 0x32, 0x31, 0x4C, 0x61, 0xBC, 0x1C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x00000528, { { 0x58, 0xE6, 0x24, 0x6A, 0xD3, 0xA4, 0xEF, 0x58, 0x4A, 0x9C, 0x32, 0x31, 0x4C, 0x61, 0xBC, 0x1C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSparkOfYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x000002D4, { { 0x74, 0x31, 0xFE, 0x7C, 0x38, 0x16, 0x0C, 0x05, 0x64, 0xAB, 0x8A, 0x69, 0xEA, 0x66, 0x29, 0x2F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x000002D4, { { 0x74, 0x31, 0xFE, 0x7C, 0x38, 0x16, 0x0C, 0x05, 0x64, 0xAB, 0x8A, 0x69, 0xEA, 0x66, 0x29, 0x2F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseSpellPropertiesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000003EF, 0x0000BE7A, { { 0x10, 0xEA, 0x14, 0x26, 0xE2, 0xFC, 0xA1, 0xCB, 0xD9, 0x80, 0xFE, 0x9F, 0x69, 0x58, 0x4A, 0xCA } } } },
- { UNK_LANG, kPlatformPC, { 0x000003EF, 0x00008FCE, { { 0xC9, 0x36, 0xDD, 0x7B, 0x05, 0x6E, 0x92, 0xBA, 0x2B, 0x39, 0x87, 0xA7, 0x3A, 0x7E, 0xB0, 0xAD } } } },
- { UNK_LANG, kPlatformPC, { 0x000006D6, 0x0000CA78, { { 0xEB, 0x3B, 0x9F, 0xFD, 0x4E, 0x3F, 0x5C, 0xDE, 0xC6, 0xBA, 0xFE, 0x83, 0xB4, 0x10, 0x6D, 0x95 } } } },
- { UNK_LANG, kPlatformPC, { 0x000006D6, 0x0000EC32, { { 0x52, 0xAE, 0x4D, 0xC2, 0x24, 0xC8, 0xD3, 0xBE, 0x09, 0x45, 0x98, 0x38, 0x17, 0x7D, 0xFF, 0xE4 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000003EF, 0x0000BE7A, { { 0x10, 0xEA, 0x14, 0x26, 0xE2, 0xFC, 0xA1, 0xCB, 0xD9, 0x80, 0xFE, 0x9F, 0x69, 0x58, 0x4A, 0xCA } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000003EF, 0x00008FCE, { { 0xC9, 0x36, 0xDD, 0x7B, 0x05, 0x6E, 0x92, 0xBA, 0x2B, 0x39, 0x87, 0xA7, 0x3A, 0x7E, 0xB0, 0xAD } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000006D6, 0x0000CA78, { { 0xEB, 0x3B, 0x9F, 0xFD, 0x4E, 0x3F, 0x5C, 0xDE, 0xC6, 0xBA, 0xFE, 0x83, 0xB4, 0x10, 0x6D, 0x95 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000006D6, 0x0000EC32, { { 0x52, 0xAE, 0x4D, 0xC2, 0x24, 0xC8, 0xD3, 0xBE, 0x09, 0x45, 0x98, 0x38, 0x17, 0x7D, 0xFF, 0xE4 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseMagicFlightPropsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000060, 0x0000166F, { { 0x38, 0x30, 0xCA, 0x07, 0x64, 0xBA, 0xC4, 0xA4, 0x4F, 0x75, 0xB4, 0x84, 0x3A, 0x92, 0xFD, 0xE3 } } } },
- { UNK_LANG, kPlatformPC, { 0x00000038, 0x00000DDC, { { 0x23, 0x32, 0x8D, 0x34, 0x4F, 0x72, 0x37, 0xE1, 0x0C, 0x1B, 0x47, 0x17, 0x5D, 0xDF, 0xDB, 0xF5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000060, 0x0000166F, { { 0x38, 0x30, 0xCA, 0x07, 0x64, 0xBA, 0xC4, 0xA4, 0x4F, 0x75, 0xB4, 0x84, 0x3A, 0x92, 0xFD, 0xE3 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000038, 0x00000DDC, { { 0x23, 0x32, 0x8D, 0x34, 0x4F, 0x72, 0x37, 0xE1, 0x0C, 0x1B, 0x47, 0x17, 0x5D, 0xDF, 0xDB, 0xF5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseTurnUndeadEffectProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000008C, 0x00002E8B, { { 0x96, 0x15, 0x61, 0x12, 0x43, 0xCF, 0x3A, 0x84, 0x1A, 0x89, 0xB5, 0x32, 0x0D, 0xB3, 0x20, 0x67 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000008C, 0x00002E8B, { { 0x96, 0x15, 0x61, 0x12, 0x43, 0xCF, 0x3A, 0x84, 0x1A, 0x89, 0xB5, 0x32, 0x0D, 0xB3, 0x20, 0x67 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseBurningHandsDestProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000008, 0x0000000C, { { 0x61, 0xD7, 0xAB, 0xE1, 0x56, 0x54, 0x51, 0x5B, 0xD9, 0x59, 0x2D, 0x3D, 0xAE, 0xA4, 0x49, 0x31 } } } }, // EOB1
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000003E, { { 0xA5, 0x8C, 0xCA, 0x13, 0xED, 0x0F, 0xB7, 0xA2, 0xD7, 0x9C, 0xCD, 0x11, 0x65, 0x11, 0x4B, 0xD8 } } } }, // EOB2
+ { UNK_LANG, kPlatformDOS, { 0x00000008, 0x0000000C, { { 0x61, 0xD7, 0xAB, 0xE1, 0x56, 0x54, 0x51, 0x5B, 0xD9, 0x59, 0x2D, 0x3D, 0xAE, 0xA4, 0x49, 0x31 } } } }, // EOB1
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000003E, { { 0xA5, 0x8C, 0xCA, 0x13, 0xED, 0x0F, 0xB7, 0xA2, 0xD7, 0x9C, 0xCD, 0x11, 0x65, 0x11, 0x4B, 0xD8 } } } }, // EOB2
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseConeOfColdDest1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000007, 0x00000500, { { 0x48, 0xF1, 0xFE, 0x48, 0xEC, 0x64, 0x17, 0x51, 0x5C, 0x9A, 0x91, 0x35, 0x95, 0xC3, 0x73, 0x8E } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000007, 0x00000500, { { 0x48, 0xF1, 0xFE, 0x48, 0xEC, 0x64, 0x17, 0x51, 0x5C, 0x9A, 0x91, 0x35, 0x95, 0xC3, 0x73, 0x8E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseConeOfColdDest2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000007, 0x00000210, { { 0xBA, 0x62, 0xA0, 0x4F, 0x50, 0x0C, 0x02, 0xC3, 0xAD, 0x7C, 0x39, 0x63, 0x5F, 0x41, 0xB4, 0xFB } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000007, 0x00000210, { { 0xBA, 0x62, 0xA0, 0x4F, 0x50, 0x0C, 0x02, 0xC3, 0xAD, 0x7C, 0x39, 0x63, 0x5F, 0x41, 0xB4, 0xFB } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseConeOfColdDest3Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000007, 0x00000200, { { 0xA0, 0x1F, 0xAC, 0x3A, 0x2D, 0x25, 0x1F, 0x5C, 0xD2, 0x04, 0xAC, 0xAB, 0x97, 0x8B, 0x61, 0xD7 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000007, 0x00000200, { { 0xA0, 0x1F, 0xAC, 0x3A, 0x2D, 0x25, 0x1F, 0x5C, 0xD2, 0x04, 0xAC, 0xAB, 0x97, 0x8B, 0x61, 0xD7 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseConeOfColdDest4Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000007, 0x000004F0, { { 0xB3, 0x9A, 0x2B, 0x3A, 0x51, 0x24, 0x95, 0xBE, 0xDE, 0x0F, 0xD5, 0xE9, 0xE9, 0x21, 0x96, 0x04 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000007, 0x000004F0, { { 0xB3, 0x9A, 0x2B, 0x3A, 0x51, 0x24, 0x95, 0xBE, 0xDE, 0x0F, 0xD5, 0xE9, 0xE9, 0x21, 0x96, 0x04 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoBBaseConeOfColdGfxTblProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000010, 0x0000003E, { { 0x0A, 0xBA, 0xFD, 0x3F, 0xD8, 0x49, 0x3F, 0xD2, 0x26, 0x1B, 0x19, 0x53, 0x4F, 0x84, 0xB9, 0x4F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000010, 0x0000003E, { { 0x0A, 0xBA, 0xFD, 0x3F, 0xD8, 0x49, 0x3F, 0xD2, 0x26, 0x1B, 0x19, 0x53, 0x4F, 0x84, 0xB9, 0x4F } } } },
EXTRACT_END_ENTRY
};
@@ -2404,142 +2404,142 @@ const ExtractEntrySearchData kEoB1BonusStringsProvider[] = {
};
const ExtractEntrySearchData kEoB1IntroFilesOpeningProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000003F, 0x00001044, { { 0xF5, 0x8C, 0xC8, 0x39, 0x38, 0xBB, 0x0B, 0xCA, 0x34, 0x38, 0x1D, 0x11, 0x46, 0x91, 0xEF, 0x7E } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000003F, 0x00001044, { { 0xF5, 0x8C, 0xC8, 0x39, 0x38, 0xBB, 0x0B, 0xCA, 0x34, 0x38, 0x1D, 0x11, 0x46, 0x91, 0xEF, 0x7E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesTowerProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001A, 0x000006E6, { { 0xBD, 0x06, 0x3B, 0x7D, 0x24, 0x79, 0xD6, 0xC2, 0xFA, 0xDA, 0x31, 0x15, 0x3E, 0xE2, 0x75, 0xF8 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001A, 0x000006E6, { { 0xBD, 0x06, 0x3B, 0x7D, 0x24, 0x79, 0xD6, 0xC2, 0xFA, 0xDA, 0x31, 0x15, 0x3E, 0xE2, 0x75, 0xF8 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesOrbProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000015, 0x00000565, { { 0xA7, 0x91, 0x97, 0x5B, 0x29, 0xE8, 0x27, 0x90, 0xB3, 0x8F, 0xD5, 0x13, 0x77, 0x4A, 0x93, 0x37 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000015, 0x00000565, { { 0xA7, 0x91, 0x97, 0x5B, 0x29, 0xE8, 0x27, 0x90, 0xB3, 0x8F, 0xD5, 0x13, 0x77, 0x4A, 0x93, 0x37 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesWdEntryProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000002C, 0x00000B42, { { 0x5C, 0xDF, 0xB1, 0x2A, 0x83, 0x03, 0x73, 0x47, 0x1E, 0x29, 0x7C, 0x16, 0x2E, 0x5D, 0x0F, 0xA4 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000002C, 0x00000B42, { { 0x5C, 0xDF, 0xB1, 0x2A, 0x83, 0x03, 0x73, 0x47, 0x1E, 0x29, 0x7C, 0x16, 0x2E, 0x5D, 0x0F, 0xA4 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesKingProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000016, 0x000005AE, { { 0xB5, 0xB5, 0x80, 0xD3, 0xC0, 0xF4, 0x9F, 0xE1, 0x12, 0x3C, 0xCB, 0xD6, 0xF2, 0x7F, 0x15, 0x5B } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000016, 0x000005AE, { { 0xB5, 0xB5, 0x80, 0xD3, 0xC0, 0xF4, 0x9F, 0xE1, 0x12, 0x3C, 0xCB, 0xD6, 0xF2, 0x7F, 0x15, 0x5B } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesHandsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000A, 0x0000027C, { { 0x90, 0xC7, 0x36, 0xE6, 0x7D, 0x6D, 0xCB, 0x77, 0xA0, 0x03, 0x45, 0x48, 0x46, 0xF3, 0x80, 0xC8 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000A, 0x0000027C, { { 0x90, 0xC7, 0x36, 0xE6, 0x7D, 0x6D, 0xCB, 0x77, 0xA0, 0x03, 0x45, 0x48, 0x46, 0xF3, 0x80, 0xC8 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesWdExitProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000033, 0x00000D2A, { { 0xA8, 0xF0, 0x36, 0x0E, 0x37, 0xC6, 0xCC, 0xDB, 0x9B, 0xB8, 0x52, 0x64, 0x02, 0x1E, 0x9D, 0x1C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000033, 0x00000D2A, { { 0xA8, 0xF0, 0x36, 0x0E, 0x37, 0xC6, 0xCC, 0xDB, 0x9B, 0xB8, 0x52, 0x64, 0x02, 0x1E, 0x9D, 0x1C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroFilesTunnelProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001A, 0x000006E2, { { 0xA1, 0xDD, 0x20, 0x50, 0x7A, 0xB6, 0x89, 0x67, 0x13, 0xAA, 0x47, 0x6B, 0xC0, 0xA0, 0x8A, 0xFD } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001A, 0x000006E2, { { 0xA1, 0xDD, 0x20, 0x50, 0x7A, 0xB6, 0x89, 0x67, 0x13, 0xAA, 0x47, 0x6B, 0xC0, 0xA0, 0x8A, 0xFD } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroOpeningFrmDelayProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000A, 0x000001E0, { { 0xDA, 0xE3, 0x06, 0xA2, 0x41, 0xF6, 0x5A, 0x6A, 0xBD, 0x0B, 0xA6, 0x09, 0x69, 0x03, 0x1D, 0x2C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000A, 0x000001E0, { { 0xDA, 0xE3, 0x06, 0xA2, 0x41, 0xF6, 0x5A, 0x6A, 0xBD, 0x0B, 0xA6, 0x09, 0x69, 0x03, 0x1D, 0x2C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroWdEncodeXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001F, 0x000001BB, { { 0x00, 0x50, 0x8E, 0xF5, 0x51, 0xA6, 0xF5, 0x57, 0x0D, 0x55, 0x6C, 0x14, 0x62, 0xCD, 0xD0, 0x7E } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001F, 0x000001BB, { { 0x00, 0x50, 0x8E, 0xF5, 0x51, 0xA6, 0xF5, 0x57, 0x0D, 0x55, 0x6C, 0x14, 0x62, 0xCD, 0xD0, 0x7E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroWdEncodeYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001F, 0x0000000B, { { 0x39, 0x38, 0x02, 0xCE, 0x9D, 0x89, 0x1E, 0xBF, 0x32, 0x86, 0xA0, 0x79, 0xA4, 0xBE, 0xC5, 0x81 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001F, 0x0000000B, { { 0x39, 0x38, 0x02, 0xCE, 0x9D, 0x89, 0x1E, 0xBF, 0x32, 0x86, 0xA0, 0x79, 0xA4, 0xBE, 0xC5, 0x81 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroWdEncodeWHProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001F, 0x00000027, { { 0xA8, 0x6C, 0x13, 0x2B, 0x4C, 0x26, 0x38, 0x3D, 0xDA, 0xC2, 0x90, 0xB3, 0x97, 0xA9, 0x45, 0x84 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001F, 0x00000027, { { 0xA8, 0x6C, 0x13, 0x2B, 0x4C, 0x26, 0x38, 0x3D, 0xDA, 0xC2, 0x90, 0xB3, 0x97, 0xA9, 0x45, 0x84 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroWdDsXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000003E, 0x0000104A, { { 0xAC, 0x1F, 0xA6, 0x20, 0xD0, 0x02, 0xF0, 0x9D, 0x75, 0x93, 0x6C, 0x12, 0x0A, 0x76, 0x1B, 0x3F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000003E, 0x0000104A, { { 0xAC, 0x1F, 0xA6, 0x20, 0xD0, 0x02, 0xF0, 0x9D, 0x75, 0x93, 0x6C, 0x12, 0x0A, 0x76, 0x1B, 0x3F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroWdDsYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000001F, 0x00000655, { { 0xF3, 0xF7, 0x65, 0xEC, 0xEA, 0x5C, 0x08, 0xCF, 0xAD, 0x48, 0x35, 0xA2, 0x5B, 0x82, 0xB0, 0xC5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000001F, 0x00000655, { { 0xF3, 0xF7, 0x65, 0xEC, 0xEA, 0x5C, 0x08, 0xCF, 0xAD, 0x48, 0x35, 0xA2, 0x5B, 0x82, 0xB0, 0xC5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlX1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000027, { { 0x7F, 0x14, 0x7D, 0x8C, 0x20, 0x49, 0xDB, 0xC3, 0x31, 0x1A, 0xC3, 0x95, 0xA4, 0x8C, 0x96, 0xDC } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000027, { { 0x7F, 0x14, 0x7D, 0x8C, 0x20, 0x49, 0xDB, 0xC3, 0x31, 0x1A, 0xC3, 0x95, 0xA4, 0x8C, 0x96, 0xDC } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlY1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x000000EC, { { 0x29, 0xB4, 0x8D, 0xE1, 0xDF, 0x36, 0x39, 0x27, 0xC8, 0xF6, 0x32, 0x1A, 0x3B, 0x74, 0xA1, 0x4F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x000000EC, { { 0x29, 0xB4, 0x8D, 0xE1, 0xDF, 0x36, 0x39, 0x27, 0xC8, 0xF6, 0x32, 0x1A, 0x3B, 0x74, 0xA1, 0x4F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlX2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000051, { { 0x51, 0x33, 0x0A, 0x55, 0x76, 0xA2, 0x91, 0xDA, 0x59, 0xD6, 0x09, 0xD9, 0x3D, 0xD4, 0xB8, 0xFE } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000051, { { 0x51, 0x33, 0x0A, 0x55, 0x76, 0xA2, 0x91, 0xDA, 0x59, 0xD6, 0x09, 0xD9, 0x3D, 0xD4, 0xB8, 0xFE } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlY2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x0000016A, { { 0xD5, 0xA3, 0xF6, 0x12, 0x90, 0x87, 0xF2, 0xC7, 0x6A, 0x22, 0x77, 0xB5, 0x48, 0xB2, 0xCB, 0xCA } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x0000016A, { { 0xD5, 0xA3, 0xF6, 0x12, 0x90, 0x87, 0xF2, 0xC7, 0x6A, 0x22, 0x77, 0xB5, 0x48, 0xB2, 0xCB, 0xCA } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlWProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x0000004E, { { 0xCF, 0xC7, 0xA8, 0x59, 0x6A, 0x5B, 0x35, 0x7F, 0xC9, 0xEC, 0x59, 0x7E, 0x88, 0x31, 0x32, 0xA6 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x0000004E, { { 0xCF, 0xC7, 0xA8, 0x59, 0x6A, 0x5B, 0x35, 0x7F, 0xC9, 0xEC, 0x59, 0x7E, 0x88, 0x31, 0x32, 0xA6 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1IntroTvlHProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x0000013D, { { 0x26, 0x7B, 0x3D, 0x5F, 0x64, 0x97, 0xF9, 0x1B, 0xB6, 0x65, 0x99, 0x95, 0x0A, 0x98, 0x38, 0x92 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x0000013D, { { 0x26, 0x7B, 0x3D, 0x5F, 0x64, 0x97, 0xF9, 0x1B, 0xB6, 0x65, 0x99, 0x95, 0x0A, 0x98, 0x38, 0x92 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1DoorShapeDefsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000060, 0x00000F8A, { { 0x95, 0x53, 0x1B, 0x07, 0x64, 0x81, 0x0E, 0x04, 0xC0, 0xDA, 0xB5, 0x74, 0x57, 0x04, 0x10, 0xE2 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000060, 0x00000F8A, { { 0x95, 0x53, 0x1B, 0x07, 0x64, 0x81, 0x0E, 0x04, 0xC0, 0xDA, 0xB5, 0x74, 0x57, 0x04, 0x10, 0xE2 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1DoorSwitchShapeDefsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000060, 0x0000119E, { { 0xA4, 0xE6, 0x96, 0x36, 0x59, 0x05, 0xB8, 0x57, 0xF4, 0x6D, 0x79, 0x1D, 0x29, 0x52, 0xA0, 0xEE } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000060, 0x0000119E, { { 0xA4, 0xE6, 0x96, 0x36, 0x59, 0x05, 0xB8, 0x57, 0xF4, 0x6D, 0x79, 0x1D, 0x29, 0x52, 0xA0, 0xEE } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1DoorSwitchCoordsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000030, 0x000007F7, { { 0x85, 0x20, 0x98, 0x20, 0xE1, 0xD6, 0xA5, 0xBD, 0x9E, 0x59, 0x63, 0x6A, 0xEF, 0xEF, 0x80, 0x19 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000030, 0x000007F7, { { 0x85, 0x20, 0x98, 0x20, 0xE1, 0xD6, 0xA5, 0xBD, 0x9E, 0x59, 0x63, 0x6A, 0xEF, 0xEF, 0x80, 0x19 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1MonsterPropertiesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000252, 0x000038E5, { { 0x5E, 0xD7, 0xEF, 0x3B, 0xD5, 0xDA, 0x2A, 0x09, 0x78, 0xF6, 0xD8, 0x57, 0x68, 0xB4, 0x90, 0xCA } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000252, 0x000038E5, { { 0x5E, 0xD7, 0xEF, 0x3B, 0xD5, 0xDA, 0x2A, 0x09, 0x78, 0xF6, 0xD8, 0x57, 0x68, 0xB4, 0x90, 0xCA } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1EnemyMageSpellListProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000A, 0x0000000F, { { 0x01, 0x1B, 0x9C, 0x51, 0xC9, 0xA2, 0x10, 0xBB, 0xA7, 0x82, 0xD4, 0x91, 0x7E, 0x84, 0x54, 0x93 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000A, 0x0000000F, { { 0x01, 0x1B, 0x9C, 0x51, 0xC9, 0xA2, 0x10, 0xBB, 0xA7, 0x82, 0xD4, 0x91, 0x7E, 0x84, 0x54, 0x93 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1EnemyMageSfxProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000A, 0x0000029B, { { 0xA2, 0x9F, 0x2E, 0xDE, 0x15, 0x23, 0x78, 0xDD, 0x26, 0x98, 0x6E, 0xA3, 0x77, 0xEA, 0xB5, 0x80 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000A, 0x0000029B, { { 0xA2, 0x9F, 0x2E, 0xDE, 0x15, 0x23, 0x78, 0xDD, 0x26, 0x98, 0x6E, 0xA3, 0x77, 0xEA, 0xB5, 0x80 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1BeholderSpellListProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000079, { { 0x8E, 0x13, 0x54, 0x9D, 0x54, 0xF6, 0xC9, 0x6E, 0x10, 0xF1, 0xC0, 0xE9, 0x66, 0xDD, 0x95, 0xED } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000079, { { 0x8E, 0x13, 0x54, 0x9D, 0x54, 0xF6, 0xC9, 0x6E, 0x10, 0xF1, 0xC0, 0xE9, 0x66, 0xDD, 0x95, 0xED } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1BeholderSfxProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x000000F5, { { 0xA9, 0x90, 0x41, 0x0D, 0xB5, 0xE0, 0x28, 0xFD, 0x0A, 0xC3, 0xF9, 0xEC, 0xC8, 0x47, 0xC1, 0x57 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x000000F5, { { 0xA9, 0x90, 0x41, 0x0D, 0xB5, 0xE0, 0x28, 0xFD, 0x0A, 0xC3, 0xF9, 0xEC, 0xC8, 0x47, 0xC1, 0x57 } } } },
EXTRACT_END_ENTRY
};
@@ -2551,92 +2551,92 @@ const ExtractEntrySearchData kEoB1TurnUndeadStringProvider[] = {
};
const ExtractEntrySearchData kEoB1CgaMappingDefaultProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000002C, { { 0x7E, 0x1C, 0x75, 0xC3, 0x8E, 0xF7, 0x56, 0x62, 0x9B, 0xB6, 0xF4, 0x3A, 0x21, 0x03, 0xFA, 0xF5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000002C, { { 0x7E, 0x1C, 0x75, 0xC3, 0x8E, 0xF7, 0x56, 0x62, 0x9B, 0xB6, 0xF4, 0x3A, 0x21, 0x03, 0xFA, 0xF5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingAltProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000030, { { 0x2A, 0x8C, 0xF6, 0xD7, 0x87, 0xFA, 0x7B, 0x22, 0x28, 0x2A, 0x50, 0xE2, 0x26, 0x7B, 0xC7, 0x44 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000030, { { 0x2A, 0x8C, 0xF6, 0xD7, 0x87, 0xFA, 0x7B, 0x22, 0x28, 0x2A, 0x50, 0xE2, 0x26, 0x7B, 0xC7, 0x44 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingInvProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000002E, { { 0x3A, 0x06, 0xBF, 0x0C, 0xD4, 0xD0, 0x15, 0x1F, 0xB5, 0xC5, 0x49, 0xFD, 0x21, 0xE1, 0xE1, 0x66 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000002E, { { 0x3A, 0x06, 0xBF, 0x0C, 0xD4, 0xD0, 0x15, 0x1F, 0xB5, 0xC5, 0x49, 0xFD, 0x21, 0xE1, 0xE1, 0x66 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingItemsLProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x0000002A, { { 0xE0, 0x85, 0xA1, 0x3A, 0x3D, 0xC9, 0xF8, 0x56, 0x17, 0x0A, 0xD8, 0x44, 0x56, 0xDF, 0x3C, 0x57 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x0000002A, { { 0xE0, 0x85, 0xA1, 0x3A, 0x3D, 0xC9, 0xF8, 0x56, 0x17, 0x0A, 0xD8, 0x44, 0x56, 0xDF, 0x3C, 0x57 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingItemsSProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000036, { { 0x2E, 0x6F, 0xD4, 0x2E, 0xB2, 0x84, 0xB2, 0xC3, 0x36, 0x88, 0x80, 0xC1, 0x67, 0x5A, 0xEB, 0x60 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000036, { { 0x2E, 0x6F, 0xD4, 0x2E, 0xB2, 0x84, 0xB2, 0xC3, 0x36, 0x88, 0x80, 0xC1, 0x67, 0x5A, 0xEB, 0x60 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingThrownProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000030, { { 0x0C, 0x3D, 0x1E, 0xAB, 0x0B, 0x25, 0x9F, 0x78, 0xE6, 0xB1, 0x52, 0x79, 0x0F, 0x96, 0x33, 0x97 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000030, { { 0x0C, 0x3D, 0x1E, 0xAB, 0x0B, 0x25, 0x9F, 0x78, 0xE6, 0xB1, 0x52, 0x79, 0x0F, 0x96, 0x33, 0x97 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingIconsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000039, { { 0x99, 0x50, 0x1A, 0xE1, 0xF3, 0x52, 0xC3, 0x5A, 0x4E, 0xBD, 0x03, 0x74, 0x2C, 0x39, 0xCA, 0x71 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000039, { { 0x99, 0x50, 0x1A, 0xE1, 0xF3, 0x52, 0xC3, 0x5A, 0x4E, 0xBD, 0x03, 0x74, 0x2C, 0x39, 0xCA, 0x71 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingDecoProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000035, { { 0xA5, 0x17, 0xED, 0xEE, 0x02, 0x87, 0x8C, 0x9D, 0xAC, 0x96, 0xC6, 0x07, 0xB0, 0x8E, 0x5D, 0xE3 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000035, { { 0xA5, 0x17, 0xED, 0xEE, 0x02, 0x87, 0x8C, 0x9D, 0xAC, 0x96, 0xC6, 0x07, 0xB0, 0x8E, 0x5D, 0xE3 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaLevelMappingIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000000C, 0x00000013, { { 0x48, 0x5D, 0xDF, 0x8F, 0xFD, 0x5D, 0xA0, 0xB0, 0x00, 0xD8, 0xB3, 0x09, 0x90, 0x5D, 0x13, 0x3F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000000C, 0x00000013, { { 0x48, 0x5D, 0xDF, 0x8F, 0xFD, 0x5D, 0xA0, 0xB0, 0x00, 0xD8, 0xB3, 0x09, 0x90, 0x5D, 0x13, 0x3F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingLevel0Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000035, { { 0xC2, 0x4D, 0x2F, 0x0A, 0xB0, 0x3E, 0x46, 0x80, 0xD1, 0xEE, 0x32, 0x5F, 0xBA, 0x5C, 0xCC, 0x7A } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000035, { { 0xC2, 0x4D, 0x2F, 0x0A, 0xB0, 0x3E, 0x46, 0x80, 0xD1, 0xEE, 0x32, 0x5F, 0xBA, 0x5C, 0xCC, 0x7A } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingLevel1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000030, { { 0x94, 0x8E, 0xAE, 0x12, 0xB5, 0x68, 0xCD, 0x43, 0x95, 0xD2, 0x01, 0x21, 0x0C, 0xA1, 0x34, 0xF5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000030, { { 0x94, 0x8E, 0xAE, 0x12, 0xB5, 0x68, 0xCD, 0x43, 0x95, 0xD2, 0x01, 0x21, 0x0C, 0xA1, 0x34, 0xF5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingLevel2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000030, { { 0x20, 0x6F, 0x9F, 0x57, 0x0C, 0xFD, 0xDA, 0x5C, 0xA0, 0x1D, 0x28, 0xB4, 0x88, 0x24, 0x68, 0x68 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000030, { { 0x20, 0x6F, 0x9F, 0x57, 0x0C, 0xFD, 0xDA, 0x5C, 0xA0, 0x1D, 0x28, 0xB4, 0x88, 0x24, 0x68, 0x68 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingLevel3Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000030, { { 0x44, 0x95, 0x9A, 0x69, 0x70, 0xB2, 0x63, 0xB6, 0xFB, 0xD0, 0xFF, 0xD9, 0xF0, 0xCD, 0xD4, 0x75 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000030, { { 0x44, 0x95, 0x9A, 0x69, 0x70, 0xB2, 0x63, 0xB6, 0xFB, 0xD0, 0xFF, 0xD9, 0xF0, 0xCD, 0xD4, 0x75 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1CgaMappingLevel4Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000020, 0x00000031, { { 0xEA, 0xC4, 0x01, 0xC0, 0x21, 0xFE, 0x66, 0xDD, 0xD4, 0x83, 0xC1, 0x2C, 0x09, 0xD3, 0xD0, 0x97 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000020, 0x00000031, { { 0xEA, 0xC4, 0x01, 0xC0, 0x21, 0xFE, 0x66, 0xDD, 0xD4, 0x83, 0xC1, 0x2C, 0x09, 0xD3, 0xD0, 0x97 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1NpcShpDataProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000004C, 0x00000A42, { { 0x70, 0x21, 0x85, 0x8C, 0xD4, 0x04, 0xAA, 0x20, 0x1D, 0x0E, 0x9D, 0xB7, 0x74, 0x58, 0xCC, 0x0C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000004C, 0x00000A42, { { 0x70, 0x21, 0x85, 0x8C, 0xD4, 0x04, 0xAA, 0x20, 0x1D, 0x0E, 0x9D, 0xB7, 0x74, 0x58, 0xCC, 0x0C } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1NpcSubShpIndex1Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000035, { { 0x9A, 0x83, 0xF9, 0xA4, 0x27, 0xBA, 0xFC, 0xD2, 0xDE, 0x03, 0x65, 0xF2, 0xFA, 0x37, 0xDA, 0xF1 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000035, { { 0x9A, 0x83, 0xF9, 0xA4, 0x27, 0xBA, 0xFC, 0xD2, 0xDE, 0x03, 0x65, 0xF2, 0xFA, 0x37, 0xDA, 0xF1 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1NpcSubShpIndex2Provider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000051, { { 0x7E, 0xAC, 0x0E, 0x54, 0x59, 0x5D, 0xF6, 0x53, 0x03, 0x22, 0x1D, 0xC7, 0xFC, 0x16, 0xC8, 0x88 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000051, { { 0x7E, 0xAC, 0x0E, 0x54, 0x59, 0x5D, 0xF6, 0x53, 0x03, 0x22, 0x1D, 0xC7, 0xFC, 0x16, 0xC8, 0x88 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB1NpcSubShpYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000006, 0x00000143, { { 0xC1, 0xED, 0x93, 0x5E, 0x84, 0xCE, 0x48, 0xCF, 0x4C, 0xF3, 0x9C, 0x93, 0xBF, 0xFE, 0xB8, 0x6F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000006, 0x00000143, { { 0xC1, 0xED, 0x93, 0x5E, 0x84, 0xCE, 0x48, 0xCF, 0x4C, 0xF3, 0x9C, 0x93, 0xBF, 0xFE, 0xB8, 0x6F } } } },
EXTRACT_END_ENTRY
};
@@ -3307,64 +3307,65 @@ const ExtractEntrySearchData kEoB2HornStringsProvider[] = {
};
const ExtractEntrySearchData kEoB2HornSoundsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000004, 0x00000106, { { 0x3E, 0x7B, 0x96, 0xFD, 0xCA, 0x4E, 0xA7, 0xA6, 0xB8, 0x82, 0x67, 0xCF, 0x93, 0x86, 0xE4, 0x45 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000004, 0x00000106, { { 0x3E, 0x7B, 0x96, 0xFD, 0xCA, 0x4E, 0xA7, 0xA6, 0xB8, 0x82, 0x67, 0xCF, 0x93, 0x86, 0xE4, 0x45 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB2WallOfForceDsXProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000024, 0x00000D67, { { 0x51, 0xCF, 0xAB, 0x1E, 0xB4, 0xE0, 0xE3, 0x44, 0x29, 0xD1, 0xDC, 0x82, 0xCD, 0x08, 0x50, 0xF5 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000024, 0x00000D67, { { 0x51, 0xCF, 0xAB, 0x1E, 0xB4, 0xE0, 0xE3, 0x44, 0x29, 0xD1, 0xDC, 0x82, 0xCD, 0x08, 0x50, 0xF5 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB2WallOfForceDsYProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000003, 0x00000048, { { 0x45, 0xFC, 0xEA, 0x8C, 0x34, 0xD7, 0xBE, 0x74, 0x05, 0x03, 0xE6, 0x94, 0x34, 0xB5, 0x45, 0x4D } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000003, 0x00000048, { { 0x45, 0xFC, 0xEA, 0x8C, 0x34, 0xD7, 0xBE, 0x74, 0x05, 0x03, 0xE6, 0x94, 0x34, 0xB5, 0x45, 0x4D } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB2WallOfForceNumWProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000003, 0x00000006, { { 0x52, 0x89, 0xDF, 0x73, 0x7D, 0xF5, 0x73, 0x26, 0xFC, 0xDD, 0x22, 0x59, 0x7A, 0xFB, 0x1F, 0xAC } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000003, 0x00000006, { { 0x52, 0x89, 0xDF, 0x73, 0x7D, 0xF5, 0x73, 0x26, 0xFC, 0xDD, 0x22, 0x59, 0x7A, 0xFB, 0x1F, 0xAC } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB2WallOfForceNumHProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000003, 0x00000011, { { 0x33, 0x86, 0x06, 0xBE, 0x8D, 0xC8, 0x37, 0x2D, 0x0F, 0x61, 0x97, 0xA4, 0x26, 0xA9, 0xBC, 0x60 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000003, 0x00000011, { { 0x33, 0x86, 0x06, 0xBE, 0x8D, 0xC8, 0x37, 0x2D, 0x0F, 0x61, 0x97, 0xA4, 0x26, 0xA9, 0xBC, 0x60 } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kEoB2WallOfForceShpIdProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000003, 0x00000006, { { 0x77, 0xAE, 0x9B, 0x52, 0x9E, 0xF7, 0xEB, 0x48, 0xA8, 0x5E, 0xED, 0xC2, 0x08, 0x53, 0xCE, 0x3C } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000003, 0x00000006, { { 0x77, 0xAE, 0x9B, 0x52, 0x9E, 0xF7, 0xEB, 0x48, 0xA8, 0x5E, 0xED, 0xC2, 0x08, 0x53, 0xCE, 0x3C } } } },
EXTRACT_END_ENTRY
};
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, kPlatformDOS, { 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
};
const ExtractEntrySearchData kLoLCharacterDefsProvider[] = {
- { RU_RUS, kPlatformPC, { 0x00000492, 0x000052BA, { { 0x52, 0x29, 0x0D, 0x49, 0xFD, 0x17, 0xD7, 0x70, 0x6D, 0xCA, 0xEB, 0xB6, 0x7E, 0xFA, 0xBE, 0x08 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy
- { DE_DEU, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
- { FR_FRA, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
- { EN_ANY, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
- { DE_DEU, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
- { FR_FRA, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
- { 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
+ { RU_RUS, kPlatformDOS, { 0x00000492, 0x000052BA, { { 0x52, 0x29, 0x0D, 0x49, 0xFD, 0x17, 0xD7, 0x70, 0x6D, 0xCA, 0xEB, 0xB6, 0x7E, 0xFA, 0xBE, 0x08 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy
+ { DE_DEU, kPlatformDOS, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
+ { FR_FRA, kPlatformDOS, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy
+ { EN_ANY, kPlatformDOS, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { DE_DEU, kPlatformDOS, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { FR_FRA, kPlatformDOS, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { RU_RUS, kPlatformDOS, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD
+ { IT_ITA, kPlatformDOS, { 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
};
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, kPlatformDOS, { 0x000008F2, 0x0001E5B6, { { 0x63, 0x5E, 0x37, 0xAA, 0x27, 0x80, 0x4C, 0x85, 0xB1, 0x9D, 0x7B, 0x1D, 0x64, 0xA3, 0xEB, 0x97 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 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
};
@@ -3375,25 +3376,25 @@ const ExtractEntrySearchData kLoLIngameSfxIndexProvider[] = {
};
const ExtractEntrySearchData kLoLMusicTrackMapProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000000F0, 0x0000210D, { { 0x55, 0x25, 0x3E, 0x35, 0xD2, 0xD8, 0x13, 0xE3, 0x1D, 0xB1, 0xB3, 0x00, 0x2E, 0x17, 0x91, 0x2F } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000000F0, 0x0000210D, { { 0x55, 0x25, 0x3E, 0x35, 0xD2, 0xD8, 0x13, 0xE3, 0x1D, 0xB1, 0xB3, 0x00, 0x2E, 0x17, 0x91, 0x2F } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLIngameGMSfxIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000000FA, 0x00006281, { { 0x25, 0x89, 0xB0, 0x3B, 0x12, 0x09, 0x02, 0xF6, 0xFE, 0x76, 0xD5, 0xC9, 0x5B, 0x88, 0xAC, 0xAA } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000000FA, 0x00006281, { { 0x25, 0x89, 0xB0, 0x3B, 0x12, 0x09, 0x02, 0xF6, 0xFE, 0x76, 0xD5, 0xC9, 0x5B, 0x88, 0xAC, 0xAA } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLIngameMT32SfxIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000000FA, 0x00006579, { { 0x16, 0x40, 0x1C, 0x09, 0x69, 0xA9, 0x0D, 0x6D, 0x4B, 0x0C, 0x99, 0xF0, 0x40, 0x5D, 0xBB, 0x6E } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000000FA, 0x00006579, { { 0x16, 0x40, 0x1C, 0x09, 0x69, 0xA9, 0x0D, 0x6D, 0x4B, 0x0C, 0x99, 0xF0, 0x40, 0x5D, 0xBB, 0x6E } } } },
EXTRACT_END_ENTRY
};
const ExtractEntrySearchData kLoLIngamePcSpkSfxIndexProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000000FA, 0x00005EFC, { { 0xA3, 0x5C, 0x69, 0xED, 0x13, 0xEC, 0x08, 0x0E, 0xFA, 0x72, 0x83, 0x0D, 0xD7, 0x8D, 0x9C, 0x70 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000000FA, 0x00005EFC, { { 0xA3, 0x5C, 0x69, 0xED, 0x13, 0xEC, 0x08, 0x0E, 0xFA, 0x72, 0x83, 0x0D, 0xD7, 0x8D, 0x9C, 0x70 } } } },
EXTRACT_END_ENTRY
};
@@ -3406,7 +3407,7 @@ const ExtractEntrySearchData kLoLSpellPropertiesProvider[] = {
const ExtractEntrySearchData kLoLGameShapeMapProvider[] = {
{ UNK_LANG, kPlatformUnknown, { 0x00000114, 0x000038D3, { { 0xB2, 0x8A, 0x5D, 0x9A, 0x51, 0x63, 0x4D, 0x65, 0xE4, 0xF5, 0xBA, 0x88, 0x70, 0x6C, 0xA6, 0xF8 } } } }, // floppy + PC98
- { UNK_LANG, kPlatformPC, { 0x00000114, 0x00003B97, { { 0x29, 0xE5, 0x0F, 0x51, 0xF0, 0x10, 0x35, 0x3E, 0x70, 0x3A, 0xAA, 0xFE, 0xD7, 0xD5, 0xAA, 0x9F } } } }, // CD
+ { UNK_LANG, kPlatformDOS, { 0x00000114, 0x00003B97, { { 0x29, 0xE5, 0x0F, 0x51, 0xF0, 0x10, 0x35, 0x3E, 0x70, 0x3A, 0xAA, 0xFE, 0xD7, 0xD5, 0xAA, 0x9F } } } }, // CD
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, kPlatformDOS, { 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, kPlatformDOS, { 0x00000006, 0x00000082, { { 0xA8, 0xFC, 0xBB, 0x1B, 0xC0, 0x85, 0x3B, 0xEF, 0xDB, 0xDE, 0xB0, 0x98, 0x58, 0x34, 0x75, 0xE9 } } } }, // CD
EXTRACT_END_ENTRY
};
@@ -3485,8 +3501,9 @@ 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, kPlatformDOS, { 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
};
@@ -3529,7 +3547,7 @@ const ExtractEntrySearchData kLoLCompassDefsProvider[] = {
};
const ExtractEntrySearchData kLoLItemPricesProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000005C, 0x00001251, { { 0x18, 0x62, 0x5E, 0xE2, 0xE4, 0x2A, 0xB0, 0xA0, 0x8B, 0x8D, 0x9D, 0x07, 0x5F, 0x83, 0x53, 0xF7 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x0000005C, 0x00001251, { { 0x18, 0x62, 0x5E, 0xE2, 0xE4, 0x2A, 0xB0, 0xA0, 0x8B, 0x8D, 0x9D, 0x07, 0x5F, 0x83, 0x53, 0xF7 } } } },
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
};
@@ -3721,59 +3739,60 @@ const ExtractEntrySearchData kLoLScrollYBottomProvider[] = {
};
const ExtractEntrySearchData kLoLButtonDefsProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x0000082A, 0x0000CAAE, { { 0xC1, 0x83, 0x0D, 0xA0, 0x66, 0x16, 0x3D, 0x31, 0xCE, 0x30, 0x9F, 0x4E, 0x00, 0x65, 0x5A, 0xC8 } } } }, // floppy
- { 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, kPlatformDOS, { 0x0000082A, 0x0000CAAE, { { 0xC1, 0x83, 0x0D, 0xA0, 0x66, 0x16, 0x3D, 0x31, 0xCE, 0x30, 0x9F, 0x4E, 0x00, 0x65, 0x5A, 0xC8 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 0x0000082A, 0x0000C34E, { { 0x7F, 0x9A, 0x0F, 0x28, 0x1A, 0x8F, 0x03, 0x46, 0x48, 0xEB, 0xC9, 0xB9, 0x23, 0x29, 0x5E, 0x50 } } } }, // floppy
+ { UNK_LANG, kPlatformDOS, { 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
};
@@ -3785,7 +3804,7 @@ const ExtractEntrySearchData kLoLLegendDataProvider[] = {
};
const ExtractEntrySearchData kLoLMapCursorOvlProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x00000019, 0x000009CD, { { 0xF6, 0xD2, 0xFA, 0x36, 0x62, 0x95, 0x1D, 0x99, 0x7F, 0x11, 0x5F, 0xA8, 0x4D, 0x47, 0x72, 0x40 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x00000019, 0x000009CD, { { 0xF6, 0xD2, 0xFA, 0x36, 0x62, 0x95, 0x1D, 0x99, 0x7F, 0x11, 0x5F, 0xA8, 0x4D, 0x47, 0x72, 0x40 } } } },
EXTRACT_END_ENTRY
};
@@ -3828,12 +3847,12 @@ 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
};
const ExtractEntrySearchData kLoLHistoryProvider[] = {
- { UNK_LANG, kPlatformPC, { 0x000001D1, 0x00007F9B, { { 0x25, 0x10, 0x86, 0x40, 0xAC, 0x53, 0xFE, 0x11, 0x4D, 0xE2, 0xD9, 0x35, 0xD6, 0x89, 0xBB, 0x09 } } } },
+ { UNK_LANG, kPlatformDOS, { 0x000001D1, 0x00007F9B, { { 0x25, 0x10, 0x86, 0x40, 0xAC, 0x53, 0xFE, 0x11, 0x4D, 0xE2, 0xD9, 0x35, 0xD6, 0x89, 0xBB, 0x09 } } } },
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/create_neverhood/create_neverhood.cpp b/devtools/create_neverhood/create_neverhood.cpp
new file mode 100644
index 0000000000..f34f20882c
--- /dev/null
+++ b/devtools/create_neverhood/create_neverhood.cpp
@@ -0,0 +1,566 @@
+/* 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.
+ *
+ */
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+
+// HACK to allow building with the SDL backend on MinGW
+// see bug #1800764 "TOOLS: MinGW tools building broken"
+#ifdef main
+#undef main
+#endif // main
+
+#include <vector>
+#include "create_neverhood.h"
+#include "md5.h"
+#include "tables.h"
+
+const int DAT_VERSION = 0;
+
+// The MD5 hash of the nhc.exe used to extract the tables from
+const uint8 kNhcExeMd5[16] = {
+ 0x37, 0xD6, 0x54, 0xA2, 0xA7, 0xBB, 0xB0, 0x1F,
+ 0x8C, 0x41, 0x9A, 0xB8, 0x49, 0xFF, 0x29, 0xD4};
+
+uint32 dataSize;
+byte *data;
+uint32 dataStart = 0x004AE000;
+uint32 fileStart = 0x000AC600;
+
+class HitRectList;
+class RectList;
+class MessageList;
+class NavigationList;
+
+void addMessageList(uint32 messageListCount, uint32 messageListOffset);
+
+bool loadExe(const char *filename) {
+ FILE *exe = fopen(filename, "rb");
+ if (!exe) {
+ printf("Could not open nhc.exe for reading! Quitting...\n");
+ return false;
+ }
+ dataSize = fileSize(exe);
+ data = new byte[dataSize];
+ fread(data, dataSize, 1, exe);
+ fclose(exe);
+ return true;
+}
+
+bool validateMd5() {
+ uint8 digest[16];
+
+ md5_buffer(data, dataSize, digest);
+
+ printf("MD5 of nhc.exe is %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
+ digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7],
+ digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15]);
+
+ if (memcmp(kNhcExeMd5, digest, 16)) {
+ printf("MD5 hash of nhc.exe doesn't match the expected value! Quitting...\n");
+ return false;
+ }
+ return true;
+}
+
+byte *getData(uint32 offset) {
+ return data + offset - dataStart + fileStart;
+}
+
+const char *getStringP(uint32 offset) {
+ return offset != 0 ? (const char*)getData(offset) : NULL;
+}
+
+uint32 calcHash(const char *value) {
+ if (!value)
+ return 0;
+ uint32 hash = 0, shiftValue = 0;
+ while (*value != 0) {
+ char ch = *value++;
+ if (ch >= 'a' && ch <= 'z')
+ ch -= 32;
+ else if (ch >= '0' && ch <= '9')
+ ch += 22;
+ shiftValue += ch - 64;
+ if (shiftValue >= 32)
+ shiftValue -= 32;
+ hash ^= 1 << shiftValue;
+ }
+ return hash;
+}
+
+struct HitRect {
+ int16 x1, y1, x2, y2;
+ uint16 messageNum;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ x1 = READ_LE_UINT16(item + 0);
+ y1 = READ_LE_UINT16(item + 2);
+ x2 = READ_LE_UINT16(item + 4);
+ y2 = READ_LE_UINT16(item + 6);
+ messageNum = READ_LE_UINT16(item + 8);
+ }
+
+ void save(FILE *fd) {
+ writeUint16LE(fd, x1);
+ writeUint16LE(fd, y1);
+ writeUint16LE(fd, x2);
+ writeUint16LE(fd, y2);
+ writeUint16LE(fd, messageNum);
+ }
+
+ int getItemSize() const {
+ return 10;
+ }
+
+};
+
+struct MessageItem {
+ uint16 messageNum;
+ uint32 messageParam;
+ MessageItem() {}
+ MessageItem(uint16 msgNum, uint32 msgParam) : messageNum(msgNum), messageParam(msgParam) {}
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ messageNum = READ_LE_UINT16(item + 0);
+ messageParam = READ_LE_UINT32(item + 4);
+ }
+
+ void save(FILE *fd) {
+ writeUint16LE(fd, messageNum);
+ writeUint32LE(fd, messageParam);
+ }
+
+ int getItemSize() const {
+ return 8;
+ }
+
+};
+
+struct SubRectItem {
+ int16 x1, y1, x2, y2;
+ uint32 messageListCount;
+ uint32 messageListOffset;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ x1 = READ_LE_UINT16(item + 0);
+ y1 = READ_LE_UINT16(item + 2);
+ x2 = READ_LE_UINT16(item + 4);
+ y2 = READ_LE_UINT16(item + 6);
+ messageListCount = READ_LE_UINT32(item + 8);
+ messageListOffset = READ_LE_UINT32(item + 12);
+ // Add the message to the message list
+ addMessageList(messageListCount, messageListOffset);
+ }
+
+ void save(FILE *fd) {
+ writeUint16LE(fd, x1);
+ writeUint16LE(fd, y1);
+ writeUint16LE(fd, x2);
+ writeUint16LE(fd, y2);
+ writeUint32LE(fd, messageListOffset);
+ }
+
+ int getItemSize() const {
+ return 16;
+ }
+
+};
+
+struct RectItem {
+ int16 x1, y1, x2, y2;
+ uint32 subRectListCount;
+ uint32 subRectListOffset;
+ std::vector<SubRectItem> subRectItems;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ uint32 subItemOffset;
+ x1 = READ_LE_UINT16(item + 0);
+ y1 = READ_LE_UINT16(item + 2);
+ x2 = READ_LE_UINT16(item + 4);
+ y2 = READ_LE_UINT16(item + 6);
+ subRectListCount = READ_LE_UINT32(item + 8);
+ subRectListOffset = READ_LE_UINT32(item + 12);
+ subItemOffset = subRectListOffset;
+ for (uint32 j = 0; j < subRectListCount; j++) {
+ SubRectItem subRectItem;
+ subRectItem.load(subItemOffset);
+ subItemOffset += 16;
+ subRectItems.push_back(subRectItem);
+ }
+ }
+
+ void save(FILE *fd) {
+ writeUint16LE(fd, x1);
+ writeUint16LE(fd, y1);
+ writeUint16LE(fd, x2);
+ writeUint16LE(fd, y2);
+ writeUint32LE(fd, subRectItems.size());
+ for (uint32 j = 0; j < subRectItems.size(); j++)
+ subRectItems[j].save(fd);
+ }
+
+ int getItemSize() const {
+ return 16;
+ }
+
+};
+
+struct NavigationItem {
+ uint32 fileHash;
+ uint32 leftSmackerFileHash;
+ uint32 rightSmackerFileHash;
+ uint32 middleSmackerFileHash;
+ byte interactive;
+ byte middleFlag;
+ uint32 mouseCursorFileHash;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ fileHash = READ_LE_UINT32(item + 0);
+ leftSmackerFileHash = READ_LE_UINT32(item + 4);
+ rightSmackerFileHash = READ_LE_UINT32(item + 8);
+ middleSmackerFileHash = READ_LE_UINT32(item + 12);
+ interactive = item[16];
+ middleFlag = item[17];
+ mouseCursorFileHash = READ_LE_UINT32(item + 20);
+ }
+
+ void save(FILE *fd) {
+ writeUint32LE(fd, fileHash);
+ writeUint32LE(fd, leftSmackerFileHash);
+ writeUint32LE(fd, rightSmackerFileHash);
+ writeUint32LE(fd, middleSmackerFileHash);
+ writeByte(fd, interactive);
+ writeByte(fd, middleFlag);
+ writeUint32LE(fd, mouseCursorFileHash);
+ }
+
+ int getItemSize() const {
+ return 24;
+ }
+
+};
+
+struct SceneInfo140Item {
+ uint32 id;
+ uint32 bgFilename1;
+ uint32 bgFilename2;
+ uint32 txFilename;
+ uint32 bgFilename3;
+ byte xPosIndex;
+ byte count;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ id = offset;
+ // Only save the hashes instead of the full names
+ bgFilename1 = calcHash(getStringP(READ_LE_UINT32(item + 0)));
+ bgFilename2 = calcHash(getStringP(READ_LE_UINT32(item + 4)));
+ txFilename = calcHash(getStringP(READ_LE_UINT32(item + 8)));
+ bgFilename3 = calcHash(getStringP(READ_LE_UINT32(item + 12)));
+ xPosIndex = item[16];
+ count = item[17];
+ }
+
+ void save(FILE *fd) {
+ writeUint32LE(fd, id);
+ writeUint32LE(fd, bgFilename1);
+ writeUint32LE(fd, bgFilename2);
+ writeUint32LE(fd, txFilename);
+ writeUint32LE(fd, bgFilename3);
+ writeByte(fd, xPosIndex);
+ writeByte(fd, count);
+ }
+
+};
+
+struct SceneInfo2700Item {
+ uint32 id;
+ uint32 bgFilename;
+ uint32 class437Filename;
+ uint32 dataResourceFilename;
+ uint32 pointListName;
+ uint32 rectListName;
+ uint32 exPaletteFilename2;
+ uint32 exPaletteFilename1;
+ uint32 mouseCursorFilename;
+ int16 which1;
+ int16 which2;
+
+ void load(uint32 offset) {
+ byte *item = getData(offset);
+ id = offset;
+ // Only save the hashes instead of the full names
+ bgFilename = calcHash(getStringP(READ_LE_UINT32(item + 0)));
+ class437Filename = calcHash(getStringP(READ_LE_UINT32(item + 4)));
+ dataResourceFilename = calcHash(getStringP(READ_LE_UINT32(item + 8)));
+ pointListName = calcHash(getStringP(READ_LE_UINT32(item + 12)));
+ rectListName = calcHash(getStringP(READ_LE_UINT32(item + 16)));
+ exPaletteFilename2 = calcHash(getStringP(READ_LE_UINT32(item + 20)));
+ exPaletteFilename1 = calcHash(getStringP(READ_LE_UINT32(item + 24)));
+ mouseCursorFilename = calcHash(getStringP(READ_LE_UINT32(item + 28)));
+ which1 = READ_LE_UINT16(item + 32);
+ which2 = READ_LE_UINT16(item + 34);
+ }
+
+ void save(FILE *fd) {
+ writeUint32LE(fd, id);
+ writeUint32LE(fd, bgFilename);
+ writeUint32LE(fd, class437Filename);
+ writeUint32LE(fd, dataResourceFilename);
+ writeUint32LE(fd, pointListName);
+ writeUint32LE(fd, rectListName);
+ writeUint32LE(fd, exPaletteFilename2);
+ writeUint32LE(fd, exPaletteFilename1);
+ writeUint32LE(fd, mouseCursorFilename);
+ writeUint16LE(fd, which1);
+ writeUint16LE(fd, which2);
+ }
+
+};
+
+template<class ITEMCLASS>
+class StaticDataList {
+public:
+ uint32 id;
+ std::vector<ITEMCLASS> items;
+
+ virtual ~StaticDataList() {
+ }
+
+ void add(ITEMCLASS item) {
+ items.push_back(item);
+ }
+
+ int getCount() const {
+ return items.size();
+ }
+
+ ITEMCLASS *getListItem(int index) {
+ return &items[index];
+ }
+
+ virtual bool specialLoadList(uint32 count, uint32 offset) {
+ return false;
+ }
+
+ void loadList(uint32 count, uint32 offset) {
+ id = offset;
+ if (!specialLoadList(count, offset)) {
+ for (uint32 i = 0; i < count; i++) {
+ ITEMCLASS listItem;
+ listItem.load(offset);
+ offset += listItem.getItemSize();
+ add(listItem);
+ }
+ }
+ }
+
+ void saveList(FILE *fd) {
+ writeUint32LE(fd, id);
+ writeUint32LE(fd, getCount());
+ for (int i = 0; i < getCount(); i++) {
+ items[i].save(fd);
+ }
+ }
+
+};
+
+class HitRectList : public StaticDataList<HitRect> {
+};
+
+class RectList : public StaticDataList<RectItem> {
+};
+
+class MessageList : public StaticDataList<MessageItem> {
+public:
+
+ virtual bool specialLoadList(uint32 count, uint32 offset) {
+ // Special code for message lists which are set at runtime (but otherwise constant)
+ switch (offset) {
+ // Scene 1002 rings
+ case 0x004B4200:
+ add(MessageItem(0x4800, 258));
+ add(MessageItem(0x100D, 0x4A845A00));
+ add(MessageItem(0x4805, 1));
+ return true;
+ case 0x004B4218:
+ add(MessageItem(0x4800, 297));
+ add(MessageItem(0x100D, 0x43807801));
+ add(MessageItem(0x4805, 2));
+ return true;
+ case 0x004B4230:
+ add(MessageItem(0x4800, 370));
+ add(MessageItem(0x100D, 0x46C26A01));
+ return true;
+ case 0x004B4240:
+ add(MessageItem(0x4800, 334));
+ add(MessageItem(0x100D, 0x468C7B11));
+ add(MessageItem(0x4805, 1));
+ return true;
+ case 0x004B4258:
+ add(MessageItem(0x4800, 425));
+ add(MessageItem(0x100D, 0x42845B19));
+ add(MessageItem(0x4805, 1));
+ return true;
+ // Scene 1302 rings
+ case 0x004B0888:
+ add(MessageItem(0x4800, 218));
+ add(MessageItem(0x100D, 0x4A845A00));
+ add(MessageItem(0x4805, 1));
+ return true;
+ case 0x004B08A0:
+ add(MessageItem(0x4800, 218 + 32));
+ add(MessageItem(0x100D, 0x43807801));
+ return true;
+ case 0x004B08B0:
+ add(MessageItem(0x4800, 218 + 32 + 32));
+ add(MessageItem(0x100D, 0x46C26A01));
+ add(MessageItem(0x4805, 1));
+ return true;
+ case 0x004B08C8:
+ add(MessageItem(0x4800, 218 + 32 + 32 + 32));
+ add(MessageItem(0x100D, 0x468C7B11));
+ return true;
+ case 0x004B08D8:
+ add(MessageItem(0x4800, 218 + 32 + 32 + 32 + 32));
+ add(MessageItem(0x100D, 0x42845B19));
+ add(MessageItem(0x4805, 4));
+ return true;
+ }
+ return false;
+ }
+
+};
+
+class NavigationList : public StaticDataList<NavigationItem> {
+};
+
+template<class LISTCLASS>
+class StaticDataListVector {
+public:
+ std::vector<LISTCLASS*> lists;
+
+ void add(LISTCLASS *list) {
+ lists.push_back(list);
+ }
+
+ void loadListVector(const uint32 *offsets) {
+ for (int i = 0; offsets[i] != 0; i += 2) {
+ LISTCLASS *list = new LISTCLASS();
+ list->loadList(offsets[i], offsets[i + 1]);
+ bool doAppend = true;
+ // Bad
+ for (typename std::vector<LISTCLASS*>::iterator it = lists.begin(); it != lists.end(); it++) {
+ if ((*it)->id == list->id) {
+ doAppend = false;
+ break;
+ }
+ }
+ if (doAppend)
+ lists.push_back(list);
+ }
+ }
+
+ void saveListVector(FILE *fd) {
+ writeUint32LE(fd, lists.size());
+ for (typename std::vector<LISTCLASS*>::iterator it = lists.begin(); it != lists.end(); it++) {
+ (*it)->saveList(fd);
+ }
+ }
+
+};
+
+template<class ITEMCLASS>
+class StaticDataVector {
+public:
+ std::vector<ITEMCLASS> items;
+
+ void loadVector(const uint32 *offsets) {
+ for (int i = 0; offsets[i] != 0; i++) {
+ ITEMCLASS item;
+ item.load(offsets[i]);
+ items.push_back(item);
+ }
+ }
+
+ void saveVector(FILE *fd) {
+ writeUint32LE(fd, items.size());
+ for (typename std::vector<ITEMCLASS>::iterator it = items.begin(); it != items.end(); it++) {
+ (*it).save(fd);
+ }
+ }
+
+};
+
+StaticDataListVector<HitRectList> hitRectLists;
+StaticDataListVector<RectList> rectLists;
+StaticDataListVector<MessageList> messageLists;
+StaticDataListVector<NavigationList> navigationLists;
+StaticDataVector<SceneInfo140Item> sceneInfo140Items;
+StaticDataVector<SceneInfo2700Item> sceneInfo2700Items;
+
+void addMessageList(uint32 messageListCount, uint32 messageListOffset) {
+ MessageList *messageList = new MessageList();
+ messageList->loadList(messageListCount, messageListOffset);
+ messageLists.add(messageList);
+}
+
+int main(int argc, char *argv[]) {
+
+ if (!loadExe("nhc.exe") ||
+ !validateMd5())
+ return 1;
+
+ FILE *datFile;
+
+ hitRectLists.loadListVector(hitRectListOffsets);
+ rectLists.loadListVector(rectListOffsets);
+ messageLists.loadListVector(messageListOffsets);
+ navigationLists.loadListVector(navigationListOffsets);
+ sceneInfo140Items.loadVector(sceneInfo140Offsets);
+ sceneInfo2700Items.loadVector(sceneInfo2700Offsets);
+
+ datFile = fopen("neverhood.dat", "wb");
+
+ writeUint32LE(datFile, 0x11223344); // Some magic
+ writeUint32LE(datFile, DAT_VERSION);
+
+ messageLists.saveListVector(datFile);
+ rectLists.saveListVector(datFile);
+ hitRectLists.saveListVector(datFile);
+ navigationLists.saveListVector(datFile);
+ sceneInfo140Items.saveVector(datFile);
+ sceneInfo2700Items.saveVector(datFile);
+
+ fclose(datFile);
+
+ printf("Done.\n");
+
+ return 0;
+}
diff --git a/devtools/create_neverhood/create_neverhood.h b/devtools/create_neverhood/create_neverhood.h
new file mode 100644
index 0000000000..6382c87375
--- /dev/null
+++ b/devtools/create_neverhood/create_neverhood.h
@@ -0,0 +1,28 @@
+/* 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 CREATE_NEVERHOOD_H
+#define CREATE_NEVERHOOD_H
+
+#include "util.h"
+
+#endif
diff --git a/devtools/create_teenagent/md5.cpp b/devtools/create_neverhood/md5.cpp
index 9f90122981..50f7406a47 100644
--- a/devtools/create_teenagent/md5.cpp
+++ b/devtools/create_neverhood/md5.cpp
@@ -262,3 +262,12 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) {
fclose(f);
return true;
}
+
+void md5_buffer(byte *buf, uint32 len, uint8 digest[16]) {
+ md5_context ctx;
+
+ md5_starts(&ctx);
+ md5_update(&ctx, buf, len);
+ md5_finish(&ctx, digest);
+}
+
diff --git a/devtools/create_teenagent/md5.h b/devtools/create_neverhood/md5.h
index 3746521002..81bc03ff83 100644
--- a/devtools/create_teenagent/md5.h
+++ b/devtools/create_neverhood/md5.h
@@ -36,5 +36,6 @@ void md5_update(md5_context *ctx, const uint8 *input, uint32 length);
void md5_finish(md5_context *ctx, uint8 digest[16]);
bool md5_file(const char *name, uint8 digest[16], uint32 length = 0);
+void md5_buffer(byte *buf, uint32 len, uint8 digest[16]);
#endif
diff --git a/devtools/create_neverhood/module.mk b/devtools/create_neverhood/module.mk
new file mode 100644
index 0000000000..8e263559b5
--- /dev/null
+++ b/devtools/create_neverhood/module.mk
@@ -0,0 +1,13 @@
+
+MODULE := devtools/create_neverhood
+
+MODULE_OBJS := \
+ create_neverhood.o \
+ md5.o \
+ util.o
+
+# Set the name of the executable
+TOOL_EXECUTABLE := create_neverhood
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/devtools/create_neverhood/tables.h b/devtools/create_neverhood/tables.h
new file mode 100644
index 0000000000..ea39aa807d
--- /dev/null
+++ b/devtools/create_neverhood/tables.h
@@ -0,0 +1,718 @@
+/* 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.
+ *
+ */
+
+static const uint32 hitRectListOffsets[] = {
+ // Scene1001
+ 1, 0x004B4860,
+ // Scene1002
+ 1, 0x004B4138,
+ // Scene1201
+ 4, 0x004AEBD0,
+ // Scene1302
+ 1, 0x004B0858,
+ // Scene1705
+ 1, 0x004B69D8,
+ // Scene2203
+ 1, 0x004B8320,
+ // Scene2205
+ 1, 0x004B0620,
+ 0, 0
+};
+
+static const uint32 rectListOffsets[] = {
+ // Scene1001
+ 1, 0x004B49F0,
+ 1, 0x004B4A00,
+ // Scene1002
+ 3, 0x004B43A0,
+ 1, 0x004B4418,
+ 3, 0x004B43A0,
+ // Scene1004
+ 1, 0x004B7C70,
+ // Scene1109
+ 1, 0x004B63A8,
+ 1, 0x004B6398,
+ // Scene1201
+ 1, 0x004AEE58,
+ 1, 0x004AEDC8,
+ 1, 0x004AEE18,
+ 1, 0x004AED88,
+ // Scene1302
+ 2, 0x004B0A38,
+ // Scene1303
+ 1, 0x004AF9E8,
+ // Scene1304
+ 1, 0x004B91A8,
+ // Scene1305
+ 1, 0x004B6E98,
+ // Scene1306
+ 1, 0x004AFD28,
+ 1, 0x004AFD18,
+ // Scene1308
+ 1, 0x004B5990,
+ 1, 0x004B5980,
+ 1, 0x004B59A0,
+ // Scene1401
+ 1, 0x004B6758,
+ // Scene1402
+ 1, 0x004B0C48,
+ 1, 0x004B0C98,
+ // Scene1403
+ 1, 0x004B1FF8,
+ 1, 0x004B2008,
+ // Scene1404
+ 1, 0x004B8D80,
+ // Scene1608
+ 1, 0x004B47D0,
+ 1, 0x004B4810,
+ // Scene1705
+ 1, 0x004B6B40,
+ 1, 0x004B6B30,
+ // Scene1901
+ 1, 0x004B34C8,
+ // Scene2001
+ 1, 0x004B3680,
+ 1, 0x004B3670,
+ // Scene2101
+ 1, 0x004B9008,
+ 1, 0x004B8FF8,
+ // Scene2203
+ 1, 0x004B8420,
+ // Scene2206
+ 1, 0x004B8AF8,
+ 1, 0x004B8B58,
+ // Scene2207
+ 3, 0x004B38B8,
+ 1, 0x004B3948,
+ // Scene2242
+ 1, 0x004B3DC8,
+ 1, 0x004B3E18,
+ // HallOfRecordsScene
+ 1, 0x004B2BF8,
+ 1, 0x004B2BB8,
+ // Scene2247
+ 1, 0x004B5588,
+ 1, 0x004B55C8,
+ // Scene2401
+ 1, 0x004B3140,
+ // Scene2402
+ 1, 0x004AF900,
+ // Scene2403
+ 1, 0x004B5E18,
+ 1, 0x004B5E28,
+ // Scene2406
+ 1, 0x004B78C8,
+ 1, 0x004B78D8,
+ // Scene2501
+ 1, 0x004B2608,
+ // Scene2732
+ 1, 0x004AE360,
+ // Scene2801
+ 1, 0x004B6CE0,
+ 1, 0x004B6CD0,
+ 1, 0x004B6CF0,
+ // Scene2805
+ 1, 0x004AE318,
+ 1, 0x004AE308,
+ // Scene2810
+ 1, 0x004AE810,
+ 1, 0x004AE800,
+ // Scene2812
+ 1, 0x004AF700,
+ 1, 0x004AF710,
+ 0, 0
+};
+
+static const uint32 messageListOffsets[] = {
+ // Scene1001
+ 1, 0x004B4888,
+ 2, 0x004B4898,
+ 1, 0x004B4970,
+ 1, 0x004B4890,
+ 3, 0x004B4910,
+ 5, 0x004B4938,
+ 1, 0x004B4960,
+ 4, 0x004B48A8,
+ 3, 0x004B48C8,
+ // Scene1002
+ 1, 0x004B4270,
+ 1, 0x004B4478,
+ 3, 0x004B4298,
+ 1, 0x004B4470,
+ 4, 0x004B4428,
+ 5, 0x004B4448,
+ 1, 0x004B44B8,
+ 2, 0x004B44A8,
+ 1, 0x004B44A0,
+ 2, 0x004B43D0,
+ 4, 0x004B4480,
+ 2, 0x004B41E0,
+ 5, 0x004B4148,
+ // Scene1004
+ 3, 0x004B7BF0,
+ 2, 0x004B7C08,
+ 1, 0x004B7C18,
+ 2, 0x004B7C20,
+ // Scene1109
+ 1, 0x004B6260,
+ 2, 0x004B6268,
+ 4, 0x004B6318,
+ 2, 0x004B6278,
+ 1, 0x004B6258,
+ // Scene1201
+ 1, 0x004AEC08,
+ 2, 0x004AEC10,
+ 2, 0x004AEC20,
+ 2, 0x004AEC30,
+ 4, 0x004AEC90,
+ 2, 0x004AECB0,
+ 2, 0x004AECC0,
+ 5, 0x004AECF0,
+ 2, 0x004AECD0,
+ 2, 0x004AECE0,
+ 2, 0x004AED38,
+ // Scene1302
+ 4, 0x004B08F0,
+ 3, 0x004B0920,
+ 1, 0x004B0950,
+ 2, 0x004B0940,
+ 1, 0x004B0938,
+ 2, 0x004B0910,
+ 1, 0x004B0968,
+ 2, 0x004B0878,
+ 4, 0x004B0978,
+ 1, 0x004B0870,
+ 1, 0x004B0868,
+ // Scene1303
+ 1, 0x004AF9A0,
+ 2, 0x004AF9B8,
+ // Scene1304
+ 1, 0x004B90E8,
+ 1, 0x004B90F0,
+ 2, 0x004B9158,
+ 2, 0x004B9130,
+ 2, 0x004B9140,
+ // Scene1305
+ 1, 0x004B6E40,
+ 1, 0x004B6E48,
+ // Scene1306
+ 1, 0x004AFAD0,
+ 2, 0x004AFAF0,
+ 1, 0x004AFBC8,
+ 1, 0x004AFC30,
+ 4, 0x004AFC38,
+ 2, 0x004AFB00,
+ 1, 0x004AFBD0,
+ 4, 0x004AFBD8,
+ 2, 0x004AFAE0,
+ 1, 0x004AFAD8,
+ 2, 0x004AFC58,
+ 2, 0x004AFC68,
+ // Scene1308
+ 1, 0x004B57C0,
+ 1, 0x004B57C8,
+ 1, 0x004B58B0,
+ 3, 0x004B57D0,
+ 3, 0x004B57E8,
+ 2, 0x004B5868,
+ 4, 0x004B5848,
+ 3, 0x004B5830,
+ 2, 0x004B5800,
+ 2, 0x004B5868,
+ 2, 0x004B58E0,
+ // Scene1401
+ 1, 0x004B65C8,
+ 1, 0x004B65D0,
+ 1, 0x004B65D8,
+ 1, 0x004B65E8,
+ 3, 0x004B6670,
+ 4, 0x004B6690,
+ 1, 0x004B66B0,
+ 3, 0x004B6658,
+ 2, 0x004B65F0,
+ // Scene1402
+ 1, 0x004B0B48,
+ 1, 0x004B0B50,
+ 1, 0x004B0B58,
+ 1, 0x004B0B60,
+ 2, 0x004B0B68,
+ 3, 0x004B0BB8,
+ 3, 0x004B0BD0,
+ // Scene1403
+ 1, 0x004B1F18,
+ 1, 0x004B1F20,
+ 3, 0x004B1F70,
+ 2, 0x004B1FA8,
+ 4, 0x004B1F88,
+ 3, 0x004B1F58,
+ 2, 0x004B1F28,
+ 2, 0x004B1FB8,
+ // Scene1404
+ 1, 0x004B8C28,
+ 1, 0x004B8C30,
+ 1, 0x004B8C38,
+ 1, 0x004B8D28,
+ 3, 0x004B8CB8,
+ 2, 0x004B8C40,
+ 6, 0x004B8CE8,
+ 3, 0x004B8CA0,
+ 2, 0x004B8CD0,
+ 2, 0x004B8D18,
+ // Scene1608
+ 1, 0x004B46A8,
+ 1, 0x004B46B0,
+ 1, 0x004B47A8,
+ 3, 0x004B4748,
+ 2, 0x004B4770,
+ 2, 0x004B46C8,
+ 2, 0x004B4760,
+ // Scene1705
+ 1, 0x004B69E8,
+ 2, 0x004B6A08,
+ 4, 0x004B6AA0,
+ 2, 0x004B6A18,
+ 1, 0x004B69F0,
+ 2, 0x004B6AC0,
+ // Scene1901
+ 1, 0x004B3408,
+ 1, 0x004B3410,
+ 1, 0x004B3400,
+ // Scene2001
+ 1, 0x004B3538,
+ 2, 0x004B3540,
+ 4, 0x004B35F0,
+ 2, 0x004B3550,
+ 1, 0x004B3530,
+ // Scene2101
+ 1, 0x004B8E48,
+ 3, 0x004B8E50,
+ 4, 0x004B8F58,
+ 2, 0x004B8EB0,
+ 2, 0x004B8EA0,
+ 1, 0x004B8F50,
+ 1, 0x004B8F48,
+ 4, 0x004B8E80,
+ 1, 0x004B8EC8,
+ 2, 0x004B8F78,
+ 3, 0x004B8F00,
+ // Scene2201
+ 1, 0x004B8118,
+ 1, 0x004B8130,
+ 1, 0x004B8178,
+ 2, 0x004B8120,
+ 3, 0x004B81A0,
+ 1, 0x004B81B8,
+ 2, 0x004B8108,
+ 5, 0x004B8150,
+ 4, 0x004B8180,
+ 3, 0x004B8138,
+ 2, 0x004B8108,
+ 2, 0x004B81C8,
+ // Scene2203
+ 1, 0x004B8340,
+ 1, 0x004B8350,
+ 1, 0x004B8358,
+ 1, 0x004B8348,
+ 3, 0x004B83B0,
+ 3, 0x004B83C8,
+ 2, 0x004B8370,
+ 2, 0x004B8360,
+ 2, 0x004B83E0,
+ 2, 0x004B83F0,
+ // Scene2205
+ 1, 0x004B0658,
+ 2, 0x004B0648,
+ 1, 0x004B0640,
+ 4, 0x004B0690,
+ 2, 0x004B0630,
+ // Scene2206
+ 1, 0x004B88A8,
+ 2, 0x004B88B8,
+ 1, 0x004B88C8,
+ 1, 0x004B8A70,
+ 1, 0x004B88B0,
+ 5, 0x004B8948,
+ 2, 0x004B8970,
+ 2, 0x004B8988,
+ 4, 0x004B8998,
+ 4, 0x004B89B8,
+ 4, 0x004B89D8,
+ 5, 0x004B89F8,
+ 5, 0x004B8A20,
+ 5, 0x004B8A48,
+ // Scene2207
+ 1, 0x004B38E8,
+ 4, 0x004B38F0,
+ 2, 0x004B37D8,
+ 2, 0x004B3958,
+ 3, 0x004B3920,
+ // Scene2242
+ 1, 0x004B3C18,
+ 1, 0x004B3D60,
+ 1, 0x004B3D48,
+ 1, 0x004B3C20,
+ 2, 0x004B3D50,
+ 5, 0x004B3CF8,
+ 5, 0x004B3D20,
+ 4, 0x004B3CB8,
+ 4, 0x004B3CD8,
+ // HallOfRecordsScene
+ 1, 0x004B2900,
+ 2, 0x004B2910,
+ 1, 0x004B2B70,
+ 1, 0x004B2908,
+ 2, 0x004B2920,
+ 4, 0x004B2978,
+ 4, 0x004B2998,
+ 4, 0x004B29B8,
+ 4, 0x004B29D8,
+ 4, 0x004B29F8,
+ 4, 0x004B2A18,
+ 4, 0x004B2A38,
+ 5, 0x004B2A58,
+ 5, 0x004B2A80,
+ 5, 0x004B2AA8,
+ 5, 0x004B2AD0,
+ 5, 0x004B2AF8,
+ 5, 0x004B2B20,
+ 5, 0x004B2B48,
+ // Scene2247
+ 1, 0x004B5428,
+ 2, 0x004B5438,
+ 1, 0x004B5530,
+ 1, 0x004B5430,
+ 4, 0x004B54A0,
+ 4, 0x004B54C0,
+ 5, 0x004B54E0,
+ 5, 0x004B5508,
+ // Scene2401
+ 1, 0x004B2F70,
+ 1, 0x004B2F80,
+ 1, 0x004B2F78,
+ 4, 0x004B3090,
+ 2, 0x004B30B0,
+ 6, 0x004B3020,
+ 2, 0x004B3050,
+ 4, 0x004B2FA8,
+ 4, 0x004B2FC8,
+ // Scene2402
+ 1, 0x004AF7C8,
+ 2, 0x004AF7D8,
+ 1, 0x004AF888,
+ 1, 0x004AF7D0,
+ 3, 0x004AF800,
+ 1, 0x004AF818,
+ 2, 0x004AF890,
+ // Scene2403
+ 1, 0x004B5C98,
+ 1, 0x004B5D70,
+ 4, 0x004B5CA0,
+ 2, 0x004B5D98,
+ // Scene2406
+ 1, 0x004B76C8,
+ 3, 0x004B76D8,
+ 1, 0x004B77C0,
+ 1, 0x004B7810,
+ 1, 0x004B76D0,
+ 2, 0x004B77C8,
+ 2, 0x004B77D8,
+ 2, 0x004B7758,
+ 4, 0x004B7738,
+ // Scene2501
+ 7, 0x004B2538,
+ 6, 0x004B2570,
+ // Scene2732
+ 1, 0x004AE328,
+ // Scene2801
+ 1, 0x004B6BB8,
+ 1, 0x004B6BC0,
+ 1, 0x004B6C10,
+ 1, 0x004B6BB0,
+ 2, 0x004B6C40,
+ // Scene2803b
+ 1, 0x004B60D8,
+ 1, 0x004B6100,
+ 1, 0x004B60F8,
+ 1, 0x004B6100,
+ 3, 0x004B6138,
+ 3, 0x004B60E0,
+ 3, 0x004B6180,
+ 1, 0x004B6198,
+ 6, 0x004B6108,
+ 3, 0x004B6150,
+ 3, 0x004B6168,
+ 1, 0x004B61A0,
+ 5, 0x004B61A8,
+ // Scene2803
+ 1, 0x004B79F0,
+ 5, 0x004B79C8,
+ 1, 0x004B7A00,
+ 2, 0x004B7A78,
+ 1, 0x004B79F8,
+ 1, 0x004B79C0,
+ 1, 0x004B7A50,
+ 2, 0x004B7A58,
+ 5, 0x004B7A08,
+ 4, 0x004B7A30,
+ 2, 0x004B7A68,
+ 7, 0x004B7A88,
+ // Scene2805
+ 1, 0x004AE1C8,
+ 2, 0x004AE1D0,
+ 4, 0x004AE288,
+ 2, 0x004AE1E0,
+ 1, 0x004AE1C0,
+ // Scene2806
+ 1, 0x004AF098,
+ 1, 0x004AF098,
+ 3, 0x004AF0C8,
+ 5, 0x004AF0A0,
+ 1, 0x004AF090,
+ 2, 0x004AF0E0,
+ // Scene2809
+ 1, 0x004B5B90,
+ 3, 0x004B5BD0,
+ 5, 0x004B5BA8,
+ 1, 0x004B5B88,
+ 2, 0x004B5B98,
+ 1, 0x004AE438,
+ 3, 0x004AE440,
+ 3, 0x004AE738,
+ 1, 0x004AE6D8,
+ 2, 0x004AE6E8,
+ 1, 0x004AE6E0,
+ 2, 0x004AE428,
+ 2, 0x004AE418,
+ 1, 0x004AE410,
+ 4, 0x004AE458,
+ 5, 0x004AE4A8,
+ 5, 0x004AE4D0,
+ 5, 0x004AE4F8,
+ 5, 0x004AE520,
+ 5, 0x004AE548,
+ 5, 0x004AE570,
+ 5, 0x004AE598,
+ 5, 0x004AE5C0,
+ 5, 0x004AE5E8,
+ 5, 0x004AE610,
+ 5, 0x004AE638,
+ 5, 0x004AE660,
+ 5, 0x004AE688,
+ 2, 0x004AE750,
+ // Scene2812
+ 1, 0x004AF560,
+ 1, 0x004AF588,
+ 1, 0x004AF5F0,
+ 4, 0x004AF568,
+ 2, 0x004AF658,
+ 2, 0x004AF668,
+ 0, 0
+};
+
+static const uint32 navigationListOffsets[] = {
+ // Module1100
+ 2, 0x004B8430,
+ 2, 0x004B8460,
+ 4, 0x004B84F0,
+ 4, 0x004B8490,
+ 2, 0x004B8580,
+ 2, 0x004B8550,
+ // Module1300
+ 6, 0x004B2718,
+ 2, 0x004B27A8,
+ 2, 0x004B27D8,
+ 2, 0x004B2808,
+ 2, 0x004B2838,
+ // Module1600
+ 4, 0x004B39D0,
+ 2, 0x004B3A30,
+ 2, 0x004B3A60,
+ 6, 0x004B3A90,
+ 2, 0x004B3B20,
+ 2, 0x004B3B50,
+ 2, 0x004B3B80,
+ // Module1700
+ 2, 0x004AE8B8,
+ 3, 0x004AE8E8,
+ // Module1800
+ 4, 0x004AFD38,
+ 1, 0x004AFD98,
+ 2, 0x004AFDB0,
+ 4, 0x004AFDE0,
+ 2, 0x004AFE40,
+ // Module2300
+ 2, 0x004B67B8,
+ 6, 0x004B67E8,
+ 2, 0x004B6878,
+ 3, 0x004B68F0,
+ 3, 0x004B68A8,
+ // Module2000
+ 3, 0x004B7B48,
+ 3, 0x004B7B00,
+ // Module2600
+ 2, 0x004B8608,
+ 4, 0x004B8638,
+ 2, 0x004B8698,
+ 2, 0x004B86C8,
+ 4, 0x004B8758,
+ 4, 0x004B86F8,
+ 2, 0x004B87B8,
+ // Module3000
+ 2, 0x004B7C80,
+ 2, 0x004B7CE0,
+ 2, 0x004B7CB0,
+ 3, 0x004B7D58,
+ 3, 0x004B7D10,
+ 4, 0x004B7E60,
+ 4, 0x004B7DA0,
+ 4, 0x004B7E00,
+ 4, 0x004B7F20,
+ 4, 0x004B7EC0,
+ 2, 0x004B7F80,
+ 1, 0x004B7FB0,
+ 0, 0
+};
+
+// Hall of Records scene definitions
+
+static const uint32 sceneInfo140Offsets[] = {
+ 0x004B7180,
+ 0x004B7198,
+ 0x004B71B0,
+ 0x004B71C8,
+ 0x004B71E0,
+ 0x004B71F8,
+ 0x004B7210,
+ 0x004B7228,
+ 0x004B7240,
+ 0x004B7258,
+ 0x004B7270,
+ 0x004B7288,
+ 0x004B72A0,
+ 0x004B72B8,
+ 0x004B72D0,
+ 0x004B72E8,
+ 0x004B7300,
+ 0x004B7318,
+ 0x004B7330,
+ 0x004B7348,
+ 0x004B7360,
+ 0x004B7378,
+ 0x004B7390,
+ 0x004B73A8,
+ 0x004B73C0,
+ 0x004B73D8,
+ 0x004B73F0,
+ 0x004B7408,
+ 0x004B7420,
+ 0x004B7438,
+ 0x004B7450,
+ 0x004B7468,
+ 0x004B7480,
+ 0x004B7498,
+ 0x004B74B0,
+ 0x004B74C8,
+ 0
+};
+
+static const uint32 sceneInfo2700Offsets[] = {
+ //
+ 0x004B1710,
+ 0x004B1738,
+ 0x004B1760,
+ 0x004B1788,
+ 0x004B17B0,
+ 0x004B17D8,
+ 0x004B1800,
+ 0x004B1828,
+ 0x004B1850,
+ 0x004B1878,
+ 0x004B18A0,
+ 0x004B18C8,
+ 0x004B18F0,
+ 0x004B1918,
+ //
+ 0x004B19E0,
+ 0x004B1A08,
+ 0x004B1A30,
+ 0x004B1A58,
+ 0x004B1A80,
+ 0x004B1AA8,
+ 0x004B1AD0,
+ 0x004B1AF8,
+ 0x004B1B20,
+ 0x004B1B48,
+ 0x004B1B70,
+ 0x004B1B98,
+ 0x004B1BC0,
+ 0x004B1BE8,
+ 0x004B1C10,
+ 0x004B1C38,
+ 0x004B1C60,
+ 0x004B1C88,
+ 0x004B1CB0,
+ 0x004B1CD8,
+ 0x004B1D00,
+ 0x004B1D28,
+ 0x004B1D50,
+ 0x004B1D78,
+ //
+ 0x004B1DB0,
+ //
+ 0x004B1DE8,
+ 0x004B1E10,
+ 0x004B1E38,
+ 0x004B1E60,
+ //
+ 0x004B1950,
+ //
+ 0x004B2240,
+ //
+ 0x004B5F68,
+ 0x004B5F8C,
+ 0x004B5FB0,
+ 0x004B5FD8,
+ 0x004B5FFC,
+ 0x004B6020,
+ // Scene2501
+ 0x004B2628,
+ 0x004B264C,
+ 0x004B2670,
+ // Scene2502
+ 0x004B01B8,
+ // Scene2503
+ 0x004B01E0,
+ 0x004B0208,
+ // Scene2505
+ 0x004B0230,
+ // Scene2506
+ 0x004B0268,
+ // Scene2507
+ 0x004B02A0,
+ // Scene2508
+ 0x004B02C8,
+ // Scene2706
+ 0x004B22A0,
+ 0x004B22C4,
+ 0x004B22E8,
+ 0
+};
diff --git a/devtools/create_neverhood/util.cpp b/devtools/create_neverhood/util.cpp
new file mode 100644
index 0000000000..5ce8237b85
--- /dev/null
+++ b/devtools/create_neverhood/util.cpp
@@ -0,0 +1,152 @@
+/* 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.
+ *
+ */
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include "util.h"
+#include <stdarg.h>
+
+#ifdef _MSC_VER
+ #define vsnprintf _vsnprintf
+#endif
+
+void error(const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "ERROR: %s!\n", buf);
+
+ exit(1);
+}
+
+void warning(const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "WARNING: %s!\n", buf);
+}
+
+int scumm_stricmp(const char *s1, const char *s2) {
+ byte l1, l2;
+ do {
+ // Don't use ++ inside tolower, in case the macro uses its
+ // arguments more than once.
+ l1 = (byte)*s1++;
+ l1 = tolower(l1);
+ l2 = (byte)*s2++;
+ l2 = tolower(l2);
+ } while (l1 == l2 && l1 != 0);
+ return l1 - l2;
+}
+
+void debug(int level, const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "DEBUG: %s!\n", buf);
+}
+
+uint8 readByte(FILE *fp) {
+ return fgetc(fp);
+}
+
+uint16 readUint16BE(FILE *fp) {
+ uint16 ret = 0;
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp);
+ return ret;
+}
+
+uint16 readUint16LE(FILE *fp) {
+ uint16 ret = 0;
+ ret |= fgetc(fp);
+ ret |= fgetc(fp) << 8;
+ return ret;
+}
+
+uint32 readUint32BE(FILE *fp) {
+ uint32 ret = 0;
+ ret |= fgetc(fp) << 24;
+ ret |= fgetc(fp) << 16;
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp);
+ return ret;
+}
+
+uint32 readUint32LE(FILE *fp) {
+ uint32 ret = 0;
+ ret |= fgetc(fp);
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp) << 16;
+ ret |= fgetc(fp) << 24;
+ return ret;
+}
+
+void writeByte(FILE *fp, uint8 b) {
+ fwrite(&b, 1, 1, fp);
+}
+
+void writeUint16BE(FILE *fp, uint16 value) {
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value));
+}
+
+void writeUint16LE(FILE *fp, uint16 value) {
+ writeByte(fp, (uint8)(value));
+ writeByte(fp, (uint8)(value >> 8));
+}
+
+void writeUint32BE(FILE *fp, uint32 value) {
+ writeByte(fp, (uint8)(value >> 24));
+ writeByte(fp, (uint8)(value >> 16));
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value));
+}
+
+void writeUint32LE(FILE *fp, uint32 value) {
+ writeByte(fp, (uint8)(value));
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value >> 16));
+ writeByte(fp, (uint8)(value >> 24));
+}
+
+uint32 fileSize(FILE *fp) {
+ uint32 sz;
+ uint32 pos = ftell(fp);
+ fseek(fp, 0, SEEK_END);
+ sz = ftell(fp);
+ fseek(fp, pos, SEEK_SET);
+ return sz;
+}
diff --git a/devtools/create_neverhood/util.h b/devtools/create_neverhood/util.h
new file mode 100644
index 0000000000..a2783cca71
--- /dev/null
+++ b/devtools/create_neverhood/util.h
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef UTIL_H
+#define UTIL_H
+
+#include "common/scummsys.h"
+#include "common/endian.h"
+#include "common/util.h"
+
+#ifdef WIN32
+#include <io.h>
+#include <process.h>
+#endif
+
+
+/* File I/O */
+uint8 readByte(FILE *fp);
+uint16 readUint16BE(FILE *fp);
+uint16 readUint16LE(FILE *fp);
+uint32 readUint32BE(FILE *fp);
+uint32 readUint32LE(FILE *fp);
+void writeByte(FILE *fp, uint8 b);
+void writeUint16BE(FILE *fp, uint16 value);
+void writeUint16LE(FILE *fp, uint16 value);
+void writeUint32BE(FILE *fp, uint32 value);
+void writeUint32LE(FILE *fp, uint32 value);
+uint32 fileSize(FILE *fp);
+
+/* Misc stuff */
+void NORETURN_PRE error(const char *s, ...) NORETURN_POST;
+void warning(const char *s, ...);
+void debug(int level, const char *s, ...);
+int scumm_stricmp(const char *s1, const char *s2);
+
+using namespace Common;
+
+#endif
diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h
index de4703a47d..1a66edff93 100644
--- a/devtools/create_project/config.h
+++ b/devtools/create_project/config.h
@@ -29,7 +29,7 @@
#define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION"
#define ENABLE_LANGUAGE_EXTENSIONS "" // Comma separated list of projects that need language extensions
-#define DISABLE_EDIT_AND_CONTINUE "tinsel,tony" // Comma separated list of projects that need Edit&Continue to be disabled for co-routine support (the main project is automatically added)
+#define DISABLE_EDIT_AND_CONTINUE "tinsel,tony,scummvm" // Comma separated list of projects that need Edit&Continue to be disabled for co-routine support (the main project is automatically added)
//#define ADDITIONAL_LIBRARY "" // Add a single library to the list of externally linked libraries
#define NEEDS_RTTI 0 // Enable RTTI globally
diff --git a/devtools/create_teenagent/create_teenagent.cpp b/devtools/create_teenagent/create_teenagent.cpp
index fc2ba4da0e..79c61900f3 100644
--- a/devtools/create_teenagent/create_teenagent.cpp
+++ b/devtools/create_teenagent/create_teenagent.cpp
@@ -32,78 +32,110 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include "md5.h"
+#include "util.h"
+#include "static_tables.h"
-static void print_hex(FILE * f, const uint8 * data, size_t len) {
- for (size_t i = 0; i < len; ++i) {
- fprintf(f, "%02x", data[i]);
- }
-}
-
-static void extract(FILE * fout, FILE *fin, size_t pos, size_t size, const char *what) {
- char buf[0x10000];
- assert(size < sizeof(buf));
+int main(int argc, char *argv[]) {
+ const char *dat_name = "teenagent.dat";
- if (fseek(fin, pos, SEEK_SET) != 0) {
- perror(what);
+ FILE *fout = fopen(dat_name, "wb");
+ if (fout == NULL) {
+ perror("opening output file");
exit(1);
}
- if (fread(buf, size, 1, fin) != 1) {
- perror(what);
+ if (fwrite(cseg, CSEG_SIZE, 1, fout) != 1) {
+ perror("Writing code segment");
exit(1);
}
- if (fwrite(buf, size, 1, fout) != 1) {
- perror(what);
+ if (fwrite(dsegStartBlock, DSEG_STARTBLK_SIZE, 1, fout) != 1) {
+ perror("Writing data segment start block");
exit(1);
}
-}
-int main(int argc, char *argv[]) {
- if (argc < 2) {
- fprintf(stderr, "usage: %s: Teenagnt.exe (unpacked one)\n", argv[0]);
- exit(1);
+ // Write out message string block
+ for (uint i = 0; i < (sizeof(messages)/sizeof(char*)); i++) {
+ if (i == 0) {
+ // Write out reject message pointer block
+ uint16 off = DSEG_STARTBLK_SIZE + (4 * 2);
+ writeUint16LE(fout, off);
+ off += strlen(messages[0]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[1]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[2]) + 2;
+ writeUint16LE(fout, off);
+ }
+
+ if (i == 327) {
+ // Write out book color pointer block
+ uint16 off = DSEG_STARTBLK_SIZE + (4 * 2);
+ for (uint k = 0; k < 327; k++)
+ off += strlen(messages[k]) + 2;
+ off += (6 * 2);
+ writeUint16LE(fout, off);
+ off += strlen(messages[327]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[328]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[329]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[330]) + 2;
+ writeUint16LE(fout, off);
+ off += strlen(messages[331]) + 2;
+ writeUint16LE(fout, off);
+ }
+ for (uint j = 0; j < strlen(messages[i]); j++) {
+ if (messages[i][j] == '\n')
+ writeByte(fout, '\0');
+ else
+ writeByte(fout, messages[i][j]);
+ }
+ writeByte(fout, '\0');
+ writeByte(fout, '\0');
}
- const char * fname = argv[1];
- uint8 digest[16];
- if (!md5_file(fname, digest, 0)) {
- fprintf(stderr, "cannot calculate md5 for %s", fname);
+ if (fwrite(dsegEndBlock, DSEG_ENDBLK_SIZE, 1, fout) != 1) {
+ perror("Writing data segment end block");
exit(1);
}
- const uint8 ethalon[16] = {
- 0x51, 0xb6, 0xd6, 0x47, 0x21, 0xf7, 0xc4, 0xb4,
- 0x98, 0xbf, 0xc0, 0xf3, 0x23, 0x01, 0x3e, 0x36,
- };
-
- if (memcmp(digest, ethalon, 16) != 0) {
- fprintf(stderr, "cannot extract data, your md5: ");
- print_hex(stderr, digest, 16);
- fprintf(stderr, ", need md5: ");
- print_hex(stderr, ethalon, 16);
- fprintf(stderr, ", sorry\n");
- exit(1);
- }
- FILE *fin = fopen(fname, "rb");
- if (fin == NULL) {
- perror("opening input file");
- exit(1);
- }
-
- const char * dat_name = "teenagent.dat";
- FILE *fout = fopen(dat_name, "wb");
- if (fout == NULL) {
- perror("opening output file");
- exit(1);
+ // Write out dialog string block
+ static const char nulls[6] = "\0\0\0\0\0";
+ for (uint i = 0; i < (sizeof(dialogs)/sizeof(char**)); i++) {
+ //printf("Writing Dialog #%d\n", i);
+ bool dialogEnd = false;
+ uint j = 0;
+ while (!dialogEnd) {
+ uint nullCount = 0;
+ if (strcmp(dialogs[i][j], NEW_LINE) == 0) {
+ nullCount = 1;
+ } else if (strcmp(dialogs[i][j], DISPLAY_MESSAGE) == 0) {
+ nullCount = 2;
+ } else if (strcmp(dialogs[i][j], CHANGE_CHARACTER) == 0) {
+ nullCount = 3;
+ } else if (strcmp(dialogs[i][j], END_DIALOG) == 0) {
+ nullCount = 4;
+ dialogEnd = true;
+ } else { // Deals with normal dialogue and ANIM_WAIT cases
+ if (fwrite(dialogs[i][j], 1, strlen(dialogs[i][j]), fout) != strlen(dialogs[i][j])) {
+ perror("Writing dialog string");
+ exit(1);
+ }
+ }
+
+ if (nullCount != 0 && nullCount < 5) {
+ if (fwrite(nulls, 1, nullCount, fout) != nullCount) {
+ perror("Writing dialog string nulls");
+ exit(1);
+ }
+ }
+
+ j++;
+ }
}
- //0x0200, 0xb5b0, 0x1c890
- extract(fout, fin, 0x00200, 0xb3b0, "extracting code segment");
- extract(fout, fin, 0x0b5b0, 0xe790, "extracting data segment");
- extract(fout, fin, 0x1c890, 0x8be2, "extracting second data segment");
- fclose(fin);
fclose(fout);
return 0;
diff --git a/devtools/create_teenagent/module.mk b/devtools/create_teenagent/module.mk
index a9d102addb..7d01a2ba85 100644
--- a/devtools/create_teenagent/module.mk
+++ b/devtools/create_teenagent/module.mk
@@ -3,7 +3,7 @@ MODULE := devtools/create_teenagent
MODULE_OBJS := \
create_teenagent.o \
- md5.o
+ util.o
# Set the name of the executable
TOOL_EXECUTABLE := create_teenagent
diff --git a/devtools/create_teenagent/static_tables.h b/devtools/create_teenagent/static_tables.h
new file mode 100644
index 0000000000..6e7fdfe91c
--- /dev/null
+++ b/devtools/create_teenagent/static_tables.h
@@ -0,0 +1,16317 @@
+/* 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 STATIC_TABLES_H
+#define STATIC_TABLES_H
+
+// Static data tables for Teenagent engine
+
+// Unpacked Executable MD5sum - 51b6d64721f7c4b498bfc0f323013e36
+
+// Code Segment
+// starts at offset 0x0200 in original executable
+#define CSEG_SIZE 46000 // 0xb3b0
+
+const static uint8 cseg[CSEG_SIZE] = {
+ 0xb8, 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xe9,
+ 0xd2, 0x00, 0x9c, 0xfa, 0x60, 0x1e, 0x06, 0xb8,
+ 0x3b, 0x0b, 0x8e, 0xd8, 0xeb, 0x0e, 0xa0, 0x48,
+ 0x32, 0xb4, 0x03, 0xff, 0x1e, 0x4a, 0x32, 0xb8,
+ 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xbb, 0x86,
+ 0x32, 0xff, 0x07, 0x75, 0x03, 0xff, 0x47, 0x02,
+ 0x33, 0xc0, 0xe8, 0xce, 0xa4, 0xff, 0x0e, 0x7f,
+ 0x32, 0x75, 0x14, 0xa1, 0x81, 0x32, 0xa3, 0x7f,
+ 0x32, 0x33, 0xc0, 0x8e, 0xd8, 0xbb, 0x6c, 0x04,
+ 0xff, 0x07, 0x75, 0x03, 0xff, 0x47, 0x02, 0xb0,
+ 0x20, 0xe6, 0x20, 0x07, 0x1f, 0x61, 0xfb, 0x9d,
+ 0xcf, 0x9c, 0xfa, 0x60, 0x1e, 0x06, 0xb8, 0x3b,
+ 0x0b, 0x8e, 0xd8, 0xeb, 0x15, 0x80, 0x3e, 0x47,
+ 0x32, 0x00, 0x74, 0x0e, 0xa0, 0x48, 0x32, 0xb4,
+ 0x03, 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b,
+ 0x8e, 0xd8, 0x8e, 0xc0, 0xfe, 0x0e, 0x83, 0x32,
+ 0x75, 0x14, 0xc6, 0x06, 0x83, 0x32, 0x6e, 0xbb,
+ 0x86, 0x32, 0xff, 0x07, 0x75, 0x03, 0xff, 0x47,
+ 0x02, 0x33, 0xc0, 0xe8, 0x6d, 0xa4, 0xff, 0x0e,
+ 0x7f, 0x32, 0x75, 0x14, 0xa1, 0x81, 0x32, 0xa3,
+ 0x7f, 0x32, 0x33, 0xc0, 0x8e, 0xd8, 0xbb, 0x6c,
+ 0x04, 0xff, 0x07, 0x75, 0x03, 0xff, 0x47, 0x02,
+ 0xb0, 0x20, 0xe6, 0x20, 0x07, 0x1f, 0x61, 0xfb,
+ 0x9d, 0xcf, 0x9c, 0x50, 0xe4, 0x60, 0x2e, 0xa2,
+ 0xd7, 0x00, 0xe4, 0x61, 0x8a, 0xe0, 0x0c, 0x80,
+ 0xe6, 0x61, 0x86, 0xe0, 0xe6, 0x61, 0xeb, 0x00,
+ 0xb0, 0x20, 0xe6, 0x20, 0x58, 0x9d, 0xcf, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xb4, 0x2c, 0xcd, 0x21,
+ 0xbb, 0x5f, 0xb1, 0x2e, 0x89, 0x0f, 0x2e, 0x89,
+ 0x57, 0x02, 0xe8, 0xfc, 0xa3, 0xe8, 0xb1, 0xb0,
+ 0xe8, 0xce, 0xaf, 0xe8, 0xee, 0xb0, 0xe8, 0x18,
+ 0xa8, 0xe8, 0x4d, 0xb2, 0xe8, 0xde, 0xa4, 0xb9,
+ 0x01, 0x00, 0xe8, 0x46, 0xb0, 0xfa, 0xb8, 0x88,
+ 0xc0, 0xbb, 0x14, 0x00, 0x2e, 0x89, 0x07, 0xbb,
+ 0x63, 0x00, 0x2e, 0x89, 0x07, 0xfb, 0xe8, 0x38,
+ 0x0a, 0xe8, 0x49, 0x0a, 0xe8, 0x6f, 0x0a, 0xe8,
+ 0x79, 0x0a, 0xe8, 0x9a, 0x0a, 0xe8, 0xb5, 0x0a,
+ 0xb8, 0x3b, 0x0b, 0xa3, 0xac, 0x00, 0xb8, 0x3a,
+ 0x01, 0xa3, 0xaa, 0x00, 0xb9, 0x07, 0x00, 0xba,
+ 0x54, 0x00, 0xe8, 0x33, 0xae, 0xa1, 0xbf, 0x32,
+ 0xa3, 0xac, 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00,
+ 0xb9, 0x01, 0x00, 0xba, 0x54, 0x00, 0xe8, 0x1f,
+ 0xae, 0xe8, 0x82, 0x05, 0xe8, 0xf5, 0x00, 0xb9,
+ 0x04, 0x00, 0xe8, 0xee, 0xaf, 0xb8, 0x88, 0x00,
+ 0xbb, 0x99, 0x00, 0xbf, 0x8b, 0x00, 0xbe, 0x9c,
+ 0x00, 0xb5, 0x03, 0xb1, 0x0b, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x0a, 0x00, 0xe8, 0x6d, 0xaa, 0xe8, 0x86,
+ 0xa4, 0xe8, 0x04, 0x07, 0xe8, 0xa0, 0x1e, 0xe8,
+ 0x03, 0x2a, 0xe8, 0x94, 0x33, 0xe8, 0xc8, 0x34,
+ 0xe8, 0x22, 0x33, 0xe8, 0x57, 0x33, 0xe8, 0xe5,
+ 0x1d, 0xe8, 0x12, 0x27, 0xe8, 0x0d, 0xa5, 0xb3,
+ 0x01, 0x72, 0x07, 0xe8, 0x35, 0xa5, 0xb3, 0x00,
+ 0x73, 0xd7, 0xe8, 0xf6, 0xa1, 0xeb, 0xd2, 0xb8,
+ 0x03, 0x00, 0xcd, 0x10, 0xb4, 0x02, 0xff, 0x1e,
+ 0x4a, 0x32, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8, 0x8e,
+ 0xc0, 0xe9, 0xd8, 0xb1, 0xe8, 0x86, 0x9a, 0xe8,
+ 0x77, 0x00, 0xe8, 0x8f, 0x9a, 0xbb, 0x88, 0xe4,
+ 0x33, 0xf6, 0x33, 0xff, 0x06, 0xa1, 0xb1, 0x32,
+ 0x8e, 0xc0, 0x53, 0xe8, 0x26, 0x00, 0xe8, 0x19,
+ 0x00, 0x5b, 0x53, 0xe8, 0xca, 0xa2, 0xbe, 0x40,
+ 0x01, 0x2b, 0xf0, 0xd1, 0xee, 0x5b, 0xe8, 0x6c,
+ 0xa2, 0x43, 0x8a, 0x07, 0x0a, 0xc0, 0x75, 0xe2,
+ 0x07, 0xc3, 0xa1, 0xb1, 0x32, 0xb9, 0xe0, 0x06,
+ 0xe8, 0x05, 0xab, 0xc3, 0x1e, 0x06, 0x8c, 0xc0,
+ 0x8e, 0xd8, 0xb8, 0x00, 0xa0, 0x8e, 0xc0, 0x33,
+ 0xf6, 0xbf, 0xbf, 0xf8, 0xb9, 0x0b, 0x00, 0x51,
+ 0xb9, 0xa0, 0x00, 0x57, 0xf3, 0xa5, 0x56, 0xe8,
+ 0x08, 0x00, 0x5e, 0x5f, 0x59, 0xe2, 0xf0, 0x07,
+ 0x1f, 0xc3, 0xe8, 0xeb, 0xa4, 0xe8, 0xe8, 0xa4,
+ 0x1e, 0x8c, 0xc0, 0x8e, 0xd8, 0x33, 0xff, 0xbe,
+ 0x40, 0x01, 0xb9, 0x00, 0x7d, 0xf3, 0xa5, 0x1f,
+ 0xc3, 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d, 0xe8,
+ 0xbe, 0xaa, 0xa1, 0xb1, 0x32, 0xb9, 0x00, 0x7d,
+ 0xe8, 0xb5, 0xaa, 0xc3, 0xe8, 0x7c, 0x03, 0xe8,
+ 0x6c, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x29, 0x00,
+ 0xb8, 0x8b, 0x00, 0xbb, 0x9c, 0x00, 0x8b, 0xf8,
+ 0x8b, 0xf3, 0xb5, 0x03, 0xb1, 0x0b, 0xe8, 0x8c,
+ 0xa9, 0xe8, 0xfc, 0xa9, 0xe8, 0x5c, 0x03, 0xe8,
+ 0x4c, 0x03, 0xe8, 0x97, 0xaa, 0xe8, 0x46, 0x03,
+ 0xb8, 0xc8, 0x00, 0xe8, 0xbc, 0x1c, 0xe8, 0x3d,
+ 0x03, 0xb9, 0x29, 0x00, 0xb0, 0x0c, 0xb4, 0x04,
+ 0xe8, 0x72, 0xa7, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x90, 0x03, 0xb0, 0x02, 0xe8, 0xca, 0x17,
+ 0xe8, 0x23, 0x03, 0xe8, 0x4a, 0x3d, 0xc6, 0x07,
+ 0x6c, 0xe8, 0xfe, 0xab, 0xb9, 0x3e, 0x00, 0xb0,
+ 0x08, 0xb4, 0x04, 0xe8, 0x4f, 0xa7, 0xb9, 0x3a,
+ 0x00, 0xb0, 0x28, 0xb4, 0x0a, 0xe8, 0x4e, 0xa7,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x91, 0x03,
+ 0xb0, 0x02, 0xe8, 0x9d, 0x17, 0xe8, 0xf6, 0x02,
+ 0xe8, 0x1d, 0x3d, 0xc6, 0x47, 0x01, 0x6d, 0xe8,
+ 0xd0, 0xab, 0xc6, 0x06, 0x45, 0x33, 0xe7, 0xc6,
+ 0x06, 0x46, 0x33, 0xd7, 0xb0, 0x02, 0xb4, 0x01,
+ 0xbe, 0x92, 0x03, 0xbf, 0x93, 0x03, 0xbb, 0x8e,
+ 0x74, 0xe8, 0x82, 0x11, 0xe8, 0xcf, 0x02, 0xbb,
+ 0xc2, 0xe3, 0xe8, 0xe9, 0x02, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x94, 0x03, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x2a, 0x00, 0xe8, 0x06, 0xaa, 0xe8, 0xb5,
+ 0x02, 0xb9, 0x0f, 0x00, 0xb0, 0x14, 0xb4, 0x03,
+ 0xe8, 0xea, 0xa6, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x94, 0x03, 0xb0, 0x02, 0xe8, 0x42, 0x17,
+ 0xe8, 0x9b, 0x02, 0xb9, 0x28, 0x00, 0xb0, 0x12,
+ 0xb4, 0x0e, 0xe8, 0xd0, 0xa6, 0xb0, 0x16, 0xe8,
+ 0xd4, 0xa6, 0xb0, 0x1b, 0xe8, 0xd6, 0xa6, 0xb0,
+ 0x1d, 0xe8, 0xd8, 0xa6, 0xb0, 0x1f, 0xe8, 0xda,
+ 0xa6, 0xb0, 0x21, 0xe8, 0xe3, 0xa6, 0xb0, 0x23,
+ 0xe8, 0xe5, 0xa6, 0xb0, 0x25, 0xe8, 0xe7, 0xa6,
+ 0xb9, 0x1d, 0x00, 0xb0, 0x2c, 0xe8, 0xe6, 0xa6,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x96, 0x03, 0xc7,
+ 0x47, 0x02, 0x95, 0x03, 0xb0, 0x01, 0xe8, 0xf9,
+ 0x16, 0xe8, 0x52, 0x02, 0xbb, 0xe6, 0xe3, 0xe8,
+ 0x6c, 0x02, 0xb9, 0x03, 0x00, 0xe8, 0xd3, 0xad,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x98, 0x03, 0xc7,
+ 0x47, 0x02, 0x9c, 0x03, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x28, 0x00, 0xe8, 0x7f, 0xa9, 0xe8, 0x2e, 0x02,
+ 0xc6, 0x06, 0x45, 0x33, 0xe7, 0xc6, 0x06, 0x46,
+ 0x33, 0xeb, 0xb0, 0x01, 0xb4, 0x02, 0xbe, 0x98,
+ 0x03, 0xbf, 0x9c, 0x03, 0xbb, 0x0d, 0x75, 0xe8,
+ 0xc4, 0x10, 0xe8, 0x11, 0x02, 0xb9, 0x1a, 0x00,
+ 0xb0, 0x32, 0xb4, 0x0a, 0xe8, 0x46, 0xa6, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x9d, 0x03, 0xc7, 0x47,
+ 0x02, 0x9e, 0x03, 0xb0, 0x01, 0xe8, 0x9a, 0x16,
+ 0xe8, 0xf3, 0x01, 0xc6, 0x06, 0x45, 0x33, 0xeb,
+ 0xb0, 0x02, 0xb4, 0x01, 0xbe, 0x9f, 0x03, 0xbf,
+ 0x98, 0x03, 0xbb, 0xa6, 0x78, 0xe8, 0x8e, 0x10,
+ 0xe8, 0xdb, 0x01, 0xbb, 0xff, 0xe3, 0xe8, 0xf5,
+ 0x01, 0xb9, 0x0b, 0x00, 0xe8, 0x5c, 0xad, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x27, 0x00, 0xe8, 0x14, 0xa9,
+ 0xe8, 0xc3, 0x01, 0xb8, 0xc8, 0x00, 0xe8, 0x39,
+ 0x1b, 0xe8, 0xba, 0x01, 0xb9, 0x51, 0x00, 0xb0,
+ 0x02, 0xb4, 0x0e, 0xe8, 0xef, 0xa5, 0xb0, 0x05,
+ 0xb4, 0x0b, 0xe8, 0xf1, 0xa5, 0xb0, 0x08, 0xb4,
+ 0x08, 0xe8, 0xf1, 0xa5, 0xb0, 0x0b, 0xb4, 0x06,
+ 0xe8, 0xf1, 0xa5, 0xb0, 0x0e, 0xb4, 0x05, 0xe8,
+ 0xf1, 0xa5, 0xb0, 0x10, 0xb4, 0x03, 0xe8, 0xf1,
+ 0xa5, 0xb0, 0x10, 0xe8, 0xf3, 0xa5, 0xb0, 0x12,
+ 0xe8, 0xf5, 0xa5, 0xb0, 0x14, 0xe8, 0xf7, 0xa5,
+ 0xb0, 0x15, 0xe8, 0xf9, 0xa5, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0xa0, 0x03, 0xb0, 0x02, 0xe8,
+ 0x10, 0x16, 0xe8, 0x49, 0xa6, 0xe8, 0x66, 0x01,
+ 0xe8, 0x8d, 0x3b, 0xc6, 0x07, 0x70, 0xe8, 0x41,
+ 0xaa, 0xe8, 0xf1, 0x1a, 0xe8, 0x57, 0x01, 0xc6,
+ 0x06, 0x45, 0x33, 0xd1, 0xb0, 0x01, 0xbe, 0xa1,
+ 0x03, 0xbb, 0xe1, 0x78, 0xe8, 0x80, 0x11, 0xe8,
+ 0x44, 0x01, 0xe8, 0xd8, 0x1a, 0xe8, 0x3e, 0x01,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xc7, 0x06, 0xaf,
+ 0x64, 0x3f, 0x01, 0xc7, 0x06, 0xb1, 0x64, 0x96,
+ 0x00, 0xbe, 0x3f, 0x00, 0xbf, 0x96, 0x00, 0xc6,
+ 0x06, 0xc3, 0x64, 0x01, 0xe8, 0x8c, 0x31, 0xe8,
+ 0x1c, 0x01, 0xc6, 0x06, 0x35, 0x33, 0x12, 0xc6,
+ 0x06, 0x36, 0x33, 0x24, 0xb8, 0xa8, 0x5d, 0xa3,
+ 0x37, 0x33, 0xb8, 0x84, 0x4d, 0xa3, 0x39, 0x33,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x53, 0x03, 0xb9,
+ 0xa2, 0x03, 0xe8, 0xaa, 0x16, 0xe8, 0xf6, 0x00,
+ 0xb9, 0x18, 0x00, 0xb0, 0x0b, 0xb4, 0x02, 0xe8,
+ 0x2b, 0xa5, 0xb9, 0xa3, 0x03, 0xe8, 0x1a, 0x16,
+ 0xe8, 0xb8, 0xa6, 0xe8, 0xe0, 0x00, 0xbb, 0x2f,
+ 0xe4, 0xe8, 0xfa, 0x00, 0xb9, 0x03, 0x00, 0xe8,
+ 0x61, 0xac, 0xc7, 0x06, 0xaf, 0x64, 0x32, 0x00,
+ 0xc7, 0x06, 0xb1, 0x64, 0xba, 0x00, 0xc6, 0x06,
+ 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xdc, 0x64, 0x00,
+ 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xe8, 0x71, 0x39,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x97, 0x03, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x28, 0x00, 0xe8, 0xd0, 0x3a,
+ 0xc6, 0x07, 0x71, 0xe8, 0xf7, 0xa7, 0xe8, 0x9d,
+ 0x00, 0xc6, 0x06, 0x45, 0x33, 0xe7, 0xb0, 0x01,
+ 0xbe, 0x97, 0x03, 0xbb, 0xf1, 0x78, 0xe8, 0xc6,
+ 0x10, 0xe8, 0x8a, 0x00, 0xbe, 0xc6, 0x00, 0xbf,
+ 0xba, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8,
+ 0xe9, 0x30, 0xe8, 0x79, 0x00, 0xe8, 0x8f, 0x11,
+ 0xbb, 0x58, 0x79, 0xe8, 0x77, 0x0c, 0xb9, 0xa4,
+ 0x03, 0xe8, 0xc3, 0x15, 0xe8, 0x67, 0x00, 0xe8,
+ 0x7d, 0x11, 0xbb, 0x07, 0x7e, 0xe8, 0x65, 0x0c,
+ 0xb9, 0xa4, 0x03, 0xe8, 0xb1, 0x15, 0xe8, 0x55,
+ 0x00, 0xe8, 0x6b, 0x11, 0xbb, 0x1a, 0x7e, 0xe8,
+ 0x53, 0x0c, 0xb9, 0xa4, 0x03, 0xe8, 0x9f, 0x15,
+ 0xe8, 0x43, 0x00, 0xe8, 0x7c, 0x11, 0xbb, 0x2c,
+ 0x7e, 0xe8, 0x41, 0x0c, 0xb9, 0xa5, 0x03, 0xe8,
+ 0x8d, 0x15, 0xe8, 0x31, 0x00, 0xe8, 0x47, 0x11,
+ 0xbb, 0x70, 0x7e, 0xe8, 0x2f, 0x0c, 0xbe, 0xae,
+ 0x00, 0xbf, 0xba, 0x00, 0xc6, 0x06, 0xc3, 0x64,
+ 0x01, 0xe8, 0x87, 0x30, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x53, 0x03, 0xb9, 0xa6, 0x03, 0xe8, 0x66,
+ 0x15, 0xe8, 0x91, 0x96, 0xe8, 0x14, 0x00, 0xb8,
+ 0x64, 0x00, 0xe8, 0x9f, 0x19, 0xc3, 0x2e, 0x80,
+ 0x3e, 0xd7, 0x00, 0x01, 0x75, 0x04, 0x58, 0xe8,
+ 0xd4, 0xa4, 0xc3, 0x06, 0xa1, 0xb3, 0x32, 0x8e,
+ 0xc0, 0xbf, 0x00, 0xfa, 0xb9, 0x80, 0x01, 0x33,
+ 0xc0, 0xfc, 0xf3, 0xab, 0x07, 0xc3, 0x53, 0xe8,
+ 0x63, 0x96, 0xe8, 0x54, 0xfc, 0xa1, 0xb5, 0x32,
+ 0xa3, 0xac, 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00,
+ 0xb9, 0x08, 0x00, 0xba, 0x54, 0x00, 0xe8, 0x77,
+ 0xa9, 0x5b, 0x8b, 0x17, 0x83, 0xc3, 0x02, 0x52,
+ 0x8a, 0x07, 0x32, 0xe4, 0xf7, 0x26, 0xb6, 0x00,
+ 0x8b, 0xf0, 0x53, 0xe8, 0x9b, 0x00, 0x5b, 0x5a,
+ 0x2d, 0x40, 0x01, 0xf7, 0xd8, 0xd1, 0xe8, 0x03,
+ 0xf0, 0x43, 0xe8, 0x25, 0x00, 0x43, 0x80, 0x3f,
+ 0x00, 0x75, 0xdc, 0xe8, 0x2e, 0x96, 0xbb, 0x92,
+ 0x32, 0xb9, 0x90, 0x01, 0xe8, 0xb4, 0xa2, 0xbb,
+ 0x92, 0x32, 0xe8, 0xc1, 0xa2, 0x72, 0x0a, 0xe8,
+ 0x99, 0xa0, 0x72, 0x05, 0xe8, 0x65, 0xa0, 0x73,
+ 0xee, 0xc3, 0x1e, 0x06, 0xb8, 0x00, 0xa0, 0x8e,
+ 0xc0, 0xa1, 0xb5, 0x32, 0x8e, 0xd8, 0xe8, 0x03,
+ 0x00, 0x07, 0x1f, 0xc3, 0x1e, 0xb8, 0x3b, 0x0b,
+ 0x8e, 0xd8, 0x8a, 0x0f, 0x1f, 0x0a, 0xc9, 0x74,
+ 0x47, 0x80, 0xe9, 0x1f, 0xb5, 0x00, 0xbf, 0xfe,
+ 0xff, 0xd1, 0xe1, 0x03, 0xf9, 0x8b, 0x3d, 0x8b,
+ 0x0d, 0x83, 0xc7, 0x02, 0x51, 0x56, 0x51, 0x56,
+ 0x8a, 0x05, 0x0a, 0xc0, 0x74, 0x0d, 0xfe, 0xc8,
+ 0x0a, 0xc0, 0x8a, 0xc2, 0x74, 0x02, 0x8a, 0xc6,
+ 0x26, 0x88, 0x04, 0x47, 0x46, 0xfe, 0xcd, 0x75,
+ 0xe7, 0x5e, 0x59, 0x81, 0xc6, 0x40, 0x01, 0xfe,
+ 0xc9, 0x75, 0xdb, 0x5e, 0x59, 0x8a, 0xc5, 0xb4,
+ 0x00, 0x03, 0xf0, 0x46, 0x46, 0x43, 0xeb, 0xac,
+ 0xc3, 0x33, 0xc0, 0x8a, 0x0f, 0x0a, 0xc9, 0x74,
+ 0x24, 0x42, 0x80, 0xe9, 0x1f, 0xb5, 0x00, 0xbf,
+ 0xfe, 0xff, 0xd1, 0xe1, 0x03, 0xf9, 0x1e, 0x8b,
+ 0x16, 0xb5, 0x32, 0x8e, 0xda, 0x8b, 0x3d, 0x8b,
+ 0x0d, 0x1f, 0x8a, 0xcd, 0xb5, 0x00, 0x03, 0xc1,
+ 0x40, 0x40, 0x43, 0xeb, 0xd6, 0xc3, 0xe8, 0x60,
+ 0xfb, 0xa1, 0xb5, 0x32, 0xa3, 0xac, 0x00, 0x33,
+ 0xc0, 0xa3, 0xaa, 0x00, 0xb9, 0x06, 0x00, 0xba,
+ 0x54, 0x00, 0xe8, 0x83, 0xa8, 0xa1, 0xb3, 0x32,
+ 0xa3, 0xac, 0x00, 0xb8, 0x00, 0xfa, 0xa3, 0xaa,
+ 0x00, 0xb9, 0x05, 0x00, 0xba, 0x54, 0x00, 0xe8,
+ 0x6e, 0xa8, 0x8b, 0x16, 0xb3, 0x32, 0xbe, 0x00,
+ 0xfa, 0xb0, 0x40, 0xe8, 0x14, 0xa0, 0xa1, 0xb3,
+ 0x32, 0xa3, 0xac, 0x00, 0x2e, 0xa3, 0x53, 0x08,
+ 0xb8, 0x00, 0x1e, 0xa3, 0xaa, 0x00, 0xb9, 0x09,
+ 0x00, 0xba, 0x54, 0x00, 0xe8, 0x49, 0xa8, 0x1e,
+ 0x06, 0x8b, 0x2e, 0xb5, 0x32, 0xa1, 0xb1, 0x32,
+ 0x8e, 0xc0, 0x8e, 0xd8, 0xfc, 0xb9, 0x58, 0x02,
+ 0xe8, 0x0f, 0x00, 0x07, 0x1f, 0x8b, 0x16, 0xb3,
+ 0x32, 0xbe, 0x00, 0xfa, 0xb0, 0xc0, 0xe8, 0xd9,
+ 0x9f, 0xc3, 0x2e, 0x80, 0x3e, 0xd7, 0x00, 0x00,
+ 0x75, 0x07, 0x51, 0xe8, 0x04, 0x00, 0x59, 0xe2,
+ 0xf1, 0xc3, 0xb8, 0xa0, 0x00, 0xbf, 0x00, 0x00,
+ 0x03, 0xf8, 0x03, 0xf8, 0x8b, 0xf7, 0x03, 0xf0,
+ 0xb9, 0x90, 0x10, 0xf3, 0xa5, 0x83, 0xc7, 0x00,
+ 0xb9, 0x11, 0x00, 0x51, 0x57, 0xb8, 0x9f, 0x00,
+ 0xe8, 0xe8, 0xa9, 0x03, 0xf8, 0xb8, 0xb9, 0x00,
+ 0xe8, 0xe0, 0xa9, 0x04, 0x05, 0x8a, 0xe0, 0x89,
+ 0x05, 0x5f, 0x59, 0xe2, 0xe6, 0xb9, 0x01, 0x00,
+ 0xbe, 0x01, 0x00, 0x8b, 0xc6, 0xbb, 0xa0, 0x00,
+ 0xf7, 0xe3, 0x8b, 0xf8, 0x03, 0xf9, 0x33, 0xc0,
+ 0x33, 0xdb, 0x8a, 0x9d, 0x5f, 0xff, 0x8a, 0x85,
+ 0x60, 0xff, 0x03, 0xd8, 0x8a, 0x85, 0x61, 0xff,
+ 0x03, 0xd8, 0x8a, 0x45, 0xff, 0x03, 0xd8, 0x8a,
+ 0x45, 0x01, 0x03, 0xd8, 0x8a, 0x85, 0x9f, 0x00,
+ 0x03, 0xd8, 0x8a, 0x85, 0xa0, 0x00, 0x03, 0xd8,
+ 0x8a, 0x85, 0xa1, 0x00, 0x03, 0xd8, 0xc1, 0xeb,
+ 0x03, 0x88, 0x9d, 0x00, 0x23, 0x41, 0x81, 0xf9,
+ 0xa0, 0x00, 0x72, 0xb7, 0xb9, 0x01, 0x00, 0x46,
+ 0x83, 0xfe, 0x38, 0x72, 0xae, 0xbf, 0x00, 0x00,
+ 0xbe, 0x00, 0x23, 0xb9, 0x80, 0x11, 0xf3, 0xa5,
+ 0x06, 0xb8, 0x00, 0xa0, 0x8e, 0xc0, 0x33, 0xdb,
+ 0xbe, 0x00, 0x00, 0xbf, 0xc0, 0x6c, 0xb9, 0x2c,
+ 0x00, 0xb8, 0x40, 0x01, 0xf7, 0xe1, 0x03, 0xf8,
+ 0xd1, 0xe9, 0x8b, 0xd1, 0x83, 0xea, 0x04, 0xb8,
+ 0xa0, 0x00, 0xf7, 0xe2, 0x03, 0xf0, 0xb8, 0x38,
+ 0x00, 0x2b, 0xc1, 0x8b, 0xc8, 0xe8, 0xf0, 0x9e,
+ 0x56, 0xe8, 0x0b, 0x00, 0x5e, 0xe8, 0x07, 0x00,
+ 0xe2, 0xf6, 0xe8, 0x28, 0x00, 0x07, 0xc3, 0xba,
+ 0xa0, 0x00, 0x8a, 0x04, 0x1e, 0x8e, 0xdd, 0x80,
+ 0x3f, 0x01, 0x75, 0x03, 0x26, 0x88, 0x05, 0x43,
+ 0x47, 0x80, 0x3f, 0x01, 0x1f, 0x75, 0x03, 0x26,
+ 0x88, 0x05, 0x43, 0x47, 0x46, 0x4a, 0x75, 0xe2,
+ 0xc3, 0x80, 0x66, 0x00, 0x00, 0x2e, 0x81, 0x2e,
+ 0x51, 0x08, 0x80, 0x02, 0x73, 0x08, 0x2e, 0x81,
+ 0x06, 0x51, 0x08, 0x80, 0x02, 0xc3, 0x2e, 0x8b,
+ 0x36, 0x51, 0x08, 0x1e, 0x2e, 0xa1, 0x53, 0x08,
+ 0x8e, 0xd8, 0x33, 0xff, 0xfc, 0xb9, 0x80, 0x66,
+ 0x2b, 0xce, 0xd1, 0xe9, 0xf3, 0xa5, 0x1f, 0xc3,
+ 0x80, 0x3e, 0x95, 0x60, 0x01, 0x74, 0x0a, 0xe8,
+ 0x32, 0x00, 0x80, 0x3e, 0x95, 0x60, 0x01, 0x75,
+ 0x2a, 0xc6, 0x06, 0x95, 0x60, 0x00, 0xe8, 0xa1,
+ 0x18, 0xe8, 0xf8, 0x06, 0xe8, 0x35, 0x00, 0xe8,
+ 0x05, 0xa0, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xc6,
+ 0x06, 0xda, 0x1c, 0x00, 0xe8, 0xc7, 0x1f, 0xe8,
+ 0x5e, 0x9e, 0xe8, 0x27, 0xa0, 0xc7, 0x06, 0x52,
+ 0x72, 0x00, 0x00, 0xc3, 0x2e, 0xa0, 0xd7, 0x00,
+ 0x3c, 0x3b, 0x72, 0x0a, 0x3c, 0x44, 0x77, 0x06,
+ 0xc6, 0x06, 0x95, 0x60, 0x01, 0xc3, 0xc6, 0x06,
+ 0x95, 0x60, 0x00, 0xc3, 0xc7, 0x06, 0x96, 0x60,
+ 0x00, 0x00, 0xc6, 0x06, 0x98, 0x60, 0x00, 0xbb,
+ 0x99, 0x60, 0xe8, 0x0e, 0x00, 0x72, 0x01, 0xc3,
+ 0xe8, 0x2d, 0x01, 0x80, 0x3e, 0x98, 0x60, 0x01,
+ 0x75, 0xe2, 0xc3, 0x83, 0xeb, 0x05, 0x89, 0x1e,
+ 0x93, 0x60, 0x2e, 0x80, 0x3e, 0xd7, 0x00, 0x01,
+ 0x75, 0x03, 0xe9, 0xb4, 0x00, 0x33, 0xc9, 0x8b,
+ 0x1e, 0x93, 0x60, 0x41, 0x83, 0xc3, 0x05, 0x8a,
+ 0x47, 0x04, 0x3c, 0x03, 0x74, 0xf5, 0x8b, 0x07,
+ 0x0a, 0xc0, 0x75, 0x28, 0x8b, 0x0e, 0x96, 0x60,
+ 0x0b, 0xc9, 0x74, 0xd6, 0x8b, 0x1e, 0x93, 0x60,
+ 0x83, 0xc3, 0x05, 0xe2, 0xfb, 0x8b, 0x07, 0xe8,
+ 0x8f, 0x00, 0x8a, 0x57, 0x02, 0xb6, 0x00, 0xb4,
+ 0xe0, 0xe8, 0x96, 0x00, 0xc7, 0x06, 0x96, 0x60,
+ 0x00, 0x00, 0xeb, 0xb6, 0x53, 0x51, 0xe8, 0x78,
+ 0x00, 0x8a, 0x4f, 0x02, 0xbb, 0x0e, 0x00, 0xe8,
+ 0x24, 0x1b, 0x59, 0x5b, 0x72, 0x02, 0xeb, 0xb3,
+ 0xa1, 0x96, 0x60, 0x3b, 0xc8, 0x74, 0x37, 0x0b,
+ 0xc0, 0x74, 0x1e, 0x53, 0x51, 0x8b, 0xc8, 0x8b,
+ 0x1e, 0x93, 0x60, 0x83, 0xc3, 0x05, 0xe2, 0xfb,
+ 0x8b, 0x07, 0xe8, 0x4c, 0x00, 0x8a, 0x57, 0x02,
+ 0xb6, 0x00, 0xb4, 0xe0, 0xe8, 0x53, 0x00, 0x59,
+ 0x5b, 0x89, 0x0e, 0x96, 0x60, 0x8b, 0x07, 0xe8,
+ 0x37, 0x00, 0x8a, 0x57, 0x02, 0xb6, 0x00, 0xb4,
+ 0xd1, 0x56, 0xe8, 0x3d, 0x00, 0x5e, 0xe8, 0x3a,
+ 0x9d, 0x72, 0x08, 0xe8, 0x06, 0x9d, 0x72, 0x03,
+ 0xe9, 0x57, 0xff, 0x8b, 0x0e, 0x96, 0x60, 0x8b,
+ 0x1e, 0x93, 0x60, 0x83, 0xc3, 0x05, 0xe2, 0xfb,
+ 0x8b, 0x47, 0x03, 0x3c, 0x0a, 0x74, 0x02, 0xf9,
+ 0xc3, 0xc7, 0x06, 0x96, 0x60, 0x00, 0x00, 0xf8,
+ 0xc3, 0x8a, 0xc8, 0xb5, 0x00, 0x8a, 0xc4, 0xb4,
+ 0x00, 0xf7, 0x26, 0xb6, 0x00, 0x03, 0xc1, 0x8b,
+ 0xf0, 0xc3, 0x06, 0x8b, 0x0e, 0xb1, 0x32, 0x8e,
+ 0xc1, 0x50, 0x56, 0xe8, 0x0f, 0x00, 0x5e, 0x58,
+ 0xb9, 0x00, 0xa0, 0x8e, 0xc1, 0xe8, 0x05, 0x00,
+ 0xe8, 0xec, 0x9b, 0x07, 0xc3, 0x8b, 0xca, 0x26,
+ 0x88, 0x24, 0x46, 0xe2, 0xfa, 0x81, 0xc6, 0x40,
+ 0x01, 0x2b, 0xf2, 0xb9, 0x0c, 0x00, 0x26, 0x88,
+ 0x24, 0x03, 0xf2, 0x26, 0x88, 0x64, 0xff, 0x2b,
+ 0xf2, 0x81, 0xc6, 0x40, 0x01, 0xe2, 0xef, 0x8b,
+ 0xca, 0x26, 0x88, 0x24, 0x46, 0xe2, 0xfa, 0xc3,
+ 0xbb, 0x94, 0x60, 0x83, 0xc3, 0x05, 0x3a, 0x47,
+ 0x03, 0x75, 0xf8, 0x80, 0x7f, 0x04, 0x03, 0x74,
+ 0x06, 0x80, 0x7f, 0x04, 0x00, 0x75, 0xec, 0x50,
+ 0x8b, 0x07, 0xe8, 0x8c, 0xff, 0x58, 0xb9, 0x0e,
+ 0x00, 0x8a, 0x57, 0x02, 0xb6, 0x00, 0x3c, 0x01,
+ 0x75, 0x04, 0xe8, 0xb9, 0x01, 0xc3, 0x3c, 0x02,
+ 0x75, 0x04, 0xe8, 0x8f, 0x02, 0xc3, 0x3c, 0x03,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xa8, 0x64, 0x3c, 0x0a, 0x74, 0x17, 0xfe, 0x06,
+ 0xa8, 0x64, 0xeb, 0x0b, 0xa0, 0xa8, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xa8, 0x64, 0xe8,
+ 0xa4, 0x05, 0xe8, 0xdc, 0x00, 0xc3, 0x3c, 0x04,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xa9, 0x64, 0x3c, 0x0a, 0x74, 0x17, 0xfe, 0x06,
+ 0xa9, 0x64, 0xeb, 0x0b, 0xa0, 0xa9, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xa9, 0x64, 0xe8,
+ 0x9e, 0x05, 0xe8, 0xc8, 0x00, 0xc3, 0x3c, 0x05,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xaa, 0x64, 0x3c, 0x03, 0x74, 0x17, 0xfe, 0x06,
+ 0xaa, 0x64, 0xeb, 0x0b, 0xa0, 0xaa, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xaa, 0x64, 0xe8,
+ 0x98, 0x05, 0xe8, 0xc9, 0x00, 0xc3, 0x3c, 0x06,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xab, 0x64, 0x3c, 0x03, 0x74, 0x17, 0xfe, 0x06,
+ 0xab, 0x64, 0xeb, 0x0b, 0xa0, 0xab, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xab, 0x64, 0xe8,
+ 0x92, 0x05, 0xe8, 0xd2, 0x00, 0xc3, 0x3c, 0x07,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xac, 0x64, 0x3c, 0x04, 0x74, 0x17, 0xfe, 0x06,
+ 0xac, 0x64, 0xeb, 0x0b, 0xa0, 0xac, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xac, 0x64, 0xe8,
+ 0x8c, 0x05, 0xe8, 0x86, 0x00, 0xc3, 0x3c, 0x08,
+ 0x75, 0x24, 0x80, 0xfc, 0x01, 0x75, 0x0d, 0xa0,
+ 0xad, 0x64, 0x3c, 0x01, 0x74, 0x17, 0xfe, 0x06,
+ 0xad, 0x64, 0xeb, 0x0b, 0xa0, 0xad, 0x64, 0x0a,
+ 0xc0, 0x74, 0x0a, 0xfe, 0x0e, 0xad, 0x64, 0xe8,
+ 0x86, 0x05, 0xe8, 0xa0, 0x00, 0xc3, 0x3c, 0x0b,
+ 0x75, 0x04, 0xe8, 0x9c, 0x03, 0xc3, 0x3c, 0x0d,
+ 0x75, 0x02, 0xc3, 0xc3, 0xb0, 0x3c, 0xe9, 0x17,
+ 0xa8, 0xa0, 0xa8, 0x64, 0x0a, 0xc0, 0x75, 0x06,
+ 0xc6, 0x06, 0x48, 0x32, 0x00, 0xc3, 0xe8, 0x22,
+ 0x00, 0xa2, 0x48, 0x32, 0xc3, 0xa0, 0xa9, 0x64,
+ 0x0a, 0xc0, 0x75, 0x0b, 0xc6, 0x06, 0x49, 0x32,
+ 0x00, 0xc6, 0x06, 0x47, 0x32, 0x00, 0xc3, 0xc6,
+ 0x06, 0x47, 0x32, 0x01, 0xe8, 0x04, 0x00, 0xa2,
+ 0x49, 0x32, 0xc3, 0x8a, 0xc8, 0xb5, 0x00, 0xb0,
+ 0x04, 0x04, 0x06, 0xe2, 0xfc, 0xc3, 0xb0, 0x03,
+ 0x2a, 0x06, 0xaa, 0x64, 0xc0, 0xe0, 0x02, 0xa2,
+ 0x8e, 0x32, 0xc3, 0xa0, 0xac, 0x64, 0x0a, 0xc0,
+ 0x74, 0x19, 0x8a, 0xe0, 0xb0, 0x64, 0x80, 0xfc,
+ 0x01, 0x74, 0x10, 0xb0, 0x32, 0x80, 0xfc, 0x02,
+ 0x74, 0x09, 0xb0, 0x14, 0x80, 0xfc, 0x03, 0x74,
+ 0x02, 0xb0, 0x01, 0xa2, 0x96, 0x32, 0xc3, 0x8a,
+ 0x26, 0xab, 0x64, 0xb0, 0x10, 0x0a, 0xe4, 0x74,
+ 0x10, 0xb0, 0x0b, 0x80, 0xfc, 0x01, 0x74, 0x09,
+ 0xb0, 0x05, 0x80, 0xfc, 0x02, 0x74, 0x02, 0xb0,
+ 0x01, 0xa2, 0x90, 0x32, 0xc3, 0x80, 0x3e, 0xad,
+ 0x64, 0x01, 0x75, 0x0e, 0x8b, 0x16, 0xb3, 0x32,
+ 0xbe, 0x00, 0xfa, 0xb0, 0x40, 0xe8, 0x32, 0x9b,
+ 0xeb, 0x03, 0xe8, 0xcc, 0xa0, 0xc6, 0x06, 0x08,
+ 0x66, 0x00, 0xe8, 0xdc, 0x9b, 0xc3, 0xc7, 0x06,
+ 0x96, 0x60, 0x00, 0x00, 0xe8, 0x23, 0x02, 0xbb,
+ 0x32, 0x64, 0xe8, 0xe6, 0xfc, 0x72, 0x0a, 0xc7,
+ 0x06, 0x96, 0x60, 0x00, 0x00, 0xe8, 0x7c, 0x03,
+ 0xc3, 0x8b, 0x0e, 0x96, 0x60, 0x49, 0xe8, 0xa5,
+ 0x02, 0x0b, 0xc9, 0x74, 0xd9, 0xb8, 0xa6, 0x64,
+ 0x8b, 0xd8, 0x8b, 0x1f, 0x3b, 0xc3, 0x75, 0x1e,
+ 0xbb, 0xa4, 0x64, 0x8b, 0x07, 0xbb, 0xaf, 0xb3,
+ 0x81, 0xeb, 0x00, 0x00, 0x3b, 0xc3, 0x75, 0x0e,
+ 0xb8, 0xf2, 0xdb, 0xbb, 0x78, 0x64, 0x2b, 0xc3,
+ 0x3b, 0xc1, 0x75, 0x02, 0xeb, 0x35, 0xb8, 0xa6,
+ 0x64, 0xa3, 0xa6, 0x64, 0xb8, 0xaf, 0xb3, 0xa3,
+ 0xa4, 0x64, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0,
+ 0xbe, 0x79, 0x51, 0xb0, 0xdb, 0xb4, 0x00, 0xb9,
+ 0x46, 0x00, 0xba, 0xce, 0x00, 0xe8, 0x07, 0x05,
+ 0xbb, 0xc3, 0x62, 0xbe, 0xbb, 0x62, 0xe8, 0x9f,
+ 0x04, 0xe8, 0x60, 0x9c, 0x07, 0xe8, 0x82, 0x9a,
+ 0xe9, 0x7b, 0xff, 0x89, 0x1e, 0xaa, 0x00, 0x8c,
+ 0x1e, 0xac, 0x00, 0xba, 0x95, 0x00, 0xe8, 0x56,
+ 0xa3, 0x58, 0x81, 0xfc, 0x00, 0x02, 0x72, 0xf9,
+ 0xe8, 0xb6, 0xfe, 0xe8, 0xc7, 0xfe, 0xe8, 0xed,
+ 0xfe, 0xe8, 0xf7, 0xfe, 0xe8, 0x18, 0xff, 0xe8,
+ 0x33, 0xff, 0x8b, 0x0e, 0x90, 0xdb, 0xe8, 0x9a,
+ 0xa4, 0x83, 0x3e, 0xf3, 0xb4, 0x18, 0x75, 0x0b,
+ 0xe8, 0xe0, 0x4c, 0xc6, 0x06, 0xdc, 0x1c, 0x02,
+ 0xe9, 0xb6, 0xf4, 0xa1, 0xaf, 0x64, 0x8b, 0x1e,
+ 0xb1, 0x64, 0x8b, 0xf8, 0x8b, 0xf3, 0x8a, 0x0e,
+ 0x07, 0x66, 0x8a, 0x2e, 0xc3, 0x64, 0xe8, 0x0a,
+ 0x9f, 0xe9, 0x9d, 0xf4, 0xc7, 0x06, 0x96, 0x60,
+ 0x00, 0x00, 0xe8, 0x45, 0x01, 0xbb, 0x32, 0x64,
+ 0xe8, 0x08, 0xfc, 0x72, 0x0a, 0xc7, 0x06, 0x96,
+ 0x60, 0x00, 0x00, 0xe8, 0x9e, 0x02, 0xc3, 0x56,
+ 0xe8, 0xe2, 0x98, 0x5e, 0xe8, 0x38, 0x00, 0x73,
+ 0x29, 0xba, 0x95, 0x00, 0x8b, 0xda, 0xa1, 0x96,
+ 0x60, 0x48, 0x04, 0x30, 0x88, 0x47, 0x07, 0xb8,
+ 0x78, 0x64, 0xb9, 0xf2, 0xdb, 0x2b, 0xc8, 0xa3,
+ 0xaa, 0x00, 0x8c, 0x1e, 0xac, 0x00, 0xe8, 0x6d,
+ 0xa3, 0xc6, 0x06, 0x98, 0x60, 0x01, 0xe8, 0xd6,
+ 0x98, 0xc3, 0xc7, 0x06, 0x96, 0x60, 0x00, 0x00,
+ 0xe8, 0x61, 0x02, 0xe8, 0xc9, 0x98, 0xc3, 0x81,
+ 0xc6, 0x85, 0x02, 0x8b, 0x0e, 0x96, 0x60, 0x49,
+ 0x56, 0xc7, 0x06, 0xa6, 0x00, 0x18, 0x00, 0xe8,
+ 0x30, 0x01, 0x5e, 0xbb, 0x78, 0x64, 0x80, 0x3f,
+ 0x28, 0x74, 0x0b, 0x33, 0xc9, 0x41, 0x43, 0x80,
+ 0x3f, 0x00, 0x75, 0xf9, 0xeb, 0x08, 0xbb, 0x78,
+ 0x64, 0xc6, 0x07, 0x00, 0x33, 0xc9, 0xe8, 0x48,
+ 0x00, 0x33, 0xc0, 0x2e, 0xa0, 0xd7, 0x00, 0x3a,
+ 0xc4, 0x8a, 0xe0, 0x74, 0xf6, 0x3c, 0x80, 0x73,
+ 0xf2, 0x3c, 0x1c, 0x74, 0x1c, 0x3c, 0x01, 0x74,
+ 0x14, 0x3c, 0x0e, 0x74, 0x1a, 0x83, 0xf9, 0x16,
+ 0x73, 0xe1, 0xe8, 0x61, 0x00, 0x73, 0xdc, 0x41,
+ 0xe8, 0x1e, 0x00, 0xeb, 0xd6, 0x33, 0xc9, 0xf8,
+ 0xc3, 0x0b, 0xc9, 0x74, 0xce, 0xf9, 0xc3, 0x0b,
+ 0xc9, 0x74, 0xc8, 0x49, 0xbb, 0x78, 0x64, 0x03,
+ 0xd9, 0xc6, 0x07, 0x00, 0xe8, 0x02, 0x00, 0xeb,
+ 0xba, 0x50, 0x51, 0x06, 0xb8, 0x00, 0xa0, 0x8e,
+ 0xc0, 0x56, 0xe8, 0x13, 0x00, 0x5e, 0x56, 0xbb,
+ 0x78, 0x64, 0xe8, 0x90, 0x96, 0xbb, 0x90, 0x64,
+ 0xe8, 0x8a, 0x96, 0x5e, 0x07, 0x59, 0x58, 0xc3,
+ 0xbb, 0x78, 0x64, 0xe8, 0xd2, 0x96, 0x03, 0xf0,
+ 0xb9, 0x0b, 0x00, 0x51, 0xb9, 0x14, 0x00, 0x26,
+ 0xc6, 0x04, 0xe8, 0x46, 0xe2, 0xf9, 0x59, 0x81,
+ 0xc6, 0x2c, 0x01, 0xe2, 0xee, 0xc3, 0xbb, 0x3f,
+ 0x60, 0x3a, 0x07, 0x74, 0x0b, 0x83, 0xc3, 0x02,
+ 0x81, 0xfb, 0x93, 0x60, 0x72, 0xf3, 0xf8, 0xc3,
+ 0x50, 0x53, 0x51, 0x06, 0x56, 0xb8, 0x00, 0xa0,
+ 0x8e, 0xc0, 0xe8, 0xc3, 0xff, 0x5e, 0x56, 0xbb,
+ 0x78, 0x64, 0xe8, 0x40, 0x96, 0x5e, 0x07, 0x59,
+ 0x5b, 0x58, 0x8a, 0x5f, 0x01, 0xbf, 0x78, 0x64,
+ 0x03, 0xf9, 0x88, 0x1d, 0xc6, 0x45, 0x01, 0x00,
+ 0xf9, 0xc3, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0,
+ 0xe8, 0xb7, 0x02, 0xbb, 0x70, 0x64, 0xbe, 0x6e,
+ 0x64, 0xe8, 0xdc, 0x02, 0xe8, 0x0b, 0x00, 0xbb,
+ 0x32, 0x64, 0xe8, 0xb6, 0x02, 0xe8, 0x94, 0x9a,
+ 0x07, 0xc3, 0x33, 0xc9, 0x51, 0xc7, 0x06, 0xa6,
+ 0x00, 0x18, 0x00, 0xe8, 0x24, 0x00, 0x59, 0x51,
+ 0xbe, 0x3b, 0x0f, 0x8b, 0xc1, 0xb9, 0x0f, 0x00,
+ 0xf7, 0xe1, 0xf7, 0x26, 0xb6, 0x00, 0x03, 0xf0,
+ 0x81, 0xc6, 0x85, 0x02, 0xbb, 0x78, 0x64, 0xe8,
+ 0xe3, 0x95, 0x59, 0x41, 0x83, 0xf9, 0x0a, 0x72,
+ 0xd3, 0xc3, 0xba, 0x95, 0x00, 0x8b, 0xda, 0x8a,
+ 0xc1, 0x04, 0x30, 0x88, 0x47, 0x07, 0xb8, 0x00,
+ 0x3d, 0xb1, 0x00, 0xcd, 0x21, 0x72, 0x1c, 0x8b,
+ 0xd8, 0xb4, 0x3e, 0xcd, 0x21, 0x72, 0x2c, 0x8c,
+ 0x1e, 0xac, 0x00, 0xb8, 0x78, 0x64, 0xa3, 0xaa,
+ 0x00, 0xc7, 0x06, 0xa8, 0x00, 0x00, 0x00, 0xe8,
+ 0x9d, 0xa1, 0xc3, 0x3d, 0x02, 0x00, 0x75, 0x13,
+ 0xbb, 0x78, 0x64, 0xc6, 0x07, 0x28, 0xc6, 0x47,
+ 0x01, 0x2d, 0xc6, 0x47, 0x02, 0x29, 0xc6, 0x47,
+ 0x03, 0x00, 0xc3, 0xe9, 0xa2, 0xa4, 0xb8, 0x2f,
+ 0x00, 0xa3, 0xa6, 0x00, 0xe8, 0xab, 0xff, 0xbb,
+ 0x78, 0x64, 0x80, 0x3f, 0x28, 0x75, 0x03, 0x33,
+ 0xc9, 0xc3, 0xba, 0x95, 0x00, 0xe8, 0x48, 0xa0,
+ 0xc3, 0xe8, 0xf9, 0x96, 0xe8, 0x1e, 0x12, 0xe8,
+ 0x15, 0x97, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0,
+ 0xbe, 0x26, 0x54, 0xb0, 0xe8, 0xb4, 0x00, 0xb9,
+ 0x42, 0x00, 0xba, 0x74, 0x00, 0xe8, 0x77, 0x02,
+ 0xbb, 0x27, 0x62, 0xbe, 0x21, 0x62, 0xe8, 0x0f,
+ 0x02, 0xe8, 0xd0, 0x99, 0x07, 0x2e, 0x8a, 0x26,
+ 0xd7, 0x00, 0xe8, 0x8f, 0x97, 0x72, 0x1c, 0xe8,
+ 0xb9, 0x97, 0x72, 0x17, 0x2e, 0xa0, 0xd7, 0x00,
+ 0x3c, 0x80, 0x73, 0xee, 0x0a, 0xc0, 0x74, 0xea,
+ 0x3a, 0xc4, 0x74, 0xe6, 0x3c, 0x15, 0x75, 0x03,
+ 0xe9, 0x74, 0xf2, 0xc7, 0x06, 0x96, 0x60, 0x00,
+ 0x00, 0xe8, 0xa1, 0x96, 0xe8, 0xfb, 0x11, 0xe8,
+ 0xbd, 0x96, 0xe8, 0x4f, 0x00, 0xc3, 0xe8, 0x94,
+ 0x96, 0xe8, 0xb9, 0x11, 0xe8, 0xb0, 0x96, 0x06,
+ 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0xbe, 0x6d, 0x51,
+ 0xb0, 0xe8, 0xb4, 0x00, 0xb9, 0x46, 0x00, 0xba,
+ 0xe6, 0x00, 0xe8, 0x12, 0x02, 0xbb, 0x52, 0x62,
+ 0xbe, 0x4a, 0x62, 0xe8, 0xaa, 0x01, 0xe8, 0x6b,
+ 0x99, 0x07, 0x2e, 0x8a, 0x26, 0xd7, 0x00, 0xe8,
+ 0x2a, 0x97, 0x72, 0x05, 0xe8, 0x54, 0x97, 0x73,
+ 0xf6, 0xc7, 0x06, 0x96, 0x60, 0x00, 0x00, 0xe8,
+ 0x53, 0x96, 0xe8, 0xad, 0x11, 0xe8, 0x6f, 0x96,
+ 0xe8, 0x01, 0x00, 0xc3, 0xc6, 0x06, 0xe6, 0x1c,
+ 0xd1, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0xe8,
+ 0x48, 0x01, 0xbb, 0x29, 0x61, 0xbe, 0x11, 0x61,
+ 0xe8, 0x6d, 0x01, 0xbb, 0x99, 0x60, 0xe8, 0x4a,
+ 0x01, 0xe8, 0x14, 0x00, 0xe8, 0x1e, 0x00, 0xe8,
+ 0x28, 0x00, 0xe8, 0x32, 0x00, 0xe8, 0x3c, 0x00,
+ 0xe8, 0x46, 0x00, 0xe8, 0x16, 0x99, 0x07, 0xc3,
+ 0xb0, 0x06, 0xbb, 0x29, 0x63, 0x8a, 0x0e, 0xa8,
+ 0x64, 0xe8, 0x54, 0x01, 0xc3, 0xb0, 0x06, 0xbb,
+ 0x6b, 0x63, 0x8a, 0x0e, 0xa9, 0x64, 0xe8, 0x47,
+ 0x01, 0xc3, 0xb0, 0x09, 0xbb, 0xad, 0x63, 0x8a,
+ 0x0e, 0xaa, 0x64, 0xe8, 0x3a, 0x01, 0xc3, 0xb0,
+ 0x09, 0xbb, 0xd1, 0x63, 0x8a, 0x0e, 0xab, 0x64,
+ 0xe8, 0x2d, 0x01, 0xc3, 0xb0, 0x09, 0xbb, 0xf5,
+ 0x63, 0x8a, 0x0e, 0xac, 0x64, 0xe8, 0x20, 0x01,
+ 0xc3, 0xb0, 0x08, 0xbb, 0x22, 0x64, 0x8a, 0x0e,
+ 0xad, 0x64, 0xe8, 0x13, 0x01, 0xc3, 0x06, 0xa1,
+ 0xb1, 0x32, 0x8e, 0xc0, 0x51, 0x52, 0x56, 0xe8,
+ 0xc0, 0x00, 0xe8, 0xa3, 0xff, 0xb8, 0x00, 0xa0,
+ 0x8e, 0xc0, 0x5e, 0x5a, 0x59, 0xe8, 0xb2, 0x00,
+ 0xe8, 0x95, 0xff, 0x07, 0xe8, 0xa0, 0x95, 0xc3,
+ 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0x51, 0x52,
+ 0x56, 0xe8, 0x9e, 0x00, 0xe8, 0x8e, 0xff, 0xb8,
+ 0x00, 0xa0, 0x8e, 0xc0, 0x5e, 0x5a, 0x59, 0xe8,
+ 0x90, 0x00, 0xe8, 0x80, 0xff, 0x07, 0xe8, 0x7e,
+ 0x95, 0xc3, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0,
+ 0x51, 0x52, 0x56, 0xe8, 0x7c, 0x00, 0xe8, 0x79,
+ 0xff, 0xb8, 0x00, 0xa0, 0x8e, 0xc0, 0x5e, 0x5a,
+ 0x59, 0xe8, 0x6e, 0x00, 0xe8, 0x6b, 0xff, 0x07,
+ 0xe8, 0x5c, 0x95, 0xc3, 0x06, 0xa1, 0xb1, 0x32,
+ 0x8e, 0xc0, 0x51, 0x52, 0x56, 0xe8, 0x5a, 0x00,
+ 0xe8, 0x64, 0xff, 0xb8, 0x00, 0xa0, 0x8e, 0xc0,
+ 0x5e, 0x5a, 0x59, 0xe8, 0x4c, 0x00, 0xe8, 0x56,
+ 0xff, 0x07, 0xe8, 0x3a, 0x95, 0xc3, 0x06, 0xa1,
+ 0xb1, 0x32, 0x8e, 0xc0, 0x51, 0x52, 0x56, 0xe8,
+ 0x38, 0x00, 0xe8, 0x4f, 0xff, 0xb8, 0x00, 0xa0,
+ 0x8e, 0xc0, 0x5e, 0x5a, 0x59, 0xe8, 0x2a, 0x00,
+ 0xe8, 0x41, 0xff, 0x07, 0xe8, 0x18, 0x95, 0xc3,
+ 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0x51, 0x52,
+ 0x56, 0xe8, 0x16, 0x00, 0xe8, 0x3a, 0xff, 0xb8,
+ 0x00, 0xa0, 0x8e, 0xc0, 0x5e, 0x5a, 0x59, 0xe8,
+ 0x08, 0x00, 0xe8, 0x2c, 0xff, 0x07, 0xe8, 0xf6,
+ 0x94, 0xc3, 0xb0, 0xe8, 0xb4, 0xe0, 0xe8, 0x8e,
+ 0x00, 0xc3, 0xbe, 0x32, 0x05, 0xb0, 0xe8, 0xb4,
+ 0x00, 0xb9, 0xc0, 0x00, 0xba, 0xdc, 0x00, 0xe8,
+ 0x7d, 0x00, 0xc3, 0x53, 0x8b, 0x07, 0xe8, 0xc0,
+ 0xf8, 0xb9, 0x0e, 0x00, 0x8a, 0x57, 0x02, 0xb6,
+ 0x00, 0xb4, 0xe0, 0xe8, 0x38, 0x00, 0x5b, 0x83,
+ 0xc3, 0x05, 0x80, 0x3f, 0x00, 0x75, 0xe4, 0xc3,
+ 0x56, 0x8b, 0x34, 0xe8, 0x37, 0x93, 0x5e, 0x43,
+ 0x46, 0x46, 0x80, 0x3f, 0x00, 0x75, 0xf1, 0xc3,
+ 0xb4, 0x00, 0xb5, 0x00, 0x2b, 0xd8, 0x41, 0x03,
+ 0xd8, 0xe2, 0xfc, 0x8a, 0x47, 0x01, 0xf7, 0x26,
+ 0xb6, 0x00, 0x8a, 0x0f, 0x03, 0xc1, 0x8b, 0xf0,
+ 0x43, 0x43, 0xe8, 0x10, 0x93, 0xc3, 0x8b, 0xda,
+ 0x26, 0x88, 0x24, 0x46, 0x4a, 0x75, 0xf9, 0x81,
+ 0xc6, 0x40, 0x01, 0x2b, 0xf3, 0x83, 0xe9, 0x02,
+ 0x8b, 0xd3, 0x26, 0x88, 0x24, 0x46, 0x83, 0xea,
+ 0x02, 0x03, 0xf2, 0x26, 0x88, 0x24, 0x46, 0x81,
+ 0xc6, 0x40, 0x01, 0x2b, 0xf3, 0xe2, 0xe9, 0x26,
+ 0x88, 0x24, 0x46, 0x4b, 0x75, 0xf9, 0xc3, 0x8b,
+ 0xda, 0x26, 0x88, 0x24, 0x46, 0x4a, 0x75, 0xf9,
+ 0x81, 0xc6, 0x40, 0x01, 0x2b, 0xf3, 0x83, 0xe9,
+ 0x02, 0x8b, 0xd3, 0x26, 0x88, 0x24, 0x46, 0x83,
+ 0xea, 0x02, 0x26, 0x88, 0x04, 0x46, 0x4a, 0x75,
+ 0xf9, 0x26, 0x88, 0x24, 0x46, 0x81, 0xc6, 0x40,
+ 0x01, 0x2b, 0xf3, 0xe2, 0xe4, 0x26, 0x88, 0x24,
+ 0x46, 0x4b, 0x75, 0xf9, 0xc3, 0x8b, 0x07, 0x0b,
+ 0xc0, 0x74, 0x0d, 0x83, 0x7f, 0x02, 0xff, 0x74,
+ 0x04, 0xc7, 0x07, 0x00, 0x00, 0x8b, 0xd8, 0xc3,
+ 0x83, 0xc3, 0x02, 0xeb, 0xe8, 0xe8, 0xed, 0x00,
+ 0xbb, 0xf2, 0xdb, 0x80, 0x3f, 0x00, 0x74, 0x2f,
+ 0x83, 0xeb, 0x02, 0x83, 0xc3, 0x02, 0x53, 0x80,
+ 0x3f, 0xff, 0x75, 0x05, 0x53, 0xe8, 0x75, 0x0d,
+ 0x5b, 0xe8, 0x71, 0x8e, 0x5b, 0x2e, 0x80, 0x3e,
+ 0xd7, 0x00, 0x01, 0x74, 0x09, 0xe8, 0xad, 0x00,
+ 0x80, 0x7f, 0x03, 0x00, 0x75, 0x03, 0xe9, 0xa0,
+ 0x00, 0x80, 0x7f, 0x02, 0x00, 0x75, 0xd4, 0x53,
+ 0x8a, 0x26, 0x96, 0xda, 0xa0, 0x97, 0xda, 0xe8,
+ 0x04, 0x0d, 0xe8, 0x4f, 0x98, 0xa0, 0x96, 0xda,
+ 0x8b, 0x0e, 0x98, 0xda, 0x8b, 0x16, 0x9a, 0xda,
+ 0xe8, 0xd3, 0x00, 0x5b, 0x43, 0xe8, 0x4d, 0x0d,
+ 0x83, 0xc3, 0x02, 0x53, 0xa0, 0x96, 0xda, 0x8b,
+ 0x0e, 0x9c, 0xda, 0x8b, 0x16, 0x9e, 0xda, 0x80,
+ 0x3f, 0xff, 0x75, 0x03, 0xe8, 0x74, 0x00, 0xe8,
+ 0xb7, 0x01, 0x5b, 0x2e, 0x80, 0x3e, 0xd7, 0x00,
+ 0x01, 0x74, 0x3b, 0xe8, 0x57, 0x00, 0x80, 0x7f,
+ 0x02, 0x00, 0x75, 0xd4, 0x80, 0x7f, 0x03, 0x00,
+ 0x74, 0x2c, 0xe8, 0x18, 0x0d, 0x43, 0x83, 0xc3,
+ 0x02, 0x53, 0x80, 0x3f, 0xff, 0x75, 0x03, 0xe8,
+ 0x49, 0x00, 0xe8, 0x16, 0x8f, 0x5b, 0x2e, 0x80,
+ 0x3e, 0xd7, 0x00, 0x01, 0x74, 0x10, 0xe8, 0x2c,
+ 0x00, 0x80, 0x7f, 0x02, 0x00, 0x75, 0xdf, 0x43,
+ 0x80, 0x7f, 0x02, 0x00, 0x75, 0x9f, 0xa0, 0x96,
+ 0xda, 0x8b, 0x0e, 0xa0, 0xda, 0x8b, 0x16, 0xa2,
+ 0xda, 0xe8, 0x62, 0x00, 0xe8, 0x0f, 0x98, 0xc6,
+ 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xe8, 0x50, 0x98, 0xc3, 0x4b, 0x43, 0x80,
+ 0x3f, 0x00, 0x75, 0xfa, 0x80, 0x7f, 0x01, 0x00,
+ 0x75, 0xf4, 0xc3, 0x60, 0xb8, 0x5a, 0x00, 0xe8,
+ 0xaa, 0x0c, 0x61, 0x43, 0xc3, 0x06, 0xb8, 0x69,
+ 0x1c, 0x8e, 0xc0, 0xbe, 0xf2, 0xdb, 0x33, 0xc9,
+ 0x26, 0x8a, 0x07, 0x8a, 0xe0, 0x26, 0x0a, 0x67,
+ 0x01, 0x26, 0x0a, 0x67, 0x02, 0x26, 0x0a, 0x67,
+ 0x03, 0x74, 0x12, 0x88, 0x04, 0x41, 0x81, 0xf9,
+ 0xcc, 0x07, 0x72, 0x05, 0xb0, 0x39, 0xe9, 0x87,
+ 0xa0, 0x43, 0x46, 0xeb, 0xdb, 0x33, 0xc0, 0x89,
+ 0x04, 0x89, 0x44, 0x02, 0x07, 0xc3, 0xe8, 0x0e,
+ 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x7d,
+ 0x15, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xc3, 0xbf,
+ 0xc7, 0x32, 0xb3, 0x1b, 0x48, 0xf6, 0xe3, 0x03,
+ 0xf8, 0x89, 0x0d, 0xc6, 0x06, 0x34, 0x33, 0x00,
+ 0x52, 0x57, 0xe8, 0x9e, 0x96, 0x5f, 0x5a, 0x52,
+ 0x57, 0xe8, 0x69, 0x18, 0x5f, 0x57, 0xa1, 0x7a,
+ 0x32, 0x0b, 0xc0, 0x74, 0x1f, 0x40, 0x3b, 0x05,
+ 0x75, 0x1a, 0xe8, 0x48, 0x96, 0xa0, 0x49, 0x32,
+ 0xb4, 0x04, 0x8a, 0x2e, 0x7c, 0x32, 0x06, 0xff,
+ 0x1e, 0x4a, 0x32, 0x07, 0xb8, 0x3b, 0x0b, 0x8e,
+ 0xd8, 0xe8, 0x6f, 0x96, 0x5f, 0x5a, 0x39, 0x15,
+ 0x76, 0xcd, 0xc6, 0x06, 0x34, 0x33, 0x01, 0xc7,
+ 0x06, 0x7a, 0x32, 0x00, 0x00, 0xc3, 0x60, 0xe8,
+ 0xa5, 0x92, 0x61, 0xbf, 0xc7, 0x32, 0xb3, 0x1b,
+ 0x48, 0xf6, 0xe3, 0x03, 0xf8, 0x89, 0x0d, 0xc6,
+ 0x06, 0x34, 0x33, 0x00, 0x52, 0x57, 0xe8, 0x42,
+ 0x96, 0x5f, 0x5a, 0x52, 0x57, 0xe8, 0x08, 0xf5,
+ 0xe8, 0xa4, 0x0c, 0xe8, 0x07, 0x18, 0xe8, 0x25,
+ 0x15, 0x5f, 0x57, 0xa1, 0x7a, 0x32, 0x0b, 0xc0,
+ 0x74, 0x1f, 0x40, 0x3b, 0x05, 0x75, 0x1a, 0xe8,
+ 0xe3, 0x95, 0xa0, 0x49, 0x32, 0xb4, 0x04, 0x8a,
+ 0x2e, 0x7c, 0x32, 0x06, 0xff, 0x1e, 0x4a, 0x32,
+ 0x07, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8, 0xe8, 0x0a,
+ 0x96, 0x5f, 0x5a, 0x33, 0xc0, 0x80, 0x3e, 0xe1,
+ 0xc3, 0x00, 0x75, 0x1f, 0x8b, 0x05, 0xe8, 0x1a,
+ 0x93, 0xc6, 0x06, 0xcf, 0x00, 0x04, 0x72, 0x13,
+ 0xe8, 0xe1, 0x92, 0xc6, 0x06, 0xcf, 0x00, 0x02,
+ 0x72, 0x09, 0x33, 0xc0, 0xa2, 0xcf, 0x00, 0x39,
+ 0x15, 0x76, 0xa0, 0x50, 0xc6, 0x06, 0x34, 0x33,
+ 0x01, 0xc7, 0x06, 0x7a, 0x32, 0x00, 0x00, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x8f, 0x14, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0xe8, 0xee, 0x91, 0x58,
+ 0xc3, 0x53, 0xbf, 0xc7, 0x32, 0xb3, 0x1b, 0x48,
+ 0xf6, 0xe3, 0x03, 0xf8, 0x89, 0x0d, 0x5b, 0x51,
+ 0x52, 0x57, 0xe8, 0xc6, 0x8d, 0x5f, 0x5a, 0x59,
+ 0x51, 0x52, 0x57, 0xe8, 0x77, 0x17, 0x2e, 0x80,
+ 0x3e, 0xd7, 0x00, 0x01, 0x74, 0x24, 0x80, 0x3e,
+ 0x96, 0x32, 0x00, 0x74, 0x08, 0xbb, 0x92, 0x32,
+ 0xe8, 0xd3, 0x94, 0x72, 0x15, 0xe8, 0xab, 0x92,
+ 0x72, 0x10, 0xe8, 0x77, 0x92, 0x72, 0x0b, 0x5f,
+ 0x5a, 0x59, 0x39, 0x15, 0x76, 0xd2, 0x89, 0x0d,
+ 0xeb, 0xce, 0x5f, 0x5a, 0x59, 0xa1, 0xa4, 0xda,
+ 0x89, 0x05, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xc6, 0x06, 0xdb, 0x1c,
+ 0x01, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x1d,
+ 0x14, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06,
+ 0xdc, 0x1c, 0x03, 0xc6, 0x06, 0xdd, 0x1c, 0x03,
+ 0xc6, 0x06, 0xdb, 0x1c, 0x00, 0xc3, 0x50, 0x57,
+ 0x56, 0xe8, 0x41, 0xfe, 0x5e, 0x5f, 0x58, 0x50,
+ 0x33, 0xd2, 0x8a, 0xd0, 0x4a, 0xd1, 0xe2, 0xbb,
+ 0x47, 0x33, 0x03, 0xda, 0x89, 0x37, 0x2b, 0xda,
+ 0x8a, 0xd4, 0x4a, 0xd1, 0xe2, 0x03, 0xda, 0x89,
+ 0x3f, 0xe8, 0xc8, 0x95, 0xc6, 0x06, 0x33, 0x33,
+ 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xe8, 0xd5,
+ 0x13, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06,
+ 0xdd, 0x1c, 0x03, 0x58, 0x50, 0x98, 0xbf, 0xc7,
+ 0x32, 0xb3, 0x1b, 0x48, 0xf6, 0xe3, 0x03, 0xf8,
+ 0x89, 0x3e, 0x41, 0x33, 0xc7, 0x05, 0x01, 0x00,
+ 0x58, 0x8a, 0xc4, 0x98, 0xbf, 0xc7, 0x32, 0xb3,
+ 0x1b, 0x48, 0xf6, 0xe3, 0x03, 0xf8, 0x89, 0x3e,
+ 0x43, 0x33, 0xc7, 0x05, 0x01, 0x00, 0xbb, 0xf2,
+ 0xdb, 0x83, 0xeb, 0x02, 0x83, 0xc3, 0x02, 0x53,
+ 0xa0, 0x45, 0x33, 0xa2, 0xe7, 0x1c, 0xe8, 0x6e,
+ 0x06, 0x80, 0x3f, 0xff, 0x75, 0x03, 0xe8, 0xc5,
+ 0x00, 0x8b, 0x3e, 0x41, 0x33, 0xe8, 0xd3, 0x8c,
+ 0x5b, 0x53, 0xe8, 0x88, 0x16, 0x8b, 0x3e, 0x43,
+ 0x33, 0xc7, 0x05, 0x01, 0x00, 0x2e, 0x80, 0x3e,
+ 0xd7, 0x00, 0x01, 0x74, 0x19, 0x80, 0x3e, 0x96,
+ 0x32, 0x00, 0x74, 0x08, 0xbb, 0x92, 0x32, 0xe8,
+ 0xdc, 0x93, 0x72, 0x0a, 0xe8, 0xb4, 0x91, 0x72,
+ 0x05, 0xe8, 0x80, 0x91, 0x73, 0xd4, 0x5b, 0x2e,
+ 0x80, 0x3e, 0xd7, 0x00, 0x01, 0x74, 0x76, 0xe8,
+ 0x6b, 0xfd, 0x80, 0x7f, 0x02, 0x00, 0x75, 0xa4,
+ 0x80, 0x7f, 0x03, 0x00, 0x74, 0x67, 0x43, 0x83,
+ 0xc3, 0x02, 0x53, 0xa0, 0x46, 0x33, 0xa2, 0xe7,
+ 0x1c, 0xe8, 0x0b, 0x06, 0x80, 0x3f, 0xff, 0x75,
+ 0x03, 0xe8, 0x62, 0x00, 0x8b, 0x3e, 0x43, 0x33,
+ 0xe8, 0x70, 0x8c, 0x5b, 0x53, 0xe8, 0x25, 0x16,
+ 0x8b, 0x3e, 0x41, 0x33, 0xc7, 0x05, 0x01, 0x00,
+ 0x2e, 0x80, 0x3e, 0xd7, 0x00, 0x01, 0x74, 0x19,
+ 0x80, 0x3e, 0x96, 0x32, 0x00, 0x74, 0x08, 0xbb,
+ 0x92, 0x32, 0xe8, 0x79, 0x93, 0x72, 0x0a, 0xe8,
+ 0x51, 0x91, 0x72, 0x05, 0xe8, 0x1d, 0x91, 0x73,
+ 0xd4, 0x5b, 0x2e, 0x80, 0x3e, 0xd7, 0x00, 0x01,
+ 0x74, 0x13, 0xe8, 0x08, 0xfd, 0x80, 0x7f, 0x02,
+ 0x00, 0x75, 0xa4, 0x43, 0x80, 0x7f, 0x02, 0x00,
+ 0x74, 0x03, 0xe9, 0x37, 0xff, 0xe8, 0xaf, 0x05,
+ 0xe8, 0xf3, 0x94, 0xc6, 0x06, 0x33, 0x33, 0x01,
+ 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xc3, 0x60, 0x8b,
+ 0x3e, 0x41, 0x33, 0xc7, 0x05, 0x01, 0x00, 0x8b,
+ 0x3e, 0x43, 0x33, 0xc7, 0x05, 0x01, 0x00, 0xc6,
+ 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xe8, 0xa2, 0x12, 0xc6, 0x06, 0x33, 0x33,
+ 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xb8, 0x5a,
+ 0x00, 0xe8, 0x78, 0x09, 0x8b, 0x3e, 0x41, 0x33,
+ 0xc7, 0x05, 0x01, 0x00, 0x8b, 0x3e, 0x43, 0x33,
+ 0xc7, 0x05, 0x01, 0x00, 0x61, 0x43, 0xc3, 0x98,
+ 0x50, 0x56, 0xe8, 0xb8, 0xfc, 0x5e, 0x58, 0x50,
+ 0x48, 0xd1, 0xe0, 0xbb, 0x47, 0x33, 0x03, 0xd8,
+ 0x89, 0x37, 0xe8, 0x4f, 0x94, 0xc6, 0x06, 0x33,
+ 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xe8,
+ 0x5c, 0x12, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x03, 0x58, 0xbf, 0xc7, 0x32,
+ 0xb3, 0x1b, 0x48, 0xf6, 0xe3, 0x03, 0xf8, 0x89,
+ 0x3e, 0x41, 0x33, 0xc7, 0x05, 0x01, 0x00, 0xbb,
+ 0xf0, 0xdb, 0x83, 0xc3, 0x02, 0x53, 0xa0, 0x45,
+ 0x33, 0xa2, 0xe7, 0x1c, 0xe8, 0x10, 0x05, 0x80,
+ 0x3f, 0xff, 0x75, 0x03, 0xe8, 0x53, 0x00, 0x8b,
+ 0x3e, 0x41, 0x33, 0xe8, 0x75, 0x8b, 0x5b, 0x53,
+ 0xe8, 0x2a, 0x15, 0x2e, 0x80, 0x3e, 0xd7, 0x00,
+ 0x01, 0x74, 0x19, 0x80, 0x3e, 0x96, 0x32, 0x00,
+ 0x74, 0x08, 0xbb, 0x92, 0x32, 0xe8, 0x86, 0x92,
+ 0x72, 0x0a, 0xe8, 0x5e, 0x90, 0x72, 0x05, 0xe8,
+ 0x2a, 0x90, 0x73, 0xdc, 0x5b, 0x2e, 0x80, 0x3e,
+ 0xd7, 0x00, 0x01, 0x74, 0x09, 0xe8, 0x15, 0xfc,
+ 0x80, 0x7f, 0x02, 0x00, 0x75, 0xac, 0xe8, 0x26,
+ 0x00, 0xe8, 0xc3, 0x04, 0xe8, 0x07, 0x94, 0xc6,
+ 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xc3, 0x60, 0xe8, 0x11, 0x00, 0xb8, 0x5a,
+ 0x00, 0xe8, 0xb0, 0x08, 0x8b, 0x3e, 0x41, 0x33,
+ 0xc7, 0x05, 0x01, 0x00, 0x61, 0x43, 0xc3, 0x8b,
+ 0x3e, 0x41, 0x33, 0xc7, 0x05, 0x01, 0x00, 0xc6,
+ 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xe8, 0xaa, 0x11, 0xc6, 0x06, 0x33, 0x33,
+ 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xc3, 0xb0,
+ 0xe7, 0xb4, 0x00, 0xbf, 0x01, 0x00, 0xb3, 0x01,
+ 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x15, 0xb2, 0x01,
+ 0xb6, 0x01, 0xe8, 0x9b, 0x02, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x98, 0x03, 0xc6, 0x06, 0x96, 0xda,
+ 0x01, 0xc3, 0xe8, 0xda, 0xff, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x9a, 0x03, 0xc3, 0xe8, 0xcf, 0xff,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x99, 0x03, 0xc3,
+ 0xb0, 0xef, 0xb4, 0x00, 0xbf, 0x01, 0x00, 0xb3,
+ 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x14, 0xb2,
+ 0x01, 0xb6, 0x01, 0xe8, 0x62, 0x02, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x59, 0x03, 0xc6, 0x06, 0x96,
+ 0xda, 0x01, 0xc3, 0xb0, 0xec, 0xb4, 0x01, 0xbf,
+ 0x01, 0x00, 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01,
+ 0xb5, 0x14, 0xb2, 0x01, 0xb6, 0x01, 0xe8, 0x3f,
+ 0x02, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x2d, 0x03,
+ 0xc6, 0x06, 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xec,
+ 0xb4, 0x00, 0xbf, 0x01, 0x00, 0xb3, 0x01, 0xb7,
+ 0x01, 0xb1, 0x01, 0xb5, 0x14, 0xb2, 0x01, 0xb6,
+ 0x01, 0xe8, 0x1c, 0x02, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x2e, 0x03, 0xc6, 0x06, 0x96, 0xda, 0x01,
+ 0xc3, 0xe8, 0xda, 0xff, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x40, 0x03, 0xc3, 0xe8, 0xcf, 0xff, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x58, 0x03, 0xc3, 0xe8,
+ 0xc4, 0xff, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xaa,
+ 0x03, 0xc3, 0xb0, 0xd0, 0xb4, 0x02, 0xbf, 0x01,
+ 0x00, 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5,
+ 0x22, 0xb2, 0x01, 0xb6, 0x01, 0xe8, 0xd8, 0x01,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x29, 0x03, 0xc6,
+ 0x06, 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xe5, 0xb4,
+ 0x01, 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x02, 0xb5,
+ 0x13, 0xb2, 0x14, 0xb6, 0x14, 0xbf, 0x01, 0x00,
+ 0xe8, 0xb5, 0x01, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x0b, 0x02, 0xc6, 0x06, 0x96, 0xda, 0x01, 0xc3,
+ 0xb0, 0xd8, 0xb4, 0x01, 0xb3, 0x01, 0xb7, 0x01,
+ 0xb1, 0x01, 0xb5, 0x18, 0xb2, 0x18, 0xb6, 0x18,
+ 0xbf, 0x01, 0x00, 0xe8, 0x92, 0x01, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x0a, 0x02, 0xc6, 0x06, 0x96,
+ 0xda, 0x01, 0xc3, 0xb0, 0xe5, 0xb4, 0x07, 0xb3,
+ 0x01, 0xb7, 0x02, 0xb1, 0x03, 0xb5, 0x20, 0xb2,
+ 0x21, 0xb6, 0x22, 0xbf, 0x03, 0x00, 0xe8, 0x6f,
+ 0x01, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xf6, 0x01,
+ 0xc6, 0x06, 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xd9,
+ 0xb4, 0x01, 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01,
+ 0xb5, 0x14, 0xb2, 0x15, 0xb6, 0x15, 0xbf, 0x01,
+ 0x00, 0xe8, 0x4c, 0x01, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x11, 0x02, 0xc6, 0x06, 0x96, 0xda, 0x01,
+ 0xc3, 0xb0, 0xd9, 0xb4, 0x00, 0xb3, 0x01, 0xb7,
+ 0x01, 0xb1, 0x01, 0xb5, 0x09, 0xb2, 0x09, 0xb6,
+ 0x09, 0xbf, 0x01, 0x00, 0xe8, 0x29, 0x01, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x22, 0x02, 0xc6, 0x06,
+ 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xe5, 0xb4, 0x01,
+ 0xbf, 0x01, 0x00, 0xb3, 0x01, 0xb7, 0x01, 0xb1,
+ 0x01, 0xb5, 0x14, 0xb2, 0x15, 0xb6, 0x15, 0xe8,
+ 0x06, 0x01, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x0c, 0x02, 0xc6, 0x06, 0x96, 0xda, 0x02, 0xc3,
+ 0xb0, 0xe5, 0xb4, 0x04, 0xbf, 0x01, 0x00, 0xb3,
+ 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x1f, 0xb2,
+ 0x01, 0xb6, 0x01, 0xe8, 0xe2, 0x00, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0xa0, 0x02, 0xc6, 0x06,
+ 0x96, 0xda, 0x02, 0xc3, 0xb0, 0xd0, 0xb4, 0x01,
+ 0xbf, 0x03, 0x00, 0xb3, 0x03, 0xb7, 0x03, 0xb1,
+ 0x01, 0xb5, 0x0d, 0xb2, 0x03, 0xb6, 0x03, 0xe8,
+ 0xbe, 0x00, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x9a, 0x02, 0xc6, 0x06, 0x96, 0xda, 0x02, 0xc3,
+ 0xb0, 0xd0, 0xb4, 0x06, 0xbf, 0x01, 0x00, 0xb3,
+ 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x12, 0xb2,
+ 0x01, 0xb6, 0x01, 0xe8, 0x9a, 0x00, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x1d, 0x03, 0xc6, 0x06, 0x96,
+ 0xda, 0x01, 0xc3, 0xb0, 0xd0, 0xb4, 0x01, 0xbf,
+ 0x01, 0x00, 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01,
+ 0xb5, 0x14, 0xb2, 0x01, 0xb6, 0x01, 0xe8, 0x77,
+ 0x00, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xbe, 0x02,
+ 0xc6, 0x06, 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xef,
+ 0xb4, 0x01, 0xbf, 0x01, 0x00, 0xb3, 0x01, 0xb7,
+ 0x01, 0xb1, 0x01, 0xb5, 0x14, 0xb2, 0x01, 0xb6,
+ 0x01, 0xe8, 0x54, 0x00, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0xc5, 0x02, 0xc6, 0x06, 0x96, 0xda, 0x01,
+ 0xc3, 0xb0, 0xef, 0xb4, 0x01, 0xbf, 0x01, 0x00,
+ 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x03,
+ 0xb2, 0x01, 0xb6, 0x01, 0xe8, 0x31, 0x00, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0xd7, 0x02, 0xc6, 0x06,
+ 0x96, 0xda, 0x01, 0xc3, 0xb0, 0xd0, 0xb4, 0x00,
+ 0xb3, 0x01, 0xb7, 0x01, 0xb1, 0x01, 0xb5, 0x18,
+ 0xb2, 0x01, 0xb6, 0x01, 0xbf, 0x01, 0x00, 0xe8,
+ 0x0e, 0x00, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x06,
+ 0x17, 0x03, 0xc6, 0x06, 0x96, 0xda, 0x04, 0xc3,
+ 0xa2, 0xe7, 0x1c, 0x88, 0x26, 0x97, 0xda, 0x89,
+ 0x3e, 0xa4, 0xda, 0x88, 0x1e, 0x98, 0xda, 0x88,
+ 0x3e, 0x9a, 0xda, 0x88, 0x0e, 0x9c, 0xda, 0x88,
+ 0x2e, 0x9e, 0xda, 0x88, 0x16, 0xa0, 0xda, 0x88,
+ 0x36, 0xa2, 0xda, 0xc3, 0x26, 0x8b, 0x0f, 0x26,
+ 0x8b, 0x57, 0x02, 0x26, 0x8b, 0x77, 0x04, 0x8b,
+ 0xf9, 0x83, 0xc3, 0x06, 0x1e, 0x8e, 0xd8, 0x8b,
+ 0xcf, 0x26, 0x8a, 0x07, 0x3c, 0xff, 0x74, 0x02,
+ 0x88, 0x04, 0x43, 0x46, 0xe2, 0xf3, 0x81, 0xc6,
+ 0x40, 0x01, 0x2b, 0xf7, 0x4a, 0x75, 0xe8, 0x1f,
+ 0xc3, 0x50, 0x32, 0xe4, 0xe8, 0x66, 0x8a, 0x58,
+ 0xc6, 0x47, 0x12, 0x01, 0xc3, 0x50, 0x32, 0xe4,
+ 0xe8, 0x5a, 0x8a, 0x58, 0xc6, 0x47, 0x12, 0x00,
+ 0xc3, 0xb4, 0x00, 0xe8, 0x4f, 0x8a, 0x83, 0xc3,
+ 0x13, 0xfc, 0xac, 0x3c, 0xff, 0x74, 0x05, 0x88,
+ 0x07, 0x43, 0xeb, 0xf6, 0xc3, 0x50, 0x51, 0x52,
+ 0xb4, 0x00, 0xe8, 0x38, 0x8a, 0x5a, 0x59, 0x58,
+ 0x89, 0x4f, 0x09, 0x89, 0x57, 0x0b, 0x89, 0x4f,
+ 0x0d, 0x89, 0x57, 0x0f, 0x88, 0x67, 0x11, 0xc3,
+ 0xe8, 0x04, 0x00, 0xe8, 0xc8, 0xf8, 0xc3, 0x32,
+ 0xe4, 0x50, 0xe8, 0x2f, 0x90, 0x58, 0x50, 0xbe,
+ 0xc7, 0x32, 0xbb, 0x47, 0x33, 0x48, 0xb1, 0x1b,
+ 0xf6, 0xe1, 0x03, 0xf0, 0x06, 0x8b, 0x44, 0x16,
+ 0x8e, 0xc0, 0xba, 0x02, 0x00, 0xbe, 0x00, 0x00,
+ 0x26, 0x8b, 0x34, 0x2b, 0xf2, 0x8b, 0xc6, 0xb1,
+ 0x03, 0xf6, 0xf1, 0x07, 0x8b, 0xd0, 0xb9, 0x01,
+ 0x00, 0x51, 0x52, 0xe8, 0x75, 0x8f, 0x5a, 0x59,
+ 0x58, 0xc3, 0xe8, 0xc2, 0xff, 0xe8, 0x97, 0xf8,
+ 0xc3, 0xe8, 0xeb, 0x00, 0xe8, 0xb1, 0xff, 0xe8,
+ 0x2c, 0x90, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xc3, 0xc6, 0x06, 0x27,
+ 0xc4, 0x00, 0xe8, 0xd2, 0x00, 0xe8, 0x9f, 0xff,
+ 0xe8, 0xcb, 0xf8, 0xa3, 0x3f, 0x33, 0x0b, 0xc0,
+ 0x74, 0x4d, 0xa1, 0x52, 0x72, 0xa3, 0x50, 0x72,
+ 0xa1, 0x50, 0x72, 0x3b, 0x06, 0x23, 0xc4, 0x75,
+ 0x3e, 0xa1, 0x1f, 0xc4, 0xe8, 0xbd, 0x0d, 0x3b,
+ 0x06, 0x25, 0xc4, 0x75, 0x32, 0xa0, 0xce, 0x00,
+ 0x0a, 0xc0, 0x74, 0x06, 0x3a, 0x06, 0xcf, 0x00,
+ 0x75, 0x25, 0xc6, 0x06, 0x27, 0xc4, 0x01, 0xa1,
+ 0x3f, 0x33, 0x3b, 0x06, 0x3b, 0x33, 0x72, 0x17,
+ 0x3b, 0x06, 0x3d, 0x33, 0x77, 0x11, 0xe8, 0x0e,
+ 0x00, 0xa3, 0x52, 0x72, 0xa3, 0x50, 0x72, 0xa3,
+ 0x1f, 0xc4, 0xa2, 0xcf, 0x00, 0xf9, 0xc3, 0x33,
+ 0xc0, 0xa3, 0x23, 0xc4, 0xa3, 0x25, 0xc4, 0xa3,
+ 0x3b, 0x33, 0xa3, 0x3d, 0x33, 0xf8, 0xc3, 0xe8,
+ 0x65, 0x00, 0xe8, 0x50, 0x8f, 0xe8, 0x64, 0x8f,
+ 0xe8, 0xd8, 0x8e, 0xe8, 0x38, 0x01, 0xc3, 0xe8,
+ 0x55, 0x00, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xe8,
+ 0xe8, 0xff, 0xc6, 0x06, 0xdc, 0x64, 0x01, 0xc3,
+ 0xe8, 0xdc, 0xff, 0xe8, 0x16, 0x00, 0xc3, 0xe8,
+ 0xd8, 0xff, 0xe8, 0x0f, 0x00, 0xc3, 0xe8, 0xde,
+ 0xff, 0xe8, 0x08, 0x00, 0xc3, 0xe8, 0xda, 0xff,
+ 0xe8, 0x01, 0x00, 0xc3, 0xe8, 0x64, 0x90, 0xe8,
+ 0x6c, 0x8f, 0xe8, 0x44, 0x23, 0xc6, 0x06, 0x33,
+ 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x2f, 0x0d, 0xc6,
+ 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x03, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xc3, 0xc6,
+ 0x06, 0xda, 0x1c, 0x01, 0xc6, 0x06, 0xdb, 0x1c,
+ 0x01, 0xe8, 0x12, 0x0d, 0xc6, 0x06, 0xda, 0x1c,
+ 0x00, 0xc6, 0x06, 0xdb, 0x1c, 0x00, 0xc3, 0xe8,
+ 0xd3, 0x8e, 0xe8, 0xe7, 0x8e, 0xe8, 0x5b, 0x8e,
+ 0xe8, 0x47, 0x24, 0xc6, 0x06, 0x07, 0x66, 0x01,
+ 0xa1, 0x7a, 0x32, 0x3a, 0x06, 0x07, 0x66, 0x75,
+ 0x03, 0xe8, 0xe9, 0x8d, 0xbb, 0xa4, 0x32, 0xe8,
+ 0x64, 0x8d, 0x73, 0xf8, 0x8b, 0x0e, 0x90, 0x32,
+ 0xe8, 0x48, 0x8d, 0xc6, 0x06, 0x33, 0x33, 0x01,
+ 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x02, 0xe8, 0x1f, 0x13, 0xe8, 0xfc, 0x0f,
+ 0xe8, 0x13, 0x0f, 0xe8, 0x4d, 0x13, 0x72, 0x77,
+ 0xe8, 0x40, 0x10, 0xe8, 0xa9, 0x11, 0xa0, 0x07,
+ 0x66, 0xfe, 0xc8, 0x3a, 0x06, 0x35, 0x33, 0x75,
+ 0x12, 0x8b, 0x1e, 0x37, 0x33, 0x8b, 0x36, 0x39,
+ 0x33, 0xe8, 0xfb, 0x86, 0xc6, 0x06, 0xdb, 0x1c,
+ 0x02, 0xeb, 0x0b, 0x3a, 0x06, 0x36, 0x33, 0x75,
+ 0x05, 0xc6, 0x06, 0xdb, 0x1c, 0x01, 0xe8, 0xf5,
+ 0x0e, 0xa1, 0x7a, 0x32, 0x0b, 0xc0, 0x74, 0x1e,
+ 0x40, 0x3a, 0x06, 0x07, 0x66, 0x75, 0x17, 0xa0,
+ 0x49, 0x32, 0xb4, 0x04, 0x8a, 0x2e, 0x7c, 0x32,
+ 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b, 0x8e,
+ 0xd8, 0x8e, 0xc0, 0xe8, 0xa5, 0x8d, 0xe8, 0xff,
+ 0x8a, 0xe8, 0x45, 0x18, 0xe8, 0xf8, 0x11, 0xe8,
+ 0x10, 0x0f, 0xe8, 0xba, 0x89, 0xc6, 0x06, 0x33,
+ 0x33, 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0xe9, 0x51, 0xff, 0xc7,
+ 0x06, 0x7a, 0x32, 0x00, 0x00, 0xc3, 0xe8, 0x7d,
+ 0x90, 0xe8, 0x86, 0x23, 0xc6, 0x06, 0x07, 0x66,
+ 0x01, 0xa1, 0x7a, 0x32, 0x3a, 0x06, 0x07, 0x66,
+ 0x75, 0x03, 0xe8, 0x28, 0x8d, 0xbb, 0xa4, 0x32,
+ 0xe8, 0xa3, 0x8c, 0x73, 0xf8, 0x8b, 0x0e, 0x90,
+ 0x32, 0xe8, 0x87, 0x8c, 0xc6, 0x06, 0x33, 0x33,
+ 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xc6, 0x06,
+ 0xdc, 0x1c, 0x02, 0xe8, 0x5e, 0x12, 0xe8, 0x3b,
+ 0x0f, 0xe8, 0x8f, 0x12, 0x72, 0x48, 0xe8, 0x82,
+ 0x0f, 0xe8, 0xeb, 0x10, 0xa1, 0x7a, 0x32, 0x0b,
+ 0xc0, 0x74, 0x1e, 0x40, 0x3a, 0x06, 0x07, 0x66,
+ 0x75, 0x17, 0xa0, 0x49, 0x32, 0xb4, 0x04, 0x8a,
+ 0x2e, 0x7c, 0x32, 0xff, 0x1e, 0x4a, 0x32, 0xb8,
+ 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xe8, 0x12,
+ 0x8d, 0xe8, 0x6c, 0x8a, 0xe8, 0xb2, 0x17, 0xe8,
+ 0x65, 0x11, 0xe8, 0x2a, 0x89, 0xc6, 0x06, 0x33,
+ 0x33, 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0xeb, 0x83, 0xc7, 0x06,
+ 0x7a, 0x32, 0x00, 0x00, 0xc3, 0xc6, 0x06, 0x27,
+ 0xc4, 0x00, 0xe8, 0x32, 0x89, 0xe8, 0xf2, 0x22,
+ 0xc6, 0x06, 0x07, 0x66, 0x01, 0xa1, 0x7a, 0x32,
+ 0x3a, 0x06, 0x07, 0x66, 0x75, 0x03, 0xe8, 0x94,
+ 0x8c, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xc6, 0x06,
+ 0xdc, 0x1c, 0x03, 0xc6, 0x06, 0xda, 0x1c, 0x01,
+ 0xe8, 0xe0, 0x0b, 0x3d, 0x01, 0x00, 0x76, 0x05,
+ 0xc6, 0x06, 0xda, 0x1c, 0x02, 0xe8, 0xcc, 0x11,
+ 0xe8, 0xa9, 0x0e, 0xe8, 0xff, 0x0c, 0xe8, 0x5e,
+ 0x10, 0xe8, 0x11, 0x0d, 0xe8, 0x01, 0x8a, 0xe8,
+ 0x47, 0x17, 0xe8, 0xfa, 0x10, 0xe8, 0x48, 0x0d,
+ 0xe8, 0xbc, 0x88, 0xa0, 0x07, 0x66, 0x32, 0xe4,
+ 0xe8, 0xb0, 0x89, 0xc6, 0x06, 0xcf, 0x00, 0x04,
+ 0x73, 0x03, 0xe9, 0x8f, 0x00, 0xe8, 0x74, 0x89,
+ 0xc6, 0x06, 0xcf, 0x00, 0x02, 0x73, 0x03, 0xe9,
+ 0x82, 0x00, 0x33, 0xc0, 0xa2, 0xcf, 0x00, 0xbb,
+ 0xa4, 0x32, 0xe8, 0xb1, 0x8b, 0x73, 0x9a, 0x50,
+ 0x8b, 0x0e, 0x90, 0x32, 0xe8, 0x94, 0x8b, 0xc6,
+ 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x6b,
+ 0x11, 0xe8, 0x48, 0x0e, 0xe8, 0x9e, 0x0c, 0xe8,
+ 0x99, 0x11, 0x58, 0x72, 0x4f, 0xe8, 0x8b, 0x0e,
+ 0xe8, 0xf4, 0x0f, 0xe8, 0xa7, 0x0c, 0xa1, 0x7a,
+ 0x32, 0x0b, 0xc0, 0x74, 0x1e, 0x40, 0x3a, 0x06,
+ 0x07, 0x66, 0x75, 0x17, 0xa0, 0x49, 0x32, 0xb4,
+ 0x04, 0x8a, 0x2e, 0x7c, 0x32, 0xff, 0x1e, 0x4a,
+ 0x32, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0,
+ 0xe8, 0x18, 0x8c, 0xe8, 0x72, 0x89, 0xe8, 0xb8,
+ 0x16, 0xe8, 0x6b, 0x10, 0xe8, 0xb9, 0x0c, 0xe8,
+ 0x2d, 0x88, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x03, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x03, 0xe9, 0x19, 0xff, 0x50, 0xc6, 0x06, 0xda,
+ 0x1c, 0x01, 0xe8, 0x40, 0x0c, 0xe8, 0x55, 0x0c,
+ 0xe8, 0x45, 0x89, 0xe8, 0x92, 0x0c, 0xe8, 0x06,
+ 0x88, 0xe8, 0x09, 0x88, 0x58, 0x8b, 0x0e, 0x52,
+ 0x72, 0x8b, 0x16, 0x3d, 0x33, 0x51, 0x52, 0xe8,
+ 0xa9, 0xfc, 0x72, 0x07, 0xe8, 0x5a, 0xfe, 0x5a,
+ 0x59, 0xf8, 0xc3, 0x89, 0x16, 0x3d, 0x33, 0xa1,
+ 0x7a, 0x32, 0x3a, 0x06, 0x07, 0x66, 0x75, 0x03,
+ 0xe8, 0x7a, 0x8b, 0xbb, 0xa4, 0x32, 0xe8, 0xf5,
+ 0x8a, 0x73, 0xf8, 0x8b, 0x0e, 0x90, 0x32, 0xe8,
+ 0xd9, 0x8a, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x02, 0xe8, 0xb0, 0x10, 0xe8, 0x8d, 0x0d, 0xe8,
+ 0xe1, 0x10, 0x72, 0x54, 0xa0, 0x07, 0x66, 0x32,
+ 0xe4, 0x3b, 0x06, 0x3d, 0x33, 0x73, 0x49, 0xe8,
+ 0xc9, 0x0d, 0xe8, 0x32, 0x0f, 0xa1, 0x7a, 0x32,
+ 0x0b, 0xc0, 0x74, 0x1e, 0x40, 0x3a, 0x06, 0x07,
+ 0x66, 0x75, 0x17, 0xa0, 0x49, 0x32, 0xb4, 0x04,
+ 0x8a, 0x2e, 0x7c, 0x32, 0xff, 0x1e, 0x4a, 0x32,
+ 0xb8, 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xe8,
+ 0x59, 0x8b, 0xe8, 0xb3, 0x88, 0xe8, 0xf9, 0x15,
+ 0xe8, 0xac, 0x0f, 0xe8, 0x71, 0x87, 0xc6, 0x06,
+ 0x33, 0x33, 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xe9, 0x77, 0xff,
+ 0x33, 0xc0, 0xa3, 0x7a, 0x32, 0xa3, 0x3d, 0x33,
+ 0x5a, 0x59, 0xf9, 0xc3, 0xb9, 0xe8, 0x03, 0xbb,
+ 0xac, 0x32, 0xe8, 0x56, 0x8a, 0xc7, 0x06, 0x52,
+ 0x72, 0x00, 0x00, 0xc7, 0x06, 0x50, 0x72, 0x00,
+ 0x00, 0xc7, 0x06, 0x1f, 0xc4, 0x00, 0x00, 0xe8,
+ 0x5d, 0x87, 0xe8, 0x7a, 0x01, 0x73, 0x09, 0xb9,
+ 0xe8, 0x03, 0xbb, 0xac, 0x32, 0xe8, 0x33, 0x8a,
+ 0xe8, 0xd2, 0x0c, 0xe8, 0xf0, 0x09, 0x33, 0xc0,
+ 0xa2, 0xcf, 0x00, 0xbb, 0xac, 0x32, 0xe8, 0x35,
+ 0x8a, 0x72, 0x1c, 0xe8, 0x0d, 0x88, 0xc6, 0x06,
+ 0xcf, 0x00, 0x04, 0x72, 0x0a, 0xe8, 0xd4, 0x87,
+ 0xc6, 0x06, 0xcf, 0x00, 0x02, 0x73, 0xcb, 0xe8,
+ 0x03, 0x87, 0xe8, 0x7a, 0xfc, 0xf9, 0xc3, 0xe8,
+ 0xfb, 0x86, 0xe8, 0x72, 0xfc, 0xf8, 0xc3, 0x0b,
+ 0xc0, 0x75, 0x01, 0xc3, 0x33, 0xdb, 0x8a, 0xd8,
+ 0x43, 0xbf, 0xc7, 0x32, 0xb0, 0x1b, 0xfe, 0xcc,
+ 0xf6, 0xe4, 0x03, 0xf8, 0x53, 0x57, 0x8b, 0x05,
+ 0x3b, 0xc3, 0x74, 0x07, 0xe8, 0x7e, 0x0c, 0x5f,
+ 0x5b, 0xeb, 0xf1, 0x5f, 0x5b, 0xc3, 0x0b, 0xc0,
+ 0x75, 0x01, 0xc3, 0x0a, 0xc0, 0x75, 0x01, 0xc3,
+ 0x33, 0xdb, 0x8a, 0xd8, 0xbf, 0xc7, 0x32, 0xb0,
+ 0x1b, 0xfe, 0xcc, 0xf6, 0xe4, 0x03, 0xf8, 0x53,
+ 0x57, 0x8a, 0x45, 0x1a, 0x3a, 0xc3, 0x74, 0x07,
+ 0xe8, 0x52, 0x0c, 0x5f, 0x5b, 0xeb, 0xf0, 0x5f,
+ 0x5b, 0xc3, 0xbb, 0xa8, 0x32, 0x8b, 0xc8, 0xe8,
+ 0xa1, 0x89, 0xe8, 0x40, 0x0c, 0xbb, 0xa8, 0x32,
+ 0xe8, 0xab, 0x89, 0x73, 0xf5, 0xc3, 0xb8, 0x32,
+ 0x00, 0xe8, 0xe6, 0xff, 0xc3, 0xb8, 0x64, 0x00,
+ 0xe8, 0xdf, 0xff, 0xc3, 0xbb, 0xa8, 0x32, 0x8b,
+ 0xc8, 0xe8, 0x7f, 0x89, 0xbb, 0xa8, 0x32, 0xe8,
+ 0x8c, 0x89, 0x73, 0xf8, 0xc3, 0x53, 0xb8, 0x10,
+ 0x00, 0xe8, 0xe8, 0xff, 0x5b, 0xc3, 0xa0, 0xe1,
+ 0xc3, 0x0a, 0xc0, 0x74, 0x14, 0xbb, 0x6f, 0xbb,
+ 0x83, 0xc3, 0x03, 0x8a, 0x27, 0x3a, 0xc4, 0x75,
+ 0xf7, 0x8b, 0x47, 0x01, 0xa3, 0xdc, 0xbb, 0xeb,
+ 0x1d, 0x80, 0x3e, 0x3d, 0x66, 0x06, 0x74, 0x01,
+ 0xc3, 0x80, 0x3e, 0xdb, 0xbb, 0x01, 0x74, 0x0e,
+ 0xbb, 0x57, 0x34, 0xe8, 0xaf, 0x80, 0xc7, 0x06,
+ 0x1f, 0xc4, 0x00, 0x00, 0xeb, 0x10, 0xe8, 0x2c,
+ 0x86, 0xc7, 0x06, 0x1f, 0xc4, 0x00, 0x00, 0xff,
+ 0x16, 0xdc, 0xbb, 0xe8, 0x41, 0x86, 0xc6, 0x06,
+ 0x3d, 0x66, 0x00, 0x33, 0xc0, 0xa3, 0x50, 0x72,
+ 0xa3, 0x52, 0x72, 0xa2, 0xe1, 0xc3, 0xe8, 0x7f,
+ 0x15, 0xc3, 0xc6, 0x06, 0xdb, 0xbb, 0x00, 0xbb,
+ 0x87, 0xbb, 0xe8, 0xfd, 0x1f, 0x8a, 0x07, 0x0a,
+ 0xc0, 0x74, 0x31, 0x8a, 0xc8, 0xa1, 0x1f, 0xc4,
+ 0xe8, 0x79, 0x08, 0x3a, 0xc1, 0x75, 0x26, 0x8a,
+ 0x67, 0x01, 0x3a, 0x26, 0x50, 0x72, 0x75, 0x1d,
+ 0xc6, 0x06, 0xdb, 0xbb, 0x01, 0x8b, 0x77, 0x03,
+ 0x8b, 0x7f, 0x05, 0x8a, 0x47, 0x02, 0xa2, 0xc3,
+ 0x64, 0x8b, 0x47, 0x07, 0xa3, 0xdc, 0xbb, 0xe8,
+ 0xc8, 0x1b, 0x72, 0x06, 0xc3, 0x83, 0xc3, 0x09,
+ 0xeb, 0xc3, 0xb0, 0x36, 0xe9, 0x49, 0x93, 0x83,
+ 0x3e, 0xc2, 0x00, 0x00, 0x74, 0x05, 0xe8, 0x21,
+ 0x00, 0xf8, 0xc3, 0xbb, 0x98, 0x32, 0x8b, 0x07,
+ 0x0b, 0x47, 0x02, 0x75, 0x06, 0xb9, 0x32, 0x00,
+ 0xe8, 0xa8, 0x88, 0xe8, 0xb8, 0x88, 0x72, 0x02,
+ 0xf8, 0xc3, 0xe8, 0x05, 0x00, 0xe8, 0x66, 0x00,
+ 0xf9, 0xc3, 0xbb, 0x98, 0x32, 0x33, 0xc0, 0x89,
+ 0x07, 0x89, 0x47, 0x02, 0xc3, 0xb8, 0x11, 0x00,
+ 0xba, 0x0c, 0x00, 0x8b, 0x1e, 0xc0, 0x00, 0x8b,
+ 0x0e, 0xc2, 0x00, 0x3b, 0xd8, 0x72, 0x1d, 0x3b,
+ 0xca, 0x72, 0x19, 0x05, 0x1e, 0x01, 0x81, 0xc2,
+ 0x8d, 0x00, 0x3b, 0xd8, 0x77, 0x0e, 0x3b, 0xca,
+ 0x77, 0x0a, 0xc6, 0x06, 0x6e, 0xc4, 0x01, 0xe8,
+ 0xc8, 0xff, 0xf8, 0xc3, 0xbb, 0x6e, 0xc4, 0x80,
+ 0x3f, 0x01, 0x74, 0x05, 0xc6, 0x07, 0x00, 0xf8,
+ 0xc3, 0xbb, 0x98, 0x32, 0x8b, 0x07, 0x0b, 0x47,
+ 0x02, 0xe8, 0xae, 0xff, 0xc6, 0x06, 0x6e, 0xc4,
+ 0x00, 0xf9, 0xc3, 0xb9, 0x19, 0x00, 0xbb, 0x98,
+ 0x32, 0xe8, 0x37, 0x88, 0xf8, 0xc3, 0xc6, 0x06,
+ 0xe1, 0xc3, 0x00, 0xc6, 0x06, 0xda, 0x1c, 0x01,
+ 0xe8, 0x4a, 0x09, 0xe8, 0x2d, 0x09, 0xe8, 0x79,
+ 0x00, 0xbf, 0x75, 0xc4, 0xb0, 0x01, 0xb9, 0x18,
+ 0x00, 0xfc, 0xf3, 0xaa, 0xa1, 0xbf, 0x32, 0xa3,
+ 0xac, 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00, 0xb9,
+ 0x04, 0x00, 0xba, 0x54, 0x00, 0xe8, 0x90, 0x8e,
+ 0xe8, 0x9c, 0x00, 0xe8, 0x45, 0x02, 0xe8, 0xf4,
+ 0x84, 0xe8, 0xbc, 0x8a, 0xe8, 0xa4, 0x8a, 0xe8,
+ 0x13, 0x00, 0xe8, 0x1b, 0x86, 0xe8, 0x9a, 0x00,
+ 0xe8, 0x6f, 0x00, 0xe8, 0x01, 0x85, 0xc7, 0x06,
+ 0x52, 0x72, 0x00, 0x00, 0xc3, 0xe8, 0x9f, 0x87,
+ 0x80, 0x3e, 0xb0, 0x32, 0x01, 0x74, 0x05, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0xc6, 0x06, 0xda, 0x1c,
+ 0x01, 0x83, 0x3e, 0x1f, 0xc4, 0x00, 0x74, 0x05,
+ 0xc6, 0x06, 0xda, 0x1c, 0x02, 0xe8, 0x4e, 0x07,
+ 0xc6, 0x06, 0xda, 0x1c, 0x00, 0x83, 0x3e, 0x1f,
+ 0xc4, 0x00, 0x74, 0x05, 0xc6, 0x06, 0xda, 0x1c,
+ 0x03, 0xc3, 0xc6, 0x06, 0x3d, 0x66, 0x00, 0xc7,
+ 0x06, 0x1f, 0xc4, 0x00, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x00, 0xe8, 0x75, 0x1e, 0x80, 0x3e, 0xb0,
+ 0x32, 0x01, 0x74, 0x15, 0xe8, 0x22, 0x1d, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xc6, 0x06, 0xda, 0x1c,
+ 0x01, 0xe8, 0x12, 0x07, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x03, 0xc3, 0x06, 0x1e, 0xb8, 0x00, 0xa0, 0x8e,
+ 0xc0, 0xa1, 0xb1, 0x32, 0x8e, 0xd8, 0xfc, 0xf3,
+ 0xa5, 0x1f, 0xe8, 0x5a, 0x84, 0x07, 0xc3, 0xe8,
+ 0x13, 0x01, 0xe8, 0x4c, 0x00, 0xe8, 0x2f, 0x01,
+ 0xe8, 0x07, 0x00, 0xe8, 0x82, 0x85, 0xe8, 0xd9,
+ 0xff, 0xc3, 0xb8, 0x0c, 0x00, 0xbb, 0x40, 0x01,
+ 0xf7, 0xe3, 0x8b, 0xf0, 0x8b, 0xf8, 0xb8, 0x0c,
+ 0x00, 0x05, 0x8d, 0x00, 0xf7, 0xe3, 0x2b, 0xc6,
+ 0x8b, 0xc8, 0xd1, 0xe9, 0xc3, 0xe8, 0x60, 0x85,
+ 0xe8, 0x2a, 0x84, 0xe8, 0xdc, 0xff, 0xe8, 0xb1,
+ 0xff, 0xe8, 0x43, 0x84, 0xc7, 0x06, 0x52, 0x72,
+ 0x00, 0x00, 0xbf, 0x75, 0xc4, 0xb0, 0x01, 0xb9,
+ 0x18, 0x00, 0xfc, 0xf3, 0xaa, 0xe8, 0xaf, 0xff,
+ 0xc3, 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0x33,
+ 0xc9, 0x3b, 0x0e, 0x73, 0xc4, 0x73, 0x20, 0x41,
+ 0x51, 0xe8, 0x1d, 0x00, 0x89, 0x36, 0x71, 0xc4,
+ 0xb9, 0x1a, 0x00, 0xba, 0x28, 0x00, 0xe8, 0x4f,
+ 0x00, 0xb4, 0xea, 0xe8, 0x37, 0x02, 0xc7, 0x06,
+ 0x71, 0xc4, 0x00, 0x00, 0x59, 0xeb, 0xda, 0x07,
+ 0xc3, 0x33, 0xd2, 0x49, 0xfe, 0xce, 0xfe, 0xc6,
+ 0x83, 0xe9, 0x06, 0x73, 0xf9, 0x83, 0xc1, 0x06,
+ 0xbe, 0x11, 0x0f, 0x81, 0xc6, 0x45, 0x06, 0x81,
+ 0xc6, 0x45, 0x06, 0x33, 0xc0, 0x0a, 0xf6, 0x74,
+ 0x0a, 0x05, 0x1a, 0x00, 0x05, 0x05, 0x00, 0xfe,
+ 0xce, 0xeb, 0xf2, 0xf7, 0x26, 0xb6, 0x00, 0x03,
+ 0xf0, 0x0a, 0xc9, 0x74, 0x0a, 0x83, 0xc6, 0x28,
+ 0x83, 0xc6, 0x05, 0xfe, 0xc9, 0xeb, 0xf2, 0xc3,
+ 0x1e, 0x52, 0xbb, 0x40, 0x01, 0xa1, 0xb5, 0x32,
+ 0x8e, 0xd8, 0x8b, 0xc6, 0x2d, 0x11, 0x0f, 0x33,
+ 0xd2, 0xf7, 0xf3, 0x8b, 0xfa, 0x83, 0xc7, 0x06,
+ 0xbb, 0x1e, 0x01, 0xf7, 0xe3, 0x03, 0xf8, 0x5a,
+ 0x81, 0xc6, 0x41, 0x01, 0x81, 0xc7, 0x1f, 0x01,
+ 0x49, 0x49, 0x4a, 0x4a, 0x8b, 0xd9, 0x8b, 0xca,
+ 0x8a, 0x05, 0x3c, 0xe8, 0x75, 0x06, 0x26, 0xc6,
+ 0x04, 0xd6, 0xeb, 0x04, 0x26, 0xc6, 0x04, 0xe0,
+ 0x46, 0x47, 0xe2, 0xec, 0x81, 0xc6, 0x40, 0x01,
+ 0x2b, 0xf2, 0x81, 0xc7, 0x1e, 0x01, 0x2b, 0xfa,
+ 0x4b, 0x75, 0xdb, 0x1f, 0xc3, 0x06, 0xa1, 0xb5,
+ 0x32, 0x8e, 0xc0, 0xa3, 0xac, 0x00, 0xc7, 0x06,
+ 0xaa, 0x00, 0x00, 0x00, 0xb9, 0x03, 0x00, 0xba,
+ 0x54, 0x00, 0xe8, 0xc3, 0x8c, 0xa1, 0xb1, 0x32,
+ 0x33, 0xdb, 0xe8, 0xf7, 0xf6, 0x07, 0xc3, 0x06,
+ 0xa1, 0xbf, 0x32, 0x8e, 0xc0, 0x33, 0xc9, 0x3b,
+ 0x0e, 0x73, 0xc4, 0x73, 0x45, 0x41, 0x51, 0xbb,
+ 0x8c, 0xc4, 0x03, 0xd9, 0x33, 0xc9, 0x8a, 0x0f,
+ 0xbf, 0xfe, 0xff, 0xbe, 0xa4, 0xc4, 0xd1, 0xe1,
+ 0x03, 0xf9, 0x03, 0xf1, 0xd1, 0xe9, 0x8b, 0x34,
+ 0x47, 0x26, 0x8b, 0x3d, 0x80, 0x7c, 0x01, 0x00,
+ 0x74, 0x04, 0x26, 0x03, 0x7d, 0x01, 0x59, 0x51,
+ 0xe8, 0x0e, 0xff, 0x26, 0x8b, 0x0d, 0x26, 0x8b,
+ 0x55, 0x02, 0x26, 0x03, 0x75, 0x04, 0x83, 0xc7,
+ 0x06, 0xa1, 0xb1, 0x32, 0xe8, 0x05, 0x00, 0x59,
+ 0xeb, 0xb5, 0x07, 0xc3, 0x1e, 0x8e, 0xd8, 0x8b,
+ 0xd9, 0x8b, 0xcb, 0x26, 0x8a, 0x05, 0x3c, 0xff,
+ 0x74, 0x02, 0x88, 0x04, 0x47, 0x46, 0xe2, 0xf3,
+ 0x81, 0xc6, 0x40, 0x01, 0x2b, 0xf3, 0x4a, 0x75,
+ 0xe8, 0x1f, 0xc3, 0xbb, 0xa0, 0x32, 0xb9, 0x0b,
+ 0x00, 0xe8, 0xaf, 0x85, 0xe8, 0x91, 0x00, 0xe8,
+ 0x20, 0x02, 0xe8, 0x18, 0xfd, 0x72, 0x5b, 0xe8,
+ 0x91, 0x83, 0x72, 0x35, 0xe8, 0x5d, 0x83, 0x73,
+ 0xeb, 0xe8, 0x4f, 0x00, 0x72, 0xe6, 0x83, 0x3e,
+ 0x1f, 0xc4, 0x00, 0x74, 0x14, 0xa1, 0x6f, 0xc4,
+ 0x3b, 0x06, 0x1f, 0xc4, 0x74, 0xd6, 0xa3, 0x21,
+ 0xc4, 0xe8, 0x80, 0x04, 0xe8, 0x45, 0x00, 0xeb,
+ 0xcb, 0xa1, 0x6f, 0xc4, 0xa3, 0x1f, 0xc4, 0xe8,
+ 0x20, 0x04, 0x72, 0x26, 0xe8, 0x27, 0x01, 0xeb,
+ 0xbb, 0xe8, 0x1f, 0x00, 0x72, 0xb6, 0x83, 0x3e,
+ 0x1f, 0xc4, 0x00, 0x75, 0xd0, 0xe8, 0x3f, 0x04,
+ 0x72, 0x10, 0xe8, 0xb9, 0x02, 0xb4, 0xea, 0xe8,
+ 0x9b, 0x00, 0xc7, 0x06, 0x6f, 0xc4, 0x00, 0x00,
+ 0xeb, 0x9a, 0xc3, 0x83, 0x3e, 0x6f, 0xc4, 0x00,
+ 0x74, 0x02, 0xf8, 0xc3, 0xe8, 0x05, 0x00, 0xe8,
+ 0xe9, 0x06, 0xf9, 0xc3, 0x33, 0xc0, 0xa3, 0x6f,
+ 0xc4, 0xa3, 0x1f, 0xc4, 0xa3, 0x21, 0xc4, 0xc3,
+ 0xbb, 0xe2, 0xc3, 0xe8, 0x01, 0x00, 0xc3, 0x53,
+ 0xe8, 0x7e, 0x07, 0x5b, 0xe8, 0x93, 0x02, 0xc3,
+ 0x33, 0xc9, 0x3b, 0x0e, 0x73, 0xc4, 0x73, 0x13,
+ 0x41, 0x51, 0xe8, 0x2c, 0xfe, 0xbb, 0x1a, 0x00,
+ 0xb9, 0x28, 0x00, 0xe8, 0x98, 0x00, 0x59, 0x72,
+ 0x2b, 0xeb, 0xe7, 0x8b, 0x0e, 0x6f, 0xc4, 0x0b,
+ 0xc9, 0x74, 0x20, 0xb4, 0xea, 0xe8, 0x3d, 0x00,
+ 0xc7, 0x06, 0x6f, 0xc4, 0x00, 0x00, 0xc7, 0x06,
+ 0x71, 0xc4, 0x00, 0x00, 0x83, 0x3e, 0x1f, 0xc4,
+ 0x00, 0x74, 0x05, 0xe8, 0x98, 0x00, 0xeb, 0x03,
+ 0xe8, 0x88, 0x06, 0xc3, 0x3b, 0x0e, 0x6f, 0xc4,
+ 0x75, 0x01, 0xc3, 0x51, 0x56, 0xb4, 0xea, 0xe8,
+ 0x13, 0x00, 0x5e, 0x59, 0x89, 0x0e, 0x6f, 0xc4,
+ 0x89, 0x36, 0x71, 0xc4, 0xb4, 0xe9, 0xe8, 0x04,
+ 0x00, 0xe8, 0x72, 0x00, 0xc3, 0x8b, 0x0e, 0xb1,
+ 0x32, 0x50, 0xe8, 0x0b, 0x00, 0x58, 0xb9, 0x00,
+ 0xa0, 0xe8, 0x04, 0x00, 0xe8, 0x98, 0x81, 0xc3,
+ 0x06, 0x8e, 0xc1, 0x8b, 0x36, 0x71, 0xc4, 0x0b,
+ 0xf6, 0x74, 0x29, 0xb9, 0x28, 0x00, 0x26, 0x88,
+ 0x24, 0x46, 0xe2, 0xfa, 0x81, 0xc6, 0x40, 0x01,
+ 0x83, 0xee, 0x28, 0xb9, 0x18, 0x00, 0x26, 0x88,
+ 0x24, 0x26, 0x88, 0x64, 0x27, 0x81, 0xc6, 0x40,
+ 0x01, 0xe2, 0xf3, 0xb9, 0x28, 0x00, 0x26, 0x88,
+ 0x24, 0x46, 0xe2, 0xfa, 0x07, 0xc3, 0x8b, 0xc6,
+ 0x33, 0xd2, 0xf7, 0x36, 0xb6, 0x00, 0x3b, 0x06,
+ 0xc2, 0x00, 0x77, 0x18, 0x3b, 0x16, 0xc0, 0x00,
+ 0x77, 0x12, 0x03, 0xc3, 0x3b, 0x06, 0xc2, 0x00,
+ 0x76, 0x0a, 0x03, 0xd1, 0x3b, 0x16, 0xc0, 0x00,
+ 0x76, 0x02, 0xf9, 0xc3, 0xf8, 0xc3, 0xe8, 0xf2,
+ 0x05, 0xe8, 0x47, 0x05, 0xe8, 0x48, 0x00, 0xbb,
+ 0x28, 0xc4, 0xbe, 0xe8, 0x1c, 0x81, 0xc6, 0x85,
+ 0x02, 0x56, 0xc6, 0x06, 0xe6, 0x1c, 0xd1, 0xe8,
+ 0x9b, 0x7f, 0x8b, 0xc6, 0x5e, 0x2b, 0xc6, 0xbe,
+ 0x05, 0x00, 0x03, 0xc6, 0x03, 0xc6, 0x40, 0x0c,
+ 0x01, 0x3d, 0x40, 0x01, 0x76, 0x03, 0xb8, 0x40,
+ 0x01, 0xa3, 0xe0, 0x1c, 0xb9, 0x40, 0x01, 0x2b,
+ 0xc8, 0xd1, 0xe9, 0xb8, 0xb4, 0x00, 0xbb, 0x40,
+ 0x01, 0xf7, 0xe3, 0x03, 0xc1, 0xa3, 0xde, 0x1c,
+ 0xb8, 0x00, 0xa0, 0xe8, 0x3f, 0x05, 0xc3, 0xbf,
+ 0x28, 0xc4, 0xb9, 0x46, 0x00, 0x32, 0xc0, 0xfc,
+ 0xf3, 0xaa, 0x8b, 0x0e, 0x6f, 0xc4, 0x0b, 0xc9,
+ 0x74, 0x06, 0xe8, 0x44, 0x00, 0x83, 0xc3, 0x02,
+ 0xbe, 0x28, 0xc4, 0x8b, 0x0e, 0x1f, 0xc4, 0x0b,
+ 0xc9, 0x74, 0x2b, 0x53, 0xe8, 0x32, 0x00, 0x83,
+ 0xc3, 0x02, 0xe8, 0x21, 0x00, 0x4e, 0xb0, 0x20,
+ 0xb4, 0x26, 0x88, 0x04, 0x88, 0x64, 0x01, 0x88,
+ 0x44, 0x02, 0x83, 0xc6, 0x03, 0x5b, 0xa1, 0x1f,
+ 0xc4, 0x8b, 0x0e, 0x6f, 0xc4, 0x0b, 0xc9, 0x74,
+ 0x04, 0x3b, 0xc1, 0x75, 0x01, 0xc3, 0x8a, 0x07,
+ 0x88, 0x04, 0x43, 0x46, 0x0a, 0xc0, 0x75, 0xf6,
+ 0xc3, 0xbb, 0x8c, 0xc4, 0x03, 0xd9, 0x8a, 0x0f,
+ 0xbb, 0xa4, 0xc4, 0xd1, 0xe1, 0x03, 0xd9, 0x8b,
+ 0x1f, 0xc3, 0xbb, 0xa0, 0x32, 0xe8, 0x96, 0x83,
+ 0x72, 0x01, 0xc3, 0xb9, 0x0b, 0x00, 0xe8, 0x7a,
+ 0x83, 0x06, 0xa1, 0xbf, 0x32, 0x8e, 0xc0, 0x33,
+ 0xc9, 0x3b, 0x0e, 0x73, 0xc4, 0x73, 0x6d, 0x41,
+ 0x51, 0xbb, 0x8c, 0xc4, 0x03, 0xd9, 0x8a, 0x07,
+ 0xbb, 0x74, 0xc4, 0x03, 0xd9, 0x33, 0xc9, 0x8a,
+ 0xc8, 0xbf, 0xfe, 0xff, 0xbe, 0xa4, 0xc4, 0xd1,
+ 0xe1, 0x03, 0xf9, 0x03, 0xf1, 0x8b, 0x34, 0x47,
+ 0x26, 0x8b, 0x3d, 0x80, 0x7c, 0x01, 0x00, 0x74,
+ 0x40, 0x33, 0xc9, 0x8a, 0x0f, 0xfe, 0xc1, 0x26,
+ 0x3a, 0x0d, 0x76, 0x02, 0xb1, 0x01, 0x88, 0x0f,
+ 0x49, 0xd1, 0xe1, 0x03, 0xf9, 0x26, 0x03, 0x7d,
+ 0x01, 0x2b, 0xf9, 0x59, 0x51, 0xe8, 0x41, 0xfc,
+ 0xe8, 0x23, 0x00, 0x56, 0x26, 0x8b, 0x0d, 0x26,
+ 0x8b, 0x55, 0x02, 0x26, 0x03, 0x75, 0x04, 0x83,
+ 0xc7, 0x06, 0xa1, 0xb1, 0x32, 0xe8, 0x34, 0xfd,
+ 0x5e, 0x56, 0xe8, 0x1e, 0x00, 0x5e, 0xe8, 0x44,
+ 0x00, 0x59, 0xeb, 0x8d, 0x07, 0xc3, 0x57, 0x56,
+ 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0xb9, 0x1a,
+ 0x00, 0xba, 0x28, 0x00, 0xe8, 0x49, 0xfc, 0x07,
+ 0x5e, 0x5f, 0xc3, 0x1e, 0x06, 0x81, 0xc6, 0x41,
+ 0x01, 0x8b, 0xfe, 0xb8, 0x00, 0xa0, 0x8e, 0xc0,
+ 0xa1, 0xb1, 0x32, 0x8e, 0xd8, 0xfc, 0xb9, 0x18,
+ 0x00, 0x51, 0xb9, 0x26, 0x00, 0xf3, 0xa4, 0x81,
+ 0xc6, 0x1a, 0x01, 0x81, 0xc7, 0x1a, 0x01, 0x59,
+ 0xe2, 0xef, 0x07, 0x1f, 0xc3, 0xbb, 0x1a, 0x00,
+ 0xb9, 0x28, 0x00, 0xb8, 0x0c, 0x00, 0x03, 0xd8,
+ 0xf7, 0x26, 0xb6, 0x00, 0x2b, 0xf0, 0xb8, 0x08,
+ 0x00, 0x2b, 0xf0, 0x03, 0xc8, 0xe8, 0x36, 0xfe,
+ 0x73, 0x03, 0xe8, 0x92, 0x7f, 0xc3, 0xe8, 0xf8,
+ 0x04, 0x8b, 0x0e, 0x6f, 0xc4, 0xe8, 0xf9, 0xfe,
+ 0x83, 0xc3, 0x02, 0x43, 0x80, 0x3f, 0x00, 0x75,
+ 0xfa, 0x43, 0x06, 0xb8, 0xd4, 0x19, 0x8e, 0xc0,
+ 0x33, 0xc0, 0x26, 0xa3, 0x0c, 0x00, 0x26, 0xa3,
+ 0x0a, 0x00, 0xbe, 0x04, 0x00, 0x53, 0xe8, 0x37,
+ 0x7e, 0x26, 0x01, 0x0e, 0x0c, 0x00, 0x26, 0x89,
+ 0x04, 0x26, 0xff, 0x06, 0x0a, 0x00, 0x83, 0xc6,
+ 0x02, 0x43, 0x8a, 0x07, 0x0a, 0xc0, 0x75, 0xe6,
+ 0x5b, 0x8b, 0xce, 0x33, 0xc0, 0x83, 0xee, 0x02,
+ 0x81, 0xfe, 0x04, 0x00, 0x72, 0x0b, 0x26, 0x8b,
+ 0x14, 0x3b, 0xc2, 0x73, 0xf0, 0x8b, 0xc2, 0xeb,
+ 0xec, 0x8b, 0xf1, 0xb9, 0x40, 0x01, 0x2b, 0xc8,
+ 0xd1, 0xe9, 0x81, 0xc1, 0xc0, 0xcb, 0x26, 0x89,
+ 0x0e, 0x00, 0x00, 0x83, 0xee, 0x02, 0x81, 0xfe,
+ 0x04, 0x00, 0x72, 0x0e, 0x26, 0x8b, 0x14, 0x8b,
+ 0xc8, 0x2b, 0xca, 0xd1, 0xe9, 0x26, 0x89, 0x0c,
+ 0xeb, 0xe9, 0xbf, 0x04, 0x00, 0xbe, 0x0e, 0x00,
+ 0x57, 0x56, 0x26, 0x03, 0x35, 0xc6, 0x06, 0xe6,
+ 0x1c, 0xd1, 0xe8, 0x78, 0x7d, 0x5e, 0x5f, 0x81,
+ 0xc6, 0xc0, 0x0d, 0x83, 0xc7, 0x02, 0x43, 0x8a,
+ 0x07, 0x0a, 0xc0, 0x75, 0xe3, 0xe8, 0xed, 0x7e,
+ 0xe8, 0x1d, 0x80, 0xe8, 0x9d, 0x03, 0xb8, 0x00,
+ 0xa0, 0xe8, 0xf2, 0x03, 0xbb, 0x92, 0x32, 0xa1,
+ 0x96, 0x32, 0x26, 0x8b, 0x0e, 0x0c, 0x00, 0xf7,
+ 0xe1, 0x8b, 0xc8, 0xc1, 0xe9, 0x03, 0x83, 0xc1,
+ 0x3c, 0xe8, 0xcf, 0x81, 0xe8, 0x43, 0xfe, 0x80,
+ 0x3e, 0x96, 0x32, 0x00, 0x74, 0x08, 0xbb, 0x92,
+ 0x32, 0xe8, 0xd2, 0x81, 0x72, 0x0a, 0xe8, 0xaa,
+ 0x7f, 0x72, 0x05, 0xe8, 0x76, 0x7f, 0x73, 0xe4,
+ 0xe8, 0x04, 0x04, 0xe8, 0xc9, 0x7e, 0x07, 0xc3,
+ 0xbb, 0x8d, 0xc4, 0x8b, 0x0e, 0x73, 0xc4, 0x03,
+ 0xd9, 0x88, 0x07, 0xff, 0x06, 0x73, 0xc4, 0xc3,
+ 0xbb, 0x8d, 0xc4, 0x8b, 0x0e, 0x73, 0xc4, 0x3a,
+ 0x07, 0x74, 0x08, 0x43, 0xe2, 0xf9, 0xb0, 0x3b,
+ 0xe9, 0x0d, 0x8c, 0x8a, 0x47, 0x01, 0x88, 0x07,
+ 0x43, 0xe2, 0xf8, 0xc6, 0x47, 0x01, 0x00, 0xff,
+ 0x0e, 0x73, 0xc4, 0xc3, 0xbb, 0x8d, 0xc4, 0x8b,
+ 0x0e, 0x73, 0xc4, 0x3a, 0x07, 0x74, 0x05, 0x43,
+ 0xe2, 0xf9, 0xf8, 0xc3, 0xf9, 0xc3, 0xbb, 0x8d,
+ 0xc4, 0x8b, 0x0e, 0x73, 0xc4, 0xc6, 0x07, 0x00,
+ 0x43, 0xe2, 0xfa, 0xc7, 0x06, 0x73, 0xc4, 0x00,
+ 0x00, 0xc3, 0xa1, 0x1f, 0xc4, 0xe8, 0xcc, 0x00,
+ 0x3c, 0x03, 0x74, 0x1e, 0x3c, 0x29, 0x74, 0x1a,
+ 0x3c, 0x25, 0x74, 0x16, 0x3c, 0x48, 0x74, 0x12,
+ 0xb0, 0xff, 0x83, 0x3e, 0xf3, 0xb4, 0x18, 0x75,
+ 0x07, 0x80, 0x3e, 0xa4, 0xdb, 0x00, 0x74, 0x02,
+ 0xf8, 0xc3, 0xa2, 0xe1, 0xc3, 0xe8, 0x8a, 0xf8,
+ 0xc6, 0x06, 0x6e, 0xc4, 0x00, 0xf9, 0xc3, 0xa1,
+ 0x6f, 0xc4, 0xe8, 0x97, 0x00, 0x3c, 0x04, 0x74,
+ 0x06, 0x3c, 0x33, 0x74, 0x02, 0xf8, 0xc3, 0xa2,
+ 0xe1, 0xc3, 0xe8, 0x6d, 0xf8, 0xc6, 0x06, 0x6e,
+ 0xc4, 0x00, 0xf9, 0xc3, 0xa1, 0x1f, 0xc4, 0xe8,
+ 0x7a, 0x00, 0x8a, 0xc8, 0xa1, 0x21, 0xc4, 0xe8,
+ 0x72, 0x00, 0x8a, 0xd0, 0xbb, 0x35, 0xc3, 0x8b,
+ 0x07, 0x3a, 0xc1, 0x75, 0x04, 0x3a, 0xe2, 0x74,
+ 0x08, 0x3a, 0xc2, 0x75, 0x53, 0x3a, 0xe1, 0x75,
+ 0x4f, 0x80, 0x7f, 0x02, 0x00, 0x74, 0x42, 0x60,
+ 0xb9, 0x45, 0x00, 0xb0, 0x01, 0xb4, 0x05, 0xff,
+ 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8,
+ 0x8e, 0xc0, 0xa0, 0x49, 0x32, 0xb4, 0x04, 0xb5,
+ 0x07, 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b,
+ 0x8e, 0xd8, 0x8e, 0xc0, 0x61, 0x53, 0x8a, 0x07,
+ 0xe8, 0x0d, 0xff, 0x5b, 0x53, 0x8a, 0x47, 0x01,
+ 0xe8, 0x05, 0xff, 0x5b, 0x53, 0x8a, 0x47, 0x02,
+ 0xe8, 0xed, 0xfe, 0x5b, 0x53, 0xe8, 0x5d, 0xf9,
+ 0x5b, 0x8b, 0x5f, 0x03, 0xe8, 0x68, 0xfb, 0xc3,
+ 0x83, 0xc3, 0x05, 0x83, 0x3f, 0x00, 0x75, 0x97,
+ 0xe8, 0x55, 0xfb, 0xc3, 0x0b, 0xc0, 0x75, 0x01,
+ 0xc3, 0x53, 0x48, 0xbb, 0x8d, 0xc4, 0x03, 0xd8,
+ 0x8a, 0x07, 0x32, 0xe4, 0x5b, 0xc3, 0x60, 0xe8,
+ 0x52, 0x06, 0xe8, 0x2f, 0x03, 0xe8, 0x85, 0x01,
+ 0xe8, 0x43, 0x02, 0xe8, 0xf2, 0x06, 0xe8, 0x72,
+ 0x03, 0xe8, 0xdb, 0x04, 0xe8, 0x8e, 0x01, 0xe8,
+ 0x4c, 0x02, 0xe8, 0x7b, 0x7e, 0xe8, 0xc1, 0x0b,
+ 0xe8, 0x74, 0x05, 0xe8, 0xc2, 0x01, 0xe8, 0x89,
+ 0x02, 0xe8, 0x33, 0x7d, 0x61, 0xc3, 0xe8, 0x2a,
+ 0x00, 0x0b, 0xc0, 0x74, 0x17, 0x3d, 0x03, 0x00,
+ 0x74, 0x12, 0x3d, 0x01, 0x00, 0x74, 0x0e, 0xc6,
+ 0x06, 0xda, 0x1c, 0x02, 0xe8, 0xb7, 0xff, 0xc6,
+ 0x06, 0xda, 0x1c, 0x03, 0xc3, 0xc6, 0x06, 0xda,
+ 0x1c, 0x01, 0xe8, 0xa9, 0xff, 0xc6, 0x06, 0xda,
+ 0x1c, 0x00, 0xc3, 0xbb, 0x54, 0x72, 0xe8, 0x01,
+ 0x17, 0x8b, 0xf3, 0x8b, 0x1c, 0x0b, 0xdb, 0x74,
+ 0x0a, 0xe8, 0xd3, 0x00, 0x72, 0x20, 0x83, 0xc6,
+ 0x02, 0xeb, 0xf0, 0x83, 0x3e, 0x52, 0x72, 0x00,
+ 0x75, 0x03, 0x33, 0xc0, 0xc3, 0xc7, 0x06, 0x52,
+ 0x72, 0x00, 0x00, 0x83, 0x3e, 0x1f, 0xc4, 0x00,
+ 0x75, 0x11, 0xb8, 0x01, 0x00, 0xc3, 0x3b, 0x06,
+ 0x52, 0x72, 0x75, 0x04, 0xb8, 0x03, 0x00, 0xc3,
+ 0xa3, 0x52, 0x72, 0xa1, 0xde, 0x1c, 0xa3, 0xe2,
+ 0x1c, 0xa1, 0xe0, 0x1c, 0xa3, 0xe4, 0x1c, 0x53,
+ 0xc6, 0x06, 0xda, 0x1c, 0x01, 0xe8, 0xdd, 0x00,
+ 0xe8, 0xc0, 0x00, 0x5b, 0x83, 0xc3, 0x13, 0xe8,
+ 0x45, 0x00, 0xbb, 0x28, 0xc4, 0xbe, 0xe8, 0x1c,
+ 0x81, 0xc6, 0x85, 0x02, 0x56, 0xc6, 0x06, 0xe6,
+ 0x1c, 0xd1, 0xe8, 0x10, 0x7b, 0x8b, 0xc6, 0x5e,
+ 0x2b, 0xc6, 0xbe, 0x05, 0x00, 0x03, 0xc6, 0x03,
+ 0xc6, 0x40, 0x0c, 0x01, 0x3d, 0x40, 0x01, 0x76,
+ 0x03, 0xb8, 0x40, 0x01, 0xa3, 0xe0, 0x1c, 0xb9,
+ 0x40, 0x01, 0x2b, 0xc8, 0xd1, 0xe9, 0xb8, 0xb4,
+ 0x00, 0xbb, 0x40, 0x01, 0xf7, 0xe3, 0x03, 0xc1,
+ 0xa3, 0xde, 0x1c, 0xb8, 0x02, 0x00, 0xc3, 0xbf,
+ 0x28, 0xc4, 0xb9, 0x46, 0x00, 0x32, 0xc0, 0xfc,
+ 0xf3, 0xaa, 0xbe, 0x28, 0xc4, 0x8b, 0x0e, 0x1f,
+ 0xc4, 0x0b, 0xc9, 0x74, 0x26, 0x53, 0xe8, 0xb8,
+ 0xfb, 0x83, 0xc3, 0x02, 0xe8, 0xa7, 0xfb, 0x4e,
+ 0xb0, 0x20, 0xb4, 0x26, 0x88, 0x04, 0x88, 0x64,
+ 0x01, 0x88, 0x44, 0x02, 0x83, 0xc6, 0x03, 0x5b,
+ 0xa1, 0x1f, 0xc4, 0x8b, 0x0e, 0x52, 0x72, 0x0b,
+ 0xc9, 0x74, 0x03, 0xe8, 0x88, 0xfb, 0xc3, 0x8a,
+ 0x47, 0x12, 0x0a, 0xc0, 0x74, 0x29, 0xa1, 0xc0,
+ 0x00, 0x8b, 0x16, 0xc2, 0x00, 0x8b, 0x4f, 0x01,
+ 0x3b, 0xc1, 0x72, 0x1b, 0x8b, 0x4f, 0x03, 0x3b,
+ 0xd1, 0x72, 0x14, 0x8b, 0x4f, 0x05, 0x3b, 0xc1,
+ 0x77, 0x0d, 0x8b, 0x4f, 0x07, 0x3b, 0xd1, 0x77,
+ 0x06, 0x33, 0xc0, 0x8a, 0x07, 0xf9, 0xc3, 0x33,
+ 0xc0, 0xf8, 0xc3, 0xbe, 0xe8, 0x1c, 0xb9, 0x0f,
+ 0x00, 0xb0, 0xff, 0xb4, 0xe0, 0xba, 0x40, 0x01,
+ 0x88, 0x04, 0x86, 0xc4, 0x46, 0x4a, 0x75, 0xf8,
+ 0x86, 0xc4, 0xe2, 0xf1, 0xc3, 0xa0, 0xda, 0x1c,
+ 0x3c, 0x00, 0x75, 0x01, 0xc3, 0x3c, 0x03, 0x75,
+ 0x01, 0xc3, 0xa1, 0xb3, 0x32, 0x8b, 0x1e, 0xb1,
+ 0x32, 0xe8, 0x81, 0x00, 0xc3, 0xa0, 0xda, 0x1c,
+ 0x3c, 0x00, 0x75, 0x01, 0xc3, 0x3c, 0x01, 0x75,
+ 0x01, 0xc3, 0xa1, 0xb1, 0x32, 0x06, 0x8e, 0xc0,
+ 0x8b, 0x36, 0xde, 0x1c, 0x8b, 0x16, 0xe0, 0x1c,
+ 0xbf, 0xe8, 0x1c, 0xb9, 0x0f, 0x00, 0x8b, 0xda,
+ 0x8a, 0x05, 0x3c, 0xff, 0x74, 0x03, 0x26, 0x88,
+ 0x04, 0x46, 0x47, 0x4a, 0x75, 0xf2, 0x8b, 0xd3,
+ 0x81, 0xc6, 0x40, 0x01, 0x2b, 0xf2, 0x81, 0xc7,
+ 0x40, 0x01, 0x2b, 0xfa, 0xe2, 0xe0, 0x07, 0xc3,
+ 0xa0, 0xda, 0x1c, 0x3c, 0x00, 0x75, 0x01, 0xc3,
+ 0x3c, 0x03, 0x75, 0x01, 0xc3, 0xa1, 0xe4, 0x1c,
+ 0x3b, 0x06, 0xe0, 0x1c, 0x72, 0x1d, 0xff, 0x36,
+ 0xe0, 0x1c, 0xff, 0x36, 0xde, 0x1c, 0xa3, 0xe0,
+ 0x1c, 0xa1, 0xe2, 0x1c, 0xa3, 0xde, 0x1c, 0xe8,
+ 0x09, 0x00, 0x8f, 0x06, 0xde, 0x1c, 0x8f, 0x06,
+ 0xe0, 0x1c, 0xc3, 0xa1, 0xb1, 0x32, 0xbb, 0x00,
+ 0xa0, 0xe8, 0x01, 0x00, 0xc3, 0x8b, 0x36, 0xde,
+ 0x1c, 0x8b, 0x16, 0xe0, 0x1c, 0xb9, 0x0f, 0x00,
+ 0x1e, 0x06, 0x8e, 0xdb, 0x8e, 0xc0, 0x8b, 0xda,
+ 0x26, 0x8a, 0x04, 0x88, 0x04, 0x46, 0x4a, 0x75,
+ 0xf7, 0x8b, 0xd3, 0x81, 0xc6, 0x40, 0x01, 0x2b,
+ 0xf2, 0xe2, 0xeb, 0x07, 0x1f, 0xc3, 0xa0, 0xdb,
+ 0x1c, 0x3c, 0x00, 0x75, 0x01, 0xc3, 0x3c, 0x03,
+ 0x75, 0x01, 0xc3, 0xa1, 0xb3, 0x32, 0x8b, 0x1e,
+ 0xb1, 0x32, 0xe8, 0x78, 0x00, 0xc3, 0xa0, 0xdb,
+ 0x1c, 0x3c, 0x00, 0x75, 0x01, 0xc3, 0x3c, 0x01,
+ 0x75, 0x01, 0xc3, 0xa1, 0xb1, 0x32, 0x1e, 0x06,
+ 0xba, 0xd4, 0x19, 0x8e, 0xc2, 0x26, 0x8b, 0x36,
+ 0x00, 0x00, 0x26, 0x8b, 0x16, 0x02, 0x00, 0xbf,
+ 0x0e, 0x00, 0xb9, 0x21, 0x00, 0x8e, 0xd8, 0x8b,
+ 0xda, 0x26, 0x8a, 0x05, 0x3c, 0xff, 0x74, 0x02,
+ 0x88, 0x04, 0x46, 0x47, 0x4a, 0x75, 0xf2, 0x8b,
+ 0xd3, 0x81, 0xc6, 0x40, 0x01, 0x2b, 0xf2, 0x81,
+ 0xc7, 0x40, 0x01, 0x2b, 0xfa, 0xe2, 0xe0, 0x07,
+ 0x1f, 0xc3, 0xa0, 0xdb, 0x1c, 0x3c, 0x00, 0x75,
+ 0x01, 0xc3, 0x3c, 0x03, 0x75, 0x01, 0xc3, 0xa1,
+ 0xb1, 0x32, 0xbb, 0x00, 0xa0, 0xe8, 0x15, 0x00,
+ 0xc3, 0x1e, 0xb9, 0xd4, 0x19, 0x8e, 0xd9, 0xbb,
+ 0x0e, 0x00, 0xb9, 0x40, 0x29, 0xc6, 0x07, 0xff,
+ 0x43, 0xe2, 0xfa, 0x1f, 0xc3, 0x1e, 0xb9, 0xd4,
+ 0x19, 0x8e, 0xd9, 0x8b, 0x36, 0x00, 0x00, 0x8b,
+ 0x16, 0x02, 0x00, 0xb9, 0x21, 0x00, 0x1f, 0x1e,
+ 0x06, 0x8e, 0xdb, 0x8e, 0xc0, 0x8b, 0xda, 0x26,
+ 0x8a, 0x04, 0x88, 0x04, 0x46, 0x4a, 0x75, 0xf7,
+ 0x8b, 0xd3, 0x81, 0xc6, 0x40, 0x01, 0x2b, 0xf2,
+ 0xe2, 0xeb, 0x07, 0x1f, 0xc3, 0xbb, 0xa4, 0x32,
+ 0xe8, 0x6b, 0x7d, 0x73, 0x1e, 0x8b, 0x0e, 0x90,
+ 0x32, 0xe8, 0x4f, 0x7d, 0xc6, 0x06, 0x33, 0x33,
+ 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xe8, 0xd5,
+ 0xfc, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06,
+ 0xdd, 0x1c, 0x03, 0xc3, 0xb9, 0x01, 0x00, 0xbb,
+ 0xc7, 0x32, 0x53, 0x51, 0x49, 0xb0, 0x1b, 0xf6,
+ 0xe1, 0x03, 0xd8, 0x8b, 0x07, 0x0b, 0xc0, 0x74,
+ 0x0c, 0x8b, 0x7f, 0x12, 0x8b, 0x4f, 0x14, 0x8b,
+ 0x5f, 0x10, 0xe8, 0x09, 0x00, 0x59, 0x5b, 0x41,
+ 0x80, 0xf9, 0x04, 0x76, 0xdd, 0xc3, 0x1e, 0x06,
+ 0xa1, 0xb3, 0x32, 0x8e, 0xc0, 0xa1, 0xb1, 0x32,
+ 0x8e, 0xd8, 0x8b, 0xd1, 0x8b, 0xcf, 0x26, 0x8a,
+ 0x07, 0x88, 0x07, 0x43, 0xe2, 0xf8, 0x8b, 0xca,
+ 0x81, 0xc3, 0x40, 0x01, 0x2b, 0xdf, 0xe2, 0xea,
+ 0x07, 0x1f, 0xc3, 0x80, 0x3e, 0x33, 0x33, 0x01,
+ 0x74, 0x01, 0xc3, 0xb9, 0x01, 0x00, 0xbf, 0xc7,
+ 0x32, 0x57, 0x51, 0x49, 0xb0, 0x1b, 0xf6, 0xe1,
+ 0x03, 0xf8, 0x8b, 0x05, 0x0b, 0xc0, 0x74, 0x06,
+ 0x8b, 0x45, 0x16, 0xe8, 0x09, 0x00, 0x59, 0x5f,
+ 0x41, 0x80, 0xf9, 0x04, 0x76, 0xe3, 0xc3, 0x06,
+ 0x8e, 0xc0, 0x51, 0xbb, 0xff, 0xff, 0x8b, 0x05,
+ 0xb9, 0x03, 0x00, 0xf7, 0xe1, 0x03, 0xd8, 0xbe,
+ 0x00, 0x00, 0x26, 0x8b, 0x34, 0x8b, 0xd6, 0x3b,
+ 0xde, 0x72, 0x06, 0xc7, 0x05, 0x01, 0x00, 0xeb,
+ 0xe2, 0xff, 0x05, 0x33, 0xc9, 0x26, 0x8a, 0x0f,
+ 0x88, 0x4d, 0x1a, 0x26, 0x8b, 0x77, 0x01, 0x89,
+ 0x75, 0x0a, 0x8b, 0xda, 0x43, 0x83, 0xeb, 0x02,
+ 0xd1, 0xe1, 0x03, 0xd9, 0x26, 0x8b, 0x1f, 0x03,
+ 0xda, 0x26, 0x8b, 0x07, 0x89, 0x45, 0x0c, 0x26,
+ 0x8b, 0x47, 0x02, 0x89, 0x45, 0x0e, 0x83, 0xc3,
+ 0x04, 0x89, 0x5d, 0x18, 0x33, 0xd2, 0x8b, 0xc6,
+ 0xf7, 0x36, 0xb6, 0x00, 0x89, 0x16, 0x4f, 0x33,
+ 0xa3, 0x57, 0x33, 0x03, 0x55, 0x0c, 0x03, 0x45,
+ 0x0e, 0x89, 0x16, 0x51, 0x33, 0xa3, 0x59, 0x33,
+ 0x59, 0xe8, 0x85, 0x00, 0x33, 0xd2, 0x8b, 0x45,
+ 0x10, 0xf7, 0x36, 0xb6, 0x00, 0x89, 0x16, 0x53,
+ 0x33, 0xa3, 0x5b, 0x33, 0x03, 0x55, 0x12, 0x03,
+ 0x45, 0x14, 0x89, 0x16, 0x55, 0x33, 0xa3, 0x5d,
+ 0x33, 0xa1, 0x4f, 0x33, 0x8b, 0x1e, 0x53, 0x33,
+ 0x3b, 0xc3, 0x76, 0x04, 0x89, 0x1e, 0x4f, 0x33,
+ 0xa1, 0x51, 0x33, 0x8b, 0x1e, 0x55, 0x33, 0x3b,
+ 0xc3, 0x77, 0x04, 0x89, 0x1e, 0x51, 0x33, 0xa1,
+ 0x57, 0x33, 0x8b, 0x1e, 0x5b, 0x33, 0x3b, 0xc3,
+ 0x76, 0x04, 0x89, 0x1e, 0x57, 0x33, 0xa1, 0x59,
+ 0x33, 0x8b, 0x1e, 0x5d, 0x33, 0x3b, 0xc3, 0x77,
+ 0x04, 0x89, 0x1e, 0x59, 0x33, 0x07, 0xa1, 0x4f,
+ 0x33, 0x89, 0x45, 0x02, 0xa1, 0x57, 0x33, 0x89,
+ 0x45, 0x04, 0xa1, 0x51, 0x33, 0x89, 0x45, 0x06,
+ 0xa1, 0x59, 0x33, 0x89, 0x45, 0x08, 0x8b, 0x45,
+ 0x0c, 0x89, 0x45, 0x12, 0x8b, 0x45, 0x0e, 0x89,
+ 0x45, 0x14, 0x8b, 0x45, 0x0a, 0x89, 0x45, 0x10,
+ 0xc3, 0x80, 0x3e, 0x34, 0x33, 0x01, 0x74, 0x01,
+ 0xc3, 0xbb, 0x9e, 0xd8, 0x8b, 0x16, 0xf3, 0xb4,
+ 0x4a, 0xc1, 0xe2, 0x02, 0x03, 0xda, 0x03, 0xd9,
+ 0x33, 0xc9, 0x8a, 0x0f, 0x80, 0xf9, 0xff, 0x74,
+ 0x25, 0x49, 0xbb, 0x54, 0x72, 0xe8, 0x92, 0x12,
+ 0xd1, 0xe1, 0x03, 0xd9, 0x8b, 0x1f, 0x43, 0xa1,
+ 0x4f, 0x33, 0x89, 0x07, 0xa1, 0x57, 0x33, 0x89,
+ 0x47, 0x02, 0xa1, 0x51, 0x33, 0x89, 0x47, 0x04,
+ 0xa1, 0x59, 0x33, 0x89, 0x47, 0x06, 0xc3, 0xb9,
+ 0x01, 0x00, 0xbf, 0xc7, 0x32, 0x57, 0x51, 0x49,
+ 0xb0, 0x1b, 0xf6, 0xe1, 0x03, 0xf8, 0x8b, 0x05,
+ 0x0b, 0xc0, 0x74, 0x15, 0x8b, 0x45, 0x0a, 0x33,
+ 0xd2, 0xf7, 0x36, 0xb6, 0x00, 0x03, 0x45, 0x0e,
+ 0x3b, 0x06, 0xb1, 0x64, 0x73, 0x03, 0xe8, 0x48,
+ 0x00, 0x59, 0x5f, 0x41, 0x80, 0xf9, 0x04, 0x76,
+ 0xd4, 0x80, 0x3e, 0xdc, 0x1c, 0x01, 0x74, 0x03,
+ 0xe8, 0x6c, 0x03, 0xe8, 0x9f, 0x05, 0xb9, 0x01,
+ 0x00, 0xbf, 0xc7, 0x32, 0x57, 0x51, 0x49, 0xb0,
+ 0x1b, 0xf6, 0xe1, 0x03, 0xf8, 0x8b, 0x05, 0x0b,
+ 0xc0, 0x74, 0x15, 0x8b, 0x45, 0x0a, 0x33, 0xd2,
+ 0xf7, 0x36, 0xb6, 0x00, 0x03, 0x45, 0x0e, 0x3b,
+ 0x06, 0xb1, 0x64, 0x72, 0x03, 0xe8, 0x09, 0x00,
+ 0x59, 0x5f, 0x41, 0x80, 0xf9, 0x04, 0x76, 0xd4,
+ 0xc3, 0x8b, 0x45, 0x16, 0x8b, 0x5d, 0x0a, 0x8b,
+ 0x55, 0x0c, 0x8b, 0x4d, 0x0e, 0x8b, 0x75, 0x18,
+ 0x1e, 0x06, 0x8e, 0xc0, 0xa1, 0xb1, 0x32, 0x8e,
+ 0xd8, 0x8b, 0xf9, 0x8b, 0xca, 0x26, 0x8a, 0x04,
+ 0x3c, 0xff, 0x74, 0x02, 0x88, 0x07, 0x46, 0x43,
+ 0xe2, 0xf3, 0x8b, 0xcf, 0x81, 0xc3, 0x40, 0x01,
+ 0x2b, 0xda, 0xe2, 0xe5, 0x07, 0x1f, 0xc3, 0x80,
+ 0x3e, 0xdd, 0x1c, 0x02, 0x74, 0x01, 0xc3, 0xb9,
+ 0x01, 0x00, 0xbf, 0xc7, 0x32, 0x57, 0x51, 0x49,
+ 0xb0, 0x1b, 0xf6, 0xe1, 0x03, 0xf8, 0x8b, 0x05,
+ 0x0b, 0xc0, 0x74, 0x0f, 0x8b, 0x45, 0x04, 0x8b,
+ 0x5d, 0x02, 0x8b, 0x4d, 0x08, 0x8b, 0x7d, 0x06,
+ 0xe8, 0x09, 0x00, 0x59, 0x5f, 0x41, 0x80, 0xf9,
+ 0x04, 0x76, 0xda, 0xc3, 0x1e, 0x06, 0x8b, 0x16,
+ 0xb1, 0x32, 0x8e, 0xc2, 0x50, 0xba, 0x40, 0x01,
+ 0xf7, 0xe2, 0x03, 0xc3, 0x2b, 0xfb, 0x5a, 0x2b,
+ 0xca, 0x8b, 0xd8, 0xb8, 0x00, 0xa0, 0x8e, 0xd8,
+ 0x8b, 0xd1, 0x8b, 0xcf, 0x26, 0x8a, 0x07, 0x88,
+ 0x07, 0x43, 0xe2, 0xf8, 0x8b, 0xca, 0x81, 0xc3,
+ 0x40, 0x01, 0x2b, 0xdf, 0xe2, 0xea, 0x07, 0x1f,
+ 0xc3, 0x50, 0x32, 0xe4, 0x48, 0xbb, 0x9e, 0xd8,
+ 0x8b, 0x16, 0xf3, 0xb4, 0x4a, 0xc1, 0xe2, 0x02,
+ 0x03, 0xda, 0x03, 0xd8, 0x58, 0x88, 0x27, 0xc3,
+ 0x50, 0xe8, 0x18, 0xfd, 0xe8, 0x35, 0x00, 0x58,
+ 0x32, 0xe4, 0xbb, 0xc7, 0x32, 0xb1, 0x1b, 0x48,
+ 0xf6, 0xe1, 0x03, 0xd8, 0xc7, 0x07, 0x00, 0x00,
+ 0x53, 0xe8, 0xcc, 0x00, 0xe8, 0xb8, 0xfe, 0xe8,
+ 0x5e, 0x78, 0x5b, 0x53, 0xff, 0x07, 0xff, 0x36,
+ 0xdd, 0x1c, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xe8,
+ 0x4d, 0xff, 0x8f, 0x06, 0xdd, 0x1c, 0x5b, 0xc7,
+ 0x07, 0x00, 0x00, 0xc3, 0x8b, 0x1e, 0x30, 0x32,
+ 0x8b, 0x3e, 0x2e, 0x32, 0x8b, 0x0e, 0x2c, 0x32,
+ 0x1e, 0x06, 0xa1, 0xb3, 0x32, 0x8e, 0xc0, 0xa1,
+ 0xb1, 0x32, 0x8e, 0xd8, 0x8b, 0xd1, 0x8b, 0xcf,
+ 0x81, 0xfb, 0xff, 0xf9, 0x77, 0x05, 0x26, 0x8a,
+ 0x07, 0x88, 0x07, 0x43, 0xe2, 0xf2, 0x8b, 0xca,
+ 0x81, 0xc3, 0x40, 0x01, 0x2b, 0xdf, 0xe2, 0xe4,
+ 0x07, 0x1f, 0xc3, 0x06, 0xa1, 0xbf, 0x32, 0x8e,
+ 0xc0, 0x33, 0xc0, 0xa3, 0x28, 0x32, 0xa3, 0x2a,
+ 0x32, 0xbb, 0xff, 0xff, 0x8a, 0x0e, 0x07, 0x66,
+ 0xb8, 0x03, 0x00, 0xf6, 0xe1, 0x03, 0xd8, 0xbe,
+ 0x00, 0x00, 0x26, 0x8b, 0x34, 0x8b, 0xd6, 0x3b,
+ 0xde, 0x72, 0x03, 0x07, 0xf9, 0xc3, 0xfe, 0x06,
+ 0x07, 0x66, 0x33, 0xc9, 0x26, 0x8a, 0x0f, 0x26,
+ 0x8b, 0x77, 0x01, 0x8b, 0xda, 0x43, 0x83, 0xeb,
+ 0x02, 0xd1, 0xe1, 0x03, 0xd9, 0x26, 0x8b, 0x1f,
+ 0x03, 0xda, 0x26, 0x8b, 0x3f, 0x26, 0x8b, 0x4f,
+ 0x02, 0x83, 0xc3, 0x04, 0x89, 0x1e, 0xde, 0x64,
+ 0x89, 0x0e, 0xe2, 0x64, 0x89, 0x3e, 0xe0, 0x64,
+ 0x89, 0x36, 0xe4, 0x64, 0x51, 0xe8, 0x31, 0x01,
+ 0x59, 0x89, 0x0e, 0x2c, 0x32, 0x89, 0x3e, 0x2e,
+ 0x32, 0x89, 0x36, 0x30, 0x32, 0x07, 0xf8, 0xc3,
+ 0x06, 0xa1, 0xbf, 0x32, 0x8e, 0xc0, 0x8b, 0x1e,
+ 0xe6, 0x64, 0x26, 0x8b, 0x3f, 0x43, 0x43, 0x26,
+ 0x8b, 0x0f, 0x43, 0x43, 0xa1, 0xb1, 0x64, 0x2d,
+ 0x3e, 0x00, 0xba, 0x40, 0x01, 0xf7, 0xe2, 0x03,
+ 0x06, 0xaf, 0x64, 0x8b, 0xd7, 0xd1, 0xea, 0x52,
+ 0x2b, 0xc2, 0x8b, 0xf0, 0x26, 0x8b, 0x07, 0x03,
+ 0xf0, 0x33, 0xd2, 0xf7, 0x36, 0xb6, 0x00, 0x89,
+ 0x16, 0x28, 0x32, 0xa3, 0x2a, 0x32, 0x5a, 0x43,
+ 0x43, 0x89, 0x1e, 0xde, 0x64, 0x89, 0x0e, 0xe2,
+ 0x64, 0x89, 0x3e, 0xe0, 0x64, 0x89, 0x36, 0xe4,
+ 0x64, 0x51, 0x57, 0x56, 0x51, 0x52, 0xe8, 0xc8,
+ 0x00, 0x5a, 0x59, 0xc6, 0x06, 0xae, 0x64, 0x00,
+ 0xc7, 0x06, 0xba, 0x00, 0x3f, 0x01, 0xc7, 0x06,
+ 0xb8, 0x00, 0x00, 0x00, 0xc7, 0x06, 0xbc, 0x00,
+ 0x00, 0x00, 0xc7, 0x06, 0xbe, 0x00, 0xc7, 0x00,
+ 0xa1, 0xaf, 0x64, 0x2b, 0xc2, 0x72, 0x09, 0x03,
+ 0x06, 0x28, 0x32, 0x3d, 0x00, 0x00, 0x73, 0x1b,
+ 0xc6, 0x06, 0xae, 0x64, 0x01, 0xa1, 0xaf, 0x64,
+ 0x03, 0xc2, 0x03, 0x06, 0x28, 0x32, 0x8b, 0x1e,
+ 0x34, 0x32, 0x3b, 0xc3, 0x76, 0x02, 0x8b, 0xc3,
+ 0xa3, 0xba, 0x00, 0xa1, 0xaf, 0x64, 0x03, 0xc2,
+ 0x03, 0x06, 0x28, 0x32, 0x3d, 0x3f, 0x01, 0x76,
+ 0x16, 0xc6, 0x06, 0xae, 0x64, 0x01, 0x2b, 0xc2,
+ 0x2b, 0xc2, 0x8b, 0x1e, 0x32, 0x32, 0x3b, 0xc3,
+ 0x76, 0x02, 0x8b, 0xc3, 0xa3, 0xb8, 0x00, 0xa1,
+ 0xb1, 0x64, 0x2b, 0xc1, 0x72, 0x09, 0x03, 0x06,
+ 0x2a, 0x32, 0x3d, 0x00, 0x00, 0x73, 0x19, 0xc6,
+ 0x06, 0xae, 0x64, 0x01, 0xa1, 0xb1, 0x64, 0x03,
+ 0x06, 0x2a, 0x32, 0x8b, 0x1e, 0x3c, 0x32, 0x3b,
+ 0xc3, 0x76, 0x02, 0x8b, 0xc3, 0xa3, 0xbe, 0x00,
+ 0xa1, 0xb1, 0x64, 0x03, 0x06, 0x2a, 0x32, 0x3d,
+ 0xc7, 0x00, 0x76, 0x14, 0xc6, 0x06, 0xae, 0x64,
+ 0x01, 0x2b, 0xc1, 0x8b, 0x1e, 0x3a, 0x32, 0x3b,
+ 0xc3, 0x73, 0x02, 0x8b, 0xc3, 0xa3, 0xbc, 0x00,
+ 0x5e, 0x5f, 0x59, 0x89, 0x0e, 0x2c, 0x32, 0x89,
+ 0x3e, 0x2e, 0x32, 0x89, 0x36, 0x30, 0x32, 0x07,
+ 0xc3, 0x33, 0xd2, 0x8b, 0xc6, 0xf7, 0x36, 0xb6,
+ 0x00, 0x89, 0x16, 0x32, 0x32, 0xa3, 0x3a, 0x32,
+ 0x03, 0xd7, 0x03, 0xc1, 0x89, 0x16, 0x34, 0x32,
+ 0xa3, 0x3c, 0x32, 0x33, 0xd2, 0xa1, 0x30, 0x32,
+ 0xf7, 0x36, 0xb6, 0x00, 0x89, 0x16, 0x36, 0x32,
+ 0xa3, 0x3e, 0x32, 0x03, 0x16, 0x2e, 0x32, 0x03,
+ 0x06, 0x2c, 0x32, 0x89, 0x16, 0x38, 0x32, 0xa3,
+ 0x40, 0x32, 0xa1, 0x32, 0x32, 0x8b, 0x1e, 0x36,
+ 0x32, 0x3b, 0xc3, 0x76, 0x04, 0x89, 0x1e, 0x32,
+ 0x32, 0xa1, 0x34, 0x32, 0x8b, 0x1e, 0x38, 0x32,
+ 0x3b, 0xc3, 0x77, 0x04, 0x89, 0x1e, 0x34, 0x32,
+ 0xa1, 0x3a, 0x32, 0x8b, 0x1e, 0x3e, 0x32, 0x3b,
+ 0xc3, 0x76, 0x04, 0x89, 0x1e, 0x3a, 0x32, 0xa1,
+ 0x3c, 0x32, 0x8b, 0x1e, 0x40, 0x32, 0x3b, 0xc3,
+ 0x77, 0x04, 0x89, 0x1e, 0x3c, 0x32, 0xc3, 0x55,
+ 0x1e, 0x06, 0xe8, 0x04, 0x00, 0x07, 0x1f, 0x5d,
+ 0xc3, 0x8b, 0x1e, 0xde, 0x64, 0x8b, 0x0e, 0xe2,
+ 0x64, 0x8b, 0x3e, 0xe0, 0x64, 0x8b, 0x36, 0xe4,
+ 0x64, 0xa1, 0xbf, 0x32, 0x8e, 0xc0, 0x8b, 0xc1,
+ 0x03, 0xdf, 0x81, 0xc6, 0x40, 0x01, 0xe2, 0xf8,
+ 0x8b, 0xc8, 0x81, 0xee, 0x40, 0x01, 0x03, 0xf7,
+ 0x4e, 0x4b, 0x8b, 0xc7, 0xf7, 0x26, 0xd8, 0x64,
+ 0x33, 0xd2, 0xf7, 0x36, 0xda, 0x64, 0xd1, 0xe8,
+ 0x2b, 0xf0, 0xa0, 0xae, 0x64, 0x8a, 0x26, 0xdc,
+ 0x64, 0x8a, 0x16, 0xcb, 0x64, 0x8b, 0x2e, 0xb1,
+ 0x32, 0x8e, 0xdd, 0xbd, 0x00, 0xfa, 0x0a, 0xc0,
+ 0x74, 0x03, 0xe9, 0xa8, 0x00, 0x0a, 0xe4, 0x74,
+ 0x56, 0x80, 0xfa, 0x01, 0x74, 0x51, 0x3e, 0x8b,
+ 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02, 0x43, 0x2b,
+ 0xdf, 0x51, 0x56, 0x8b, 0xcf, 0x83, 0xea, 0x64,
+ 0x77, 0x0c, 0x3e, 0x03, 0x56, 0x00, 0x3e, 0x03,
+ 0x56, 0x02, 0x5e, 0x59, 0xeb, 0x2e, 0x52, 0x3e,
+ 0x8b, 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02, 0x83,
+ 0xea, 0x64, 0x77, 0x0a, 0x3e, 0x03, 0x56, 0x00,
+ 0x3e, 0x03, 0x56, 0x02, 0xeb, 0x0a, 0x26, 0x8a,
+ 0x07, 0x3c, 0xff, 0x74, 0x02, 0x88, 0x04, 0x4e,
+ 0x43, 0xe2, 0xe4, 0x5a, 0x5e, 0x59, 0x81, 0xee,
+ 0x40, 0x01, 0x2b, 0xdf, 0xe2, 0xb9, 0xc3, 0x3e,
+ 0x8b, 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02, 0x51,
+ 0x56, 0x8b, 0xcf, 0x83, 0xea, 0x64, 0x77, 0x0e,
+ 0x3e, 0x03, 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02,
+ 0x2b, 0xd9, 0x5e, 0x59, 0xeb, 0x2c, 0x52, 0x3e,
+ 0x8b, 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02, 0x83,
+ 0xea, 0x64, 0x77, 0x0a, 0x3e, 0x03, 0x56, 0x00,
+ 0x3e, 0x03, 0x56, 0x02, 0xeb, 0x0a, 0x26, 0x8a,
+ 0x07, 0x3c, 0xff, 0x74, 0x02, 0x88, 0x04, 0x4e,
+ 0x4b, 0xe2, 0xe4, 0x5a, 0x5e, 0x59, 0x81, 0xee,
+ 0x40, 0x01, 0xe2, 0xbb, 0xc3, 0x0a, 0xe4, 0x75,
+ 0x03, 0xe9, 0x8d, 0x00, 0x80, 0xfa, 0x01, 0x75,
+ 0x03, 0xe9, 0x85, 0x00, 0xe8, 0x04, 0x01, 0x43,
+ 0xba, 0x3b, 0x0b, 0x8e, 0xda, 0x8b, 0x16, 0xb1,
+ 0x32, 0x8e, 0xda, 0x2b, 0xdf, 0x51, 0x56, 0x8b,
+ 0xcf, 0x3e, 0x83, 0x6e, 0x04, 0x64, 0x77, 0x07,
+ 0xe8, 0xf5, 0x00, 0x5e, 0x59, 0xeb, 0x5f, 0x3e,
+ 0xff, 0x76, 0x04, 0xe8, 0xdd, 0x00, 0x1e, 0x3e,
+ 0x83, 0x6e, 0x04, 0x64, 0x77, 0x05, 0xe8, 0xdf,
+ 0x00, 0xeb, 0x3b, 0x26, 0x8a, 0x07, 0x3c, 0xff,
+ 0x74, 0x33, 0xba, 0x3b, 0x0b, 0x8e, 0xda, 0xa2,
+ 0x27, 0x32, 0x8b, 0xc6, 0x33, 0xd2, 0xf7, 0x36,
+ 0xb6, 0x00, 0x3b, 0x16, 0xba, 0x00, 0x77, 0x1d,
+ 0x3b, 0x16, 0xb8, 0x00, 0x72, 0x17, 0x3b, 0x06,
+ 0xbe, 0x00, 0x77, 0x11, 0x3b, 0x06, 0xbc, 0x00,
+ 0x72, 0x0b, 0xa0, 0x27, 0x32, 0x8b, 0x16, 0xb1,
+ 0x32, 0x8e, 0xda, 0x88, 0x04, 0x4e, 0x43, 0x1f,
+ 0xe2, 0xb4, 0x3e, 0x8f, 0x46, 0x04, 0x5e, 0x59,
+ 0x81, 0xee, 0x40, 0x01, 0x2b, 0xdf, 0xe2, 0x80,
+ 0xc3, 0xe8, 0x7f, 0x00, 0xba, 0x3b, 0x0b, 0x8e,
+ 0xda, 0x8b, 0x16, 0xb1, 0x32, 0x8e, 0xda, 0x51,
+ 0x56, 0x8b, 0xcf, 0x3e, 0x83, 0x6e, 0x04, 0x64,
+ 0x77, 0x09, 0xe8, 0x73, 0x00, 0x2b, 0xd9, 0x5e,
+ 0x59, 0xeb, 0x5d, 0x3e, 0xff, 0x76, 0x04, 0xe8,
+ 0x59, 0x00, 0x1e, 0x3e, 0x83, 0x6e, 0x04, 0x64,
+ 0x77, 0x05, 0xe8, 0x5b, 0x00, 0xeb, 0x3b, 0x26,
+ 0x8a, 0x07, 0x3c, 0xff, 0x74, 0x33, 0xba, 0x3b,
+ 0x0b, 0x8e, 0xda, 0xa2, 0x27, 0x32, 0x8b, 0xc6,
+ 0x33, 0xd2, 0xf7, 0x36, 0xb6, 0x00, 0x3b, 0x16,
+ 0xba, 0x00, 0x77, 0x1d, 0x3b, 0x16, 0xb8, 0x00,
+ 0x72, 0x17, 0x3b, 0x06, 0xbe, 0x00, 0x77, 0x11,
+ 0x3b, 0x06, 0xbc, 0x00, 0x72, 0x0b, 0xa0, 0x27,
+ 0x32, 0x8b, 0x16, 0xb1, 0x32, 0x8e, 0xda, 0x88,
+ 0x04, 0x4e, 0x4b, 0x1f, 0xe2, 0xb4, 0x3e, 0x8f,
+ 0x46, 0x04, 0x5e, 0x59, 0x81, 0xee, 0x40, 0x01,
+ 0xe2, 0x82, 0xc3, 0x3e, 0x8b, 0x56, 0x00, 0x3e,
+ 0x03, 0x56, 0x02, 0x3e, 0x89, 0x56, 0x04, 0xc3,
+ 0x3e, 0x8b, 0x56, 0x00, 0x3e, 0x03, 0x56, 0x02,
+ 0x3e, 0x01, 0x56, 0x04, 0xc3, 0x06, 0xa1, 0xb5,
+ 0x32, 0x8e, 0xc0, 0x33, 0xdb, 0x26, 0x8a, 0x0f,
+ 0xb5, 0x00, 0x43, 0x51, 0x0a, 0xc9, 0x75, 0x03,
+ 0xe9, 0xfb, 0x00, 0x53, 0x26, 0x8b, 0x1f, 0x26,
+ 0x8b, 0x47, 0x04, 0x33, 0xd2, 0xf7, 0x36, 0xb6,
+ 0x00, 0x26, 0x8b, 0x37, 0x03, 0xf2, 0x4e, 0x26,
+ 0x8b, 0x7f, 0x02, 0x03, 0xf8, 0x4f, 0xe8, 0x10,
+ 0x0c, 0x72, 0x03, 0xe9, 0xd0, 0x00, 0x53, 0x8a,
+ 0x1e, 0xae, 0x64, 0x89, 0x16, 0xb7, 0x32, 0x8b,
+ 0x0e, 0x32, 0x32, 0x0a, 0xdb, 0x74, 0x04, 0x8b,
+ 0x0e, 0xb8, 0x00, 0x3b, 0xca, 0x72, 0x04, 0x89,
+ 0x0e, 0xb7, 0x32, 0xa3, 0xb9, 0x32, 0x8b, 0x0e,
+ 0x3a, 0x32, 0x0a, 0xdb, 0x74, 0x04, 0x8b, 0x0e,
+ 0xbc, 0x00, 0x3b, 0xc8, 0x72, 0x04, 0x89, 0x0e,
+ 0xb9, 0x32, 0x89, 0x36, 0xbb, 0x32, 0x8b, 0x0e,
+ 0x34, 0x32, 0x0a, 0xdb, 0x74, 0x04, 0x8b, 0x0e,
+ 0xba, 0x00, 0x3b, 0xce, 0x77, 0x04, 0x89, 0x0e,
+ 0xbb, 0x32, 0x89, 0x3e, 0xbd, 0x32, 0x8b, 0x0e,
+ 0x3c, 0x32, 0x0a, 0xdb, 0x74, 0x04, 0x8b, 0x0e,
+ 0xbe, 0x00, 0x3b, 0xcf, 0x77, 0x04, 0x89, 0x0e,
+ 0xbd, 0x32, 0x5b, 0x26, 0x8b, 0x3f, 0x83, 0xc3,
+ 0x06, 0x8b, 0xc8, 0x3b, 0x0e, 0xb9, 0x32, 0x73,
+ 0x05, 0x03, 0xdf, 0x41, 0xeb, 0xf5, 0x8b, 0xca,
+ 0x3b, 0x0e, 0xb7, 0x32, 0x73, 0x04, 0x43, 0x41,
+ 0xeb, 0xf6, 0xa1, 0xb9, 0x32, 0xf7, 0x26, 0xb6,
+ 0x00, 0x03, 0x06, 0xb7, 0x32, 0x8b, 0xf0, 0x55,
+ 0xa1, 0xbd, 0x32, 0x8b, 0x0e, 0xb9, 0x32, 0x8b,
+ 0x16, 0xbb, 0x32, 0x8b, 0x2e, 0xb7, 0x32, 0x1e,
+ 0x50, 0xa1, 0xb1, 0x32, 0x8e, 0xd8, 0x58, 0x50,
+ 0x53, 0x51, 0x56, 0x8b, 0xcd, 0x26, 0x8a, 0x07,
+ 0x3c, 0xff, 0x74, 0x02, 0x88, 0x04, 0x46, 0x43,
+ 0x41, 0x3b, 0xca, 0x76, 0xf0, 0x5e, 0x59, 0x5b,
+ 0x58, 0x81, 0xc6, 0x40, 0x01, 0x03, 0xdf, 0x41,
+ 0x3b, 0xc8, 0x76, 0xdb, 0x1f, 0x5d, 0x5b, 0x43,
+ 0x43, 0x59, 0x49, 0xe9, 0xfd, 0xfe, 0x59, 0x07,
+ 0xc3, 0xe8, 0x7d, 0x73, 0xa0, 0xdc, 0x1c, 0x3c,
+ 0x02, 0x74, 0x01, 0xc3, 0x1e, 0x06, 0xa1, 0xb1,
+ 0x32, 0x8e, 0xc0, 0xa1, 0x3a, 0x32, 0x8b, 0x1e,
+ 0x32, 0x32, 0x8b, 0x0e, 0x3c, 0x32, 0x8b, 0x3e,
+ 0x34, 0x32, 0xba, 0x40, 0x01, 0xf7, 0xe2, 0x03,
+ 0xc3, 0x2b, 0xfb, 0x2b, 0x0e, 0x3a, 0x32, 0x8b,
+ 0xd8, 0xb8, 0x00, 0xa0, 0x8e, 0xd8, 0x8b, 0xd1,
+ 0x8b, 0xcf, 0x81, 0xfb, 0xff, 0xf9, 0x77, 0x05,
+ 0x26, 0x8a, 0x07, 0x88, 0x07, 0x43, 0xe2, 0xf2,
+ 0x8b, 0xca, 0x81, 0xc3, 0x40, 0x01, 0x2b, 0xdf,
+ 0xe2, 0xe4, 0x07, 0x1f, 0xc3, 0x80, 0x3e, 0x3d,
+ 0x66, 0x02, 0x74, 0x01, 0xc3, 0xbb, 0xce, 0xb5,
+ 0xe8, 0x1f, 0x0b, 0x8b, 0x0e, 0x50, 0x72, 0x49,
+ 0xd1, 0xe1, 0x03, 0xd9, 0x83, 0x3f, 0x00, 0x74,
+ 0x04, 0xff, 0x17, 0xeb, 0x03, 0xe8, 0x68, 0x6b,
+ 0xc6, 0x06, 0x3d, 0x66, 0x00, 0xc7, 0x06, 0x50,
+ 0x72, 0x00, 0x00, 0xc7, 0x06, 0x52, 0x72, 0x00,
+ 0x00, 0xe8, 0x6c, 0x00, 0xc3, 0x80, 0x3e, 0x3d,
+ 0x66, 0x04, 0x74, 0x01, 0xc3, 0xe8, 0xed, 0x70,
+ 0xbb, 0x9c, 0xb8, 0xe8, 0xe4, 0x0a, 0x8b, 0x0e,
+ 0x50, 0x72, 0x49, 0xd1, 0xe1, 0x03, 0xd9, 0xff,
+ 0x17, 0xe8, 0xfb, 0x70, 0xc6, 0x06, 0x3d, 0x66,
+ 0x00, 0xc7, 0x06, 0x50, 0x72, 0x00, 0x00, 0xc7,
+ 0x06, 0x52, 0x72, 0xff, 0x00, 0xe8, 0x38, 0x00,
+ 0xc3, 0xa1, 0xaf, 0x64, 0x3b, 0x06, 0xbb, 0x64,
+ 0x74, 0x04, 0xe8, 0x2b, 0x00, 0xc3, 0xa1, 0xb1,
+ 0x64, 0x3b, 0x06, 0xbd, 0x64, 0x74, 0x04, 0xe8,
+ 0x1e, 0x00, 0xc3, 0xbb, 0x9c, 0x32, 0x8b, 0x07,
+ 0x0b, 0x47, 0x02, 0x75, 0x06, 0xb9, 0xf4, 0x01,
+ 0xe8, 0xa0, 0x73, 0xe8, 0xb0, 0x73, 0x72, 0x01,
+ 0xc3, 0xe8, 0x0f, 0x00, 0xe8, 0x01, 0x00, 0xc3,
+ 0xbb, 0x9c, 0x32, 0x33, 0xc0, 0x89, 0x07, 0x89,
+ 0x47, 0x02, 0xc3, 0xa1, 0xbf, 0x32, 0xa3, 0xac,
+ 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00, 0xb9, 0x02,
+ 0x00, 0xba, 0x54, 0x00, 0xe8, 0x01, 0x7a, 0xbb,
+ 0x8a, 0x32, 0x33, 0xc0, 0x89, 0x07, 0x89, 0x47,
+ 0x02, 0xc6, 0x06, 0xcd, 0x64, 0x01, 0xc6, 0x06,
+ 0xcb, 0x64, 0x01, 0xc6, 0x06, 0x3f, 0x65, 0x01,
+ 0xe8, 0x22, 0x08, 0x83, 0x3e, 0xc2, 0x00, 0x00,
+ 0x74, 0x05, 0xe8, 0xb5, 0xea, 0xeb, 0x15, 0xbb,
+ 0x98, 0x32, 0x8b, 0x07, 0x0b, 0x47, 0x02, 0x75,
+ 0x06, 0xb9, 0x32, 0x00, 0xe8, 0x3c, 0x73, 0xe8,
+ 0x4c, 0x73, 0x72, 0x21, 0xe8, 0x32, 0x00, 0xe8,
+ 0xd3, 0xf5, 0xe8, 0xf1, 0xf2, 0xe8, 0x04, 0xd3,
+ 0x80, 0x3e, 0x95, 0x60, 0x01, 0x74, 0x0e, 0x80,
+ 0x3e, 0xca, 0x00, 0x01, 0x74, 0x07, 0x80, 0x3e,
+ 0xcb, 0x00, 0x01, 0x75, 0xbe, 0xe8, 0xc3, 0x75,
+ 0xe8, 0xa6, 0x08, 0xc6, 0x06, 0xdc, 0x1c, 0x02,
+ 0xe8, 0x9b, 0xf2, 0xc6, 0x06, 0xdc, 0x1c, 0x03,
+ 0xc3, 0x06, 0xbb, 0x8a, 0x32, 0xe8, 0x0e, 0x73,
+ 0x73, 0x1a, 0x8b, 0x0e, 0x90, 0x32, 0xe8, 0xf2,
+ 0x72, 0xe8, 0x1a, 0x06, 0xe8, 0x8d, 0x07, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x77, 0xf2, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0x07, 0xc3, 0x06, 0xbb,
+ 0x8a, 0x32, 0xe8, 0xe9, 0x72, 0x73, 0x1a, 0x8b,
+ 0x0e, 0x90, 0x32, 0xe8, 0xcd, 0x72, 0xe8, 0xf5,
+ 0x05, 0xe8, 0xa4, 0x07, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x02, 0xe8, 0x52, 0xf2, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x03, 0x07, 0xc3, 0xe8, 0xcc, 0x6d, 0xe8, 0x54,
+ 0xf5, 0xe8, 0x1c, 0x00, 0x80, 0x3e, 0xc6, 0x64,
+ 0x00, 0x75, 0xf3, 0xc3, 0xe8, 0xbb, 0x6d, 0xe8,
+ 0x43, 0xf5, 0xe8, 0x0b, 0x00, 0xe8, 0x5e, 0xf2,
+ 0x80, 0x3e, 0xc6, 0x64, 0x00, 0x75, 0xf0, 0xc3,
+ 0x06, 0xa0, 0xc6, 0x64, 0x3c, 0x00, 0x75, 0x03,
+ 0xe9, 0xc3, 0x00, 0x3c, 0x03, 0x74, 0x39, 0xe8,
+ 0x0c, 0x02, 0x73, 0x0d, 0xe8, 0x84, 0x01, 0x72,
+ 0xf6, 0xc6, 0x06, 0xc6, 0x64, 0x00, 0xe9, 0xad,
+ 0x00, 0xc6, 0x06, 0xc4, 0x64, 0x00, 0xc6, 0x06,
+ 0xc6, 0x64, 0x03, 0xe8, 0x22, 0x08, 0x73, 0x0e,
+ 0xc6, 0x06, 0xc6, 0x64, 0x02, 0xc6, 0x06, 0xe2,
+ 0x65, 0x01, 0xff, 0x06, 0xce, 0x64, 0xbb, 0x8a,
+ 0x32, 0x33, 0xc0, 0x89, 0x07, 0x89, 0x47, 0x02,
+ 0xbb, 0x8a, 0x32, 0xe8, 0x58, 0x72, 0x72, 0x02,
+ 0xeb, 0x7c, 0x8b, 0x0e, 0x8e, 0x32, 0xe8, 0x3a,
+ 0x72, 0xe8, 0xbd, 0x05, 0xe8, 0x5f, 0x05, 0x72,
+ 0xae, 0xe8, 0xb0, 0x02, 0x72, 0xa9, 0xe8, 0x6f,
+ 0x06, 0xc6, 0x06, 0xc6, 0x64, 0x03, 0xff, 0x0e,
+ 0xce, 0x64, 0x7f, 0x4d, 0x80, 0x3e, 0xc5, 0x64,
+ 0x01, 0x75, 0x2e, 0x8b, 0x3e, 0xb7, 0x64, 0x8b,
+ 0x36, 0xb9, 0x64, 0x8b, 0x0e, 0xbb, 0x64, 0x8b,
+ 0x16, 0xbd, 0x64, 0x3b, 0xf9, 0x75, 0x04, 0x3b,
+ 0xf2, 0x74, 0x16, 0xe8, 0x3a, 0x00, 0x89, 0x3e,
+ 0xaf, 0x64, 0x89, 0x36, 0xb1, 0x64, 0x89, 0x0e,
+ 0xb7, 0x64, 0x89, 0x16, 0xb9, 0x64, 0xe9, 0x66,
+ 0xff, 0xe8, 0xc6, 0x08, 0xe8, 0x7c, 0x00, 0xe8,
+ 0x77, 0x07, 0xa1, 0xb7, 0x64, 0xa3, 0xaf, 0x64,
+ 0xa1, 0xb9, 0x64, 0xa3, 0xb1, 0x64, 0xe8, 0xb4,
+ 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x5d,
+ 0xf1, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0x07, 0xc3,
+ 0x8b, 0x1e, 0x44, 0x67, 0x43, 0x43, 0xa0, 0x40,
+ 0x67, 0x3c, 0x00, 0x75, 0x1b, 0x3b, 0xd6, 0x76,
+ 0x0e, 0x8b, 0xd6, 0x3b, 0x3f, 0x77, 0x09, 0x8b,
+ 0x4f, 0x04, 0xc6, 0x06, 0x40, 0x67, 0x01, 0xc3,
+ 0x8b, 0x0f, 0xc6, 0x06, 0x40, 0x67, 0x03, 0xc3,
+ 0x3c, 0x02, 0x75, 0x05, 0x3b, 0xd6, 0x72, 0xe1,
+ 0xc3, 0x3c, 0x01, 0x75, 0x1d, 0x3b, 0xcf, 0x73,
+ 0xe6, 0x8b, 0xcf, 0x3b, 0x77, 0x02, 0x77, 0x09,
+ 0x8b, 0x57, 0x06, 0xc6, 0x06, 0x40, 0x67, 0x02,
+ 0xc3, 0x8b, 0x57, 0x02, 0xc6, 0x06, 0x40, 0x67,
+ 0x00, 0xc3, 0x3c, 0x03, 0x75, 0xc9, 0x3b, 0xcf,
+ 0x77, 0xdf, 0xc3, 0xa0, 0xc3, 0x64, 0x0a, 0xc0,
+ 0x74, 0x42, 0x3c, 0x01, 0x75, 0x0a, 0xc6, 0x06,
+ 0xcb, 0x64, 0x01, 0xc6, 0x06, 0xcd, 0x64, 0x00,
+ 0x3c, 0x03, 0x75, 0x0a, 0xc6, 0x06, 0xcb, 0x64,
+ 0x01, 0xc6, 0x06, 0xcd, 0x64, 0x01, 0x3c, 0x02,
+ 0x75, 0x0f, 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xdc, 0x64,
+ 0x00, 0x3c, 0x04, 0x75, 0x0f, 0xc6, 0x06, 0xcb,
+ 0x64, 0x00, 0xc6, 0x06, 0xcc, 0x64, 0x00, 0xc6,
+ 0x06, 0xdc, 0x64, 0x01, 0xc3, 0xc6, 0x06, 0xc3,
+ 0x64, 0x00, 0xa0, 0x3d, 0x66, 0x3c, 0x01, 0x75,
+ 0x06, 0xc6, 0x06, 0x3d, 0x66, 0x02, 0xc3, 0x3c,
+ 0x03, 0x75, 0x06, 0xc6, 0x06, 0x3d, 0x66, 0x04,
+ 0xc3, 0x3c, 0x05, 0x75, 0x05, 0xc6, 0x06, 0x3d,
+ 0x66, 0x06, 0xc3, 0x8a, 0x0e, 0xc3, 0x64, 0x0a,
+ 0xc9, 0x74, 0x69, 0xa0, 0xcc, 0x64, 0x8a, 0x26,
+ 0xcd, 0x64, 0x8a, 0x2e, 0xcb, 0x64, 0x80, 0xf9,
+ 0x01, 0x75, 0x13, 0x80, 0xfc, 0x00, 0x75, 0x05,
+ 0x80, 0xfd, 0x01, 0x74, 0x4f, 0xe8, 0x51, 0x00,
+ 0xff, 0x06, 0xb1, 0x64, 0xf9, 0xc3, 0x80, 0xf9,
+ 0x03, 0x75, 0x13, 0x80, 0xfc, 0x01, 0x75, 0x05,
+ 0x80, 0xfd, 0x01, 0x74, 0x37, 0xe8, 0x39, 0x00,
+ 0xff, 0x0e, 0xb1, 0x64, 0xf9, 0xc3, 0x80, 0xf9,
+ 0x02, 0x75, 0x12, 0x3c, 0x01, 0x75, 0x05, 0x80,
+ 0xfd, 0x00, 0x74, 0x20, 0xe8, 0x22, 0x00, 0xff,
+ 0x0e, 0xaf, 0x64, 0xf9, 0xc3, 0x80, 0xf9, 0x04,
+ 0x75, 0x12, 0x3c, 0x00, 0x75, 0x05, 0x80, 0xfd,
+ 0x00, 0x74, 0x09, 0xe8, 0x0b, 0x00, 0xff, 0x06,
+ 0xaf, 0x64, 0xf9, 0xc3, 0xe8, 0x66, 0xff, 0xf8,
+ 0xc3, 0xa1, 0xaf, 0x64, 0xa3, 0xb7, 0x64, 0xa1,
+ 0xb1, 0x64, 0xa3, 0xb9, 0x64, 0xc3, 0x33, 0xc9,
+ 0xa1, 0xb7, 0x64, 0x8b, 0x1e, 0xaf, 0x64, 0x3b,
+ 0xc3, 0x77, 0x03, 0xfe, 0xc1, 0x93, 0x2b, 0xc3,
+ 0xa3, 0xc7, 0x64, 0xa1, 0xb9, 0x64, 0x8b, 0x1e,
+ 0xb1, 0x64, 0x3b, 0xc3, 0x77, 0x03, 0xfe, 0xc5,
+ 0x93, 0x2b, 0xc3, 0xa3, 0xc9, 0x64, 0x8b, 0x1e,
+ 0xc7, 0x64, 0xa1, 0xc9, 0x64, 0x0b, 0xdb, 0x74,
+ 0x0d, 0xc6, 0x06, 0xcc, 0x64, 0x01, 0x0a, 0xc9,
+ 0x74, 0x04, 0xfe, 0x0e, 0xcc, 0x64, 0x0b, 0xc0,
+ 0x74, 0x0d, 0xc6, 0x06, 0xcd, 0x64, 0x01, 0x0a,
+ 0xed, 0x74, 0x04, 0xfe, 0x0e, 0xcd, 0x64, 0x8b,
+ 0xd0, 0x0b, 0xc0, 0x0b, 0xc3, 0x75, 0x02, 0xf9,
+ 0xc3, 0x8b, 0xc2, 0xb9, 0x10, 0x00, 0xf7, 0xe1,
+ 0xb9, 0x0a, 0x00, 0xf7, 0xf1, 0x3b, 0xc3, 0x77,
+ 0x3e, 0xa0, 0xdc, 0x64, 0xa2, 0xdd, 0x64, 0xc6,
+ 0x06, 0xdc, 0x64, 0x00, 0xc6, 0x06, 0xcb, 0x64,
+ 0x00, 0x80, 0x3e, 0xcc, 0x64, 0x01, 0x74, 0x05,
+ 0xc6, 0x06, 0xdc, 0x64, 0x01, 0xa1, 0xc7, 0x64,
+ 0x8b, 0x1e, 0xb5, 0x64, 0x33, 0xd2, 0xf7, 0xf3,
+ 0xa3, 0xce, 0x64, 0xa1, 0xb5, 0x64, 0x8b, 0x1e,
+ 0xc9, 0x64, 0xb9, 0xe8, 0x03, 0xf7, 0xe3, 0xf7,
+ 0xe1, 0x8b, 0x1e, 0xc7, 0x64, 0xeb, 0x25, 0xc6,
+ 0x06, 0xcb, 0x64, 0x01, 0xa1, 0xc9, 0x64, 0x8b,
+ 0x1e, 0xb3, 0x64, 0x33, 0xd2, 0xf7, 0xf3, 0xa3,
+ 0xce, 0x64, 0xa1, 0xb3, 0x64, 0x8b, 0x1e, 0xc7,
+ 0x64, 0xb9, 0xe8, 0x03, 0xf7, 0xe3, 0xf7, 0xe1,
+ 0x8b, 0x1e, 0xc9, 0x64, 0xf7, 0xf3, 0xbb, 0xd0,
+ 0x64, 0x89, 0x07, 0xc7, 0x47, 0x02, 0x00, 0x00,
+ 0xbb, 0xd4, 0x64, 0x89, 0x07, 0xc7, 0x47, 0x02,
+ 0x00, 0x00, 0x80, 0x3e, 0xc4, 0x64, 0x01, 0x75,
+ 0x05, 0xc6, 0x06, 0xe2, 0x65, 0x01, 0xff, 0x06,
+ 0xce, 0x64, 0xf8, 0xc3, 0x83, 0x3e, 0xce, 0x64,
+ 0x01, 0x75, 0x02, 0xf8, 0xc3, 0x8b, 0x36, 0xaf,
+ 0x64, 0x8b, 0x3e, 0xb1, 0x64, 0xe8, 0x2e, 0x02,
+ 0x72, 0x01, 0xc3, 0x8b, 0x36, 0x44, 0x67, 0x3b,
+ 0xde, 0x74, 0x0f, 0x89, 0x1e, 0x44, 0x67, 0x8a,
+ 0x04, 0x3a, 0x07, 0x74, 0x05, 0xc6, 0x06, 0x40,
+ 0x67, 0xff, 0xc6, 0x06, 0xc5, 0x64, 0x01, 0xa0,
+ 0xcc, 0x64, 0x8a, 0x26, 0xcd, 0x64, 0x0a, 0xe4,
+ 0x74, 0x15, 0xc6, 0x06, 0x42, 0x67, 0x01, 0xc6,
+ 0x06, 0x43, 0x67, 0x01, 0x0a, 0xc0, 0x74, 0x1a,
+ 0xc6, 0x06, 0x43, 0x67, 0x00, 0xeb, 0x13, 0xc6,
+ 0x06, 0x42, 0x67, 0x00, 0xc6, 0x06, 0x43, 0x67,
+ 0x01, 0x0a, 0xc0, 0x74, 0x05, 0xc6, 0x06, 0x43,
+ 0x67, 0x00, 0x43, 0x43, 0x53, 0x8b, 0x0f, 0x41,
+ 0x8b, 0x7f, 0x02, 0x47, 0x8b, 0x77, 0x04, 0x4e,
+ 0x8b, 0x5f, 0x06, 0x4b, 0xa1, 0xbf, 0x64, 0x8b,
+ 0x16, 0xc1, 0x64, 0x3b, 0xc1, 0x72, 0x17, 0x3b,
+ 0xc6, 0x77, 0x13, 0xc6, 0x06, 0x41, 0x67, 0x00,
+ 0x80, 0x3e, 0x42, 0x67, 0x01, 0x74, 0x4f, 0xc6,
+ 0x06, 0x41, 0x67, 0x02, 0xeb, 0x48, 0x3b, 0xd7,
+ 0x72, 0x17, 0x3b, 0xd3, 0x77, 0x13, 0xc6, 0x06,
+ 0x41, 0x67, 0x01, 0x80, 0x3e, 0x43, 0x67, 0x01,
+ 0x74, 0x34, 0xc6, 0x06, 0x41, 0x67, 0x03, 0xeb,
+ 0x2d, 0x80, 0x3e, 0xcb, 0x64, 0x00, 0x75, 0x13,
+ 0xc6, 0x06, 0x41, 0x67, 0x01, 0x80, 0x3e, 0x43,
+ 0x67, 0x01, 0x74, 0x1a, 0xc6, 0x06, 0x41, 0x67,
+ 0x03, 0xeb, 0x13, 0xc6, 0x06, 0x41, 0x67, 0x00,
+ 0x80, 0x3e, 0x42, 0x67, 0x01, 0x74, 0x07, 0xc6,
+ 0x06, 0x41, 0x67, 0x02, 0xeb, 0x00, 0x5b, 0x53,
+ 0x83, 0xc3, 0x08, 0xa0, 0x41, 0x67, 0xb4, 0x00,
+ 0x03, 0xd8, 0x8a, 0x07, 0x5b, 0x8a, 0x36, 0x40,
+ 0x67, 0x0a, 0xc0, 0x74, 0x18, 0x3c, 0x01, 0x74,
+ 0x35, 0x3c, 0x02, 0x74, 0x56, 0x3c, 0x03, 0x74,
+ 0x77, 0x3c, 0x04, 0x75, 0x03, 0xe9, 0x95, 0x00,
+ 0xb0, 0x34, 0xe9, 0xf3, 0x78, 0xa0, 0xcd, 0x64,
+ 0x8a, 0x26, 0xcc, 0x64, 0x8a, 0x16, 0x41, 0x67,
+ 0x80, 0xfa, 0x01, 0x74, 0x05, 0x80, 0xfa, 0x03,
+ 0x75, 0x06, 0x0a, 0xc0, 0x74, 0x08, 0xeb, 0x50,
+ 0x0a, 0xe4, 0x75, 0x27, 0xeb, 0x6f, 0x80, 0xfe,
+ 0x02, 0x75, 0x09, 0x80, 0x3e, 0xcc, 0x64, 0x01,
+ 0x74, 0x19, 0xeb, 0x61, 0x80, 0xfe, 0x00, 0x74,
+ 0xf2, 0xa1, 0xbf, 0x64, 0xa3, 0xb7, 0x64, 0x83,
+ 0xc3, 0x02, 0x8b, 0x07, 0xa3, 0xb9, 0x64, 0xb0,
+ 0x00, 0xeb, 0x6a, 0x80, 0xfe, 0x03, 0x75, 0x09,
+ 0x80, 0x3e, 0xcd, 0x64, 0x01, 0x75, 0xcf, 0xeb,
+ 0x17, 0x80, 0xfe, 0x01, 0x74, 0xf2, 0xa1, 0xc1,
+ 0x64, 0xa3, 0xb9, 0x64, 0x83, 0xc3, 0x04, 0x8b,
+ 0x07, 0xa3, 0xb7, 0x64, 0xb0, 0x01, 0xeb, 0x45,
+ 0x80, 0xfe, 0x00, 0x75, 0x09, 0x80, 0x3e, 0xcc,
+ 0x64, 0x01, 0x75, 0x19, 0xeb, 0xcd, 0x80, 0xfe,
+ 0x02, 0x74, 0xf2, 0xa1, 0xbf, 0x64, 0xa3, 0xb7,
+ 0x64, 0x83, 0xc3, 0x06, 0x8b, 0x07, 0xa3, 0xb9,
+ 0x64, 0xb0, 0x02, 0xeb, 0x20, 0x80, 0xfe, 0x01,
+ 0x75, 0x09, 0x80, 0x3e, 0xcd, 0x64, 0x01, 0x74,
+ 0xcf, 0xeb, 0x83, 0x80, 0xfe, 0x03, 0x74, 0xf2,
+ 0xa1, 0xc1, 0x64, 0xa3, 0xb9, 0x64, 0x8b, 0x07,
+ 0xa3, 0xb7, 0x64, 0xb0, 0x03, 0xa2, 0x40, 0x67,
+ 0xa1, 0xbf, 0x64, 0xa3, 0xaf, 0x64, 0xa1, 0xc1,
+ 0x64, 0xa3, 0xb1, 0x64, 0xf9, 0xc3, 0x81, 0xfe,
+ 0x3f, 0x01, 0x75, 0x01, 0x4e, 0x0b, 0xf6, 0x75,
+ 0x01, 0x46, 0x81, 0xff, 0xc7, 0x00, 0x75, 0x01,
+ 0x4f, 0x0b, 0xff, 0x75, 0x01, 0x47, 0xe8, 0x89,
+ 0x00, 0x73, 0x29, 0x43, 0x8a, 0x07, 0x0a, 0xc0,
+ 0x74, 0x08, 0xe8, 0x20, 0x00, 0xe8, 0x7a, 0x00,
+ 0x73, 0x1a, 0xe8, 0x14, 0x03, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x02, 0xe8, 0x09, 0xed, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x03, 0xa1, 0xaf, 0x64, 0x8b, 0xf0, 0xa1,
+ 0xb1, 0x64, 0x8b, 0xf8, 0xc3, 0x43, 0x3c, 0x01,
+ 0x75, 0x05, 0x8b, 0x7f, 0x02, 0x4f, 0xc3, 0x3c,
+ 0x03, 0x75, 0x05, 0x8b, 0x7f, 0x06, 0x47, 0xc3,
+ 0x3c, 0x02, 0x75, 0x05, 0x8b, 0x77, 0x04, 0x46,
+ 0xc3, 0x3c, 0x04, 0x75, 0x04, 0x8b, 0x37, 0x4e,
+ 0xc3, 0xb0, 0x3a, 0xe9, 0xc2, 0x77, 0xbb, 0x46,
+ 0x67, 0xe8, 0x2e, 0x04, 0x8a, 0x0f, 0x0a, 0xc9,
+ 0x74, 0x24, 0xb5, 0x00, 0x43, 0x8b, 0x47, 0x02,
+ 0x8b, 0x57, 0x06, 0x3b, 0xf0, 0x76, 0x12, 0x3b,
+ 0xf2, 0x73, 0x0e, 0x8b, 0x47, 0x04, 0x8b, 0x57,
+ 0x08, 0x3b, 0xf8, 0x76, 0x04, 0x3b, 0xfa, 0x72,
+ 0x07, 0x83, 0xc3, 0x0e, 0xe2, 0xdf, 0xf8, 0xc3,
+ 0xf9, 0xc3, 0xbb, 0x46, 0x67, 0xe8, 0xfa, 0x03,
+ 0x8a, 0x0f, 0x0a, 0xc9, 0x74, 0x24, 0xb5, 0x00,
+ 0x43, 0x8b, 0x47, 0x02, 0x8b, 0x57, 0x06, 0x3b,
+ 0xf0, 0x72, 0x12, 0x3b, 0xf2, 0x77, 0x0e, 0x8b,
+ 0x47, 0x04, 0x8b, 0x57, 0x08, 0x3b, 0xf8, 0x72,
+ 0x04, 0x3b, 0xfa, 0x76, 0x07, 0x83, 0xc3, 0x0e,
+ 0xe2, 0xdf, 0xf8, 0xc3, 0xf9, 0xc3, 0xbb, 0xf4,
+ 0x70, 0xe8, 0xc6, 0x03, 0x8b, 0x07, 0x3d, 0xff,
+ 0xff, 0x74, 0x4c, 0x43, 0x43, 0x8b, 0x0e, 0xb1,
+ 0x64, 0x3a, 0xc8, 0x77, 0xef, 0x8a, 0xc4, 0xb4,
+ 0x00, 0xa3, 0xd8, 0x64, 0xe8, 0x25, 0x03, 0x83,
+ 0x3e, 0xce, 0x64, 0x02, 0x76, 0x31, 0x83, 0x3e,
+ 0xd8, 0x64, 0x1e, 0x72, 0x15, 0x83, 0x3e, 0xb3,
+ 0x64, 0x01, 0x74, 0x23, 0xc7, 0x06, 0xb3, 0x64,
+ 0x01, 0x00, 0xc7, 0x06, 0xb5, 0x64, 0x04, 0x00,
+ 0xf9, 0xc3, 0x83, 0x3e, 0xb3, 0x64, 0x03, 0x74,
+ 0x0e, 0xc7, 0x06, 0xb3, 0x64, 0x03, 0x00, 0xc7,
+ 0x06, 0xb5, 0x64, 0x08, 0x00, 0xf9, 0xc3, 0xf8,
+ 0xc3, 0x80, 0x3e, 0xc6, 0x64, 0x02, 0x75, 0x01,
+ 0xc3, 0xa1, 0xaf, 0x64, 0xa3, 0xbf, 0x64, 0xa1,
+ 0xb1, 0x64, 0xa3, 0xc1, 0x64, 0x80, 0x3e, 0xcb,
+ 0x64, 0x00, 0x75, 0x36, 0xa1, 0xb5, 0x64, 0x80,
+ 0x3e, 0xcc, 0x64, 0x01, 0x75, 0x06, 0x01, 0x06,
+ 0xaf, 0x64, 0xeb, 0x04, 0x29, 0x06, 0xaf, 0x64,
+ 0xbb, 0xd4, 0x64, 0x8b, 0x07, 0x8b, 0x57, 0x02,
+ 0xb9, 0xe8, 0x03, 0xf7, 0xf1, 0x80, 0x3e, 0xcd,
+ 0x64, 0x01, 0x75, 0x06, 0x01, 0x06, 0xb1, 0x64,
+ 0xeb, 0x04, 0x29, 0x06, 0xb1, 0x64, 0xe8, 0x37,
+ 0x00, 0xc3, 0xa1, 0xb3, 0x64, 0x80, 0x3e, 0xcd,
+ 0x64, 0x01, 0x75, 0x06, 0x01, 0x06, 0xb1, 0x64,
+ 0xeb, 0x04, 0x29, 0x06, 0xb1, 0x64, 0xbb, 0xd4,
+ 0x64, 0x8b, 0x07, 0x8b, 0x57, 0x02, 0xb9, 0xe8,
+ 0x03, 0xf7, 0xf1, 0x80, 0x3e, 0xcc, 0x64, 0x01,
+ 0x75, 0x06, 0x01, 0x06, 0xaf, 0x64, 0xeb, 0x04,
+ 0x29, 0x06, 0xaf, 0x64, 0xe8, 0x01, 0x00, 0xc3,
+ 0x50, 0xbb, 0xd4, 0x64, 0x8b, 0x07, 0x8b, 0x57,
+ 0x02, 0xbe, 0xd0, 0x64, 0x8b, 0x1c, 0x8b, 0x4c,
+ 0x02, 0x03, 0xc3, 0x83, 0xd2, 0x00, 0x03, 0xd1,
+ 0xbb, 0xd4, 0x64, 0x89, 0x07, 0x89, 0x57, 0x02,
+ 0x58, 0xb9, 0xe8, 0x03, 0xf7, 0xe1, 0x8b, 0xc8,
+ 0x8b, 0x07, 0x8b, 0x57, 0x02, 0x2b, 0xc1, 0x83,
+ 0xda, 0x00, 0x89, 0x07, 0x89, 0x57, 0x02, 0xc3,
+ 0x8a, 0x0e, 0x07, 0x66, 0x80, 0x3e, 0xc6, 0x64,
+ 0x02, 0x74, 0x4d, 0x80, 0x3e, 0xcb, 0x64, 0x00,
+ 0x75, 0x0f, 0xbb, 0xed, 0x65, 0x80, 0x3e, 0xcc,
+ 0x64, 0x01, 0x74, 0x1e, 0xbb, 0xe3, 0x65, 0xeb,
+ 0x19, 0x80, 0x3e, 0xe2, 0x65, 0x07, 0x76, 0x05,
+ 0xc6, 0x06, 0xe2, 0x65, 0x01, 0xbb, 0xff, 0x65,
+ 0x80, 0x3e, 0xcd, 0x64, 0x01, 0x74, 0x03, 0xbb,
+ 0xf7, 0x65, 0x8a, 0x0e, 0xe2, 0x65, 0xb5, 0x00,
+ 0x49, 0x03, 0xd9, 0x8a, 0x0f, 0x0a, 0xc9, 0x75,
+ 0x07, 0xc6, 0x06, 0xe2, 0x65, 0x01, 0xeb, 0xbb,
+ 0x88, 0x0e, 0x07, 0x66, 0xfe, 0x06, 0xe2, 0x65,
+ 0xe8, 0xdd, 0x00, 0xc3, 0x8b, 0x1e, 0x3d, 0x65,
+ 0x8a, 0x0e, 0x3f, 0x65, 0xb5, 0x00, 0x49, 0x03,
+ 0xd9, 0x8a, 0x0f, 0x0a, 0xc9, 0x75, 0x0a, 0xc6,
+ 0x06, 0x3f, 0x65, 0x04, 0xe8, 0x0e, 0x00, 0xeb,
+ 0xe3, 0x88, 0x0e, 0x07, 0x66, 0xfe, 0x06, 0x3f,
+ 0x65, 0xe8, 0xb4, 0x00, 0xc3, 0xb8, 0x03, 0x00,
+ 0xe8, 0xb0, 0x73, 0xbb, 0x40, 0x65, 0xd1, 0xe0,
+ 0x03, 0xd8, 0x8b, 0x07, 0xa3, 0x3d, 0x65, 0xc3,
+ 0x80, 0x3e, 0xcb, 0x64, 0x00, 0x75, 0x13, 0xbb,
+ 0xfe, 0x64, 0xb2, 0x01, 0x80, 0x3e, 0xcc, 0x64,
+ 0x01, 0x74, 0x18, 0xbb, 0xe9, 0x64, 0xb2, 0x01,
+ 0xeb, 0x11, 0xbb, 0x28, 0x65, 0xb2, 0x0b, 0x80,
+ 0x3e, 0xcd, 0x64, 0x01, 0x74, 0x05, 0xbb, 0x13,
+ 0x65, 0xb2, 0x13, 0x8a, 0x0e, 0xe8, 0x64, 0xb5,
+ 0x00, 0x49, 0x03, 0xd9, 0x8a, 0x0f, 0x0a, 0xc9,
+ 0x75, 0x07, 0xc6, 0x06, 0xe8, 0x64, 0x01, 0xeb,
+ 0xbf, 0xfe, 0x06, 0xe8, 0x64, 0xe8, 0x58, 0x00,
+ 0x1e, 0x53, 0x8a, 0xca, 0x88, 0x0e, 0x07, 0x66,
+ 0xe8, 0x4d, 0x00, 0x8b, 0xf3, 0x5b, 0xa1, 0xbf,
+ 0x32, 0x8e, 0xd8, 0x8b, 0x07, 0x8b, 0x4f, 0x02,
+ 0xf7, 0xe1, 0x8b, 0xc8, 0xb8, 0x06, 0x00, 0x03,
+ 0xd8, 0x03, 0xf0, 0x8a, 0x07, 0x88, 0x04, 0x43,
+ 0x46, 0xe2, 0xf8, 0x1f, 0xc3, 0x33, 0xc9, 0x80,
+ 0x3e, 0xcb, 0x64, 0x00, 0x75, 0x11, 0xb2, 0x01,
+ 0xb1, 0x28, 0x80, 0x3e, 0xcc, 0x64, 0x01, 0x74,
+ 0xb8, 0xb2, 0x01, 0xb1, 0x28, 0xeb, 0xb2, 0xb2,
+ 0x0b, 0xb1, 0x29, 0x80, 0x3e, 0xcd, 0x64, 0x01,
+ 0x74, 0xa7, 0xb2, 0x13, 0xb1, 0x2a, 0xeb, 0xa1,
+ 0x06, 0xa1, 0xbf, 0x32, 0x8e, 0xc0, 0x32, 0xed,
+ 0xbb, 0x01, 0x00, 0x49, 0xd1, 0xe1, 0x03, 0xd9,
+ 0x26, 0x8b, 0x1f, 0x89, 0x1e, 0xe6, 0x64, 0x07,
+ 0xc3, 0x80, 0x3e, 0xcb, 0x64, 0x00, 0x75, 0x0d,
+ 0xb1, 0x01, 0x80, 0x3e, 0xcc, 0x64, 0x01, 0x74,
+ 0x0f, 0xb1, 0x01, 0xeb, 0x0b, 0xb1, 0x0b, 0x80,
+ 0x3e, 0xcd, 0x64, 0x01, 0x74, 0x02, 0xb1, 0x13,
+ 0x88, 0x0e, 0x07, 0x66, 0xe8, 0xc1, 0xff, 0xc3,
+ 0xa0, 0x07, 0x66, 0x8a, 0x26, 0xcb, 0x64, 0x8a,
+ 0x1e, 0xcc, 0x64, 0x8a, 0x3e, 0xcd, 0x64, 0x83,
+ 0x3e, 0xce, 0x64, 0x01, 0x75, 0x44, 0x3c, 0x13,
+ 0x75, 0x0f, 0x80, 0xfc, 0x01, 0x75, 0x3b, 0x80,
+ 0xff, 0x00, 0x75, 0x36, 0xb1, 0x14, 0xe9, 0x85,
+ 0x00, 0x3c, 0x0b, 0x75, 0x0e, 0x80, 0xfc, 0x01,
+ 0x75, 0x28, 0x80, 0xff, 0x01, 0x75, 0x23, 0xb1,
+ 0x0c, 0xeb, 0x73, 0x3c, 0x01, 0x75, 0x1b, 0xa0,
+ 0xdd, 0x64, 0x3a, 0x06, 0xdc, 0x64, 0x75, 0x12,
+ 0x80, 0xfc, 0x00, 0x75, 0x0d, 0x80, 0xfb, 0x01,
+ 0x75, 0x04, 0xb1, 0x02, 0xeb, 0x58, 0xb1, 0x02,
+ 0xeb, 0x54, 0xa0, 0x07, 0x66, 0x3c, 0x13, 0x72,
+ 0x12, 0x3c, 0x1a, 0x77, 0x0e, 0x80, 0xfc, 0x01,
+ 0x75, 0x42, 0x80, 0xff, 0x01, 0x75, 0x3d, 0xb1,
+ 0x02, 0xeb, 0x3b, 0x3c, 0x01, 0x72, 0x1f, 0x3c,
+ 0x0a, 0x77, 0x1b, 0x80, 0xfc, 0x00, 0x75, 0x2c,
+ 0xa0, 0xdd, 0x64, 0x38, 0x06, 0xdc, 0x64, 0x74,
+ 0x23, 0x80, 0xfb, 0x01, 0x75, 0x04, 0xb1, 0x0c,
+ 0xeb, 0x1c, 0xb1, 0x0c, 0xeb, 0x18, 0x3c, 0x0b,
+ 0x72, 0x12, 0x3c, 0x12, 0x77, 0x0e, 0x80, 0xfc,
+ 0x01, 0x75, 0x09, 0x80, 0xff, 0x00, 0x75, 0x04,
+ 0xb1, 0x02, 0xeb, 0x02, 0xf8, 0xc3, 0x88, 0x0e,
+ 0x07, 0x66, 0xf9, 0xc3, 0xa1, 0xd8, 0x64, 0x3d,
+ 0x64, 0x00, 0x77, 0x28, 0x53, 0x1e, 0x8b, 0x16,
+ 0xb1, 0x32, 0x8e, 0xda, 0xbb, 0x00, 0xfa, 0xba,
+ 0xff, 0xff, 0x0b, 0xc0, 0x74, 0x09, 0x8b, 0xc8,
+ 0xb8, 0x64, 0x00, 0x33, 0xd2, 0xf7, 0xf1, 0x89,
+ 0x57, 0x02, 0xb9, 0x64, 0x00, 0xf7, 0xe1, 0x89,
+ 0x07, 0x1f, 0x5b, 0xc3, 0xb0, 0x35, 0xe9, 0xdf,
+ 0x73, 0x80, 0x3e, 0xae, 0x64, 0x01, 0x75, 0x08,
+ 0x81, 0x3e, 0xba, 0x00, 0x3f, 0x01, 0x75, 0x18,
+ 0x8b, 0x0e, 0x32, 0x32, 0x3b, 0xca, 0x77, 0x0a,
+ 0x8b, 0x0e, 0x34, 0x32, 0x3b, 0xca, 0x73, 0x08,
+ 0xf8, 0xc3, 0x3b, 0xce, 0x76, 0x02, 0xf8, 0xc3,
+ 0x8b, 0x0e, 0xb1, 0x64, 0x3b, 0xcf, 0x76, 0x02,
+ 0xf8, 0xc3, 0x3b, 0xc8, 0x73, 0x02, 0xf8, 0xc3,
+ 0xf9, 0xc3, 0xc6, 0x06, 0xc6, 0x64, 0x00, 0xc6,
+ 0x06, 0x40, 0x67, 0xff, 0xc6, 0x06, 0xc4, 0x64,
+ 0x01, 0xc6, 0x06, 0xc5, 0x64, 0x00, 0xe8, 0x77,
+ 0xf5, 0xc3, 0x51, 0x8b, 0x0e, 0xf3, 0xb4, 0x49,
+ 0xd1, 0xe1, 0x03, 0xd9, 0x8b, 0x1f, 0x59, 0xc3,
+ 0xbb, 0xf5, 0xb4, 0xeb, 0xed, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x03, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0x68,
+ 0x00, 0xbf, 0x22, 0x01, 0xbe, 0x76, 0x00, 0xb1,
+ 0x01, 0xb5, 0x04, 0xe8, 0xdd, 0x6b, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x05, 0x00, 0xb8, 0x2c, 0x01,
+ 0xbb, 0x83, 0x00, 0xbf, 0x2c, 0x01, 0xbe, 0x87,
+ 0x00, 0xb1, 0x0b, 0xb5, 0x03, 0xe8, 0xc3, 0x6b,
+ 0xc3, 0x80, 0x3e, 0xe1, 0xdb, 0x01, 0x74, 0x07,
+ 0xbb, 0x0f, 0x57, 0xe8, 0x27, 0x60, 0xc3, 0xb9,
+ 0x4c, 0x03, 0xe8, 0xba, 0xda, 0xb9, 0x4e, 0x03,
+ 0xe8, 0xb7, 0xda, 0xb9, 0x4d, 0x03, 0xe8, 0xd6,
+ 0xda, 0xbb, 0x96, 0x56, 0xe8, 0x0e, 0x60, 0xc3,
+ 0xbb, 0xac, 0x56, 0xe8, 0x07, 0x60, 0xc3, 0xbb,
+ 0xf7, 0x56, 0xe8, 0x00, 0x60, 0xc3, 0xbb, 0x7a,
+ 0xdb, 0xe8, 0x51, 0xd1, 0xe8, 0x66, 0xd1, 0xc3,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x02, 0x00, 0xb8, 0x00,
+ 0x00, 0xbb, 0xb4, 0x00, 0xbf, 0x38, 0x00, 0xbe,
+ 0xb4, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x6a,
+ 0x6b, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x04, 0x00,
+ 0xb8, 0x3f, 0x01, 0xbb, 0x80, 0x00, 0xbf, 0x13,
+ 0x01, 0xbe, 0x89, 0x00, 0xb1, 0x01, 0xb5, 0x04,
+ 0xe8, 0x50, 0x6b, 0xc3, 0x80, 0x3e, 0xe4, 0xdb,
+ 0x01, 0x75, 0x07, 0xbb, 0xb2, 0x57, 0xe8, 0xb4,
+ 0x5f, 0xc3, 0xb9, 0x4c, 0x00, 0xb0, 0x0b, 0xb4,
+ 0x07, 0xe8, 0x51, 0x69, 0xb0, 0x0f, 0xe8, 0x55,
+ 0x69, 0xb0, 0x13, 0xe8, 0x57, 0x69, 0xb0, 0x17,
+ 0xe8, 0x59, 0x69, 0xb0, 0x1b, 0xe8, 0x5b, 0x69,
+ 0xb9, 0x38, 0x00, 0xb0, 0x23, 0xe8, 0x5a, 0x69,
+ 0xb9, 0x13, 0x00, 0xb0, 0x3b, 0xe8, 0x59, 0x69,
+ 0xb9, 0x60, 0x03, 0xe8, 0x19, 0xda, 0xe8, 0xba,
+ 0x6a, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0x61, 0x03, 0xb0, 0x02,
+ 0xe8, 0x3c, 0xd9, 0xc6, 0x06, 0xb0, 0x32, 0x01,
+ 0xe8, 0x91, 0xdd, 0xc6, 0x06, 0xb0, 0x32, 0x00,
+ 0x9c, 0xe8, 0xa2, 0x69, 0xb9, 0x62, 0x03, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0xeb, 0xd9, 0x9d,
+ 0x73, 0x4c, 0xa1, 0x1f, 0xc4, 0xe8, 0x54, 0xe7,
+ 0x3c, 0x55, 0x75, 0x42, 0x83, 0x3e, 0x52, 0x72,
+ 0x05, 0x75, 0x3b, 0xc6, 0x06, 0xcf, 0x00, 0x00,
+ 0xc7, 0x06, 0x1f, 0xc4, 0x00, 0x00, 0xb9, 0x05,
+ 0x00, 0xb0, 0x04, 0xb4, 0x06, 0xe8, 0xcd, 0x68,
+ 0xb0, 0x13, 0xe8, 0xd8, 0x68, 0xb9, 0x40, 0x00,
+ 0xb0, 0x0b, 0xe8, 0xc9, 0x68, 0xb9, 0x63, 0x03,
+ 0xe8, 0xaf, 0xd9, 0xb0, 0x55, 0xe8, 0x00, 0xe6,
+ 0xb0, 0x56, 0xe8, 0xeb, 0xe5, 0xc6, 0x06, 0xe4,
+ 0xdb, 0x01, 0xe8, 0x1e, 0x00, 0xc3, 0xe8, 0x1a,
+ 0x00, 0xff, 0x36, 0xcf, 0x00, 0xc6, 0x06, 0xcf,
+ 0x00, 0x00, 0xbb, 0x72, 0xdb, 0xe8, 0x45, 0xd0,
+ 0xe8, 0x5a, 0xd0, 0x8f, 0x06, 0xcf, 0x00, 0xe8,
+ 0xdc, 0xdd, 0xc3, 0xc7, 0x06, 0xaf, 0x64, 0x56,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xc3, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x00, 0xc6, 0x06, 0xcd, 0x64,
+ 0x01, 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xb9, 0x64,
+ 0x03, 0xe8, 0x83, 0xd9, 0xc3, 0xbb, 0xb7, 0x58,
+ 0xe8, 0xba, 0x5e, 0xc3, 0xb9, 0x38, 0x00, 0xb0,
+ 0x0a, 0xb4, 0x09, 0xe8, 0x57, 0x68, 0xe8, 0xae,
+ 0xd9, 0xe8, 0x3c, 0xfe, 0xc6, 0x07, 0x00, 0xe8,
+ 0xc2, 0x6c, 0xb9, 0x6b, 0x03, 0xe8, 0x6d, 0xd9,
+ 0xb0, 0x06, 0xe8, 0x28, 0xd8, 0xb0, 0x5c, 0xe8,
+ 0x76, 0xe5, 0xc3, 0xbb, 0x0f, 0x57, 0xe8, 0x8c,
+ 0x5e, 0xc3, 0xe8, 0x09, 0x63, 0xc3, 0xe8, 0x86,
+ 0xd9, 0xbb, 0x46, 0x67, 0xe8, 0x03, 0xfe, 0x83,
+ 0xc3, 0x03, 0xff, 0x37, 0x53, 0xc7, 0x07, 0x3f,
+ 0x01, 0xbe, 0xc5, 0x00, 0xbf, 0x9f, 0x00, 0xc6,
+ 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x3c, 0xf4, 0xe8,
+ 0xf6, 0xfd, 0xc6, 0x07, 0x00, 0xe8, 0x7c, 0x6c,
+ 0xb9, 0x47, 0x00, 0xb0, 0x08, 0xb4, 0x07, 0xe8,
+ 0xfb, 0x67, 0xb9, 0x05, 0x00, 0xb0, 0x0d, 0xe8,
+ 0xfc, 0x67, 0xb9, 0x41, 0x03, 0xe8, 0x15, 0xd9,
+ 0xbe, 0xe1, 0x00, 0xbf, 0x9f, 0x00, 0xc6, 0x06,
+ 0xc3, 0x64, 0x04, 0xe8, 0x0d, 0xf4, 0x5b, 0x8f,
+ 0x07, 0xb0, 0x4e, 0xe8, 0x12, 0xe5, 0xb0, 0x03,
+ 0xe8, 0xba, 0xd7, 0xc3, 0xbb, 0xc8, 0x58, 0xe8,
+ 0x23, 0x5e, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x03,
+ 0x00, 0xb8, 0xd6, 0x00, 0xbb, 0xc7, 0x00, 0xbf,
+ 0xda, 0x00, 0xbe, 0xbf, 0x00, 0xb1, 0x13, 0xb5,
+ 0x01, 0xe8, 0x97, 0x69, 0xc3, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x05, 0x00, 0xb8, 0x00, 0x00, 0xbb, 0xae,
+ 0x00, 0xbf, 0x23, 0x00, 0xbe, 0xae, 0x00, 0xb1,
+ 0x01, 0xb5, 0x02, 0xe8, 0x7d, 0x69, 0xc3, 0xe8,
+ 0xed, 0xd8, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xb9,
+ 0x17, 0x00, 0xb0, 0x08, 0xb4, 0x07, 0xe8, 0x84,
+ 0x67, 0xb9, 0x18, 0x00, 0xb0, 0x0d, 0xe8, 0x85,
+ 0x67, 0xe8, 0x64, 0xfd, 0xc6, 0x47, 0x01, 0x00,
+ 0x53, 0xe8, 0xe8, 0x6b, 0xb9, 0x49, 0x03, 0xe8,
+ 0x60, 0xd8, 0x5b, 0xc6, 0x47, 0x01, 0x61, 0xc6,
+ 0x47, 0x02, 0x00, 0xe8, 0x92, 0x6b, 0xe8, 0x84,
+ 0x00, 0xe8, 0xb1, 0xdc, 0xb9, 0x3f, 0x00, 0xb0,
+ 0x0c, 0xb4, 0x07, 0xe8, 0x4f, 0x67, 0xb9, 0x05,
+ 0x00, 0xb0, 0x1a, 0xe8, 0x50, 0x67, 0xb9, 0x4a,
+ 0x03, 0xe8, 0x36, 0xd8, 0xe8, 0x66, 0x00, 0xe8,
+ 0x93, 0xdc, 0xc6, 0x06, 0xe6, 0x1c, 0xd1, 0xbb,
+ 0x56, 0x56, 0xbe, 0x10, 0x55, 0xe8, 0x2e, 0x60,
+ 0xe8, 0x7b, 0xdc, 0xbb, 0x7a, 0x56, 0xbe, 0x5c,
+ 0x55, 0xe8, 0x22, 0x60, 0xe8, 0x6f, 0xdc, 0xbb,
+ 0x82, 0x56, 0xbe, 0x3e, 0x55, 0xe8, 0x16, 0x60,
+ 0xe8, 0x63, 0xdc, 0xb9, 0x4b, 0x03, 0xe8, 0x01,
+ 0xd8, 0xc7, 0x06, 0xaf, 0x64, 0xdf, 0x00, 0xc7,
+ 0x06, 0xb1, 0x64, 0x95, 0x00, 0xc6, 0x06, 0xcb,
+ 0x64, 0x00, 0xc6, 0x06, 0xcc, 0x64, 0x01, 0xc6,
+ 0x06, 0xcd, 0x64, 0x00, 0xe8, 0x1d, 0xd8, 0xb0,
+ 0x07, 0xe8, 0xd1, 0xd6, 0xb0, 0x01, 0xe8, 0xcc,
+ 0xd6, 0xb0, 0x51, 0xe8, 0x1a, 0xe4, 0xbb, 0x46,
+ 0x56, 0xe8, 0x31, 0x5d, 0xc3, 0xe8, 0x6b, 0x68,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0x9c, 0xeb,
+ 0xe8, 0x45, 0xec, 0xe8, 0xda, 0x63, 0xe8, 0x2b,
+ 0xf1, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x0a, 0x00,
+ 0xb8, 0x3f, 0x01, 0xbb, 0xb7, 0x00, 0xbf, 0x0d,
+ 0x01, 0xbe, 0xaf, 0x00, 0xb1, 0x01, 0xb5, 0x04,
+ 0xe8, 0x90, 0x68, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x04, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0xb9, 0x00,
+ 0xbf, 0x18, 0x01, 0xbe, 0xb9, 0x00, 0xb1, 0x01,
+ 0xb5, 0x04, 0xe8, 0x76, 0x68, 0xc3, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x02, 0x00, 0xb8, 0xdd, 0x00, 0xbb,
+ 0xc7, 0x00, 0xbf, 0xd9, 0x00, 0xbe, 0xc1, 0x00,
+ 0xb1, 0x13, 0xb5, 0x01, 0xe8, 0x5c, 0x68, 0xc3,
+ 0xb9, 0x50, 0x00, 0xb0, 0x04, 0xb4, 0x02, 0xe8,
+ 0x6b, 0x66, 0xb9, 0xc1, 0x03, 0xe8, 0x57, 0xd7,
+ 0xe8, 0xf8, 0x67, 0xc7, 0x06, 0xf3, 0xb4, 0x08,
+ 0x00, 0xb8, 0x9b, 0x00, 0xbb, 0xc7, 0x00, 0xbf,
+ 0x9e, 0x00, 0xbe, 0xb8, 0x00, 0xb1, 0x13, 0xb5,
+ 0x01, 0xe8, 0x2f, 0x68, 0xc3, 0xb9, 0x46, 0x00,
+ 0xb0, 0x06, 0xb4, 0x09, 0xe8, 0x3e, 0x66, 0xb9,
+ 0xc2, 0x03, 0xe8, 0x2a, 0xd7, 0xe8, 0xcb, 0x67,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x07, 0x00, 0xb8, 0x1e,
+ 0x00, 0xbb, 0xb8, 0x00, 0xbf, 0x32, 0x00, 0xbe,
+ 0xb8, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x02,
+ 0x68, 0x80, 0x3e, 0xdf, 0xdb, 0x02, 0x72, 0x01,
+ 0xc3, 0xb8, 0x96, 0x00, 0xe8, 0x4b, 0xdb, 0xbe,
+ 0x86, 0x00, 0xbf, 0xa7, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x02, 0xe8, 0x2e, 0xf2, 0xbb, 0xf7, 0x54,
+ 0xe8, 0x52, 0x5c, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x2c, 0x03, 0xb9, 0x2b, 0x03, 0xe8, 0xdf, 0xd6,
+ 0xe8, 0x80, 0x67, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x2d, 0x03, 0xb0, 0x01, 0xe8, 0x08, 0xd6, 0xe8,
+ 0x11, 0xd3, 0xbb, 0x17, 0x61, 0xe8, 0x9d, 0xcd,
+ 0xc7, 0x06, 0xaf, 0x64, 0xe6, 0x00, 0xc7, 0x06,
+ 0xb1, 0x64, 0xb8, 0x00, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x2e, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x06,
+ 0x00, 0xe8, 0xd1, 0x68, 0xe8, 0x0f, 0xd3, 0xbb,
+ 0x6a, 0x62, 0xe8, 0x78, 0xcd, 0xb9, 0x04, 0x00,
+ 0xb0, 0x0e, 0xb4, 0x0e, 0xe8, 0xa6, 0x65, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x2f, 0x03, 0xb0, 0x01,
+ 0xe8, 0xbd, 0xd5, 0xe8, 0x82, 0xfb, 0xc6, 0x47,
+ 0x01, 0x00, 0xe8, 0x07, 0x6a, 0xe8, 0x2e, 0x66,
+ 0xbb, 0xdc, 0x62, 0xe8, 0x4f, 0xcd, 0xc6, 0x06,
+ 0xdf, 0xdb, 0x01, 0xb9, 0x05, 0x00, 0xe8, 0xca,
+ 0x6c, 0xc3, 0x80, 0x3e, 0xdf, 0xdb, 0x00, 0x75,
+ 0x0d, 0xb9, 0xc8, 0x03, 0xe8, 0x8f, 0xd6, 0xbb,
+ 0x11, 0x55, 0xe8, 0xc0, 0x5b, 0xc3, 0xb9, 0x50,
+ 0x00, 0xb0, 0x03, 0xb4, 0x0c, 0xe8, 0x5d, 0x65,
+ 0xb9, 0x4f, 0x00, 0xb0, 0x04, 0xe8, 0x5e, 0x65,
+ 0xb9, 0xc8, 0x03, 0xe8, 0x51, 0xd6, 0xe8, 0xe2,
+ 0x66, 0xc7, 0x06, 0xf3, 0xb4, 0x06, 0x00, 0xb8,
+ 0x18, 0x01, 0xbb, 0xba, 0x00, 0xbf, 0x09, 0x01,
+ 0xbe, 0xb4, 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8,
+ 0x19, 0x67, 0xc3, 0x80, 0x3e, 0xe5, 0xdb, 0x01,
+ 0x75, 0x07, 0xbb, 0xc0, 0x57, 0xe8, 0x7d, 0x5b,
+ 0xc3, 0xb9, 0x31, 0x00, 0xb0, 0x0e, 0xb4, 0x07,
+ 0xe8, 0x1a, 0x65, 0xb9, 0x05, 0x00, 0xb0, 0x15,
+ 0xe8, 0x1b, 0x65, 0xb9, 0x65, 0x03, 0xe8, 0x2d,
+ 0xd6, 0xb0, 0x58, 0xe8, 0x42, 0xe2, 0xc6, 0x06,
+ 0xe5, 0xdb, 0x01, 0xc3, 0xb9, 0x35, 0x00, 0xb0,
+ 0x14, 0xb4, 0x05, 0xe8, 0xf7, 0x64, 0xb9, 0x18,
+ 0x00, 0xb0, 0x1b, 0xb4, 0x0e, 0xe8, 0xf6, 0x64,
+ 0xb9, 0x05, 0x00, 0xb0, 0x24, 0xe8, 0xf5, 0x64,
+ 0xb9, 0x47, 0x03, 0xe8, 0xe1, 0xd5, 0xc7, 0x06,
+ 0xaf, 0x64, 0x16, 0x01, 0xe8, 0x05, 0xd6, 0xb0,
+ 0x50, 0xe8, 0x0c, 0xe2, 0xb0, 0x01, 0xe8, 0xb4,
+ 0xd4, 0xc3, 0xbb, 0xe3, 0x58, 0xe8, 0x1d, 0x5b,
+ 0xc3, 0x80, 0x3e, 0xdd, 0xdb, 0x02, 0x74, 0x7f,
+ 0xbb, 0x5c, 0xdb, 0xe8, 0x67, 0xcc, 0x53, 0xe8,
+ 0x7b, 0xcc, 0x5b, 0x81, 0xfb, 0x6b, 0x63, 0x75,
+ 0x6d, 0xe8, 0x01, 0xda, 0xb9, 0x34, 0x00, 0xb0,
+ 0x08, 0xb4, 0x0c, 0xe8, 0x9f, 0x64, 0xb0, 0x0d,
+ 0xe8, 0xa3, 0x64, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x34, 0x03, 0xb0, 0x01, 0xe8, 0xb1, 0xd4, 0xe8,
+ 0x76, 0xfa, 0xc6, 0x47, 0x03, 0x59, 0xe8, 0xfb,
+ 0x68, 0xe8, 0x22, 0x65, 0xc6, 0x06, 0x33, 0x33,
+ 0x01, 0xc6, 0x06, 0xdd, 0x1c, 0x02, 0xe8, 0xc5,
+ 0xd9, 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1,
+ 0x64, 0x56, 0x57, 0xc6, 0x06, 0xc3, 0x64, 0x03,
+ 0xe8, 0x90, 0xf0, 0xe8, 0xb7, 0xd9, 0xe8, 0xad,
+ 0xd9, 0x5f, 0x5e, 0xc6, 0x06, 0xc3, 0x64, 0x02,
+ 0xe8, 0x80, 0xf0, 0xe8, 0xa7, 0xd9, 0xbb, 0x1f,
+ 0x55, 0xe8, 0xa1, 0x5a, 0xb0, 0x04, 0xe8, 0x20,
+ 0xd4, 0xc6, 0x06, 0xdc, 0xdb, 0x01, 0xc3, 0xbb,
+ 0xc0, 0x55, 0xe8, 0x90, 0x5a, 0xbe, 0x32, 0x01,
+ 0xbf, 0xc4, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x02,
+ 0xe8, 0x58, 0xf0, 0xe8, 0x78, 0xd9, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x39, 0x03, 0xb0, 0x01, 0xe8,
+ 0x45, 0xd4, 0xe8, 0x07, 0x65, 0xe8, 0x66, 0xd9,
+ 0xb9, 0x47, 0x00, 0xb0, 0x04, 0xb4, 0x0e, 0xe8,
+ 0x0b, 0x64, 0xb9, 0x37, 0x03, 0xe8, 0x1f, 0xd5,
+ 0xb9, 0x4a, 0x00, 0xb0, 0x01, 0xb4, 0x0a, 0xe8,
+ 0xfb, 0x63, 0xb0, 0x03, 0xe8, 0xff, 0x63, 0xb0,
+ 0x06, 0xe8, 0x01, 0x64, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x3a, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x05,
+ 0x00, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x3a, 0x03,
+ 0xe8, 0xe9, 0x66, 0xb0, 0x01, 0xe8, 0x3a, 0xd4,
+ 0xe8, 0x73, 0x64, 0xc7, 0x06, 0xf3, 0xb4, 0x06,
+ 0x00, 0xe8, 0xb4, 0xf9, 0xc6, 0x47, 0x03, 0x5b,
+ 0xe8, 0xda, 0x66, 0x8b, 0x36, 0xaf, 0x64, 0x8b,
+ 0x3e, 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64, 0x01,
+ 0xe8, 0xe0, 0xef, 0xe8, 0x00, 0xd9, 0xbb, 0xdb,
+ 0x55, 0xe8, 0x01, 0x5a, 0xc6, 0x06, 0xdd, 0xdb,
+ 0x03, 0xb0, 0x04, 0xbe, 0xc7, 0x78, 0xe8, 0x90,
+ 0xd3, 0xc3, 0x80, 0x3e, 0xdd, 0xdb, 0x03, 0x74,
+ 0x07, 0xbb, 0x05, 0x59, 0xe8, 0xe6, 0x59, 0xc3,
+ 0x80, 0x3e, 0xde, 0xdb, 0x01, 0x74, 0x31, 0xbe,
+ 0x18, 0x01, 0xbf, 0xb3, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x02, 0xe8, 0xa6, 0xef, 0xb9, 0x31, 0x00,
+ 0xb0, 0x07, 0xb4, 0x0c, 0xe8, 0x6e, 0x63, 0xb9,
+ 0x05, 0x00, 0xb0, 0x11, 0xe8, 0x6f, 0x63, 0xb9,
+ 0x3b, 0x03, 0xe8, 0x73, 0xd4, 0xb0, 0x4d, 0xe8,
+ 0x96, 0xe0, 0xc6, 0x06, 0xde, 0xdb, 0x01, 0xc3,
+ 0xbb, 0x08, 0x56, 0xe8, 0xa7, 0x59, 0xc3, 0x80,
+ 0x3e, 0xdc, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x28,
+ 0x55, 0xe8, 0x99, 0x59, 0xc3, 0xe8, 0x97, 0xd4,
+ 0xbb, 0x5d, 0x55, 0xe8, 0x8f, 0x59, 0xe8, 0x1f,
+ 0xf9, 0xc6, 0x47, 0x02, 0x00, 0xe8, 0xa4, 0x67,
+ 0xb9, 0x35, 0x03, 0xe8, 0x1c, 0xd4, 0xe8, 0x0f,
+ 0xf9, 0xc6, 0x47, 0x02, 0x5a, 0xc6, 0x47, 0x03,
+ 0x00, 0xe8, 0x4c, 0x67, 0xb9, 0x16, 0x00, 0xb0,
+ 0x02, 0xb4, 0x0b, 0xe8, 0x0f, 0x63, 0xb9, 0x36,
+ 0x03, 0xe8, 0x23, 0xd4, 0xbb, 0x77, 0x55, 0xe8,
+ 0x5b, 0x59, 0xb0, 0x05, 0xe8, 0xe6, 0xd2, 0xc6,
+ 0x06, 0xdd, 0xdb, 0x01, 0xc3, 0xe8, 0x4f, 0xd4,
+ 0xe8, 0x43, 0xd8, 0xbe, 0x90, 0x00, 0xbf, 0xb9,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x12,
+ 0xef, 0xe8, 0xcc, 0xf8, 0xc6, 0x07, 0x56, 0xe8,
+ 0x52, 0x67, 0xb9, 0x38, 0x00, 0xb0, 0x0f, 0xb4,
+ 0x07, 0xe8, 0xd1, 0x62, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x31, 0x03, 0xb9, 0x30, 0x03, 0xe8, 0xc9,
+ 0xd3, 0xe8, 0xac, 0xf8, 0xc6, 0x07, 0x57, 0xe8,
+ 0xee, 0x66, 0xb9, 0x22, 0x00, 0xb0, 0x01, 0xb4,
+ 0x08, 0xe8, 0xb1, 0x62, 0xb9, 0x05, 0x00, 0xb0,
+ 0x0f, 0xe8, 0xb2, 0x62, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x33, 0x03, 0xb9, 0x32, 0x03, 0xe8, 0xa1,
+ 0xd3, 0xe8, 0x84, 0xf8, 0xc6, 0x47, 0x02, 0x58,
+ 0xe8, 0xc5, 0x66, 0xc7, 0x06, 0xaf, 0x64, 0xa0,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xbc, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xdc, 0x64,
+ 0x00, 0xe8, 0xa8, 0xd3, 0xb0, 0x06, 0xe8, 0x5c,
+ 0xd2, 0xb0, 0x05, 0xe8, 0x4b, 0xd2, 0xb0, 0x4c,
+ 0xe8, 0xa5, 0xdf, 0xc3, 0x80, 0x3e, 0xdf, 0xdb,
+ 0x02, 0x73, 0x07, 0xbb, 0x2f, 0x59, 0xe8, 0xb4,
+ 0x58, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x05, 0x00,
+ 0xb8, 0x1f, 0x01, 0xbb, 0x8f, 0x00, 0xbf, 0x22,
+ 0x01, 0xbe, 0x8f, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0x28, 0x64, 0xc3, 0xb9, 0x4f, 0x00, 0xb0,
+ 0x05, 0xb4, 0x0b, 0xe8, 0x37, 0x62, 0xb9, 0x01,
+ 0x00, 0xb0, 0x0e, 0xe8, 0x38, 0x62, 0xb9, 0xc6,
+ 0x03, 0xe8, 0x3c, 0xd3, 0xbb, 0x55, 0x59, 0xe8,
+ 0x7b, 0x58, 0xc3, 0x80, 0x3e, 0xdf, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0xf6, 0x52, 0xe8, 0x6d, 0x58,
+ 0xc3, 0xb9, 0x47, 0x00, 0xb0, 0x04, 0xb4, 0x0e,
+ 0xe8, 0x0a, 0x62, 0xb9, 0x37, 0x03, 0xe8, 0x17,
+ 0xd3, 0x80, 0x3e, 0xdd, 0xdb, 0x00, 0x75, 0x07,
+ 0xbb, 0x80, 0x4d, 0xe8, 0x4f, 0x58, 0xc3, 0xb9,
+ 0x4a, 0x00, 0xb0, 0x01, 0xb4, 0x0e, 0xe8, 0xec,
+ 0x61, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x38, 0x03,
+ 0xb0, 0x01, 0xe8, 0x03, 0xd2, 0xe8, 0x7e, 0x62,
+ 0x80, 0x3e, 0xdd, 0xdb, 0x01, 0x75, 0x0e, 0xe8,
+ 0x2b, 0xd7, 0xbb, 0x9a, 0x55, 0xe8, 0x25, 0x58,
+ 0xc6, 0x06, 0xdd, 0xdb, 0x02, 0xc3, 0xe8, 0x9d,
+ 0x5c, 0xc3, 0xbb, 0x82, 0xdb, 0xe8, 0x6d, 0xc9,
+ 0xe8, 0x82, 0xc9, 0xc3, 0xb9, 0x50, 0x00, 0xb0,
+ 0x04, 0xb4, 0x02, 0xe8, 0xaf, 0x61, 0xb9, 0xc3,
+ 0x03, 0xe8, 0xab, 0xd2, 0xe8, 0x3c, 0x63, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x05, 0x00, 0xb8, 0xa6, 0x00,
+ 0xbb, 0x9e, 0x00, 0xbf, 0xa6, 0x00, 0xbe, 0xa1,
+ 0x00, 0xb1, 0x0b, 0xb5, 0x03, 0xe8, 0x73, 0x63,
+ 0xc3, 0xb9, 0xc5, 0x03, 0xe8, 0x99, 0xd2, 0xbb,
+ 0x11, 0x55, 0xe8, 0xd8, 0x57, 0xc3, 0xbb, 0x62,
+ 0x59, 0xe8, 0xd1, 0x57, 0xc3, 0xbb, 0x9d, 0x59,
+ 0xe8, 0xca, 0x57, 0xc3, 0xbb, 0xb6, 0x59, 0xe8,
+ 0xc3, 0x57, 0xc3, 0x80, 0x3e, 0xe6, 0xdb, 0x01,
+ 0x75, 0x2d, 0xc6, 0x06, 0xe6, 0xdb, 0x02, 0xe8,
+ 0xb5, 0xd2, 0xe8, 0x43, 0xf7, 0xc6, 0x47, 0x01,
+ 0x67, 0xe8, 0xc8, 0x65, 0xb9, 0x05, 0x00, 0xb0,
+ 0x09, 0xb4, 0x09, 0xe8, 0x47, 0x61, 0xb9, 0x68,
+ 0x03, 0xe8, 0x5b, 0xd2, 0xb0, 0x5a, 0xe8, 0x77,
+ 0xde, 0xb0, 0x07, 0xe8, 0x1f, 0xd1, 0xc3, 0xb9,
+ 0xc4, 0x03, 0xe8, 0x43, 0xd2, 0xbb, 0x11, 0x55,
+ 0xe8, 0x82, 0x57, 0xc3, 0xbb, 0xdb, 0x59, 0xe8,
+ 0x7b, 0x57, 0xc3, 0xbb, 0x01, 0x5a, 0xe8, 0x74,
+ 0x57, 0xc3, 0xe8, 0xf1, 0x5b, 0xc3, 0xe8, 0xed,
+ 0x5b, 0xc3, 0xe8, 0x6a, 0xd2, 0xe8, 0xf8, 0xf6,
+ 0xc6, 0x07, 0x00, 0xe8, 0x7e, 0x65, 0xb9, 0x05,
+ 0x00, 0xb0, 0x09, 0xb4, 0x07, 0xe8, 0xfd, 0x60,
+ 0xb9, 0x44, 0x03, 0xe8, 0x11, 0xd2, 0xb0, 0x4f,
+ 0xe8, 0x2d, 0xde, 0xb0, 0x0c, 0xe8, 0xd5, 0xd0,
+ 0xc3, 0xbb, 0x20, 0x5a, 0xe8, 0x3e, 0x57, 0xc3,
+ 0x80, 0x3e, 0xe7, 0xdb, 0x01, 0x74, 0x03, 0xe9,
+ 0x83, 0x00, 0xbe, 0x8c, 0x00, 0xbf, 0x98, 0x00,
+ 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8, 0xfb, 0xec,
+ 0x80, 0x3e, 0xe8, 0xdb, 0x01, 0x74, 0x07, 0xbb,
+ 0x55, 0x58, 0xe8, 0x18, 0x57, 0xc3, 0xbb, 0x20,
+ 0x6f, 0xe8, 0x81, 0xc8, 0xc6, 0x06, 0xe6, 0x1c,
+ 0xef, 0xbe, 0xe0, 0x53, 0xbb, 0x83, 0x58, 0xe8,
+ 0xac, 0x59, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x72,
+ 0x03, 0xb0, 0x01, 0xe8, 0xc2, 0xd0, 0xe8, 0x87,
+ 0xf6, 0xc6, 0x47, 0x02, 0x00, 0xe8, 0x0c, 0x65,
+ 0xb9, 0x4b, 0x00, 0xb0, 0x0a, 0xb4, 0x0a, 0xe8,
+ 0x8b, 0x60, 0xb9, 0x18, 0x00, 0xb0, 0x0f, 0xe8,
+ 0x8c, 0x60, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x73,
+ 0x03, 0xb0, 0x01, 0xe8, 0x9a, 0xd0, 0xe8, 0x63,
+ 0x61, 0xe8, 0x87, 0x00, 0xb8, 0x01, 0x00, 0xe8,
+ 0xe7, 0xe4, 0xe8, 0xfb, 0xe4, 0xb0, 0x02, 0xe8,
+ 0x4b, 0xd0, 0xb0, 0x01, 0xe8, 0x46, 0xd0, 0xc6,
+ 0x06, 0xe9, 0xdb, 0x01, 0xc3, 0xe8, 0x68, 0xcd,
+ 0x80, 0x3e, 0xdf, 0xdb, 0x03, 0x74, 0x0a, 0xbb,
+ 0x68, 0xdb, 0xe8, 0xf8, 0xc7, 0xe8, 0x0d, 0xc8,
+ 0xc3, 0x80, 0x3e, 0xe3, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0xd6, 0x6b, 0xe8, 0xff, 0xc7, 0xc3, 0xbb,
+ 0xb5, 0x69, 0xe8, 0xf8, 0xc7, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x5a, 0x03, 0xb9, 0x5b, 0x03, 0xe8,
+ 0x18, 0xd1, 0xe8, 0xc1, 0x60, 0xb9, 0x4b, 0x00,
+ 0xb0, 0x06, 0xb4, 0x08, 0xe8, 0x16, 0x60, 0xb0,
+ 0x0a, 0xe8, 0x1a, 0x60, 0xb9, 0x05, 0x00, 0xb0,
+ 0x0f, 0xe8, 0x19, 0x60, 0xb9, 0x5c, 0x03, 0xe8,
+ 0x1d, 0xd1, 0xe8, 0x13, 0xcd, 0xbb, 0xc2, 0x69,
+ 0xe8, 0xc2, 0xc7, 0xb0, 0x55, 0xe8, 0x30, 0xdd,
+ 0xc6, 0x06, 0xe3, 0xdb, 0x01, 0xc6, 0x06, 0xf0,
+ 0xdb, 0x00, 0xc3, 0xe8, 0x00, 0x00, 0x1e, 0x06,
+ 0xa1, 0xb1, 0x32, 0x8e, 0xd8, 0xb8, 0x00, 0xa0,
+ 0x8e, 0xc0, 0xfc, 0xe8, 0xea, 0x5c, 0xe8, 0xe7,
+ 0x5c, 0xbe, 0x00, 0x0a, 0x33, 0xff, 0xb9, 0x00,
+ 0x78, 0xf3, 0xa5, 0xe8, 0xda, 0x5c, 0xe8, 0xd7,
+ 0x5c, 0x33, 0xf6, 0x33, 0xff, 0xb9, 0x00, 0x7d,
+ 0xf3, 0xa5, 0xe8, 0xcb, 0x5c, 0xe8, 0xc8, 0x5c,
+ 0xbe, 0x00, 0x05, 0x33, 0xff, 0xb9, 0x80, 0x7a,
+ 0xf3, 0xa5, 0xe8, 0xbb, 0x5c, 0xe8, 0xb8, 0x5c,
+ 0x33, 0xf6, 0x33, 0xff, 0xb9, 0x00, 0x7d, 0xf3,
+ 0xa5, 0x07, 0x1f, 0xc3, 0x80, 0x3e, 0xf0, 0xdb,
+ 0x01, 0x75, 0x07, 0xbb, 0x25, 0x5e, 0xe8, 0xe4,
+ 0x55, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x05, 0x00,
+ 0xb8, 0x23, 0x00, 0xbb, 0xa2, 0x00, 0xbf, 0x23,
+ 0x00, 0xbe, 0xae, 0x00, 0xb1, 0x0b, 0xb5, 0x03,
+ 0xe8, 0x58, 0x61, 0xc3, 0x80, 0x3e, 0xe9, 0xdb,
+ 0x01, 0x75, 0x3f, 0xb9, 0x59, 0x00, 0xb0, 0x05,
+ 0xb4, 0x02, 0xe8, 0x60, 0x5f, 0xb9, 0xbe, 0x03,
+ 0xe8, 0x4c, 0xd0, 0xe8, 0xed, 0x60, 0xc6, 0x06,
+ 0xcc, 0x64, 0x00, 0xc6, 0x06, 0xdc, 0x64, 0x01,
+ 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xe8, 0xc1, 0xf3,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x09, 0x00, 0xb8, 0xf0,
+ 0x00, 0xbb, 0xb6, 0x00, 0xbf, 0xe0, 0x00, 0xbe,
+ 0xb6, 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x12,
+ 0x61, 0xc3, 0x80, 0x3e, 0xe7, 0xdb, 0x01, 0x74,
+ 0x0d, 0xe8, 0x34, 0xcc, 0xbb, 0x8a, 0xdb, 0xe8,
+ 0xcb, 0xc6, 0xe8, 0xe0, 0xc6, 0xc3, 0xbb, 0x94,
+ 0x58, 0xe8, 0x69, 0x55, 0xc3, 0xbb, 0x1e, 0x43,
+ 0xe8, 0x62, 0x55, 0xc3, 0xe8, 0x60, 0xd0, 0xe8,
+ 0xee, 0xf4, 0xc6, 0x07, 0x00, 0xe8, 0x74, 0x63,
+ 0xb9, 0x31, 0x00, 0xb0, 0x06, 0xb4, 0x0b, 0xe8,
+ 0xf3, 0x5e, 0xb9, 0x05, 0x00, 0xb0, 0x0d, 0xe8,
+ 0xf4, 0x5e, 0xb9, 0x5d, 0x03, 0xe8, 0xff, 0xcf,
+ 0xb0, 0x57, 0xe8, 0x1b, 0xdc, 0xb0, 0x06, 0xe8,
+ 0xc3, 0xce, 0xc3, 0xe8, 0xb0, 0x59, 0xc3, 0xbb,
+ 0x51, 0x5a, 0xe8, 0x28, 0x55, 0xc3, 0xbb, 0x98,
+ 0x5a, 0xe8, 0x21, 0x55, 0xc3, 0xb9, 0x0f, 0x00,
+ 0xb0, 0x07, 0xb4, 0x04, 0xe8, 0xbe, 0x5e, 0xb9,
+ 0x74, 0x03, 0xe8, 0xcb, 0xcf, 0xb9, 0x37, 0x00,
+ 0xb0, 0x01, 0xb4, 0x04, 0xe8, 0xae, 0x5e, 0xb9,
+ 0x18, 0x00, 0xb0, 0x0c, 0xe8, 0xaf, 0x5e, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x75, 0x03, 0xb0, 0x01,
+ 0xe8, 0xbd, 0xce, 0xc6, 0x06, 0x45, 0x33, 0xd0,
+ 0xb0, 0x01, 0xbe, 0x76, 0x03, 0xbb, 0xe5, 0x67,
+ 0xe8, 0x84, 0xca, 0xc7, 0x06, 0xaf, 0x64, 0xc6,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xba, 0x00, 0xc6,
+ 0x06, 0xcd, 0x64, 0x00, 0xc6, 0x06, 0xdc, 0x64,
+ 0x00, 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xe8, 0xe8,
+ 0xf2, 0xb9, 0x03, 0x00, 0xe8, 0xb4, 0x65, 0xe8,
+ 0xab, 0x50, 0xe8, 0x2e, 0xba, 0xb8, 0x64, 0x00,
+ 0xe8, 0xb9, 0xd3, 0xc7, 0x06, 0xf3, 0xb4, 0x28,
+ 0x00, 0xe8, 0x69, 0x61, 0xe8, 0x28, 0xcb, 0xbb,
+ 0x20, 0x7f, 0xe8, 0x10, 0xc6, 0xe8, 0xc6, 0xdb,
+ 0xb0, 0x1d, 0xe8, 0x7b, 0xdb, 0xbb, 0x5c, 0xe4,
+ 0xe8, 0x1b, 0xba, 0xb9, 0x06, 0x00, 0xe8, 0x82,
+ 0x65, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xbc, 0x03,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x01, 0x00, 0xe8, 0x33,
+ 0x61, 0xb0, 0x01, 0xe8, 0x84, 0xce, 0xc6, 0x06,
+ 0x45, 0x33, 0xd1, 0xb0, 0x01, 0xbe, 0xbd, 0x03,
+ 0xbb, 0xc4, 0x8b, 0xe8, 0x09, 0xca, 0xe8, 0xad,
+ 0x5e, 0xe8, 0x60, 0x0c, 0xc3, 0xb9, 0xbf, 0x03,
+ 0xe8, 0xf4, 0xce, 0xe8, 0x95, 0x5f, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x08, 0x00, 0xb8, 0x28, 0x00, 0xbb,
+ 0x98, 0x00, 0xbf, 0x28, 0x00, 0xbe, 0x9b, 0x00,
+ 0xb1, 0x0b, 0xb5, 0x03, 0xe8, 0xcc, 0x5f, 0xc3,
+ 0xe8, 0xbb, 0x58, 0xc3, 0xb9, 0xc0, 0x03, 0xe8,
+ 0xee, 0xce, 0xbb, 0x11, 0x55, 0xe8, 0x2d, 0x54,
+ 0xc3, 0xbb, 0xc6, 0x5a, 0xe8, 0x26, 0x54, 0xc3,
+ 0xbb, 0xed, 0x5a, 0xe8, 0x1f, 0x54, 0xc3, 0xbb,
+ 0xed, 0x5a, 0xe8, 0x18, 0x54, 0xc3, 0xb9, 0x20,
+ 0x00, 0xb0, 0x18, 0xb4, 0x05, 0xe8, 0xb5, 0x5d,
+ 0xb9, 0x5e, 0x03, 0xe8, 0xa1, 0xce, 0xe8, 0x42,
+ 0x5f, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x5f, 0x03,
+ 0xb0, 0x01, 0xe8, 0xca, 0xcd, 0xe8, 0x8c, 0x5e,
+ 0xb0, 0x54, 0xe8, 0xd3, 0xda, 0xb0, 0x01, 0xe8,
+ 0x7b, 0xcd, 0xc6, 0x06, 0xe2, 0xdb, 0x02, 0xc3,
+ 0x80, 0x3e, 0xe2, 0xdb, 0x00, 0x74, 0x10, 0xbb,
+ 0x22, 0x57, 0xe8, 0xd8, 0x53, 0xe8, 0xd5, 0xd2,
+ 0xbb, 0x2a, 0x57, 0xe8, 0xcf, 0x53, 0xc3, 0xe8,
+ 0x10, 0xcb, 0x80, 0x3e, 0xda, 0xdb, 0x01, 0x74,
+ 0x0a, 0xbb, 0x40, 0xdb, 0xe8, 0x16, 0xc5, 0xe8,
+ 0x2b, 0xc5, 0xc3, 0xbb, 0x4c, 0xdb, 0xe8, 0x0c,
+ 0xc5, 0xe8, 0x21, 0xc5, 0xc3, 0xbb, 0x27, 0x5b,
+ 0xe8, 0xaa, 0x53, 0xc3, 0x80, 0x3e, 0xda, 0xdb,
+ 0x01, 0x75, 0x1a, 0xc7, 0x06, 0xf3, 0xb4, 0x05,
+ 0x00, 0xb8, 0x78, 0x00, 0xbb, 0xc7, 0x00, 0xbf,
+ 0x80, 0x00, 0xbe, 0xb0, 0x00, 0xb1, 0x13, 0xb5,
+ 0x01, 0xe8, 0x17, 0x5f, 0xc3, 0xe8, 0xca, 0xca,
+ 0xbb, 0xe9, 0x5f, 0xe8, 0xef, 0xc4, 0xbe, 0x0d,
+ 0x01, 0xbf, 0xaf, 0x00, 0xc6, 0x06, 0xc3, 0x64,
+ 0x04, 0xe8, 0x47, 0xe9, 0xe8, 0xb3, 0xca, 0xbb,
+ 0x56, 0xdb, 0xe8, 0xc0, 0xc4, 0xe8, 0xd5, 0xc4,
+ 0xc3, 0xe8, 0x32, 0xcb, 0xbb, 0xa6, 0xda, 0xe8,
+ 0xb3, 0xc4, 0x53, 0xe8, 0xc7, 0xc4, 0x5b, 0x81,
+ 0xfb, 0xb4, 0x01, 0x75, 0x50, 0x8b, 0x3e, 0xb1,
+ 0x64, 0x8b, 0x36, 0xaf, 0x64, 0x57, 0x56, 0xbf,
+ 0x9f, 0x00, 0xbe, 0xbd, 0x00, 0xe8, 0x13, 0xe9,
+ 0xb8, 0x01, 0x01, 0xe8, 0xf0, 0xd1, 0xb9, 0x05,
+ 0x00, 0xb0, 0x02, 0xb4, 0x0a, 0xe8, 0xd5, 0x5c,
+ 0xb0, 0x13, 0xe8, 0xd9, 0x5c, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x27, 0x02, 0xb9, 0x26, 0x02, 0xe8,
+ 0xd6, 0xcd, 0x5e, 0x5f, 0xc6, 0x06, 0xc3, 0x64,
+ 0x02, 0xe8, 0xe7, 0xe8, 0xb0, 0x13, 0xe8, 0xef,
+ 0xd9, 0xe8, 0xda, 0xca, 0xbb, 0xa6, 0xda, 0xe8,
+ 0x5b, 0xc4, 0xe8, 0x70, 0xc4, 0xc3, 0xe8, 0xfe,
+ 0xcd, 0xb0, 0x10, 0xe8, 0xda, 0xd9, 0xb0, 0x02,
+ 0xe8, 0x82, 0xcc, 0xe8, 0x82, 0xf2, 0xc6, 0x07,
+ 0x00, 0xe8, 0x08, 0x61, 0xb9, 0x05, 0x00, 0xb0,
+ 0x0c, 0xb4, 0x06, 0xe8, 0x87, 0x5c, 0xb9, 0x23,
+ 0x02, 0xe8, 0x9b, 0xcd, 0xc3, 0xe8, 0x56, 0x57,
+ 0xc3, 0xe8, 0x52, 0x57, 0xc3, 0xe8, 0x4e, 0x57,
+ 0xc3, 0xbb, 0xd6, 0x3e, 0xe8, 0xc6, 0x52, 0xc3,
+ 0xe8, 0x43, 0x57, 0xc3, 0xe8, 0x1d, 0xcb, 0xbb,
+ 0xbd, 0x33, 0xe8, 0x28, 0xc4, 0xc6, 0x06, 0xe6,
+ 0x1c, 0xd0, 0xbe, 0xe4, 0x61, 0xbb, 0xae, 0x49,
+ 0xe8, 0xd5, 0x54, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x07, 0xe8, 0x48, 0x5c, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x9b, 0x02, 0xb0, 0x02, 0xe8,
+ 0x5e, 0xcc, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x9c, 0x02, 0xb0, 0x02, 0xe8, 0x51, 0xcc, 0xe8,
+ 0xcc, 0x5c, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xc6, 0x06, 0xdb, 0x1c,
+ 0x01, 0xe8, 0x04, 0xf2, 0xc6, 0x47, 0x02, 0x32,
+ 0xe8, 0x89, 0x60, 0xc7, 0x06, 0x30, 0x32, 0x78,
+ 0x00, 0xc7, 0x06, 0x2e, 0x32, 0x5a, 0x00, 0xc7,
+ 0x06, 0x2c, 0x32, 0xae, 0x00, 0xe8, 0x76, 0xda,
+ 0xe8, 0xbd, 0x5a, 0xe8, 0xae, 0xca, 0xbb, 0xc7,
+ 0x36, 0xe8, 0xb9, 0xc3, 0xb9, 0x52, 0x00, 0xb0,
+ 0x13, 0xb4, 0x0e, 0xe8, 0xe7, 0x5b, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0x9d, 0x02, 0xb0, 0x02,
+ 0xe8, 0x3f, 0xcc, 0xe8, 0xc2, 0xf1, 0xc6, 0x47,
+ 0x03, 0x00, 0xe8, 0x75, 0x60, 0xc7, 0x06, 0xec,
+ 0xdb, 0x00, 0x00, 0xe8, 0x68, 0x5c, 0xbb, 0x79,
+ 0x37, 0xe8, 0x89, 0xc3, 0xb0, 0x0f, 0xe8, 0x98,
+ 0xcb, 0xb0, 0x08, 0xe8, 0x9f, 0xcb, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0d, 0x00, 0xb8, 0x00, 0x00,
+ 0xbb, 0xac, 0x00, 0xbf, 0x12, 0x00, 0xbe, 0xad,
+ 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x83, 0x5d,
+ 0xc3, 0xc6, 0x06, 0xdc, 0x64, 0x01, 0xc6, 0x06,
+ 0xcb, 0x64, 0x00, 0xc7, 0x06, 0xf3, 0xb4, 0x0e,
+ 0x00, 0xb8, 0x18, 0x01, 0xbb, 0xc6, 0x00, 0xbf,
+ 0xe3, 0x00, 0xbe, 0xb8, 0x00, 0xb1, 0x01, 0xb5,
+ 0x04, 0xe8, 0x5f, 0x5d, 0xc3, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x0f, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0xa2,
+ 0x00, 0xbf, 0x06, 0x01, 0xbe, 0xb0, 0x00, 0xb1,
+ 0x01, 0xb5, 0x04, 0xe8, 0x45, 0x5d, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0c, 0x00, 0xb8, 0x3f, 0x01,
+ 0xbb, 0x98, 0x00, 0xbf, 0x2d, 0x01, 0xbe, 0xaf,
+ 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x2b, 0x5d,
+ 0xc3, 0xe8, 0x9b, 0xcc, 0xb9, 0x05, 0x00, 0xb0,
+ 0x0c, 0xb4, 0x09, 0xe8, 0x37, 0x5b, 0xb0, 0x12,
+ 0xe8, 0x6d, 0xd8, 0xb0, 0x0d, 0xe8, 0x15, 0xcb,
+ 0xe8, 0x15, 0xf1, 0xc6, 0x47, 0x01, 0x00, 0xe8,
+ 0x9a, 0x5f, 0xb9, 0x25, 0x02, 0xe8, 0x37, 0xcc,
+ 0xc3, 0xe8, 0xf2, 0x55, 0xc3, 0xe8, 0x6f, 0xcc,
+ 0xe8, 0xfd, 0xf0, 0xc6, 0x47, 0x02, 0x00, 0xe8,
+ 0x82, 0x5f, 0xb9, 0x05, 0x00, 0xb0, 0x0c, 0xb4,
+ 0x07, 0xe8, 0x01, 0x5b, 0xb9, 0xa4, 0x02, 0xe8,
+ 0x15, 0xcc, 0xbb, 0xb0, 0x4a, 0xe8, 0x4d, 0x51,
+ 0xb0, 0x0f, 0xe8, 0xd8, 0xca, 0xb0, 0x33, 0xe8,
+ 0x26, 0xd8, 0xc3, 0xc3, 0xbb, 0x0f, 0x37, 0x80,
+ 0x3e, 0xa1, 0xdb, 0x01, 0x74, 0x03, 0xbb, 0xc2,
+ 0x36, 0xe8, 0x31, 0x51, 0xc3, 0xb9, 0xc7, 0x03,
+ 0xe8, 0xe5, 0xcb, 0xbb, 0x42, 0x35, 0xe8, 0x24,
+ 0x51, 0xc3, 0x80, 0x3e, 0xa1, 0xdb, 0x01, 0x74,
+ 0x53, 0xb9, 0x38, 0x00, 0xb0, 0x08, 0xb4, 0x0e,
+ 0xe8, 0xba, 0x5a, 0xb0, 0x0c, 0xe8, 0xc5, 0x5a,
+ 0xb9, 0x31, 0x00, 0xb0, 0x0a, 0xe8, 0xb6, 0x5a,
+ 0xc6, 0x06, 0x35, 0x33, 0x10, 0xc6, 0x06, 0x36,
+ 0x33, 0x18, 0xb8, 0x52, 0x46, 0xa3, 0x37, 0x33,
+ 0xb8, 0x5b, 0x7b, 0xa3, 0x39, 0x33, 0xe8, 0xee,
+ 0xcb, 0xb9, 0x4b, 0x02, 0xe8, 0x00, 0xcc, 0xe8,
+ 0xba, 0xcb, 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e,
+ 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64, 0x02, 0xe8,
+ 0xa9, 0xe6, 0xe8, 0xd0, 0xcf, 0xbb, 0x68, 0x36,
+ 0xe8, 0xca, 0x50, 0xc3, 0x80, 0x3e, 0xa2, 0xdb,
+ 0x01, 0x74, 0x73, 0xb9, 0x1a, 0x00, 0xb0, 0x0d,
+ 0xb4, 0x0c, 0xe8, 0x60, 0x5a, 0xb0, 0x0f, 0xe8,
+ 0x64, 0x5a, 0xb0, 0x17, 0xe8, 0x66, 0x5a, 0xb0,
+ 0x19, 0xe8, 0x68, 0x5a, 0xb0, 0x20, 0xe8, 0x6a,
+ 0x5a, 0xb0, 0x22, 0xe8, 0x6c, 0x5a, 0xb0, 0x24,
+ 0xe8, 0x6e, 0x5a, 0xb9, 0x4e, 0x02, 0xe8, 0x2e,
+ 0xcb, 0xc7, 0x06, 0xaf, 0x64, 0xcc, 0x00, 0xc7,
+ 0x06, 0xb1, 0x64, 0xb2, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x03, 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xc6,
+ 0x06, 0xcd, 0x64, 0x01, 0xb9, 0x3b, 0x00, 0xb0,
+ 0x01, 0xb4, 0x0a, 0xe8, 0x17, 0x5a, 0xb9, 0x3c,
+ 0x00, 0xb0, 0x10, 0xe8, 0x18, 0x5a, 0xb9, 0x4f,
+ 0x02, 0xe8, 0x23, 0xcb, 0xe8, 0x57, 0xcf, 0xbb,
+ 0x2e, 0x37, 0xe8, 0x58, 0x50, 0xc6, 0x06, 0xa2,
+ 0xdb, 0x01, 0xe8, 0x40, 0x4d, 0xc3, 0xbb, 0x66,
+ 0x37, 0xe8, 0x49, 0x50, 0xc3, 0x80, 0x3e, 0x9e,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xe8, 0x35, 0xe8,
+ 0x3b, 0x50, 0xc3, 0xc6, 0x06, 0x9e, 0xdb, 0x01,
+ 0xe8, 0x34, 0xcb, 0xe8, 0xc2, 0xef, 0xc6, 0x47,
+ 0x02, 0x00, 0x53, 0xe8, 0x46, 0x5e, 0xb9, 0x15,
+ 0x00, 0xb0, 0x09, 0xb4, 0x02, 0xe8, 0xc5, 0x59,
+ 0xb9, 0x22, 0x00, 0xb0, 0x15, 0xe8, 0xc6, 0x59,
+ 0xb9, 0x1a, 0x00, 0xb0, 0x1e, 0xe8, 0xc5, 0x59,
+ 0xb9, 0x28, 0x02, 0xe8, 0xb4, 0xca, 0x5b, 0xc6,
+ 0x47, 0x02, 0x12, 0xe8, 0xda, 0x5d, 0xe8, 0xd3,
+ 0xca, 0xb0, 0x14, 0xe8, 0xda, 0xd6, 0xc3, 0xbb,
+ 0x2a, 0x3f, 0xe8, 0xf0, 0x4f, 0xc3, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x0b, 0x00, 0xb8, 0xe4, 0x00, 0xbb,
+ 0x6d, 0x00, 0xbf, 0x8a, 0x00, 0xbe, 0xa3, 0x00,
+ 0xb1, 0x0b, 0xb5, 0x03, 0xe8, 0x64, 0x5b, 0xc3,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x0d, 0x00, 0xb8, 0x3f,
+ 0x01, 0xbb, 0xb5, 0x00, 0xbf, 0x05, 0x01, 0xbe,
+ 0xb7, 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x4a,
+ 0x5b, 0xc3, 0xe8, 0x28, 0x00, 0xe8, 0xb7, 0xca,
+ 0xe8, 0x45, 0xef, 0xc6, 0x47, 0x01, 0x00, 0xe8,
+ 0xca, 0x5d, 0xb9, 0x05, 0x00, 0xb0, 0x0a, 0xb4,
+ 0x09, 0xe8, 0x49, 0x59, 0xb9, 0x1f, 0x02, 0xe8,
+ 0x5d, 0xca, 0xb0, 0x0f, 0xe8, 0x79, 0xd6, 0xb0,
+ 0x09, 0xe8, 0x21, 0xc9, 0xc3, 0xbe, 0xcb, 0x00,
+ 0xbf, 0xa9, 0x00, 0x81, 0x3e, 0xaf, 0x64, 0xcb,
+ 0x00, 0x75, 0x1a, 0x81, 0x3e, 0xb1, 0x64, 0xab,
+ 0x00, 0x75, 0x12, 0xc6, 0x06, 0xc3, 0x64, 0x01,
+ 0x57, 0x56, 0xe8, 0x46, 0xe5, 0xb8, 0x09, 0x00,
+ 0xe8, 0x4f, 0xce, 0x5e, 0x5f, 0xc6, 0x06, 0xc3,
+ 0x64, 0x02, 0xe8, 0x36, 0xe5, 0xc3, 0xbb, 0x54,
+ 0x3f, 0xe8, 0x59, 0x4f, 0xc3, 0xbb, 0x85, 0x3f,
+ 0xe8, 0x52, 0x4f, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x0b, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0xc6, 0x00,
+ 0xbf, 0x2c, 0x01, 0xbe, 0xc4, 0x00, 0xb1, 0x01,
+ 0xb5, 0x04, 0xe8, 0xc6, 0x5a, 0x80, 0x3e, 0x9c,
+ 0xdb, 0x01, 0x74, 0x64, 0xe8, 0xd8, 0x54, 0xe8,
+ 0x26, 0xe5, 0x80, 0x3e, 0xc6, 0x64, 0x00, 0x75,
+ 0xf6, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x20, 0x02,
+ 0xb0, 0x01, 0xc7, 0x06, 0x23, 0xc4, 0x01, 0x00,
+ 0xc7, 0x06, 0x3b, 0x33, 0x15, 0x00, 0xc7, 0x06,
+ 0x3d, 0x33, 0x2a, 0x00, 0xc6, 0x06, 0xce, 0x00,
+ 0x02, 0xe8, 0x29, 0xc9, 0x72, 0x33, 0xa1, 0x3f,
+ 0x33, 0x0b, 0xc0, 0x74, 0x10, 0x3d, 0x30, 0x00,
+ 0x77, 0x0b, 0xb0, 0x01, 0xb9, 0x2c, 0x00, 0xba,
+ 0x33, 0x00, 0xe8, 0x81, 0xc1, 0xe8, 0x2e, 0x59,
+ 0x80, 0x3e, 0x27, 0xc4, 0x01, 0x75, 0x11, 0xc6,
+ 0x06, 0xcf, 0x00, 0x00, 0xe8, 0xca, 0xc6, 0xbb,
+ 0xb2, 0xda, 0xe8, 0x28, 0xc0, 0xe8, 0x3d, 0xc0,
+ 0xc3, 0xc6, 0x06, 0x9c, 0xdb, 0x01, 0xbb, 0x63,
+ 0x35, 0xb9, 0x3c, 0x00, 0xe8, 0xbd, 0x4f, 0xe8,
+ 0x04, 0x59, 0xb9, 0x11, 0x00, 0xb0, 0x05, 0xb4,
+ 0x08, 0xe8, 0x59, 0x58, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x21, 0x02, 0xb0, 0x01, 0xe8, 0xb9, 0xc8,
+ 0xe8, 0x35, 0xee, 0xc6, 0x07, 0x10, 0xe8, 0xbb,
+ 0x5c, 0xb0, 0x02, 0xe8, 0x1b, 0xc8, 0xe8, 0x88,
+ 0xc6, 0xbb, 0x17, 0x09, 0xe8, 0xfe, 0xbf, 0xc3,
+ 0xbb, 0x2a, 0x3f, 0xe8, 0x87, 0x4e, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0c, 0x00, 0xb8, 0x00, 0x00,
+ 0xbb, 0xbd, 0x00, 0xbf, 0x1e, 0x00, 0xbe, 0xbd,
+ 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0xfb, 0x59,
+ 0xc3, 0xbb, 0xec, 0x3f, 0xe8, 0x66, 0x4e, 0xc3,
+ 0xe8, 0x64, 0xc9, 0xe8, 0xf2, 0xed, 0xc6, 0x07,
+ 0x00, 0xe8, 0x78, 0x5c, 0xb9, 0x05, 0x00, 0xb0,
+ 0x0b, 0xb4, 0x09, 0xe8, 0xf7, 0x57, 0xb9, 0x7d,
+ 0x02, 0xe8, 0x0b, 0xc9, 0xb0, 0x07, 0xe8, 0xd4,
+ 0xc7, 0xb0, 0x31, 0xe8, 0x22, 0xd5, 0xc3, 0x80,
+ 0x3e, 0x9f, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0xe1,
+ 0x34, 0xe8, 0x31, 0x4e, 0xc3, 0xbb, 0x2e, 0x40,
+ 0xe8, 0x2a, 0x4e, 0xc3, 0xbb, 0xe1, 0x34, 0xe8,
+ 0x23, 0x4e, 0xc3, 0xe8, 0xa0, 0x52, 0xc3, 0x80,
+ 0x3e, 0x9f, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0xe1,
+ 0x34, 0xe8, 0x11, 0x4e, 0xc3, 0x80, 0x3e, 0xa0,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0x31, 0x3e, 0xe8,
+ 0x03, 0x4e, 0xc3, 0xbe, 0xad, 0x00, 0xbf, 0x8a,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x02, 0xe8, 0xca,
+ 0xe3, 0xb9, 0x1c, 0x00, 0xb0, 0x05, 0xb4, 0x08,
+ 0xe8, 0x92, 0x57, 0xb9, 0x47, 0x02, 0xe8, 0x7e,
+ 0xc8, 0xb9, 0x48, 0x02, 0xe8, 0x7b, 0xc8, 0xe8,
+ 0x52, 0x5a, 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d,
+ 0xe8, 0x7d, 0x5a, 0xa1, 0xb1, 0x32, 0xb9, 0x00,
+ 0x7d, 0xe8, 0x74, 0x5a, 0xa1, 0xb3, 0x32, 0xb9,
+ 0x00, 0x7d, 0xe8, 0x6b, 0x5a, 0xa1, 0xb5, 0x32,
+ 0xb9, 0x00, 0x7d, 0xe8, 0x62, 0x5a, 0xb8, 0x64,
+ 0x00, 0xe8, 0xb8, 0xcc, 0xe8, 0x32, 0x5a, 0xb9,
+ 0x48, 0x00, 0xb0, 0x12, 0xb4, 0x08, 0xe8, 0x4c,
+ 0x57, 0xb9, 0x49, 0x00, 0xb0, 0x27, 0xe8, 0x4d,
+ 0x57, 0xb9, 0x49, 0x02, 0xe8, 0x33, 0xc8, 0xe8,
+ 0xd1, 0x58, 0xc7, 0x06, 0xf3, 0xb4, 0x0b, 0x00,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0x57, 0x59,
+ 0xc7, 0x06, 0xaf, 0x64, 0xc2, 0x00, 0xc7, 0x06,
+ 0xb1, 0x64, 0xa0, 0x00, 0xc6, 0x06, 0xc3, 0x64,
+ 0x02, 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xc6, 0x06,
+ 0xcd, 0x64, 0x00, 0xe8, 0x20, 0xe9, 0xb9, 0x1c,
+ 0x00, 0xb0, 0x02, 0xb4, 0x08, 0xe8, 0x05, 0x57,
+ 0xb9, 0x4a, 0x02, 0xc6, 0x06, 0xdc, 0x1c, 0x01,
+ 0xe8, 0x0d, 0xc8, 0xbe, 0x8a, 0x00, 0xbf, 0xa3,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x03, 0xe8, 0x1a,
+ 0xe3, 0xbb, 0x50, 0x36, 0xe8, 0x3e, 0x4d, 0xc6,
+ 0x06, 0xa0, 0xdb, 0x01, 0xe8, 0x26, 0x4a, 0xc3,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x0b, 0x00, 0xb8, 0x00,
+ 0x00, 0xbb, 0x7c, 0x00, 0xbf, 0x3c, 0x00, 0xbe,
+ 0xaa, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0xaa,
+ 0x58, 0xc3, 0xbb, 0x47, 0x40, 0xe8, 0x15, 0x4d,
+ 0xc3, 0xbb, 0x6d, 0x40, 0xe8, 0x0e, 0x4d, 0xc3,
+ 0x80, 0x3e, 0x99, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0x1f, 0x35, 0xe8, 0x00, 0x4d, 0xc3, 0xc6, 0x06,
+ 0x99, 0xdb, 0x01, 0xb9, 0x39, 0x00, 0xb0, 0x06,
+ 0xb4, 0x06, 0xe8, 0x98, 0x56, 0xb0, 0x0c, 0xe8,
+ 0x9c, 0x56, 0xb9, 0x3a, 0x00, 0xb0, 0x11, 0xe8,
+ 0x9b, 0x56, 0xb9, 0x05, 0x00, 0xb0, 0x25, 0xe8,
+ 0x9a, 0x56, 0xb9, 0x18, 0x02, 0xe8, 0x7f, 0xc7,
+ 0xe8, 0xa9, 0xc7, 0xb8, 0x0a, 0x00, 0xe8, 0xb1,
+ 0xcb, 0x8b, 0x3e, 0xb1, 0x64, 0x47, 0x8b, 0x36,
+ 0xaf, 0x64, 0xe8, 0x96, 0xe2, 0xbb, 0xc3, 0x30,
+ 0xe8, 0x2a, 0xbe, 0xb0, 0x08, 0xe8, 0x98, 0xd3,
+ 0xc3, 0x80, 0x3e, 0xb2, 0xdb, 0x01, 0x75, 0x0a,
+ 0xbb, 0x1d, 0x41, 0xe8, 0xa7, 0x4c, 0xe8, 0x43,
+ 0x00, 0xc3, 0xbb, 0x8a, 0x40, 0xe8, 0x9d, 0x4c,
+ 0xe8, 0x39, 0x00, 0xbb, 0x98, 0x40, 0xe8, 0x94,
+ 0x4c, 0xbb, 0xa7, 0x40, 0xbe, 0xe1, 0xcd, 0xe8,
+ 0x30, 0x00, 0xbb, 0xb6, 0x40, 0xe8, 0x85, 0x4c,
+ 0xbb, 0xce, 0x40, 0xbe, 0xac, 0xcd, 0xe8, 0x21,
+ 0x00, 0xbb, 0xe8, 0x40, 0xe8, 0x76, 0x4c, 0xbb,
+ 0x0f, 0x41, 0xbe, 0xe8, 0xcd, 0xe8, 0x12, 0x00,
+ 0xe8, 0x6a, 0xcb, 0xe8, 0x06, 0x00, 0xc6, 0x06,
+ 0xb2, 0xdb, 0x01, 0xc3, 0xbb, 0x91, 0x40, 0xbe,
+ 0xf8, 0xcd, 0xc6, 0x06, 0xe6, 0x1c, 0xe5, 0xe8,
+ 0xfc, 0x4e, 0xc3, 0xbb, 0x33, 0x41, 0xe8, 0x4c,
+ 0x4c, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x14, 0x00,
+ 0xb8, 0x00, 0x00, 0xbb, 0xb9, 0x00, 0xbf, 0x14,
+ 0x00, 0xbe, 0xb9, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0xc0, 0x57, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x0b, 0x00, 0xb8, 0x00, 0x00, 0xbb, 0xaa, 0x00,
+ 0xbf, 0x3c, 0x00, 0xbe, 0xaa, 0x00, 0xb1, 0x01,
+ 0xb5, 0x02, 0xe8, 0xa6, 0x57, 0xc3, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x12, 0x00, 0xb8, 0xf6, 0x00, 0xbb,
+ 0xc7, 0x00, 0xbf, 0xc9, 0x00, 0xbe, 0xc0, 0x00,
+ 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x8c, 0x57, 0xc3,
+ 0xe8, 0xfc, 0xc6, 0xe8, 0x8a, 0xeb, 0xc6, 0x47,
+ 0x02, 0x00, 0xe8, 0x0f, 0x5a, 0xb9, 0x22, 0x00,
+ 0xb0, 0x06, 0xb4, 0x06, 0xe8, 0x8e, 0x55, 0xb9,
+ 0x17, 0x02, 0xe8, 0xa2, 0xc6, 0xb0, 0x0b, 0xe8,
+ 0xbe, 0xd2, 0xb0, 0x01, 0xe8, 0x66, 0xc5, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0f, 0x00, 0xe8, 0x60, 0xeb,
+ 0xc6, 0x07, 0x00, 0xc7, 0x06, 0xf3, 0xb4, 0x10,
+ 0x00, 0xe8, 0x01, 0x00, 0xc3, 0xfe, 0x06, 0x98,
+ 0xdb, 0x80, 0x3e, 0x98, 0xdb, 0x02, 0x73, 0x01,
+ 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x0f, 0x00, 0xb0,
+ 0x01, 0xe8, 0x39, 0xc5, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x10, 0x00, 0xc3, 0xe8, 0xa1, 0xc6, 0xe8, 0x2f,
+ 0xeb, 0xc6, 0x47, 0x01, 0x00, 0xc6, 0x47, 0x03,
+ 0x00, 0xe8, 0xb0, 0x59, 0xb9, 0x21, 0x00, 0xb0,
+ 0x07, 0xb4, 0x09, 0xe8, 0x2f, 0x55, 0xb9, 0x16,
+ 0x02, 0xe8, 0x2e, 0xc6, 0xb0, 0x0a, 0xe8, 0x5f,
+ 0xd2, 0xb0, 0x02, 0xe8, 0x07, 0xc5, 0xe8, 0x07,
+ 0xeb, 0xc6, 0x47, 0x01, 0x0a, 0xe8, 0x48, 0x59,
+ 0xe8, 0x41, 0xc6, 0xc7, 0x06, 0xf3, 0xb4, 0x0f,
+ 0x00, 0xe8, 0xf4, 0xea, 0xc6, 0x47, 0x01, 0x00,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x10, 0x00, 0xe8, 0x94,
+ 0xff, 0xc3, 0xe8, 0xe3, 0xea, 0xb0, 0x00, 0x88,
+ 0x07, 0xc7, 0x06, 0xf3, 0xb4, 0x0f, 0x00, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0x10, 0x57, 0xb9,
+ 0x38, 0x02, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8,
+ 0xcd, 0xc5, 0xc7, 0x06, 0xaf, 0x64, 0x73, 0x00,
+ 0xc7, 0x06, 0xb1, 0x64, 0xb4, 0x00, 0xc6, 0x06,
+ 0xc3, 0x64, 0x03, 0xc6, 0x06, 0xcb, 0x64, 0x01,
+ 0xc6, 0x06, 0xcd, 0x64, 0x01, 0xe8, 0xec, 0xc5,
+ 0xb9, 0x06, 0x00, 0xe8, 0x05, 0x5c, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0f, 0x00, 0xb8, 0x00, 0x00,
+ 0xbb, 0xac, 0x00, 0xbf, 0x1e, 0x00, 0xbe, 0xac,
+ 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x83, 0x56,
+ 0xc3, 0xe8, 0x1a, 0x00, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x13, 0x00, 0xb8, 0xdf, 0x00, 0xbb, 0xc7, 0x00,
+ 0xbf, 0xdf, 0x00, 0xbe, 0xc1, 0x00, 0xb1, 0x13,
+ 0xb5, 0x01, 0xe8, 0x66, 0x56, 0xc3, 0xe8, 0x7e,
+ 0x50, 0x81, 0x3e, 0xb1, 0x64, 0x95, 0x00, 0x76,
+ 0x09, 0xbe, 0x33, 0x00, 0xbf, 0x95, 0x00, 0xe8,
+ 0xaa, 0xe0, 0xbe, 0x5e, 0x00, 0xbf, 0x73, 0x00,
+ 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x9c, 0xe0,
+ 0xc3, 0xe8, 0xda, 0xff, 0xe8, 0x2f, 0x4f, 0xc3,
+ 0xbb, 0x08, 0xdb, 0xe8, 0xff, 0xbb, 0x53, 0xe8,
+ 0x13, 0xbc, 0x5b, 0x81, 0xfb, 0x5d, 0x2c, 0x74,
+ 0x2e, 0x81, 0xfb, 0x9b, 0x2c, 0x75, 0x01, 0xc3,
+ 0xb8, 0x23, 0x01, 0xe8, 0x48, 0xc9, 0xb9, 0x34,
+ 0x00, 0xb0, 0x09, 0xb4, 0x0a, 0xe8, 0x2d, 0x54,
+ 0xb0, 0x0b, 0xe8, 0x31, 0x54, 0xb0, 0x0d, 0xe8,
+ 0x33, 0x54, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x39,
+ 0x02, 0xb0, 0x01, 0xe8, 0x83, 0xc4, 0xc3, 0xb8,
+ 0x23, 0x01, 0xe8, 0x21, 0xc9, 0xe8, 0xf8, 0xe9,
+ 0xc6, 0x07, 0x00, 0xe8, 0x7e, 0x58, 0xb9, 0x34,
+ 0x00, 0xb0, 0x09, 0xb4, 0x0a, 0xe8, 0xfd, 0x53,
+ 0xb0, 0x0b, 0xe8, 0x01, 0x54, 0xb0, 0x0d, 0xe8,
+ 0x03, 0x54, 0xb9, 0x35, 0x00, 0xb0, 0x20, 0xb4,
+ 0x0a, 0xe8, 0x00, 0x54, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x3a, 0x02, 0xb0, 0x01, 0xe8, 0x49, 0xc4,
+ 0xe8, 0x2b, 0xc9, 0xbb, 0x1f, 0x55, 0xe8, 0x2c,
+ 0x4a, 0xb0, 0x05, 0xe8, 0xb7, 0xc3, 0xc6, 0x06,
+ 0xb0, 0xdb, 0x01, 0xc3, 0xbb, 0x0f, 0x57, 0xe8,
+ 0x1b, 0x4a, 0xc3, 0xe8, 0x19, 0xc5, 0xe8, 0xa7,
+ 0xe9, 0xc6, 0x47, 0x01, 0x00, 0xe8, 0x2c, 0x58,
+ 0xb9, 0x05, 0x00, 0xb0, 0x0a, 0xb4, 0x08, 0xe8,
+ 0xab, 0x53, 0xb9, 0x31, 0x02, 0xe8, 0xcd, 0xc4,
+ 0xb0, 0x1a, 0xe8, 0xdb, 0xd0, 0xb0, 0x06, 0xe8,
+ 0x83, 0xc3, 0xc3, 0xbb, 0x7e, 0x41, 0x80, 0x3e,
+ 0xb0, 0xdb, 0x01, 0x75, 0x03, 0xbb, 0xb1, 0x41,
+ 0xe8, 0xe2, 0x49, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x12, 0x00, 0xb8, 0x5e, 0x00, 0xbb, 0x73, 0x00,
+ 0xbf, 0x5e, 0x00, 0xbe, 0x73, 0x00, 0xb1, 0x0b,
+ 0xb5, 0x03, 0xe8, 0x56, 0x55, 0xc3, 0xbb, 0xef,
+ 0x41, 0xe8, 0xc1, 0x49, 0xc3, 0xbb, 0x64, 0x41,
+ 0xe8, 0xba, 0x49, 0xc3, 0xb9, 0x43, 0x00, 0xb0,
+ 0x05, 0xb4, 0x03, 0xe8, 0x57, 0x53, 0xb9, 0xd7,
+ 0x03, 0xe8, 0x64, 0xc4, 0xbb, 0x55, 0x59, 0xe8,
+ 0xa3, 0x49, 0xc3, 0xe8, 0x20, 0x4e, 0xc3, 0xb9,
+ 0x42, 0x00, 0xb0, 0x05, 0xb4, 0x08, 0xe8, 0x3c,
+ 0x53, 0xb9, 0x43, 0x00, 0xb0, 0x0b, 0xe8, 0x3d,
+ 0x53, 0xb9, 0xd8, 0x03, 0xe8, 0x41, 0xc4, 0xbb,
+ 0x55, 0x59, 0xe8, 0x80, 0x49, 0xc3, 0xbb, 0xff,
+ 0x41, 0xe8, 0x79, 0x49, 0xc3, 0xbb, 0x3f, 0x42,
+ 0xe8, 0x72, 0x49, 0xc3, 0xbb, 0x51, 0x42, 0xe8,
+ 0x6b, 0x49, 0xc3, 0xbb, 0x67, 0x42, 0xe8, 0x64,
+ 0x49, 0xc3, 0xe8, 0xe1, 0x4d, 0xc3, 0xb9, 0x20,
+ 0x00, 0xb0, 0x07, 0xb4, 0x04, 0xe8, 0xfd, 0x52,
+ 0xb9, 0x72, 0x02, 0xe8, 0x0a, 0xc4, 0xe8, 0xdf,
+ 0xe8, 0xc6, 0x47, 0x01, 0x00, 0xe8, 0x64, 0x57,
+ 0xb0, 0x0c, 0xe8, 0xd0, 0xc2, 0xb0, 0x2d, 0xe8,
+ 0x1e, 0xd0, 0xbb, 0x04, 0x3b, 0xe8, 0x35, 0x49,
+ 0xc3, 0xbb, 0x3f, 0x42, 0xe8, 0x2e, 0x49, 0xc3,
+ 0xe8, 0x2c, 0xc4, 0xb0, 0x0d, 0xe8, 0x08, 0xd0,
+ 0xb0, 0x0e, 0xe8, 0xb0, 0xc2, 0xb9, 0x05, 0x00,
+ 0xb0, 0x0a, 0xb4, 0x08, 0xe8, 0xbe, 0x52, 0xe8,
+ 0xa6, 0xe8, 0xc6, 0x07, 0x00, 0xe8, 0x2c, 0x57,
+ 0xb9, 0x36, 0x02, 0xe8, 0xd7, 0xc3, 0xc3, 0xbb,
+ 0x89, 0x42, 0xe8, 0x00, 0x49, 0xc3, 0xb9, 0x0b,
+ 0x00, 0xb0, 0x04, 0xb4, 0x0c, 0xe8, 0x9d, 0x52,
+ 0xb9, 0x02, 0x02, 0xe8, 0x89, 0xc3, 0xe8, 0x7f,
+ 0xe8, 0xb0, 0x05, 0x88, 0x47, 0x02, 0x53, 0xe8,
+ 0x88, 0x57, 0x5b, 0xb0, 0x08, 0x88, 0x47, 0x04,
+ 0xe8, 0xa6, 0x57, 0xe8, 0xae, 0xc3, 0xb0, 0x0e,
+ 0xe8, 0x56, 0xc2, 0xb0, 0x0f, 0xe8, 0x51, 0xc2,
+ 0xb0, 0x10, 0xe8, 0x4c, 0xc2, 0xb0, 0x01, 0xe8,
+ 0x53, 0xc2, 0xc3, 0x80, 0x3e, 0x94, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0x63, 0x3e, 0xe8, 0xb5, 0x48,
+ 0xc3, 0x80, 0x3e, 0x95, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x75, 0x3e, 0xe8, 0xa7, 0x48, 0xc3, 0xc6,
+ 0x06, 0x95, 0xdb, 0x01, 0xbb, 0x46, 0x67, 0xe8,
+ 0x20, 0xe8, 0x83, 0xc3, 0x03, 0xff, 0x37, 0x53,
+ 0xc7, 0x07, 0x3f, 0x01, 0xbe, 0xbc, 0x00, 0xbf,
+ 0xb3, 0x00, 0xe8, 0x5e, 0xde, 0xb9, 0x07, 0x00,
+ 0xb0, 0x10, 0xb4, 0x07, 0xe8, 0x26, 0x52, 0xb9,
+ 0x07, 0x02, 0xe8, 0x33, 0xc3, 0xb8, 0x96, 0x00,
+ 0xe8, 0x57, 0xc7, 0xbe, 0xa8, 0x00, 0xbf, 0xb3,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x02, 0xe8, 0x3a,
+ 0xde, 0x5b, 0x8f, 0x07, 0xb0, 0x03, 0xe8, 0x3f,
+ 0xcf, 0xc3, 0xbb, 0x3f, 0x42, 0xe8, 0x55, 0x48,
+ 0xc3, 0xe8, 0xd2, 0x4c, 0xc3, 0xb9, 0x46, 0x00,
+ 0xb0, 0x06, 0xb4, 0x06, 0xe8, 0xee, 0x51, 0xb9,
+ 0x01, 0x02, 0xe8, 0xda, 0xc2, 0xe8, 0x7b, 0x53,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x16, 0x00, 0xb8, 0x33,
+ 0x00, 0xbb, 0xb4, 0x00, 0xbf, 0x4e, 0x00, 0xbe,
+ 0xb4, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0xb2,
+ 0x53, 0xc3, 0xb9, 0xfd, 0x01, 0xe8, 0xd8, 0xc2,
+ 0xbb, 0xce, 0x5d, 0xe8, 0x17, 0x48, 0xc3, 0xbb,
+ 0x64, 0x41, 0xe8, 0x10, 0x48, 0xc3, 0xbb, 0x64,
+ 0x41, 0xe8, 0x09, 0x48, 0xc3, 0xbb, 0x0f, 0x57,
+ 0xe8, 0x02, 0x48, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x0f, 0x00, 0xb8, 0x9d, 0x00, 0xbb, 0xc7, 0x00,
+ 0xbf, 0x9d, 0x00, 0xbe, 0xb4, 0x00, 0xb1, 0x13,
+ 0xb5, 0x01, 0xe8, 0x76, 0x53, 0xc3, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x15, 0x00, 0xb8, 0x00, 0x00, 0xbb,
+ 0xbb, 0x00, 0xbf, 0x30, 0x00, 0xbe, 0xbe, 0x00,
+ 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x5c, 0x53, 0xc3,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x1b, 0x00, 0xb8, 0x54,
+ 0x00, 0xbb, 0xc7, 0x00, 0xbf, 0x84, 0x00, 0xbe,
+ 0xbe, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x42,
+ 0x53, 0xc3, 0xe8, 0x5e, 0xbf, 0xbb, 0xba, 0xda,
+ 0xe8, 0x02, 0xb9, 0xe8, 0x17, 0xb9, 0xbe, 0xe5,
+ 0x92, 0xb0, 0x0d, 0xe8, 0x3b, 0xc1, 0xc3, 0xb0,
+ 0x0e, 0xe8, 0x29, 0xc1, 0xb0, 0x06, 0xe8, 0x77,
+ 0xce, 0xb9, 0x05, 0x00, 0xb0, 0x07, 0xb4, 0x0c,
+ 0xe8, 0x32, 0x51, 0xb9, 0x09, 0x02, 0xe8, 0x1e,
+ 0xc2, 0xe8, 0x14, 0xe7, 0xc6, 0x47, 0x04, 0x00,
+ 0xe8, 0x4e, 0x55, 0xe8, 0x4e, 0xc2, 0xc3, 0xc6,
+ 0x06, 0x94, 0xdb, 0x01, 0xb9, 0x06, 0x00, 0xb0,
+ 0x04, 0xb4, 0x0b, 0xe8, 0x0f, 0x51, 0xb9, 0x03,
+ 0x02, 0xe8, 0xfb, 0xc1, 0xe8, 0xf1, 0xe6, 0xb0,
+ 0x06, 0x88, 0x47, 0x03, 0xe8, 0x22, 0x56, 0xe8,
+ 0x2a, 0xc2, 0xc3, 0xbb, 0xac, 0x42, 0xe8, 0x4c,
+ 0x47, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x14, 0x00,
+ 0xb8, 0x3f, 0x01, 0xbb, 0xbe, 0x00, 0xbf, 0x21,
+ 0x01, 0xbe, 0xbe, 0x00, 0xb1, 0x01, 0xb5, 0x04,
+ 0xe8, 0xc0, 0x52, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x19, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0x92, 0x00,
+ 0xbf, 0x14, 0x01, 0xbe, 0x92, 0x00, 0xb1, 0x01,
+ 0xb5, 0x04, 0xe8, 0xa6, 0x52, 0xc3, 0xb9, 0x59,
+ 0x00, 0xb0, 0x04, 0xb4, 0x06, 0xe8, 0xb5, 0x50,
+ 0xb9, 0xd4, 0x03, 0xe8, 0xa1, 0xc1, 0xe8, 0x42,
+ 0x52, 0x80, 0x3e, 0xee, 0xdb, 0x01, 0x75, 0x06,
+ 0xb9, 0x07, 0x00, 0xe8, 0xed, 0x57, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x17, 0x00, 0xb8, 0x4c, 0x00, 0xbb,
+ 0xc7, 0x00, 0xbf, 0x5e, 0x00, 0xbe, 0xbe, 0x00,
+ 0xb1, 0x13, 0xb5, 0x01, 0xe8, 0x6c, 0x52, 0xc3,
+ 0xbb, 0xc7, 0x42, 0xe8, 0xd7, 0x46, 0xc3, 0xbb,
+ 0x64, 0x41, 0xe8, 0xd0, 0x46, 0xc3, 0xbb, 0x64,
+ 0x41, 0xe8, 0xc9, 0x46, 0xc3, 0xbb, 0x64, 0x41,
+ 0xe8, 0xc2, 0x46, 0xc3, 0xe8, 0x04, 0x00, 0xe8,
+ 0x87, 0x00, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x18,
+ 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xc6, 0x06,
+ 0xc5, 0x64, 0x00, 0xc6, 0x06, 0x3d, 0x66, 0x00,
+ 0xc6, 0x06, 0x40, 0x67, 0xff, 0xc6, 0x06, 0xc4,
+ 0x64, 0x01, 0xe8, 0x93, 0xdb, 0x80, 0x3e, 0xad,
+ 0x64, 0x01, 0x75, 0x05, 0xe8, 0x05, 0x53, 0xeb,
+ 0x03, 0xe8, 0x1a, 0x53, 0xe8, 0x3e, 0x54, 0x80,
+ 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x1c, 0xa1, 0xb3,
+ 0x32, 0xbb, 0x00, 0xfa, 0x1e, 0x53, 0x8e, 0xd8,
+ 0xb9, 0x70, 0x02, 0xe8, 0x2d, 0x00, 0x5b, 0x81,
+ 0xc3, 0xd6, 0x02, 0xb9, 0x27, 0x00, 0xe8, 0x22,
+ 0x00, 0x1f, 0xe8, 0x7a, 0x52, 0x80, 0x3e, 0xad,
+ 0x64, 0x01, 0x75, 0x04, 0xe8, 0xda, 0x52, 0xc3,
+ 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d, 0xe8, 0xf7,
+ 0x52, 0xe8, 0xe7, 0x52, 0xe8, 0xb2, 0x52, 0xe8,
+ 0xae, 0x4e, 0xc3, 0x8a, 0x07, 0x2c, 0x20, 0x73,
+ 0x02, 0xb0, 0x00, 0x88, 0x07, 0x43, 0xe2, 0xf3,
+ 0xc3, 0xc7, 0x06, 0xaf, 0x64, 0xe6, 0x00, 0xc7,
+ 0x06, 0xb1, 0x64, 0xaa, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x01, 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xc6,
+ 0x06, 0xcd, 0x64, 0x01, 0xb9, 0x34, 0x00, 0xb0,
+ 0x03, 0xb4, 0x0b, 0xe8, 0xb7, 0x4f, 0xb0, 0x07,
+ 0xe8, 0xbb, 0x4f, 0xb0, 0x0b, 0xe8, 0xbd, 0x4f,
+ 0xb0, 0x0e, 0xe8, 0xbf, 0x4f, 0xb0, 0x12, 0xe8,
+ 0xc1, 0x4f, 0xb0, 0x15, 0xe8, 0xc3, 0x4f, 0xb0,
+ 0x19, 0xe8, 0xc5, 0x4f, 0xb9, 0x59, 0x02, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0xa1, 0xc0, 0xbe,
+ 0xe6, 0x00, 0xbf, 0xb3, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x03, 0xe8, 0xae, 0xdb, 0x80, 0x3e, 0xa4,
+ 0xdb, 0x01, 0x74, 0x06, 0xbb, 0xea, 0x37, 0xe8,
+ 0xcb, 0x45, 0xc3, 0x80, 0x3e, 0xad, 0xdb, 0x01,
+ 0x74, 0x32, 0xb9, 0x2b, 0x00, 0xb0, 0x04, 0xb4,
+ 0x0b, 0xe8, 0x61, 0x4f, 0xb9, 0x2a, 0x00, 0xb0,
+ 0x0f, 0xe8, 0x62, 0x4f, 0xb0, 0x11, 0xe8, 0x64,
+ 0x4f, 0xb0, 0x13, 0xe8, 0x66, 0x4f, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x90, 0x02, 0xb0, 0x01, 0xe8,
+ 0xaf, 0xbf, 0xe8, 0x91, 0xc4, 0xbb, 0x16, 0x3c,
+ 0xe8, 0x92, 0x45, 0xc3, 0x80, 0x3e, 0xa3, 0xdb,
+ 0x01, 0x74, 0x29, 0xb9, 0x1c, 0x00, 0xb0, 0x03,
+ 0xb4, 0x0e, 0xe8, 0x28, 0x4f, 0xb9, 0x54, 0x02,
+ 0xe8, 0x14, 0xc0, 0xe8, 0x0a, 0xe5, 0xb0, 0x1e,
+ 0x88, 0x47, 0x01, 0xe8, 0x3b, 0x54, 0xe8, 0x43,
+ 0xc0, 0xc6, 0x06, 0xa3, 0xdb, 0x01, 0xb0, 0x08,
+ 0xe8, 0xe6, 0xbe, 0xc3, 0xe8, 0x60, 0xc0, 0xe8,
+ 0xee, 0xe4, 0xc6, 0x47, 0x01, 0x00, 0xe8, 0x73,
+ 0x53, 0xb9, 0x04, 0x00, 0xb0, 0x04, 0xb4, 0x0e,
+ 0xe8, 0xf2, 0x4e, 0xb9, 0x55, 0x02, 0xe8, 0x06,
+ 0xc0, 0xc6, 0x06, 0xa3, 0xdb, 0x00, 0xb0, 0x08,
+ 0xe8, 0xca, 0xbe, 0xbb, 0xb8, 0x37, 0xe8, 0x34,
+ 0x45, 0xc7, 0x06, 0xf3, 0xb4, 0x18, 0x00, 0xe8,
+ 0xbe, 0xe4, 0xc6, 0x47, 0x01, 0x20, 0xb0, 0x04,
+ 0xe8, 0xa6, 0xbe, 0xc7, 0x06, 0xf3, 0xb4, 0x15,
+ 0x00, 0xc3, 0xbb, 0x14, 0xdb, 0xe8, 0x6d, 0xb6,
+ 0xe8, 0x82, 0xb6, 0xc3, 0xb9, 0xfe, 0x01, 0xe8,
+ 0xc6, 0xbf, 0xc6, 0x06, 0xe6, 0x1c, 0xe5, 0xbb,
+ 0xc2, 0x5d, 0xbe, 0x8c, 0x7d, 0xe8, 0xa6, 0x47,
+ 0xc3, 0xbb, 0xbd, 0x2c, 0xe8, 0x66, 0xb6, 0xb8,
+ 0x96, 0x00, 0xe8, 0xd5, 0xc3, 0xbb, 0xc2, 0x2d,
+ 0xe8, 0x5a, 0xb6, 0x8b, 0x36, 0xaf, 0x64, 0x8b,
+ 0x3e, 0xb1, 0x64, 0x83, 0xef, 0x0c, 0xe8, 0xb2,
+ 0xda, 0xb9, 0x22, 0x00, 0xb0, 0x05, 0xb4, 0x03,
+ 0xe8, 0x7a, 0x4e, 0xb9, 0x5f, 0x02, 0xe8, 0x66,
+ 0xbf, 0xe8, 0x5c, 0xe4, 0xc6, 0x07, 0x00, 0xe8,
+ 0x9e, 0x52, 0xb9, 0x60, 0x02, 0xe8, 0x5a, 0xbf,
+ 0xb9, 0x61, 0x02, 0xe8, 0x54, 0xbf, 0xb9, 0x62,
+ 0x02, 0xe8, 0x4e, 0xbf, 0xb9, 0x05, 0x00, 0xb0,
+ 0x19, 0xb4, 0x00, 0xe8, 0x4f, 0x4e, 0xb9, 0x63,
+ 0x02, 0xe8, 0x3e, 0xbf, 0xc7, 0x06, 0xaf, 0x64,
+ 0x10, 0x00, 0xc6, 0x06, 0xcc, 0x64, 0x00, 0xc6,
+ 0x06, 0xcd, 0x64, 0x00, 0xc6, 0x06, 0xcb, 0x64,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xc6, 0x06,
+ 0xdc, 0x64, 0x01, 0xe8, 0x56, 0xbf, 0xb0, 0x26,
+ 0xe8, 0x5d, 0xcb, 0xb0, 0x0c, 0xe8, 0x05, 0xbe,
+ 0xc3, 0xe8, 0xfc, 0xbb, 0xbb, 0xc4, 0xda, 0xe8,
+ 0xc3, 0xb5, 0xe8, 0xd8, 0xb5, 0xc3, 0xb9, 0x59,
+ 0x00, 0xb0, 0x05, 0xb4, 0x06, 0xe8, 0x05, 0x4e,
+ 0xb9, 0x43, 0x00, 0xb0, 0x0b, 0xe8, 0x06, 0x4e,
+ 0xb9, 0xd6, 0x03, 0xe8, 0x0a, 0xbf, 0xbb, 0x55,
+ 0x59, 0xe8, 0x49, 0x44, 0xc3, 0x80, 0x3e, 0xa7,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xac, 0x3b, 0xe8,
+ 0x3b, 0x44, 0xc3, 0x80, 0x3e, 0x92, 0xdb, 0x01,
+ 0x74, 0x25, 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e,
+ 0xb1, 0x64, 0x56, 0x57, 0xc6, 0x06, 0xc3, 0x64,
+ 0x03, 0xe8, 0xf7, 0xd9, 0xe8, 0xa9, 0xbb, 0xbb,
+ 0xa0, 0x15, 0xe8, 0x88, 0xb5, 0x5f, 0x5e, 0xc6,
+ 0x06, 0xc3, 0x64, 0x01, 0xe8, 0xe4, 0xd9, 0xb9,
+ 0x42, 0x00, 0xb0, 0x05, 0xb4, 0x07, 0xe8, 0xac,
+ 0x4d, 0xb9, 0x43, 0x00, 0xb0, 0x14, 0xe8, 0xad,
+ 0x4d, 0xb9, 0x05, 0x00, 0xb0, 0x17, 0xe8, 0xac,
+ 0x4d, 0xb9, 0x77, 0x02, 0xe8, 0xa9, 0xbe, 0xb0,
+ 0x2f, 0xe8, 0xcc, 0xca, 0xc6, 0x06, 0xa7, 0xdb,
+ 0x01, 0xc3, 0xbb, 0x06, 0x43, 0xe8, 0xdd, 0x43,
+ 0xc3, 0xbb, 0x64, 0x41, 0xe8, 0xd6, 0x43, 0xc3,
+ 0xe8, 0x53, 0x48, 0xc3, 0x80, 0x3e, 0x92, 0xdb,
+ 0x01, 0x74, 0x29, 0x8b, 0x36, 0xaf, 0x64, 0x8b,
+ 0x3e, 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64, 0x03,
+ 0x57, 0x56, 0xe8, 0x8e, 0xd9, 0xe8, 0x40, 0xbb,
+ 0xbb, 0xce, 0xda, 0xe8, 0x07, 0xb5, 0xe8, 0x1c,
+ 0xb5, 0x5e, 0x5f, 0xc6, 0x06, 0xc3, 0x64, 0x01,
+ 0xe8, 0x78, 0xd9, 0xc3, 0xe8, 0xa0, 0xbe, 0xb0,
+ 0x02, 0xe8, 0x7c, 0xca, 0xb0, 0x07, 0xe8, 0x24,
+ 0xbd, 0xe8, 0x24, 0xe3, 0xc6, 0x07, 0x00, 0xe8,
+ 0xaa, 0x51, 0xb9, 0x20, 0x00, 0xb0, 0x07, 0xb4,
+ 0x09, 0xe8, 0x29, 0x4d, 0xb9, 0x08, 0x02, 0xe8,
+ 0x3d, 0xbe, 0xc3, 0xbb, 0x3f, 0x42, 0xe8, 0x74,
+ 0x43, 0xc3, 0xbb, 0x3f, 0x42, 0xe8, 0x6d, 0x43,
+ 0xc3, 0xbb, 0x1e, 0x43, 0xe8, 0x66, 0x43, 0xc3,
+ 0xb9, 0x58, 0x00, 0xb0, 0x05, 0xb4, 0x03, 0xe8,
+ 0x03, 0x4d, 0xb9, 0xd5, 0x03, 0xe8, 0xff, 0xbd,
+ 0xe8, 0x90, 0x4e, 0xc7, 0x06, 0xf3, 0xb4, 0x14,
+ 0x00, 0xb8, 0xa0, 0x00, 0xbb, 0xa5, 0x00, 0xbf,
+ 0xa0, 0x00, 0xbe, 0xb9, 0x00, 0xb1, 0x0b, 0xb5,
+ 0x03, 0xe8, 0xc7, 0x4e, 0xc3, 0xbb, 0xff, 0x41,
+ 0xe8, 0x32, 0x43, 0xc3, 0x80, 0x3e, 0x92, 0xdb,
+ 0x01, 0x74, 0x29, 0x8b, 0x36, 0xaf, 0x64, 0x8b,
+ 0x3e, 0xb1, 0x64, 0x56, 0x57, 0xc6, 0x06, 0xc3,
+ 0x64, 0x03, 0xe8, 0xee, 0xd8, 0xe8, 0xa0, 0xba,
+ 0xbb, 0xd4, 0xda, 0xe8, 0x67, 0xb4, 0xe8, 0x7c,
+ 0xb4, 0x5f, 0x5e, 0xc6, 0x06, 0xc3, 0x64, 0x01,
+ 0xe8, 0xd8, 0xd8, 0xc3, 0xe8, 0x00, 0xbe, 0xb8,
+ 0x02, 0x00, 0xe8, 0x1c, 0xd1, 0x32, 0xe4, 0xbb,
+ 0xc7, 0x32, 0xb1, 0x1b, 0x48, 0xf6, 0xe1, 0x03,
+ 0xd8, 0xc7, 0x07, 0x00, 0x00, 0xb9, 0x20, 0x00,
+ 0xb0, 0x07, 0xb4, 0x08, 0xe8, 0x86, 0x4c, 0xb9,
+ 0xfc, 0x01, 0xe8, 0x9a, 0xbd, 0xb0, 0x0d, 0xe8,
+ 0x63, 0xbc, 0xb0, 0x07, 0xe8, 0xb1, 0xc9, 0xc3,
+ 0x80, 0x3e, 0xa5, 0xdb, 0x01, 0x74, 0x37, 0xe8,
+ 0x2b, 0xba, 0xbb, 0xda, 0xda, 0xe8, 0x15, 0xb4,
+ 0x53, 0xe8, 0x29, 0xb4, 0x5b, 0x81, 0xfb, 0x13,
+ 0x19, 0x75, 0x22, 0xb8, 0x64, 0x00, 0xe8, 0x91,
+ 0xc1, 0x8b, 0x3e, 0xb1, 0x64, 0x8b, 0x36, 0xaf,
+ 0x64, 0xc6, 0x06, 0xc3, 0x64, 0x03, 0xe8, 0x72,
+ 0xd8, 0xe8, 0x92, 0xc1, 0xbb, 0xd5, 0x34, 0xe8,
+ 0x93, 0x42, 0xe8, 0x89, 0xc1, 0xc3, 0xc6, 0x06,
+ 0xa5, 0xdb, 0x02, 0xe8, 0xef, 0xb9, 0xbb, 0x4f,
+ 0x1f, 0xe8, 0xf1, 0xb3, 0xb8, 0x01, 0x01, 0xe8,
+ 0x34, 0xc1, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x5c,
+ 0x02, 0xb0, 0x01, 0xe8, 0x3a, 0xbc, 0xe8, 0x03,
+ 0x4d, 0xc7, 0x06, 0xf3, 0xb4, 0x15, 0x00, 0xb0,
+ 0x04, 0xe8, 0xf1, 0xbb, 0xb0, 0x0c, 0xe8, 0xe0,
+ 0xbb, 0xe8, 0xec, 0xe1, 0x53, 0xc6, 0x07, 0x00,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x5e, 0x02,
+ 0xe8, 0x01, 0x4f, 0xb9, 0x2e, 0x00, 0xb0, 0x05,
+ 0xb4, 0x02, 0xe8, 0xe8, 0x4b, 0xb0, 0x02, 0xe8,
+ 0x48, 0xbc, 0xe8, 0xcf, 0x4c, 0x5b, 0xc6, 0x07,
+ 0x21, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x5d, 0x02,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x17, 0x00, 0xe8, 0xe4,
+ 0x4e, 0xb0, 0x01, 0xe8, 0x2c, 0xbc, 0xe8, 0x65,
+ 0x4c, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6, 0x06,
+ 0xdd, 0x1c, 0x02, 0xe8, 0x77, 0xb9, 0xbb, 0x02,
+ 0x20, 0xe8, 0x79, 0xb3, 0xc3, 0x80, 0x3e, 0x97,
+ 0xdb, 0x00, 0x74, 0x07, 0xbb, 0x59, 0x3d, 0xe8,
+ 0xfb, 0x41, 0xc3, 0xbe, 0xf5, 0x00, 0xbf, 0xc6,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8, 0xc2,
+ 0xd7, 0xe8, 0x00, 0xba, 0xbb, 0xd7, 0x21, 0xe8,
+ 0x53, 0xb3, 0xc6, 0x06, 0x97, 0xdb, 0x01, 0xb8,
+ 0x01, 0x02, 0xe8, 0x91, 0xc0, 0xb9, 0x0d, 0x00,
+ 0xb0, 0x0a, 0xb4, 0x0c, 0xe8, 0x76, 0x4b, 0xb0,
+ 0x0c, 0xe8, 0x7a, 0x4b, 0xb0, 0x0e, 0xe8, 0x7c,
+ 0x4b, 0xb0, 0x10, 0xe8, 0x7e, 0x4b, 0xb0, 0x12,
+ 0xe8, 0x80, 0x4b, 0xb0, 0x14, 0xe8, 0x82, 0x4b,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x10, 0x02,
+ 0xb0, 0x02, 0xe8, 0xbc, 0xbb, 0xb8, 0x32, 0x00,
+ 0xe8, 0x87, 0xc0, 0xb9, 0x07, 0x00, 0xe8, 0x92,
+ 0x52, 0xc6, 0x06, 0xee, 0xdb, 0x01, 0xb9, 0x38,
+ 0x00, 0xb0, 0x03, 0xb4, 0x0a, 0xe8, 0x35, 0x4b,
+ 0xb0, 0x05, 0xe8, 0x39, 0x4b, 0xb0, 0x07, 0xe8,
+ 0x3b, 0x4b, 0xb0, 0x09, 0xe8, 0x3d, 0x4b, 0xb0,
+ 0x0b, 0xe8, 0x3f, 0x4b, 0xb0, 0x0d, 0xe8, 0x41,
+ 0x4b, 0xb0, 0x0f, 0xe8, 0x43, 0x4b, 0xb0, 0x11,
+ 0xe8, 0x45, 0x4b, 0xb9, 0x0d, 0x02, 0xe8, 0xfe,
+ 0xbb, 0xb9, 0x38, 0x00, 0xb0, 0x01, 0xb4, 0x0a,
+ 0xe8, 0x02, 0x4b, 0xb0, 0x03, 0xe8, 0x06, 0x4b,
+ 0xb0, 0x05, 0xe8, 0x08, 0x4b, 0xb0, 0x07, 0xe8,
+ 0x0a, 0x4b, 0xb0, 0x09, 0xe8, 0x0c, 0x4b, 0xb0,
+ 0x0b, 0xe8, 0x0e, 0x4b, 0xb0, 0x0d, 0xe8, 0x10,
+ 0x4b, 0xb9, 0x28, 0x00, 0xb0, 0x0f, 0xe8, 0x0f,
+ 0x4b, 0xb0, 0x12, 0xe8, 0x11, 0x4b, 0xb0, 0x16,
+ 0xe8, 0x13, 0x4b, 0xb9, 0x0e, 0x02, 0xe8, 0xc1,
+ 0xbb, 0xb9, 0x36, 0x00, 0xb0, 0x01, 0xb4, 0x0a,
+ 0xe8, 0xc2, 0x4a, 0xb9, 0x37, 0x00, 0xb0, 0x05,
+ 0xe8, 0xc3, 0x4a, 0xb9, 0x38, 0x00, 0xb0, 0x09,
+ 0xe8, 0xc2, 0x4a, 0xb0, 0x0d, 0xe8, 0xc4, 0x4a,
+ 0xb9, 0x18, 0x00, 0xb0, 0x10, 0xe8, 0xc3, 0x4a,
+ 0xb9, 0x0f, 0x02, 0xe8, 0x94, 0xbb, 0xe8, 0xcb,
+ 0xbb, 0xe8, 0xea, 0xbf, 0xbb, 0x19, 0x22, 0xe8,
+ 0x5b, 0xb2, 0xb0, 0x02, 0xbe, 0x20, 0x98, 0xe8,
+ 0x7f, 0xba, 0xc3, 0x80, 0x3e, 0xee, 0xdb, 0x01,
+ 0x75, 0x06, 0xb9, 0x06, 0x00, 0xe8, 0xcb, 0x51,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x15, 0x00, 0xb8, 0x63,
+ 0x00, 0xbb, 0xb4, 0x00, 0xbf, 0x63, 0x00, 0xbe,
+ 0xba, 0x00, 0xb1, 0x0b, 0xb5, 0x03, 0xe8, 0x4a,
+ 0x4c, 0xc3, 0xbb, 0x64, 0x41, 0xe8, 0xb5, 0x40,
+ 0xc3, 0xbb, 0x64, 0x41, 0xe8, 0xae, 0x40, 0xc3,
+ 0xbb, 0xff, 0x41, 0xe8, 0xa7, 0x40, 0xc3, 0xbb,
+ 0x4e, 0x43, 0xe8, 0xa0, 0x40, 0xc3, 0xe8, 0x1d,
+ 0x45, 0xc3, 0x80, 0x3e, 0xb1, 0xdb, 0x01, 0x75,
+ 0x07, 0xbb, 0x80, 0x43, 0xe8, 0x8e, 0x40, 0xc3,
+ 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1, 0x64,
+ 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x53, 0xd6,
+ 0xe8, 0xe2, 0xb7, 0xbb, 0xfc, 0xda, 0xe8, 0xcc,
+ 0xb1, 0xe8, 0xe1, 0xb1, 0xc3, 0xbb, 0xac, 0x43,
+ 0xe8, 0x6a, 0x40, 0xc3, 0xbb, 0xce, 0x43, 0xe8,
+ 0x63, 0x40, 0xc3, 0x80, 0x3e, 0x9a, 0xdb, 0x00,
+ 0x75, 0x0d, 0xe8, 0xc0, 0xb7, 0xbb, 0xf6, 0xda,
+ 0xe8, 0xaa, 0xb1, 0xe8, 0xbf, 0xb1, 0xc3, 0xe8,
+ 0xb3, 0xb7, 0xbb, 0x1e, 0x1e, 0xe8, 0xb5, 0xb1,
+ 0xe8, 0x3b, 0xbf, 0xe8, 0x41, 0xbb, 0xb0, 0x0c,
+ 0xe8, 0x1d, 0xc7, 0xb0, 0x0c, 0xe8, 0xc5, 0xb9,
+ 0xe8, 0xc5, 0xdf, 0xc6, 0x07, 0x00, 0xe8, 0x4b,
+ 0x4e, 0xb9, 0x05, 0x00, 0xb0, 0x06, 0xb4, 0x04,
+ 0xe8, 0xca, 0x49, 0xb9, 0x1d, 0x02, 0xe8, 0xec,
+ 0xba, 0xc3, 0xe8, 0x99, 0x44, 0xc3, 0x80, 0x3e,
+ 0xb3, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xa7, 0x44,
+ 0xe8, 0x0a, 0x40, 0xc3, 0xbb, 0x12, 0x44, 0xe8,
+ 0x18, 0x00, 0xbb, 0x4f, 0x44, 0xe8, 0x12, 0x00,
+ 0xbb, 0x6b, 0x44, 0xe8, 0x0c, 0x00, 0xbb, 0x92,
+ 0x44, 0xe8, 0xf1, 0x3f, 0xc6, 0x06, 0xb3, 0xdb,
+ 0x01, 0xc3, 0xe8, 0xe8, 0x3f, 0xb8, 0x96, 0x00,
+ 0xe8, 0xc7, 0xbe, 0xc3, 0xe8, 0x5f, 0x44, 0xc3,
+ 0xbb, 0x1e, 0x43, 0xe8, 0xd7, 0x3f, 0xc3, 0xe8,
+ 0x33, 0x00, 0xc3, 0x80, 0x3e, 0xa4, 0xdb, 0x01,
+ 0x74, 0x04, 0xe8, 0x28, 0x00, 0xc3, 0xe8, 0xc6,
+ 0xba, 0xe8, 0x54, 0xdf, 0xc6, 0x07, 0x00, 0xe8,
+ 0xda, 0x4d, 0xb9, 0x38, 0x00, 0xb0, 0x0a, 0xb4,
+ 0x02, 0xe8, 0x59, 0x49, 0xb9, 0x57, 0x02, 0xe8,
+ 0x7b, 0xba, 0xb0, 0x25, 0xe8, 0x89, 0xc6, 0xb0,
+ 0x02, 0xe8, 0x31, 0xb9, 0xc3, 0x80, 0x3e, 0xae,
+ 0xdb, 0x01, 0x75, 0x0a, 0xe8, 0x1a, 0x00, 0xbb,
+ 0xdd, 0x2f, 0xe8, 0x00, 0xb1, 0xc3, 0xbb, 0x41,
+ 0x2e, 0xe8, 0xf9, 0xb0, 0xe8, 0x0a, 0x00, 0xe8,
+ 0x83, 0xbe, 0xbb, 0x6d, 0x2e, 0xe8, 0xed, 0xb0,
+ 0xc3, 0xa0, 0xab, 0x64, 0x8a, 0x26, 0xaa, 0x64,
+ 0x50, 0xc6, 0x06, 0xab, 0x64, 0x02, 0xc6, 0x06,
+ 0xaa, 0x64, 0x02, 0xe8, 0xd1, 0xaa, 0xe8, 0x9d,
+ 0xaa, 0xb8, 0x03, 0x00, 0xe8, 0x4e, 0x43, 0x8b,
+ 0x77, 0x0d, 0x8b, 0x7f, 0x0f, 0x8a, 0x47, 0x11,
+ 0xa2, 0xc3, 0x64, 0xe8, 0x25, 0xd5, 0xe8, 0x22,
+ 0x00, 0xbe, 0x30, 0x00, 0xbf, 0xbe, 0x00, 0xc6,
+ 0x06, 0xc3, 0x64, 0x03, 0xe8, 0x14, 0xd5, 0x58,
+ 0xa2, 0xab, 0x64, 0x88, 0x26, 0xaa, 0x64, 0xe8,
+ 0x9d, 0xaa, 0xe8, 0x69, 0xaa, 0xc6, 0x06, 0xae,
+ 0xdb, 0x01, 0xc3, 0xb9, 0x34, 0x00, 0xb0, 0x0a,
+ 0xb4, 0x0b, 0xe8, 0xc8, 0x48, 0xb0, 0x0e, 0xe8,
+ 0xcc, 0x48, 0xb0, 0x12, 0xe8, 0xce, 0x48, 0xb0,
+ 0x15, 0xe8, 0xd0, 0x48, 0xb0, 0x19, 0xe8, 0xd2,
+ 0x48, 0xb0, 0x1c, 0xe8, 0xd4, 0x48, 0xb0, 0x20,
+ 0xe8, 0xd6, 0x48, 0xb9, 0x58, 0x02, 0xe8, 0x96,
+ 0xb9, 0xe8, 0x37, 0x4a, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x15, 0x00, 0xb8, 0x29, 0x01, 0xbb, 0xb2, 0x00,
+ 0xbf, 0x29, 0x01, 0xbe, 0xb5, 0x00, 0xb1, 0x0b,
+ 0xb5, 0x03, 0xe8, 0x6e, 0x4a, 0xc3, 0x80, 0x3e,
+ 0xa4, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0x01, 0x38,
+ 0xe8, 0xd2, 0x3e, 0xc3, 0xb9, 0x47, 0x00, 0xb0,
+ 0x06, 0xb4, 0x0c, 0xe8, 0x6f, 0x48, 0xb9, 0x56,
+ 0x02, 0xe8, 0x5b, 0xb9, 0xe8, 0x76, 0x4c, 0x80,
+ 0x3e, 0xad, 0x64, 0x01, 0x75, 0x0e, 0x8b, 0x16,
+ 0xb3, 0x32, 0xbe, 0x00, 0xfa, 0xb0, 0x40, 0xe8,
+ 0x78, 0x45, 0xeb, 0x0c, 0x8b, 0x16, 0xb3, 0x32,
+ 0xbe, 0x00, 0xfa, 0xb0, 0x40, 0xe8, 0x6a, 0x45,
+ 0xe8, 0x71, 0xb9, 0xe8, 0x2a, 0xde, 0xc6, 0x47,
+ 0x02, 0x00, 0xe8, 0xaf, 0x4c, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x94, 0x02, 0xb0, 0x01, 0xe8, 0x4f,
+ 0xb8, 0xe8, 0x18, 0x49, 0xb0, 0x01, 0xe8, 0x0c,
+ 0xb8, 0xb0, 0x01, 0xb4, 0x00, 0xe8, 0x99, 0xcc,
+ 0xe8, 0xad, 0xcc, 0xc6, 0x06, 0xa4, 0xdb, 0x01,
+ 0xc3, 0x80, 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x04,
+ 0xe8, 0x0b, 0x00, 0xc3, 0xbb, 0x1e, 0xdb, 0xe8,
+ 0xb3, 0xaf, 0xe8, 0xc8, 0xaf, 0xc3, 0xbb, 0x1d,
+ 0x46, 0xe8, 0x51, 0x3e, 0xc3, 0x80, 0x3e, 0xa4,
+ 0xdb, 0x01, 0x74, 0x04, 0xe8, 0xef, 0xff, 0xc3,
+ 0xbb, 0x0e, 0x45, 0xe8, 0x3f, 0x3e, 0xc3, 0x80,
+ 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0xdd,
+ 0xff, 0xc3, 0xbb, 0xd6, 0x44, 0xe8, 0x2d, 0x3e,
+ 0xc3, 0x80, 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x04,
+ 0xe8, 0xcb, 0xff, 0xc3, 0xa0, 0xb4, 0xdb, 0x0a,
+ 0xc0, 0x74, 0x20, 0x3c, 0x01, 0x74, 0x07, 0xbb,
+ 0x03, 0x46, 0xe8, 0x10, 0x3e, 0xc3, 0xbb, 0xb8,
+ 0x45, 0xe8, 0x09, 0x3e, 0xe8, 0x06, 0xbd, 0xbb,
+ 0xda, 0x45, 0xe8, 0x00, 0x3e, 0xc6, 0x06, 0xb4,
+ 0xdb, 0x02, 0xc3, 0xbb, 0x32, 0x45, 0xe8, 0xf4,
+ 0x3d, 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1,
+ 0x64, 0x83, 0xee, 0x1e, 0xc6, 0x06, 0xc3, 0x64,
+ 0x01, 0xe8, 0xb7, 0xd3, 0xbb, 0x55, 0x45, 0xe8,
+ 0xdb, 0x3d, 0xbb, 0x68, 0x45, 0xe8, 0x28, 0x00,
+ 0xbb, 0x7b, 0x45, 0xe8, 0x22, 0x00, 0xbb, 0x8e,
+ 0x45, 0xe8, 0x1c, 0x00, 0x8b, 0x36, 0xaf, 0x64,
+ 0x8b, 0x3e, 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64,
+ 0x03, 0xe8, 0x8f, 0xd3, 0xbb, 0x9f, 0x45, 0xe8,
+ 0xb3, 0x3d, 0xc6, 0x06, 0xb4, 0xdb, 0x01, 0xc3,
+ 0x53, 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1,
+ 0x64, 0x83, 0xc6, 0x14, 0xc6, 0x06, 0xc3, 0x64,
+ 0x01, 0xe8, 0x6f, 0xd3, 0x5b, 0xe8, 0x95, 0x3d,
+ 0xc3, 0x80, 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x04,
+ 0xe8, 0x33, 0xff, 0xc3, 0xe8, 0x69, 0x3d, 0xc3,
+ 0xe8, 0x84, 0xb8, 0xb9, 0x1a, 0x00, 0xb0, 0x06,
+ 0xb4, 0x09, 0xe8, 0x20, 0x47, 0xb0, 0x0a, 0xe8,
+ 0x24, 0x47, 0xb9, 0x18, 0x00, 0xb0, 0x0d, 0xe8,
+ 0x23, 0x47, 0xb9, 0x2e, 0x00, 0xb0, 0x25, 0xe8,
+ 0x22, 0x47, 0xe8, 0xf3, 0xdc, 0xc6, 0x07, 0x00,
+ 0x53, 0xe8, 0x34, 0x4b, 0xc6, 0x06, 0x35, 0x33,
+ 0x10, 0xc6, 0x06, 0x36, 0x33, 0x18, 0xb8, 0x3c,
+ 0x46, 0xa3, 0x37, 0x33, 0xb8, 0xda, 0x78, 0xa3,
+ 0x39, 0x33, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xb9,
+ 0x52, 0x02, 0xe8, 0x52, 0xb8, 0xc6, 0x06, 0xdc,
+ 0x64, 0x01, 0x5b, 0xc6, 0x07, 0x1d, 0xe8, 0x07,
+ 0x4b, 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x0a,
+ 0xe8, 0xca, 0x46, 0xb9, 0x53, 0x02, 0xe8, 0xec,
+ 0xb7, 0xb0, 0x01, 0xe8, 0xa7, 0xb6, 0xb0, 0x24,
+ 0xe8, 0xf5, 0xc3, 0xbb, 0x90, 0x37, 0xe8, 0x0c,
+ 0x3d, 0xc3, 0xbb, 0x5e, 0x46, 0xe8, 0x05, 0x3d,
+ 0xc3, 0x80, 0x3e, 0xac, 0xdb, 0x01, 0x74, 0x07,
+ 0xbb, 0xd2, 0x3b, 0xe8, 0xf7, 0x3c, 0xc3, 0xb9,
+ 0x08, 0x00, 0xe8, 0xe6, 0x4d, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x1a, 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0xa9,
+ 0x00, 0xbf, 0x14, 0x01, 0xbe, 0xa9, 0x00, 0xb1,
+ 0x01, 0xb5, 0x04, 0xe8, 0x65, 0x48, 0xc3, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x15, 0x00, 0xb8, 0xce, 0x00,
+ 0xbb, 0xc7, 0x00, 0xbf, 0xc4, 0x00, 0xbe, 0xc2,
+ 0x00, 0xb1, 0x13, 0xb5, 0x01, 0xe8, 0x4b, 0x48,
+ 0xc3, 0xbb, 0xf7, 0x46, 0xe8, 0xb6, 0x3c, 0xc3,
+ 0xbb, 0x3d, 0x47, 0xe8, 0xaf, 0x3c, 0xc3, 0xbb,
+ 0x3d, 0x47, 0xe8, 0xa8, 0x3c, 0xc3, 0xbb, 0x7b,
+ 0x47, 0xe8, 0xa1, 0x3c, 0xc3, 0xbb, 0x98, 0x47,
+ 0xe8, 0x9a, 0x3c, 0xc3, 0xb9, 0x06, 0x00, 0xe8,
+ 0x89, 0x4d, 0xc7, 0x06, 0xf3, 0xb4, 0x19, 0x00,
+ 0xb8, 0x97, 0x00, 0xbb, 0x9c, 0x00, 0xbf, 0xea,
+ 0x00, 0xbe, 0x98, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0x08, 0x48, 0xc3, 0xbb, 0x75, 0x33, 0xe8,
+ 0xe3, 0xad, 0xc3, 0xbb, 0xbf, 0x47, 0xe8, 0x6c,
+ 0x3c, 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x0a, 0xb4,
+ 0x0c, 0xe8, 0x09, 0x46, 0xe8, 0x60, 0xb7, 0xe8,
+ 0xee, 0xdb, 0xc6, 0x07, 0x00, 0xe8, 0x74, 0x4a,
+ 0xb9, 0x80, 0x02, 0xe8, 0x11, 0xb7, 0xb0, 0x32,
+ 0xe8, 0x2d, 0xc3, 0xb0, 0x06, 0xe8, 0xd5, 0xb5,
+ 0xc3, 0x80, 0x3e, 0x93, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x08, 0x3e, 0xe8, 0x37, 0x3c, 0xc3, 0xc6,
+ 0x06, 0x93, 0xdb, 0x01, 0xbb, 0xc6, 0x3d, 0xe8,
+ 0x2b, 0x3c, 0xb9, 0x1e, 0x00, 0xb0, 0x1a, 0xb4,
+ 0x0a, 0xe8, 0xc9, 0x45, 0xb9, 0x1d, 0x00, 0xb0,
+ 0x31, 0xb4, 0x0f, 0xe8, 0xc8, 0x45, 0xe8, 0x16,
+ 0xb7, 0xb4, 0x01, 0xb0, 0x57, 0xe8, 0x9f, 0xba,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xf5, 0x01, 0xb9,
+ 0xf4, 0x01, 0xe8, 0x9d, 0xb6, 0xe8, 0x90, 0xdb,
+ 0xb0, 0x01, 0x88, 0x07, 0xe8, 0xc2, 0x4a, 0xb0,
+ 0x0e, 0xe8, 0x75, 0xb5, 0xe8, 0xc5, 0xb6, 0xbb,
+ 0xf4, 0x3d, 0xe8, 0xe8, 0x3b, 0xc3, 0xbb, 0xc1,
+ 0x32, 0xe8, 0x51, 0xad, 0xc3, 0xe8, 0xf6, 0xff,
+ 0xc3, 0xbb, 0x5e, 0x32, 0xe8, 0x46, 0xad, 0xc3,
+ 0x80, 0x3e, 0x96, 0xdb, 0x01, 0x74, 0x07, 0xbb,
+ 0xb2, 0x3e, 0xe8, 0xc8, 0x3b, 0xc3, 0xb9, 0x38,
+ 0x00, 0xb0, 0x07, 0xb4, 0x09, 0xe8, 0x65, 0x45,
+ 0xb9, 0x05, 0x00, 0xb0, 0x0f, 0xe8, 0x66, 0x45,
+ 0xb9, 0x65, 0x02, 0xe8, 0x49, 0xb6, 0xe8, 0x3f,
+ 0xdb, 0xc6, 0x47, 0x03, 0x24, 0xe8, 0x80, 0x49,
+ 0xe8, 0x79, 0xb6, 0xb0, 0x27, 0xe8, 0x80, 0xc2,
+ 0xb0, 0x05, 0xe8, 0x28, 0xb5, 0xbb, 0x7c, 0x38,
+ 0xe8, 0x92, 0x3b, 0xc3, 0x80, 0x3e, 0x96, 0xdb,
+ 0x01, 0x74, 0x07, 0xbb, 0xb2, 0x3e, 0xe8, 0x84,
+ 0x3b, 0xc3, 0xe8, 0x82, 0xb6, 0x83, 0x06, 0xaf,
+ 0x64, 0x04, 0xe8, 0x0b, 0xdb, 0xc6, 0x47, 0x02,
+ 0x23, 0xe8, 0x90, 0x49, 0xb9, 0x3f, 0x00, 0xb0,
+ 0x08, 0xb4, 0x09, 0xe8, 0x0f, 0x45, 0xb9, 0x18,
+ 0x00, 0xb0, 0x0a, 0xe8, 0x10, 0x45, 0xb9, 0x64,
+ 0x02, 0xe8, 0x1b, 0xb6, 0xb0, 0x28, 0xe8, 0x37,
+ 0xc2, 0xb0, 0x06, 0xe8, 0xdf, 0xb4, 0xc3, 0x80,
+ 0x3e, 0x96, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0xe7,
+ 0x47, 0xe8, 0x41, 0x3b, 0xc3, 0xe8, 0xbe, 0x3f,
+ 0xc3, 0xe8, 0x3b, 0xb6, 0xe8, 0xc9, 0xda, 0xc6,
+ 0x47, 0x04, 0x00, 0xe8, 0x4e, 0x49, 0xb9, 0x05,
+ 0x00, 0xb0, 0x0b, 0xb4, 0x05, 0xe8, 0xcd, 0x44,
+ 0xb9, 0x71, 0x02, 0xe8, 0xef, 0xb5, 0xb0, 0x2c,
+ 0xe8, 0xfd, 0xc1, 0xb0, 0x08, 0xe8, 0xa5, 0xb4,
+ 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x14, 0x00, 0xb8,
+ 0x05, 0x00, 0xbb, 0x83, 0x00, 0xbf, 0x0e, 0x00,
+ 0xbe, 0xb9, 0x00, 0xb1, 0x0b, 0xb5, 0x03, 0xe8,
+ 0x89, 0x46, 0xc3, 0x80, 0x3e, 0x9d, 0xdb, 0x01,
+ 0x75, 0x07, 0xbb, 0x6a, 0x35, 0xe8, 0xed, 0x3a,
+ 0xc3, 0xc6, 0x06, 0x9d, 0xdb, 0x01, 0xb0, 0x11,
+ 0xe8, 0xc5, 0xc1, 0xb9, 0x31, 0x00, 0xb0, 0x03,
+ 0xb4, 0x05, 0xe8, 0x80, 0x44, 0xb9, 0x05, 0x00,
+ 0xb0, 0x1a, 0xe8, 0x81, 0x44, 0xb9, 0x24, 0x02,
+ 0xe8, 0x93, 0xb5, 0xbb, 0xb2, 0x35, 0xe8, 0xc4,
+ 0x3a, 0xc3, 0xe8, 0xc2, 0xb5, 0xb9, 0x12, 0x00,
+ 0xb0, 0x0a, 0xb4, 0x05, 0xe8, 0x5e, 0x44, 0xe8,
+ 0x46, 0xda, 0xc6, 0x47, 0x01, 0x00, 0xe8, 0xcb,
+ 0x48, 0xb9, 0x29, 0x02, 0xe8, 0x76, 0xb5, 0xb0,
+ 0x15, 0xe8, 0x84, 0xc1, 0xb0, 0x0b, 0xe8, 0x2c,
+ 0xb4, 0xe8, 0x92, 0xb9, 0xbb, 0x05, 0x36, 0xe8,
+ 0x93, 0x3a, 0xc3, 0x80, 0x3e, 0xa9, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0x08, 0x48, 0xe8, 0x85, 0x3a,
+ 0xc3, 0xb9, 0x7b, 0x02, 0xe8, 0x28, 0xb5, 0xe8,
+ 0x0e, 0xda, 0xc6, 0x47, 0x05, 0x00, 0xe8, 0x4f,
+ 0x48, 0xb9, 0x3f, 0x00, 0xb0, 0x0b, 0xb4, 0x06,
+ 0xe8, 0x12, 0x44, 0xb9, 0x0f, 0x00, 0xb0, 0x14,
+ 0xe8, 0x13, 0x44, 0xb9, 0x20, 0x00, 0xb0, 0x1f,
+ 0xb4, 0x09, 0xe8, 0x10, 0x44, 0xb9, 0x7c, 0x02,
+ 0xe8, 0xff, 0xb4, 0xff, 0x0e, 0xaf, 0x64, 0xc7,
+ 0x06, 0xb1, 0x64, 0x8b, 0x00, 0xc6, 0x06, 0xcc,
+ 0x64, 0x01, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xe8,
+ 0x12, 0xb5, 0xb0, 0x30, 0xe8, 0x19, 0xc1, 0xb0,
+ 0x2f, 0xe8, 0x14, 0xc1, 0xbb, 0x83, 0x3b, 0xe8,
+ 0x2b, 0x3a, 0xc6, 0x06, 0xa9, 0xdb, 0x02, 0xc6,
+ 0x06, 0xa8, 0xdb, 0x00, 0xc3, 0xbb, 0x28, 0x48,
+ 0xe8, 0x1a, 0x3a, 0xc3, 0xe8, 0x18, 0xb5, 0xe8,
+ 0xa6, 0xd9, 0xc6, 0x07, 0x00, 0xe8, 0x2c, 0x48,
+ 0xb9, 0x05, 0x00, 0xb0, 0x09, 0xb4, 0x0b, 0xe8,
+ 0xab, 0x43, 0xb9, 0xff, 0x01, 0xe8, 0xbf, 0xb4,
+ 0xb0, 0x01, 0xe8, 0xdb, 0xc0, 0xb0, 0x0e, 0xe8,
+ 0x83, 0xb3, 0xc3, 0xbb, 0x28, 0x48, 0xe8, 0xec,
+ 0x39, 0xc3, 0xbb, 0x60, 0x48, 0xe8, 0xe5, 0x39,
+ 0xc3, 0xbb, 0x3f, 0x5b, 0xe8, 0xde, 0x39, 0xc3,
+ 0xe8, 0x5b, 0x3e, 0xc3, 0xb9, 0x46, 0x00, 0xb0,
+ 0x04, 0xb4, 0x0c, 0xe8, 0x77, 0x43, 0xb9, 0xcc,
+ 0x03, 0xe8, 0x63, 0xb4, 0xe8, 0x04, 0x45, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x1d, 0x00, 0xb8, 0xa0, 0x00,
+ 0xbb, 0xc7, 0x00, 0xbf, 0xa0, 0x00, 0xbe, 0xbc,
+ 0x00, 0xb1, 0x13, 0xb5, 0x01, 0xe8, 0x3b, 0x45,
+ 0xc3, 0xbb, 0x7e, 0x4a, 0xe8, 0xa6, 0x39, 0xb0,
+ 0x04, 0xe8, 0x31, 0xb3, 0xc3, 0xb9, 0x59, 0x00,
+ 0xb0, 0x05, 0xb4, 0x0b, 0xe8, 0x3e, 0x43, 0xb9,
+ 0xc9, 0x03, 0xe8, 0x3a, 0xb4, 0xe8, 0xcb, 0x44,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x21, 0x00, 0xb8, 0x3f,
+ 0x01, 0xbb, 0xb5, 0x00, 0xbf, 0x2d, 0x01, 0xbe,
+ 0xb5, 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x02,
+ 0x45, 0xc3, 0xb9, 0x58, 0x00, 0xb0, 0x04, 0xb4,
+ 0x02, 0xe8, 0x11, 0x43, 0xb9, 0xca, 0x03, 0xe8,
+ 0xfd, 0xb3, 0xe8, 0x9e, 0x44, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x23, 0x00, 0xb8, 0xa0, 0x00, 0xbb, 0xc7,
+ 0x00, 0xbf, 0xa0, 0x00, 0xbe, 0xbb, 0x00, 0xb1,
+ 0x13, 0xb5, 0x01, 0xe8, 0xd5, 0x44, 0xc3, 0xbb,
+ 0x51, 0x5b, 0xe8, 0x40, 0x39, 0xc3, 0xbb, 0x0f,
+ 0x57, 0xe8, 0x39, 0x39, 0xc3, 0xbb, 0x46, 0x67,
+ 0xe8, 0xb7, 0xd8, 0x83, 0xc3, 0x03, 0xff, 0x37,
+ 0x53, 0xc7, 0x07, 0x3f, 0x01, 0xbe, 0x99, 0x00,
+ 0xbf, 0xa3, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x04,
+ 0xe8, 0xf0, 0xce, 0xb9, 0xcd, 0x03, 0xe8, 0xbe,
+ 0xb3, 0xe8, 0x4f, 0x44, 0x5b, 0x8f, 0x07, 0x80,
+ 0x3e, 0xc1, 0xdb, 0x00, 0x75, 0x0a, 0xb8, 0x06,
+ 0x00, 0xe8, 0x0f, 0x4a, 0x40, 0xa2, 0xc1, 0xdb,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x1e, 0x00, 0xb8, 0x12,
+ 0x00, 0xbb, 0x9f, 0x00, 0xbf, 0x31, 0x00, 0xbe,
+ 0xb4, 0x00, 0xb1, 0x01, 0xb5, 0x02, 0xe8, 0x72,
+ 0x44, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x1f, 0x00,
+ 0xb8, 0x00, 0x00, 0xbb, 0xbc, 0x00, 0xbf, 0x28,
+ 0x00, 0xbe, 0xbc, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0x58, 0x44, 0xc3, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x1c, 0x00, 0xb8, 0xd0, 0x00, 0xbb, 0x99, 0x00,
+ 0xbf, 0xaa, 0x00, 0xbe, 0x99, 0x00, 0xb1, 0x01,
+ 0xb5, 0x04, 0xe8, 0x3e, 0x44, 0xc3, 0xc7, 0x06,
+ 0xaf, 0x64, 0x95, 0x00, 0xc7, 0x06, 0xb1, 0x64,
+ 0xa3, 0x00, 0xc6, 0x06, 0xcc, 0x64, 0x01, 0xc6,
+ 0x06, 0xdc, 0x64, 0x00, 0xc6, 0x06, 0xcb, 0x64,
+ 0x00, 0xe8, 0xb5, 0xd6, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x1d, 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8,
+ 0x55, 0x44, 0xbb, 0x46, 0x67, 0xe8, 0x02, 0xd8,
+ 0x83, 0xc3, 0x03, 0xff, 0x37, 0x53, 0xc7, 0x07,
+ 0x3f, 0x01, 0xb9, 0xce, 0x03, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x01, 0xe8, 0x23, 0xb3, 0xbe, 0xa0, 0x00,
+ 0xbf, 0xbc, 0x00, 0xe8, 0x35, 0xce, 0x5b, 0x8f,
+ 0x07, 0xc3, 0xe8, 0xd9, 0x3c, 0xc3, 0xbb, 0xab,
+ 0x5b, 0xe8, 0x51, 0x38, 0xc3, 0xe8, 0x41, 0x00,
+ 0xb9, 0x20, 0x00, 0xb0, 0x0c, 0xb4, 0x09, 0xe8,
+ 0xeb, 0x41, 0xb9, 0xb6, 0x02, 0xe8, 0xf8, 0xb2,
+ 0xb9, 0x0f, 0x00, 0xb0, 0x08, 0xb4, 0x09, 0xe8,
+ 0xdb, 0x41, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xb5,
+ 0x02, 0xb0, 0x01, 0xe8, 0x3b, 0xb2, 0xe8, 0xb7,
+ 0xd7, 0xc6, 0x47, 0x06, 0x00, 0xe8, 0x3c, 0x46,
+ 0xbb, 0xc7, 0x4c, 0xe8, 0x17, 0x38, 0xb0, 0x36,
+ 0xe8, 0xf5, 0xbe, 0xb0, 0x04, 0xe8, 0x9d, 0xb1,
+ 0xc3, 0xbe, 0xd3, 0x00, 0xbf, 0x97, 0x00, 0x81,
+ 0x3e, 0xaf, 0x64, 0xd0, 0x00, 0x75, 0x1a, 0x81,
+ 0x3e, 0xb1, 0x64, 0x97, 0x00, 0x75, 0x12, 0xc6,
+ 0x06, 0xc3, 0x64, 0x02, 0x57, 0x56, 0xe8, 0xc2,
+ 0xcd, 0xb8, 0x09, 0x00, 0xe8, 0xcb, 0xb6, 0x5e,
+ 0x5f, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8, 0xb2,
+ 0xcd, 0xc3, 0x80, 0x3e, 0xc2, 0xdb, 0x01, 0x75,
+ 0x07, 0xbb, 0xa0, 0x4c, 0xe8, 0xce, 0x37, 0xc3,
+ 0xb9, 0x31, 0x00, 0xb0, 0x05, 0xb4, 0x09, 0xe8,
+ 0x6b, 0x41, 0xb0, 0x11, 0xe8, 0x6f, 0x41, 0xb9,
+ 0xb3, 0x02, 0xe8, 0x73, 0xb2, 0xe8, 0x46, 0x00,
+ 0x73, 0x31, 0xb9, 0x0f, 0x00, 0xb0, 0x08, 0xb4,
+ 0x09, 0xe8, 0x51, 0x41, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0xb4, 0x02, 0xb0, 0x01, 0xe8, 0xb1, 0xb1,
+ 0xe8, 0x2d, 0xd7, 0xc6, 0x47, 0x06, 0x3b, 0xe8,
+ 0xb2, 0x45, 0xb0, 0x04, 0xe8, 0x12, 0xb1, 0xbb,
+ 0x84, 0x4c, 0xe8, 0x88, 0x37, 0xc6, 0x06, 0xc2,
+ 0xdb, 0x01, 0xc3, 0x80, 0x3e, 0xc0, 0xdb, 0x01,
+ 0x74, 0x0b, 0xc6, 0x06, 0xc0, 0xdb, 0x01, 0xbb,
+ 0x61, 0x4c, 0xe8, 0x70, 0x37, 0xc3, 0xa0, 0xc1,
+ 0xdb, 0x98, 0x48, 0xbb, 0xb7, 0xdb, 0x53, 0x03,
+ 0xd8, 0x80, 0x3f, 0x01, 0x5b, 0x75, 0x18, 0x8b,
+ 0x07, 0x8b, 0x4f, 0x02, 0x8b, 0x57, 0x04, 0x02,
+ 0xc4, 0x02, 0xc1, 0x02, 0xc5, 0x02, 0xc2, 0x02,
+ 0xc6, 0x3c, 0x01, 0x75, 0x02, 0xf9, 0xc3, 0xf8,
+ 0xc3, 0xbb, 0xe7, 0x5b, 0xe8, 0x3e, 0x37, 0xc3,
+ 0xb0, 0x37, 0xe8, 0x4f, 0xbe, 0x73, 0x07, 0xbb,
+ 0xd9, 0x4c, 0xe8, 0x30, 0x37, 0xc3, 0x80, 0x3e,
+ 0xc3, 0xdb, 0x01, 0x74, 0x11, 0xc6, 0x06, 0xc3,
+ 0xdb, 0x01, 0xb9, 0xb7, 0x02, 0xe8, 0xe6, 0xb1,
+ 0xbb, 0x6a, 0x38, 0xe8, 0x87, 0xa8, 0xb9, 0x05,
+ 0x00, 0xb0, 0x0b, 0xb4, 0x0a, 0xe8, 0xb5, 0x40,
+ 0xb9, 0xb8, 0x02, 0xe8, 0xd0, 0xb1, 0xb0, 0x37,
+ 0xe8, 0xe5, 0xbd, 0xc3, 0xbb, 0x0b, 0x5c, 0xe8,
+ 0xfb, 0x36, 0xc3, 0xbb, 0x26, 0x5c, 0xe8, 0xf4,
+ 0x36, 0xc3, 0x80, 0x3e, 0xb7, 0xdb, 0x01, 0x74,
+ 0x2d, 0x80, 0x3e, 0xb8, 0xdb, 0x01, 0x75, 0x04,
+ 0xe8, 0x13, 0x02, 0xc3, 0xb9, 0x42, 0x00, 0xb0,
+ 0x04, 0xb4, 0x07, 0xe8, 0x7f, 0x40, 0xb9, 0xa5,
+ 0x02, 0xe8, 0x6b, 0xb1, 0xe8, 0x61, 0xd6, 0xc6,
+ 0x07, 0x35, 0xe8, 0xa3, 0x44, 0xe8, 0x9c, 0xb1,
+ 0xc6, 0x06, 0xb7, 0xdb, 0x01, 0xc3, 0xe8, 0xbe,
+ 0xb1, 0xe8, 0x4c, 0xd6, 0xc6, 0x07, 0x00, 0xe8,
+ 0xd2, 0x44, 0xb9, 0x43, 0x00, 0xb0, 0x04, 0xb4,
+ 0x07, 0xe8, 0x51, 0x40, 0xb9, 0xa6, 0x02, 0xe8,
+ 0x65, 0xb1, 0xc6, 0x06, 0xb7, 0xdb, 0x00, 0xc3,
+ 0x80, 0x3e, 0xb8, 0xdb, 0x01, 0x74, 0x39, 0x80,
+ 0x3e, 0xb7, 0xdb, 0x01, 0x75, 0x04, 0xe8, 0xbd,
+ 0x01, 0xc3, 0x80, 0x3e, 0xb9, 0xdb, 0x01, 0x75,
+ 0x04, 0xe8, 0xb2, 0x01, 0xc3, 0xb9, 0x42, 0x00,
+ 0xb0, 0x05, 0xb4, 0x07, 0xe8, 0x1e, 0x40, 0xb9,
+ 0xa7, 0x02, 0xe8, 0x0a, 0xb1, 0xe8, 0x00, 0xd6,
+ 0xc6, 0x47, 0x01, 0x36, 0xe8, 0x41, 0x44, 0xe8,
+ 0x3a, 0xb1, 0xc6, 0x06, 0xb8, 0xdb, 0x01, 0xc3,
+ 0xe8, 0x5c, 0xb1, 0xe8, 0xea, 0xd5, 0xc6, 0x47,
+ 0x01, 0x00, 0xe8, 0x6f, 0x44, 0xb9, 0x43, 0x00,
+ 0xb0, 0x04, 0xb4, 0x07, 0xe8, 0xee, 0x3f, 0xb9,
+ 0xa8, 0x02, 0xe8, 0x02, 0xb1, 0xc6, 0x06, 0xb8,
+ 0xdb, 0x00, 0xc3, 0x80, 0x3e, 0xb9, 0xdb, 0x01,
+ 0x74, 0x2e, 0x80, 0x3e, 0xb8, 0xdb, 0x01, 0x75,
+ 0x04, 0xe8, 0x5a, 0x01, 0xc3, 0xb9, 0x43, 0x00,
+ 0xb0, 0x05, 0xb4, 0x07, 0xe8, 0xc6, 0x3f, 0xb9,
+ 0xa9, 0x02, 0xe8, 0xb2, 0xb0, 0xe8, 0xa8, 0xd5,
+ 0xc6, 0x47, 0x02, 0x37, 0xe8, 0xe9, 0x43, 0xe8,
+ 0xe2, 0xb0, 0xc6, 0x06, 0xb9, 0xdb, 0x01, 0xc3,
+ 0xe8, 0x04, 0xb1, 0xe8, 0x92, 0xd5, 0xc6, 0x47,
+ 0x02, 0x00, 0xe8, 0x17, 0x44, 0xb9, 0x43, 0x00,
+ 0xb0, 0x05, 0xb4, 0x07, 0xe8, 0x96, 0x3f, 0xb9,
+ 0xaa, 0x02, 0xe8, 0xaa, 0xb0, 0xc6, 0x06, 0xb9,
+ 0xdb, 0x00, 0xc3, 0x80, 0x3e, 0xba, 0xdb, 0x01,
+ 0x74, 0x2e, 0x80, 0x3e, 0xbb, 0xdb, 0x01, 0x75,
+ 0x04, 0xe8, 0x02, 0x01, 0xc3, 0xb9, 0x42, 0x00,
+ 0xb0, 0x04, 0xb4, 0x07, 0xe8, 0x6e, 0x3f, 0xb9,
+ 0xab, 0x02, 0xe8, 0x5a, 0xb0, 0xe8, 0x50, 0xd5,
+ 0xc6, 0x47, 0x03, 0x38, 0xe8, 0x91, 0x43, 0xe8,
+ 0x8a, 0xb0, 0xc6, 0x06, 0xba, 0xdb, 0x01, 0xc3,
+ 0xe8, 0xac, 0xb0, 0xe8, 0x3a, 0xd5, 0xc6, 0x47,
+ 0x03, 0x00, 0xe8, 0xbf, 0x43, 0xb9, 0x43, 0x00,
+ 0xb0, 0x04, 0xb4, 0x07, 0xe8, 0x3e, 0x3f, 0xb9,
+ 0xac, 0x02, 0xe8, 0x52, 0xb0, 0xc6, 0x06, 0xba,
+ 0xdb, 0x00, 0xc3, 0x80, 0x3e, 0xbb, 0xdb, 0x01,
+ 0x74, 0x39, 0x80, 0x3e, 0xba, 0xdb, 0x01, 0x75,
+ 0x04, 0xe8, 0xaa, 0x00, 0xc3, 0x80, 0x3e, 0xbc,
+ 0xdb, 0x01, 0x75, 0x04, 0xe8, 0x9f, 0x00, 0xc3,
+ 0xb9, 0x42, 0x00, 0xb0, 0x05, 0xb4, 0x07, 0xe8,
+ 0x0b, 0x3f, 0xb9, 0xad, 0x02, 0xe8, 0xf7, 0xaf,
+ 0xe8, 0xed, 0xd4, 0xc6, 0x47, 0x04, 0x39, 0xe8,
+ 0x2e, 0x43, 0xe8, 0x27, 0xb0, 0xc6, 0x06, 0xbb,
+ 0xdb, 0x01, 0xc3, 0xe8, 0x49, 0xb0, 0xe8, 0xd7,
+ 0xd4, 0xc6, 0x47, 0x04, 0x00, 0xe8, 0x5c, 0x43,
+ 0xb9, 0x43, 0x00, 0xb0, 0x04, 0xb4, 0x07, 0xe8,
+ 0xdb, 0x3e, 0xb9, 0xae, 0x02, 0xe8, 0xef, 0xaf,
+ 0xc6, 0x06, 0xbb, 0xdb, 0x00, 0xc3, 0x80, 0x3e,
+ 0xbc, 0xdb, 0x01, 0x74, 0x2e, 0x80, 0x3e, 0xbb,
+ 0xdb, 0x01, 0x75, 0x04, 0xe8, 0x47, 0x00, 0xc3,
+ 0xb9, 0x42, 0x00, 0xb0, 0x06, 0xb4, 0x07, 0xe8,
+ 0xb3, 0x3e, 0xb9, 0xaf, 0x02, 0xe8, 0x9f, 0xaf,
+ 0xe8, 0x95, 0xd4, 0xc6, 0x47, 0x05, 0x3a, 0xe8,
+ 0xd6, 0x42, 0xe8, 0xcf, 0xaf, 0xc6, 0x06, 0xbc,
+ 0xdb, 0x01, 0xc3, 0xe8, 0xf1, 0xaf, 0xe8, 0x7f,
+ 0xd4, 0xc6, 0x47, 0x05, 0x00, 0xe8, 0x04, 0x43,
+ 0xb9, 0x43, 0x00, 0xb0, 0x05, 0xb4, 0x07, 0xe8,
+ 0x83, 0x3e, 0xb9, 0xb0, 0x02, 0xe8, 0x97, 0xaf,
+ 0xc6, 0x06, 0xbc, 0xdb, 0x00, 0xc3, 0x80, 0x3e,
+ 0xbd, 0xdb, 0x01, 0x74, 0x12, 0xbb, 0xcd, 0x4a,
+ 0xe8, 0xc2, 0x34, 0xbb, 0x0d, 0x4b, 0xe8, 0xbc,
+ 0x34, 0xc6, 0x06, 0xbd, 0xdb, 0x01, 0xc3, 0xbb,
+ 0x39, 0x4b, 0xe8, 0xb0, 0x34, 0xc3, 0xbb, 0x46,
+ 0x5c, 0xe8, 0xa9, 0x34, 0xc3, 0xb9, 0x50, 0x00,
+ 0xb0, 0x04, 0xb4, 0x0a, 0xe8, 0x46, 0x3e, 0xb9,
+ 0xcb, 0x03, 0xe8, 0x32, 0xaf, 0xe8, 0xd3, 0x3f,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x20, 0x00, 0xb8, 0x8b,
+ 0x00, 0xbb, 0xc7, 0x00, 0xbf, 0x8b, 0x00, 0xbe,
+ 0xbc, 0x00, 0xb1, 0x13, 0xb5, 0x01, 0xe8, 0x0a,
+ 0x40, 0xc3, 0xbb, 0x65, 0x5b, 0xe8, 0x75, 0x34,
+ 0xc3, 0x80, 0x3e, 0xd9, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x26, 0x53, 0xe8, 0x67, 0x34, 0xc3, 0xb9,
+ 0x58, 0x00, 0xb0, 0x04, 0xb4, 0x0e, 0xe8, 0x04,
+ 0x3e, 0xb9, 0x28, 0x03, 0xe8, 0xf0, 0xae, 0xe8,
+ 0x91, 0x3f, 0xc7, 0x06, 0xf3, 0xb4, 0x24, 0x00,
+ 0xb8, 0x29, 0x00, 0xbb, 0xc3, 0x00, 0xbf, 0x32,
+ 0x00, 0xbe, 0xc3, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0xc8, 0x3f, 0xc3, 0xe8, 0xb7, 0x38, 0xc3,
+ 0xe8, 0xb3, 0x38, 0xc3, 0xbb, 0x51, 0x5b, 0xe8,
+ 0x2b, 0x34, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x1d,
+ 0x00, 0xb8, 0x3f, 0x01, 0xbb, 0xbc, 0x00, 0xbf,
+ 0x18, 0x01, 0xbe, 0xbc, 0x00, 0xb1, 0x01, 0xb5,
+ 0x04, 0xe8, 0x9f, 0x3f, 0xc3, 0xb9, 0x59, 0x00,
+ 0xb0, 0x06, 0xb4, 0x0c, 0xe8, 0xae, 0x3d, 0xb9,
+ 0x26, 0x03, 0x80, 0x3e, 0xef, 0xdb, 0x01, 0x75,
+ 0x03, 0xb9, 0xd9, 0x03, 0xe8, 0x90, 0xae, 0xe8,
+ 0x31, 0x3f, 0xc7, 0x06, 0xf3, 0xb4, 0x22, 0x00,
+ 0xb8, 0x28, 0x00, 0xbb, 0x85, 0x00, 0xbf, 0x34,
+ 0x00, 0xbe, 0x85, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0x68, 0x3f, 0xc3, 0xbb, 0x80, 0x5b, 0xe8,
+ 0xd3, 0x33, 0xc3, 0xe8, 0xbb, 0xac, 0xbb, 0x2e,
+ 0xdb, 0xe8, 0x21, 0xa5, 0xe8, 0x36, 0xa5, 0xb0,
+ 0x01, 0xbe, 0x94, 0xaa, 0xe8, 0x5a, 0xad, 0xc6,
+ 0x06, 0xd1, 0xdb, 0x01, 0xc3, 0xe8, 0xb7, 0xae,
+ 0xe8, 0x45, 0xd3, 0xc6, 0x07, 0x47, 0xe8, 0xcb,
+ 0x41, 0xb9, 0x20, 0x00, 0xb0, 0x05, 0xb4, 0x04,
+ 0xe8, 0x4a, 0x3d, 0xb9, 0xdc, 0x02, 0xe8, 0x5e,
+ 0xae, 0xb0, 0x02, 0xe8, 0x27, 0xad, 0xb0, 0x48,
+ 0xe8, 0x75, 0xba, 0xc3, 0xb9, 0xf2, 0x02, 0xe8,
+ 0x25, 0xae, 0xe8, 0xc6, 0x3e, 0xbe, 0xde, 0x76,
+ 0xbb, 0x7b, 0x51, 0x06, 0x53, 0x56, 0xb8, 0x00,
+ 0xa0, 0x8e, 0xc0, 0xe8, 0x67, 0x2f, 0xb8, 0x00,
+ 0xa0, 0xb9, 0x00, 0x7d, 0xe8, 0x19, 0x40, 0x5e,
+ 0x5b, 0xe8, 0x69, 0x37, 0xe8, 0x65, 0x2f, 0xb8,
+ 0x0e, 0x01, 0xe8, 0x67, 0xb2, 0xe8, 0x4d, 0x2f,
+ 0xa1, 0xb3, 0x32, 0x8e, 0xc0, 0xbf, 0x00, 0xfa,
+ 0xb9, 0x80, 0x01, 0x33, 0xc0, 0xfc, 0xf3, 0xab,
+ 0x07, 0xb9, 0x03, 0x00, 0xe8, 0x3c, 0x44, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x0b, 0x00, 0xe8, 0xf4, 0x3f,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0xee, 0x02,
+ 0xb0, 0x02, 0xe8, 0x3d, 0xad, 0xc6, 0x06, 0x45,
+ 0x33, 0xe5, 0xc6, 0x06, 0x46, 0x33, 0xd9, 0xb0,
+ 0x02, 0xb4, 0x01, 0xbe, 0xef, 0x02, 0xbf, 0x11,
+ 0x02, 0xbb, 0x50, 0x4f, 0xe8, 0x2f, 0xa7, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0xf0, 0x02, 0xc7, 0x47,
+ 0x02, 0xf1, 0x02, 0xb0, 0x01, 0xe8, 0x12, 0xad,
+ 0xc6, 0x06, 0x45, 0x33, 0xd9, 0xc6, 0x06, 0x46,
+ 0x33, 0xe5, 0xb0, 0x01, 0xb4, 0x02, 0xbe, 0x11,
+ 0x02, 0xbf, 0xef, 0x02, 0xbb, 0x68, 0x51, 0xe8,
+ 0x04, 0xa7, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0xdd, 0x02, 0xc7, 0x47, 0x04, 0xde, 0x02, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x1e, 0x00, 0xe8, 0x8c, 0x3f,
+ 0xc6, 0x06, 0x45, 0x33, 0xe5, 0xc6, 0x06, 0x46,
+ 0x33, 0xd0, 0xb0, 0x02, 0xb4, 0x03, 0xbe, 0xdd,
+ 0x02, 0xbf, 0xde, 0x02, 0xbb, 0x9e, 0x44, 0xe8,
+ 0xd4, 0xa6, 0xb9, 0x4b, 0x00, 0xb0, 0x0d, 0xb4,
+ 0x04, 0xe8, 0x59, 0x3c, 0xb9, 0x20, 0x00, 0xb0,
+ 0x16, 0xe8, 0x5a, 0x3c, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0xdf, 0x02, 0xc7, 0x47, 0x04, 0xe0,
+ 0x02, 0xb0, 0x02, 0xe8, 0xa4, 0xac, 0xc6, 0x06,
+ 0x46, 0x33, 0xe5, 0xc6, 0x06, 0x45, 0x33, 0xd0,
+ 0xb0, 0x03, 0xb4, 0x02, 0xbe, 0xe1, 0x02, 0xbf,
+ 0xe2, 0x02, 0xbb, 0xcf, 0x46, 0xe8, 0x96, 0xa6,
+ 0xb9, 0x20, 0x00, 0xb0, 0x01, 0xb4, 0x04, 0xe8,
+ 0x1b, 0x3c, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0xe3, 0x02, 0xc7, 0x47, 0x04, 0xe4, 0x02, 0xb0,
+ 0x02, 0xe8, 0x6e, 0xac, 0xc6, 0x06, 0x45, 0x33,
+ 0xe5, 0xc6, 0x06, 0x46, 0x33, 0xd0, 0xb0, 0x02,
+ 0xb4, 0x03, 0xbe, 0xdd, 0x02, 0xbf, 0xde, 0x02,
+ 0xbb, 0x72, 0x47, 0xe8, 0x60, 0xa6, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0xe6, 0x02, 0xc7, 0x47,
+ 0x04, 0xe5, 0x02, 0xb0, 0x02, 0xe8, 0x42, 0xac,
+ 0xc6, 0x06, 0x46, 0x33, 0xe5, 0xc6, 0x06, 0x45,
+ 0x33, 0xd0, 0xb0, 0x03, 0xb4, 0x02, 0xbe, 0xe7,
+ 0x02, 0xbf, 0xdd, 0x02, 0xbb, 0x1c, 0x48, 0xe8,
+ 0x34, 0xa6, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0xe8, 0x02, 0xc7, 0x47, 0x04, 0xe9, 0x02, 0xb0,
+ 0x02, 0xe8, 0x16, 0xac, 0xb0, 0x03, 0xb4, 0x02,
+ 0xbe, 0xde, 0x02, 0xbf, 0xdd, 0x02, 0xbb, 0x73,
+ 0x48, 0xe8, 0x12, 0xa6, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0xea, 0x02, 0xc7, 0x47, 0x04, 0xeb,
+ 0x02, 0xb0, 0x02, 0xe8, 0xf4, 0xab, 0xe8, 0x2d,
+ 0x3c, 0xb0, 0x03, 0xbe, 0xde, 0x02, 0xbb, 0xa5,
+ 0x4d, 0xe8, 0x7b, 0xa7, 0xb0, 0x03, 0xbe, 0xec,
+ 0x02, 0xbb, 0xb9, 0x4e, 0xe8, 0x70, 0xa7, 0xb0,
+ 0x03, 0xbe, 0xed, 0x02, 0xbb, 0x15, 0x4f, 0xe8,
+ 0x65, 0xa7, 0xb0, 0x03, 0xbe, 0xec, 0x02, 0xbb,
+ 0x2f, 0x4f, 0xe8, 0x5a, 0xa7, 0xb9, 0x0a, 0x00,
+ 0xe8, 0xa8, 0x42, 0xc7, 0x06, 0xf3, 0xb4, 0x20,
+ 0x00, 0xe8, 0x60, 0x3e, 0xb9, 0x1a, 0x00, 0xb0,
+ 0x0a, 0xb4, 0x04, 0xe8, 0x47, 0x3b, 0xb9, 0xf3,
+ 0x02, 0xe8, 0x5b, 0xac, 0x8b, 0x36, 0xaf, 0x64,
+ 0x8b, 0x3e, 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64,
+ 0x03, 0xe8, 0x5f, 0xc7, 0xbb, 0xbf, 0x51, 0xe8,
+ 0xf3, 0xa2, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xfb,
+ 0x02, 0xc7, 0x47, 0x02, 0xfc, 0x02, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x1f, 0x00, 0xe8, 0x25, 0x3e, 0xc6,
+ 0x06, 0x45, 0x33, 0xd9, 0xc6, 0x06, 0x46, 0x33,
+ 0xd0, 0xb0, 0x01, 0xb4, 0x02, 0xbe, 0xfb, 0x02,
+ 0xbf, 0xfc, 0x02, 0xbb, 0x9f, 0x53, 0xe8, 0x6d,
+ 0xa5, 0xc7, 0x06, 0xf3, 0xb4, 0x20, 0x00, 0xe8,
+ 0x1d, 0x3d, 0xbb, 0xc3, 0x52, 0xe8, 0xb5, 0xa2,
+ 0xb0, 0x03, 0xe8, 0xd0, 0xaa, 0xb0, 0x07, 0xe8,
+ 0xbf, 0xaa, 0xc6, 0x06, 0xd5, 0xdb, 0x01, 0xc3,
+ 0x80, 0x3e, 0xd5, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0xa7, 0x51, 0xe8, 0x28, 0x31, 0xc3, 0xe8, 0xa5,
+ 0x35, 0xc3, 0x80, 0x3e, 0xd5, 0xdb, 0x01, 0x75,
+ 0x07, 0xbb, 0xa7, 0x51, 0xe8, 0x16, 0x31, 0xc3,
+ 0xb9, 0xd1, 0x03, 0xe8, 0xca, 0xab, 0xbb, 0x11,
+ 0x55, 0xe8, 0x09, 0x31, 0xc3, 0x80, 0x3e, 0xd5,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xbb, 0x51, 0xe8,
+ 0xfb, 0x30, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x1f,
+ 0x00, 0xb8, 0x8b, 0x00, 0xbb, 0xac, 0x00, 0xbf,
+ 0x8b, 0x00, 0xbe, 0xb5, 0x00, 0xb1, 0x0b, 0xb5,
+ 0x03, 0xe8, 0x6f, 0x3c, 0xc3, 0xe8, 0xdf, 0xab,
+ 0x8b, 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1, 0x64,
+ 0xc6, 0x06, 0xc3, 0x64, 0x03, 0xe8, 0xa3, 0xc6,
+ 0xb9, 0xf4, 0x02, 0xe8, 0x64, 0xab, 0xe8, 0x02,
+ 0x3c, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0xf6, 0x02, 0xb0, 0x02,
+ 0xe8, 0xbf, 0xaa, 0xc6, 0x06, 0x45, 0x33, 0xd0,
+ 0xb0, 0x02, 0xbe, 0xf7, 0x02, 0xbb, 0xe6, 0x52,
+ 0xe8, 0x44, 0xa6, 0xb9, 0x28, 0x00, 0xb0, 0x05,
+ 0xb4, 0x04, 0xe8, 0x40, 0x3a, 0xb9, 0x34, 0x00,
+ 0xb0, 0x0d, 0xe8, 0x41, 0x3a, 0xb0, 0x11, 0xe8,
+ 0x43, 0x3a, 0xb0, 0x15, 0xe8, 0x45, 0x3a, 0xbb,
+ 0x47, 0x33, 0xc7, 0x47, 0x02, 0xf8, 0x02, 0xb0,
+ 0x02, 0xe8, 0x86, 0xaa, 0xe8, 0x0d, 0x3b, 0xe8,
+ 0x06, 0xd0, 0xc6, 0x47, 0x01, 0x48, 0xc6, 0x47,
+ 0x02, 0x49, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xfd,
+ 0x02, 0xc7, 0x06, 0xf3, 0xb4, 0x1f, 0x00, 0xe8,
+ 0x12, 0x3d, 0xb9, 0x3a, 0x00, 0xb0, 0x05, 0xb4,
+ 0x07, 0xe8, 0xf9, 0x39, 0xb0, 0x08, 0xe8, 0xfd,
+ 0x39, 0xb0, 0x0a, 0xe8, 0xff, 0x39, 0xb0, 0x0c,
+ 0xe8, 0x01, 0x3a, 0xb0, 0x0e, 0xe8, 0x03, 0x3a,
+ 0xb0, 0x01, 0xe8, 0x45, 0xaa, 0xc6, 0x06, 0x45,
+ 0x33, 0xd9, 0xb0, 0x01, 0xbe, 0xfe, 0x02, 0xbb,
+ 0x43, 0x54, 0xe8, 0xca, 0xa5, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0xf9, 0x02, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x20, 0x00, 0xe8, 0xce, 0x3c, 0xc6, 0x06,
+ 0x45, 0x33, 0xd0, 0xb0, 0x02, 0xbe, 0xf9, 0x02,
+ 0xbb, 0x58, 0x53, 0xe8, 0xa9, 0xa5, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0xfa, 0x02, 0xb0, 0x02,
+ 0xe8, 0x07, 0xaa, 0xe8, 0x40, 0x3a, 0xe8, 0x87,
+ 0xcf, 0xc6, 0x47, 0x02, 0x00, 0xe8, 0xa5, 0x3d,
+ 0xb9, 0xf5, 0x02, 0xe8, 0x84, 0xaa, 0xc6, 0x06,
+ 0xcd, 0x64, 0x01, 0xc6, 0x06, 0xcc, 0x64, 0x01,
+ 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xe8, 0xac, 0xaa,
+ 0xbb, 0xe7, 0x51, 0xe8, 0xcf, 0x2f, 0xb0, 0x08,
+ 0xe8, 0x4e, 0xa9, 0xb0, 0x07, 0xe8, 0x55, 0xa9,
+ 0xc6, 0x06, 0xd5, 0xdb, 0x00, 0xc3, 0xb9, 0x20,
+ 0x00, 0xb0, 0x05, 0xb4, 0x08, 0xe8, 0x5d, 0x39,
+ 0xb9, 0xff, 0x02, 0xe8, 0x6a, 0xaa, 0xe8, 0x3f,
+ 0xcf, 0xc6, 0x47, 0x01, 0x00, 0xe8, 0xc4, 0x3d,
+ 0xb0, 0x49, 0xe8, 0x83, 0xb6, 0xb0, 0x08, 0xe8,
+ 0x2b, 0xa9, 0xc3, 0xe8, 0x60, 0xa8, 0xbb, 0x24,
+ 0xdb, 0xe8, 0xe9, 0xa0, 0xe8, 0xfe, 0xa0, 0xc3,
+ 0xe8, 0x15, 0x00, 0xbe, 0x51, 0x00, 0xbf, 0xa0,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x52,
+ 0xc5, 0xbb, 0xac, 0x5c, 0xe8, 0x76, 0x2f, 0xc3,
+ 0x80, 0x3e, 0xcc, 0xdb, 0x01, 0x74, 0x07, 0xbb,
+ 0xce, 0x4e, 0xe8, 0x68, 0x2f, 0x58, 0xc3, 0xe8,
+ 0xee, 0xff, 0xbb, 0x46, 0x50, 0xe8, 0x5d, 0x2f,
+ 0xc3, 0xb0, 0x44, 0xe8, 0x6e, 0xb6, 0x73, 0x12,
+ 0xb0, 0x44, 0xe8, 0x43, 0xb6, 0xe8, 0x0a, 0x00,
+ 0xe8, 0x23, 0xc5, 0xbb, 0x0a, 0x50, 0xe8, 0x44,
+ 0x2f, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x1d, 0x00,
+ 0xb8, 0x28, 0x00, 0xbb, 0xb0, 0x00, 0xbf, 0x3e,
+ 0x00, 0xbe, 0xb7, 0x00, 0xb1, 0x01, 0xb5, 0x02,
+ 0xe8, 0xb8, 0x3a, 0xc3, 0xe8, 0xb1, 0xff, 0x80,
+ 0x3e, 0xcf, 0xdb, 0x01, 0x74, 0x48, 0xe8, 0x1e,
+ 0xaa, 0xc6, 0x06, 0xe6, 0x1c, 0xe5, 0xc6, 0x06,
+ 0x35, 0x33, 0x0b, 0xc6, 0x06, 0x36, 0x33, 0x23,
+ 0xb8, 0xcb, 0x4f, 0xa3, 0x37, 0x33, 0xb8, 0x70,
+ 0x87, 0xa3, 0x39, 0x33, 0xb9, 0x59, 0x00, 0xb0,
+ 0x04, 0xb4, 0x09, 0xe8, 0x9f, 0x38, 0xb9, 0x57,
+ 0x00, 0xb0, 0x2d, 0xe8, 0xa0, 0x38, 0xb9, 0xce,
+ 0x02, 0xe8, 0x03, 0xaa, 0xe8, 0xbd, 0xa9, 0xe8,
+ 0xe3, 0xad, 0xbb, 0xe2, 0x4f, 0xe8, 0xdd, 0x2e,
+ 0xc6, 0x06, 0xcf, 0xdb, 0x01, 0xc3, 0xb9, 0x59,
+ 0x00, 0xb0, 0x04, 0xb4, 0x09, 0xe8, 0x75, 0x38,
+ 0xb9, 0xcf, 0x02, 0xe8, 0x61, 0xa9, 0xe8, 0x57,
+ 0xce, 0xc6, 0x47, 0x04, 0x43, 0xe8, 0x98, 0x3c,
+ 0xe8, 0x91, 0xa9, 0xbb, 0x46, 0x67, 0xe8, 0x39,
+ 0xce, 0xfe, 0x07, 0xb0, 0x05, 0xe8, 0x3d, 0xa8,
+ 0xb0, 0x0c, 0xe8, 0x2c, 0xa8, 0xc3, 0x80, 0x3e,
+ 0xcd, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x9d, 0x3c,
+ 0xe8, 0x0a, 0xa0, 0xc3, 0x80, 0x3e, 0xce, 0xdb,
+ 0x01, 0x75, 0x07, 0xbb, 0x9b, 0x4f, 0xe8, 0x8c,
+ 0x2e, 0xc3, 0xbb, 0xb1, 0x4f, 0xe8, 0x85, 0x2e,
+ 0xb9, 0x20, 0x00, 0xb0, 0x06, 0xb4, 0x07, 0xe8,
+ 0x23, 0x38, 0xb9, 0xcd, 0x02, 0xe8, 0x30, 0xa9,
+ 0xb0, 0x42, 0xe8, 0x53, 0xb5, 0xc6, 0x06, 0xce,
+ 0xdb, 0x01, 0xc3, 0xe8, 0x69, 0xa9, 0xe8, 0xf7,
+ 0xcd, 0xc6, 0x47, 0x02, 0x00, 0xe8, 0x7c, 0x3c,
+ 0xb9, 0x20, 0x00, 0xb0, 0x07, 0xb4, 0x08, 0xe8,
+ 0xfb, 0x37, 0xb9, 0xc6, 0x02, 0xe8, 0x0f, 0xa9,
+ 0xb0, 0x3e, 0xe8, 0x2b, 0xb5, 0xb0, 0x07, 0xe8,
+ 0xd3, 0xa7, 0xb0, 0x08, 0xe8, 0xc2, 0xa7, 0xc3,
+ 0xe8, 0xbb, 0x32, 0xc3, 0xe8, 0x38, 0xa9, 0xe8,
+ 0xc6, 0xcd, 0xc6, 0x47, 0x03, 0x00, 0xe8, 0x4b,
+ 0x3c, 0xb9, 0x20, 0x00, 0xb0, 0x07, 0xb4, 0x0b,
+ 0xe8, 0xca, 0x37, 0xb9, 0xcb, 0x02, 0xe8, 0xde,
+ 0xa8, 0xb0, 0x3f, 0xe8, 0xfa, 0xb4, 0xb0, 0x09,
+ 0xe8, 0xa2, 0xa7, 0xc3, 0xe8, 0x99, 0xfe, 0xbb,
+ 0x60, 0x5c, 0xe8, 0x08, 0x2e, 0xc3, 0xbb, 0x82,
+ 0x5c, 0xe8, 0x01, 0x2e, 0xc3, 0x80, 0x3e, 0xd0,
+ 0xdb, 0x01, 0x74, 0x0d, 0xb9, 0xd1, 0x02, 0xe8,
+ 0xae, 0xa8, 0xbb, 0x5e, 0x50, 0xe8, 0xed, 0x2d,
+ 0xc3, 0xe8, 0xeb, 0xa8, 0xe8, 0x79, 0xcd, 0xc6,
+ 0x47, 0x04, 0x45, 0xe8, 0xfe, 0x3b, 0xb9, 0x20,
+ 0x00, 0xb0, 0x05, 0xb4, 0x08, 0xe8, 0x7d, 0x37,
+ 0xb9, 0xd5, 0x02, 0xe8, 0x91, 0xa8, 0xb0, 0x0c,
+ 0xe8, 0x5a, 0xa7, 0xb0, 0x45, 0xe8, 0xa8, 0xb4,
+ 0xc3, 0xb9, 0x59, 0x00, 0xb0, 0x03, 0xb4, 0x01,
+ 0xe8, 0x62, 0x37, 0xb9, 0xcf, 0x03, 0xe8, 0x5e,
+ 0xa8, 0xe8, 0xef, 0x38, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x1f, 0x00, 0xb8, 0x2a, 0x01, 0xbb, 0xb1, 0x00,
+ 0xbf, 0x16, 0x01, 0xbe, 0xb1, 0x00, 0xb1, 0x01,
+ 0xb5, 0x04, 0xe8, 0x26, 0x39, 0xc3, 0xe8, 0x15,
+ 0x32, 0xc3, 0x80, 0x3e, 0xd6, 0xdb, 0x02, 0x75,
+ 0x07, 0xbb, 0x2c, 0x52, 0xe8, 0x86, 0x2d, 0xc3,
+ 0xb9, 0x4f, 0x00, 0xb0, 0x06, 0xb4, 0x0e, 0xe8,
+ 0x23, 0x37, 0xb9, 0x54, 0x00, 0xb0, 0x09, 0xe8,
+ 0x24, 0x37, 0xb9, 0x21, 0x03, 0xe8, 0x28, 0xa8,
+ 0xe8, 0x63, 0xac, 0x80, 0x3e, 0xd6, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0x72, 0x53, 0xe8, 0x5d, 0x2d,
+ 0xc3, 0xbb, 0x8d, 0x53, 0xe8, 0x56, 0x2d, 0xc6,
+ 0x06, 0xd6, 0xdb, 0x02, 0xc3, 0xe8, 0xce, 0x31,
+ 0xc3, 0xb9, 0x42, 0x00, 0xb0, 0x05, 0xb4, 0x03,
+ 0xe8, 0xea, 0x36, 0xb9, 0x43, 0x00, 0xb0, 0x0b,
+ 0xe8, 0xeb, 0x36, 0xb9, 0xd0, 0x03, 0xe8, 0xef,
+ 0xa7, 0xbb, 0x55, 0x59, 0xe8, 0x2e, 0x2d, 0xc3,
+ 0xbb, 0xdb, 0x5c, 0xe8, 0x27, 0x2d, 0xc3, 0xbb,
+ 0xfd, 0x5c, 0xe8, 0x20, 0x2d, 0xc3, 0xe8, 0x1e,
+ 0xa8, 0xe8, 0xac, 0xcc, 0xc6, 0x47, 0x01, 0x00,
+ 0xe8, 0x31, 0x3b, 0xb9, 0x05, 0x00, 0xb0, 0x2a,
+ 0xb4, 0x07, 0xe8, 0xb0, 0x36, 0xc6, 0x06, 0x35,
+ 0x33, 0x14, 0xc6, 0x06, 0x36, 0x33, 0x26, 0xb8,
+ 0x02, 0x4d, 0xa3, 0x37, 0x33, 0xb8, 0x82, 0x7f,
+ 0xa3, 0x39, 0x33, 0xc6, 0x06, 0xdc, 0x64, 0x00,
+ 0xb9, 0xb9, 0x02, 0xe8, 0x01, 0xa8, 0xc6, 0x06,
+ 0xdc, 0x64, 0x01, 0xe8, 0xb6, 0xa7, 0xb0, 0x38,
+ 0xe8, 0xbd, 0xb3, 0xb0, 0x01, 0xe8, 0x65, 0xa6,
+ 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x0c, 0xb4, 0x07,
+ 0xe8, 0x72, 0x36, 0xb9, 0xc0, 0x02, 0xe8, 0x8d,
+ 0xa7, 0xb0, 0x02, 0xe8, 0x4f, 0xa6, 0xb0, 0x3a,
+ 0xe8, 0x9d, 0xb3, 0xc3, 0xbb, 0x2c, 0x5d, 0xe8,
+ 0xb3, 0x2c, 0xc3, 0x80, 0x3e, 0xc5, 0xdb, 0x01,
+ 0x74, 0x20, 0xc6, 0x06, 0xc5, 0xdb, 0x01, 0x80,
+ 0x3e, 0xc6, 0xdb, 0x00, 0x74, 0x05, 0xb8, 0xbe,
+ 0x02, 0xeb, 0x03, 0xb8, 0xbd, 0x02, 0xe8, 0x25,
+ 0x00, 0xb0, 0x01, 0xe8, 0x61, 0xa6, 0xe8, 0x23,
+ 0x37, 0xc3, 0xc6, 0x06, 0xc5, 0xdb, 0x00, 0xb8,
+ 0xbd, 0x02, 0xe8, 0x11, 0x00, 0xe8, 0xc6, 0x36,
+ 0x80, 0x3e, 0xc6, 0xdb, 0x01, 0x75, 0x06, 0xbb,
+ 0xa6, 0x4d, 0xe8, 0x70, 0x2c, 0xc3, 0x50, 0xb9,
+ 0x47, 0x00, 0xb0, 0x03, 0xb4, 0x06, 0xe8, 0x0c,
+ 0x36, 0xb9, 0xbc, 0x02, 0xe8, 0xf8, 0xa6, 0xe8,
+ 0x99, 0x37, 0x58, 0xbb, 0x47, 0x33, 0x89, 0x07,
+ 0xc3, 0xbb, 0x41, 0x5d, 0xe8, 0x4e, 0x2c, 0xc3,
+ 0x80, 0x3e, 0xc4, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0x2a, 0x4d, 0xe8, 0x40, 0x2c, 0xc3, 0xe8, 0x3e,
+ 0xa7, 0xe8, 0xcc, 0xcb, 0xc6, 0x07, 0x00, 0xe8,
+ 0x52, 0x3a, 0xb9, 0x1a, 0x00, 0xb0, 0x11, 0xb4,
+ 0x0a, 0xe8, 0xd1, 0x35, 0xb0, 0x17, 0xe8, 0xd5,
+ 0x35, 0xb0, 0x1e, 0xe8, 0xd7, 0x35, 0xb0, 0x25,
+ 0xe8, 0xe0, 0x35, 0xb0, 0x2b, 0xe8, 0xe2, 0x35,
+ 0xb9, 0x34, 0x00, 0xb0, 0x22, 0xe8, 0xcc, 0x35,
+ 0xb9, 0xba, 0x02, 0xe8, 0xa4, 0xa6, 0xe8, 0x97,
+ 0xcb, 0xc6, 0x07, 0x34, 0xc6, 0x47, 0x02, 0x3d,
+ 0xe8, 0xd5, 0x39, 0xe8, 0xce, 0xa6, 0xbb, 0xb6,
+ 0x38, 0xe8, 0x61, 0x9d, 0xb0, 0x0b, 0xe8, 0x70,
+ 0xa5, 0xc6, 0x06, 0xc4, 0xdb, 0x01, 0xc3, 0xbb,
+ 0x6e, 0x5d, 0xe8, 0xe0, 0x2b, 0xc3, 0x80, 0x3e,
+ 0xc9, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xbb, 0x4d,
+ 0xe8, 0xd2, 0x2b, 0xc3, 0xc6, 0x06, 0xc9, 0xdb,
+ 0x01, 0xbb, 0xca, 0x3a, 0xe8, 0x36, 0x9d, 0xb9,
+ 0x3d, 0x00, 0xb0, 0x05, 0xb4, 0x09, 0xe8, 0x64,
+ 0x35, 0xb9, 0x05, 0x00, 0xb0, 0x0e, 0xe8, 0x65,
+ 0x35, 0xb9, 0xc1, 0x02, 0xe8, 0x69, 0xa6, 0xbb,
+ 0xd3, 0x4d, 0xe8, 0xa8, 0x2b, 0xb0, 0x3b, 0xe8,
+ 0x86, 0xb2, 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x1d,
+ 0x00, 0xb8, 0x00, 0x01, 0xbb, 0xab, 0x00, 0xbf,
+ 0x00, 0x01, 0xbe, 0xb2, 0x00, 0xb1, 0x0b, 0xb5,
+ 0x03, 0xe8, 0x17, 0x37, 0xc3, 0xe8, 0x06, 0x30,
+ 0xc3, 0xe8, 0x83, 0xa6, 0xe8, 0x11, 0xcb, 0xc6,
+ 0x47, 0x02, 0x00, 0xe8, 0x96, 0x39, 0xb9, 0x05,
+ 0x00, 0xb0, 0x0c, 0xb4, 0x07, 0xe8, 0x15, 0x35,
+ 0xb9, 0xbb, 0x02, 0xe8, 0x29, 0xa6, 0xb0, 0x39,
+ 0xe8, 0x45, 0xb2, 0xb0, 0x0b, 0xe8, 0xed, 0xa4,
+ 0xc3, 0xc7, 0x06, 0xf3, 0xb4, 0x26, 0x00, 0xb8,
+ 0xa0, 0x00, 0xbb, 0xc7, 0x00, 0xbf, 0xa0, 0x00,
+ 0xbe, 0xbe, 0x00, 0xb1, 0x13, 0xb5, 0x01, 0xe8,
+ 0xd1, 0x36, 0xc3, 0x80, 0x3e, 0xd7, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0xcb, 0x52, 0xe8, 0x35, 0x2b,
+ 0xc3, 0x80, 0x3e, 0xd8, 0xdb, 0x01, 0x74, 0x07,
+ 0xbb, 0xfe, 0x52, 0xe8, 0x27, 0x2b, 0xc3, 0xb9,
+ 0x58, 0x00, 0xb0, 0x04, 0xb4, 0x0c, 0xe8, 0xc4,
+ 0x34, 0xb9, 0xd3, 0x03, 0xe8, 0xb0, 0xa5, 0xe8,
+ 0x51, 0x36, 0xc7, 0x06, 0xaf, 0x64, 0x33, 0x00,
+ 0xc7, 0x06, 0xb1, 0x64, 0xb7, 0x00, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x00, 0x03, 0xc7, 0x47, 0x02,
+ 0x01, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x25, 0x00,
+ 0xe8, 0xb2, 0x37, 0xc6, 0x06, 0x45, 0x33, 0xd9,
+ 0xc6, 0x06, 0x46, 0x33, 0xe5, 0xb0, 0x01, 0xb4,
+ 0x02, 0xbe, 0x00, 0x03, 0xbf, 0x01, 0x03, 0xbb,
+ 0xea, 0x54, 0xe8, 0xf1, 0x9e, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x02, 0x03, 0xc7, 0x47, 0x02, 0x03,
+ 0x03, 0xe8, 0xd0, 0x34, 0xbb, 0x23, 0x55, 0xe8,
+ 0x33, 0x9c, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x02, 0xe8, 0x61, 0x34, 0xb9, 0x38, 0x00, 0xb0,
+ 0x0c, 0xe8, 0x62, 0x34, 0xb9, 0x17, 0x00, 0xb0,
+ 0x14, 0xe8, 0x61, 0x34, 0xb9, 0x4b, 0x00, 0xb0,
+ 0x19, 0xe8, 0x60, 0x34, 0xb9, 0x04, 0x03, 0xe8,
+ 0x38, 0xa5, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x06,
+ 0x03, 0xb9, 0x05, 0x03, 0xe8, 0x2b, 0xa5, 0xe8,
+ 0xc9, 0x35, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8,
+ 0x16, 0xca, 0xc6, 0x07, 0x4a, 0xe8, 0xeb, 0x38,
+ 0xe8, 0xcd, 0x35, 0xb0, 0x01, 0xbe, 0x07, 0x03,
+ 0xbb, 0x56, 0x55, 0xe8, 0x11, 0xa0, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x08, 0x03, 0xb0, 0x01, 0xe8,
+ 0x70, 0xa4, 0xb0, 0x01, 0xb4, 0x02, 0xbe, 0x09,
+ 0x03, 0xbf, 0x0a, 0x03, 0xbb, 0xf7, 0x55, 0xe8,
+ 0x6c, 0x9e, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x0b,
+ 0x03, 0xc7, 0x47, 0x02, 0x0c, 0x03, 0xe8, 0x4b,
+ 0x34, 0xe8, 0xd8, 0x34, 0xb9, 0x3a, 0x00, 0xb0,
+ 0x01, 0xb4, 0x04, 0xe8, 0xdf, 0x33, 0xb0, 0x02,
+ 0xe8, 0xe3, 0x33, 0xb0, 0x03, 0xe8, 0xe5, 0x33,
+ 0xb0, 0x04, 0xe8, 0xe7, 0x33, 0xb0, 0x05, 0xe8,
+ 0xe9, 0x33, 0xb0, 0x06, 0xe8, 0xeb, 0x33, 0xb0,
+ 0x0a, 0xe8, 0xf4, 0x33, 0xb9, 0x02, 0x00, 0xb0,
+ 0x07, 0xe8, 0xe5, 0x33, 0xb9, 0x37, 0x00, 0xb0,
+ 0x0b, 0xe8, 0xeb, 0x33, 0xb9, 0x36, 0x00, 0xb0,
+ 0x0f, 0xb4, 0x0a, 0xe8, 0xe8, 0x33, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x04, 0x0d, 0x03, 0xc7, 0x47,
+ 0x06, 0x0e, 0x03, 0xb0, 0x03, 0xe8, 0xfa, 0xa3,
+ 0xe8, 0x7d, 0xc9, 0xc6, 0x47, 0x01, 0x4b, 0xc6,
+ 0x47, 0x02, 0x4c, 0xe8, 0x4d, 0x38, 0xe8, 0x2f,
+ 0x35, 0xb9, 0x3a, 0x00, 0xb0, 0x01, 0xb4, 0x04,
+ 0xe8, 0x7a, 0x33, 0xb0, 0x02, 0xe8, 0x7e, 0x33,
+ 0xb0, 0x03, 0xe8, 0x80, 0x33, 0xb0, 0x04, 0xe8,
+ 0x82, 0x33, 0xb0, 0x05, 0xe8, 0x84, 0x33, 0xb0,
+ 0x06, 0xe8, 0x86, 0x33, 0xb0, 0x09, 0xe8, 0x8f,
+ 0x33, 0xb9, 0x02, 0x00, 0xb0, 0x07, 0xe8, 0x80,
+ 0x33, 0xb0, 0x0f, 0xb4, 0x07, 0xe8, 0x8e, 0x33,
+ 0xb9, 0x37, 0x00, 0xb0, 0x0a, 0xe8, 0x7f, 0x33,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x04, 0x0f, 0x03,
+ 0xc7, 0x47, 0x06, 0x10, 0x03, 0xb0, 0x03, 0xe8,
+ 0x98, 0xa3, 0xe8, 0x1b, 0xc9, 0xc6, 0x47, 0x01,
+ 0x4d, 0xc6, 0x47, 0x02, 0x4e, 0xe8, 0xeb, 0x37,
+ 0xe8, 0xcd, 0x34, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x04, 0x11, 0x03, 0xc7, 0x47, 0x06, 0x12, 0x03,
+ 0xb0, 0x03, 0xe8, 0x75, 0xa3, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0xff, 0xff, 0xe8, 0xa7, 0x33, 0xc7,
+ 0x06, 0xaf, 0x64, 0x70, 0x00, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x02, 0xe8, 0xe3, 0xc8, 0xc6, 0x47, 0x03,
+ 0x4f, 0xc6, 0x07, 0x00, 0xe8, 0xb4, 0x37, 0xe8,
+ 0x96, 0x34, 0xe8, 0x5f, 0x37, 0xc7, 0x06, 0x30,
+ 0x32, 0x96, 0x97, 0xc7, 0x06, 0x2e, 0x32, 0x2a,
+ 0x00, 0xc7, 0x06, 0x2c, 0x32, 0x3e, 0x00, 0xe8,
+ 0x4c, 0xb1, 0xe8, 0x93, 0x31, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x04, 0x13, 0x03, 0xc7, 0x47, 0x06,
+ 0x14, 0x03, 0xb0, 0x03, 0xe8, 0x23, 0xa3, 0xbb,
+ 0x47, 0x33, 0xc7, 0x47, 0x02, 0xff, 0xff, 0xe8,
+ 0x54, 0x33, 0xb9, 0x20, 0x00, 0xb0, 0x02, 0xb4,
+ 0x0c, 0xe8, 0xa9, 0x32, 0xb9, 0x18, 0x00, 0xb0,
+ 0x07, 0xe8, 0xaa, 0x32, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x15, 0x03, 0xc7, 0x47, 0x06, 0x16, 0x03,
+ 0xb0, 0x01, 0xe8, 0xf5, 0xa2, 0xbb, 0x47, 0x33,
+ 0xe8, 0x2b, 0x33, 0xe8, 0x72, 0xc8, 0xc6, 0x07,
+ 0x50, 0xe8, 0x47, 0x37, 0xe8, 0x29, 0x34, 0xe8,
+ 0xe2, 0xa1, 0xbb, 0x65, 0x56, 0xe8, 0x3d, 0x9a,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x06, 0x18, 0x03,
+ 0xe8, 0xc9, 0x32, 0xe8, 0x56, 0x33, 0xbe, 0x28,
+ 0x00, 0xbf, 0xab, 0x00, 0xc6, 0x06, 0xc3, 0x64,
+ 0x04, 0xe8, 0x87, 0xbe, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x23, 0x00, 0xe8, 0x3b, 0xc8, 0xc6, 0x47, 0x03,
+ 0x51, 0xb0, 0x0c, 0xe8, 0x23, 0xa2, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x1f, 0x00, 0xb8, 0x2a, 0x01, 0xbb,
+ 0xb1, 0x00, 0xbf, 0x16, 0x01, 0xbe, 0xb1, 0x00,
+ 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0x14, 0x34, 0xc6,
+ 0x06, 0xd9, 0xdb, 0x01, 0xc3, 0xb9, 0x59, 0x00,
+ 0xb0, 0x06, 0xb4, 0x02, 0xe8, 0x1e, 0x32, 0xb9,
+ 0xd2, 0x03, 0xe8, 0x1a, 0xa3, 0xe8, 0xab, 0x33,
+ 0xc7, 0x06, 0xf3, 0xb4, 0x1f, 0x00, 0xb8, 0x2a,
+ 0x01, 0xbb, 0xb1, 0x00, 0xbf, 0x16, 0x01, 0xbe,
+ 0xb1, 0x00, 0xb1, 0x01, 0xb5, 0x04, 0xe8, 0xe2,
+ 0x33, 0xc3, 0x80, 0x3e, 0xd7, 0xdb, 0x01, 0x74,
+ 0x07, 0xbb, 0xcb, 0x52, 0xe8, 0x46, 0x28, 0xc3,
+ 0x80, 0x3e, 0xd8, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0xf6, 0x52, 0xe8, 0x38, 0x28, 0xc3, 0xb9, 0x47,
+ 0x00, 0xb0, 0x04, 0xb4, 0x0c, 0xe8, 0xd5, 0x31,
+ 0xb9, 0x1c, 0x03, 0xe8, 0xe2, 0xa2, 0xb8, 0x01,
+ 0x00, 0xe8, 0x45, 0xb6, 0xe8, 0x59, 0xb6, 0xc6,
+ 0x06, 0xd8, 0xdb, 0x01, 0xc3, 0xe8, 0x98, 0xa0,
+ 0xbb, 0x36, 0xdb, 0xe8, 0x67, 0x99, 0xe8, 0x7c,
+ 0x99, 0xc3, 0xbb, 0x87, 0x5d, 0xe8, 0x05, 0x28,
+ 0xc3, 0xbb, 0x11, 0x55, 0xe8, 0xfe, 0x27, 0xc3,
+ 0xbb, 0x11, 0x55, 0xe8, 0xf7, 0x27, 0xc3, 0xbb,
+ 0x0f, 0x57, 0xe8, 0xf0, 0x27, 0xc3, 0x80, 0x3e,
+ 0xdd, 0xdb, 0x03, 0x75, 0x07, 0xbb, 0xff, 0x55,
+ 0xe8, 0xe2, 0x27, 0xc3, 0xe8, 0xc1, 0x27, 0xc3,
+ 0xfe, 0x06, 0xdb, 0xdb, 0xa0, 0xdb, 0xdb, 0xbb,
+ 0x11, 0x54, 0x3c, 0x01, 0x74, 0x1f, 0xbb, 0x63,
+ 0x54, 0x3c, 0x02, 0x74, 0x18, 0xbb, 0x75, 0x54,
+ 0x3c, 0x03, 0x74, 0x11, 0xbb, 0x84, 0x54, 0x3c,
+ 0x04, 0x74, 0x0a, 0xbb, 0xc4, 0x54, 0x3c, 0x05,
+ 0x74, 0x03, 0xbb, 0xd5, 0x54, 0xe8, 0xad, 0x27,
+ 0xc3, 0x80, 0x3e, 0xe6, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x27, 0x58, 0xe8, 0x9f, 0x27, 0xc3, 0xe8,
+ 0x7e, 0x27, 0xc3, 0x80, 0x3e, 0xe8, 0xdb, 0x01,
+ 0x74, 0x04, 0xe8, 0x73, 0x27, 0xc3, 0xbb, 0xb0,
+ 0x58, 0xe8, 0x89, 0x27, 0xc3, 0xc3, 0x80, 0x3e,
+ 0xa1, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x94, 0x36,
+ 0xe8, 0x7a, 0x27, 0xc3, 0xe8, 0x59, 0x27, 0xc3,
+ 0xe8, 0xe2, 0xd7, 0xe8, 0x52, 0x27, 0xc3, 0xe8,
+ 0x94, 0xdc, 0xe8, 0x4b, 0x27, 0xc3, 0xe8, 0x8d,
+ 0xdc, 0xe8, 0x44, 0x27, 0xc3, 0x80, 0x3e, 0x95,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0x75, 0x3e, 0xe8,
+ 0x53, 0x27, 0xc3, 0xe8, 0x32, 0x27, 0xc3, 0x80,
+ 0x3e, 0x94, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0x4f,
+ 0x3e, 0xe8, 0x41, 0x27, 0xc3, 0xe8, 0x20, 0x27,
+ 0xc3, 0x80, 0x3e, 0xa5, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x98, 0x3e, 0xe8, 0x2f, 0x27, 0xc3, 0xe8,
+ 0x0e, 0x27, 0xc3, 0xbe, 0xf5, 0x00, 0xbf, 0xc6,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8, 0xf2,
+ 0xbc, 0x80, 0x3e, 0xaf, 0xdb, 0x01, 0x74, 0x0c,
+ 0xbb, 0x93, 0x21, 0xe8, 0x7f, 0x98, 0xc6, 0x06,
+ 0xaf, 0xdb, 0x01, 0xc3, 0xe8, 0xe9, 0x26, 0xc3,
+ 0x80, 0x3e, 0xb1, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0xaf, 0x3d, 0xe8, 0xf8, 0x26, 0xc3, 0xe8, 0xd7,
+ 0x26, 0xc3, 0xe8, 0x50, 0xe7, 0xc3, 0x80, 0x3e,
+ 0xa4, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x45, 0xe7,
+ 0xc3, 0xe8, 0xc4, 0x26, 0xc3, 0x80, 0x3e, 0xa4,
+ 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x32, 0x38, 0xe8,
+ 0xd3, 0x26, 0xc3, 0xe8, 0xb2, 0x26, 0xc3, 0x80,
+ 0x3e, 0xa4, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x6d,
+ 0xe8, 0xc3, 0xe8, 0xa3, 0x26, 0xc3, 0x80, 0x3e,
+ 0xa4, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x5e, 0xe8,
+ 0xc3, 0xe8, 0x94, 0x26, 0xc3, 0x80, 0x3e, 0xa4,
+ 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x4f, 0xe8, 0xc3,
+ 0xe8, 0x85, 0x26, 0xc3, 0x80, 0x3e, 0xa4, 0xdb,
+ 0x01, 0x74, 0x04, 0xe8, 0x40, 0xe8, 0xc3, 0xe8,
+ 0x76, 0x26, 0xc3, 0x80, 0x3e, 0xa4, 0xdb, 0x01,
+ 0x74, 0x04, 0xe8, 0x31, 0xe8, 0xc3, 0xe8, 0x67,
+ 0x26, 0xc3, 0x80, 0x3e, 0x9d, 0xdb, 0x01, 0x75,
+ 0x07, 0xbb, 0x90, 0x35, 0xe8, 0x76, 0x26, 0xc3,
+ 0xe8, 0x55, 0x26, 0xc3, 0xe8, 0x62, 0xee, 0xe8,
+ 0x4e, 0x26, 0xc3, 0xa0, 0xc1, 0xdb, 0x98, 0x48,
+ 0xd1, 0xe0, 0xbb, 0x3c, 0x5f, 0x03, 0xd8, 0x8b,
+ 0x1f, 0xe8, 0x59, 0x26, 0xc3, 0x80, 0x3e, 0xb7,
+ 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x31, 0x26, 0xc3,
+ 0xbb, 0x6c, 0x4b, 0xe8, 0x47, 0x26, 0xc3, 0x80,
+ 0x3e, 0xb8, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x1f,
+ 0x26, 0xc3, 0x80, 0x3e, 0xbf, 0xdb, 0x01, 0x74,
+ 0x21, 0xbb, 0x32, 0x4c, 0xe8, 0x2e, 0x26, 0xb9,
+ 0x05, 0x00, 0xb0, 0x0b, 0xb4, 0x07, 0xe8, 0xcc,
+ 0x2f, 0xb9, 0xb2, 0x02, 0xe8, 0xd9, 0xa0, 0xb0,
+ 0x35, 0xe8, 0xfc, 0xac, 0xc6, 0x06, 0xbf, 0xdb,
+ 0x01, 0xc3, 0xbb, 0x87, 0x4b, 0xe8, 0x0d, 0x26,
+ 0xc3, 0x80, 0x3e, 0xb9, 0xdb, 0x01, 0x74, 0x04,
+ 0xe8, 0xe5, 0x25, 0xc3, 0xbb, 0xa1, 0x4b, 0xe8,
+ 0xfb, 0x25, 0xc3, 0x80, 0x3e, 0xba, 0xdb, 0x01,
+ 0x74, 0x04, 0xe8, 0xd3, 0x25, 0xc3, 0xbb, 0xbc,
+ 0x4b, 0xe8, 0xe9, 0x25, 0xc3, 0x80, 0x3e, 0xbb,
+ 0xdb, 0x01, 0x74, 0x04, 0xe8, 0xc1, 0x25, 0xc3,
+ 0xbb, 0xd8, 0x4b, 0xe8, 0xd7, 0x25, 0xc3, 0x80,
+ 0x3e, 0xbc, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0xaf,
+ 0x25, 0xc3, 0x80, 0x3e, 0xbe, 0xdb, 0x01, 0x74,
+ 0x21, 0xbb, 0x0f, 0x4c, 0xe8, 0xbe, 0x25, 0xb9,
+ 0x05, 0x00, 0xb0, 0x0c, 0xb4, 0x07, 0xe8, 0x5c,
+ 0x2f, 0xb9, 0xb1, 0x02, 0xe8, 0x69, 0xa0, 0xb0,
+ 0x34, 0xe8, 0x8c, 0xac, 0xc6, 0x06, 0xbe, 0xdb,
+ 0x01, 0xc3, 0xbb, 0xf4, 0x4b, 0xe8, 0x9d, 0x25,
+ 0xc3, 0x80, 0x3e, 0xb6, 0xdb, 0x01, 0x74, 0x0c,
+ 0xbb, 0xd0, 0x37, 0xe8, 0xff, 0x96, 0xc6, 0x06,
+ 0xb6, 0xdb, 0x01, 0xc3, 0xe8, 0x69, 0x25, 0xc3,
+ 0xe8, 0x0d, 0xf6, 0xe8, 0x62, 0x25, 0xc3, 0xe8,
+ 0x06, 0xf6, 0xe8, 0x5b, 0x25, 0xc3, 0x80, 0x3e,
+ 0xcd, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x50, 0x25,
+ 0xc3, 0xbb, 0x69, 0x4f, 0xe8, 0x66, 0x25, 0xc3,
+ 0xe8, 0xed, 0xf5, 0xe8, 0x42, 0x25, 0xc3, 0x80,
+ 0x3e, 0xd0, 0xdb, 0x01, 0x74, 0x04, 0xe8, 0x37,
+ 0x25, 0xc3, 0xbb, 0x82, 0x50, 0xe8, 0x4d, 0x25,
+ 0xc3, 0xa0, 0xd6, 0xdb, 0x3c, 0x01, 0x74, 0x08,
+ 0x3c, 0x02, 0x74, 0x0b, 0xe8, 0x21, 0x25, 0xc3,
+ 0xbb, 0xf8, 0x51, 0xe8, 0x37, 0x25, 0xc3, 0xbb,
+ 0x8d, 0x53, 0xe8, 0x30, 0x25, 0xc3, 0xe8, 0x2e,
+ 0xa0, 0xe8, 0xbc, 0xc4, 0xc6, 0x07, 0x00, 0xe8,
+ 0x42, 0x33, 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4,
+ 0x0c, 0xe8, 0xc1, 0x2e, 0xb9, 0x33, 0x00, 0xb0,
+ 0x0b, 0xe8, 0xc2, 0x2e, 0xb0, 0x17, 0xe8, 0xc4,
+ 0x2e, 0xb9, 0x45, 0x03, 0xe8, 0xa3, 0x9f, 0xb9,
+ 0x33, 0x00, 0xb0, 0x03, 0xb4, 0x0d, 0xe8, 0xa4,
+ 0x2e, 0xb0, 0x13, 0xe8, 0xa8, 0x2e, 0xb9, 0x17,
+ 0x00, 0xb0, 0x1a, 0xe8, 0xa7, 0x2e, 0xb9, 0x46,
+ 0x03, 0xe8, 0x86, 0x9f, 0xe8, 0x79, 0xc4, 0xc6,
+ 0x07, 0x60, 0xe8, 0xbb, 0x32, 0xc7, 0x06, 0xaf,
+ 0x64, 0x19, 0x01, 0xe8, 0xae, 0x9f, 0xb0, 0x04,
+ 0xe8, 0x62, 0x9e, 0xc6, 0x06, 0xe1, 0xdb, 0x01,
+ 0xc3, 0x80, 0x3e, 0xe1, 0xdb, 0x01, 0x74, 0x07,
+ 0xbb, 0xda, 0x56, 0xe8, 0xbf, 0x24, 0xc3, 0xb9,
+ 0x4c, 0x03, 0xe8, 0x52, 0x9f, 0xe8, 0x48, 0xc4,
+ 0xc6, 0x47, 0x01, 0x00, 0x53, 0xe8, 0x88, 0x32,
+ 0xb9, 0x05, 0x00, 0xb0, 0x05, 0xb4, 0x0a, 0xe8,
+ 0x4b, 0x2e, 0xb9, 0x1a, 0x00, 0xb0, 0x13, 0xe8,
+ 0x4c, 0x2e, 0xb9, 0x18, 0x00, 0xb0, 0x19, 0xe8,
+ 0x4b, 0x2e, 0xb9, 0x4f, 0x03, 0xe8, 0x2a, 0x9f,
+ 0xb9, 0x05, 0x00, 0xb0, 0x0b, 0xb4, 0x09, 0xe8,
+ 0x2b, 0x2e, 0xb9, 0x50, 0x03, 0xe8, 0x1a, 0x9f,
+ 0x5b, 0xc6, 0x47, 0x01, 0x64, 0xe8, 0x50, 0x32,
+ 0xb9, 0x4d, 0x03, 0xe8, 0x31, 0x9f, 0xb0, 0x03,
+ 0xe8, 0xfa, 0x9d, 0xb0, 0x52, 0xe8, 0x48, 0xab,
+ 0xb0, 0x51, 0xe8, 0x53, 0xab, 0xc3, 0xbb, 0x54,
+ 0x5e, 0xe8, 0x59, 0x24, 0xc3, 0xb9, 0x4c, 0x00,
+ 0xb0, 0x12, 0xb4, 0x08, 0xe8, 0xf6, 0x2d, 0xb0,
+ 0x16, 0xe8, 0xfa, 0x2d, 0xb0, 0x1a, 0xe8, 0xfc,
+ 0x2d, 0xb0, 0x1e, 0xe8, 0xfe, 0x2d, 0xb0, 0x22,
+ 0xe8, 0x00, 0x2e, 0xb0, 0x2f, 0xe8, 0x02, 0x2e,
+ 0xb0, 0x33, 0xe8, 0x04, 0x2e, 0xb0, 0x37, 0xe8,
+ 0x06, 0x2e, 0xb0, 0x3b, 0xe8, 0x08, 0x2e, 0xb0,
+ 0x3f, 0xe8, 0x0a, 0x2e, 0xb9, 0x69, 0x03, 0xe8,
+ 0xd6, 0x9e, 0xbe, 0xf0, 0x00, 0xbf, 0xa3, 0x00,
+ 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8, 0xe3, 0xb9,
+ 0xbb, 0x37, 0x58, 0xe8, 0x07, 0x24, 0xb4, 0x01,
+ 0xb0, 0x22, 0xe8, 0xb9, 0xa2, 0xb9, 0x4d, 0x00,
+ 0xb0, 0x02, 0xb4, 0x08, 0xe8, 0x9e, 0x2d, 0xb0,
+ 0x0c, 0xe8, 0xa2, 0x2d, 0xb0, 0x10, 0xe8, 0xa4,
+ 0x2d, 0xb0, 0x14, 0xe8, 0xa6, 0x2d, 0xb0, 0x22,
+ 0xe8, 0xa8, 0x2d, 0xb9, 0x4e, 0x00, 0xb0, 0x29,
+ 0xe8, 0xa7, 0x2d, 0xb0, 0x33, 0xe8, 0xa9, 0x2d,
+ 0xb9, 0x38, 0x00, 0xb0, 0x3f, 0xe8, 0xa8, 0x2d,
+ 0xb9, 0x18, 0x00, 0xb0, 0x43, 0xe8, 0xa7, 0x2d,
+ 0xb9, 0x17, 0x00, 0xb0, 0x4c, 0xe8, 0xa6, 0x2d,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x6a, 0x03, 0xb0,
+ 0x01, 0xe8, 0x7c, 0x9d, 0xe8, 0x45, 0x2e, 0xe8,
+ 0x3e, 0xc3, 0xc6, 0x07, 0x68, 0xe8, 0xc4, 0x31,
+ 0xb8, 0x01, 0x00, 0xe8, 0xc3, 0xb1, 0xe8, 0xd7,
+ 0xb1, 0xb0, 0x5b, 0xe8, 0x8a, 0xaa, 0xb0, 0x06,
+ 0xe8, 0x16, 0x9d, 0xb0, 0x01, 0xe8, 0x1d, 0x9d,
+ 0xc3, 0xbb, 0xbe, 0x5e, 0xe8, 0x86, 0x23, 0xc3,
+ 0xbb, 0xbe, 0x5e, 0xe8, 0x7f, 0x23, 0xc3, 0xbb,
+ 0xe6, 0x5e, 0xe8, 0x78, 0x23, 0xc3, 0xbb, 0x11,
+ 0x5f, 0xe8, 0x71, 0x23, 0xc3, 0xb9, 0x05, 0x00,
+ 0xb0, 0x02, 0xb4, 0x07, 0xe8, 0x0e, 0x2d, 0xb9,
+ 0x13, 0x00, 0xb0, 0x0b, 0xe8, 0x0f, 0x2d, 0xb9,
+ 0x48, 0x03, 0xe8, 0x02, 0x9e, 0xe8, 0xe8, 0xc2,
+ 0xc6, 0x47, 0x01, 0x61, 0xe8, 0x29, 0x31, 0xe8,
+ 0x22, 0x9e, 0xb0, 0x50, 0xe8, 0x39, 0xaa, 0xb0,
+ 0x02, 0xe8, 0xd1, 0x9c, 0xb0, 0x07, 0xe8, 0xc0,
+ 0x9c, 0xc3, 0x80, 0x3e, 0xdf, 0xdb, 0x01, 0x76,
+ 0x07, 0xbb, 0xf6, 0x52, 0xe8, 0x2e, 0x23, 0xc3,
+ 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x0c, 0xe8,
+ 0xcb, 0x2c, 0xb9, 0x39, 0x00, 0xb0, 0x0c, 0xe8,
+ 0xcc, 0x2c, 0xb9, 0x46, 0x00, 0xb0, 0x13, 0xe8,
+ 0xcb, 0x2c, 0xb9, 0x3c, 0x03, 0xe8, 0xa7, 0x9d,
+ 0xe8, 0x48, 0x2e, 0xc7, 0x06, 0xaf, 0x64, 0x06,
+ 0x01, 0xc7, 0x06, 0xb1, 0x64, 0xa0, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xcd, 0x64,
+ 0x00, 0xc6, 0x06, 0xcb, 0x64, 0x01, 0xe8, 0x10,
+ 0xc1, 0xb0, 0x04, 0xe8, 0x77, 0x9c, 0xb0, 0x03,
+ 0xe8, 0x72, 0x9c, 0xe8, 0x72, 0xc2, 0xc6, 0x07,
+ 0x00, 0xc6, 0x47, 0x02, 0x00, 0xc6, 0x47, 0x03,
+ 0x00, 0xc6, 0x47, 0x01, 0x55, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x3d, 0x03, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x05, 0x00, 0xe8, 0x53, 0xc2, 0xc6, 0x07, 0x5c,
+ 0xe8, 0x7a, 0x2f, 0xe8, 0x4a, 0xc2, 0xc6, 0x07,
+ 0x00, 0xb8, 0xc8, 0x00, 0xe8, 0x93, 0xa1, 0xc6,
+ 0x06, 0x45, 0x33, 0xd0, 0xb0, 0x01, 0xbe, 0x3e,
+ 0x03, 0xbb, 0xa5, 0x63, 0xe8, 0x40, 0x98, 0xb9,
+ 0x04, 0x00, 0xe8, 0x8e, 0x33, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x3f, 0x03, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x07, 0x00, 0xe8, 0x3f, 0x2f, 0xc7, 0x06, 0xaf,
+ 0x64, 0x82, 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xc3,
+ 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x95,
+ 0xaa, 0xe8, 0x71, 0xa1, 0xe8, 0x92, 0x99, 0xbb,
+ 0x06, 0x64, 0xe8, 0xd8, 0x93, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x3f, 0x03, 0xb0, 0x01, 0xe8, 0x2e,
+ 0x9c, 0xe8, 0xf0, 0x2c, 0xc6, 0x06, 0xdf, 0xdb,
+ 0x02, 0xc3, 0x80, 0x3e, 0xe0, 0xdb, 0x01, 0x75,
+ 0x07, 0xbb, 0x32, 0x56, 0xe8, 0x46, 0x22, 0xc3,
+ 0xb9, 0x05, 0x00, 0xb0, 0x06, 0xb4, 0x05, 0xe8,
+ 0xe3, 0x2b, 0xb9, 0x1b, 0x00, 0xb0, 0x31, 0xe8,
+ 0xe4, 0x2b, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x43,
+ 0x03, 0xb9, 0x42, 0x03, 0xe8, 0xc0, 0x9c, 0xe8,
+ 0xb6, 0xc1, 0xc6, 0x07, 0x5e, 0xe8, 0xf8, 0x2f,
+ 0xe8, 0xf1, 0x9c, 0xe8, 0x3b, 0x99, 0xbb, 0xe9,
+ 0x65, 0xe8, 0x81, 0x93, 0xb0, 0x0c, 0xe8, 0x90,
+ 0x9b, 0xc6, 0x06, 0xe0, 0xdb, 0x01, 0xc3, 0xe8,
+ 0x32, 0x99, 0xbb, 0xc0, 0x66, 0xe8, 0x6d, 0x93,
+ 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x03, 0xe8,
+ 0x9b, 0x2b, 0xb9, 0x54, 0x03, 0xe8, 0x8a, 0x9c,
+ 0xe8, 0x28, 0x2d, 0xc6, 0x06, 0xdc, 0x1c, 0x01,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x55, 0x03, 0xb0,
+ 0x01, 0xe8, 0xab, 0x9b, 0xe8, 0x6d, 0x2c, 0xa0,
+ 0xac, 0x64, 0x50, 0xc6, 0x06, 0xac, 0x64, 0x04,
+ 0xe8, 0x10, 0x8d, 0xbb, 0x42, 0x57, 0xbe, 0x13,
+ 0x8c, 0xe8, 0x6a, 0x24, 0xbb, 0x57, 0x57, 0xbe,
+ 0x12, 0x8c, 0xe8, 0x61, 0x24, 0xbb, 0x70, 0x57,
+ 0xbe, 0x1d, 0x8c, 0xe8, 0x58, 0x24, 0xbb, 0x82,
+ 0x57, 0xbe, 0x0f, 0x8c, 0xe8, 0x4f, 0x24, 0xbb,
+ 0x99, 0x57, 0xbe, 0x07, 0x8c, 0xe8, 0x46, 0x24,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x58, 0x03, 0xb0,
+ 0x01, 0xe8, 0x63, 0x9b, 0xb9, 0x05, 0x00, 0xb0,
+ 0x03, 0xb4, 0x03, 0xe8, 0x2f, 0x2b, 0xb9, 0x56,
+ 0x03, 0xe8, 0x1e, 0x9c, 0xe8, 0xbc, 0x2c, 0x58,
+ 0xa2, 0xac, 0x64, 0xe8, 0xbd, 0x8c, 0xe8, 0xa3,
+ 0x98, 0xbb, 0xfe, 0x66, 0xe8, 0xde, 0x92, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x57, 0x03, 0xb0, 0x01,
+ 0xe8, 0x34, 0x9b, 0xb8, 0xc8, 0x00, 0xe8, 0x41,
+ 0xa0, 0xbe, 0x1e, 0x00, 0xbf, 0xb5, 0x00, 0xe8,
+ 0x29, 0xb7, 0xe8, 0x99, 0x2b, 0xb0, 0x01, 0xe8,
+ 0xdb, 0x9a, 0xb8, 0x01, 0x00, 0xe8, 0x69, 0xaf,
+ 0xc6, 0x06, 0xdf, 0xdb, 0x03, 0xc6, 0x06, 0xf0,
+ 0xdb, 0x01, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8,
+ 0x79, 0xc4, 0xc3, 0x80, 0x3e, 0xdf, 0xdb, 0x03,
+ 0x74, 0x07, 0xbb, 0xe2, 0x5d, 0xe8, 0x25, 0x21,
+ 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x09,
+ 0xe8, 0xc2, 0x2a, 0xb9, 0x3a, 0x00, 0xb0, 0x0b,
+ 0xe8, 0xc3, 0x2a, 0xb9, 0x2e, 0x00, 0xb0, 0x38,
+ 0xe8, 0xc2, 0x2a, 0xb0, 0x55, 0xe8, 0xc4, 0x2a,
+ 0xb0, 0x75, 0xe8, 0xc6, 0x2a, 0xb9, 0x66, 0x03,
+ 0xe8, 0x94, 0x9b, 0xb9, 0x36, 0x00, 0xb0, 0x0f,
+ 0xb4, 0x09, 0xe8, 0x98, 0x2a, 0xb9, 0x67, 0x03,
+ 0xe8, 0x87, 0x9b, 0xe8, 0x25, 0x2c, 0xc6, 0x06,
+ 0xe6, 0xdb, 0x01, 0xe8, 0x72, 0xc0, 0xc6, 0x47,
+ 0x01, 0x66, 0xe8, 0xf7, 0x2e, 0xb8, 0x32, 0x00,
+ 0xe8, 0xd9, 0x9f, 0xc7, 0x06, 0xaf, 0x64, 0xe0,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xc2, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x00, 0xc6, 0x06, 0xdc, 0x64,
+ 0x01, 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xe8, 0xd8,
+ 0xbe, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xe8, 0xcd,
+ 0xa8, 0xbe, 0xd7, 0x76, 0xbb, 0xdf, 0x57, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x5e, 0x1c, 0xb0,
+ 0x59, 0xe8, 0x8c, 0xa7, 0xc3, 0xb9, 0x05, 0x00,
+ 0xb0, 0x03, 0xb4, 0x06, 0xe8, 0x36, 0x2a, 0xb9,
+ 0x6c, 0x03, 0xe8, 0x32, 0x9b, 0xe8, 0xc3, 0x2b,
+ 0xe8, 0x15, 0xc0, 0xc6, 0x47, 0x01, 0x00, 0xe8,
+ 0x9a, 0x2e, 0xb9, 0x1a, 0x00, 0xb0, 0x07, 0xb4,
+ 0x04, 0xe8, 0x19, 0x2a, 0xb9, 0x4f, 0x00, 0xb0,
+ 0x0f, 0xe8, 0x1a, 0x2a, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0x6d, 0x03, 0xb0, 0x02, 0xe8, 0x27,
+ 0x9a, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x70,
+ 0x03, 0xb0, 0x02, 0xe8, 0x21, 0x9a, 0xe8, 0xe3,
+ 0x2a, 0xe8, 0x04, 0x97, 0xbb, 0x0e, 0x6f, 0xe8,
+ 0xb3, 0x91, 0xe8, 0xd3, 0xbf, 0xc6, 0x47, 0x02,
+ 0x6a, 0xe8, 0x58, 0x2e, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x6e, 0x03, 0xb0, 0x01, 0xe8, 0xf8, 0x99,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x6f, 0x03, 0xb0,
+ 0x01, 0xe8, 0xf3, 0x99, 0xe8, 0xb5, 0x2a, 0xb0,
+ 0x5c, 0xe8, 0x0c, 0xa7, 0xb0, 0x01, 0xe8, 0x98,
+ 0x99, 0xc6, 0x06, 0xe7, 0xdb, 0x01, 0xc3, 0xb9,
+ 0x20, 0x00, 0xb0, 0x05, 0xb4, 0x0a, 0xe8, 0xac,
+ 0x29, 0xb9, 0x05, 0x00, 0xb0, 0x11, 0xe8, 0xad,
+ 0x29, 0xb9, 0x34, 0x00, 0xb0, 0x17, 0xe8, 0xac,
+ 0x29, 0xb9, 0x71, 0x03, 0xe8, 0x88, 0x9a, 0xe8,
+ 0x7e, 0xbf, 0xc6, 0x47, 0x02, 0x6b, 0xe8, 0xbf,
+ 0x2d, 0xe8, 0xb8, 0x9a, 0xb0, 0x56, 0xe8, 0xcf,
+ 0xa6, 0xb0, 0x55, 0xe8, 0xba, 0xa6, 0xc6, 0x06,
+ 0xe8, 0xdb, 0x01, 0xc3, 0xbb, 0x8f, 0x5e, 0xe8,
+ 0xcb, 0x1f, 0xc3, 0x80, 0x3e, 0xda, 0xdb, 0x01,
+ 0x75, 0x07, 0xbb, 0xf2, 0x53, 0xe8, 0xbd, 0x1f,
+ 0xc3, 0xbb, 0xdd, 0x53, 0xe8, 0xb6, 0x1f, 0xb9,
+ 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x07, 0xe8, 0x54,
+ 0x29, 0xb0, 0x12, 0xe8, 0x58, 0x29, 0xb9, 0x2a,
+ 0x03, 0xe8, 0x5c, 0x9a, 0xe8, 0xe3, 0x96, 0xbb,
+ 0xbf, 0x60, 0xe8, 0x08, 0x91, 0xc6, 0x06, 0xda,
+ 0xdb, 0x01, 0xc3, 0xe8, 0xd4, 0x96, 0xbb, 0x11,
+ 0x68, 0xe8, 0xf9, 0x90, 0xb9, 0x05, 0x00, 0xb0,
+ 0x03, 0xb4, 0x05, 0xe8, 0x27, 0x29, 0xb0, 0x1e,
+ 0xe8, 0x32, 0x29, 0xb9, 0x1a, 0x00, 0xb0, 0x0e,
+ 0xe8, 0x23, 0x29, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x53, 0x03, 0xb9, 0x51, 0x03, 0xe8, 0x02, 0x9a,
+ 0xe8, 0xa0, 0x2a, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x52, 0x03, 0xb0, 0x01, 0xe8, 0x28, 0x99, 0xe8,
+ 0xea, 0x29, 0xb0, 0x53, 0xe8, 0x31, 0xa6, 0xb0,
+ 0x52, 0xe8, 0x3c, 0xa6, 0xb0, 0x01, 0xe8, 0xc8,
+ 0x98, 0xc6, 0x06, 0xe2, 0xdb, 0x01, 0xc3, 0xe8,
+ 0x0c, 0x97, 0xbb, 0x41, 0x0a, 0xe8, 0xa5, 0x90,
+ 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x0a, 0xe8,
+ 0xd3, 0x28, 0xb0, 0x2c, 0xe8, 0xd7, 0x28, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x82, 0x02, 0xb9, 0x81,
+ 0x02, 0xe8, 0xd4, 0x99, 0xe8, 0xe7, 0x96, 0xbb,
+ 0xff, 0x0a, 0xe8, 0x80, 0x90, 0xb8, 0xaa, 0x00,
+ 0xe8, 0xef, 0x9d, 0xe8, 0xd8, 0x96, 0xbb, 0xa0,
+ 0x0b, 0xe8, 0x71, 0x90, 0x8b, 0x36, 0xaf, 0x64,
+ 0xbb, 0xb1, 0x64, 0x8b, 0x3f, 0xff, 0x0f, 0xe8,
+ 0xc9, 0xb4, 0xe8, 0xf0, 0x9d, 0xbb, 0x10, 0x0c,
+ 0xe8, 0x5a, 0x90, 0xb0, 0x32, 0xe8, 0xd8, 0xa5,
+ 0xe8, 0xd2, 0x1b, 0xc3, 0xe8, 0xe0, 0x99, 0xe8,
+ 0x6e, 0xbe, 0xc6, 0x07, 0x00, 0x53, 0xe8, 0xf3,
+ 0x2c, 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x09,
+ 0xe8, 0x72, 0x28, 0xb0, 0x05, 0xe8, 0x76, 0x28,
+ 0xb0, 0x09, 0xe8, 0x78, 0x28, 0xb9, 0x0e, 0x00,
+ 0xb0, 0x13, 0xe8, 0x77, 0x28, 0xb9, 0x05, 0x00,
+ 0xb0, 0x32, 0xe8, 0x76, 0x28, 0xb9, 0x1e, 0x02,
+ 0xe8, 0x47, 0x99, 0x5b, 0xb0, 0x0f, 0x88, 0x47,
+ 0x01, 0xe8, 0x6d, 0x2d, 0xb0, 0x03, 0xe8, 0x2c,
+ 0x98, 0xb0, 0x09, 0xe8, 0x1b, 0x98, 0xe8, 0x6b,
+ 0x99, 0xc3, 0xb9, 0x38, 0x00, 0xb0, 0x0b, 0xb4,
+ 0x08, 0xe8, 0x31, 0x28, 0xb9, 0x24, 0x00, 0xb0,
+ 0x0d, 0xb4, 0x0c, 0xe8, 0x30, 0x28, 0xb9, 0x30,
+ 0x00, 0xb0, 0x16, 0xb4, 0x0a, 0xe8, 0x2d, 0x28,
+ 0xb9, 0x38, 0x00, 0xb0, 0x39, 0xb4, 0x08, 0xe8,
+ 0x2a, 0x28, 0xb9, 0x24, 0x00, 0xb0, 0x3b, 0xb4,
+ 0x0c, 0xe8, 0x27, 0x28, 0xb9, 0x30, 0x00, 0xb0,
+ 0x44, 0xb4, 0x0a, 0xe8, 0x24, 0x28, 0xb9, 0x36,
+ 0x00, 0xb0, 0x78, 0xb4, 0x08, 0xe8, 0x21, 0x28,
+ 0xb9, 0x38, 0x00, 0xb0, 0x8d, 0xb4, 0x0a, 0xe8,
+ 0x1e, 0x28, 0xb0, 0x90, 0xe8, 0x20, 0x28, 0xb0,
+ 0x93, 0xe8, 0x22, 0x28, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x4d, 0x02, 0xb9, 0x4c, 0x02, 0xe8, 0xe7,
+ 0x98, 0xe8, 0x22, 0x9d, 0xbb, 0x7f, 0x36, 0xe8,
+ 0x23, 0x1e, 0xb0, 0x22, 0xe8, 0x11, 0xa5, 0xc6,
+ 0x06, 0xa1, 0xdb, 0x01, 0xc3, 0xb9, 0x05, 0x00,
+ 0xb0, 0x03, 0xb4, 0x03, 0xe8, 0xb6, 0x27, 0xb9,
+ 0x41, 0x00, 0xb0, 0x10, 0xe8, 0xb7, 0x27, 0xb0,
+ 0x12, 0xe8, 0xb9, 0x27, 0xb0, 0x14, 0xe8, 0xbb,
+ 0x27, 0xb0, 0x16, 0xe8, 0xbd, 0x27, 0xb0, 0x18,
+ 0xe8, 0xbf, 0x27, 0xb0, 0x1a, 0xe8, 0xc1, 0x27,
+ 0xb0, 0x1c, 0xe8, 0xc3, 0x27, 0xb9, 0x2f, 0x00,
+ 0xb0, 0x21, 0xe8, 0xc2, 0x27, 0xb9, 0x6c, 0x02,
+ 0xe8, 0x74, 0x98, 0xb9, 0x38, 0x00, 0xb0, 0x03,
+ 0xb4, 0x03, 0xe8, 0x78, 0x27, 0xb0, 0x06, 0xe8,
+ 0x7c, 0x27, 0xb0, 0x09, 0xe8, 0x7e, 0x27, 0xb0,
+ 0x0c, 0xe8, 0x80, 0x27, 0xb0, 0x0f, 0xe8, 0x82,
+ 0x27, 0xb0, 0x12, 0xe8, 0x84, 0x27, 0xc6, 0x06,
+ 0xe6, 0x1c, 0xd9, 0xc6, 0x06, 0x35, 0x33, 0x14,
+ 0xc6, 0x06, 0x36, 0x33, 0x25, 0xb8, 0xce, 0x3a,
+ 0xa3, 0x37, 0x33, 0xb8, 0x26, 0x0f, 0xa3, 0x39,
+ 0x33, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x6f, 0x02,
+ 0xb9, 0x6d, 0x02, 0xe8, 0xa9, 0x98, 0xc6, 0x06,
+ 0x35, 0x33, 0x01, 0xc6, 0x06, 0x36, 0x33, 0x09,
+ 0xb8, 0xe6, 0x3a, 0xa3, 0x37, 0x33, 0xb8, 0x1e,
+ 0x0f, 0xa3, 0x39, 0x33, 0xb9, 0x23, 0x00, 0xb0,
+ 0x01, 0xb4, 0x03, 0xe8, 0x17, 0x27, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0x70, 0x02, 0xb9, 0x6e, 0x02,
+ 0xe8, 0x7c, 0x98, 0xe8, 0x36, 0x98, 0xb8, 0x96,
+ 0x00, 0xe8, 0x3e, 0x9c, 0xbb, 0xfd, 0x3a, 0xe8,
+ 0x53, 0x1d, 0xb0, 0x2b, 0xe8, 0x41, 0xa4, 0xe8,
+ 0x3b, 0x1a, 0xc3, 0xbb, 0xa1, 0x46, 0xe8, 0x44,
+ 0x1d, 0xc3, 0xbb, 0x00, 0x30, 0xe8, 0xad, 0x8e,
+ 0xb9, 0x05, 0x00, 0xb0, 0x18, 0xb4, 0x03, 0xe8,
+ 0xdb, 0x26, 0xb9, 0x1a, 0x00, 0xb0, 0x20, 0xe8,
+ 0xdc, 0x26, 0xb9, 0x05, 0x00, 0xb0, 0x2a, 0xe8,
+ 0xdb, 0x26, 0xb9, 0x0f, 0x00, 0xb0, 0x4d, 0xe8,
+ 0xda, 0x26, 0xb0, 0x4f, 0xe8, 0xdc, 0x26, 0xb0,
+ 0x52, 0xe8, 0xde, 0x26, 0xb9, 0x16, 0x00, 0xb0,
+ 0x5b, 0xe8, 0xdd, 0x26, 0xb9, 0x16, 0x00, 0xb0,
+ 0x66, 0xe8, 0xdc, 0x26, 0xb9, 0x1a, 0x00, 0xb0,
+ 0x72, 0xe8, 0xdb, 0x26, 0xb9, 0x18, 0x00, 0xb0,
+ 0x7c, 0xe8, 0xda, 0x26, 0xb0, 0x1a, 0xb4, 0x01,
+ 0xe8, 0xa3, 0x9b, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x33, 0x02, 0xb9, 0x32, 0x02, 0xe8, 0xa6, 0x97,
+ 0xb0, 0x06, 0xe8, 0x68, 0x96, 0xb0, 0x01, 0xb4,
+ 0x00, 0xe8, 0xf5, 0xaa, 0xe8, 0x09, 0xab, 0xbb,
+ 0x3f, 0x36, 0xe8, 0xc8, 0x1c, 0xb0, 0x1b, 0xe8,
+ 0xb6, 0xa3, 0xb0, 0x1c, 0xe8, 0xa1, 0xa3, 0xc3,
+ 0xbb, 0x13, 0x49, 0xe8, 0xb7, 0x1c, 0xc3, 0xb0,
+ 0x20, 0xe8, 0xa4, 0xa3, 0xb9, 0x25, 0x00, 0xb0,
+ 0x0e, 0xb4, 0x04, 0xe8, 0x4f, 0x26, 0xb9, 0x10,
+ 0x00, 0xb0, 0x11, 0xb4, 0x09, 0xe8, 0x4e, 0x26,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x35, 0x02,
+ 0xb9, 0x34, 0x02, 0xe8, 0x29, 0x97, 0xe8, 0x1f,
+ 0xbc, 0xc6, 0x07, 0x18, 0xe8, 0x5a, 0x2a, 0xe8,
+ 0xcc, 0x26, 0xb9, 0x27, 0x00, 0xb0, 0x05, 0xb4,
+ 0x00, 0xe8, 0x21, 0x26, 0xb9, 0x46, 0x02, 0xe8,
+ 0x10, 0x97, 0xe8, 0x47, 0x97, 0xbe, 0x3f, 0x00,
+ 0xbf, 0xc3, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01,
+ 0xe8, 0x38, 0xb2, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x3b, 0x02, 0xb0, 0x02, 0xe8, 0x20, 0x96,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x3c, 0x02,
+ 0xb0, 0x02, 0xe8, 0x13, 0x96, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x3d, 0x02, 0xb0, 0x02, 0xe8,
+ 0x06, 0x96, 0xb9, 0x28, 0x00, 0xb0, 0x01, 0xb4,
+ 0x08, 0xe8, 0xd9, 0x25, 0xb0, 0x03, 0xe8, 0xdd,
+ 0x25, 0xb0, 0x05, 0xe8, 0xdf, 0x25, 0xb0, 0x07,
+ 0xe8, 0xe1, 0x25, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x3e, 0x02, 0xb0, 0x02, 0xe8, 0xe0, 0x95,
+ 0xb0, 0x01, 0xb4, 0x00, 0xe8, 0x32, 0xaa, 0xe8,
+ 0x46, 0xaa, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x3f, 0x02, 0xb0, 0x02, 0xe8, 0xc9, 0x95, 0xbb,
+ 0x47, 0x33, 0xc7, 0x47, 0x02, 0x40, 0x02, 0xb0,
+ 0x02, 0xe8, 0xbc, 0x95, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0x41, 0x02, 0xb0, 0x02, 0xe8, 0xaf,
+ 0x95, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x42,
+ 0x02, 0xb0, 0x02, 0xe8, 0xa2, 0x95, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0x43, 0x02, 0xb0, 0x02,
+ 0xe8, 0x95, 0x95, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x44, 0x02, 0xb0, 0x02, 0xe8, 0x88, 0x95,
+ 0xb9, 0x37, 0x00, 0xb0, 0x12, 0xb4, 0x01, 0xe8,
+ 0x5b, 0x25, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x45, 0x02, 0xb0, 0x02, 0xe8, 0x71, 0x95, 0xe8,
+ 0xec, 0x25, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xb0, 0x02, 0xe8, 0x24,
+ 0x95, 0xc6, 0x06, 0x9f, 0xdb, 0x01, 0xc3, 0xb9,
+ 0x14, 0x00, 0xb0, 0x09, 0xb4, 0x06, 0xe8, 0x2c,
+ 0x25, 0xb9, 0x12, 0x02, 0xe8, 0x18, 0x96, 0xe8,
+ 0xb9, 0x26, 0xc7, 0x06, 0xf3, 0xb4, 0x10, 0x00,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0x3f, 0x27,
+ 0xb9, 0x13, 0x02, 0xc6, 0x06, 0xdc, 0x1c, 0x01,
+ 0xe8, 0xfc, 0x95, 0xb9, 0x24, 0x00, 0xb0, 0x04,
+ 0xb4, 0x0c, 0xe8, 0x00, 0x25, 0xb9, 0x14, 0x02,
+ 0xe8, 0xef, 0x95, 0xb9, 0x15, 0x02, 0xe8, 0xe9,
+ 0x95, 0xe8, 0xdc, 0xba, 0xb0, 0x09, 0x88, 0x07,
+ 0xe8, 0x0e, 0x2a, 0xc7, 0x06, 0xaf, 0x64, 0xec,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0x5f, 0x00, 0xc6,
+ 0x06, 0xc3, 0x64, 0x01, 0xc6, 0x06, 0xcb, 0x64,
+ 0x01, 0xc6, 0x06, 0xcd, 0x64, 0x00, 0xe8, 0xfb,
+ 0x95, 0xb9, 0x09, 0x00, 0xe8, 0x14, 0x2c, 0xc3,
+ 0xbb, 0x46, 0x67, 0xe8, 0x9c, 0xba, 0x83, 0xc3,
+ 0x03, 0xff, 0x37, 0x53, 0xc7, 0x07, 0x3f, 0x01,
+ 0xbe, 0xec, 0x00, 0xbf, 0xbe, 0x00, 0xe8, 0xda,
+ 0xb0, 0xb9, 0x05, 0x00, 0xb0, 0x04, 0xb4, 0x0b,
+ 0xe8, 0xa2, 0x24, 0xb9, 0x0e, 0x00, 0xb0, 0x0e,
+ 0xe8, 0xa3, 0x24, 0xb0, 0x21, 0xe8, 0xa5, 0x24,
+ 0xb9, 0x05, 0x00, 0xb0, 0x2b, 0xe8, 0xa4, 0x24,
+ 0xe8, 0xe4, 0x95, 0xe8, 0x72, 0xba, 0x53, 0xc6,
+ 0x47, 0x02, 0x00, 0xe8, 0xf6, 0x28, 0xe8, 0x30,
+ 0x00, 0xb9, 0x83, 0x02, 0xe8, 0x6b, 0x95, 0x5b,
+ 0xc6, 0x47, 0x02, 0x2b, 0xe8, 0xa1, 0x28, 0xe8,
+ 0x32, 0x00, 0xe8, 0x97, 0x95, 0xbe, 0xec, 0x00,
+ 0xbf, 0xb3, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x03,
+ 0xe8, 0x88, 0xb0, 0x5b, 0x8f, 0x07, 0xb0, 0x2c,
+ 0xe8, 0x9d, 0xa1, 0xb0, 0x2e, 0xe8, 0x88, 0xa1,
+ 0xc3, 0x1e, 0xa1, 0xb5, 0x32, 0x8e, 0xd8, 0x33,
+ 0xdb, 0x8a, 0x07, 0xc6, 0x07, 0x00, 0x1f, 0x2e,
+ 0xa2, 0xd5, 0x85, 0xc3, 0x2e, 0xa0, 0xd5, 0x85,
+ 0x1e, 0x8b, 0x1e, 0xb5, 0x32, 0x8e, 0xdb, 0x33,
+ 0xdb, 0x88, 0x07, 0x1f, 0xc3, 0x00, 0xbb, 0xbf,
+ 0x48, 0xe8, 0x79, 0x1a, 0xc3, 0xbb, 0xd6, 0x48,
+ 0xe8, 0x72, 0x1a, 0xc3, 0xbb, 0x5c, 0x49, 0xe8,
+ 0x6b, 0x1a, 0xc3, 0x80, 0x3e, 0xb0, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0x86, 0x3d, 0xe8, 0x5d, 0x1a,
+ 0xc3, 0xb0, 0x06, 0xe8, 0xdb, 0x93, 0xb9, 0x19,
+ 0x00, 0xb0, 0x0a, 0xb4, 0x0a, 0xe8, 0xf5, 0x23,
+ 0xb0, 0x0e, 0xe8, 0xf9, 0x23, 0xb0, 0x12, 0xe8,
+ 0xfb, 0x23, 0xb9, 0x2f, 0x02, 0xe8, 0xe7, 0x94,
+ 0xe8, 0xcd, 0xb9, 0xb0, 0x17, 0x88, 0x47, 0x01,
+ 0xe8, 0xfe, 0x28, 0xe8, 0x06, 0x95, 0xc6, 0x06,
+ 0xb0, 0xdb, 0x02, 0xc3, 0xbb, 0x57, 0x34, 0x80,
+ 0x3e, 0xb0, 0xdb, 0x01, 0x75, 0x03, 0xbb, 0x82,
+ 0x48, 0xe8, 0x19, 0x1a, 0xc3, 0xb9, 0x0c, 0x00,
+ 0xb0, 0x04, 0xb4, 0x08, 0xe8, 0xb6, 0x23, 0xb9,
+ 0x32, 0x00, 0xb0, 0x14, 0xe8, 0xb7, 0x23, 0xb0,
+ 0x1d, 0xe8, 0xb9, 0x23, 0xb9, 0x2a, 0x02, 0xe8,
+ 0xb6, 0x94, 0xb0, 0x13, 0xe8, 0xe9, 0xa0, 0xb0,
+ 0x16, 0xe8, 0xd4, 0xa0, 0xc3, 0xb9, 0x05, 0x00,
+ 0xb0, 0x03, 0xb4, 0x0c, 0xe8, 0x8e, 0x23, 0xb9,
+ 0x38, 0x00, 0xb0, 0x0c, 0xe8, 0x8f, 0x23, 0xb0,
+ 0x0e, 0xe8, 0x91, 0x23, 0xb0, 0x10, 0xe8, 0x93,
+ 0x23, 0xb0, 0x12, 0xe8, 0x95, 0x23, 0xb0, 0x16,
+ 0xe8, 0x97, 0x23, 0xb0, 0x18, 0xe8, 0x99, 0x23,
+ 0xb9, 0x05, 0x00, 0xb0, 0x1c, 0xe8, 0x98, 0x23,
+ 0xb9, 0x37, 0x02, 0xe8, 0x72, 0x94, 0xb0, 0x0c,
+ 0xe8, 0xa5, 0xa0, 0xb0, 0x21, 0xe8, 0x90, 0xa0,
+ 0xc3, 0x80, 0x3e, 0x92, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0x40, 0x3d, 0xe8, 0x9f, 0x19, 0xc3, 0xc6,
+ 0x06, 0x92, 0xdb, 0x01, 0xe8, 0x44, 0x91, 0xbb,
+ 0xcd, 0x0f, 0xe8, 0x00, 0x8b, 0xc6, 0x06, 0xe6,
+ 0x1c, 0xd1, 0xb8, 0x07, 0x01, 0xe8, 0x3e, 0x98,
+ 0xb9, 0x05, 0x00, 0xb0, 0x10, 0xb4, 0x06, 0xe8,
+ 0x23, 0x23, 0xb9, 0x01, 0x00, 0xb0, 0x19, 0xe8,
+ 0x24, 0x23, 0xb0, 0x1d, 0xe8, 0x26, 0x23, 0xb0,
+ 0x22, 0xe8, 0x28, 0x23, 0xc6, 0x06, 0xdc, 0x64,
+ 0x00, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xfa, 0x01,
+ 0xb9, 0xf8, 0x01, 0xe8, 0xf4, 0x93, 0xe8, 0xe7,
+ 0xb8, 0xc6, 0x07, 0x00, 0xe8, 0x29, 0x27, 0xc7,
+ 0x06, 0x30, 0x32, 0x00, 0x00, 0xc7, 0x06, 0x2e,
+ 0x32, 0x72, 0x00, 0xc7, 0x06, 0x2c, 0x32, 0xae,
+ 0x00, 0xb9, 0x18, 0x00, 0xb0, 0x02, 0xb4, 0x06,
+ 0xe8, 0xda, 0x22, 0xb9, 0x16, 0x00, 0xb0, 0x18,
+ 0xe8, 0xdb, 0x22, 0xb9, 0x01, 0x00, 0xb0, 0x1c,
+ 0xe8, 0xda, 0x22, 0xb0, 0x20, 0xe8, 0xdc, 0x22,
+ 0xb0, 0x25, 0xe8, 0xde, 0x22, 0xb9, 0x05, 0x00,
+ 0xb0, 0x2b, 0xe8, 0xdd, 0x22, 0xb9, 0x3d, 0x00,
+ 0xb0, 0x46, 0xe8, 0xdc, 0x22, 0xb9, 0x3d, 0x00,
+ 0xb0, 0x5b, 0xe8, 0xdb, 0x22, 0xc6, 0x06, 0x35,
+ 0x33, 0x06, 0xc6, 0x06, 0x36, 0x33, 0x11, 0xb8,
+ 0xfb, 0x3c, 0xa3, 0x37, 0x33, 0xb8, 0xcd, 0x70,
+ 0xa3, 0x39, 0x33, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0xfb, 0x01, 0xb9, 0xf9, 0x01, 0xe8, 0xf7, 0x93,
+ 0xe8, 0x6d, 0xb8, 0xb0, 0x04, 0x88, 0x07, 0xe8,
+ 0x9f, 0x27, 0xb8, 0x03, 0x00, 0xe8, 0xbd, 0x1c,
+ 0xb8, 0x14, 0x00, 0x01, 0x47, 0x03, 0x01, 0x47,
+ 0x07, 0xc6, 0x06, 0xcd, 0x64, 0x00, 0xc6, 0x06,
+ 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xcb, 0x64, 0x01,
+ 0xff, 0x06, 0xaf, 0x64, 0xe8, 0xec, 0x23, 0xe8,
+ 0xcf, 0xb6, 0xb9, 0x0a, 0x00, 0xb0, 0x03, 0xb4,
+ 0x02, 0xe8, 0x49, 0x22, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0xf7, 0x01, 0xb0, 0x01, 0xe8, 0x60, 0x92,
+ 0xe8, 0xdb, 0x22, 0xc7, 0x06, 0xf3, 0xb4, 0x16,
+ 0x00, 0xb8, 0x01, 0x00, 0xe8, 0xaa, 0xa6, 0xb0,
+ 0x01, 0xe8, 0x11, 0x92, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x14, 0x00, 0xb0, 0x0d, 0xe8, 0x06, 0x92, 0xb8,
+ 0x01, 0x00, 0xe8, 0x94, 0xa6, 0xe8, 0xa8, 0xa6,
+ 0xb0, 0x01, 0xe8, 0xf8, 0x91, 0xb0, 0x02, 0xe8,
+ 0xf3, 0x91, 0xb0, 0x0e, 0xe8, 0xee, 0x91, 0xb0,
+ 0x0f, 0xe8, 0xe9, 0x91, 0xb0, 0x10, 0xe8, 0xe4,
+ 0x91, 0xe8, 0x41, 0x14, 0xb8, 0x32, 0x00, 0xe8,
+ 0x52, 0x97, 0xe8, 0x47, 0x14, 0xbe, 0xa2, 0x00,
+ 0xbf, 0xa4, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x02,
+ 0xe8, 0x10, 0xae, 0xc6, 0x06, 0xe6, 0x1c, 0xe5,
+ 0xbb, 0x01, 0x3d, 0xbe, 0x46, 0x5f, 0xe8, 0xd5,
+ 0x1a, 0xc6, 0x06, 0xe6, 0x1c, 0xd8, 0xbb, 0x20,
+ 0x3d, 0xbe, 0x5a, 0x5f, 0xe8, 0xc7, 0x1a, 0xbe,
+ 0xa2, 0x00, 0xbf, 0xbf, 0x00, 0xc6, 0x06, 0xc3,
+ 0x64, 0x02, 0xe8, 0xe6, 0xad, 0xe8, 0xfd, 0x13,
+ 0xb8, 0x32, 0x00, 0xe8, 0x0e, 0x97, 0xe8, 0x97,
+ 0xb7, 0x32, 0xc0, 0x88, 0x47, 0x01, 0x88, 0x47,
+ 0x02, 0x88, 0x47, 0x03, 0x88, 0x47, 0x04, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x03, 0xe8, 0x0d, 0x26, 0xbb,
+ 0x46, 0x67, 0xe8, 0x6d, 0xb7, 0x43, 0x33, 0xc0,
+ 0x89, 0x47, 0x02, 0x89, 0x47, 0x04, 0x89, 0x47,
+ 0x06, 0x89, 0x47, 0x08, 0xb9, 0x3e, 0x00, 0xb0,
+ 0x01, 0xb4, 0x0e, 0xe8, 0x77, 0x21, 0xb9, 0x09,
+ 0x00, 0xb0, 0x08, 0xe8, 0x78, 0x21, 0xe8, 0xc3,
+ 0x13, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x00, 0x02,
+ 0xb0, 0x01, 0xe8, 0x83, 0x91, 0xe8, 0x4c, 0x22,
+ 0xb0, 0x01, 0xb4, 0x00, 0xe8, 0xd2, 0xa5, 0xe8,
+ 0xe6, 0xa5, 0xe8, 0xa8, 0x96, 0xbb, 0x3a, 0x3d,
+ 0xe8, 0xa2, 0x17, 0xb0, 0x07, 0xb4, 0x01, 0xb9,
+ 0xe4, 0x00, 0xba, 0xab, 0x00, 0xe8, 0x45, 0x91,
+ 0xb0, 0x08, 0xb9, 0x22, 0x01, 0xe8, 0x3d, 0x91,
+ 0xc3, 0x80, 0x3e, 0x9a, 0xdb, 0x01, 0x74, 0x3b,
+ 0xe8, 0x0b, 0x00, 0xb0, 0x0a, 0xe8, 0x70, 0x9e,
+ 0xc6, 0x06, 0x9a, 0xdb, 0x01, 0xc3, 0xe8, 0xdc,
+ 0x8e, 0xbb, 0x5f, 0x1b, 0xe8, 0xde, 0x88, 0xb9,
+ 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x03, 0xe8, 0x0c,
+ 0x21, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x1a, 0x02,
+ 0xb9, 0x19, 0x02, 0xe8, 0x27, 0x92, 0xe8, 0x54,
+ 0x96, 0xe8, 0xb9, 0x8e, 0xbb, 0xe0, 0x1b, 0xe8,
+ 0xbb, 0x88, 0xc3, 0xe8, 0xaf, 0x8e, 0xbb, 0xf0,
+ 0xda, 0xe8, 0x99, 0x88, 0xe8, 0xae, 0x88, 0xc3,
+ 0x80, 0x3e, 0x9a, 0xdb, 0x01, 0x74, 0xec, 0xe8,
+ 0xbc, 0xff, 0xb0, 0x0b, 0xe8, 0x21, 0x9e, 0xc6,
+ 0x06, 0x9a, 0xdb, 0x01, 0xc3, 0x80, 0x3e, 0x9b,
+ 0xdb, 0x01, 0x74, 0x76, 0xe8, 0x0b, 0x00, 0xb0,
+ 0x0a, 0xe8, 0x0c, 0x9e, 0xc6, 0x06, 0x9b, 0xdb,
+ 0x01, 0xc3, 0xe8, 0x27, 0x8f, 0xbb, 0x93, 0x22,
+ 0xe8, 0x7a, 0x88, 0xb9, 0x05, 0x00, 0xb0, 0x0a,
+ 0xb4, 0x03, 0xe8, 0xa8, 0x20, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x1b, 0x02, 0xb9, 0x1c, 0x02,
+ 0xe8, 0xc2, 0x91, 0xb8, 0x64, 0x00, 0xe8, 0xd1,
+ 0x95, 0xe8, 0x00, 0x8f, 0xbb, 0xb1, 0x24, 0xe8,
+ 0x53, 0x88, 0xe8, 0xd9, 0x95, 0xe8, 0x45, 0x8e,
+ 0xbb, 0xd7, 0x24, 0xe8, 0x47, 0x88, 0xe8, 0xeb,
+ 0x8e, 0xbb, 0x14, 0x25, 0xe8, 0x3e, 0x88, 0xe8,
+ 0xc4, 0x95, 0x8b, 0x3e, 0xb1, 0x64, 0x8b, 0x36,
+ 0xaf, 0x64, 0x57, 0x56, 0x47, 0xe8, 0x93, 0xac,
+ 0xe8, 0xb3, 0x95, 0xbb, 0x70, 0x25, 0xe8, 0x24,
+ 0x88, 0xe8, 0xaa, 0x95, 0x5e, 0x5f, 0xe8, 0x82,
+ 0xac, 0xc3, 0xe8, 0xbf, 0x8e, 0xbb, 0x02, 0xdb,
+ 0xe8, 0xfa, 0x87, 0xe8, 0x0f, 0x88, 0xc3, 0x80,
+ 0x3e, 0x9b, 0xdb, 0x01, 0x74, 0xec, 0xe8, 0x81,
+ 0xff, 0xb0, 0x0b, 0xe8, 0x82, 0x9d, 0xc6, 0x06,
+ 0x9b, 0xdb, 0x01, 0xc3, 0xb0, 0x17, 0xe8, 0x77,
+ 0x9d, 0xe8, 0x98, 0x8e, 0xbb, 0x34, 0x26, 0xe8,
+ 0xeb, 0x87, 0xb9, 0x05, 0x00, 0xb0, 0x06, 0xb4,
+ 0x0c, 0xe8, 0x19, 0x20, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0x2c, 0x02, 0xb9, 0x2b, 0x02, 0xe8,
+ 0x33, 0x91, 0xe8, 0x77, 0x8e, 0xbb, 0x0a, 0x28,
+ 0xe8, 0xca, 0x87, 0xb9, 0x05, 0x00, 0xb0, 0x0a,
+ 0xb4, 0x0c, 0xe8, 0xf8, 0x1f, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x2e, 0x02, 0xb9, 0x2d, 0x02,
+ 0xe8, 0x12, 0x91, 0xe8, 0x56, 0x8e, 0xbb, 0x71,
+ 0x29, 0xe8, 0xa9, 0x87, 0xb0, 0x18, 0xe8, 0x17,
+ 0x9d, 0xc3, 0xb9, 0x2d, 0x00, 0xb0, 0x10, 0xb4,
+ 0x06, 0xe8, 0xd1, 0x1f, 0xe8, 0x28, 0x91, 0xe8,
+ 0x7f, 0xfb, 0xb9, 0x30, 0x02, 0xe8, 0xba, 0x90,
+ 0xe8, 0x89, 0xfb, 0xe8, 0xee, 0x90, 0xb0, 0x1a,
+ 0xe8, 0x05, 0x9d, 0xb0, 0x1b, 0xe8, 0xf0, 0x9c,
+ 0xe8, 0x03, 0x95, 0xe8, 0x6f, 0x8d, 0xbb, 0xcd,
+ 0x1e, 0xe8, 0x71, 0x87, 0x8b, 0x3e, 0xb1, 0x64,
+ 0x8b, 0x36, 0xaf, 0x64, 0x4e, 0xe8, 0xcb, 0xab,
+ 0xe8, 0x5a, 0x8d, 0xbb, 0x09, 0x1f, 0xe8, 0x5c,
+ 0x87, 0xc6, 0x06, 0xb1, 0xdb, 0x01, 0xc3, 0x80,
+ 0x3e, 0xb5, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x29,
+ 0x4a, 0xe8, 0xd9, 0x15, 0xc3, 0xe8, 0xec, 0x8d,
+ 0xbb, 0x92, 0x29, 0xe8, 0x3f, 0x87, 0xb9, 0x05,
+ 0x00, 0xb0, 0x03, 0xb4, 0x0e, 0xe8, 0x6d, 0x1f,
+ 0xb0, 0x14, 0xe8, 0x71, 0x1f, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x9f, 0x02, 0xb9, 0x9e, 0x02,
+ 0xe8, 0x5f, 0x90, 0xe8, 0xed, 0x20, 0xe8, 0xcb,
+ 0x00, 0xe8, 0xe4, 0x8d, 0xbb, 0x00, 0x2a, 0xe8,
+ 0x13, 0x87, 0xe8, 0xbf, 0x00, 0xc6, 0x06, 0xe6,
+ 0x1c, 0xe5, 0xc6, 0x06, 0x35, 0x33, 0x17, 0xc6,
+ 0x06, 0x36, 0x33, 0x26, 0xb8, 0x5b, 0x4a, 0xa3,
+ 0x37, 0x33, 0xb8, 0x4c, 0x8f, 0xa3, 0x39, 0x33,
+ 0xb9, 0x53, 0x00, 0xb0, 0x0c, 0xb4, 0x0c, 0xe8,
+ 0x23, 0x1f, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xb9,
+ 0xa1, 0x02, 0xe8, 0x8a, 0x90, 0xe8, 0xab, 0x20,
+ 0xe8, 0x01, 0x20, 0xc7, 0x06, 0xf3, 0xb4, 0x0b,
+ 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0x2e,
+ 0x21, 0xb9, 0x18, 0x00, 0xb0, 0x1f, 0xb4, 0x09,
+ 0xe8, 0xfa, 0x1e, 0xb0, 0x30, 0xe8, 0xfe, 0x1e,
+ 0xb9, 0x4f, 0x00, 0xb0, 0x32, 0xb4, 0x0c, 0xe8,
+ 0xfb, 0x1e, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xa3,
+ 0x02, 0xb9, 0xa2, 0x02, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x01, 0xe8, 0xce, 0x8f, 0xe8, 0x6c, 0x20, 0xe8,
+ 0xc2, 0x1f, 0xc7, 0x06, 0xf3, 0xb4, 0x1c, 0x00,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xe8, 0xef, 0x20,
+ 0xc7, 0x06, 0xaf, 0x64, 0x00, 0x00, 0xc7, 0x06,
+ 0xb1, 0x64, 0xa7, 0x00, 0xc6, 0x06, 0xc3, 0x64,
+ 0x02, 0xc6, 0x06, 0xcb, 0x64, 0x00, 0xc6, 0x06,
+ 0xcd, 0x64, 0x00, 0xe8, 0xd6, 0x8f, 0xbe, 0x42,
+ 0x00, 0xbf, 0xa7, 0x00, 0xe8, 0xcc, 0xaa, 0xbb,
+ 0x6f, 0x4a, 0xe8, 0xf0, 0x14, 0xe8, 0x16, 0x9c,
+ 0xb0, 0x1d, 0xe8, 0xcb, 0x9b, 0xb9, 0x0a, 0x00,
+ 0xe8, 0xd8, 0x25, 0xc3, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0xa0, 0x02, 0xb0, 0x02, 0xe8, 0xa6,
+ 0x8e, 0xc3, 0xe8, 0xd2, 0x8f, 0xe8, 0x60, 0xb4,
+ 0xc6, 0x07, 0x00, 0xe8, 0xe6, 0x22, 0xb9, 0x05,
+ 0x00, 0xb0, 0x03, 0xb4, 0x05, 0xe8, 0x65, 0x1e,
+ 0xb0, 0x06, 0xe8, 0x69, 0x1e, 0xb0, 0x0a, 0xe8,
+ 0x6b, 0x1e, 0xb9, 0x5c, 0x00, 0xb0, 0x14, 0xe8,
+ 0x6a, 0x1e, 0xb0, 0x26, 0xe8, 0x6c, 0x1e, 0xb0,
+ 0x3a, 0xe8, 0x6e, 0x1e, 0xc6, 0x06, 0x35, 0x33,
+ 0x3a, 0xc6, 0x06, 0x36, 0x33, 0x43, 0xb8, 0x4a,
+ 0x46, 0xa3, 0x37, 0x33, 0xb8, 0x9e, 0x8e, 0xa3,
+ 0x39, 0x33, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xb9,
+ 0x5a, 0x02, 0xe8, 0x9a, 0x8f, 0xc6, 0x06, 0xdc,
+ 0x64, 0x01, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x04, 0xe8, 0x19, 0x1e, 0xb9, 0x5b, 0x02, 0xe8,
+ 0x18, 0x8f, 0xe8, 0xfb, 0xb3, 0xc6, 0x07, 0x1b,
+ 0xe8, 0x3d, 0x22, 0xe8, 0x36, 0x8f, 0xc6, 0x06,
+ 0xa5, 0xdb, 0x01, 0xc3, 0xbb, 0x31, 0x3c, 0xe8,
+ 0x53, 0x14, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x0a, 0xe8, 0xf1, 0x1d, 0xb9, 0x1a, 0x00, 0xb0,
+ 0x0d, 0xe8, 0xf2, 0x1d, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x92, 0x02, 0xb9, 0x91, 0x02, 0xe8, 0xce,
+ 0x8e, 0xe8, 0x6f, 0x1f, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x93, 0x02, 0xb0, 0x01, 0xe8, 0xf7, 0x8d,
+ 0xe8, 0xb9, 0x1e, 0xe8, 0x1f, 0x93, 0xbb, 0x3d,
+ 0x3c, 0xe8, 0x19, 0x14, 0xb0, 0x24, 0xe8, 0x07,
+ 0x9b, 0xb0, 0x09, 0xe8, 0x1c, 0x00, 0xb0, 0x07,
+ 0xe8, 0x17, 0x00, 0xbb, 0x46, 0x67, 0xe8, 0x89,
+ 0xb3, 0x43, 0xc7, 0x47, 0x06, 0x0a, 0x01, 0xc7,
+ 0x47, 0x08, 0xc1, 0x00, 0xc6, 0x06, 0xad, 0xdb,
+ 0x01, 0xc3, 0xb4, 0x01, 0xb9, 0x29, 0x01, 0xba,
+ 0xb5, 0x00, 0xe8, 0x98, 0x8d, 0xc3, 0xb9, 0x05,
+ 0x00, 0xb0, 0x03, 0xb4, 0x09, 0xe8, 0x85, 0x1d,
+ 0xb9, 0x1a, 0x00, 0xb0, 0x0d, 0xe8, 0x86, 0x1d,
+ 0xb9, 0x18, 0x00, 0xb0, 0x16, 0xe8, 0x85, 0x1d,
+ 0xb9, 0x50, 0x02, 0xe8, 0x71, 0x8e, 0xe8, 0x57,
+ 0xb3, 0xc6, 0x07, 0x00, 0xe8, 0x99, 0x21, 0xb9,
+ 0x01, 0x00, 0xb0, 0x05, 0xb4, 0x09, 0xe8, 0x5c,
+ 0x1d, 0xb0, 0x09, 0xe8, 0x60, 0x1d, 0xb0, 0x0d,
+ 0xe8, 0x62, 0x1d, 0xb9, 0x51, 0x02, 0xe8, 0x51,
+ 0x8e, 0xe8, 0x34, 0xb3, 0xc6, 0x07, 0x1c, 0xe8,
+ 0x76, 0x21, 0xe8, 0x6f, 0x8e, 0xb0, 0x23, 0xe8,
+ 0x86, 0x9a, 0xb0, 0x01, 0xe8, 0x12, 0x8d, 0xc3,
+ 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x09, 0xe8,
+ 0x2b, 0x1d, 0xb9, 0x84, 0x02, 0xe8, 0x27, 0x8e,
+ 0xe8, 0x0d, 0xb3, 0xc6, 0x47, 0x01, 0x2d, 0xe8,
+ 0x4e, 0x21, 0xb9, 0x38, 0x00, 0xb0, 0x02, 0xb4,
+ 0x08, 0xe8, 0x11, 0x1d, 0xb9, 0x1a, 0x00, 0xb0,
+ 0x04, 0xe8, 0x12, 0x1d, 0xb9, 0x85, 0x02, 0xe8,
+ 0x08, 0x8e, 0xb9, 0x38, 0x00, 0xb0, 0x01, 0xb4,
+ 0x08, 0xe8, 0xf9, 0x1c, 0xb0, 0x06, 0xe8, 0x04,
+ 0x1d, 0xb9, 0x1a, 0x00, 0xb0, 0x03, 0xe8, 0xf5,
+ 0x1c, 0xb0, 0x08, 0xe8, 0xfe, 0x1c, 0xb9, 0x86,
+ 0x02, 0xe8, 0xe6, 0x8d, 0xb9, 0x05, 0x00, 0xb0,
+ 0x15, 0xb4, 0x09, 0xe8, 0xd7, 0x1c, 0xb9, 0x87,
+ 0x02, 0xe8, 0xf9, 0x8d, 0xb0, 0x02, 0xe8, 0xb4,
+ 0x8c, 0xb8, 0x03, 0x00, 0xe8, 0x0e, 0x17, 0xc7,
+ 0x47, 0x0d, 0x9c, 0x00, 0xc6, 0x06, 0xac, 0xdb,
+ 0x01, 0xc3, 0xbb, 0x0b, 0x5e, 0xe8, 0x0d, 0x13,
+ 0xc3, 0xbb, 0xa1, 0x46, 0xe8, 0x06, 0x13, 0xc3,
+ 0xbb, 0xc3, 0x46, 0xe8, 0xff, 0x12, 0xc3, 0xb9,
+ 0x05, 0x00, 0xb0, 0x02, 0xb4, 0x07, 0xe8, 0x9c,
+ 0x1c, 0xb9, 0x0f, 0x00, 0xb0, 0x0c, 0xe8, 0x9d,
+ 0x1c, 0xb9, 0x7e, 0x02, 0xe8, 0xa1, 0x8d, 0xb0,
+ 0x30, 0xe8, 0xd4, 0x99, 0xe8, 0x0d, 0x91, 0x72,
+ 0x1e, 0xb0, 0x30, 0xe8, 0xba, 0x99, 0xb9, 0x18,
+ 0x00, 0xb0, 0x1a, 0xb4, 0x07, 0xe8, 0x75, 0x1c,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x04, 0x8b, 0x02,
+ 0xb9, 0x8a, 0x02, 0xe8, 0x7a, 0x8d, 0xc3, 0xa1,
+ 0x1f, 0xc4, 0xe8, 0xc7, 0x9a, 0x3c, 0x31, 0x75,
+ 0xd8, 0x83, 0x3e, 0x52, 0x72, 0x05, 0x75, 0xd1,
+ 0xc6, 0x06, 0xcf, 0x00, 0x00, 0xb9, 0x05, 0x00,
+ 0xb0, 0x02, 0xb4, 0x07, 0xe8, 0x46, 0x1c, 0xb9,
+ 0x34, 0x00, 0xb0, 0x0d, 0xe8, 0x47, 0x1c, 0xb9,
+ 0x88, 0x02, 0xe8, 0x2a, 0x8d, 0xe8, 0x20, 0xb2,
+ 0xc6, 0x47, 0x01, 0x2e, 0xe8, 0x61, 0x20, 0xe8,
+ 0x5a, 0x8d, 0xb0, 0x31, 0xe8, 0x71, 0x99, 0xe8,
+ 0xaa, 0x90, 0x73, 0x03, 0xe9, 0x91, 0x00, 0xb9,
+ 0x1b, 0x00, 0xb0, 0x05, 0xb4, 0x07, 0xe8, 0x14,
+ 0x1c, 0xe8, 0xfc, 0xb1, 0xc6, 0x47, 0x01, 0x00,
+ 0xe8, 0x81, 0x20, 0xb9, 0x8c, 0x02, 0xe8, 0xf9,
+ 0x8c, 0xb9, 0x18, 0x00, 0xb0, 0x04, 0xb4, 0x07,
+ 0xe8, 0xfa, 0x1b, 0xb9, 0x05, 0x00, 0xb0, 0x0c,
+ 0xe8, 0xfb, 0x1b, 0xc7, 0x06, 0xaf, 0x64, 0xbb,
+ 0x00, 0xc7, 0x06, 0xb1, 0x64, 0xb3, 0x00, 0xc6,
+ 0x06, 0xcc, 0x64, 0x01, 0xc6, 0x06, 0xcb, 0x64,
+ 0x00, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xb9, 0x8d,
+ 0x02, 0xe8, 0xc6, 0x8c, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x04, 0x8f, 0x02, 0xb9, 0x8e, 0x02, 0xe8,
+ 0xdd, 0x8c, 0xff, 0x36, 0xcf, 0x00, 0xc6, 0x06,
+ 0xcf, 0x00, 0x00, 0xbb, 0xf6, 0x3b, 0xe8, 0x0c,
+ 0x12, 0x8f, 0x06, 0xcf, 0x00, 0xb0, 0x31, 0xe8,
+ 0xe6, 0x98, 0xc7, 0x06, 0xf3, 0xb4, 0x1b, 0x00,
+ 0xb0, 0x02, 0xb4, 0x04, 0xe8, 0x1a, 0xa0, 0xb0,
+ 0x04, 0xe8, 0x75, 0x8b, 0xc6, 0x06, 0xa9, 0xdb,
+ 0x00, 0xc7, 0x06, 0xf3, 0xb4, 0x1a, 0x00, 0xc3,
+ 0xa1, 0x1f, 0xc4, 0xe8, 0xee, 0x99, 0x3c, 0x1d,
+ 0x74, 0x03, 0xe9, 0x62, 0xff, 0x83, 0x3e, 0x52,
+ 0x72, 0x05, 0x74, 0x03, 0xe9, 0x58, 0xff, 0xc6,
+ 0x06, 0xcf, 0x00, 0x00, 0xc7, 0x06, 0x1f, 0xc4,
+ 0x00, 0x00, 0xb9, 0x05, 0x00, 0xb0, 0x02, 0xb4,
+ 0x07, 0xe8, 0x61, 0x1b, 0xb9, 0x13, 0x00, 0xb0,
+ 0x0c, 0xe8, 0x62, 0x1b, 0xb9, 0x89, 0x02, 0xe8,
+ 0x48, 0x8c, 0xe8, 0x3b, 0xb1, 0xc6, 0x47, 0x01,
+ 0x2f, 0xe8, 0xc0, 0x1f, 0xe8, 0x75, 0x8c, 0xb8,
+ 0x2c, 0x01, 0xe8, 0x7d, 0x90, 0xb9, 0x44, 0x00,
+ 0xb0, 0x01, 0xb4, 0x0c, 0xe8, 0x36, 0x1b, 0xb0,
+ 0x05, 0xe8, 0x3a, 0x1b, 0xb0, 0x09, 0xe8, 0x3c,
+ 0x1b, 0xb0, 0x0d, 0xe8, 0x3e, 0x1b, 0xb0, 0x11,
+ 0xe8, 0x40, 0x1b, 0xb0, 0x15, 0xe8, 0x42, 0x1b,
+ 0xb0, 0x19, 0xe8, 0x44, 0x1b, 0xb0, 0x1d, 0xe8,
+ 0x46, 0x1b, 0xb0, 0x21, 0xe8, 0x48, 0x1b, 0xb0,
+ 0x25, 0xe8, 0x4a, 0x1b, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x04, 0x7f, 0x02, 0xb0, 0x03, 0xe8, 0x68,
+ 0x8b, 0xe8, 0xe4, 0xb0, 0xc6, 0x07, 0x2a, 0xe8,
+ 0x6a, 0x1f, 0xe8, 0x1f, 0x8c, 0xb0, 0x06, 0xe8,
+ 0xc7, 0x8a, 0xb0, 0x05, 0xe8, 0xce, 0x8a, 0xc6,
+ 0x06, 0xab, 0xdb, 0x01, 0xc3, 0xbb, 0xd6, 0x2d,
+ 0xe8, 0xa2, 0x82, 0xe8, 0x31, 0x8c, 0xb9, 0x38,
+ 0x00, 0xb0, 0x10, 0xb4, 0x07, 0xe8, 0xcd, 0x1a,
+ 0xb0, 0x12, 0xe8, 0xd1, 0x1a, 0xb0, 0x14, 0xe8,
+ 0xd3, 0x1a, 0xb0, 0x16, 0xe8, 0xd5, 0x1a, 0xb0,
+ 0x18, 0xe8, 0xd7, 0x1a, 0xb0, 0x1a, 0xe8, 0xd9,
+ 0x1a, 0xb0, 0x1c, 0xe8, 0xdb, 0x1a, 0xb0, 0x1e,
+ 0xe8, 0xdd, 0x1a, 0xb9, 0x02, 0x00, 0xb0, 0x40,
+ 0xe8, 0xdc, 0x1a, 0xb9, 0x03, 0x00, 0xb0, 0x4a,
+ 0xe8, 0xdb, 0x1a, 0xc6, 0x06, 0x35, 0x33, 0x23,
+ 0xc6, 0x06, 0x36, 0x33, 0x32, 0xb8, 0xc7, 0x34,
+ 0xa3, 0x37, 0x33, 0xb8, 0xd4, 0x64, 0xa3, 0x39,
+ 0x33, 0xc6, 0x06, 0xe6, 0x1c, 0xd1, 0xb0, 0x01,
+ 0xb4, 0x03, 0xe8, 0x62, 0x8f, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x04, 0x05, 0x02, 0xc7, 0x47, 0x06,
+ 0x06, 0x02, 0xb9, 0x04, 0x02, 0xe8, 0xd7, 0x8b,
+ 0xe8, 0xf8, 0x1b, 0xe8, 0x4e, 0x1b, 0xe8, 0xd8,
+ 0xae, 0xb0, 0x02, 0xe8, 0x3f, 0x8a, 0xb0, 0x03,
+ 0xe8, 0x3a, 0x8a, 0xb8, 0x03, 0x00, 0xe8, 0xc8,
+ 0x9e, 0xe8, 0xdc, 0x9e, 0xb8, 0x04, 0x00, 0xe8,
+ 0xbf, 0x9e, 0xe8, 0xd3, 0x9e, 0xb0, 0x02, 0xe8,
+ 0x86, 0x97, 0xc6, 0x06, 0x96, 0xdb, 0x01, 0xc3,
+ 0xbb, 0x2f, 0x3b, 0xe8, 0x87, 0x10, 0xe8, 0x86,
+ 0x8b, 0xb4, 0x02, 0xb0, 0x04, 0xe8, 0x36, 0x8f,
+ 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x08, 0xe8,
+ 0x1b, 0x1a, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x75, 0x02, 0xb9, 0x73, 0x02, 0xe8, 0x12, 0x8b,
+ 0xb9, 0x29, 0x00, 0xb0, 0x0a, 0xb4, 0x06, 0xe8,
+ 0x03, 0x1a, 0xb0, 0x2f, 0xe8, 0x07, 0x1a, 0xb9,
+ 0x37, 0x00, 0xb0, 0x34, 0xe8, 0x06, 0x1a, 0x80,
+ 0x3e, 0xa8, 0xdb, 0x01, 0x74, 0x15, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0x76, 0x02, 0xb9, 0x74,
+ 0x02, 0xe8, 0x09, 0x8b, 0xbb, 0x59, 0x3b, 0xe8,
+ 0x33, 0x10, 0xc3, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x7a, 0x02, 0xb9, 0x74, 0x02, 0xe8, 0xd1,
+ 0x8a, 0xb0, 0x04, 0xe8, 0xaf, 0x89, 0xe8, 0x5a,
+ 0x1b, 0xe8, 0x62, 0x1a, 0xe8, 0x3a, 0xae, 0xb8,
+ 0x02, 0x00, 0xe8, 0x34, 0x9e, 0xe8, 0x48, 0x9e,
+ 0xbb, 0x6c, 0x3b, 0xe8, 0x07, 0x10, 0xc6, 0x06,
+ 0xa9, 0xdb, 0x01, 0xc3, 0x80, 0x3e, 0xab, 0xdb,
+ 0x01, 0x75, 0x07, 0xbb, 0x0b, 0x3c, 0xe8, 0xf4,
+ 0x0f, 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x0b, 0xb4,
+ 0x06, 0xe8, 0x91, 0x19, 0xb9, 0x31, 0x00, 0xb0,
+ 0x15, 0xe8, 0x92, 0x19, 0xe8, 0xe0, 0x8a, 0xc7,
+ 0x06, 0xb1, 0x64, 0x63, 0x00, 0xb9, 0x78, 0x02,
+ 0xe8, 0x7f, 0x8a, 0xe8, 0x62, 0xaf, 0xc6, 0x47,
+ 0x05, 0x28, 0xe8, 0xa3, 0x1d, 0xc7, 0x06, 0xaf,
+ 0x64, 0xe9, 0x00, 0xc7, 0x06, 0xb1, 0x64, 0x8b,
+ 0x00, 0xb9, 0x79, 0x02, 0xe8, 0x86, 0x8a, 0xc6,
+ 0x06, 0xa8, 0xdb, 0x01, 0xb0, 0x2f, 0xe8, 0x9f,
+ 0x96, 0x80, 0x3e, 0xaa, 0xdb, 0x01, 0x74, 0x0b,
+ 0xc6, 0x06, 0xaa, 0xdb, 0x01, 0xbb, 0x8b, 0x3b,
+ 0xe8, 0x9a, 0x0f, 0xc3, 0xb9, 0x05, 0x00, 0xb0,
+ 0x03, 0xb4, 0x0c, 0xe8, 0x37, 0x19, 0xb9, 0x06,
+ 0x00, 0xb0, 0x09, 0xe8, 0x38, 0x19, 0xb9, 0x27,
+ 0x03, 0xe8, 0x1b, 0x8a, 0xe8, 0x11, 0xaf, 0xc6,
+ 0x07, 0x53, 0xe8, 0x53, 0x1d, 0xe8, 0x4c, 0x8a,
+ 0xb0, 0x49, 0xe8, 0x63, 0x96, 0xb0, 0x02, 0xe8,
+ 0xfb, 0x88, 0xb0, 0x03, 0xe8, 0xea, 0x88, 0xc6,
+ 0x06, 0xef, 0xdb, 0x01, 0xc3, 0xbb, 0x8e, 0x4e,
+ 0xe8, 0x5a, 0x0f, 0xc3, 0xe8, 0x67, 0x00, 0x80,
+ 0x3e, 0xd2, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xc3,
+ 0x50, 0xe8, 0x49, 0x0f, 0xc3, 0x80, 0x3e, 0xcb,
+ 0xdb, 0x01, 0x74, 0x07, 0xbb, 0x01, 0x51, 0xe8,
+ 0x3b, 0x0f, 0xc3, 0xbb, 0xe1, 0x50, 0xe8, 0x34,
+ 0x0f, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04,
+ 0xe8, 0xd2, 0x18, 0xb0, 0x27, 0xe8, 0xd6, 0x18,
+ 0xc6, 0x06, 0xe6, 0x1c, 0xd0, 0xc6, 0x06, 0x35,
+ 0x33, 0x09, 0xc6, 0x06, 0x36, 0x33, 0x23, 0xb8,
+ 0x24, 0x51, 0xa3, 0x37, 0x33, 0xb8, 0xc4, 0x9d,
+ 0xa3, 0x39, 0x33, 0xb9, 0xd8, 0x02, 0xe8, 0x1e,
+ 0x8a, 0xe8, 0xd8, 0x89, 0xe8, 0xea, 0x87, 0xbb,
+ 0x17, 0x3d, 0xe8, 0x68, 0x80, 0xc6, 0x06, 0xd2,
+ 0xdb, 0x01, 0xe8, 0x10, 0x00, 0xc3, 0x80, 0x3e,
+ 0xd1, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0xa6, 0x50,
+ 0xe8, 0xe2, 0x0e, 0x58, 0xc3, 0x80, 0x3e, 0xd2,
+ 0xdb, 0x00, 0x74, 0x4e, 0x80, 0x3e, 0xd3, 0xdb,
+ 0x00, 0x74, 0x47, 0x80, 0x3e, 0xd4, 0xdb, 0x00,
+ 0x74, 0x40, 0xb8, 0x01, 0x01, 0xe8, 0x7e, 0x8d,
+ 0xb9, 0x59, 0x00, 0xb0, 0x02, 0xb4, 0x03, 0xe8,
+ 0x63, 0x18, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xdb,
+ 0x02, 0xb0, 0x01, 0xe8, 0x7a, 0x88, 0xe8, 0x43,
+ 0x19, 0xe8, 0x3c, 0xae, 0xc6, 0x07, 0x46, 0xe8,
+ 0xc2, 0x1c, 0xb8, 0x01, 0x00, 0xe8, 0xc1, 0x9c,
+ 0xe8, 0xd5, 0x9c, 0xb0, 0x01, 0xe8, 0x25, 0x88,
+ 0xb0, 0x02, 0xe8, 0x14, 0x88, 0xb0, 0x03, 0xe8,
+ 0x0f, 0x88, 0xc3, 0xe8, 0x98, 0xff, 0x80, 0x3e,
+ 0xd3, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xc3, 0x50,
+ 0xe8, 0x7a, 0x0e, 0xc3, 0xbb, 0x38, 0x51, 0xe8,
+ 0x73, 0x0e, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x04, 0xe8, 0x11, 0x18, 0xb0, 0x17, 0xe8, 0x15,
+ 0x18, 0xb9, 0xd9, 0x02, 0xe8, 0x19, 0x89, 0xe8,
+ 0x47, 0x87, 0xbb, 0x70, 0x3d, 0xe8, 0xc5, 0x7f,
+ 0xc6, 0x06, 0xd3, 0xdb, 0x01, 0xe8, 0x6d, 0xff,
+ 0xc3, 0xe8, 0x5a, 0xff, 0x80, 0x3e, 0xd4, 0xdb,
+ 0x01, 0x75, 0x07, 0xbb, 0xc3, 0x50, 0xe8, 0x3c,
+ 0x0e, 0xc3, 0xbb, 0x61, 0x51, 0xe8, 0x35, 0x0e,
+ 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04, 0xe8,
+ 0xd3, 0x17, 0xb0, 0x19, 0xe8, 0xd7, 0x17, 0xb9,
+ 0xda, 0x02, 0xe8, 0xdb, 0x88, 0xe8, 0x09, 0x87,
+ 0xbb, 0xd6, 0x3d, 0xe8, 0x87, 0x7f, 0xc6, 0x06,
+ 0xd4, 0xdb, 0x01, 0xe8, 0x2f, 0xff, 0xc3, 0xbb,
+ 0xfa, 0x4e, 0xe8, 0x08, 0x0e, 0xc3, 0xe8, 0x06,
+ 0x89, 0xe8, 0x94, 0xad, 0xc6, 0x47, 0x02, 0x40,
+ 0xe8, 0x19, 0x1c, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x0a, 0xe8, 0x98, 0x17, 0xb9, 0x34, 0x00,
+ 0xb0, 0x0a, 0xe8, 0x99, 0x17, 0xb9, 0xc7, 0x02,
+ 0xe8, 0xa4, 0x88, 0x8b, 0x36, 0xaf, 0x64, 0x8b,
+ 0x3e, 0xb1, 0x64, 0xc6, 0x06, 0xc3, 0x64, 0x04,
+ 0xe8, 0xa8, 0xa3, 0xe8, 0x98, 0x86, 0xbb, 0x21,
+ 0x3b, 0xe8, 0x39, 0x7f, 0xbe, 0x2c, 0x01, 0xbf,
+ 0xbe, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x04, 0xe8,
+ 0x91, 0xa3, 0xb0, 0x40, 0xe8, 0xa9, 0x94, 0xb0,
+ 0x08, 0xe8, 0x41, 0x87, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0xc8, 0x02, 0xb0, 0x01, 0xe8, 0x70, 0x87,
+ 0xe8, 0x35, 0xad, 0xc6, 0x47, 0x02, 0x00, 0xe8,
+ 0xba, 0x1b, 0xb9, 0x0f, 0x00, 0xb0, 0x1a, 0xb4,
+ 0x02, 0xe8, 0x39, 0x17, 0xb0, 0x1c, 0xe8, 0x3d,
+ 0x17, 0xb9, 0x10, 0x00, 0xb0, 0x25, 0xe8, 0x3c,
+ 0x17, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xc9, 0x02,
+ 0xb0, 0x01, 0xe8, 0x43, 0x87, 0xe8, 0xbe, 0x17,
+ 0xe8, 0x3b, 0x86, 0xbb, 0x0d, 0x3c, 0xe8, 0xdc,
+ 0x7e, 0xb9, 0x55, 0x00, 0xb0, 0x02, 0xb4, 0x03,
+ 0xe8, 0x0a, 0x17, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0xca, 0x02, 0xb0, 0x01, 0xe8, 0x21, 0x87, 0xe8,
+ 0xea, 0x17, 0xb8, 0x01, 0x00, 0xe8, 0x71, 0x9b,
+ 0xe8, 0x85, 0x9b, 0xb0, 0x01, 0xe8, 0xd5, 0x86,
+ 0xb9, 0x51, 0x00, 0xba, 0xa0, 0x00, 0xb0, 0x02,
+ 0xb4, 0x04, 0xe8, 0xe8, 0x86, 0xb9, 0x3f, 0x00,
+ 0xba, 0xa8, 0x00, 0xb0, 0x03, 0xb4, 0x04, 0xe8,
+ 0xdb, 0x86, 0xb9, 0x69, 0x00, 0xba, 0xa0, 0x00,
+ 0xb0, 0x0a, 0xb4, 0x01, 0xe8, 0xce, 0x86, 0xc6,
+ 0x06, 0xcc, 0xdb, 0x01, 0xc3, 0xe8, 0xa0, 0xdd,
+ 0x80, 0x3e, 0xcd, 0xdb, 0x01, 0x75, 0x07, 0xbb,
+ 0x3d, 0x4f, 0xe8, 0x08, 0x0d, 0xc3, 0xe8, 0x06,
+ 0x88, 0xe8, 0x94, 0xac, 0xc6, 0x47, 0x01, 0x00,
+ 0xe8, 0x19, 0x1b, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x07, 0xe8, 0x98, 0x16, 0xb0, 0x21, 0xe8,
+ 0xcd, 0x16, 0xb9, 0x18, 0x00, 0xb0, 0x0d, 0xe8,
+ 0x94, 0x16, 0xb0, 0x13, 0xe8, 0x96, 0x16, 0xb0,
+ 0x17, 0xe8, 0x9f, 0x16, 0xb0, 0x1a, 0xe8, 0xa8,
+ 0x16, 0xb0, 0x1d, 0xe8, 0xaa, 0x16, 0xb9, 0x17,
+ 0x00, 0xb0, 0x15, 0xe8, 0x86, 0x16, 0xb9, 0x4a,
+ 0x00, 0xb0, 0x19, 0xe8, 0x8c, 0x16, 0xb9, 0xcc,
+ 0x02, 0xe8, 0x56, 0x87, 0xe8, 0x49, 0xac, 0xc6,
+ 0x47, 0x01, 0x42, 0xe8, 0x8a, 0x1a, 0xe8, 0x83,
+ 0x87, 0xc6, 0x06, 0xcd, 0xdb, 0x01, 0xc3, 0xe8,
+ 0x2e, 0xdd, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x03, 0xe8, 0x41, 0x16, 0xb9, 0x56, 0x00, 0xb0,
+ 0x0b, 0xe8, 0x42, 0x16, 0xb9, 0xd0, 0x02, 0xe8,
+ 0x54, 0x87, 0xb0, 0x44, 0xe8, 0x69, 0x93, 0xb0,
+ 0x37, 0xe8, 0x74, 0x93, 0xc3, 0xe8, 0x7f, 0x87,
+ 0xe8, 0x0d, 0xac, 0xc6, 0x47, 0x04, 0x00, 0xe8,
+ 0x92, 0x1a, 0xb9, 0x57, 0x00, 0xb0, 0x07, 0xb4,
+ 0x08, 0xe8, 0x11, 0x16, 0xb9, 0xd2, 0x02, 0xe8,
+ 0x25, 0x87, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4,
+ 0x09, 0xe8, 0x01, 0x16, 0xb9, 0x58, 0x00, 0xb0,
+ 0x0c, 0xe8, 0x02, 0x16, 0xb9, 0x57, 0x00, 0xb0,
+ 0x18, 0xe8, 0x01, 0x16, 0xb9, 0xd3, 0x02, 0xe8,
+ 0x05, 0x87, 0xbb, 0x2b, 0x50, 0xe8, 0x3d, 0x0c,
+ 0xe8, 0x3a, 0x8b, 0xb9, 0x59, 0x00, 0xb0, 0x04,
+ 0xb4, 0x08, 0xe8, 0xd8, 0x15, 0xb9, 0xd4, 0x02,
+ 0xe8, 0xc7, 0x86, 0xe8, 0xba, 0xab, 0xc6, 0x47,
+ 0x04, 0x44, 0xe8, 0xfb, 0x19, 0xe8, 0xf4, 0x86,
+ 0xbb, 0x3e, 0x50, 0xe8, 0x17, 0x0c, 0xb0, 0x44,
+ 0xe8, 0x05, 0x93, 0xc6, 0x06, 0xd0, 0xdb, 0x01,
+ 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x04, 0xb4, 0x03,
+ 0xe8, 0xaa, 0x15, 0xb9, 0x3f, 0x00, 0xb0, 0x0c,
+ 0xe8, 0xab, 0x15, 0xb9, 0xd6, 0x02, 0xe8, 0xbd,
+ 0x86, 0xbb, 0x8a, 0x50, 0xe8, 0xee, 0x0b, 0xb0,
+ 0x45, 0xe8, 0xdc, 0x92, 0xb0, 0x46, 0xe8, 0xc7,
+ 0x92, 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x04, 0xb4,
+ 0x0e, 0xe8, 0x81, 0x15, 0xb9, 0x13, 0x00, 0xb0,
+ 0x0e, 0xe8, 0x82, 0x15, 0xb9, 0x19, 0x03, 0xe8,
+ 0x86, 0x86, 0xbb, 0x18, 0x52, 0xe8, 0xc5, 0x0b,
+ 0xb0, 0x3c, 0xe8, 0xb3, 0x92, 0xc6, 0x06, 0xd6,
+ 0xdb, 0x01, 0xc3, 0x80, 0x3e, 0xd6, 0xdb, 0x02,
+ 0x74, 0x07, 0xbb, 0x4f, 0x52, 0xe8, 0xad, 0x0b,
+ 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x04, 0xb4, 0x0e,
+ 0xe8, 0x4a, 0x15, 0xb0, 0x19, 0xe8, 0x4e, 0x15,
+ 0xb9, 0x22, 0x03, 0xe8, 0x52, 0x86, 0xbb, 0x72,
+ 0x52, 0xe8, 0x91, 0x0b, 0xb0, 0x3e, 0xe8, 0x7f,
+ 0x92, 0xb0, 0x4a, 0xe8, 0x6a, 0x92, 0xb0, 0x41,
+ 0xe8, 0x65, 0x92, 0xc3, 0xb0, 0x46, 0xe8, 0x93,
+ 0x92, 0x73, 0x39, 0xe8, 0x79, 0x86, 0xe8, 0x07,
+ 0xab, 0xc6, 0x07, 0x00, 0xe8, 0x8d, 0x19, 0xb9,
+ 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04, 0xe8, 0x0c,
+ 0x15, 0xb0, 0x12, 0xe8, 0x17, 0x15, 0xb9, 0x0d,
+ 0x00, 0xb0, 0x0c, 0xe8, 0x08, 0x15, 0xb9, 0x23,
+ 0x03, 0xe8, 0x21, 0x86, 0xb0, 0x07, 0xe8, 0xdc,
+ 0x84, 0xb0, 0x46, 0xe8, 0x3a, 0x92, 0xb0, 0x47,
+ 0xe8, 0x25, 0x92, 0xc3, 0xbb, 0xad, 0x53, 0xe8,
+ 0x3b, 0x0b, 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x04,
+ 0xb4, 0x0e, 0xe8, 0xd8, 0x14, 0xb0, 0x16, 0xe8,
+ 0xdc, 0x14, 0xb9, 0x24, 0x03, 0xe8, 0xe0, 0x85,
+ 0xbb, 0x8b, 0x52, 0xe8, 0x1f, 0x0b, 0xc3, 0xb9,
+ 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04, 0xe8, 0xbc,
+ 0x14, 0xb0, 0x10, 0xe8, 0xc0, 0x14, 0xb9, 0xbf,
+ 0x02, 0xe8, 0xc4, 0x85, 0x80, 0x3e, 0xc8, 0xdb,
+ 0x01, 0x74, 0x07, 0xbb, 0x80, 0x4d, 0xe8, 0xfc,
+ 0x0a, 0xc3, 0x80, 0x3e, 0xc6, 0xdb, 0x00, 0x74,
+ 0x22, 0xc6, 0x06, 0xc6, 0xdb, 0x00, 0x80, 0x3e,
+ 0xc5, 0xdb, 0x01, 0x75, 0x15, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0xbd, 0x02, 0xb0, 0x01, 0xe8, 0xae,
+ 0x84, 0xe8, 0x70, 0x15, 0xbb, 0xa6, 0x4d, 0xe8,
+ 0xd3, 0x0a, 0xc3, 0x80, 0x3e, 0xc5, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0x5b, 0x4d, 0xe8, 0xc5, 0x0a,
+ 0xc3, 0x80, 0x3e, 0xc7, 0xdb, 0x01, 0x74, 0x06,
+ 0xbb, 0x93, 0x4d, 0xe8, 0xb7, 0x0a, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0xbe, 0x02, 0xb0, 0x01, 0xe8,
+ 0x7d, 0x84, 0xe8, 0x3f, 0x15, 0xc6, 0x06, 0xc6,
+ 0xdb, 0x01, 0x80, 0x3e, 0xc7, 0xdb, 0x01, 0x74,
+ 0x0e, 0xe8, 0x3f, 0x83, 0xbb, 0x2c, 0x39, 0xe8,
+ 0x03, 0x7c, 0xc6, 0x06, 0xc7, 0xdb, 0x01, 0xc3,
+ 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x06, 0xe8,
+ 0x2b, 0x14, 0xb9, 0x5b, 0x00, 0xb0, 0x0c, 0xe8,
+ 0x2c, 0x14, 0xb9, 0xc2, 0x02, 0xe8, 0x30, 0x85,
+ 0xb0, 0x36, 0xe8, 0x63, 0x91, 0xc6, 0x06, 0xc8,
+ 0xdb, 0x01, 0xc3, 0x80, 0x3e, 0xc6, 0xdb, 0x01,
+ 0x74, 0x07, 0xbb, 0xa5, 0x4e, 0xe8, 0x5d, 0x0a,
+ 0xc3, 0x80, 0x3e, 0xca, 0xdb, 0x01, 0x75, 0x07,
+ 0xbb, 0xe6, 0x4d, 0xe8, 0x4f, 0x0a, 0xc3, 0xb9,
+ 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04, 0xe8, 0xec,
+ 0x13, 0xb0, 0x18, 0xe8, 0xf7, 0x13, 0xb9, 0x5a,
+ 0x00, 0xb0, 0x12, 0xe8, 0xe8, 0x13, 0xb9, 0xc3,
+ 0x02, 0xe8, 0xec, 0x84, 0xb0, 0x3d, 0xe8, 0x0f,
+ 0x91, 0xc6, 0x06, 0xca, 0xdb, 0x01, 0xc3, 0x80,
+ 0x3e, 0xc6, 0xdb, 0x01, 0x74, 0x07, 0xbb, 0xa5,
+ 0x4e, 0xe8, 0x19, 0x0a, 0xc3, 0x80, 0x3e, 0xcb,
+ 0xdb, 0x01, 0x75, 0x07, 0xbb, 0x32, 0x4e, 0xe8,
+ 0x0b, 0x0a, 0xc3, 0xbb, 0x05, 0x4e, 0xe8, 0x04,
+ 0x0a, 0xb9, 0x05, 0x00, 0xb0, 0x03, 0xb4, 0x04,
+ 0xe8, 0xa2, 0x13, 0xb0, 0x1b, 0xe8, 0xa6, 0x13,
+ 0xb9, 0xc4, 0x02, 0xe8, 0xaa, 0x84, 0xc6, 0x06,
+ 0xcb, 0xdb, 0x01, 0xc3, 0xbb, 0x58, 0x4e, 0xe8,
+ 0xe3, 0x09, 0xc3, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x05, 0xe8, 0x80, 0x13, 0xb9, 0x18, 0x00,
+ 0xb0, 0x0a, 0xe8, 0x81, 0x13, 0xb9, 0x1e, 0x03,
+ 0xe8, 0x85, 0x84, 0xb9, 0x3f, 0x00, 0xb0, 0x0b,
+ 0xb4, 0x05, 0xe8, 0x68, 0x13, 0xb9, 0x13, 0x00,
+ 0xb0, 0x14, 0xe8, 0x69, 0x13, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0x1f, 0x03, 0xb0, 0x01, 0xe8, 0x7e,
+ 0x83, 0x50, 0x52, 0xbe, 0x32, 0x00, 0xbf, 0xaa,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8, 0x72,
+ 0x9f, 0x5a, 0x58, 0xbf, 0xc7, 0x32, 0xb3, 0x1b,
+ 0x48, 0xf6, 0xe3, 0x03, 0xf8, 0xe8, 0x43, 0x7c,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x20, 0x03, 0xb0,
+ 0x01, 0xe8, 0x53, 0x83, 0xe8, 0x15, 0x14, 0xe8,
+ 0x7b, 0x88, 0xb9, 0x25, 0x03, 0xe8, 0x12, 0x84,
+ 0xe8, 0xb0, 0x14, 0xbe, 0x32, 0x00, 0xbf, 0xaa,
+ 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x03, 0xe8, 0x3a,
+ 0x9f, 0xbb, 0x49, 0x53, 0xe8, 0x5e, 0x09, 0xc7,
+ 0x06, 0xaf, 0x64, 0x69, 0x00, 0xc7, 0x06, 0xb1,
+ 0x64, 0x9d, 0x00, 0xc6, 0x06, 0xcb, 0x64, 0x00,
+ 0xc6, 0x06, 0xcc, 0x64, 0x00, 0xc6, 0x06, 0xdc,
+ 0x64, 0x01, 0xe8, 0x64, 0xa7, 0xb9, 0x03, 0x00,
+ 0xe8, 0x30, 0x1a, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0xaa, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x0b, 0x00,
+ 0xe8, 0xea, 0x15, 0xe8, 0x61, 0x80, 0xbb, 0x09,
+ 0x84, 0xe8, 0x91, 0x7a, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0xab, 0x03, 0xb9, 0xae, 0x03, 0xe8, 0xc1,
+ 0x83, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xab, 0x03,
+ 0xc7, 0x47, 0x02, 0xa7, 0x03, 0xb9, 0xaf, 0x03,
+ 0xe8, 0xaf, 0x83, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0xac, 0x03, 0xc7, 0x47, 0x02, 0xa8, 0x03, 0xb9,
+ 0xb0, 0x03, 0xe8, 0x9d, 0x83, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0xad, 0x03, 0xc7, 0x47, 0x02, 0xa9,
+ 0x03, 0xb9, 0xb1, 0x03, 0xe8, 0x8b, 0x83, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0x00, 0x00, 0xe8, 0xab,
+ 0x83, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xb2, 0x03,
+ 0xb0, 0x01, 0xe8, 0xd5, 0x82, 0xe8, 0xff, 0x7f,
+ 0xbb, 0x4f, 0x84, 0xe8, 0x2f, 0x7a, 0xbb, 0x47,
+ 0x33, 0xc7, 0x07, 0xb2, 0x03, 0xb0, 0x01, 0xe8,
+ 0xc0, 0x82, 0xe8, 0xea, 0x7f, 0xbb, 0xc7, 0x87,
+ 0xe8, 0x1a, 0x7a, 0xb9, 0x18, 0x00, 0xb0, 0x07,
+ 0xb4, 0x05, 0xe8, 0x48, 0x12, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0xb4, 0x03, 0xb9, 0xb3, 0x03, 0xe8,
+ 0x40, 0x83, 0xe8, 0xce, 0x13, 0xe8, 0xd6, 0x12,
+ 0xc7, 0x06, 0xaf, 0x64, 0xc6, 0x00, 0xc7, 0x06,
+ 0xb1, 0x64, 0xba, 0x00, 0xc6, 0x06, 0xcd, 0x64,
+ 0x00, 0xc6, 0x06, 0xdc, 0x64, 0x00, 0xc6, 0x06,
+ 0xcb, 0x64, 0x01, 0xe8, 0x93, 0xa6, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x28, 0x00, 0xe8, 0x26, 0x15, 0xe8,
+ 0xe5, 0x7e, 0xbb, 0x90, 0x88, 0xe8, 0xcd, 0x79,
+ 0xe8, 0x0a, 0x7f, 0xbb, 0x2f, 0x8a, 0xe8, 0xc4,
+ 0x79, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x9b, 0x03,
+ 0xb0, 0x01, 0xe8, 0x55, 0x82, 0xe8, 0xc7, 0x7e,
+ 0xbb, 0xa7, 0x8a, 0xe8, 0xaf, 0x79, 0xbe, 0xed,
+ 0x00, 0xbf, 0xba, 0x00, 0xe8, 0x0c, 0x9e, 0xbe,
+ 0xed, 0x00, 0xbf, 0xb1, 0x00, 0xe8, 0x03, 0x9e,
+ 0xbe, 0xc0, 0x00, 0xbf, 0xb1, 0x00, 0xe8, 0xfa,
+ 0x9d, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xb5, 0x03,
+ 0xb0, 0x01, 0xe8, 0x25, 0x82, 0xc6, 0x06, 0x45,
+ 0x33, 0xe7, 0xb0, 0x01, 0xbe, 0xb6, 0x03, 0xbb,
+ 0xf6, 0x8a, 0xe8, 0xaa, 0x7d, 0xb9, 0x20, 0x00,
+ 0xb0, 0x05, 0xb4, 0x09, 0xe8, 0xa6, 0x11, 0xb9,
+ 0x28, 0x00, 0xb0, 0x0e, 0xe8, 0xa7, 0x11, 0xbb,
+ 0x47, 0x33, 0xc7, 0x07, 0xb7, 0x03, 0xb9, 0xb8,
+ 0x03, 0xe8, 0x96, 0x82, 0xe8, 0x24, 0x13, 0xb9,
+ 0x0b, 0x00, 0xe8, 0xd6, 0x18, 0xe8, 0x44, 0x69,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xb9, 0x03, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x27, 0x00, 0xe8, 0x84, 0x14,
+ 0xc6, 0x06, 0x45, 0x33, 0xe3, 0xb0, 0x01, 0xbe,
+ 0xb9, 0x03, 0xbb, 0x4d, 0x8b, 0xe8, 0x5f, 0x7d,
+ 0xb9, 0x05, 0x00, 0xb0, 0x0f, 0xb4, 0x08, 0xe8,
+ 0x5b, 0x11, 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xba,
+ 0x03, 0xb0, 0x01, 0xe8, 0xb4, 0x81, 0xb0, 0x01,
+ 0xbe, 0xbb, 0x03, 0xbb, 0x7a, 0x8b, 0xe8, 0x3e,
+ 0x7d, 0x8b, 0x16, 0xb3, 0x32, 0xbe, 0x00, 0xfa,
+ 0xb0, 0xfe, 0xe8, 0x5d, 0x0e, 0xff, 0x36, 0xa8,
+ 0x64, 0xc6, 0x06, 0xa8, 0x64, 0x00, 0xb8, 0x64,
+ 0x00, 0xe8, 0x88, 0x86, 0xe8, 0x62, 0x69, 0x8f,
+ 0x06, 0xa8, 0x64, 0xb9, 0x02, 0x00, 0xe8, 0x6a,
+ 0x18, 0xbb, 0x7c, 0xe4, 0xe8, 0xf7, 0x6c, 0x2e,
+ 0x80, 0x3e, 0xd7, 0x00, 0x80, 0x73, 0xf8, 0x2e,
+ 0x80, 0x3e, 0xd7, 0x00, 0x00, 0x74, 0xf0, 0xe9,
+ 0xad, 0x68, 0xb0, 0x03, 0xe8, 0x49, 0x8e, 0xb0,
+ 0x04, 0xe8, 0x34, 0x8e, 0xb0, 0x23, 0xe8, 0x2f,
+ 0x8e, 0xbb, 0x68, 0x34, 0xe8, 0x46, 0x07, 0xc3,
+ 0xb0, 0x04, 0xe8, 0x33, 0x8e, 0xb0, 0x05, 0xe8,
+ 0x1e, 0x8e, 0xbb, 0x90, 0x34, 0xe8, 0x35, 0x07,
+ 0xc3, 0xa1, 0xf3, 0xb4, 0x3d, 0x0f, 0x00, 0x74,
+ 0x0f, 0xbb, 0xce, 0x38, 0x3d, 0x10, 0x00, 0x74,
+ 0x03, 0xbb, 0xa7, 0x38, 0xe8, 0x1e, 0x07, 0xc3,
+ 0xbe, 0x9c, 0x00, 0xbf, 0xb4, 0x00, 0xc6, 0x06,
+ 0xc3, 0x64, 0x03, 0xe8, 0xe5, 0x9c, 0xb9, 0x05,
+ 0x00, 0xb0, 0x03, 0xb4, 0x07, 0xe8, 0xad, 0x10,
+ 0xb9, 0x26, 0x00, 0xb0, 0x10, 0xe8, 0xae, 0x10,
+ 0xb0, 0x16, 0xe8, 0xb0, 0x10, 0xb9, 0x66, 0x02,
+ 0xe8, 0x8c, 0x81, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x07, 0xe8, 0x90, 0x10, 0xb9, 0x2c, 0x00,
+ 0xb0, 0x0a, 0xe8, 0x91, 0x10, 0xb9, 0x14, 0x00,
+ 0xb0, 0x1a, 0xe8, 0x90, 0x10, 0xb9, 0x67, 0x02,
+ 0xe8, 0x6f, 0x81, 0xe8, 0x0d, 0x12, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x11, 0x00, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x01, 0xe8, 0x93, 0x12, 0xb9, 0x40, 0x00, 0xb4,
+ 0x07, 0xb0, 0x01, 0xe8, 0x5f, 0x10, 0xb0, 0x15,
+ 0xe8, 0x63, 0x10, 0xb0, 0x2a, 0xe8, 0x65, 0x10,
+ 0xb0, 0x3f, 0xe8, 0x67, 0x10, 0xb9, 0x69, 0x02,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x01, 0xc7, 0x06, 0x1f,
+ 0xc4, 0x00, 0x00, 0xe8, 0x87, 0x10, 0xe8, 0x9b,
+ 0x10, 0xe8, 0x0f, 0x10, 0xc7, 0x06, 0x23, 0xc4,
+ 0x05, 0x00, 0xc7, 0x06, 0x3b, 0x33, 0x00, 0x00,
+ 0xc7, 0x06, 0x3d, 0x33, 0x14, 0x00, 0xc6, 0x06,
+ 0xce, 0x00, 0x02, 0xe8, 0xe7, 0x82, 0x73, 0x3d,
+ 0xb9, 0x40, 0x00, 0xb4, 0x07, 0xb0, 0x01, 0xe8,
+ 0x13, 0x10, 0xb9, 0x6a, 0x02, 0xe8, 0x02, 0x81,
+ 0xb0, 0x05, 0xe8, 0xf0, 0x7f, 0xe8, 0xf0, 0xa5,
+ 0xc6, 0x07, 0x00, 0xe8, 0x32, 0x14, 0xb9, 0x1f,
+ 0x00, 0xb0, 0x01, 0xb4, 0x07, 0xe8, 0xf5, 0x0f,
+ 0xb9, 0x6b, 0x02, 0xe8, 0xe4, 0x80, 0xe8, 0x69,
+ 0x00, 0xb0, 0x2a, 0xe8, 0x22, 0x8d, 0xbb, 0x89,
+ 0x39, 0xe8, 0x39, 0x06, 0xc3, 0x51, 0xe8, 0x59,
+ 0x00, 0x59, 0x80, 0x3e, 0xcf, 0x00, 0x00, 0x74,
+ 0x20, 0x80, 0x3e, 0xcf, 0x00, 0x04, 0x74, 0x0d,
+ 0xbb, 0x32, 0x39, 0x83, 0xf9, 0x05, 0x74, 0x08,
+ 0xbb, 0xff, 0x38, 0xeb, 0x03, 0xbb, 0xdb, 0x38,
+ 0xc6, 0x06, 0xcf, 0x00, 0x00, 0xe8, 0x0d, 0x06,
+ 0xc3, 0xfe, 0x06, 0xa6, 0xdb, 0xa0, 0xa6, 0xdb,
+ 0xbb, 0xae, 0x39, 0x3c, 0x01, 0x74, 0x1f, 0xbb,
+ 0xf6, 0x39, 0x3c, 0x02, 0x74, 0x18, 0xbb, 0x28,
+ 0x3a, 0x3c, 0x03, 0x74, 0x11, 0xbb, 0x5a, 0x3a,
+ 0x3c, 0x04, 0x74, 0x0a, 0xbb, 0x85, 0x3a, 0x3c,
+ 0x05, 0x74, 0x03, 0xbb, 0xb7, 0x3a, 0xe8, 0xdc,
+ 0x05, 0xc3, 0xe8, 0x16, 0x11, 0xc7, 0x06, 0xf3,
+ 0xb4, 0x0f, 0x00, 0xe8, 0x86, 0x12, 0xc7, 0x06,
+ 0xaf, 0x64, 0x9c, 0x00, 0xc7, 0x06, 0xb1, 0x64,
+ 0xb4, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x03, 0xc6,
+ 0x06, 0xcb, 0x64, 0x01, 0xc6, 0x06, 0xcd, 0x64,
+ 0x01, 0xb9, 0x05, 0x00, 0xb0, 0x05, 0xb4, 0x07,
+ 0xe8, 0x52, 0x0f, 0xb9, 0x26, 0x00, 0xb0, 0x0e,
+ 0xe8, 0x53, 0x0f, 0xb9, 0x26, 0x00, 0xb0, 0x14,
+ 0xe8, 0x52, 0x0f, 0xb9, 0x05, 0x00, 0xb0, 0x19,
+ 0xe8, 0x51, 0x0f, 0xb9, 0x68, 0x02, 0xe8, 0x47,
+ 0x80, 0xc3, 0xa1, 0xf3, 0xb4, 0x3d, 0x0d, 0x00,
+ 0x74, 0x07, 0xbb, 0x58, 0x3c, 0xe8, 0x7d, 0x05,
+ 0xc3, 0xe8, 0x7b, 0x80, 0xbe, 0xac, 0x00, 0xbf,
+ 0xb5, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x01, 0xe8,
+ 0x41, 0x9b, 0xb9, 0x1a, 0x00, 0xb0, 0x13, 0xb4,
+ 0x07, 0xe8, 0x09, 0x0f, 0xb0, 0x1e, 0xe8, 0x14,
+ 0x0f, 0xb0, 0x29, 0xe8, 0x1d, 0x0f, 0xb0, 0x34,
+ 0xe8, 0x26, 0x0f, 0xb0, 0x3f, 0xe8, 0x2f, 0x0f,
+ 0xb9, 0x38, 0x00, 0xb0, 0x17, 0xe8, 0xf6, 0x0e,
+ 0xb0, 0x22, 0xe8, 0xff, 0x0e, 0xb0, 0x2d, 0xe8,
+ 0x08, 0x0f, 0xb0, 0x38, 0xe8, 0x11, 0x0f, 0xb9,
+ 0x95, 0x02, 0xe8, 0xcd, 0x7f, 0xbe, 0x14, 0x77,
+ 0xbb, 0x80, 0x3c, 0xc6, 0x06, 0xdc, 0x1c, 0x01,
+ 0xe8, 0xe2, 0x00, 0xb9, 0x38, 0x00, 0xb0, 0x0a,
+ 0xb4, 0x07, 0xe8, 0xc0, 0x0e, 0xb0, 0x15, 0xe8,
+ 0xc4, 0x0e, 0xb9, 0x08, 0x00, 0xb0, 0x30, 0xe8,
+ 0xc3, 0x0e, 0xb9, 0x38, 0x00, 0xb0, 0x75, 0xe8,
+ 0xc2, 0x0e, 0xb0, 0x80, 0xe8, 0xc4, 0x0e, 0xb0,
+ 0x8b, 0xe8, 0xc6, 0x0e, 0xb0, 0x96, 0xe8, 0xc8,
+ 0x0e, 0xb0, 0xa1, 0xe8, 0xca, 0x0e, 0xb0, 0xac,
+ 0xe8, 0xcc, 0x0e, 0xb0, 0xb7, 0xe8, 0xce, 0x0e,
+ 0x83, 0x2e, 0xb1, 0x64, 0x14, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x97, 0x02, 0xb9, 0x96, 0x02,
+ 0xe8, 0x6f, 0x7f, 0xe8, 0x18, 0x0f, 0xe8, 0x5f,
+ 0xa4, 0xc6, 0x47, 0x01, 0x31, 0xe8, 0xa0, 0x12,
+ 0xbe, 0xf5, 0x76, 0xbb, 0x9a, 0x3c, 0xc6, 0x06,
+ 0xdc, 0x1c, 0x01, 0xe8, 0x77, 0x00, 0xc7, 0x06,
+ 0xaf, 0x64, 0xa2, 0x00, 0xc7, 0x06, 0xb1, 0x64,
+ 0xb8, 0x00, 0xb9, 0x1a, 0x00, 0xb0, 0x06, 0xb4,
+ 0x07, 0xe8, 0x49, 0x0e, 0xb0, 0x11, 0xe8, 0x54,
+ 0x0e, 0xb9, 0x38, 0x00, 0xb0, 0x0a, 0xe8, 0x45,
+ 0x0e, 0xb0, 0x15, 0xe8, 0x4e, 0x0e, 0xb9, 0x13,
+ 0x00, 0xb0, 0x1b, 0xe8, 0x4d, 0x0e, 0xb9, 0x18,
+ 0x00, 0xb0, 0x26, 0xe8, 0x4c, 0x0e, 0xb9, 0x17,
+ 0x00, 0xb0, 0x2c, 0xe8, 0x4b, 0x0e, 0xb9, 0x98,
+ 0x02, 0xe8, 0x0e, 0x7f, 0xe8, 0xac, 0x0f, 0xbb,
+ 0x47, 0x33, 0xc7, 0x47, 0x02, 0x99, 0x02, 0xb0,
+ 0x02, 0xe8, 0x2c, 0x7e, 0xe8, 0x5e, 0x83, 0xbb,
+ 0xbc, 0x3c, 0xe8, 0x58, 0x04, 0xe8, 0x55, 0x83,
+ 0xe8, 0x29, 0x7f, 0xe8, 0x4f, 0x83, 0xbb, 0xea,
+ 0x3c, 0xe8, 0x49, 0x04, 0xb0, 0x25, 0xe8, 0x37,
+ 0x8b, 0xe8, 0x31, 0x01, 0xc3, 0x06, 0x53, 0x56,
+ 0xb8, 0x00, 0xa0, 0x8e, 0xc0, 0xe8, 0x25, 0x00,
+ 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d, 0xe8, 0xd7,
+ 0x10, 0x5e, 0x5b, 0xe8, 0x27, 0x08, 0xe8, 0x23,
+ 0x00, 0xb8, 0x96, 0x00, 0xe8, 0x25, 0x83, 0xe8,
+ 0x0b, 0x00, 0xe8, 0x2a, 0x91, 0xe8, 0x80, 0x0c,
+ 0xe8, 0x11, 0x00, 0x07, 0xc3, 0x80, 0x3e, 0xad,
+ 0x64, 0x01, 0x75, 0x04, 0xe8, 0x7d, 0x10, 0xc3,
+ 0xe8, 0x93, 0x10, 0xc3, 0x80, 0x3e, 0xad, 0x64,
+ 0x01, 0x75, 0x04, 0xe8, 0x7b, 0x10, 0xc3, 0xe8,
+ 0x91, 0x10, 0xe8, 0x5c, 0x10, 0xc3, 0xbb, 0x84,
+ 0x49, 0xe8, 0xe9, 0x03, 0xc3, 0xbb, 0xd1, 0x49,
+ 0xe8, 0xe2, 0x03, 0xc6, 0x06, 0xb5, 0xdb, 0x01,
+ 0xc3, 0x83, 0x3e, 0xf3, 0xb4, 0x24, 0x74, 0x07,
+ 0xbb, 0xa9, 0x52, 0xe8, 0xcf, 0x03, 0xc3, 0x80,
+ 0x3e, 0xf1, 0xdb, 0x01, 0x75, 0x07, 0xbb, 0xf6,
+ 0x52, 0xe8, 0xc1, 0x03, 0xc3, 0xc6, 0x06, 0xf1,
+ 0xdb, 0x01, 0xe8, 0xba, 0x7e, 0xbe, 0x66, 0x00,
+ 0xbf, 0xc3, 0x00, 0xc6, 0x06, 0xc3, 0x64, 0x02,
+ 0xe8, 0x80, 0x99, 0xb9, 0x05, 0x00, 0xb0, 0x03,
+ 0xb4, 0x05, 0xe8, 0x48, 0x0d, 0xb9, 0x4b, 0x00,
+ 0xb0, 0x0c, 0xe8, 0x49, 0x0d, 0xb9, 0x1a, 0x03,
+ 0xe8, 0x54, 0x7e, 0xb8, 0x01, 0x00, 0xe8, 0xc7,
+ 0x91, 0x53, 0xe8, 0x88, 0x82, 0xbb, 0x46, 0x67,
+ 0xe8, 0x07, 0xa3, 0x83, 0xc3, 0x03, 0xc7, 0x07,
+ 0x00, 0x00, 0xc7, 0x47, 0x04, 0x00, 0x00, 0x53,
+ 0xbe, 0x97, 0x00, 0xbf, 0xc5, 0x00, 0xc6, 0x06,
+ 0xc3, 0x64, 0x02, 0xe8, 0x3d, 0x99, 0xb9, 0x1b,
+ 0x03, 0xe8, 0xfe, 0x7d, 0xc7, 0x06, 0xaf, 0x64,
+ 0xba, 0x00, 0xff, 0x06, 0xb1, 0x64, 0xe8, 0x2b,
+ 0x7e, 0xbe, 0xdc, 0x00, 0xbf, 0xc6, 0x00, 0xc6,
+ 0x06, 0xc3, 0x64, 0x04, 0xe8, 0x1c, 0x99, 0x5b,
+ 0xc7, 0x47, 0x04, 0xc8, 0x00, 0x5b, 0xc7, 0x07,
+ 0x01, 0x00, 0xb0, 0x02, 0xe8, 0xc6, 0x7c, 0xbb,
+ 0xa9, 0x58, 0xe8, 0xa0, 0x74, 0xb0, 0x01, 0xb4,
+ 0x02, 0xb9, 0x0e, 0x01, 0xba, 0xc1, 0x00, 0xe8,
+ 0xd3, 0x7c, 0xb0, 0x03, 0xb4, 0x01, 0xb9, 0xfe,
+ 0x00, 0xba, 0xc1, 0x00, 0xe8, 0xc6, 0x7c, 0xc6,
+ 0x06, 0xd7, 0xdb, 0x01, 0xc3, 0xe8, 0x06, 0x82,
+ 0xff, 0x06, 0xea, 0xdb, 0xa1, 0xea, 0xdb, 0x3d,
+ 0x07, 0x00, 0x73, 0x3b, 0x2d, 0x02, 0x00, 0xbb,
+ 0x35, 0x60, 0xd1, 0xe0, 0x03, 0xd8, 0xff, 0x36,
+ 0xf3, 0xb4, 0x53, 0xb9, 0x0b, 0x00, 0xe8, 0xe2,
+ 0x13, 0xe8, 0x85, 0x02, 0x5b, 0xff, 0x17, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0x8f, 0x06, 0xf3, 0xb4,
+ 0xb9, 0x06, 0x00, 0xe8, 0xcd, 0x13, 0x83, 0x3e,
+ 0xf3, 0xb4, 0x0b, 0x75, 0x07, 0x83, 0x3e, 0xec,
+ 0xdb, 0x01, 0x74, 0x03, 0xe8, 0x98, 0x0e, 0xc3,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xda, 0x03, 0xc7,
+ 0x47, 0x02, 0xdb, 0x03, 0xc7, 0x06, 0xf3, 0xb4,
+ 0x22, 0x00, 0xe8, 0x67, 0x0f, 0xbb, 0x47, 0x33,
+ 0xc7, 0x07, 0xda, 0x03, 0xc7, 0x47, 0x02, 0xdb,
+ 0x03, 0xb0, 0x01, 0xe8, 0xac, 0x7c, 0xc6, 0x06,
+ 0x45, 0x33, 0xd9, 0xc6, 0x06, 0x46, 0x33, 0xd0,
+ 0xb0, 0x01, 0xb4, 0x02, 0xbe, 0xdc, 0x03, 0xbf,
+ 0xdd, 0x03, 0xbb, 0x60, 0x6f, 0xe8, 0x9e, 0x76,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0xde, 0x03, 0xc7,
+ 0x47, 0x02, 0xdf, 0x03, 0xb0, 0x01, 0xe8, 0x81,
+ 0x7c, 0xe8, 0xba, 0x0c, 0xc3, 0xbb, 0x47, 0x33,
+ 0xc7, 0x47, 0x02, 0x77, 0x03, 0xc7, 0x47, 0x04,
+ 0x78, 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x1e, 0x00,
+ 0xe8, 0x11, 0x0f, 0xbb, 0x47, 0x33, 0xc7, 0x47,
+ 0x02, 0x77, 0x03, 0xc7, 0x47, 0x04, 0x78, 0x03,
+ 0xb0, 0x02, 0xe8, 0x55, 0x7c, 0xc6, 0x06, 0x45,
+ 0x33, 0xd9, 0xb0, 0x02, 0xbe, 0x79, 0x03, 0xbb,
+ 0xb8, 0x6f, 0xe8, 0xda, 0x77, 0xb9, 0x1a, 0x00,
+ 0xb0, 0x03, 0xb4, 0x0a, 0xe8, 0xd6, 0x0b, 0xbb,
+ 0x47, 0x33, 0xc7, 0x47, 0x02, 0x7b, 0x03, 0xc7,
+ 0x47, 0x04, 0x7c, 0x03, 0xb0, 0x03, 0xe8, 0x29,
+ 0x7c, 0xc6, 0x06, 0x45, 0x33, 0xd0, 0xc6, 0x06,
+ 0x46, 0x33, 0xd9, 0xb0, 0x03, 0xb4, 0x02, 0xbe,
+ 0x7a, 0x03, 0xbf, 0x79, 0x03, 0xbb, 0xf0, 0x6f,
+ 0xe8, 0x1b, 0x76, 0xc3, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0x7e, 0x03, 0xc7, 0x47, 0x04, 0x7d,
+ 0x03, 0xc7, 0x06, 0xf3, 0xb4, 0x20, 0x00, 0xe8,
+ 0xa2, 0x0e, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x7e, 0x03, 0xc7, 0x47, 0x04, 0x7d, 0x03, 0xb0,
+ 0x02, 0xe8, 0xe6, 0x7b, 0xc6, 0x06, 0x45, 0x33,
+ 0xd9, 0xb0, 0x03, 0xbe, 0x7f, 0x03, 0xbb, 0x6e,
+ 0x70, 0xe8, 0x6b, 0x77, 0xb9, 0x4b, 0x00, 0xb0,
+ 0x09, 0xb4, 0x0b, 0xe8, 0x67, 0x0b, 0xbb, 0x47,
+ 0x33, 0xc7, 0x47, 0x02, 0x82, 0x03, 0xc7, 0x47,
+ 0x04, 0x81, 0x03, 0xb0, 0x02, 0xe8, 0xba, 0x7b,
+ 0xc6, 0x06, 0x45, 0x33, 0xd0, 0xc6, 0x06, 0x46,
+ 0x33, 0xd9, 0xb0, 0x02, 0xb4, 0x03, 0xbe, 0x80,
+ 0x03, 0xbf, 0x7f, 0x03, 0xbb, 0x96, 0x70, 0xe8,
+ 0xac, 0x75, 0xc3, 0xbb, 0x47, 0x33, 0xc7, 0x07,
+ 0x85, 0x03, 0xc7, 0x47, 0x02, 0x84, 0x03, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x1d, 0x00, 0xe8, 0x34, 0x0e,
+ 0xbb, 0x47, 0x33, 0xc7, 0x07, 0x85, 0x03, 0xc7,
+ 0x47, 0x02, 0x84, 0x03, 0xb0, 0x02, 0xe8, 0x79,
+ 0x7b, 0xc6, 0x06, 0x45, 0x33, 0xd0, 0xc6, 0x06,
+ 0x46, 0x33, 0xd9, 0xb0, 0x01, 0xb4, 0x02, 0xbe,
+ 0x87, 0x03, 0xbf, 0x86, 0x03, 0xbb, 0x61, 0x71,
+ 0xe8, 0x6b, 0x75, 0xb9, 0x38, 0x00, 0xb0, 0x03,
+ 0xb4, 0x04, 0xe8, 0xf0, 0x0a, 0xb0, 0x05, 0xe8,
+ 0xf4, 0x0a, 0xb0, 0x07, 0xe8, 0xf6, 0x0a, 0xb0,
+ 0x09, 0xe8, 0xf8, 0x0a, 0xbb, 0x47, 0x33, 0xc7,
+ 0x07, 0x89, 0x03, 0xc7, 0x47, 0x02, 0x88, 0x03,
+ 0xb0, 0x01, 0xe8, 0x35, 0x7b, 0xb0, 0x01, 0xb4,
+ 0x02, 0xbe, 0x87, 0x03, 0xbf, 0x86, 0x03, 0xbb,
+ 0xc6, 0x71, 0xe8, 0x31, 0x75, 0xc3, 0xff, 0x36,
+ 0xf3, 0xb4, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02,
+ 0x8b, 0x03, 0xc7, 0x47, 0x04, 0x8a, 0x03, 0xc7,
+ 0x06, 0xf3, 0xb4, 0x23, 0x00, 0xe8, 0xb4, 0x0d,
+ 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x8b, 0x03,
+ 0xc7, 0x47, 0x04, 0x8a, 0x03, 0xb0, 0x03, 0xe8,
+ 0xf8, 0x7a, 0xc6, 0x06, 0x45, 0x33, 0xd9, 0xc6,
+ 0x06, 0x46, 0x33, 0xd0, 0xb0, 0x03, 0xb4, 0x02,
+ 0xbe, 0x8c, 0x03, 0xbf, 0x8d, 0x03, 0xbb, 0x43,
+ 0x72, 0xe8, 0xea, 0x74, 0xc6, 0x06, 0x46, 0x33,
+ 0xd9, 0xc6, 0x06, 0x45, 0x33, 0xd0, 0xb0, 0x02,
+ 0xb4, 0x03, 0xbe, 0x8e, 0x03, 0xbf, 0x8c, 0x03,
+ 0xbb, 0x18, 0x73, 0xe8, 0xd0, 0x74, 0xc7, 0x06,
+ 0xf3, 0xb4, 0x0b, 0x00, 0xe8, 0x41, 0xa0, 0xc6,
+ 0x47, 0x03, 0x33, 0xe8, 0x5e, 0x0d, 0x58, 0x3d,
+ 0x0b, 0x00, 0x75, 0x08, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x02, 0xe8, 0xba, 0x88, 0xbb, 0x47, 0x33, 0xc7,
+ 0x47, 0x02, 0x8f, 0x03, 0xb0, 0x02, 0xe8, 0x99,
+ 0x7a, 0xbb, 0x47, 0x33, 0xc7, 0x47, 0x02, 0x83,
+ 0x03, 0xb0, 0x02, 0xe8, 0x51, 0x7a, 0xe8, 0x13,
+ 0x0b, 0xb8, 0xc8, 0x00, 0xe8, 0x5b, 0x7f, 0xb0,
+ 0x08, 0xe8, 0xf5, 0x79, 0xb8, 0x02, 0x08, 0xe8,
+ 0x8f, 0x8e, 0xc7, 0x06, 0xec, 0xdb, 0x01, 0x00,
+ 0xc3, 0x06, 0xb8, 0x00, 0xa0, 0x8e, 0xc0, 0xe8,
+ 0x1d, 0x00, 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d,
+ 0xe8, 0xfd, 0x0c, 0xbe, 0x14, 0x77, 0xbb, 0x0a,
+ 0x58, 0xe8, 0x49, 0x04, 0xe8, 0x17, 0x00, 0xb8,
+ 0x96, 0x00, 0xe8, 0x47, 0x7f, 0x07, 0xc3, 0x80,
+ 0x3e, 0xad, 0x64, 0x01, 0x75, 0x04, 0xe8, 0xab,
+ 0x0c, 0xc3, 0xe8, 0xc1, 0x0c, 0xc3, 0x80, 0x3e,
+ 0xad, 0x64, 0x01, 0x75, 0x04, 0xe8, 0xa9, 0x0c,
+ 0xc3, 0xe8, 0xbf, 0x0c, 0xe8, 0x8a, 0x0c, 0xc3,
+ 0xa1, 0x50, 0x72, 0xe8, 0x07, 0x04, 0x83, 0xc3,
+ 0x13, 0x8a, 0x07, 0x43, 0x0a, 0xc0, 0x75, 0xf9,
+ 0x80, 0x3f, 0x00, 0x74, 0xf4, 0x80, 0x3f, 0x01,
+ 0x75, 0x03, 0xbb, 0x50, 0x34, 0xe8, 0x04, 0x00,
+ 0xe8, 0xb4, 0x00, 0xc3, 0x06, 0xb8, 0xd4, 0x19,
+ 0x8e, 0xc0, 0xe8, 0xe0, 0x02, 0x8b, 0x0e, 0xaf,
+ 0x64, 0x8b, 0xd0, 0x52, 0xd1, 0xea, 0x2b, 0xca,
+ 0x73, 0x03, 0xb9, 0x02, 0x00, 0x26, 0x89, 0x0e,
+ 0x00, 0x00, 0x5a, 0x03, 0xca, 0x81, 0xf9, 0x3f,
+ 0x01, 0x76, 0x0d, 0xb9, 0x3f, 0x01, 0x2b, 0xca,
+ 0x83, 0xe9, 0x02, 0x26, 0x89, 0x0e, 0x00, 0x00,
+ 0x83, 0xee, 0x02, 0x81, 0xfe, 0x04, 0x00, 0x72,
+ 0x0e, 0x26, 0x8b, 0x14, 0x8b, 0xc8, 0x2b, 0xca,
+ 0xd1, 0xe9, 0x26, 0x89, 0x0c, 0xeb, 0xe9, 0xc6,
+ 0x06, 0xe6, 0x1c, 0xd1, 0xe8, 0x77, 0x02, 0xb8,
+ 0x3e, 0x00, 0x8b, 0xc8, 0xf7, 0x26, 0xd8, 0x64,
+ 0xf7, 0x36, 0xda, 0x64, 0x2b, 0xc8, 0xa1, 0xb1,
+ 0x64, 0x2b, 0xc1, 0x72, 0x12, 0x05, 0x08, 0x00,
+ 0x26, 0x8b, 0x0e, 0x0a, 0x00, 0x41, 0x2d, 0x0b,
+ 0x00, 0x72, 0x04, 0xe2, 0xf9, 0xeb, 0x03, 0xb8,
+ 0x01, 0x00, 0xf7, 0x26, 0xb6, 0x00, 0x26, 0x01,
+ 0x06, 0x00, 0x00, 0xc6, 0x06, 0xdb, 0x1c, 0x02,
+ 0xe8, 0x8b, 0x87, 0xc6, 0x06, 0xdb, 0x1c, 0x03,
+ 0xbb, 0x92, 0x32, 0xa1, 0x96, 0x32, 0x26, 0x8b,
+ 0x0e, 0x0c, 0x00, 0xf7, 0xe1, 0x8b, 0xc8, 0xc1,
+ 0xe9, 0x03, 0x83, 0xc1, 0x3c, 0xe8, 0xdb, 0x07,
+ 0x07, 0xc6, 0x06, 0xe8, 0x64, 0x01, 0xc3, 0xe8,
+ 0xf4, 0x94, 0xe8, 0x70, 0x8a, 0x2e, 0x80, 0x3e,
+ 0xd7, 0x00, 0x01, 0x74, 0x19, 0x80, 0x3e, 0x96,
+ 0x32, 0x00, 0x74, 0x08, 0xbb, 0x92, 0x32, 0xe8,
+ 0xcc, 0x07, 0x72, 0x0a, 0xe8, 0xa4, 0x05, 0x72,
+ 0x05, 0xe8, 0x70, 0x05, 0x73, 0xd9, 0xe8, 0xfc,
+ 0x9c, 0xe8, 0x3d, 0x9d, 0xc6, 0x06, 0xdb, 0x1c,
+ 0x01, 0xc6, 0x06, 0xdc, 0x1c, 0x02, 0xe8, 0x2d,
+ 0x87, 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xc6, 0x06,
+ 0xdb, 0x1c, 0x00, 0xc3, 0x51, 0xe8, 0x04, 0xff,
+ 0x59, 0xbb, 0x92, 0x32, 0xe8, 0x84, 0x07, 0xe8,
+ 0xa4, 0x94, 0xe8, 0x20, 0x8a, 0xbb, 0x92, 0x32,
+ 0xe8, 0x8b, 0x07, 0x72, 0x0a, 0xe8, 0x63, 0x05,
+ 0x72, 0x05, 0xe8, 0x2f, 0x05, 0x73, 0xe8, 0xe8,
+ 0xbc, 0xff, 0xc3, 0xa0, 0x96, 0xda, 0xbf, 0xc7,
+ 0x32, 0xb1, 0x1b, 0x48, 0xf6, 0xe1, 0x03, 0xf8,
+ 0xa1, 0xa4, 0xda, 0x89, 0x05, 0x57, 0xe8, 0xcb,
+ 0xfe, 0x5f, 0x57, 0xa1, 0xa4, 0xda, 0x89, 0x05,
+ 0xe8, 0x6b, 0x94, 0xe8, 0xe7, 0x89, 0x5f, 0x57,
+ 0xa1, 0xa4, 0xda, 0x89, 0x05, 0x2e, 0x80, 0x3e,
+ 0xd7, 0x00, 0x01, 0x74, 0x19, 0x80, 0x3e, 0x96,
+ 0x32, 0x00, 0x74, 0x08, 0xbb, 0x92, 0x32, 0xe8,
+ 0x3c, 0x07, 0x72, 0x0a, 0xe8, 0x14, 0x05, 0x72,
+ 0x05, 0xe8, 0xe0, 0x04, 0x73, 0xcb, 0x5f, 0xe8,
+ 0x6c, 0xff, 0xc3, 0x06, 0xb8, 0xd4, 0x19, 0x8e,
+ 0xc0, 0x57, 0xe8, 0x70, 0x01, 0x5f, 0x50, 0x8b,
+ 0x45, 0x0a, 0x33, 0xd2, 0xf7, 0x36, 0xb6, 0x00,
+ 0x8b, 0x45, 0x0c, 0xd1, 0xe8, 0x03, 0xd0, 0x58,
+ 0x8b, 0xca, 0x8b, 0xd0, 0x52, 0xd1, 0xea, 0x2b,
+ 0xca, 0x73, 0x03, 0xb9, 0x02, 0x00, 0x26, 0x89,
+ 0x0e, 0x00, 0x00, 0x5a, 0x03, 0xca, 0x81, 0xf9,
+ 0x3f, 0x01, 0x76, 0x0b, 0xb9, 0x3f, 0x01, 0x2b,
+ 0xca, 0x49, 0x26, 0x89, 0x0e, 0x00, 0x00, 0x83,
+ 0xee, 0x02, 0x81, 0xfe, 0x04, 0x00, 0x72, 0x0e,
+ 0x26, 0x8b, 0x14, 0x8b, 0xc8, 0x2b, 0xca, 0xd1,
+ 0xe9, 0x26, 0x89, 0x0c, 0xeb, 0xe9, 0x57, 0xa0,
+ 0xe7, 0x1c, 0xa2, 0xe6, 0x1c, 0xe8, 0xf6, 0x00,
+ 0x5f, 0x8b, 0x45, 0x0a, 0x33, 0xd2, 0xf7, 0x36,
+ 0xb6, 0x00, 0x05, 0x08, 0x00, 0x26, 0x8b, 0x0e,
+ 0x0a, 0x00, 0x41, 0x2d, 0x0b, 0x00, 0x72, 0x04,
+ 0xe2, 0xf9, 0xeb, 0x03, 0xb8, 0x01, 0x00, 0xb9,
+ 0x40, 0x01, 0xf7, 0xe1, 0x26, 0x01, 0x06, 0x00,
+ 0x00, 0xc6, 0x06, 0xdb, 0x1c, 0x02, 0xe8, 0x15,
+ 0x86, 0xc6, 0x06, 0xdb, 0x1c, 0x03, 0xbb, 0x92,
+ 0x32, 0xa1, 0x96, 0x32, 0x26, 0x8b, 0x0e, 0x0c,
+ 0x00, 0xf7, 0xe1, 0x8b, 0xc8, 0xc1, 0xe9, 0x03,
+ 0x83, 0xc1, 0x3c, 0xe8, 0x65, 0x06, 0x07, 0xc3,
+ 0x06, 0xb8, 0xd4, 0x19, 0x8e, 0xc0, 0x26, 0x89,
+ 0x36, 0x00, 0x00, 0xe8, 0xb7, 0x00, 0x83, 0xee,
+ 0x02, 0x81, 0xfe, 0x04, 0x00, 0x72, 0x0e, 0x26,
+ 0x8b, 0x14, 0x8b, 0xc8, 0x2b, 0xca, 0xd1, 0xe9,
+ 0x26, 0x89, 0x0c, 0xeb, 0xe9, 0xe8, 0x7e, 0x00,
+ 0xc6, 0x06, 0xdb, 0x1c, 0x02, 0xe8, 0xc6, 0x85,
+ 0xc6, 0x06, 0xdb, 0x1c, 0x03, 0xbb, 0x92, 0x32,
+ 0xa1, 0x96, 0x32, 0x26, 0x8b, 0x0e, 0x0c, 0x00,
+ 0xf7, 0xe1, 0x8b, 0xc8, 0xc1, 0xe9, 0x03, 0x83,
+ 0xc1, 0x3c, 0xe8, 0x16, 0x06, 0x07, 0xc3, 0x06,
+ 0xb8, 0xd4, 0x19, 0x8e, 0xc0, 0x26, 0x89, 0x36,
+ 0x00, 0x00, 0x53, 0xe8, 0x63, 0x88, 0x5b, 0xe8,
+ 0x75, 0x00, 0x83, 0xee, 0x02, 0x81, 0xfe, 0x04,
+ 0x00, 0x72, 0x0e, 0x26, 0x8b, 0x14, 0x8b, 0xc8,
+ 0x2b, 0xca, 0xd1, 0xe9, 0x26, 0x89, 0x0c, 0xeb,
+ 0xe9, 0xe8, 0x2a, 0x00, 0x07, 0xc3, 0xe8, 0x7f,
+ 0xff, 0xe8, 0x81, 0x88, 0x80, 0x3e, 0x96, 0x32,
+ 0x00, 0x74, 0x08, 0xbb, 0x92, 0x32, 0xe8, 0xe5,
+ 0x05, 0x72, 0x0a, 0xe8, 0x8e, 0x03, 0x72, 0x05,
+ 0xe8, 0xb8, 0x03, 0x73, 0xe4, 0xc6, 0x06, 0xdb,
+ 0x1c, 0x01, 0xe8, 0x51, 0x85, 0xc3, 0xbf, 0x04,
+ 0x00, 0xbe, 0x0e, 0x00, 0x57, 0x56, 0x26, 0x03,
+ 0x35, 0xe8, 0x21, 0x01, 0x5e, 0x5f, 0x81, 0xc6,
+ 0xc0, 0x0d, 0x83, 0xc7, 0x02, 0x43, 0x8a, 0x07,
+ 0x0a, 0xc0, 0x75, 0xe8, 0xc3, 0x53, 0xc6, 0x06,
+ 0xda, 0x1c, 0x01, 0xe8, 0x28, 0x85, 0xc6, 0x06,
+ 0xda, 0x1c, 0x00, 0xe8, 0xeb, 0x87, 0x5b, 0x33,
+ 0xc0, 0x26, 0xa3, 0x0c, 0x00, 0x26, 0xa3, 0x0a,
+ 0x00, 0xbe, 0x04, 0x00, 0x53, 0xe8, 0x40, 0x01,
+ 0x26, 0x01, 0x0e, 0x0c, 0x00, 0x26, 0x89, 0x04,
+ 0x26, 0xff, 0x06, 0x0a, 0x00, 0x83, 0xc6, 0x02,
+ 0x43, 0x8a, 0x07, 0x0a, 0xc0, 0x75, 0xe6, 0x5b,
+ 0x8b, 0xce, 0x33, 0xc0, 0x83, 0xee, 0x02, 0x81,
+ 0xfe, 0x04, 0x00, 0x72, 0x0b, 0x26, 0x8b, 0x14,
+ 0x3b, 0xc2, 0x73, 0xf0, 0x8b, 0xc2, 0xeb, 0xec,
+ 0x8b, 0xf1, 0xc3, 0x8b, 0x0e, 0xc0, 0x00, 0x8b,
+ 0x16, 0xc2, 0x00, 0xa1, 0x52, 0x72, 0xa3, 0x50,
+ 0x72, 0x0b, 0xc0, 0x74, 0x54, 0xc6, 0x06, 0x3d,
+ 0x66, 0x05, 0x83, 0x3e, 0x1f, 0xc4, 0x00, 0x74,
+ 0x12, 0xe8, 0x16, 0x7c, 0x80, 0x3e, 0xdb, 0xbb,
+ 0x01, 0x74, 0x4f, 0xa1, 0x50, 0x72, 0xe8, 0x7c,
+ 0x00, 0xeb, 0x18, 0xc6, 0x06, 0x3d, 0x66, 0x01,
+ 0x0a, 0xdb, 0x74, 0x05, 0xc6, 0x06, 0x3d, 0x66,
+ 0x03, 0xe8, 0x69, 0x00, 0x80, 0x3e, 0x3d, 0x66,
+ 0x01, 0x75, 0x08, 0x8b, 0x77, 0x09, 0x8b, 0x7f,
+ 0x0b, 0xeb, 0x06, 0x8b, 0x77, 0x0d, 0x8b, 0x7f,
+ 0x0f, 0x8a, 0x47, 0x11, 0xa2, 0xc3, 0x64, 0xe8,
+ 0x38, 0x00, 0xe8, 0xa9, 0x97, 0x72, 0x2e, 0xeb,
+ 0x11, 0xc6, 0x06, 0x3d, 0x66, 0x00, 0xc6, 0x06,
+ 0xc3, 0x64, 0x00, 0x8b, 0xf1, 0x8b, 0xfa, 0xe8,
+ 0x24, 0x97, 0xc6, 0x06, 0xc5, 0x64, 0x00, 0xc6,
+ 0x06, 0xc6, 0x64, 0x01, 0x89, 0x36, 0xb7, 0x64,
+ 0x89, 0x3e, 0xb9, 0x64, 0x89, 0x36, 0xbb, 0x64,
+ 0x89, 0x3e, 0xbd, 0x64, 0xc3, 0xb0, 0x36, 0xe9,
+ 0x36, 0x0f, 0x83, 0xfe, 0xff, 0x75, 0x0d, 0x83,
+ 0xff, 0xff, 0x75, 0x08, 0x8b, 0x3e, 0xb1, 0x64,
+ 0x8b, 0x36, 0xaf, 0x64, 0xc3, 0x48, 0xbb, 0x54,
+ 0x72, 0x50, 0xe8, 0x8d, 0x9b, 0x58, 0xd1, 0xe0,
+ 0x03, 0xd8, 0x8b, 0x1f, 0xc3, 0x8a, 0x0f, 0x0a,
+ 0xc9, 0x74, 0x4c, 0x80, 0xe9, 0x1f, 0xb5, 0x00,
+ 0xbf, 0x38, 0x01, 0xd1, 0xe1, 0x03, 0xf9, 0x8b,
+ 0x3d, 0x81, 0xc7, 0x3a, 0x01, 0x8b, 0x0d, 0x83,
+ 0xc7, 0x02, 0x8a, 0x26, 0xe6, 0x1c, 0x51, 0x56,
+ 0x51, 0x56, 0x8a, 0x05, 0x0a, 0xc0, 0x74, 0x0b,
+ 0xfe, 0xc8, 0x0a, 0xc0, 0x74, 0x02, 0x8a, 0xc4,
+ 0x26, 0x88, 0x04, 0x47, 0x46, 0xfe, 0xcd, 0x75,
+ 0xe9, 0x5e, 0x59, 0x81, 0xc6, 0x40, 0x01, 0xfe,
+ 0xc9, 0x75, 0xdd, 0x5e, 0x59, 0x8a, 0xc5, 0xb4,
+ 0x00, 0x03, 0xf0, 0x4e, 0x43, 0xeb, 0xae, 0xc3,
+ 0x52, 0x33, 0xc0, 0x8b, 0xd0, 0x8a, 0x0f, 0x0a,
+ 0xc9, 0x74, 0x1f, 0x42, 0x80, 0xe9, 0x1f, 0xb5,
+ 0x00, 0xbf, 0x38, 0x01, 0xd1, 0xe1, 0x03, 0xf9,
+ 0x8b, 0x3d, 0x81, 0xc7, 0x3a, 0x01, 0x8b, 0x0d,
+ 0x8a, 0xcd, 0xb5, 0x00, 0x03, 0xc1, 0x48, 0x43,
+ 0xeb, 0xdb, 0x8b, 0xca, 0x5a, 0xc3, 0xb8, 0x04,
+ 0x00, 0xe8, 0x87, 0x0c, 0xbb, 0x9e, 0x33, 0xd1,
+ 0xe0, 0x03, 0xd8, 0x8b, 0x1f, 0xe8, 0x6d, 0xfb,
+ 0xc3, 0x33, 0xc0, 0xcd, 0x33, 0x0b, 0xc0, 0x74,
+ 0x01, 0xc3, 0xc6, 0x06, 0xd9, 0x00, 0x01, 0xba,
+ 0x5f, 0x33, 0xb4, 0x09, 0xcd, 0x21, 0xb4, 0x08,
+ 0xcd, 0x21, 0xc3, 0x06, 0xba, 0x00, 0xa0, 0x8e,
+ 0xc2, 0x50, 0xe8, 0xfe, 0x00, 0x58, 0x80, 0x3e,
+ 0xd8, 0x00, 0x00, 0x74, 0x02, 0x07, 0xc3, 0x0a,
+ 0xc0, 0x75, 0x12, 0xa1, 0xc0, 0x00, 0x3b, 0x06,
+ 0xc4, 0x00, 0x75, 0x09, 0xa1, 0xc2, 0x00, 0x3b,
+ 0x06, 0xc6, 0x00, 0x74, 0x58, 0xe8, 0x57, 0x00,
+ 0xba, 0x40, 0x01, 0xa1, 0xc2, 0x00, 0xa3, 0xc6,
+ 0x00, 0xf7, 0xe2, 0x8b, 0xf0, 0xa1, 0xc0, 0x00,
+ 0xa3, 0xc4, 0x00, 0x03, 0xf0, 0x89, 0x36, 0xc8,
+ 0x00, 0xba, 0x08, 0x00, 0xb8, 0x40, 0x01, 0x2b,
+ 0x06, 0xc0, 0x00, 0x3b, 0xc2, 0x77, 0x02, 0x8b,
+ 0xd0, 0xbb, 0xda, 0x00, 0xb9, 0x0c, 0x00, 0x8b,
+ 0xf9, 0x8b, 0xca, 0x8a, 0x07, 0x3c, 0x01, 0x74,
+ 0x03, 0x26, 0x88, 0x04, 0x43, 0x46, 0xe2, 0xf3,
+ 0x8b, 0xcf, 0x81, 0xc6, 0x40, 0x01, 0x83, 0xc3,
+ 0x08, 0x2b, 0xf2, 0x2b, 0xda, 0x81, 0xfe, 0xff,
+ 0xf9, 0x73, 0x02, 0xe2, 0xda, 0x07, 0xc3, 0x1e,
+ 0xba, 0x40, 0x01, 0xa1, 0xc6, 0x00, 0xf7, 0xe2,
+ 0x8b, 0xf0, 0x03, 0x36, 0xc4, 0x00, 0xba, 0x08,
+ 0x00, 0xb8, 0x40, 0x01, 0x2b, 0x06, 0xc4, 0x00,
+ 0x3b, 0xc2, 0x77, 0x02, 0x8b, 0xd0, 0x8b, 0x1e,
+ 0xc8, 0x00, 0xb9, 0x0c, 0x00, 0xa1, 0xb1, 0x32,
+ 0x8e, 0xd8, 0x8b, 0xf9, 0x8b, 0xca, 0x8a, 0x07,
+ 0x26, 0x88, 0x04, 0x43, 0x46, 0xe2, 0xf7, 0x8b,
+ 0xcf, 0x81, 0xc3, 0x40, 0x01, 0x81, 0xc6, 0x40,
+ 0x01, 0x2b, 0xda, 0x2b, 0xf2, 0x81, 0xfe, 0xff,
+ 0xf9, 0x73, 0x02, 0xe2, 0xdd, 0x1f, 0xc3, 0xb0,
+ 0x01, 0xe8, 0x27, 0xff, 0xc3, 0xc6, 0x06, 0xd8,
+ 0x00, 0x01, 0x06, 0x9c, 0xb8, 0x00, 0xa0, 0x8e,
+ 0xc0, 0xfa, 0xe8, 0x9a, 0xff, 0xa1, 0xc0, 0x00,
+ 0xa3, 0xc4, 0x00, 0xa1, 0xc2, 0x00, 0xa3, 0xc6,
+ 0x00, 0xe8, 0x8b, 0xff, 0x9d, 0x07, 0xc3, 0xc6,
+ 0x06, 0xd8, 0x00, 0x00, 0x9c, 0xfa, 0xe8, 0xce,
+ 0xff, 0x9d, 0xc3, 0xc6, 0x06, 0xca, 0x00, 0x00,
+ 0xc6, 0x06, 0xcb, 0x00, 0x00, 0x8b, 0x0e, 0xc0,
+ 0x00, 0x8b, 0x16, 0xc2, 0x00, 0x33, 0xdb, 0x2e,
+ 0xa0, 0xd7, 0x00, 0x3c, 0x4d, 0x75, 0x09, 0x81,
+ 0xf9, 0x3f, 0x01, 0x73, 0x36, 0x41, 0xeb, 0x33,
+ 0x3c, 0x4b, 0x75, 0x07, 0x0b, 0xc9, 0x74, 0x2b,
+ 0x49, 0xeb, 0x28, 0x3c, 0x48, 0x75, 0x07, 0x0b,
+ 0xd2, 0x74, 0x20, 0x4a, 0xeb, 0x1d, 0x3c, 0x50,
+ 0x75, 0x09, 0x81, 0xfa, 0xc7, 0x00, 0x73, 0x13,
+ 0x42, 0xeb, 0x10, 0x3c, 0x1d, 0x75, 0x05, 0x80,
+ 0xcb, 0x01, 0xeb, 0x07, 0x3c, 0x38, 0x75, 0x19,
+ 0x80, 0xcb, 0x02, 0x80, 0x3e, 0xd9, 0x00, 0x01,
+ 0x74, 0x1d, 0x53, 0x51, 0x52, 0xd1, 0xe1, 0xb8,
+ 0x04, 0x00, 0xcd, 0x33, 0x5a, 0x59, 0x5b, 0xeb,
+ 0x0e, 0x80, 0x3e, 0xd9, 0x00, 0x01, 0x74, 0x07,
+ 0xb8, 0x03, 0x00, 0xcd, 0x33, 0xd1, 0xe9, 0x89,
+ 0x0e, 0xc0, 0x00, 0x89, 0x16, 0xc2, 0x00, 0xf6,
+ 0xc3, 0x02, 0x74, 0x05, 0xc6, 0x06, 0xcb, 0x00,
+ 0x01, 0xf6, 0xc3, 0x01, 0x74, 0x05, 0xc6, 0x06,
+ 0xca, 0x00, 0x01, 0xc3, 0x80, 0x3e, 0xcf, 0x00,
+ 0x02, 0x75, 0x07, 0xc6, 0x06, 0xcf, 0x00, 0x00,
+ 0xeb, 0x0e, 0x80, 0x3e, 0xcb, 0x00, 0x00, 0x74,
+ 0x13, 0x80, 0x3e, 0xcd, 0x00, 0x01, 0x74, 0x11,
+ 0xc6, 0x06, 0xcb, 0x00, 0x01, 0xc6, 0x06, 0xcd,
+ 0x00, 0x01, 0xf9, 0xc3, 0xc6, 0x06, 0xcd, 0x00,
+ 0x00, 0xf8, 0xc3, 0x80, 0x3e, 0xcf, 0x00, 0x04,
+ 0x75, 0x07, 0xc6, 0x06, 0xcf, 0x00, 0x00, 0xeb,
+ 0x0e, 0x80, 0x3e, 0xca, 0x00, 0x00, 0x74, 0x13,
+ 0x80, 0x3e, 0xcc, 0x00, 0x01, 0x74, 0x11, 0xc6,
+ 0x06, 0xca, 0x00, 0x01, 0xc6, 0x06, 0xcc, 0x00,
+ 0x01, 0xf9, 0xc3, 0xc6, 0x06, 0xcc, 0x00, 0x00,
+ 0xf8, 0xc3, 0xe8, 0x06, 0xff, 0xe8, 0xcb, 0xff,
+ 0x72, 0x05, 0xe8, 0x97, 0xff, 0x73, 0xf3, 0xc3,
+ 0x50, 0x52, 0xba, 0xda, 0x03, 0xec, 0xa8, 0x08,
+ 0x75, 0xf8, 0xec, 0xa8, 0x08, 0x74, 0xfb, 0x5a,
+ 0x58, 0xc3, 0x1e, 0x8e, 0xda, 0xb7, 0x00, 0x2a,
+ 0xf8, 0x8a, 0xe7, 0xf6, 0xc7, 0x80, 0x74, 0x04,
+ 0xb4, 0x40, 0x02, 0xe7, 0x50, 0xa8, 0x80, 0x74,
+ 0x04, 0x34, 0xff, 0xfe, 0xc0, 0xb4, 0x00, 0x8b,
+ 0xc8, 0xb8, 0x40, 0x00, 0x33, 0xd2, 0xf7, 0xf1,
+ 0x8b, 0xc8, 0x58, 0xfc, 0x50, 0x51, 0x56, 0xb9,
+ 0x40, 0x00, 0xfb, 0xe8, 0xba, 0xff, 0xfa, 0xba,
+ 0xc8, 0x03, 0x32, 0xc0, 0xee, 0x42, 0xfa, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xac,
+ 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0, 0xee, 0xe2,
+ 0xce, 0xfb, 0xb9, 0x40, 0x00, 0xe8, 0x78, 0xff,
+ 0xfa, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xac, 0x2a, 0xc4, 0x73, 0x02, 0x32, 0xc0,
+ 0xee, 0xe2, 0xce, 0xfb, 0x5e, 0x59, 0x58, 0x02,
+ 0xe7, 0x49, 0x74, 0x03, 0xe9, 0x75, 0xff, 0x1f,
+ 0xc3, 0xbb, 0x3e, 0x66, 0xe8, 0xfb, 0x97, 0x8b,
+ 0x36, 0xaf, 0x64, 0x8b, 0x3e, 0xb1, 0x64, 0x8b,
+ 0x07, 0x3d, 0xff, 0xff, 0x74, 0x25, 0x53, 0x8b,
+ 0x4f, 0x04, 0x8b, 0x57, 0x06, 0x8b, 0x5f, 0x02,
+ 0xe8, 0x1c, 0x00, 0x5b, 0x72, 0x05, 0x83, 0xc3,
+ 0x09, 0xeb, 0xe4, 0x8a, 0x47, 0x08, 0x3a, 0x06,
+ 0x08, 0x66, 0x74, 0x06, 0xa2, 0x08, 0x66, 0xe8,
+ 0x19, 0x00, 0xc3, 0x32, 0xc0, 0xeb, 0xef, 0x3b,
+ 0xf0, 0x72, 0x0e, 0x3b, 0xf1, 0x77, 0x0a, 0x3b,
+ 0xfb, 0x72, 0x06, 0x3b, 0xfa, 0x77, 0x02, 0xf9,
+ 0xc3, 0xf8, 0xc3, 0x80, 0x3e, 0xad, 0x64, 0x00,
+ 0x74, 0x31, 0xbe, 0x09, 0x66, 0xb9, 0x0d, 0x00,
+ 0xb3, 0xf2, 0x51, 0x8a, 0x24, 0x8a, 0x6c, 0x01,
+ 0x8a, 0x4c, 0x02, 0x2a, 0xe0, 0x73, 0x02, 0x32,
+ 0xe4, 0x2a, 0xe8, 0x73, 0x02, 0x32, 0xed, 0x2a,
+ 0xc8, 0x73, 0x02, 0x32, 0xc9, 0x50, 0xe8, 0x37,
+ 0x00, 0x58, 0x83, 0xc6, 0x03, 0xfe, 0xc3, 0x59,
+ 0xe2, 0xd8, 0xc3, 0xbe, 0x30, 0x66, 0xb9, 0x0d,
+ 0x00, 0xb3, 0xf2, 0x51, 0x8a, 0x24, 0x8a, 0xec,
+ 0x8a, 0xcc, 0x2a, 0xe0, 0x73, 0x02, 0x32, 0xe4,
+ 0x2a, 0xe8, 0x73, 0x02, 0x32, 0xed, 0x2a, 0xc8,
+ 0x73, 0x02, 0x32, 0xc9, 0x50, 0xe8, 0x08, 0x00,
+ 0x58, 0x46, 0xfe, 0xc3, 0x59, 0xe2, 0xdc, 0xc3,
+ 0xba, 0xc8, 0x03, 0x8a, 0xc3, 0xee, 0xeb, 0x00,
+ 0x42, 0x8a, 0xc4, 0xee, 0xeb, 0x00, 0x8a, 0xc5,
+ 0xee, 0xeb, 0x00, 0x8a, 0xc1, 0xee, 0xc3, 0x1e,
+ 0x06, 0xa1, 0xb1, 0x32, 0x8e, 0xc0, 0xa1, 0xb3,
+ 0x32, 0x8e, 0xd8, 0x33, 0xff, 0x33, 0xf6, 0xb9,
+ 0x00, 0x7d, 0xfc, 0xf3, 0xa5, 0x07, 0x1f, 0xc3,
+ 0x1e, 0x06, 0xe8, 0x4b, 0xfe, 0xb8, 0x00, 0xa0,
+ 0x8e, 0xc0, 0xa1, 0xb1, 0x32, 0x8e, 0xd8, 0x33,
+ 0xff, 0x33, 0xf6, 0xb9, 0x00, 0x7d, 0xfc, 0xf3,
+ 0xa5, 0x07, 0x1f, 0xc3, 0xe8, 0xe1, 0xff, 0xe8,
+ 0xf5, 0xfc, 0xc3, 0xbe, 0x86, 0x32, 0x8b, 0x04,
+ 0x8b, 0x54, 0x02, 0x03, 0xc1, 0x73, 0x01, 0x42,
+ 0x89, 0x07, 0x89, 0x57, 0x02, 0xc3, 0xbe, 0x86,
+ 0x32, 0x8b, 0x04, 0x8b, 0x54, 0x02, 0x8b, 0x4f,
+ 0x02, 0x8b, 0x37, 0x3b, 0xd1, 0x77, 0x08, 0x72,
+ 0x04, 0x3b, 0xc6, 0x73, 0x02, 0xf8, 0xc3, 0xf9,
+ 0xc3, 0x8a, 0x0e, 0x42, 0x32, 0xb5, 0x00, 0x80,
+ 0xf9, 0x01, 0x75, 0x05, 0xc6, 0x06, 0xa8, 0x64,
+ 0x04, 0x80, 0xf9, 0x03, 0x75, 0x05, 0xc6, 0x06,
+ 0xa8, 0x64, 0x05, 0x80, 0xf9, 0x04, 0x75, 0x05,
+ 0xc6, 0x06, 0xa8, 0x64, 0x05, 0xba, 0x44, 0x00,
+ 0xa1, 0xc1, 0x32, 0xa3, 0xac, 0x00, 0xc7, 0x06,
+ 0xaa, 0x00, 0x00, 0x01, 0xe8, 0x29, 0x06, 0xb8,
+ 0x00, 0x01, 0xa3, 0x4a, 0x32, 0xa1, 0xc1, 0x32,
+ 0xa3, 0x4c, 0x32, 0xb4, 0x01, 0x8b, 0x1e, 0x43,
+ 0x32, 0x8b, 0x0e, 0xc3, 0x32, 0x8b, 0x3e, 0xc5,
+ 0x32, 0x8a, 0x16, 0x45, 0x32, 0x8a, 0x36, 0x46,
+ 0x32, 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b,
+ 0x8e, 0xd8, 0x8e, 0xc0, 0xc3, 0xe8, 0x3b, 0x00,
+ 0xbb, 0x4e, 0x32, 0xba, 0x0a, 0x00, 0x8b, 0x3e,
+ 0x7d, 0x32, 0x8b, 0x0f, 0x0b, 0xc9, 0x74, 0x25,
+ 0x8a, 0x47, 0x03, 0xa2, 0x7c, 0x32, 0x33, 0xc0,
+ 0x89, 0x07, 0x89, 0x47, 0x02, 0x3b, 0xf9, 0x74,
+ 0x13, 0x89, 0x0e, 0x7d, 0x32, 0xb0, 0x01, 0xb4,
+ 0x05, 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b,
+ 0x8e, 0xd8, 0x8e, 0xc0, 0xc3, 0x83, 0xc3, 0x04,
+ 0x4a, 0x75, 0xcf, 0xc7, 0x06, 0x7a, 0x32, 0x00,
+ 0x00, 0xba, 0x0a, 0x00, 0xbb, 0x4e, 0x32, 0x8b,
+ 0x0f, 0x0b, 0xc9, 0x74, 0x07, 0x8a, 0x47, 0x02,
+ 0xa2, 0x7a, 0x32, 0xc3, 0x83, 0xc3, 0x04, 0x4a,
+ 0x75, 0xed, 0xc3, 0xe8, 0xdd, 0xff, 0xbb, 0x4e,
+ 0x32, 0xba, 0x0a, 0x00, 0x8b, 0x0f, 0x0b, 0xc9,
+ 0x74, 0x14, 0x89, 0x0e, 0x7d, 0x32, 0xb0, 0x01,
+ 0xb4, 0x05, 0xff, 0x1e, 0x4a, 0x32, 0xb8, 0x3b,
+ 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xc3, 0x83, 0xc3,
+ 0x04, 0x4a, 0x75, 0xe0, 0xc3, 0xbb, 0x4e, 0x32,
+ 0x89, 0x0f, 0x89, 0x47, 0x02, 0xc3, 0x89, 0x4f,
+ 0x04, 0x89, 0x47, 0x06, 0xc3, 0x89, 0x4f, 0x08,
+ 0x89, 0x47, 0x0a, 0xc3, 0x89, 0x4f, 0x0c, 0x89,
+ 0x47, 0x0e, 0xc3, 0x89, 0x4f, 0x10, 0x89, 0x47,
+ 0x12, 0xc3, 0x89, 0x4f, 0x14, 0x89, 0x47, 0x16,
+ 0xc3, 0x89, 0x4f, 0x18, 0x89, 0x47, 0x1a, 0xc3,
+ 0x89, 0x4f, 0x1c, 0x89, 0x47, 0x1e, 0xc3, 0x89,
+ 0x4f, 0x20, 0x89, 0x47, 0x22, 0xc3, 0x89, 0x4f,
+ 0x24, 0x89, 0x47, 0x26, 0xc3, 0x81, 0xe9, 0xf3,
+ 0x01, 0xba, 0x2c, 0x00, 0xa1, 0xbf, 0x32, 0xa3,
+ 0xac, 0x00, 0xc7, 0x06, 0xaa, 0x00, 0x00, 0x00,
+ 0xe8, 0x15, 0x05, 0xc3, 0xbe, 0xc7, 0x32, 0xbb,
+ 0x47, 0x33, 0xb9, 0x01, 0x00, 0x53, 0x51, 0x56,
+ 0x49, 0xb0, 0x1b, 0xf6, 0xe1, 0x03, 0xf0, 0xd1,
+ 0xe1, 0x03, 0xd9, 0x8b, 0x0f, 0x0b, 0xc9, 0x74,
+ 0x1b, 0x81, 0xe9, 0xf3, 0x01, 0xba, 0x2c, 0x00,
+ 0x8b, 0x44, 0x16, 0xa3, 0xac, 0x00, 0xc7, 0x06,
+ 0xaa, 0x00, 0x00, 0x00, 0xe8, 0xe1, 0x04, 0xb8,
+ 0x01, 0x00, 0x89, 0x04, 0x5e, 0x59, 0x5b, 0x41,
+ 0x80, 0xf9, 0x04, 0x76, 0xc8, 0xc3, 0xbe, 0xc7,
+ 0x32, 0xbb, 0x47, 0x33, 0xb9, 0x01, 0x00, 0x53,
+ 0x51, 0x56, 0x8b, 0xd1, 0x49, 0xb0, 0x1b, 0xf6,
+ 0xe1, 0x03, 0xf0, 0xd1, 0xe1, 0x03, 0xd9, 0x8b,
+ 0x07, 0x0b, 0xc0, 0x74, 0x26, 0x8b, 0x0e, 0xf3,
+ 0xb4, 0x49, 0xc1, 0xe1, 0x02, 0x03, 0xca, 0xba,
+ 0x38, 0x00, 0xe8, 0x2b, 0x00, 0x8b, 0x44, 0x16,
+ 0xa3, 0xac, 0x00, 0xc7, 0x06, 0xaa, 0x00, 0x00,
+ 0x00, 0x56, 0xe8, 0x93, 0x04, 0x5e, 0xb8, 0x01,
+ 0x00, 0x89, 0x04, 0x5e, 0x59, 0x5b, 0x41, 0x80,
+ 0xf9, 0x04, 0x76, 0xbb, 0xbf, 0x47, 0x33, 0xb9,
+ 0x08, 0x00, 0x33, 0xc0, 0xfc, 0xf3, 0xab, 0xc3,
+ 0x83, 0xf9, 0x51, 0x75, 0x0e, 0x80, 0x3e, 0xad,
+ 0xdb, 0x01, 0x75, 0x07, 0xb9, 0xa0, 0x00, 0xba,
+ 0x2c, 0x00, 0xc3, 0x81, 0xf9, 0x89, 0x00, 0x75,
+ 0x1c, 0x80, 0x3e, 0xc5, 0xdb, 0x01, 0x75, 0x15,
+ 0x80, 0x3e, 0xc6, 0xdb, 0x01, 0x75, 0x07, 0xb9,
+ 0xcb, 0x00, 0xba, 0x2c, 0x00, 0xc3, 0xb9, 0xca,
+ 0x00, 0xba, 0x2c, 0x00, 0xc3, 0x83, 0xf9, 0x19,
+ 0x75, 0x0e, 0x80, 0x3e, 0xdf, 0xdb, 0x02, 0x75,
+ 0x07, 0xb9, 0x4c, 0x01, 0xba, 0x2c, 0x00, 0xc3,
+ 0x83, 0xf9, 0x25, 0x75, 0x1c, 0x80, 0x3e, 0xe2,
+ 0xdb, 0x01, 0x75, 0x07, 0xb9, 0x5f, 0x01, 0xba,
+ 0x2c, 0x00, 0xc3, 0x80, 0x3e, 0xe2, 0xdb, 0x02,
+ 0x75, 0x07, 0xb9, 0x6c, 0x01, 0xba, 0x2c, 0x00,
+ 0xc3, 0x80, 0x3e, 0xe7, 0xdb, 0x01, 0x75, 0x18,
+ 0x83, 0xf9, 0x1d, 0x75, 0x07, 0xb9, 0x7c, 0x01,
+ 0xba, 0x2c, 0x00, 0xc3, 0x83, 0xf9, 0x1e, 0x75,
+ 0x07, 0xb9, 0x7d, 0x01, 0xba, 0x2c, 0x00, 0xc3,
+ 0x83, 0x3e, 0xec, 0xdb, 0x01, 0x75, 0x0b, 0x83,
+ 0xf9, 0x2a, 0x75, 0x06, 0xb9, 0x90, 0x01, 0xba,
+ 0x2c, 0x00, 0xc3, 0xa1, 0xbf, 0x32, 0xa3, 0xac,
+ 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00, 0xb9, 0x01,
+ 0x00, 0xba, 0x54, 0x00, 0xe8, 0xc9, 0x03, 0xc3,
+ 0x8b, 0x0e, 0xf3, 0xb4, 0xba, 0x25, 0x00, 0xa1,
+ 0xb5, 0x32, 0xa3, 0xac, 0x00, 0x33, 0xc0, 0xa3,
+ 0xaa, 0x00, 0xe8, 0xb3, 0x03, 0x83, 0x3e, 0xf3,
+ 0xb4, 0x07, 0x75, 0x11, 0xa0, 0xe6, 0xdb, 0x3c,
+ 0x02, 0x74, 0x0a, 0xe8, 0x08, 0x00, 0x3c, 0x01,
+ 0x74, 0x03, 0xe8, 0x01, 0x00, 0xc3, 0x1e, 0x8b,
+ 0x16, 0xb5, 0x32, 0x8e, 0xda, 0x33, 0xdb, 0xff,
+ 0x0f, 0x1f, 0xc3, 0xe8, 0x0f, 0x00, 0xe8, 0xf0,
+ 0xfb, 0xe8, 0x3b, 0x00, 0xc6, 0x06, 0x08, 0x66,
+ 0xfe, 0xe8, 0xe5, 0xfb, 0xc3, 0x89, 0x3e, 0xb7,
+ 0x64, 0x89, 0x36, 0xb9, 0x64, 0x89, 0x3e, 0xbb,
+ 0x64, 0x89, 0x36, 0xbd, 0x64, 0xa3, 0xaf, 0x64,
+ 0x89, 0x1e, 0xb1, 0x64, 0x88, 0x2e, 0xc3, 0x64,
+ 0x88, 0x0e, 0x07, 0x66, 0xe8, 0x49, 0x92, 0xc6,
+ 0x06, 0xdc, 0x1c, 0x02, 0xc6, 0x06, 0xda, 0x1c,
+ 0x01, 0xc6, 0x06, 0xc6, 0x64, 0x01, 0xc3, 0xc6,
+ 0x06, 0xc5, 0x64, 0x00, 0xc6, 0x06, 0x3d, 0x66,
+ 0x00, 0xc6, 0x06, 0x40, 0x67, 0xff, 0xc6, 0x06,
+ 0xc4, 0x64, 0x01, 0xe8, 0x12, 0x89, 0x80, 0x3e,
+ 0xad, 0x64, 0x01, 0x75, 0x0a, 0xe8, 0x84, 0x00,
+ 0xe8, 0x1d, 0x00, 0xe8, 0x8b, 0x00, 0xc3, 0xe8,
+ 0x94, 0x00, 0xe8, 0x13, 0x00, 0xb8, 0x00, 0xa0,
+ 0xb9, 0x00, 0x7d, 0xe8, 0xa2, 0x00, 0xe8, 0x92,
+ 0x00, 0xe8, 0x5d, 0x00, 0xe8, 0x59, 0xfc, 0xc3,
+ 0xe8, 0xa2, 0x01, 0xe8, 0x01, 0x00, 0xc3, 0xe8,
+ 0xf0, 0x05, 0xe8, 0x0f, 0x01, 0xe8, 0x2f, 0xfc,
+ 0xe8, 0x45, 0xfc, 0xff, 0x36, 0xce, 0x64, 0xc7,
+ 0x06, 0xce, 0x64, 0xff, 0xff, 0xe8, 0x86, 0x8f,
+ 0x8f, 0x06, 0xce, 0x64, 0xc6, 0x06, 0x33, 0x33,
+ 0x01, 0xe8, 0x22, 0x00, 0xc6, 0x06, 0xdd, 0x1c,
+ 0x02, 0xe8, 0xda, 0x7b, 0xbb, 0xa4, 0x32, 0x8b,
+ 0x0e, 0x90, 0x32, 0xe8, 0x3d, 0xfc, 0xc6, 0x06,
+ 0x33, 0x33, 0x00, 0xc6, 0x06, 0xdc, 0x1c, 0x03,
+ 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xc3, 0xbb, 0xa4,
+ 0x32, 0x33, 0xc0, 0x89, 0x07, 0x89, 0x47, 0x02,
+ 0xc3, 0xb8, 0x1b, 0x10, 0x33, 0xdb, 0xb9, 0xff,
+ 0x00, 0xcd, 0x10, 0xc3, 0x8b, 0x16, 0xb3, 0x32,
+ 0xbe, 0x00, 0xfa, 0xb0, 0xf0, 0xe8, 0x4a, 0xfa,
+ 0xc3, 0x8b, 0x16, 0xb3, 0x32, 0xbe, 0x00, 0xfa,
+ 0xb0, 0x10, 0xe8, 0x3d, 0xfa, 0xc3, 0x8b, 0x16,
+ 0xb3, 0x32, 0xbe, 0x00, 0xfa, 0xb0, 0xc0, 0xe8,
+ 0x30, 0xfa, 0xc3, 0x8b, 0x16, 0xb3, 0x32, 0xbe,
+ 0x00, 0xfa, 0xb0, 0x20, 0xe8, 0x23, 0xfa, 0xc3,
+ 0x06, 0x8e, 0xc0, 0x33, 0xc0, 0x8b, 0xf8, 0xfc,
+ 0xf3, 0xab, 0x07, 0xc3, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x01, 0xe8, 0x0f, 0x00, 0xc3, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x02, 0xe8, 0x06, 0x00, 0xc6, 0x06, 0xdc,
+ 0x1c, 0x03, 0xc3, 0x80, 0x3e, 0xad, 0x64, 0x01,
+ 0x75, 0x0a, 0xe8, 0x9f, 0xff, 0xe8, 0x1d, 0x00,
+ 0xe8, 0xa6, 0xff, 0xc3, 0xe8, 0xaf, 0xff, 0xe8,
+ 0x13, 0x00, 0xb8, 0x00, 0xa0, 0xb9, 0x00, 0x7d,
+ 0xe8, 0xbd, 0xff, 0xe8, 0xad, 0xff, 0xe8, 0x78,
+ 0xff, 0xe8, 0x74, 0xfb, 0xc3, 0xe8, 0xbd, 0x00,
+ 0xe8, 0x0f, 0x05, 0xe8, 0x2e, 0x00, 0xe8, 0x03,
+ 0xfd, 0xe8, 0x4b, 0xfb, 0xe8, 0x61, 0xfb, 0xe8,
+ 0x54, 0xff, 0xc6, 0x06, 0x33, 0x33, 0x01, 0xc6,
+ 0x06, 0xdd, 0x1c, 0x02, 0xe8, 0x07, 0x7b, 0xbb,
+ 0xa4, 0x32, 0x8b, 0x0e, 0x90, 0x32, 0xe8, 0x6a,
+ 0xfb, 0xc6, 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06,
+ 0xdd, 0x1c, 0x03, 0xc3, 0x55, 0xbf, 0xc7, 0x32,
+ 0xb9, 0x36, 0x00, 0x33, 0xc0, 0xfc, 0xf3, 0xab,
+ 0xbe, 0xc7, 0x32, 0xbb, 0x9e, 0xd8, 0xbd, 0x46,
+ 0xd9, 0xb9, 0x01, 0x00, 0x53, 0x51, 0x56, 0x55,
+ 0x8b, 0x16, 0xf3, 0xb4, 0x4a, 0xc1, 0xe2, 0x02,
+ 0x03, 0xda, 0x03, 0xd9, 0x4b, 0xd1, 0xe2, 0x03,
+ 0xea, 0x49, 0x03, 0xe9, 0x03, 0xe9, 0xb0, 0x1b,
+ 0xf6, 0xe1, 0x41, 0x03, 0xf0, 0x8a, 0x2f, 0x0a,
+ 0xed, 0x74, 0x3e, 0x8a, 0xd1, 0xb6, 0x00, 0x8b,
+ 0x0e, 0xf3, 0xb4, 0x49, 0xc1, 0xe1, 0x02, 0x03,
+ 0xca, 0x51, 0x3e, 0x8b, 0x5e, 0x00, 0x83, 0xc6,
+ 0x16, 0xe8, 0x4f, 0x04, 0x59, 0xba, 0x38, 0x00,
+ 0xe8, 0x15, 0xfd, 0x8b, 0x04, 0xa3, 0xac, 0x00,
+ 0xc7, 0x06, 0xaa, 0x00, 0x00, 0x00, 0x56, 0xe8,
+ 0x7e, 0x01, 0x5e, 0x83, 0xee, 0x16, 0xb8, 0x01,
+ 0x00, 0x89, 0x04, 0x89, 0x44, 0x12, 0x89, 0x44,
+ 0x14, 0x5d, 0x5e, 0x59, 0x5b, 0x41, 0x80, 0xf9,
+ 0x04, 0x76, 0x91, 0x5d, 0xc3, 0x8b, 0x0e, 0xf3,
+ 0xb4, 0xba, 0x1d, 0x00, 0xa1, 0xb3, 0x32, 0xa3,
+ 0xac, 0x00, 0x33, 0xc0, 0xa3, 0xaa, 0x00, 0xe8,
+ 0x4e, 0x01, 0xe8, 0x9e, 0x00, 0xe8, 0x80, 0xfd,
+ 0xc3, 0xe8, 0x04, 0x00, 0xe8, 0x91, 0xfa, 0xc3,
+ 0xe8, 0xda, 0xff, 0xff, 0x36, 0x33, 0x33, 0xff,
+ 0x36, 0xdc, 0x1c, 0xff, 0x36, 0xdd, 0x1c, 0xc6,
+ 0x06, 0x33, 0x33, 0x00, 0xc6, 0x06, 0xdc, 0x1c,
+ 0x03, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xfe, 0x0e,
+ 0x07, 0x66, 0xe8, 0xae, 0x80, 0xe8, 0xa3, 0x7d,
+ 0xe8, 0x0c, 0x7f, 0xe8, 0xb2, 0xf8, 0xe8, 0xf8,
+ 0x85, 0xe8, 0xab, 0x7f, 0xe8, 0x70, 0xf7, 0x8f,
+ 0x06, 0xdd, 0x1c, 0x8f, 0x06, 0xdc, 0x1c, 0x8f,
+ 0x06, 0x33, 0x33, 0xc3, 0xe8, 0x96, 0xff, 0xff,
+ 0x36, 0x33, 0x33, 0xff, 0x36, 0xdc, 0x1c, 0xff,
+ 0x36, 0xdd, 0x1c, 0xc6, 0x06, 0x33, 0x33, 0x00,
+ 0xc6, 0x06, 0xdc, 0x1c, 0x03, 0xc6, 0x06, 0xdd,
+ 0x1c, 0x03, 0xe8, 0xe1, 0x79, 0x8f, 0x06, 0xdd,
+ 0x1c, 0x8f, 0x06, 0xdc, 0x1c, 0x8f, 0x06, 0x33,
+ 0x33, 0xc3, 0xe8, 0x68, 0xff, 0xff, 0x36, 0x33,
+ 0x33, 0xff, 0x36, 0xdd, 0x1c, 0xc6, 0x06, 0x33,
+ 0x33, 0x00, 0xc6, 0x06, 0xdd, 0x1c, 0x03, 0xe8,
+ 0xbc, 0x79, 0x8f, 0x06, 0xdd, 0x1c, 0x8f, 0x06,
+ 0x33, 0x33, 0xc3, 0x06, 0xa1, 0xb5, 0x32, 0x8e,
+ 0xc0, 0xa3, 0xac, 0x00, 0xc7, 0x06, 0xaa, 0x00,
+ 0x00, 0x00, 0xe8, 0x13, 0x91, 0x53, 0x8a, 0x0f,
+ 0x0a, 0xc9, 0x74, 0x17, 0x80, 0xf9, 0xff, 0x74,
+ 0x16, 0xb5, 0x00, 0xba, 0x4c, 0x00, 0xe8, 0x87,
+ 0x00, 0xa1, 0xb3, 0x32, 0x8b, 0x1e, 0xaa, 0x00,
+ 0xe8, 0xb9, 0x6a, 0x5b, 0x43, 0xeb, 0xde, 0x5b,
+ 0x07, 0xc3, 0x06, 0x8b, 0x16, 0xb5, 0x32, 0x8e,
+ 0xc2, 0x89, 0x16, 0xac, 0x00, 0xc7, 0x06, 0xaa,
+ 0x00, 0x00, 0x00, 0x8a, 0xc8, 0xb5, 0x00, 0xba,
+ 0x4c, 0x00, 0xe8, 0x5b, 0x00, 0xa1, 0xb3, 0x32,
+ 0x8b, 0x1e, 0xaa, 0x00, 0xe8, 0x8d, 0x6a, 0x07,
+ 0xc3, 0xe8, 0xd6, 0xff, 0xe8, 0x81, 0xfc, 0xc3,
+ 0xb8, 0x00, 0x3d, 0xb1, 0x00, 0xcd, 0x21, 0x72,
+ 0x3c, 0xa3, 0xa2, 0x00, 0xb8, 0x02, 0x42, 0x33,
+ 0xc9, 0x33, 0xd2, 0x8b, 0x1e, 0xa2, 0x00, 0xcd,
+ 0x21, 0x72, 0x2a, 0x8b, 0xd8, 0xb0, 0x33, 0x0b,
+ 0xd2, 0x75, 0x22, 0x89, 0x1e, 0xa4, 0x00, 0xb8,
+ 0x00, 0x42, 0x33, 0xc9, 0x33, 0xd2, 0x8b, 0x1e,
+ 0xa2, 0x00, 0xcd, 0x21, 0x72, 0x0f, 0xb4, 0x3e,
+ 0x8b, 0x1e, 0xa2, 0x00, 0xcd, 0x21, 0x72, 0x05,
+ 0x8b, 0x0e, 0xa4, 0x00, 0xc3, 0xe9, 0xf8, 0x03,
+ 0x51, 0xb8, 0x00, 0x3d, 0xb1, 0x00, 0xcd, 0x21,
+ 0x72, 0x6a, 0xa3, 0xa2, 0x00, 0x59, 0xb8, 0x04,
+ 0x00, 0xf7, 0xe1, 0x8b, 0xca, 0x8b, 0xd0, 0x8b,
+ 0x1e, 0xa2, 0x00, 0xb8, 0x00, 0x42, 0xcd, 0x21,
+ 0x72, 0x52, 0x8b, 0x1e, 0xa2, 0x00, 0xb9, 0x08,
+ 0x00, 0xba, 0xae, 0x00, 0xb4, 0x3f, 0xcd, 0x21,
+ 0x72, 0x42, 0xbb, 0xae, 0x00, 0x8b, 0x17, 0x8b,
+ 0x4f, 0x02, 0x8b, 0x47, 0x04, 0x2b, 0xc2, 0xa3,
+ 0xa4, 0x00, 0x8b, 0x1e, 0xa2, 0x00, 0xb8, 0x00,
+ 0x42, 0xcd, 0x21, 0x72, 0x27, 0x8b, 0x1e, 0xa2,
+ 0x00, 0x8b, 0x0e, 0xa4, 0x00, 0x8b, 0x16, 0xaa,
+ 0x00, 0xa1, 0xac, 0x00, 0x8e, 0xd8, 0xb4, 0x3f,
+ 0xcd, 0x21, 0x72, 0x10, 0xb8, 0x3b, 0x0b, 0x8e,
+ 0xd8, 0xb4, 0x3e, 0x8b, 0x1e, 0xa2, 0x00, 0xcd,
+ 0x21, 0x72, 0x01, 0xc3, 0xe9, 0x81, 0x03, 0xb8,
+ 0x00, 0x3d, 0xb1, 0x00, 0xcd, 0x21, 0x72, 0x54,
+ 0xa3, 0xa2, 0x00, 0xb8, 0x02, 0x42, 0x33, 0xc9,
+ 0x33, 0xd2, 0x8b, 0x1e, 0xa2, 0x00, 0xcd, 0x21,
+ 0x72, 0x42, 0x8b, 0xd8, 0xb0, 0x33, 0x0b, 0xd2,
+ 0x75, 0x3a, 0x89, 0x1e, 0xa4, 0x00, 0xb8, 0x00,
+ 0x42, 0x33, 0xc9, 0x33, 0xd2, 0x8b, 0x1e, 0xa2,
+ 0x00, 0xcd, 0x21, 0x72, 0x27, 0x8b, 0x1e, 0xa2,
+ 0x00, 0x8b, 0x0e, 0xa4, 0x00, 0x8b, 0x16, 0xaa,
+ 0x00, 0xa1, 0xac, 0x00, 0x8e, 0xd8, 0xb4, 0x3f,
+ 0xcd, 0x21, 0x72, 0x10, 0xb8, 0x3b, 0x0b, 0x8e,
+ 0xd8, 0xb4, 0x3e, 0x8b, 0x1e, 0xa2, 0x00, 0xcd,
+ 0x21, 0x72, 0x01, 0xc3, 0xe9, 0x21, 0x03, 0xb8,
+ 0x00, 0x3d, 0xb1, 0x00, 0xcd, 0x21, 0x72, 0x3b,
+ 0xa3, 0xa2, 0x00, 0xb8, 0x00, 0x42, 0x33, 0xc9,
+ 0x8b, 0x16, 0xa8, 0x00, 0x8b, 0x1e, 0xa2, 0x00,
+ 0xcd, 0x21, 0x72, 0x27, 0x8b, 0x1e, 0xa2, 0x00,
+ 0x8b, 0x0e, 0xa6, 0x00, 0x8b, 0x16, 0xaa, 0x00,
+ 0xa1, 0xac, 0x00, 0x8e, 0xd8, 0xb4, 0x3f, 0xcd,
+ 0x21, 0x72, 0x10, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8,
+ 0xb4, 0x3e, 0x8b, 0x1e, 0xa2, 0x00, 0xcd, 0x21,
+ 0x72, 0x01, 0xc3, 0xe9, 0xda, 0x02, 0x51, 0xb4,
+ 0x3c, 0xb1, 0x00, 0xcd, 0x21, 0x59, 0x72, 0x26,
+ 0xa3, 0xa2, 0x00, 0x8b, 0x1e, 0xa2, 0x00, 0x8b,
+ 0x16, 0xaa, 0x00, 0xa1, 0xac, 0x00, 0x8e, 0xd8,
+ 0xb4, 0x40, 0xcd, 0x21, 0x72, 0x10, 0xb8, 0x3b,
+ 0x0b, 0x8e, 0xd8, 0xb4, 0x3e, 0x8b, 0x1e, 0xa2,
+ 0x00, 0xcd, 0x21, 0x72, 0x01, 0xc3, 0xe9, 0xa7,
+ 0x02, 0xba, 0x13, 0x00, 0xb8, 0x00, 0x3d, 0xb1,
+ 0x00, 0xcd, 0x21, 0x72, 0x19, 0x8b, 0xd8, 0xb4,
+ 0x3e, 0xcd, 0x21, 0x72, 0x73, 0x8c, 0x1e, 0xac,
+ 0x00, 0xb8, 0x42, 0x32, 0xa3, 0xaa, 0x00, 0xba,
+ 0x13, 0x00, 0xe8, 0x02, 0xff, 0xc3, 0x3d, 0x02,
+ 0x00, 0x75, 0x5d, 0xb8, 0x03, 0x00, 0xcd, 0x10,
+ 0x8c, 0xc8, 0x8e, 0xd8, 0xba, 0x00, 0xb1, 0xb4,
+ 0x09, 0xcd, 0x21, 0xb8, 0x00, 0x4c, 0xcd, 0x21,
+ 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65,
+ 0x3a, 0x20, 0x53, 0x4f, 0x55, 0x4e, 0x44, 0x2e,
+ 0x53, 0x45, 0x54, 0x20, 0x6e, 0x6f, 0x74, 0x20,
+ 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x20, 0x50,
+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x72, 0x75,
+ 0x6e, 0x20, 0x53, 0x4f, 0x55, 0x4e, 0x44, 0x53,
+ 0x45, 0x54, 0x2e, 0x45, 0x58, 0x45, 0x2e, 0x24,
+ 0xe9, 0x1d, 0x02, 0x89, 0x0e, 0x90, 0xdb, 0xb0,
+ 0x00, 0xb4, 0x05, 0xff, 0x1e, 0x4a, 0x32, 0xb8,
+ 0x3b, 0x0b, 0x8e, 0xd8, 0x8e, 0xc0, 0xc3, 0x00,
+ 0x00, 0x00, 0x00, 0x57, 0x8b, 0xc8, 0xbb, 0x5f,
+ 0xb1, 0x2e, 0x8b, 0x47, 0x02, 0x2e, 0x8b, 0x1f,
+ 0x8b, 0xf0, 0x8b, 0xfb, 0x8a, 0xd4, 0x8a, 0xe0,
+ 0x8a, 0xc7, 0x8a, 0xfb, 0x32, 0xdb, 0xd0, 0xda,
+ 0xd1, 0xd8, 0xd1, 0xdb, 0x03, 0xdf, 0x13, 0xc6,
+ 0x81, 0xc3, 0xe9, 0x62, 0x15, 0x19, 0x36, 0xbf,
+ 0x5f, 0xb1, 0x2e, 0x89, 0x1d, 0x2e, 0x89, 0x45,
+ 0x02, 0x33, 0xd2, 0xf7, 0xf1, 0x8b, 0xc2, 0x5f,
+ 0xc3, 0xb4, 0x62, 0xcd, 0x21, 0x53, 0xba, 0x28,
+ 0x25, 0x2b, 0xd3, 0x33, 0xc0, 0xe8, 0x1c, 0x00,
+ 0x05, 0x0f, 0x00, 0x83, 0xd2, 0x00, 0xbb, 0x10,
+ 0x00, 0xf7, 0xf3, 0x8b, 0xd8, 0x58, 0x06, 0x8e,
+ 0xc0, 0xb4, 0x4a, 0xcd, 0x21, 0x07, 0x72, 0x01,
+ 0xc3, 0xe9, 0x9c, 0x01, 0x53, 0xd1, 0xc2, 0xd1,
+ 0xc2, 0xd1, 0xc2, 0xd1, 0xc2, 0x8b, 0xda, 0x83,
+ 0xe2, 0x0f, 0x83, 0xe3, 0xf0, 0x03, 0xc3, 0x83,
+ 0xd2, 0x00, 0x5b, 0xc3, 0xbb, 0x06, 0xfa, 0xbe,
+ 0xb1, 0x32, 0xe8, 0x3e, 0x00, 0xbb, 0x00, 0xfd,
+ 0xbe, 0xb3, 0x32, 0xe8, 0x35, 0x00, 0xbb, 0x00,
+ 0xfa, 0xbe, 0xb5, 0x32, 0xe8, 0x2c, 0x00, 0xbb,
+ 0x00, 0xfd, 0xbe, 0xbf, 0x32, 0xe8, 0x23, 0x00,
+ 0xbb, 0x88, 0x14, 0xbe, 0xc1, 0x32, 0xe8, 0x1a,
+ 0x00, 0x80, 0x3e, 0x42, 0x32, 0x06, 0x74, 0x12,
+ 0xbb, 0x4e, 0x80, 0xbe, 0xc3, 0x32, 0xe8, 0x0a,
+ 0x00, 0xbb, 0xb8, 0x88, 0xbe, 0xc5, 0x32, 0xe8,
+ 0x01, 0x00, 0xc3, 0x53, 0x56, 0xe8, 0x11, 0x00,
+ 0xb4, 0x48, 0xcd, 0x21, 0x5e, 0x59, 0x72, 0x06,
+ 0x89, 0x04, 0xe8, 0x19, 0x00, 0xc3, 0xe9, 0x27,
+ 0x01, 0x8b, 0xc3, 0x05, 0x0f, 0x00, 0x73, 0x04,
+ 0xb0, 0x38, 0xeb, 0xf2, 0x33, 0xd2, 0xbb, 0x10,
+ 0x00, 0xf7, 0xf3, 0x8b, 0xd8, 0xc3, 0x06, 0x8e,
+ 0xc0, 0x33, 0xc0, 0x33, 0xff, 0xfc, 0xf3, 0xaa,
+ 0x07, 0xc3, 0x06, 0xbe, 0xc7, 0x32, 0xb9, 0x01,
+ 0x00, 0x51, 0x56, 0x49, 0xb0, 0x1b, 0xf6, 0xe1,
+ 0x03, 0xf0, 0x8b, 0x44, 0x16, 0x0b, 0xc0, 0x74,
+ 0x0b, 0x8e, 0xc0, 0xb4, 0x49, 0xcd, 0x21, 0x73,
+ 0x03, 0xe9, 0xe4, 0x00, 0x5e, 0x59, 0x41, 0x80,
+ 0xf9, 0x04, 0x76, 0xdd, 0x07, 0xc3, 0xa0, 0x42,
+ 0x32, 0x3c, 0x01, 0x74, 0x1d, 0x3c, 0x06, 0x74,
+ 0x19, 0x3c, 0x07, 0x74, 0x15, 0x3c, 0x03, 0x74,
+ 0x11, 0x3c, 0x04, 0x74, 0x0d, 0xc7, 0x06, 0x84,
+ 0x32, 0x6c, 0x00, 0xb8, 0x59, 0x00, 0xa3, 0x04,
+ 0x00, 0xc3, 0xc7, 0x06, 0x84, 0x32, 0x9c, 0x2e,
+ 0xb8, 0x0a, 0x00, 0xa3, 0x04, 0x00, 0xc3, 0x33,
+ 0xd2, 0xb8, 0xff, 0xff, 0xf7, 0x36, 0x84, 0x32,
+ 0xa3, 0x7f, 0x32, 0xa3, 0x81, 0x32, 0xc3, 0xb0,
+ 0x36, 0xe6, 0x43, 0xa1, 0x84, 0x32, 0xe6, 0x40,
+ 0x8a, 0xc4, 0xe6, 0x40, 0xc3, 0xb0, 0x36, 0xe6,
+ 0x43, 0x32, 0xc0, 0xe6, 0x40, 0xe6, 0x40, 0xc3,
+ 0x06, 0xb8, 0x08, 0x35, 0xcd, 0x21, 0x89, 0x1e,
+ 0x00, 0x00, 0x8c, 0x06, 0x02, 0x00, 0x07, 0x8b,
+ 0x16, 0x04, 0x00, 0x1e, 0x0e, 0x1f, 0xb8, 0x08,
+ 0x25, 0xcd, 0x21, 0x1f, 0xc3, 0x1e, 0x8b, 0x16,
+ 0x00, 0x00, 0x8b, 0x1e, 0x02, 0x00, 0x8e, 0xdb,
+ 0xb8, 0x08, 0x25, 0xcd, 0x21, 0x1f, 0xc3, 0x06,
+ 0xb8, 0x09, 0x35, 0xcd, 0x21, 0x2e, 0x89, 0x1e,
+ 0xd8, 0x00, 0x2e, 0x8c, 0x06, 0xda, 0x00, 0x07,
+ 0x1e, 0x0e, 0x1f, 0xba, 0xba, 0x00, 0xb8, 0x09,
+ 0x25, 0xcd, 0x21, 0x1f, 0xc3, 0x1e, 0x2e, 0x8b,
+ 0x16, 0xd8, 0x00, 0x2e, 0x8b, 0x1e, 0xda, 0x00,
+ 0x8e, 0xdb, 0xb8, 0x09, 0x25, 0xcd, 0x21, 0x1f,
+ 0xc3, 0xe8, 0x42, 0xff, 0xe8, 0xc8, 0xff, 0xfa,
+ 0xb0, 0xff, 0xe6, 0x21, 0xe8, 0x91, 0xff, 0xe8,
+ 0x75, 0xff, 0xb0, 0x00, 0xe6, 0x21, 0xfb, 0xb8,
+ 0x13, 0x00, 0xcd, 0x10, 0xe8, 0x58, 0xff, 0xc3,
+ 0x50, 0xb8, 0x03, 0x00, 0xcd, 0x10, 0x58, 0xb4,
+ 0x00, 0xbb, 0xa6, 0x2f, 0xd1, 0xe0, 0x03, 0xd8,
+ 0x8b, 0x17, 0xb4, 0x09, 0xcd, 0x21, 0x80, 0x3e,
+ 0x42, 0x32, 0x00, 0x74, 0x0d, 0xb4, 0x02, 0xff,
+ 0x1e, 0x4a, 0x32, 0xb8, 0x3b, 0x0b, 0x8e, 0xd8,
+ 0x8e, 0xc0, 0xeb, 0x00, 0xfa, 0xe4, 0x21, 0x50,
+ 0xb0, 0xff, 0xe6, 0x21, 0xfa, 0xe8, 0x3d, 0xff,
+ 0xe8, 0x62, 0xff, 0xe8, 0x8f, 0xff, 0x58, 0xe6,
+ 0x21, 0xfb, 0xb8, 0x00, 0x4c, 0xcd, 0x21, 0x00
+};
+
+// Data Segment
+// starts at offset 0xb5b0 in original executable
+#define DSEG_STARTBLK_SIZE 13214
+
+const static uint8 dsegStartBlock[DSEG_STARTBLK_SIZE] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x73, 0x6f, 0x75, 0x6e, 0x64,
+ 0x2e, 0x73, 0x65, 0x74, 0x00, 0x6f, 0x66, 0x66,
+ 0x2e, 0x72, 0x65, 0x73, 0x00, 0x6f, 0x6e, 0x2e,
+ 0x72, 0x65, 0x73, 0x00, 0x6c, 0x61, 0x6e, 0x5f,
+ 0x35, 0x30, 0x30, 0x2e, 0x72, 0x65, 0x73, 0x00,
+ 0x6c, 0x61, 0x6e, 0x5f, 0x30, 0x30, 0x30, 0x2e,
+ 0x72, 0x65, 0x73, 0x00, 0x73, 0x64, 0x72, 0x2e,
+ 0x72, 0x65, 0x73, 0x00, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x72, 0x65, 0x73, 0x00, 0x76, 0x61, 0x72, 0x69,
+ 0x61, 0x2e, 0x72, 0x65, 0x73, 0x00, 0x6d, 0x6d,
+ 0x6d, 0x2e, 0x72, 0x65, 0x73, 0x00, 0x73, 0x61,
+ 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x2e, 0x72, 0x65,
+ 0x73, 0x00, 0x73, 0x61, 0x6d, 0x5f, 0x6d, 0x6d,
+ 0x6d, 0x2e, 0x72, 0x65, 0x73, 0x00, 0x75, 0x6e,
+ 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e, 0x72, 0x65,
+ 0x73, 0x00, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74,
+ 0x2e, 0x72, 0x65, 0x73, 0x00, 0x74, 0x65, 0x65,
+ 0x6e, 0x61, 0x67, 0x65, 0x30, 0x2e, 0x73, 0x61,
+ 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xa0, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0x00, 0x00, 0xdf, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0xdf, 0x00, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0xdf, 0xff, 0x00, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0xdf, 0xff, 0xff, 0x00, 0x01, 0x01,
+ 0x01, 0x01, 0xdf, 0xff, 0xff, 0xff, 0x00, 0x01,
+ 0x01, 0x01, 0xdf, 0xff, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x01, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x01, 0xdf, 0xff, 0xdf, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0xdf, 0xdf, 0x01, 0xdf, 0xff, 0x00,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0xdf, 0xff, 0x00,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xdf, 0xff,
+ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xdf,
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x32, 0xe1,
+ 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xe0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x30, 0x25, 0x30, 0x34, 0x30, 0x39, 0x30,
+ 0x4d, 0x30, 0x52, 0x30, 0x57, 0x30, 0x76, 0x30,
+ 0x8a, 0x30, 0xa7, 0x30, 0xac, 0x30, 0xb1, 0x30,
+ 0xb6, 0x30, 0xbb, 0x30, 0xc0, 0x30, 0xc5, 0x30,
+ 0xca, 0x30, 0xcf, 0x30, 0xd4, 0x30, 0xd9, 0x30,
+ 0xde, 0x30, 0xe3, 0x30, 0xe8, 0x30, 0xed, 0x30,
+ 0xf2, 0x30, 0xf7, 0x30, 0xfc, 0x30, 0x01, 0x31,
+ 0x06, 0x31, 0x0b, 0x31, 0x10, 0x31, 0x15, 0x31,
+ 0x1a, 0x31, 0x1f, 0x31, 0x24, 0x31, 0x29, 0x31,
+ 0x2e, 0x31, 0x33, 0x31, 0x38, 0x31, 0x3d, 0x31,
+ 0x42, 0x31, 0x47, 0x31, 0x4c, 0x31, 0x51, 0x31,
+ 0x56, 0x31, 0x5b, 0x31, 0x60, 0x31, 0x65, 0x31,
+ 0x6a, 0x31, 0x6f, 0x31, 0xbd, 0x31, 0xc1, 0x31,
+ 0xc5, 0x31, 0xc9, 0x31, 0xcd, 0x31, 0xce, 0x31,
+ 0xd2, 0x31, 0xd6, 0x31, 0xda, 0x31, 0xde, 0x31,
+ 0x45, 0x30, 0x31, 0x68, 0x24, 0x46, 0x69, 0x6c,
+ 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f,
+ 0x75, 0x6e, 0x64, 0x24, 0x45, 0x30, 0x33, 0x68,
+ 0x24, 0x54, 0x6f, 0x6f, 0x20, 0x6d, 0x61, 0x6e,
+ 0x79, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x66,
+ 0x69, 0x6c, 0x65, 0x73, 0x24, 0x45, 0x30, 0x35,
+ 0x68, 0x24, 0x45, 0x30, 0x36, 0x68, 0x24, 0x4d,
+ 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x63, 0x6f,
+ 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x62, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x20, 0x64, 0x65, 0x73, 0x74,
+ 0x72, 0x6f, 0x79, 0x65, 0x64, 0x24, 0x49, 0x6e,
+ 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65,
+ 0x6e, 0x74, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x72,
+ 0x79, 0x24, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
+ 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x61,
+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x69,
+ 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x24, 0x45,
+ 0x30, 0x41, 0x68, 0x24, 0x45, 0x30, 0x42, 0x68,
+ 0x24, 0x45, 0x30, 0x43, 0x68, 0x24, 0x45, 0x30,
+ 0x44, 0x68, 0x24, 0x45, 0x30, 0x45, 0x68, 0x24,
+ 0x45, 0x30, 0x46, 0x68, 0x24, 0x45, 0x31, 0x30,
+ 0x68, 0x24, 0x45, 0x31, 0x31, 0x68, 0x24, 0x45,
+ 0x31, 0x32, 0x68, 0x24, 0x45, 0x31, 0x33, 0x68,
+ 0x24, 0x45, 0x31, 0x34, 0x68, 0x24, 0x45, 0x31,
+ 0x35, 0x68, 0x24, 0x45, 0x31, 0x36, 0x68, 0x24,
+ 0x45, 0x31, 0x37, 0x68, 0x24, 0x45, 0x31, 0x38,
+ 0x68, 0x24, 0x45, 0x31, 0x39, 0x68, 0x24, 0x45,
+ 0x31, 0x41, 0x68, 0x24, 0x45, 0x31, 0x42, 0x68,
+ 0x24, 0x45, 0x31, 0x43, 0x68, 0x24, 0x45, 0x31,
+ 0x44, 0x68, 0x24, 0x45, 0x31, 0x45, 0x68, 0x24,
+ 0x45, 0x31, 0x46, 0x68, 0x24, 0x45, 0x32, 0x30,
+ 0x68, 0x24, 0x45, 0x32, 0x31, 0x68, 0x24, 0x45,
+ 0x32, 0x32, 0x68, 0x24, 0x45, 0x32, 0x33, 0x68,
+ 0x24, 0x45, 0x32, 0x34, 0x68, 0x24, 0x45, 0x32,
+ 0x35, 0x68, 0x24, 0x45, 0x32, 0x36, 0x68, 0x24,
+ 0x45, 0x32, 0x37, 0x68, 0x24, 0x45, 0x32, 0x38,
+ 0x68, 0x24, 0x45, 0x32, 0x39, 0x68, 0x24, 0x45,
+ 0x32, 0x41, 0x68, 0x24, 0x45, 0x32, 0x42, 0x68,
+ 0x24, 0x45, 0x32, 0x43, 0x68, 0x24, 0x45, 0x32,
+ 0x44, 0x68, 0x24, 0x45, 0x32, 0x45, 0x68, 0x24,
+ 0x45, 0x32, 0x46, 0x68, 0x24, 0x45, 0x33, 0x30,
+ 0x68, 0x24, 0x45, 0x33, 0x31, 0x68, 0x24, 0x44,
+ 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e,
+ 0x74, 0x69, 0x2d, 0x76, 0x69, 0x72, 0x75, 0x73,
+ 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x61, 0x64,
+ 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,
+ 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68,
+ 0x69, 0x73, 0x20, 0x67, 0x61, 0x6d, 0x65, 0x20,
+ 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6f, 0x72, 0x69,
+ 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x64, 0x69,
+ 0x73, 0x6b, 0x73, 0x2e, 0x24, 0x47, 0x45, 0x31,
+ 0x24, 0x47, 0x45, 0x32, 0x24, 0x47, 0x45, 0x33,
+ 0x24, 0x47, 0x45, 0x34, 0x24, 0x24, 0x47, 0x45,
+ 0x35, 0x24, 0x47, 0x45, 0x36, 0x24, 0x47, 0x45,
+ 0x37, 0x24, 0x47, 0x45, 0x38, 0x24, 0x47, 0x45,
+ 0x39, 0x24, 0x43, 0x61, 0x6c, 0x6c, 0x20, 0x79,
+ 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x66, 0x20,
+ 0x70, 0x69, 0x72, 0x61, 0x74, 0x65, 0x2c, 0x20,
+ 0x68, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2c, 0x20,
+ 0x65, 0x6c, 0x69, 0x74, 0x65, 0x20, 0x6f, 0x72,
+ 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,
+ 0x72, 0x2e, 0x20, 0x42, 0x75, 0x74, 0x20, 0x79,
+ 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61,
+ 0x20, 0x54, 0x48, 0x49, 0x45, 0x46, 0x2e, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d,
+ 0x6f, 0x75, 0x73, 0x65, 0x20, 0x6e, 0x6f, 0x74,
+ 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x20,
+ 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6b, 0x65,
+ 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x2e,
+ 0x2e, 0x0d, 0x0a, 0x50, 0x72, 0x65, 0x73, 0x73,
+ 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6b, 0x65, 0x79,
+ 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74,
+ 0x69, 0x6e, 0x75, 0x65, 0x2e, 0x24
+};
+
+const static char* messages[333] = {
+ "I have no idea what to do with it.", // 0
+ "I can't imagine what I could do with\nthis.", // 1
+ "I can't figure out what I should do\nwith this.", // 2
+ "I can't find any reason to mess\nwith it.", // 3
+ "Cool.", // 4
+ "That's no good.", // 5
+ "Wow! There's a car jack inside!\nGreat!", // 6
+ "There's something else inside the toolbox!\nA spanner!", // 7
+ "Last\nchance?", // 8
+ "I give up.", // 9
+ "I'm going to stay at least five meters\naway from these bees!", // 10
+ "There's nothing else in the boat.", // 11
+ "This wood is too hard to break.", // 12
+ "Booo!", // 13
+ "I don't think I should push\nmy luck.", // 14
+ "Just an ordinary hay stack. Now.", // 15
+ "And they say you can't find a needle\nin a hay stack.", // 16
+ "There are no more\npotatoes.", // 17
+ "Good I always asked mum for\ntrousers with BIG pockets...", // 18
+ "Life is brutal.", // 19
+ "Life is really brutal.", // 20
+ "Something tickled\nme!", // 21
+ "At least it's gone.", // 22
+ "Who knows what monsters\nmay live in there...", // 23
+ "I'd better not put my hands in there.\nSomething might bite them off\n(yuck)!", // 24
+ "I can see it's totally\nempty.", // 25
+ "One small step for man,\none big pain in the ...head...", // 26
+ "I won't take my chances\na second time...", // 27
+ "I really hope this is DINOSAUR\nbone...", // 28
+ "Wow! This must have shaken\nall the nearby walls!", // 29
+ "It's kinda dark here.", // 30
+ "I'm not going to wander here\nin the dark again.", // 31
+ "Shutting the valve shook the dirt from the wall\nand revealed the switch!", // 32
+ "Sorry, buddy, but I need your\nsunglasses.", // 33
+ "It's not the best place for diving...", // 34
+ "Not here...", // 35
+ "I really can't talk underwater!...", // 36
+ "I don't think swimming there is worth the effort.", // 37
+ "If I want to get this anchor I have to swim there\nwhen I have more air in my lungs...", // 38
+ "I was really hooked on this anchor!", // 39
+ "This seaweed is just like the flowers\nI gave mum on her last birthday.", // 40
+ "I wonder what fish do inside\nthis boat at night.", // 41
+ "I think I have to fish out something down\nthere.", // 42
+ "At least fish don't worry about the rain.", // 43
+ "I hope all this fish stuff is not a red herring.", // 44
+ "It's nice down there.", // 45
+ "Hey, let go, will ya?!", // 46
+ "Aaaaaaaaaaaaaahhh!...", // 47
+ "Oops.", // 48
+ "People leave food in unbelievable places.", // 49
+ "Come here, I've got something for\nyou...", // 50
+ "I can't catch it!", // 51
+ "The mouse is trapped!", // 52
+ "Yikes!", // 53
+ "Boy, this mouse has some nerve!", // 54
+ "There's nothing else in the drawers.", // 55
+ "I must get rid of this bush first.", // 56
+ "The mouse has gone!", // 57
+ "Nonsense.", // 58
+ "I understand. Good doggy.", // 59
+ "Here, boy.", // 60
+ "I hope we're friends now.", // 61
+ "I don't think this is the right place.", // 62
+ "Hundred moments later...", // 63
+ "Another hundred moments later...", // 64
+ "At least I found crude-oil and I'll be\nrich.", // 65
+ "That's my life.", // 66
+ "!?&!", // 67
+ "But grandpa, you promised!...", // 68
+ "Oh, all right. Let's go.", // 69
+ "Bye.", // 70
+ "No need to do it again.", // 71
+ "I really don't know how to talk to\ngirls...", // 72
+ "I usually don't work without a purpose.", // 73
+ "Only the nut is real.", // 74
+ "I wonder if hens can fly. Come here,\nbaby...", // 75
+ "First test failed.", // 76
+ "I'd already got rid of my frustrations.", // 77
+ "Nah, it's a road to nowhere.", // 78
+ "It opens the boot.", // 79
+ "It's shut tight.", // 80
+ "There's nothing else in the boot.", // 81
+ "The clothes are dry now.", // 82
+ "I'm sure these crows will kill me!", // 83
+ "If I want to get inside I must get rid of\nthis guard first or find some other\nway.", // 84
+ "The wall surface is too smooth to climb.", // 85
+ "I could climb it\nif there wasn't\nso much resin.", // 86
+ "The only green stuff I like is that rectangular\npiece of paper with some important-looking\nguy on it.", // 87
+ "I don't wanna touch it. Its spines could\nhurt my delicate hands.", // 88
+ "Thanks, I'm not hungry.", // 89
+ "I really don't have such long hands.", // 90
+ "It's too far to swim there.", // 91
+ "Echo!", // 92
+ "ECHO!", // 93
+ "Who's there?!", // 94
+ "WHO'S THERE?!", // 95
+ " DON'T COPY ME!...", // 96
+ " DON'T COPY ME!!!", // 97
+ "...OR I WILL THROW A ROCK DOWN THERE!", // 98
+ "OR I WILL...", // 99
+ "Are you still there?", // 100
+ "It's not a barrel-organ. And there's\nno bucket.", // 101
+ "I don't need to open it.", // 102
+ "Hmmm... Grass... Nah, children might\nbe watching.", // 103
+ "I won't find the nut just like that.\nThe grass is too dense.", // 104
+ "I'm not horny.", // 105
+ "No way I can jump so high,\ncause, er..., white men\ncan't jump.", // 106
+ "I don't need it.", // 107
+ "I'm not Santa Claus.", // 108
+ "I don't need plastic imitations.", // 109
+ "It's too fragile to carry around.", // 110
+ "I'd like to keep it open.", // 111
+ "I really don't want to walk around with\nsomeone else's socks.", // 112
+ "Thanks, I'm not tired.", // 113
+ "It's too big and I doubt if I'll ever\nneed it.", // 114
+ "I don't think there's any secret passage\ninside.", // 115
+ "There are no more interesting fruits here.", // 116
+ "They can jug me if I steal this.", // 117
+ "I'd better leave it. Women are really\noversensitive about flowers.", // 118
+ "Mirror, mirror on the wall,\nwho's the smartest of them all?", // 119
+ "Hey, don't think too long.", // 120
+ "A hint: someone in this room,\na male.", // 121
+ "OK, take your time.", // 122
+ "I'd better not interrupt its\nthought process.", // 123
+ "I don't want to have anything in common\nwith dentists.", // 124
+ "It's too heavy. Not that I'm wimp.", // 125
+ "Let's look what we've got here...", // 126
+ "'Strawberry jam'.", // 127
+ "'Gooseberry jam'.", // 128
+ "'Blackberry jam'.", // 129
+ "'Bilberry jam'.", // 130
+ "Get me out of this jam!", // 131
+ "Oh, and there is 'Rosemary jam'.", // 132
+ "I used to know someone called Rosemary.", // 133
+ "I don't want those jams.", // 134
+ "It's too dark to see clearly.", // 135
+ "YEEEOOOWWWW!", // 136
+ "(yawn)", // 137
+ "(laughter)", // 138
+ "I can't remove it with my hands - these\nthorns look really sharp.", // 139
+ "There's no fuel in the chainsaw.", // 140
+ "Thorns are too thin, the chainsaw\nis useless here.", // 141
+ "Yeah, great idea. Let's take this rock and\nwalk around a bit. Gee...", // 142
+ "I'd better leave them alone, they make\nthis place beautiful.", // 143
+ "I'm not sure if it's alive.", // 144
+ "I don't know what language it speaks.", // 145
+ "The hole is too narrow to fit my hand.", // 146
+ "Hey, you! Wake up! Bird attack!", // 147
+ "I don't have a search-warrant.", // 148
+ "I don't see anything interesting\nabout this hay stack.", // 149
+ "It's more complicated than that.", // 150
+ "It's pointless, the nut will slip between\nthe rake's teeth.", // 151
+ "The paddle is BROKEN.", // 152
+ "This branch is not a paddle. It doesn't\neven look like one.", // 153
+ "I'd better try somewhere else - I suppose this\nside is heavily guarded.", // 154
+ "I needed to sharpen it, not pulverize.", // 155
+ "I can't do anything here, it's too dark.", // 156
+ "Here, let's make your\npocket fat.", // 157
+ "It's a note from some bank. Strange,\nbut someone has also written \"NEVER! ANNE\"\non it.", // 158
+ "If I just show her the money,\nshe might take it.", // 159
+ "A hundred bucks!!!", // 160
+ "I want blood!", // 161
+ "I don't want to leave the mansion,\nI want blood!", // 162
+ "I'm a pathetic little wimp.", // 163
+ "Strange, but the drawer is stuck\nif the next drawer is open...", // 164
+ "Maybe these are not just ordinary\ndrawers!", // 165
+ "I cannot open the drawer\nif the next one is open!", // 166
+ "It's got a blue interior.", // 167
+ "It's got a red interior.", // 168
+ "It's got a grey interior.", // 169
+ "It's got a green interior.", // 170
+ "It's got a brown interior.", // 171
+ "It's got a pink interior.", // 172
+ "Wow! There's a dictaphone inside!", // 173
+ "There's a polaroid inside!\nI might need that.", // 174
+ "Something's got hold of the book!", // 175
+ "Wow! A secret compartment!", // 176
+ "I don't need to mess with it\nanymore.", // 177
+ "Fully automatic.", // 178
+ "Right now I don't need any more\nsheets.", // 179
+ "Nah, I don't want to deprave the kids.", // 180
+ "I don't want to read it again.\nI might like it.", // 181
+ "I just realised that the TV is off.", // 182
+ "Nothing happened.", // 183
+ "The tape started!", // 184
+ "That's much better.", // 185
+ "I don't want to sleep.", // 186
+ "It's just a cork.", // 187
+ "I don't need any more photos.", // 188
+ "Yeah, I can record this and scare\nthe cats.", // 189
+ "I already recorded what I wanted to.", // 190
+ "I can't record anything until I find some\nbatteries.", // 191
+ "No batteries, no fun.", // 192
+ "I don't think this is the right moment.", // 193
+ "I can't do anything with\nthis cook around.", // 194
+ "The bottle's the same, but\nI doubt if it's enough to\nfool anyone.", // 195
+ "I wanted to break it, not to\nflatten it!..", // 196
+ "I was always curious what's inside\nthese things.", // 197
+ "The rest is useless.", // 198
+ "Wow! Two 1.5V batteries!", // 199
+ "This one's taken, OK?", // 200
+ "It finally happened. I'm slightly mad.", // 201
+ "The paper burnt out completely!", // 202
+ "Burn, baby, burn!", // 203
+ "Voila.", // 204
+ "It's too hot to touch!", // 205
+ "It has frozen hard onto the shelf!", // 206
+ "Yummy.", // 207
+ "I never liked veal anyway.", // 208
+ "There's no reason to do it.", // 209
+ "I'd already fooled him once.", // 210
+ "Mike, activate the voice test.", // 211
+ "I won't cheat Mike with MY voice.", // 212
+ "...siiiiinging!...", // 213
+ "Mike, let's get on with the scent\ntest.", // 214
+ "Mike, run the view test.", // 215
+ "'A secret diary of John Noty. Authorised.'", // 216
+ "I can't hide here!", // 217
+ "There's John Noty outside! I can't go out!", // 218
+ "That was close.", // 219
+ "The cork is stuck in the hole.", // 220
+ "It fits perfectly!", // 221
+ "There's enough water in the sink.", // 222
+ "There's no hot water in the sink.", // 223
+ "The label has come off!", // 224
+ "The cork is a bit too small.", // 225
+ "There's no need to try them now.", // 226
+ "I don't want to turn myself into a salad.", // 227
+ "Nah...", // 228
+ "I'd better stop this ventilator first.", // 229
+ "I'd better catch John Noty first.", // 230
+ "Good this red stuff is only a chilli...", // 231
+ "The water looks very hot.", // 232
+ "The sink is full of hot water.", // 233
+ "I don't have anything\nto store these socks in.", // 234
+ "Here are my papers.", // 235
+ "I already got the permission.", // 236
+ "'Saving is a very fine thing. Especially\nwhen your parents have done it for you'", // 237
+ "'I love captain'", // 238
+ "'Soccer rulz'", // 239
+ "'Don't cut the trees, cuz one\nday you may become partisan\ntoo'", // 240
+ "'VISA accepted'", // 241
+ "The rest of graffiti is obscene.", // 242
+ "Sir, I'm Mark. A rookie.", // 243
+ "It's locked!", // 244
+ "Thanks.", // 245
+ "I don't have any idea what\nto do with it right\nnow.", // 246
+ "That gives me an idea...", // 247
+ "Now I got to check if it works...", // 248
+ "I think it's time to call captain...", // 249
+ "Hey! I finished the meal!", // 250
+ "Wow, he got welded to the bowl!...", // 251
+ "Gotcha.", // 252
+ "I don't want to touch\nhis pockets again.", // 253
+ "That doesn't work.", // 254
+ "Piece of cake.", // 255
+ "And how am I supposed to get back?", // 256
+ "Great.", // 257
+ "Oh, yeah, right...", // 258
+ "I can't pull it out.", // 259
+ "I don't want to touch it - I might get hurt.", // 260
+ "The fence blocks the way...", // 261
+ "I don't want to sleep.", // 262
+ "I can't reach it.", // 263
+ "Hello?", // 264
+ "He's totally addicted.", // 265
+ "What about a new...", // 266
+ "...hot off the press...", // 267
+ "...full-color...", // 268
+ "...special edition...", // 269
+ "... of 'Soldier News'?!", // 270
+ "Never again!", // 271
+ "What am I? A vacuum cleaner?!", // 272
+ " Sixty seven rude words later...", // 273
+ "Meanwhile in the mansion...", // 274
+ "Now it's open.", // 275
+ "C'mon, baby, it's all yours!", // 276
+ "I've got no reason to talk to him\nright now.", // 277
+ "Yeah, right!...", // 278
+ "The barman is too close...", // 279
+ "Yuck!", // 280
+ "I prefer water.", // 281
+ "I'm too weak to climb it.", // 282
+ "The springs would prick my back.", // 283
+ "No, thanks. This food seems still alive.", // 284
+ "The door is closed. What a surprise.", // 285
+ "It's empty.", // 286
+ "I should have paid more attention\nin geography classes...", // 287
+ "I don't need this mess.", // 288
+ "Thanks, but I've seen softer rocks.", // 289
+ "They are too blunt to be of any use.", // 290
+ "What's the use of the models?", // 291
+ "The barman will surely notice its\ndisappearing.", // 292
+ "It'd take too much time to drink it all.\nMaybe after the mission...", // 293
+ "\n\nI'm not a thief. And it's empty, by the way.", // 294
+ "There are too many of them to search.", // 295
+ "Captain surely wouldn't fit them.\nI must look elsewhere.", // 296
+ "Chickening? Me? Never!", // 297
+ "I can't open it.", // 298
+ "I don't need them.", // 299
+ "What am I? A Peeping Tom?", // 300
+ "I have big pockets, but there are limits.", // 301
+ "If I put it on I might have trouble walking\nup the stairs.", // 302
+ "I'd need 9 lives to read them all.", // 303
+ "Thanks, I'm not so tired.", // 304
+ "There's no need to turn it on.", // 305
+ "It won't bear my weight.", // 306
+ "I never learnt to how use one...", // 307
+ "They're so sharp they'd rip my trousers!", // 308
+ "Pfui! The cognac really didn't do any good...", // 309
+ "I don't have time for pleasures.", // 310
+ "I won't touch these socks with my bare hands!", // 311
+ "It's not Halloween.", // 312
+ "It can't be controlled manually! I hate it!", // 313
+ "I have nothing to play.", // 314
+ "I can't take it. It's not mine.", // 315
+ "Hey! What's the matter?!", // 316
+ "It's open!", // 317
+ "It's out of order.", // 318
+ "With captain watching?...\nBetter not...", // 319
+ "The sickle is too blunt.", // 320
+ "First I've got some business to take care of.", // 321
+ "Digging it out with the knife could\ntake a hundred years.", // 322
+ "I don't want to make more\nmess on this table.", // 323
+ "Should I throw the crumbs to the bird?", // 324
+ "I don't want to waste these tasty crumbs.", // 325
+ "Better not... I might slip and fall in...", // 326
+ "\"The history of blues\".", // 327
+ "\"Manchester United, or the Red Devils story\".", // 328
+ "\"Greyhounds and other hunting dogs\".", // 329
+ "\"Greenhorn, or my adventures in the Wild West\".", // 330
+ "\"Charlie Brown and his company\".", // 331
+ "\"Pink Panther: an unauthorised biography\"." // 332
+};
+
+#define DSEG_ENDBLK_SIZE 34651
+
+const static uint8 dsegEndBlock[DSEG_ENDBLK_SIZE] = {
+ 0x90, 0x9d, 0xe5, 0x9d, 0x54, 0x9e, 0xc3, 0x9e,
+ 0x3e, 0x9f, 0x0b, 0x30, 0x02, 0x31, 0x03, 0x32,
+ 0x04, 0x33, 0x05, 0x34, 0x06, 0x35, 0x07, 0x36,
+ 0x08, 0x37, 0x09, 0x38, 0x0a, 0x39, 0x0c, 0x2d,
+ 0x1e, 0x41, 0x30, 0x42, 0x2e, 0x43, 0x20, 0x44,
+ 0x12, 0x45, 0x21, 0x46, 0x22, 0x47, 0x23, 0x48,
+ 0x17, 0x49, 0x24, 0x4a, 0x25, 0x4b, 0x26, 0x4c,
+ 0x32, 0x4d, 0x31, 0x4e, 0x18, 0x4f, 0x19, 0x50,
+ 0x10, 0x51, 0x13, 0x52, 0x1f, 0x53, 0x14, 0x54,
+ 0x16, 0x55, 0x2f, 0x56, 0x11, 0x57, 0x2d, 0x58,
+ 0x15, 0x59, 0x2c, 0x5a, 0x33, 0x2c, 0x34, 0x2e,
+ 0x35, 0x3f, 0x39, 0x20, 0x28, 0x27, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0a, 0x48, 0x01,
+ 0x00, 0x7c, 0x19, 0x48, 0x02, 0x00, 0xaf, 0x30,
+ 0x0e, 0x03, 0x02, 0xbe, 0x30, 0x26, 0x03, 0x03,
+ 0xe5, 0x30, 0x0e, 0x03, 0x01, 0xaf, 0x3f, 0x0e,
+ 0x04, 0x02, 0xbe, 0x3f, 0x26, 0x04, 0x03, 0xe5,
+ 0x3f, 0x0e, 0x04, 0x01, 0x9f, 0x4e, 0x0e, 0x05,
+ 0x02, 0xae, 0x4e, 0x36, 0x05, 0x03, 0xe5, 0x4e,
+ 0x0e, 0x05, 0x01, 0x9f, 0x5d, 0x0e, 0x06, 0x02,
+ 0xae, 0x5d, 0x36, 0x06, 0x03, 0xe5, 0x5d, 0x0e,
+ 0x06, 0x01, 0x9f, 0x6c, 0x0e, 0x07, 0x02, 0xae,
+ 0x6c, 0x36, 0x07, 0x03, 0xe5, 0x6c, 0x0e, 0x07,
+ 0x01, 0xa7, 0x7b, 0x0e, 0x08, 0x02, 0xb6, 0x7b,
+ 0x2e, 0x08, 0x03, 0xe5, 0x7b, 0x0e, 0x08, 0x01,
+ 0x8d, 0x94, 0x25, 0x0b, 0x00, 0x6c, 0xa3, 0x69,
+ 0x0a, 0x00, 0x79, 0xb2, 0x50, 0x0d, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x81, 0x0f, 0x41, 0x22,
+ 0xd3, 0x3e, 0x92, 0x51, 0x50, 0x64, 0x0e, 0x77,
+ 0xd0, 0x89, 0x8a, 0x9c, 0x00, 0x00, 0x52, 0xbd,
+ 0xb1, 0xce, 0x81, 0xe1, 0x4c, 0x6f, 0x61, 0x64,
+ 0x20, 0x67, 0x61, 0x6d, 0x65, 0x00, 0x53, 0x61,
+ 0x76, 0x65, 0x20, 0x67, 0x61, 0x6d, 0x65, 0x00,
+ 0x4d, 0x75, 0x73, 0x69, 0x63, 0x20, 0x76, 0x6f,
+ 0x6c, 0x75, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x20,
+ 0x2d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x7f, 0x00, 0x53,
+ 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x76, 0x6f, 0x6c,
+ 0x75, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x20, 0x2d,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x7f, 0x00, 0x48, 0x65,
+ 0x72, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x65, 0x64,
+ 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x7f, 0x00, 0x47,
+ 0x61, 0x6d, 0x65, 0x20, 0x73, 0x70, 0x65, 0x65,
+ 0x64, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7f, 0x00,
+ 0x54, 0x65, 0x78, 0x74, 0x20, 0x73, 0x70, 0x65,
+ 0x65, 0x64, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7f,
+ 0x00, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
+ 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20, 0x20, 0x20,
+ 0x20, 0x2d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x7f, 0x00, 0x20, 0x00, 0x51, 0x75, 0x69, 0x74,
+ 0x00, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
+ 0x74, 0x6f, 0x20, 0x67, 0x61, 0x6d, 0x65, 0x00,
+ 0x4f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e,
+ 0x66, 0x6f, 0x00, 0x00, 0x77, 0x64, 0x39, 0x77,
+ 0x0f, 0x8a, 0x44, 0x6f, 0x20, 0x79, 0x6f, 0x75,
+ 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x00,
+ 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20,
+ 0x71, 0x75, 0x69, 0x74, 0x00, 0x28, 0x59, 0x2f,
+ 0x4e, 0x29, 0x3f, 0x00, 0x00, 0xf7, 0x57, 0x83,
+ 0x6a, 0x43, 0x7d, 0x03, 0x90, 0x46, 0x6f, 0x72,
+ 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x63, 0x61,
+ 0x6c, 0x6c, 0x3a, 0x00, 0x55, 0x4b, 0x3a, 0x20,
+ 0x50, 0x44, 0x20, 0x53, 0x65, 0x6c, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x30, 0x31,
+ 0x34, 0x37, 0x34, 0x20, 0x33, 0x32, 0x35, 0x38,
+ 0x30, 0x32, 0x00, 0x55, 0x53, 0x41, 0x20, 0x61,
+ 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72,
+ 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64,
+ 0x3a, 0x00, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x20,
+ 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x20, 0x28, 0x38,
+ 0x30, 0x30, 0x29, 0x20, 0x35, 0x38, 0x33, 0x2d,
+ 0x34, 0x38, 0x33, 0x38, 0x00, 0x00, 0x44, 0x5f,
+ 0x04, 0x77, 0xc4, 0x84, 0x84, 0x92, 0x49, 0x20,
+ 0x63, 0x61, 0x6e, 0x27, 0x74, 0x20, 0x75, 0x73,
+ 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73,
+ 0x61, 0x76, 0x65, 0x67, 0x61, 0x6d, 0x65, 0x21,
+ 0x00, 0x28, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69,
+ 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f,
+ 0x72, 0x72, 0x75, 0x70, 0x74, 0x65, 0x64, 0x20,
+ 0x6f, 0x72, 0x20, 0x77, 0x61, 0x73, 0x00, 0x73,
+ 0x61, 0x76, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64,
+ 0x65, 0x72, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65,
+ 0x72, 0x65, 0x6e, 0x74, 0x20, 0x67, 0x61, 0x6d,
+ 0x65, 0x00, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x2e, 0x20, 0x53, 0x6f, 0x72, 0x72, 0x79,
+ 0x2e, 0x29, 0x00, 0x00, 0xc7, 0x32, 0x4f, 0x46,
+ 0x46, 0x00, 0xc7, 0x32, 0x31, 0x30, 0x80, 0x00,
+ 0xc6, 0x32, 0x32, 0x30, 0x80, 0x00, 0xc6, 0x32,
+ 0x33, 0x30, 0x80, 0x00, 0xc6, 0x32, 0x34, 0x30,
+ 0x80, 0x00, 0xc6, 0x32, 0x35, 0x30, 0x80, 0x00,
+ 0xc6, 0x32, 0x36, 0x30, 0x80, 0x00, 0xc6, 0x32,
+ 0x37, 0x30, 0x80, 0x00, 0xc6, 0x32, 0x38, 0x30,
+ 0x80, 0x00, 0xc6, 0x32, 0x39, 0x30, 0x80, 0x00,
+ 0xc5, 0x32, 0x4d, 0x41, 0x58, 0x00, 0xc7, 0x41,
+ 0x4f, 0x46, 0x46, 0x00, 0xc7, 0x41, 0x31, 0x30,
+ 0x80, 0x00, 0xc6, 0x41, 0x32, 0x30, 0x80, 0x00,
+ 0xc6, 0x41, 0x33, 0x30, 0x80, 0x00, 0xc6, 0x41,
+ 0x34, 0x30, 0x80, 0x00, 0xc6, 0x41, 0x35, 0x30,
+ 0x80, 0x00, 0xc6, 0x41, 0x36, 0x30, 0x80, 0x00,
+ 0xc6, 0x41, 0x37, 0x30, 0x80, 0x00, 0xc6, 0x41,
+ 0x38, 0x30, 0x80, 0x00, 0xc6, 0x41, 0x39, 0x30,
+ 0x80, 0x00, 0xc5, 0x41, 0x4d, 0x41, 0x58, 0x00,
+ 0xbb, 0x50, 0x53, 0x4c, 0x4f, 0x57, 0x20, 0x20,
+ 0x00, 0xb4, 0x50, 0x4e, 0x4f, 0x52, 0x4d, 0x41,
+ 0x4c, 0x00, 0xbb, 0x50, 0x46, 0x41, 0x53, 0x54,
+ 0x20, 0x20, 0x00, 0xb7, 0x50, 0x43, 0x52, 0x41,
+ 0x5a, 0x59, 0x20, 0x00, 0xbb, 0x5f, 0x53, 0x4c,
+ 0x4f, 0x57, 0x20, 0x20, 0x00, 0xb4, 0x5f, 0x4e,
+ 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x00, 0xbb, 0x5f,
+ 0x46, 0x41, 0x53, 0x54, 0x20, 0x20, 0x00, 0xb7,
+ 0x5f, 0x43, 0x52, 0x41, 0x5a, 0x59, 0x20, 0x00,
+ 0xb8, 0x6e, 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x20,
+ 0x00, 0xbb, 0x6e, 0x53, 0x4c, 0x4f, 0x57, 0x20,
+ 0x20, 0x00, 0xb4, 0x6e, 0x4e, 0x4f, 0x52, 0x4d,
+ 0x41, 0x4c, 0x00, 0xbb, 0x6e, 0x46, 0x41, 0x53,
+ 0x54, 0x20, 0x20, 0x00, 0xb7, 0x6e, 0x43, 0x52,
+ 0x41, 0x5a, 0x59, 0x20, 0x00, 0xbe, 0x7d, 0x4d,
+ 0x4f, 0x4e, 0x4f, 0x20, 0x00, 0xbb, 0x7d, 0x43,
+ 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x3b, 0x0c, 0xca,
+ 0x0c, 0x00, 0x3b, 0x1b, 0xca, 0x0c, 0x00, 0x3b,
+ 0x2a, 0xca, 0x0c, 0x00, 0x3b, 0x39, 0xca, 0x0c,
+ 0x00, 0x3b, 0x48, 0xca, 0x0c, 0x00, 0x3b, 0x57,
+ 0xca, 0x0c, 0x00, 0x3b, 0x66, 0xca, 0x0c, 0x00,
+ 0x3b, 0x75, 0xca, 0x0c, 0x00, 0x3b, 0x84, 0xca,
+ 0x0c, 0x00, 0x3b, 0x93, 0xca, 0x0c, 0x00, 0x6e,
+ 0xaf, 0x64, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xcc, 0xdd, 0x43, 0x61, 0x6e, 0x63, 0x65,
+ 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x5f, 0x00, 0x0d, 0x0a, 0x48,
+ 0x45, 0x4c, 0x4c, 0x4f, 0x2c, 0x20, 0x56, 0x4f,
+ 0x59, 0x45, 0x55, 0x52, 0x21, 0x0d, 0x0a, 0xaf,
+ 0xb3, 0xa6, 0x64, 0x00, 0x0a, 0x01, 0x01, 0x02,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x28, 0x1b, 0x1c, 0x28,
+ 0x1d, 0x1e, 0x28, 0x1b, 0x28, 0x1f, 0x20, 0x28,
+ 0x1b, 0x1c, 0x28, 0x1d, 0x28, 0x1f, 0x28, 0x1b,
+ 0x00, 0x28, 0x1b, 0x1c, 0x28, 0x1d, 0x1e, 0x28,
+ 0x1b, 0x28, 0x1f, 0x20, 0x28, 0x1b, 0x1c, 0x28,
+ 0x1d, 0x28, 0x1f, 0x28, 0x1b, 0x00, 0x2a, 0x26,
+ 0x2a, 0x2a, 0x27, 0x2a, 0x27, 0x2a, 0x2a, 0x26,
+ 0x2a, 0x26, 0x2a, 0x2a, 0x2a, 0x27, 0x26, 0x2a,
+ 0x2a, 0x27, 0x00, 0x21, 0x22, 0x23, 0x24, 0x29,
+ 0x25, 0x29, 0x29, 0x25, 0x29, 0x21, 0x22, 0x21,
+ 0x24, 0x29, 0x21, 0x29, 0x29, 0x21, 0x29, 0x00,
+ 0x00, 0x00, 0x01, 0x46, 0x65, 0x82, 0x65, 0xb2,
+ 0x65, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04,
+ 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06,
+ 0x06, 0x06, 0x06, 0x07, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x00, 0x01, 0x02, 0x03,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x08, 0x08, 0x08, 0x09, 0x08, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x00, 0x01, 0x02, 0x03,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x06, 0x04, 0x08, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
+ 0x04, 0x04, 0x04, 0x04, 0x00, 0x01, 0x02, 0x03,
+ 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x00,
+ 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+ 0x0a, 0x00, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
+ 0x1a, 0x00, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11,
+ 0x12, 0x00, 0x00, 0x00, 0x3a, 0x0d, 0x28, 0x2e,
+ 0x00, 0x20, 0x31, 0x18, 0x10, 0x3a, 0x23, 0x14,
+ 0x3f, 0x2b, 0x17, 0x3f, 0x30, 0x22, 0x3f, 0x34,
+ 0x21, 0x3f, 0x00, 0x00, 0x36, 0x00, 0x00, 0x28,
+ 0x00, 0x00, 0x11, 0x2f, 0x3f, 0x11, 0x24, 0x3f,
+ 0x11, 0x16, 0x3f, 0x1d, 0x11, 0x1f, 0x28, 0x2f,
+ 0x33, 0x35, 0x13, 0x10, 0x0c, 0x28, 0x21, 0x19,
+ 0x00, 0x92, 0x66, 0x94, 0x66, 0x96, 0x66, 0x98,
+ 0x66, 0x9a, 0x66, 0x9c, 0x66, 0x9e, 0x66, 0xa0,
+ 0x66, 0xa2, 0x66, 0xa4, 0x66, 0xa6, 0x66, 0xb1,
+ 0x66, 0xbc, 0x66, 0xbe, 0x66, 0xc9, 0x66, 0xcb,
+ 0x66, 0xd6, 0x66, 0xd8, 0x66, 0xe3, 0x66, 0xe5,
+ 0x66, 0xf0, 0x66, 0xf2, 0x66, 0xf4, 0x66, 0xf6,
+ 0x66, 0xf8, 0x66, 0xfa, 0x66, 0x20, 0x67, 0x22,
+ 0x67, 0x24, 0x67, 0x26, 0x67, 0x28, 0x67, 0x2a,
+ 0x67, 0x2c, 0x67, 0x2e, 0x67, 0x30, 0x67, 0x32,
+ 0x67, 0x34, 0x67, 0x36, 0x67, 0x38, 0x67, 0x3a,
+ 0x67, 0x3c, 0x67, 0x3e, 0x67, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x00, 0x00, 0x5c, 0x00, 0x50, 0x00, 0x97,
+ 0x00, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x01, 0xab, 0x00, 0x09, 0xff, 0xff, 0xff,
+ 0xff, 0x1f, 0x00, 0xb7, 0x00, 0x55, 0x00, 0xc4,
+ 0x00, 0x0c, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0xd2, 0x00, 0xc7, 0x00, 0x08, 0xff,
+ 0xff, 0xff, 0xff, 0x3a, 0x00, 0x9e, 0x00, 0x3f,
+ 0x01, 0xc7, 0x00, 0x0a, 0xff, 0xff, 0xff, 0xff,
+ 0x82, 0x00, 0xa0, 0x00, 0x3f, 0x01, 0xa9, 0x00,
+ 0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x00, 0x86, 0x00, 0xc7, 0x00, 0x12, 0x00, 0x00,
+ 0x00, 0x00, 0xaf, 0x00, 0xae, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0xdb, 0x00, 0xa9, 0x00, 0x0e,
+ 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x9a, 0x67, 0x9b, 0x67, 0xf0, 0x67, 0x29,
+ 0x68, 0x70, 0x68, 0xc5, 0x68, 0xfe, 0x68, 0x37,
+ 0x69, 0x8c, 0x69, 0xc5, 0x69, 0x1a, 0x6a, 0x6f,
+ 0x6a, 0xc4, 0x6a, 0xfd, 0x6a, 0x6e, 0x6b, 0xdf,
+ 0x6b, 0x18, 0x6c, 0x19, 0x6c, 0x6e, 0x6c, 0xa7,
+ 0x6c, 0xee, 0x6c, 0x35, 0x6d, 0x7c, 0x6d, 0xb5,
+ 0x6d, 0xee, 0x6d, 0x19, 0x6e, 0x36, 0x6e, 0xd1,
+ 0x6e, 0xfc, 0x6e, 0x27, 0x6f, 0x6e, 0x6f, 0x8b,
+ 0x6f, 0xd2, 0x6f, 0x0b, 0x70, 0x6e, 0x70, 0x99,
+ 0x70, 0xb6, 0x70, 0xb7, 0x70, 0xf0, 0x70, 0xf1,
+ 0x70, 0xf2, 0x70, 0xf3, 0x70, 0x00, 0x06, 0x01,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0xb1,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xe4, 0x00, 0x9b, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xfc, 0x00, 0x8e, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0xc0, 0x00, 0xa2, 0x00, 0xc7,
+ 0x00, 0x02, 0x01, 0x00, 0x00, 0x03, 0x00, 0xff,
+ 0x00, 0x9c, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x04,
+ 0x00, 0x00, 0x01, 0x04, 0x01, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0xcb, 0x00, 0xbf, 0x00, 0x00, 0x03,
+ 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe8, 0x00, 0x99, 0x00, 0x00, 0x03, 0x02, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0xe5, 0x00, 0xb9, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x04, 0x00, 0x00, 0x01, 0x05, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xde, 0x00, 0xaf, 0x00, 0x00,
+ 0x03, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7b, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01,
+ 0x00, 0x00, 0x00, 0xc0, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0xf4,
+ 0x00, 0x93, 0x00, 0x3f, 0x01, 0xb0, 0x00, 0x04,
+ 0x00, 0x04, 0x00, 0x06, 0x01, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0xf9, 0x00, 0x9c, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x01, 0x00, 0xf9, 0x00, 0x00, 0x00,
+ 0x08, 0x01, 0x9b, 0x00, 0x00, 0x03, 0x00, 0x03,
+ 0x01, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3f, 0x01,
+ 0x7c, 0x00, 0x00, 0x03, 0x00, 0x03, 0x01, 0x03,
+ 0x46, 0x00, 0x00, 0x00, 0x6c, 0x00, 0xa4, 0x00,
+ 0x00, 0x03, 0x00, 0x03, 0x02, 0x01, 0x00, 0x00,
+ 0xb5, 0x00, 0x6b, 0x00, 0xc7, 0x00, 0x02, 0x01,
+ 0x00, 0x00, 0x03, 0x00, 0x87, 0x00, 0xb7, 0x00,
+ 0x3f, 0x01, 0xc7, 0x00, 0x04, 0x00, 0x00, 0x01,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
+ 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0xac,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x8f, 0x00, 0xbc, 0x00, 0x00,
+ 0x03, 0x02, 0x00, 0x01, 0x00, 0x33, 0x01, 0x00,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x00, 0xc7, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0xfa, 0x00, 0x00, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x53, 0x00,
+ 0xaf, 0x00, 0xe6, 0x00, 0xbe, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x06, 0x01, 0x00, 0xce, 0x00, 0xb3,
+ 0x00, 0x3f, 0x01, 0xc1, 0x00, 0x04, 0x00, 0x04,
+ 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0xb6, 0x00, 0x5e, 0x00, 0xc1,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x01, 0x00,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0xff, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0xc1, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x00,
+ 0xb2, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0xac, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x00,
+ 0x00, 0x00, 0x3f, 0x01, 0xbc, 0x00, 0x00, 0x00,
+ 0x04, 0x03, 0x01, 0x00, 0x16, 0x01, 0x00, 0x00,
+ 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,
+ 0x00, 0x8a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01,
+ 0x00, 0x59, 0x00, 0x00, 0x00, 0x3f, 0x01, 0x94,
+ 0x00, 0x00, 0x00, 0x04, 0x03, 0x01, 0x00, 0xec,
+ 0x00, 0x00, 0x00, 0x3f, 0x01, 0xa2, 0x00, 0x00,
+ 0x00, 0x04, 0x03, 0x02, 0x00, 0x00, 0x00, 0x94,
+ 0x00, 0x3e, 0x00, 0xc7, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x71,
+ 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0xbd, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00,
+ 0x00, 0x00, 0x91, 0x00, 0x1a, 0x00, 0xa3, 0x00,
+ 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0xb3, 0x00, 0xa4, 0x00, 0xc7, 0x00, 0x02, 0x01,
+ 0x00, 0x00, 0x02, 0x00, 0xa5, 0x00, 0xbd, 0x00,
+ 0xc8, 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x03, 0x00, 0xaf, 0x00, 0x83, 0x00, 0x3f, 0x01,
+ 0x97, 0x00, 0x04, 0x00, 0x04, 0x00, 0x03, 0x00,
+ 0xc3, 0x00, 0x98, 0x00, 0x3f, 0x01, 0xb3, 0x00,
+ 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x42, 0x00,
+ 0x00, 0x00, 0x7c, 0x00, 0x99, 0x00, 0x00, 0x03,
+ 0x00, 0x03, 0x06, 0x01, 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0xfc, 0x00, 0xa8, 0x00, 0x00, 0x03, 0x02,
+ 0x00, 0x01, 0x03, 0x00, 0x00, 0xa9, 0x00, 0x30,
+ 0x00, 0xb8, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01,
+ 0x00, 0xfd, 0x00, 0x00, 0x00, 0x1f, 0x01, 0xac,
+ 0x00, 0x00, 0x03, 0x02, 0x03, 0x01, 0x00, 0x20,
+ 0x01, 0x00, 0x00, 0x2c, 0x01, 0xa2, 0x00, 0x00,
+ 0x03, 0x02, 0x03, 0x01, 0x00, 0x2d, 0x01, 0x00,
+ 0x00, 0x3f, 0x01, 0x87, 0x00, 0x00, 0x03, 0x02,
+ 0x03, 0x02, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x3f,
+ 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x01, 0x01, 0x00, 0x00, 0xba, 0x00, 0x4b, 0x00,
+ 0xc7, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x01,
+ 0xe6, 0x00, 0xba, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x04, 0x00, 0x04, 0x01, 0x02, 0x00, 0x3e, 0x00,
+ 0x00, 0x00, 0x70, 0x00, 0xaf, 0x00, 0x00, 0x00,
+ 0x04, 0x03, 0x02, 0x00, 0x70, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0xb2, 0x00, 0x00, 0x00, 0x04, 0x03,
+ 0x08, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0x6e, 0x00, 0x00, 0x03, 0x04, 0x03, 0x01,
+ 0x00, 0x7a, 0x00, 0x6f, 0x00, 0x3f, 0x01, 0x89,
+ 0x00, 0x04, 0x00, 0x04, 0x03, 0x01, 0x00, 0xfc,
+ 0x00, 0x8d, 0x00, 0x3f, 0x01, 0xb8, 0x00, 0x04,
+ 0x00, 0x04, 0x03, 0x01, 0x00, 0x1c, 0x01, 0xb9,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x04, 0x00, 0x04,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x8a,
+ 0x00, 0xb2, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0xb3, 0x00, 0x23, 0x00, 0xc7,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x24,
+ 0x00, 0xb3, 0x00, 0x6d, 0x00, 0xbe, 0x00, 0x02,
+ 0x00, 0x02, 0x00, 0x03, 0x00, 0x77, 0x00, 0xbc,
+ 0x00, 0xe8, 0x00, 0xc7, 0x00, 0x00, 0x01, 0x00,
+ 0x01, 0x08, 0x03, 0x01, 0xde, 0x00, 0xb4, 0x00,
+ 0x2c, 0x01, 0xc7, 0x00, 0x04, 0x00, 0x00, 0x01,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00,
+ 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03,
+ 0x6f, 0x00, 0x00, 0x00, 0xef, 0x00, 0xb1, 0x00,
+ 0x00, 0x03, 0x00, 0x03, 0x01, 0x03, 0xf0, 0x00,
+ 0x00, 0x00, 0x22, 0x01, 0xa5, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x01, 0x03, 0x23, 0x01, 0x00, 0x00,
+ 0x3f, 0x01, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x02, 0x01, 0x00, 0x00, 0xb8, 0x00, 0x8b, 0x00,
+ 0xc7, 0x00, 0x02, 0x01, 0x00, 0x00, 0x03, 0x01,
+ 0xa3, 0x00, 0xb8, 0x00, 0xdd, 0x00, 0xc7, 0x00,
+ 0x04, 0x00, 0x00, 0x01, 0x03, 0x01, 0x2d, 0x01,
+ 0xaf, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3f, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b,
+ 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x14, 0x01, 0x00, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x65, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x61,
+ 0x00, 0x00, 0x00, 0x3f, 0x01, 0xa3, 0x00, 0x00,
+ 0x00, 0x04, 0x03, 0x01, 0x00, 0x34, 0x00, 0x85,
+ 0x00, 0x63, 0x00, 0x97, 0x00, 0x04, 0x00, 0x04,
+ 0x00, 0x01, 0x00, 0xab, 0x00, 0xa4, 0x00, 0x3f,
+ 0x01, 0xb6, 0x00, 0x00, 0x00, 0x04, 0x03, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x72,
+ 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x72, 0x00, 0x19, 0x00, 0xaa, 0x00, 0x02,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0xaa,
+ 0x00, 0x45, 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00,
+ 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0xa3, 0x00,
+ 0x2c, 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04,
+ 0x0f, 0x01, 0xa3, 0x00, 0x3f, 0x01, 0xbd, 0x00,
+ 0x04, 0x00, 0x04, 0x03, 0x01, 0x00, 0xe2, 0x00,
+ 0x00, 0x00, 0x3f, 0x01, 0xaa, 0x00, 0x00, 0x00,
+ 0x04, 0x03, 0x05, 0x01, 0x03, 0xb0, 0x00, 0xa4,
+ 0x00, 0x3f, 0x01, 0xbc, 0x00, 0x04, 0x00, 0x04,
+ 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0e,
+ 0x00, 0x82, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,
+ 0x03, 0x0f, 0x00, 0x00, 0x00, 0x88, 0x00, 0xb4,
+ 0x00, 0x00, 0x03, 0x00, 0x03, 0x01, 0x03, 0x89,
+ 0x00, 0x00, 0x00, 0x3f, 0x01, 0xa3, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x02, 0x01, 0x00, 0x00, 0xc4,
+ 0x00, 0x93, 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00,
+ 0x00, 0x05, 0x01, 0x00, 0xdc, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x03, 0x00, 0x03,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00,
+ 0xae, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x03,
+ 0x51, 0x00, 0x00, 0x00, 0x78, 0x00, 0xab, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x79, 0x00,
+ 0x00, 0x00, 0x3f, 0x01, 0xb1, 0x00, 0x00, 0x00,
+ 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0xc0, 0x00,
+ 0xa9, 0x00, 0xc7, 0x00, 0x02, 0x01, 0x00, 0x00,
+ 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0xaa, 0x00, 0x29, 0x00, 0xbf,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00,
+ 0x00, 0xbf, 0x00, 0x9e, 0x00, 0xc7, 0x00, 0x02,
+ 0x01, 0x00, 0x00, 0x01, 0x01, 0xc5, 0x00, 0xaf,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x04, 0x00, 0x00,
+ 0x01, 0x01, 0x04, 0x00, 0x01, 0xa8, 0x00, 0x3f,
+ 0x01, 0xae, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04,
+ 0x01, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x52, 0x00,
+ 0xba, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0xa9, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe0, 0x00,
+ 0xaa, 0x00, 0x3f, 0x01, 0xb2, 0x00, 0x00, 0x00,
+ 0x04, 0x03, 0x01, 0x00, 0x12, 0x01, 0xb3, 0x00,
+ 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47,
+ 0x00, 0xc7, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01,
+ 0x03, 0x47, 0x00, 0x00, 0x00, 0x12, 0x01, 0xa6,
+ 0x00, 0x00, 0x03, 0x00, 0x03, 0x01, 0x03, 0x63,
+ 0x00, 0x00, 0x00, 0xd3, 0x00, 0xaa, 0x00, 0x00,
+ 0x03, 0x00, 0x03, 0x01, 0x00, 0x12, 0x01, 0x00,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x96, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x03, 0x79, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0x90, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01,
+ 0x79, 0x00, 0xa4, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x69, 0x00, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x03, 0x6a, 0x00, 0x00,
+ 0x00, 0x3f, 0x01, 0xa5, 0x00, 0x00, 0x03, 0x02,
+ 0x03, 0x0b, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0x83, 0x00, 0x00, 0x00, 0x04, 0x00,
+ 0x01, 0x03, 0x00, 0x00, 0x84, 0x00, 0xda, 0x00,
+ 0x9e, 0x00, 0x02, 0x03, 0x02, 0x00, 0x01, 0x03,
+ 0x00, 0x00, 0x9f, 0x00, 0xc2, 0x00, 0xa9, 0x00,
+ 0x00, 0x03, 0x02, 0x00, 0x01, 0x03, 0x00, 0x00,
+ 0xaa, 0x00, 0xa4, 0x00, 0xaf, 0x00, 0x00, 0x03,
+ 0x02, 0x00, 0x01, 0x03, 0x00, 0x00, 0xb0, 0x00,
+ 0x7f, 0x00, 0xbb, 0x00, 0x00, 0x03, 0x02, 0x00,
+ 0x01, 0x03, 0x00, 0x00, 0xbc, 0x00, 0x5e, 0x00,
+ 0xc3, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x02,
+ 0x00, 0x00, 0xc4, 0x00, 0x4b, 0x00, 0xc7, 0x00,
+ 0x00, 0x03, 0x02, 0x00, 0x01, 0x03, 0xef, 0x00,
+ 0x84, 0x00, 0x3f, 0x01, 0xa4, 0x00, 0x04, 0x00,
+ 0x00, 0x01, 0x01, 0x03, 0xdb, 0x00, 0xa5, 0x00,
+ 0x3f, 0x01, 0xb4, 0x00, 0x04, 0x00, 0x00, 0x01,
+ 0x01, 0x03, 0xc2, 0x00, 0xb5, 0x00, 0x3f, 0x01,
+ 0xbe, 0x00, 0x04, 0x00, 0x00, 0x01, 0x01, 0x04,
+ 0xa2, 0x00, 0xbf, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x04, 0x00, 0x00, 0x01, 0x03, 0x01, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x93, 0x00, 0x8c, 0x00, 0x00,
+ 0x03, 0x00, 0x03, 0x01, 0x03, 0x94, 0x00, 0x00,
+ 0x00, 0x3f, 0x01, 0x94, 0x00, 0x00, 0x00, 0x04,
+ 0x03, 0x01, 0x00, 0xe9, 0x00, 0x95, 0x00, 0x3f,
+ 0x01, 0xc7, 0x00, 0x04, 0x00, 0x04, 0x00, 0x03,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01,
+ 0xa5, 0x00, 0x00, 0x03, 0x00, 0x03, 0x01, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0xc7, 0x00,
+ 0x02, 0x00, 0x02, 0x00, 0x01, 0x03, 0x30, 0x00,
+ 0x00, 0x00, 0x4f, 0x00, 0xab, 0x00, 0x00, 0x03,
+ 0x00, 0x03, 0x05, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3f, 0x01, 0x95, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0xf1, 0x00, 0x00, 0x00, 0x3f,
+ 0x01, 0x9a, 0x00, 0x00, 0x00, 0x04, 0x03, 0x01,
+ 0x04, 0x22, 0x01, 0x00, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x75,
+ 0x00, 0x9c, 0x00, 0xe9, 0x00, 0xbf, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x11, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0xa5, 0x00, 0x00, 0x03, 0x00, 0x03,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00,
+ 0xb0, 0x00, 0x02, 0x03, 0x02, 0x00, 0x05, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0xc7,
+ 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x03, 0x28,
+ 0x00, 0x00, 0x00, 0x8e, 0x00, 0xa9, 0x00, 0x00,
+ 0x03, 0x02, 0x03, 0x01, 0x03, 0x8e, 0x00, 0x00,
+ 0x00, 0x07, 0x01, 0xa1, 0x00, 0x00, 0x03, 0x00,
+ 0x03, 0x01, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3f,
+ 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0xdf, 0x00, 0xb7, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0x04, 0x00, 0x04, 0x01, 0x03, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xaf, 0x00,
+ 0x00, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x50, 0x00, 0xa7, 0x00, 0x00, 0x03,
+ 0x02, 0x00, 0x01, 0x03, 0x50, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x01, 0x03, 0x97, 0x00, 0x00, 0x00, 0xb4, 0x00,
+ 0xa2, 0x00, 0x00, 0x03, 0x00, 0x03, 0x07, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x80,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x03, 0x45,
+ 0x00, 0x00, 0x00, 0x78, 0x00, 0x86, 0x00, 0x00,
+ 0x03, 0x00, 0x03, 0x01, 0x03, 0x78, 0x00, 0x00,
+ 0x00, 0x07, 0x01, 0xa8, 0x00, 0x00, 0x03, 0x00,
+ 0x03, 0x01, 0x03, 0x07, 0x01, 0x00, 0x00, 0x3f,
+ 0x01, 0x9e, 0x00, 0x00, 0x03, 0x00, 0x03, 0x02,
+ 0x00, 0x00, 0x00, 0xb4, 0x00, 0x4d, 0x00, 0xc7,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c,
+ 0x01, 0xbe, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0a, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x01, 0x03, 0x64, 0x00, 0x00, 0x00,
+ 0x3f, 0x01, 0xa8, 0x00, 0x00, 0x03, 0x00, 0x03,
+ 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00,
+ 0xb7, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x00,
+ 0xb6, 0x00, 0xb2, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x02, 0x01, 0x00, 0x7d,
+ 0x00, 0x00, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3f, 0x01, 0xbe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x28, 0x00, 0xc7, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x01, 0x03, 0x29, 0x00, 0x00, 0x00, 0x5f,
+ 0x00, 0xa2, 0x00, 0x00, 0x03, 0x00, 0x03, 0x01,
+ 0x03, 0x5f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x9b,
+ 0x00, 0x00, 0x03, 0x00, 0x03, 0x01, 0x00, 0xc8,
+ 0x00, 0x00, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x00,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x48,
+ 0x71, 0x4c, 0x71, 0x50, 0x71, 0x54, 0x71, 0x58,
+ 0x71, 0x5c, 0x71, 0x60, 0x71, 0x64, 0x71, 0x68,
+ 0x71, 0x6c, 0x71, 0x70, 0x71, 0x84, 0x71, 0x88,
+ 0x71, 0x8c, 0x71, 0x9c, 0x71, 0xa0, 0x71, 0xa4,
+ 0x71, 0xa8, 0x71, 0xd0, 0x71, 0xd4, 0x71, 0xee,
+ 0x71, 0xf2, 0x71, 0xf6, 0x71, 0xfa, 0x71, 0xfe,
+ 0x71, 0x02, 0x72, 0x06, 0x72, 0x0a, 0x72, 0x18,
+ 0x72, 0x1c, 0x72, 0x20, 0x72, 0x24, 0x72, 0x28,
+ 0x72, 0x2c, 0x72, 0x30, 0x72, 0x34, 0x72, 0x38,
+ 0x72, 0x3c, 0x72, 0x40, 0x72, 0x44, 0x72, 0x48,
+ 0x72, 0x4c, 0x72, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0x67, 0x2d, 0x6a, 0x28, 0x70,
+ 0x23, 0x79, 0x1e, 0x7f, 0x19, 0x82, 0x14, 0x87,
+ 0x0f, 0x8c, 0x0a, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0x6e,
+ 0x17, 0x73, 0x15, 0x78, 0x13, 0x7d, 0x11, 0x82,
+ 0x0f, 0x85, 0x0c, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0x7a, 0x32, 0x7c, 0x30, 0x7e,
+ 0x2e, 0x80, 0x2c, 0x82, 0x2a, 0x84, 0x28, 0x86,
+ 0x24, 0x88, 0x20, 0x8a, 0x1d, 0x8c, 0x1a, 0x8e,
+ 0x17, 0x90, 0x14, 0x92, 0x11, 0x94, 0x0e, 0x96,
+ 0x0b, 0x98, 0x08, 0x9a, 0x05, 0x9c, 0x03, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0x83,
+ 0x12, 0x85, 0x10, 0x87, 0x0e, 0x89, 0x0c, 0x8b,
+ 0x0b, 0x8d, 0x0a, 0x8f, 0x09, 0x91, 0x08, 0x93,
+ 0x06, 0x95, 0x04, 0x97, 0x02, 0xc7, 0x00, 0xff,
+ 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff,
+ 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff,
+ 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff,
+ 0xff, 0xc7, 0x00, 0xff, 0xff, 0x8e, 0x0c, 0x90,
+ 0x0a, 0x92, 0x08, 0x94, 0x06, 0x96, 0x04, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0xc7, 0x00, 0xff, 0xff, 0xc7,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xa8,
+ 0x72, 0xaa, 0x72, 0xc7, 0x73, 0x34, 0x75, 0xca,
+ 0x76, 0xda, 0x77, 0xbe, 0x79, 0x52, 0x7c, 0xe7,
+ 0x7e, 0x3e, 0x80, 0x1a, 0x81, 0x2c, 0x84, 0xd9,
+ 0x85, 0x20, 0x87, 0x06, 0x88, 0xd9, 0x89, 0x6d,
+ 0x8a, 0xca, 0x8b, 0xec, 0x8c, 0x19, 0x90, 0x6f,
+ 0x93, 0x2c, 0x95, 0x9c, 0x97, 0x08, 0x9b, 0x22,
+ 0x9d, 0x00, 0x9f, 0x10, 0xa0, 0xc0, 0xa3, 0x82,
+ 0xa4, 0xde, 0xa5, 0xc1, 0xa8, 0x5c, 0xaa, 0x12,
+ 0xac, 0x46, 0xaf, 0x5c, 0xb0, 0xa5, 0xb3, 0xfa,
+ 0xb3, 0xfc, 0xb3, 0xeb, 0xb4, 0xed, 0xb4, 0xef,
+ 0xb4, 0xf1, 0xb4, 0x00, 0x00, 0xb6, 0x72, 0xcf,
+ 0x72, 0xe8, 0x72, 0x38, 0x73, 0x7f, 0x73, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0xa6, 0x00, 0x38, 0x00,
+ 0xc7, 0x00, 0x38, 0x00, 0xb4, 0x00, 0x00, 0x00,
+ 0xb4, 0x00, 0x04, 0x01, 0x70, 0x61, 0x74, 0x68,
+ 0x00, 0x01, 0x02, 0xb6, 0x00, 0xb5, 0x00, 0x10,
+ 0x01, 0xc7, 0x00, 0xd9, 0x00, 0xc1, 0x00, 0xdd,
+ 0x00, 0xc7, 0x00, 0x03, 0x01, 0x70, 0x61, 0x74,
+ 0x68, 0x00, 0x01, 0x03, 0x20, 0x01, 0x4c, 0x00,
+ 0x2f, 0x01, 0x59, 0x00, 0x10, 0x01, 0x64, 0x00,
+ 0x10, 0x01, 0x64, 0x00, 0x01, 0x01, 0x6d, 0x79,
+ 0x73, 0x74, 0x65, 0x72, 0x69, 0x6f, 0x75, 0x73,
+ 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x00,
+ 0x42, 0x6f, 0x79, 0x2c, 0x20, 0x74, 0x68, 0x61,
+ 0x74, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20,
+ 0x62, 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20,
+ 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20,
+ 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
+ 0x21, 0x00, 0x00, 0x04, 0xf1, 0x00, 0x0e, 0x00,
+ 0x3f, 0x01, 0x5f, 0x00, 0x10, 0x01, 0x64, 0x00,
+ 0x10, 0x01, 0x64, 0x00, 0x01, 0x01, 0x66, 0x65,
+ 0x6e, 0x63, 0x65, 0x00, 0x54, 0x68, 0x69, 0x73,
+ 0x20, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x64, 0x65,
+ 0x20, 0x6f, 0x66, 0x20, 0x62, 0x61, 0x72, 0x62,
+ 0x65, 0x64, 0x20, 0x77, 0x69, 0x72, 0x65, 0x2c,
+ 0x00, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x27,
+ 0x73, 0x20, 0x72, 0x75, 0x73, 0x74, 0x79, 0x2e,
+ 0x00, 0x00, 0x05, 0x40, 0x00, 0x5a, 0x00, 0xb9,
+ 0x00, 0xa6, 0x00, 0x7c, 0x00, 0xb7, 0x00, 0x7c,
+ 0x00, 0xb7, 0x00, 0x01, 0x01, 0x74, 0x65, 0x6e,
+ 0x74, 0x00, 0x54, 0x68, 0x65, 0x20, 0x63, 0x61,
+ 0x6d, 0x6f, 0x75, 0x66, 0x6c, 0x61, 0x67, 0x65,
+ 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x71,
+ 0x75, 0x69, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61,
+ 0x74, 0x65, 0x2d, 0x6f, 0x66, 0x2d, 0x74, 0x68,
+ 0x65, 0x2d, 0x61, 0x72, 0x74, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0xd5, 0x73, 0xf7, 0x73, 0x10, 0x74,
+ 0x29, 0x74, 0x5c, 0x74, 0xd0, 0x74, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf0, 0x00, 0xa3, 0x00, 0xf0, 0x00, 0xa3,
+ 0x00, 0x04, 0x01, 0x62, 0x69, 0x72, 0x64, 0x00,
+ 0x42, 0x69, 0x67, 0x20, 0x62, 0x6f, 0x79, 0x2e,
+ 0x00, 0x00, 0x02, 0x16, 0x01, 0x55, 0x00, 0x3f,
+ 0x01, 0x7a, 0x00, 0x22, 0x01, 0x76, 0x00, 0x3f,
+ 0x01, 0x68, 0x00, 0x02, 0x01, 0x70, 0x61, 0x74,
+ 0x68, 0x00, 0x01, 0x03, 0x50, 0x00, 0xbd, 0x00,
+ 0xe6, 0x00, 0xc7, 0x00, 0xda, 0x00, 0xbf, 0x00,
+ 0xd6, 0x00, 0xc7, 0x00, 0x03, 0x01, 0x70, 0x61,
+ 0x74, 0x68, 0x00, 0x01, 0x04, 0xc6, 0x00, 0x23,
+ 0x00, 0xdc, 0x00, 0x96, 0x00, 0xd1, 0x00, 0x9a,
+ 0x00, 0xd1, 0x00, 0x9a, 0x00, 0x01, 0x01, 0x70,
+ 0x6f, 0x73, 0x74, 0x00, 0x54, 0x68, 0x61, 0x74,
+ 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x65,
+ 0x61, 0x73, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x63,
+ 0x6c, 0x69, 0x6d, 0x62, 0x2e, 0x00, 0x00, 0x05,
+ 0x38, 0x00, 0x65, 0x00, 0xac, 0x00, 0xbc, 0x00,
+ 0x73, 0x00, 0xc2, 0x00, 0x73, 0x00, 0xc2, 0x00,
+ 0x01, 0x01, 0x6d, 0x75, 0x64, 0x20, 0x70, 0x6f,
+ 0x6f, 0x6c, 0x00, 0x48, 0x65, 0x61, 0x76, 0x65,
+ 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x57, 0x6f,
+ 0x6f, 0x64, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x20,
+ 0x66, 0x61, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x6c,
+ 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73,
+ 0x00, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x6f,
+ 0x73, 0x65, 0x20, 0x74, 0x6f, 0x75, 0x67, 0x68,
+ 0x20, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x20, 0x66,
+ 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x20,
+ 0x6f, 0x6e, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x20,
+ 0x54, 0x56, 0x00, 0x73, 0x68, 0x6f, 0x77, 0x73,
+ 0x2e, 0x00, 0x00, 0x06, 0xb8, 0x00, 0x90, 0x00,
+ 0xe4, 0x00, 0xa0, 0x00, 0xf0, 0x00, 0xa3, 0x00,
+ 0xdc, 0x00, 0xa1, 0x00, 0x04, 0x00, 0x62, 0x69,
+ 0x72, 0x64, 0x00, 0x49, 0x74, 0x20, 0x74, 0x6f,
+ 0x6f, 0x6b, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20,
+ 0x64, 0x72, 0x75, 0x67, 0x73, 0x20, 0x74, 0x68,
+ 0x65, 0x6e, 0x20, 0x66, 0x65, 0x6c, 0x6c, 0x20,
+ 0x35, 0x20, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
+ 0x2e, 0x00, 0x57, 0x68, 0x6f, 0x20, 0x77, 0x6f,
+ 0x75, 0x6c, 0x64, 0x6e, 0x27, 0x74, 0x20, 0x74,
+ 0x61, 0x6b, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x61,
+ 0x70, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20,
+ 0x74, 0x68, 0x61, 0x74, 0x3f, 0x00, 0x00, 0x44,
+ 0x75, 0x7d, 0x75, 0xd0, 0x75, 0x0a, 0x76, 0x5a,
+ 0x76, 0x73, 0x76, 0x8c, 0x76, 0x00, 0x00, 0x01,
+ 0x04, 0x00, 0x77, 0x00, 0x14, 0x00, 0x8d, 0x00,
+ 0xca, 0x00, 0xb3, 0x00, 0xca, 0x00, 0xb3, 0x00,
+ 0x04, 0x01, 0x73, 0x68, 0x6f, 0x76, 0x65, 0x6c,
+ 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20,
+ 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x69,
+ 0x6c, 0x69, 0x74, 0x61, 0x72, 0x79, 0x20, 0x73,
+ 0x68, 0x6f, 0x76, 0x65, 0x6c, 0x2e, 0x00, 0x00,
+ 0x02, 0x7c, 0x00, 0xaa, 0x00, 0xcf, 0x00, 0xc0,
+ 0x00, 0xca, 0x00, 0xb3, 0x00, 0xca, 0x00, 0xb3,
+ 0x00, 0x04, 0x01, 0x73, 0x6f, 0x6c, 0x69, 0x64,
+ 0x20, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x00,
+ 0x49, 0x27, 0x76, 0x65, 0x20, 0x67, 0x6f, 0x74,
+ 0x20, 0x61, 0x20, 0x66, 0x65, 0x65, 0x6c, 0x69,
+ 0x6e, 0x67, 0x20, 0x49, 0x27, 0x6d, 0x20, 0x67,
+ 0x6f, 0x6e, 0x6e, 0x61, 0x20, 0x6e, 0x65, 0x65,
+ 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x00, 0x73,
+ 0x6f, 0x6d, 0x65, 0x68, 0x6f, 0x77, 0x2e, 0x2e,
+ 0x2e, 0x00, 0x00, 0x03, 0xab, 0x00, 0x63, 0x00,
+ 0xba, 0x00, 0x97, 0x00, 0xe1, 0x00, 0x9f, 0x00,
+ 0xe1, 0x00, 0x9f, 0x00, 0x04, 0x01, 0x70, 0x6c,
+ 0x61, 0x6e, 0x74, 0x00, 0x49, 0x74, 0x20, 0x6d,
+ 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65,
+ 0x20, 0x61, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20,
+ 0x73, 0x6f, 0x66, 0x74, 0x20, 0x74, 0x6f, 0x75,
+ 0x63, 0x68, 0x2e, 0x00, 0x00, 0x04, 0x27, 0x00,
+ 0x53, 0x00, 0xaa, 0x00, 0xa1, 0x00, 0xca, 0x00,
+ 0xb3, 0x00, 0xca, 0x00, 0xb3, 0x00, 0x04, 0x01,
+ 0x62, 0x72, 0x69, 0x63, 0x6b, 0x20, 0x77, 0x61,
+ 0x6c, 0x6c, 0x00, 0x54, 0x68, 0x65, 0x20, 0x62,
+ 0x72, 0x69, 0x63, 0x6b, 0x2d, 0x6c, 0x61, 0x79,
+ 0x65, 0x72, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20,
+ 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65,
+ 0x6e, 0x00, 0x61, 0x20, 0x50, 0x69, 0x6e, 0x6b,
+ 0x20, 0x46, 0x6c, 0x6f, 0x79, 0x64, 0x20, 0x66,
+ 0x61, 0x6e, 0x2e, 0x00, 0x00, 0x05, 0xe0, 0x00,
+ 0x7a, 0x00, 0x3f, 0x01, 0x9b, 0x00, 0x13, 0x01,
+ 0x89, 0x00, 0x3f, 0x01, 0x80, 0x00, 0x02, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x00, 0x01, 0x06, 0xfa,
+ 0x00, 0x9c, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x18,
+ 0x01, 0xb9, 0x00, 0x3f, 0x01, 0xb9, 0x00, 0x02,
+ 0x01, 0x70, 0x61, 0x74, 0x68, 0x00, 0x01, 0x07,
+ 0xb2, 0x00, 0xa1, 0x00, 0xc0, 0x00, 0xb4, 0x00,
+ 0xcb, 0x00, 0xb6, 0x00, 0xcb, 0x00, 0xb6, 0x00,
+ 0x04, 0x00, 0x73, 0x70, 0x72, 0x69, 0x6e, 0x67,
+ 0x00, 0x49, 0x27, 0x76, 0x65, 0x20, 0x73, 0x65,
+ 0x65, 0x6e, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65,
+ 0x72, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73,
+ 0x20, 0x74, 0x6f, 0x20, 0x73, 0x69, 0x74, 0x20,
+ 0x6f, 0x6e, 0x2e, 0x00, 0x00, 0xda, 0x76, 0xf3,
+ 0x76, 0x0c, 0x77, 0x25, 0x77, 0x56, 0x77, 0x6f,
+ 0x77, 0xb1, 0x77, 0x00, 0x00, 0x01, 0x5c, 0x00,
+ 0xb4, 0x00, 0x92, 0x00, 0xc7, 0x00, 0x80, 0x00,
+ 0xb0, 0x00, 0x74, 0x00, 0xc7, 0x00, 0x03, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x00, 0x01, 0x02, 0x00,
+ 0x00, 0x9c, 0x00, 0x2d, 0x00, 0xb6, 0x00, 0x23,
+ 0x00, 0xae, 0x00, 0x00, 0x00, 0xae, 0x00, 0x04,
+ 0x01, 0x70, 0x61, 0x74, 0x68, 0x00, 0x01, 0x03,
+ 0x23, 0x01, 0x00, 0x00, 0x3f, 0x01, 0x82, 0x00,
+ 0x2c, 0x01, 0x87, 0x00, 0x2c, 0x01, 0x87, 0x00,
+ 0x01, 0x01, 0x70, 0x61, 0x74, 0x68, 0x00, 0x01,
+ 0x04, 0x0b, 0x00, 0x47, 0x00, 0x42, 0x00, 0x9b,
+ 0x00, 0x28, 0x00, 0x9d, 0x00, 0x28, 0x00, 0x9d,
+ 0x00, 0x01, 0x01, 0x63, 0x61, 0x6e, 0x74, 0x65,
+ 0x65, 0x6e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20,
+ 0x64, 0x6f, 0x6f, 0x72, 0x00, 0x4e, 0x69, 0x63,
+ 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x00,
+ 0x00, 0x05, 0x8c, 0x00, 0x47, 0x00, 0xbf, 0x00,
+ 0x9b, 0x00, 0xa6, 0x00, 0x9e, 0x00, 0xa6, 0x00,
+ 0x9e, 0x00, 0x01, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x06, 0x04, 0x01, 0x35, 0x00, 0x22,
+ 0x01, 0x94, 0x00, 0x22, 0x01, 0x8f, 0x00, 0x14,
+ 0x01, 0x8f, 0x00, 0x04, 0x01, 0x6a, 0x61, 0x69,
+ 0x6c, 0x20, 0x64, 0x6f, 0x6f, 0x72, 0x00, 0x4e,
+ 0x6f, 0x77, 0x20, 0x74, 0x68, 0x61, 0x74, 0x27,
+ 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x00, 0x49,
+ 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x20,
+ 0x67, 0x6f, 0x6f, 0x64, 0x00, 0x64, 0x6f, 0x6f,
+ 0x72, 0x2e, 0x00, 0x00, 0x07, 0x4b, 0x00, 0x65,
+ 0x00, 0x65, 0x00, 0xa0, 0x00, 0x6d, 0x00, 0xa1,
+ 0x00, 0x6d, 0x00, 0xa1, 0x00, 0x04, 0x01, 0x74,
+ 0x72, 0x61, 0x73, 0x68, 0x20, 0x63, 0x61, 0x6e,
+ 0x00, 0x49, 0x74, 0x20, 0x73, 0x74, 0x69, 0x6e,
+ 0x6b, 0x73, 0x2e, 0x00, 0x00, 0xf0, 0x77, 0x2c,
+ 0x78, 0x4f, 0x78, 0x96, 0x78, 0xcd, 0x78, 0x03,
+ 0x79, 0x3e, 0x79, 0x68, 0x79, 0x86, 0x79, 0xa1,
+ 0x79, 0x00, 0x00, 0x01, 0x6b, 0x00, 0x9c, 0x00,
+ 0x84, 0x00, 0xa9, 0x00, 0x91, 0x00, 0xb3, 0x00,
+ 0x91, 0x00, 0xb3, 0x00, 0x04, 0x01, 0x73, 0x70,
+ 0x72, 0x69, 0x6e, 0x67, 0x00, 0x59, 0x65, 0x61,
+ 0x68, 0x2c, 0x20, 0x49, 0x20, 0x64, 0x65, 0x66,
+ 0x69, 0x6e, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20,
+ 0x67, 0x6f, 0x74, 0x74, 0x61, 0x20, 0x73, 0x70,
+ 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x02,
+ 0x1f, 0x00, 0x9c, 0x00, 0x90, 0x00, 0xbb, 0x00,
+ 0x50, 0x00, 0xc0, 0x00, 0x50, 0x00, 0xc0, 0x00,
+ 0x01, 0x01, 0x62, 0x65, 0x64, 0x00, 0x4c, 0x6f,
+ 0x6f, 0x6b, 0x73, 0x20, 0x62, 0x61, 0x64, 0x2e,
+ 0x00, 0x00, 0x03, 0x1e, 0x01, 0x71, 0x00, 0x32,
+ 0x01, 0x7e, 0x00, 0x09, 0x01, 0xb4, 0x00, 0x09,
+ 0x01, 0xb4, 0x00, 0x02, 0x01, 0x63, 0x72, 0x61,
+ 0x74, 0x65, 0x73, 0x00, 0x54, 0x68, 0x65, 0x20,
+ 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x20, 0x6c, 0x6f,
+ 0x6f, 0x6b, 0x73, 0x20, 0x62, 0x65, 0x74, 0x74,
+ 0x65, 0x72, 0x00, 0x66, 0x72, 0x6f, 0x6d, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65,
+ 0x72, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x00,
+ 0x00, 0x04, 0x1b, 0x01, 0x87, 0x00, 0x2d, 0x01,
+ 0x92, 0x00, 0x09, 0x01, 0xb4, 0x00, 0x09, 0x01,
+ 0xb4, 0x00, 0x02, 0x00, 0x62, 0x6f, 0x77, 0x6c,
+ 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x6d, 0x61,
+ 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c,
+ 0x75, 0x6d, 0x69, 0x6e, 0x69, 0x75, 0x6d, 0x2e,
+ 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x00, 0xff,
+ 0x05, 0x0a, 0x01, 0xaa, 0x00, 0x20, 0x01, 0xbe,
+ 0x00, 0x0a, 0x01, 0xbd, 0x00, 0x0a, 0x01, 0xbd,
+ 0x00, 0x02, 0x00, 0x6c, 0x69, 0x76, 0x65, 0x20,
+ 0x63, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x54, 0x68,
+ 0x65, 0x20, 0x77, 0x69, 0x72, 0x65, 0x73, 0x20,
+ 0x61, 0x72, 0x65, 0x20, 0x65, 0x78, 0x70, 0x6f,
+ 0x73, 0x65, 0x64, 0x21, 0x00, 0x00, 0x06, 0x9b,
+ 0x00, 0x5a, 0x00, 0xa4, 0x00, 0x6b, 0x00, 0x9f,
+ 0x00, 0xc2, 0x00, 0x9f, 0x00, 0xc2, 0x00, 0x01,
+ 0x01, 0x62, 0x75, 0x6c, 0x62, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x6e, 0x61, 0x6b, 0x65, 0x64,
+ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x27,
+ 0x73, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x66,
+ 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x00,
+ 0x00, 0x07, 0x15, 0x01, 0x62, 0x00, 0x35, 0x01,
+ 0xbd, 0x00, 0x09, 0x01, 0xb4, 0x00, 0x09, 0x01,
+ 0xb4, 0x00, 0x02, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x48, 0x65, 0x61, 0x76, 0x79, 0x20, 0x61,
+ 0x6e, 0x64, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64,
+ 0x2e, 0x00, 0x00, 0x08, 0xfa, 0x00, 0x93, 0x00,
+ 0x0e, 0x01, 0xad, 0x00, 0xf2, 0x00, 0xad, 0x00,
+ 0xf2, 0x00, 0xad, 0x00, 0x02, 0x01, 0x74, 0x72,
+ 0x61, 0x73, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x00,
+ 0x01, 0x09, 0x38, 0x01, 0x8a, 0x00, 0x3f, 0x01,
+ 0x91, 0x00, 0x32, 0x01, 0xc4, 0x00, 0x32, 0x01,
+ 0xc4, 0x00, 0x02, 0x01, 0x73, 0x77, 0x69, 0x74,
+ 0x63, 0x68, 0x00, 0x01, 0x0a, 0x38, 0x00, 0x7a,
+ 0x00, 0xd0, 0x00, 0x9a, 0x00, 0x99, 0x00, 0xb2,
+ 0x00, 0x99, 0x00, 0xb2, 0x00, 0x01, 0x01, 0x67,
+ 0x72, 0x61, 0x66, 0x66, 0x69, 0x74, 0x69, 0x00,
+ 0x01, 0xd8, 0x79, 0x08, 0x7a, 0x21, 0x7a, 0x61,
+ 0x7a, 0x82, 0x7a, 0xbb, 0x7a, 0xf2, 0x7a, 0x1a,
+ 0x7b, 0x94, 0x7b, 0xd1, 0x7b, 0xed, 0x7b, 0x17,
+ 0x7c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0xc3, 0x00,
+ 0x82, 0x00, 0xc3, 0x00, 0x01, 0x01, 0x63, 0x61,
+ 0x70, 0x74, 0x61, 0x69, 0x6e, 0x00, 0x48, 0x65,
+ 0x27, 0x73, 0x20, 0x73, 0x69, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x20, 0x74, 0x69, 0x67, 0x68, 0x74,
+ 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x50, 0x00,
+ 0x23, 0x00, 0xbc, 0x00, 0x32, 0x00, 0xb8, 0x00,
+ 0x13, 0x00, 0xb8, 0x00, 0x04, 0x01, 0x64, 0x6f,
+ 0x6f, 0x72, 0x00, 0x01, 0x03, 0x2c, 0x00, 0x61,
+ 0x00, 0x4e, 0x00, 0xa4, 0x00, 0x40, 0x00, 0xa6,
+ 0x00, 0x40, 0x00, 0xa6, 0x00, 0x01, 0x01, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65,
+ 0x64, 0x2e, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x74,
+ 0x68, 0x61, 0x74, 0x00, 0x49, 0x27, 0x6d, 0x20,
+ 0x73, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65,
+ 0x64, 0x2e, 0x00, 0x00, 0x04, 0x6b, 0x00, 0x51,
+ 0x00, 0xcd, 0x00, 0x8c, 0x00, 0x9e, 0x00, 0xa8,
+ 0x00, 0x9e, 0x00, 0xa8, 0x00, 0x01, 0x01, 0x6d,
+ 0x61, 0x70, 0x00, 0x50, 0x69, 0x63, 0x61, 0x73,
+ 0x73, 0x6f, 0x3f, 0x00, 0x00, 0x05, 0x8c, 0x00,
+ 0x94, 0x00, 0xd6, 0x00, 0x9e, 0x00, 0xa4, 0x00,
+ 0xc6, 0x00, 0xa4, 0x00, 0xc6, 0x00, 0x01, 0x01,
+ 0x64, 0x65, 0x73, 0x6b, 0x00, 0x54, 0x68, 0x61,
+ 0x74, 0x27, 0x73, 0x20, 0x6a, 0x75, 0x73, 0x74,
+ 0x20, 0x61, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20,
+ 0x6f, 0x66, 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x6a,
+ 0x75, 0x6e, 0x6b, 0x2e, 0x00, 0x00, 0x06, 0xee,
+ 0x00, 0x83, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0xf1,
+ 0x00, 0xb5, 0x00, 0xf1, 0x00, 0xb5, 0x00, 0x02,
+ 0x01, 0x62, 0x65, 0x64, 0x00, 0x54, 0x68, 0x61,
+ 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27,
+ 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x63,
+ 0x6f, 0x6d, 0x66, 0x6f, 0x72, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x2e, 0x00, 0x00, 0x07, 0xbf, 0x00,
+ 0xa2, 0x00, 0xd9, 0x00, 0xb9, 0x00, 0xcc, 0x00,
+ 0xc2, 0x00, 0xcc, 0x00, 0xc2, 0x00, 0x01, 0x01,
+ 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f, 0x73,
+ 0x65, 0x64, 0x21, 0x00, 0x00, 0x08, 0xd5, 0x00,
+ 0x5d, 0x00, 0xe8, 0x00, 0x8a, 0x00, 0xf1, 0x00,
+ 0xb5, 0x00, 0xf1, 0x00, 0xb5, 0x00, 0x01, 0x01,
+ 0x73, 0x61, 0x62, 0x72, 0x65, 0x73, 0x00, 0x4d,
+ 0x79, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x64, 0x70,
+ 0x61, 0x20, 0x68, 0x61, 0x64, 0x20, 0x6f, 0x6e,
+ 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x6f,
+ 0x73, 0x65, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x2e,
+ 0x00, 0x49, 0x20, 0x65, 0x78, 0x63, 0x68, 0x61,
+ 0x6e, 0x67, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20,
+ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x6a, 0x6f,
+ 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x2e, 0x00,
+ 0x47, 0x72, 0x61, 0x6e, 0x64, 0x70, 0x61, 0x20,
+ 0x64, 0x69, 0x64, 0x6e, 0x27, 0x74, 0x20, 0x6c,
+ 0x69, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x69, 0x64, 0x65, 0x61, 0x2e, 0x00, 0x00, 0x09,
+ 0xef, 0x00, 0x5e, 0x00, 0x15, 0x01, 0x7a, 0x00,
+ 0xf1, 0x00, 0xb5, 0x00, 0xf1, 0x00, 0xb5, 0x00,
+ 0x01, 0x01, 0x67, 0x75, 0x6e, 0x73, 0x00, 0x57,
+ 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x70, 0x69,
+ 0x74, 0x79, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20,
+ 0x61, 0x72, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79,
+ 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x0a, 0x2d, 0x00, 0x27,
+ 0x00, 0x53, 0x00, 0x56, 0x00, 0x32, 0x00, 0xb5,
+ 0x00, 0x32, 0x00, 0xb5, 0x00, 0x01, 0x01, 0x70,
+ 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x01,
+ 0x0b, 0xde, 0x00, 0x2b, 0x00, 0x1d, 0x01, 0x53,
+ 0x00, 0xf1, 0x00, 0xb5, 0x00, 0xf1, 0x00, 0xb5,
+ 0x00, 0x01, 0x01, 0x70, 0x69, 0x63, 0x74, 0x75,
+ 0x72, 0x65, 0x00, 0x4e, 0x69, 0x63, 0x65, 0x20,
+ 0x63, 0x68, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x2e,
+ 0x00, 0x00, 0x0c, 0x7b, 0x00, 0xac, 0x00, 0x89,
+ 0x00, 0xbb, 0x00, 0x81, 0x00, 0xbf, 0x00, 0x81,
+ 0x00, 0xbf, 0x00, 0x01, 0x00, 0x20, 0x53, 0x77,
+ 0x69, 0x73, 0x73, 0x20, 0x41, 0x72, 0x6d, 0x79,
+ 0x20, 0x6b, 0x6e, 0x69, 0x66, 0x65, 0x00, 0x54,
+ 0x68, 0x61, 0x74, 0x27, 0x73, 0x20, 0x6d, 0x6f,
+ 0x72, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20,
+ 0x69, 0x74, 0x2e, 0x00, 0x00, 0x66, 0x7c, 0xa8,
+ 0x7c, 0xe0, 0x7c, 0xf9, 0x7c, 0x34, 0x7d, 0x9b,
+ 0x7d, 0xf7, 0x7d, 0x3a, 0x7e, 0xba, 0x7e, 0x00,
+ 0x00, 0x01, 0xbb, 0x00, 0x63, 0x00, 0xc4, 0x00,
+ 0x6b, 0x00, 0xc0, 0x00, 0x98, 0x00, 0xc0, 0x00,
+ 0x98, 0x00, 0x01, 0x00, 0x6d, 0x75, 0x67, 0x00,
+ 0x54, 0x68, 0x61, 0x74, 0x27, 0x73, 0x20, 0x73,
+ 0x75, 0x72, 0x70, 0x72, 0x69, 0x73, 0x69, 0x6e,
+ 0x67, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74,
+ 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x74,
+ 0x65, 0x61, 0x00, 0x69, 0x6e, 0x20, 0x69, 0x74,
+ 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x98, 0x00,
+ 0xb1, 0x00, 0x98, 0x00, 0x01, 0x01, 0x62, 0x61,
+ 0x72, 0x6d, 0x61, 0x6e, 0x00, 0x57, 0x68, 0x61,
+ 0x74, 0x20, 0x61, 0x20, 0x68, 0x61, 0x72, 0x64,
+ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67,
+ 0x20, 0x63, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x6e,
+ 0x2e, 0x00, 0x00, 0x03, 0x5e, 0x00, 0xb6, 0x00,
+ 0xce, 0x00, 0xc7, 0x00, 0x9e, 0x00, 0xb8, 0x00,
+ 0x9b, 0x00, 0xc7, 0x00, 0x03, 0x01, 0x65, 0x78,
+ 0x69, 0x74, 0x00, 0x01, 0x04, 0x10, 0x00, 0x34,
+ 0x00, 0x26, 0x00, 0x92, 0x00, 0x28, 0x00, 0x98,
+ 0x00, 0x28, 0x00, 0x98, 0x00, 0x01, 0x01, 0x64,
+ 0x6f, 0x6f, 0x72, 0x00, 0x54, 0x68, 0x69, 0x73,
+ 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6c, 0x65,
+ 0x61, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x20,
+ 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x00, 0x00, 0x05,
+ 0x34, 0x00, 0x2b, 0x00, 0x59, 0x00, 0x48, 0x00,
+ 0x4d, 0x00, 0x98, 0x00, 0x4d, 0x00, 0x98, 0x00,
+ 0x01, 0x01, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x00,
+ 0x54, 0x68, 0x65, 0x20, 0x72, 0x61, 0x64, 0x69,
+ 0x6f, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20,
+ 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x61, 0x20, 0x72,
+ 0x61, 0x64, 0x69, 0x6f, 0x2c, 0x20, 0x62, 0x75,
+ 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x65,
+ 0x72, 0x69, 0x61, 0x6c, 0x00, 0x69, 0x73, 0x20,
+ 0x6d, 0x61, 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20,
+ 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6b, 0x69, 0x6e,
+ 0x64, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x61, 0x6e,
+ 0x67, 0x65, 0x72, 0x2e, 0x00, 0x00, 0x06, 0x0a,
+ 0x01, 0x9f, 0x00, 0x17, 0x01, 0xa6, 0x00, 0x04,
+ 0x01, 0xc2, 0x00, 0x04, 0x01, 0xc2, 0x00, 0x02,
+ 0x01, 0x63, 0x72, 0x75, 0x6d, 0x62, 0x73, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x64, 0x69, 0x73,
+ 0x67, 0x75, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e,
+ 0x20, 0x50, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x20,
+ 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x73,
+ 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x00, 0x63, 0x6c,
+ 0x65, 0x61, 0x6e, 0x20, 0x75, 0x70, 0x20, 0x61,
+ 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
+ 0x6d, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x2e,
+ 0x00, 0x00, 0x07, 0x62, 0x00, 0x23, 0x00, 0x75,
+ 0x00, 0x35, 0x00, 0x6e, 0x00, 0x98, 0x00, 0x6e,
+ 0x00, 0x98, 0x00, 0x01, 0x01, 0x63, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x00, 0x49, 0x74, 0x20, 0x6c, 0x6f,
+ 0x6f, 0x6b, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65,
+ 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x27, 0x73,
+ 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c,
+ 0x65, 0x6d, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
+ 0x69, 0x74, 0x2e, 0x00, 0x00, 0x08, 0x7e, 0x00,
+ 0x22, 0x00, 0x00, 0x01, 0x69, 0x00, 0xc8, 0x00,
+ 0x98, 0x00, 0xc8, 0x00, 0x98, 0x00, 0x01, 0x01,
+ 0x73, 0x68, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x00,
+ 0x49, 0x20, 0x77, 0x6f, 0x6e, 0x64, 0x65, 0x72,
+ 0x20, 0x77, 0x68, 0x79, 0x20, 0x74, 0x68, 0x65,
+ 0x72, 0x65, 0x27, 0x73, 0x20, 0x73, 0x75, 0x63,
+ 0x68, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67,
+ 0x65, 0x20, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65,
+ 0x00, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x63, 0x6f,
+ 0x68, 0x6f, 0x6c, 0x20, 0x61, 0x74, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x74, 0x72, 0x61, 0x69, 0x6e,
+ 0x69, 0x6e, 0x67, 0x20, 0x63, 0x61, 0x6d, 0x70,
+ 0x2e, 0x00, 0x54, 0x6f, 0x20, 0x6b, 0x65, 0x65,
+ 0x70, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x72,
+ 0x6f, 0x6f, 0x70, 0x73, 0x20, 0x68, 0x61, 0x70,
+ 0x70, 0x79, 0x3f, 0x00, 0x00, 0x09, 0x41, 0x00,
+ 0x59, 0x00, 0x5b, 0x00, 0x69, 0x00, 0x4d, 0x00,
+ 0x98, 0x00, 0x4d, 0x00, 0x98, 0x00, 0x01, 0x01,
+ 0x63, 0x61, 0x73, 0x68, 0x20, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x65, 0x72, 0x00, 0x49, 0x20,
+ 0x6c, 0x6f, 0x76, 0x65, 0x20, 0x69, 0x74, 0x2e,
+ 0x00, 0x00, 0xf7, 0x7e, 0x29, 0x7f, 0x42, 0x7f,
+ 0x8b, 0x7f, 0xc4, 0x7f, 0xfc, 0x7f, 0x1d, 0x80,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x32, 0x00, 0xb4, 0x00, 0x32,
+ 0x00, 0xb4, 0x00, 0x01, 0x01, 0x62, 0x6c, 0x69,
+ 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f,
+ 0x6c, 0x65, 0x00, 0x54, 0x68, 0x61, 0x74, 0x27,
+ 0x73, 0x20, 0x77, 0x65, 0x69, 0x72, 0x64, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x02, 0x0c, 0x01, 0x55,
+ 0x00, 0x29, 0x01, 0xaa, 0x00, 0xf0, 0x00, 0xb6,
+ 0x00, 0xf0, 0x00, 0xb6, 0x00, 0x02, 0x01, 0x64,
+ 0x6f, 0x6f, 0x72, 0x00, 0x01, 0x03, 0x04, 0x00,
+ 0x6c, 0x00, 0x5b, 0x00, 0xb2, 0x00, 0x32, 0x00,
+ 0xb4, 0x00, 0x32, 0x00, 0xb4, 0x00, 0x01, 0x01,
+ 0x62, 0x61, 0x72, 0x72, 0x65, 0x6c, 0x73, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x67, 0x6f, 0x6f,
+ 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6b, 0x6e, 0x6f,
+ 0x77, 0x20, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x72,
+ 0x6d, 0x79, 0x20, 0x69, 0x73, 0x20, 0x77, 0x65,
+ 0x6c, 0x6c, 0x20, 0x65, 0x71, 0x75, 0x69, 0x70,
+ 0x70, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x04, 0x5a,
+ 0x00, 0x5f, 0x00, 0x78, 0x00, 0xa8, 0x00, 0x70,
+ 0x00, 0xad, 0x00, 0x70, 0x00, 0xad, 0x00, 0x01,
+ 0x01, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x6b, 0x69,
+ 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x00, 0x00, 0x05,
+ 0x96, 0x00, 0x6b, 0x00, 0xd6, 0x00, 0xa4, 0x00,
+ 0xb7, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xb2, 0x00,
+ 0x01, 0x01, 0x6c, 0x6f, 0x74, 0x73, 0x20, 0x6f,
+ 0x66, 0x20, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72,
+ 0x73, 0x00, 0x49, 0x20, 0x68, 0x61, 0x74, 0x65,
+ 0x20, 0x62, 0x75, 0x72, 0x65, 0x61, 0x75, 0x63,
+ 0x72, 0x61, 0x63, 0x79, 0x2e, 0x00, 0x00, 0x06,
+ 0x7e, 0x00, 0x8f, 0x00, 0x97, 0x00, 0xaa, 0x00,
+ 0x8d, 0x00, 0xb1, 0x00, 0x8d, 0x00, 0xb1, 0x00,
+ 0x01, 0x01, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x00,
+ 0x27, 0x50, 0x65, 0x70, 0x61, 0x27, 0x00, 0x00,
+ 0x07, 0xd7, 0x00, 0x81, 0x00, 0xea, 0x00, 0xaa,
+ 0x00, 0xe0, 0x00, 0xb6, 0x00, 0xe0, 0x00, 0xb6,
+ 0x00, 0x01, 0x01, 0x62, 0x6f, 0x78, 0x65, 0x73,
+ 0x00, 0x27, 0x53, 0x61, 0x6c, 0x74, 0x27, 0x00,
+ 0x00, 0x48, 0x80, 0x87, 0x80, 0xd1, 0x80, 0x01,
+ 0x81, 0x00, 0x00, 0x01, 0x7e, 0x00, 0x5f, 0x00,
+ 0x86, 0x00, 0x69, 0x00, 0x8b, 0x00, 0x9c, 0x00,
+ 0x84, 0x00, 0x95, 0x00, 0x01, 0x00, 0x67, 0x72,
+ 0x65, 0x6e, 0x61, 0x64, 0x65, 0x00, 0x57, 0x6f,
+ 0x77, 0x21, 0x20, 0x49, 0x20, 0x61, 0x6c, 0x77,
+ 0x61, 0x79, 0x73, 0x20, 0x77, 0x61, 0x6e, 0x74,
+ 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f,
+ 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x2e,
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x8b, 0x00, 0x9c, 0x00, 0x8b,
+ 0x00, 0x9c, 0x00, 0x01, 0x01, 0x67, 0x75, 0x61,
+ 0x72, 0x64, 0x00, 0x49, 0x20, 0x64, 0x6f, 0x6e,
+ 0x27, 0x74, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x6b,
+ 0x20, 0x68, 0x65, 0x27, 0x73, 0x20, 0x6d, 0x61,
+ 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x69,
+ 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f,
+ 0x6e, 0x2e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x6f,
+ 0x00, 0x54, 0x00, 0xa2, 0x00, 0x53, 0x00, 0x95,
+ 0x00, 0x53, 0x00, 0x95, 0x00, 0x04, 0x01, 0x77,
+ 0x61, 0x79, 0x20, 0x6f, 0x75, 0x74, 0x00, 0x48,
+ 0x6f, 0x6d, 0x65, 0x2c, 0x20, 0x73, 0x77, 0x65,
+ 0x65, 0x74, 0x20, 0x68, 0x6f, 0x6d, 0x65, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x04, 0x10, 0x01, 0x95,
+ 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x0d, 0x01, 0xaf,
+ 0x00, 0x3f, 0x01, 0xb7, 0x00, 0x02, 0x01, 0x70,
+ 0x61, 0x74, 0x68, 0x00, 0x01, 0x3a, 0x81, 0x79,
+ 0x81, 0xa3, 0x81, 0xc0, 0x81, 0xdd, 0x81, 0x11,
+ 0x82, 0x3d, 0x82, 0x7f, 0x82, 0xa4, 0x82, 0xcc,
+ 0x82, 0x1a, 0x83, 0x3c, 0x83, 0x64, 0x83, 0xb8,
+ 0x83, 0xea, 0x83, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00,
+ 0xa3, 0x00, 0x8a, 0x00, 0xa3, 0x00, 0x02, 0x01,
+ 0x67, 0x75, 0x61, 0x72, 0x64, 0x00, 0x48, 0x65,
+ 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x6c,
+ 0x69, 0x6b, 0x65, 0x20, 0x61, 0x20, 0x70, 0x65,
+ 0x61, 0x73, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x6e,
+ 0x00, 0x64, 0x69, 0x73, 0x67, 0x75, 0x69, 0x73,
+ 0x65, 0x2e, 0x00, 0x00, 0x02, 0x70, 0x00, 0xa0,
+ 0x00, 0x7b, 0x00, 0xa8, 0x00, 0x68, 0x00, 0xab,
+ 0x00, 0x68, 0x00, 0xab, 0x00, 0x02, 0x00, 0x62,
+ 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x77, 0x68, 0x69, 0x73, 0x6b,
+ 0x79, 0x21, 0x2e, 0x2e, 0x00, 0x00, 0x03, 0xd2,
+ 0x00, 0x77, 0x00, 0xf6, 0x00, 0x98, 0x00, 0x8a,
+ 0x00, 0xa3, 0x00, 0x8a, 0x00, 0xa3, 0x00, 0x02,
+ 0x01, 0x67, 0x61, 0x72, 0x67, 0x6f, 0x79, 0x6c,
+ 0x65, 0x00, 0x01, 0x04, 0x09, 0x01, 0x80, 0x00,
+ 0x2f, 0x01, 0xad, 0x00, 0x8a, 0x00, 0xa3, 0x00,
+ 0x8a, 0x00, 0xa3, 0x00, 0x02, 0x01, 0x67, 0x61,
+ 0x72, 0x67, 0x6f, 0x79, 0x6c, 0x65, 0x00, 0x01,
+ 0x05, 0x12, 0x01, 0x39, 0x00, 0x23, 0x01, 0x48,
+ 0x00, 0x8a, 0x00, 0xa3, 0x00, 0x8a, 0x00, 0xa3,
+ 0x00, 0x02, 0x01, 0x73, 0x63, 0x75, 0x6c, 0x70,
+ 0x74, 0x75, 0x72, 0x65, 0x00, 0x52, 0x65, 0x61,
+ 0x6c, 0x6c, 0x79, 0x20, 0x73, 0x6f, 0x70, 0x68,
+ 0x69, 0x73, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x64, 0x21, 0x00, 0x00, 0x06, 0xfc, 0x00, 0x33,
+ 0x00, 0x32, 0x01, 0xa1, 0x00, 0x8a, 0x00, 0xa3,
+ 0x00, 0x8a, 0x00, 0xa3, 0x00, 0x02, 0x01, 0x64,
+ 0x6f, 0x6f, 0x72, 0x00, 0x53, 0x6f, 0x6c, 0x69,
+ 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x61,
+ 0x73, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x00, 0x00,
+ 0x07, 0xe5, 0x00, 0x00, 0x00, 0x3f, 0x01, 0x98,
+ 0x00, 0x8a, 0x00, 0xa3, 0x00, 0x8a, 0x00, 0xa3,
+ 0x00, 0x02, 0x01, 0x6d, 0x61, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x6c, 0x6c, 0x00,
+ 0x49, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20,
+ 0x62, 0x65, 0x20, 0x33, 0x20, 0x6b, 0x69, 0x6c,
+ 0x6f, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x20,
+ 0x74, 0x68, 0x69, 0x63, 0x6b, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xb5, 0x00, 0xb0, 0x00, 0xb5,
+ 0x00, 0xb0, 0x00, 0x01, 0x00, 0x4a, 0x6f, 0x68,
+ 0x6e, 0x20, 0x4e, 0x6f, 0x74, 0x79, 0x00, 0x46,
+ 0x61, 0x74, 0x73, 0x6f, 0x2e, 0x00, 0x00, 0x09,
+ 0x9c, 0x00, 0xae, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0x8a, 0x00, 0xa3, 0x00, 0x3f, 0x01, 0xc6, 0x00,
+ 0x02, 0x01, 0x70, 0x61, 0x74, 0x68, 0x20, 0x61,
+ 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x6d, 0x61,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x01, 0x0a,
+ 0x00, 0x00, 0x73, 0x00, 0x46, 0x00, 0x98, 0x00,
+ 0x3c, 0x00, 0xab, 0x00, 0x00, 0x00, 0x7c, 0x00,
+ 0x01, 0x01, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74,
+ 0x6f, 0x20, 0x6d, 0x65, 0x61, 0x64, 0x6f, 0x77,
+ 0x00, 0x49, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x64,
+ 0x73, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x61, 0x72,
+ 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x00, 0x73, 0x63,
+ 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x65,
+ 0x73, 0x74, 0x2e, 0x00, 0x00, 0x0b, 0x00, 0x00,
+ 0xa1, 0x00, 0x39, 0x00, 0xbe, 0x00, 0x3c, 0x00,
+ 0xab, 0x00, 0x00, 0x00, 0xab, 0x00, 0x04, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20,
+ 0x73, 0x68, 0x6f, 0x72, 0x65, 0x00, 0x01, 0x0c,
+ 0x8c, 0x00, 0x68, 0x00, 0xe4, 0x00, 0x98, 0x00,
+ 0x8a, 0x00, 0xa3, 0x00, 0xe4, 0x00, 0x6d, 0x00,
+ 0x02, 0x01, 0x70, 0x61, 0x74, 0x68, 0x20, 0x61,
+ 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x6d, 0x61,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x01, 0x0d,
+ 0xbf, 0x00, 0xa6, 0x00, 0xc8, 0x00, 0xae, 0x00,
+ 0x8a, 0x00, 0xa3, 0x00, 0xb5, 0x00, 0xb0, 0x00,
+ 0x02, 0x01, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
+ 0x72, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x61,
+ 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x70, 0x68,
+ 0x61, 0x6e, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70,
+ 0x70, 0x65, 0x72, 0x20, 0x66, 0x72, 0x6f, 0x6d,
+ 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x63, 0x61,
+ 0x6e, 0x64, 0x79, 0x00, 0x6f, 0x72, 0x20, 0x73,
+ 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x2e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+ 0xe4, 0x00, 0x98, 0x00, 0x3c, 0x00, 0xab, 0x00,
+ 0x3c, 0x00, 0xab, 0x00, 0x01, 0x01, 0x66, 0x6f,
+ 0x72, 0x65, 0x73, 0x74, 0x00, 0x49, 0x74, 0x20,
+ 0x67, 0x69, 0x76, 0x65, 0x73, 0x20, 0x6d, 0x65,
+ 0x20, 0x74, 0x68, 0x72, 0x69, 0x6c, 0x6c, 0x73,
+ 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x0f, 0x78, 0x00,
+ 0x9a, 0x00, 0x85, 0x00, 0xa0, 0x00, 0x70, 0x00,
+ 0xa3, 0x00, 0x70, 0x00, 0xa3, 0x00, 0x02, 0x00,
+ 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x6f, 0x74, 0x65,
+ 0x00, 0x49, 0x27, 0x6d, 0x20, 0x72, 0x65, 0x61,
+ 0x6c, 0x6c, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x75,
+ 0x64, 0x20, 0x49, 0x20, 0x64, 0x69, 0x64, 0x6e,
+ 0x27, 0x74, 0x20, 0x54, 0x41, 0x4b, 0x45, 0x20,
+ 0x54, 0x48, 0x41, 0x54, 0x2e, 0x00, 0x00, 0x40,
+ 0x84, 0x56, 0x84, 0x87, 0x84, 0xb6, 0x84, 0xf2,
+ 0x84, 0x29, 0x85, 0x66, 0x85, 0x8e, 0x85, 0xb6,
+ 0x85, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x04, 0x01, 0x74, 0x00, 0x13, 0x01,
+ 0x8a, 0x00, 0x02, 0x01, 0xbd, 0x00, 0x02, 0x01,
+ 0xbd, 0x00, 0x01, 0x01, 0x68, 0x6f, 0x6c, 0x6c,
+ 0x6f, 0x77, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x69,
+ 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x77, 0x2e,
+ 0x00, 0x00, 0x03, 0xd0, 0x00, 0x6e, 0x00, 0xf8,
+ 0x00, 0x7e, 0x00, 0xcb, 0x00, 0xab, 0x00, 0xcb,
+ 0x00, 0xab, 0x00, 0x02, 0x01, 0x62, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x00, 0x49, 0x74, 0x20, 0x63,
+ 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20,
+ 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x00,
+ 0x00, 0x04, 0xe4, 0x00, 0x3c, 0x00, 0x2d, 0x01,
+ 0xaa, 0x00, 0x02, 0x01, 0xbd, 0x00, 0xfc, 0x00,
+ 0xab, 0x00, 0x01, 0x01, 0x74, 0x72, 0x65, 0x65,
+ 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x68, 0x69,
+ 0x67, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61,
+ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x61,
+ 0x6c, 0x6c, 0x21, 0x00, 0x00, 0x05, 0x0c, 0x00,
+ 0x8a, 0x00, 0x33, 0x00, 0xad, 0x00, 0x31, 0x00,
+ 0xac, 0x00, 0x31, 0x00, 0xac, 0x00, 0x04, 0x01,
+ 0x77, 0x69, 0x6c, 0x64, 0x20, 0x70, 0x6c, 0x61,
+ 0x6e, 0x74, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x77, 0x69, 0x6c,
+ 0x64, 0x20, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f,
+ 0x65, 0x2e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x22,
+ 0x00, 0x04, 0x01, 0xa0, 0x00, 0xa6, 0x00, 0xbd,
+ 0x00, 0xa6, 0x00, 0xbd, 0x00, 0x01, 0x01, 0x77,
+ 0x61, 0x6c, 0x6c, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64,
+ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x6f,
+ 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20,
+ 0x73, 0x6d, 0x6f, 0x6f, 0x74, 0x68, 0x2e, 0x00,
+ 0x00, 0x07, 0x25, 0x01, 0x5c, 0x00, 0x3f, 0x01,
+ 0xaa, 0x00, 0x2a, 0x01, 0xaf, 0x00, 0x3f, 0x01,
+ 0x98, 0x00, 0x01, 0x01, 0x70, 0x61, 0x74, 0x68,
+ 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20,
+ 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00,
+ 0x01, 0x08, 0x00, 0x00, 0xae, 0x00, 0x3c, 0x00,
+ 0xc7, 0x00, 0x1e, 0x00, 0xbd, 0x00, 0x00, 0x00,
+ 0xbd, 0x00, 0x04, 0x01, 0x70, 0x61, 0x74, 0x68,
+ 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20,
+ 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00,
+ 0x01, 0x09, 0xd0, 0x00, 0x9c, 0x00, 0xec, 0x00,
+ 0xa8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x00, 0x00, 0x62, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x00, 0x47, 0x6f, 0x74, 0x63, 0x68,
+ 0x61, 0x2e, 0x00, 0x00, 0xe9, 0x85, 0x0d, 0x86,
+ 0x42, 0x86, 0x6a, 0x86, 0xa7, 0x86, 0xcf, 0x86,
+ 0x07, 0x87, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x31, 0x00, 0x9d, 0x00, 0x12, 0x00, 0xad,
+ 0x00, 0x12, 0x00, 0xad, 0x00, 0x01, 0x01, 0x74,
+ 0x72, 0x65, 0x65, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x68, 0x69, 0x67, 0x68, 0x2e, 0x00, 0x00,
+ 0x02, 0xf6, 0x00, 0x7c, 0x00, 0x35, 0x01, 0xa6,
+ 0x00, 0x05, 0x01, 0xb7, 0x00, 0x05, 0x01, 0xb7,
+ 0x00, 0x01, 0x01, 0x77, 0x69, 0x6c, 0x64, 0x20,
+ 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x00, 0x4f, 0x72,
+ 0x64, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x67,
+ 0x72, 0x65, 0x65, 0x6e, 0x20, 0x73, 0x74, 0x75,
+ 0x66, 0x66, 0x2e, 0x00, 0x00, 0x03, 0x00, 0x00,
+ 0x9e, 0x00, 0x2f, 0x00, 0xba, 0x00, 0x12, 0x00,
+ 0xad, 0x00, 0x00, 0x00, 0xac, 0x00, 0x04, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x61, 0x72, 0x6f,
+ 0x75, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x00, 0x01, 0x04, 0x00, 0x00,
+ 0x20, 0x00, 0x3f, 0x01, 0xa6, 0x00, 0xc5, 0x00,
+ 0xb7, 0x00, 0xc5, 0x00, 0xb7, 0x00, 0x01, 0x01,
+ 0x77, 0x61, 0x6c, 0x6c, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65,
+ 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73,
+ 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x20, 0x73, 0x6d, 0x6f, 0x6f, 0x74, 0x68, 0x2e,
+ 0x00, 0x00, 0x05, 0x06, 0x01, 0xa6, 0x00, 0x3f,
+ 0x01, 0xc7, 0x00, 0x05, 0x01, 0xb7, 0x00, 0x3f,
+ 0x01, 0xb5, 0x00, 0x02, 0x01, 0x70, 0x61, 0x74,
+ 0x68, 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64,
+ 0x20, 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x67, 0x00, 0xc0, 0x00, 0x67,
+ 0x00, 0xc0, 0x00, 0x04, 0x01, 0x68, 0x65, 0x64,
+ 0x67, 0x65, 0x68, 0x6f, 0x67, 0x00, 0x49, 0x73,
+ 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63,
+ 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x69,
+ 0x74, 0x73, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x2e,
+ 0x00, 0x00, 0x07, 0xdb, 0x00, 0xba, 0x00, 0xeb,
+ 0x00, 0xc3, 0x00, 0xd7, 0x00, 0xc3, 0x00, 0xd7,
+ 0x00, 0xc3, 0x00, 0x02, 0x01, 0x72, 0x6f, 0x63,
+ 0x6b, 0x00, 0x01, 0x2c, 0x87, 0x59, 0x87, 0x7f,
+ 0x87, 0xac, 0x87, 0xe2, 0x87, 0x00, 0x00, 0x01,
+ 0xb2, 0x00, 0x24, 0x00, 0xbe, 0x00, 0x36, 0x00,
+ 0xbc, 0x00, 0x96, 0x00, 0xbc, 0x00, 0x96, 0x00,
+ 0x01, 0x01, 0x62, 0x65, 0x65, 0x73, 0x20, 0x6e,
+ 0x65, 0x73, 0x74, 0x00, 0x48, 0x6f, 0x6e, 0x65,
+ 0x79, 0x20, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x6f,
+ 0x6e, 0x2e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0x96,
+ 0x00, 0xbc, 0x00, 0x96, 0x00, 0x01, 0x01, 0x62,
+ 0x65, 0x65, 0x73, 0x00, 0x49, 0x20, 0x48, 0x41,
+ 0x54, 0x45, 0x20, 0x54, 0x48, 0x45, 0x4d, 0x21,
+ 0x00, 0x00, 0x03, 0x1c, 0x00, 0x5d, 0x00, 0x72,
+ 0x00, 0xc1, 0x00, 0x3f, 0x00, 0xc3, 0x00, 0x3f,
+ 0x00, 0xc3, 0x00, 0x01, 0x01, 0x62, 0x75, 0x73,
+ 0x68, 0x00, 0x4e, 0x69, 0x63, 0x65, 0x20, 0x70,
+ 0x6c, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x68, 0x69, 0x64, 0x65, 0x2e, 0x00, 0x00, 0x04,
+ 0xa6, 0x00, 0x76, 0x00, 0xe6, 0x00, 0x8d, 0x00,
+ 0xbc, 0x00, 0x96, 0x00, 0xbc, 0x00, 0x96, 0x00,
+ 0x01, 0x01, 0x76, 0x61, 0x6c, 0x76, 0x65, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x72, 0x75, 0x73,
+ 0x74, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68,
+ 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x2e, 0x00, 0x00, 0x05, 0xd6, 0x00,
+ 0xb4, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0xdb, 0x00,
+ 0xb7, 0x00, 0x0e, 0x01, 0xc7, 0x00, 0x02, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20,
+ 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00,
+ 0x01, 0x18, 0x88, 0x6f, 0x88, 0xad, 0x88, 0xf4,
+ 0x88, 0x40, 0x89, 0x6e, 0x89, 0x92, 0x89, 0xb6,
+ 0x89, 0x00, 0x00, 0x01, 0x90, 0x00, 0x0f, 0x00,
+ 0xa3, 0x00, 0x1d, 0x00, 0x9d, 0x00, 0xb4, 0x00,
+ 0x9d, 0x00, 0xb4, 0x00, 0x01, 0x01, 0x66, 0x6c,
+ 0x6f, 0x77, 0x65, 0x72, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f,
+ 0x73, 0x74, 0x20, 0x62, 0x65, 0x61, 0x75, 0x74,
+ 0x69, 0x66, 0x75, 0x6c, 0x20, 0x66, 0x6c, 0x6f,
+ 0x77, 0x65, 0x72, 0x20, 0x49, 0x27, 0x76, 0x65,
+ 0x20, 0x73, 0x65, 0x65, 0x6e, 0x00, 0x69, 0x6e,
+ 0x20, 0x6d, 0x79, 0x20, 0x65, 0x6e, 0x74, 0x69,
+ 0x72, 0x65, 0x20, 0x6c, 0x69, 0x66, 0x65, 0x21,
+ 0x00, 0x00, 0x02, 0x69, 0x00, 0x00, 0x00, 0xcf,
+ 0x00, 0x27, 0x00, 0x9d, 0x00, 0xb4, 0x00, 0x9d,
+ 0x00, 0xb4, 0x00, 0x01, 0x01, 0x69, 0x73, 0x6c,
+ 0x65, 0x00, 0x4e, 0x65, 0x61, 0x74, 0x20, 0x70,
+ 0x6c, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x65, 0x63,
+ 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c,
+ 0x20, 0x6c, 0x69, 0x66, 0x65, 0x2e, 0x00, 0x00,
+ 0x03, 0x3c, 0x00, 0x88, 0x00, 0x7b, 0x00, 0xa7,
+ 0x00, 0x6b, 0x00, 0xa9, 0x00, 0x6b, 0x00, 0xa9,
+ 0x00, 0x04, 0x01, 0x62, 0x6f, 0x61, 0x74, 0x00,
+ 0x49, 0x20, 0x63, 0x61, 0x6e, 0x27, 0x74, 0x20,
+ 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x20,
+ 0x69, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x62, 0x6f, 0x61, 0x74,
+ 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20,
+ 0x68, 0x6f, 0x6c, 0x65, 0x2e, 0x00, 0x00, 0x04,
+ 0xec, 0x00, 0xa4, 0x00, 0x20, 0x01, 0xc3, 0x00,
+ 0xec, 0x00, 0xb3, 0x00, 0xec, 0x00, 0xb3, 0x00,
+ 0x03, 0x01, 0x77, 0x65, 0x6c, 0x6c, 0x00, 0x49,
+ 0x20, 0x72, 0x65, 0x66, 0x75, 0x73, 0x65, 0x20,
+ 0x74, 0x6f, 0x20, 0x74, 0x65, 0x6c, 0x6c, 0x20,
+ 0x63, 0x68, 0x65, 0x61, 0x70, 0x20, 0x6a, 0x6f,
+ 0x6b, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68,
+ 0x00, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72,
+ 0x64, 0x20, 0x22, 0x77, 0x65, 0x6c, 0x6c, 0x22,
+ 0x2e, 0x00, 0x00, 0x05, 0xdd, 0x00, 0x96, 0x00,
+ 0xe8, 0x00, 0xa2, 0x00, 0xc8, 0x00, 0xb3, 0x00,
+ 0xc8, 0x00, 0xb3, 0x00, 0x02, 0x01, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x00, 0x49, 0x20, 0x63,
+ 0x61, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x00,
+ 0x00, 0x06, 0x88, 0x00, 0xb7, 0x00, 0xa5, 0x00,
+ 0xc7, 0x00, 0x9d, 0x00, 0xb4, 0x00, 0x99, 0x00,
+ 0xc7, 0x00, 0x03, 0x01, 0x70, 0x61, 0x74, 0x68,
+ 0x20, 0x74, 0x6f, 0x20, 0x76, 0x69, 0x6c, 0x6c,
+ 0x61, 0x67, 0x65, 0x00, 0x01, 0x07, 0x25, 0x01,
+ 0x96, 0x00, 0x3f, 0x01, 0xb6, 0x00, 0x06, 0x01,
+ 0xb0, 0x00, 0x3f, 0x01, 0xa2, 0x00, 0x02, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20,
+ 0x6d, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x00,
+ 0x01, 0x08, 0x00, 0x00, 0x96, 0x00, 0x20, 0x00,
+ 0xb5, 0x00, 0x1e, 0x00, 0xac, 0x00, 0x00, 0x00,
+ 0xac, 0x00, 0x04, 0x01, 0x70, 0x61, 0x74, 0x68,
+ 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x72, 0x65,
+ 0x73, 0x74, 0x00, 0x01, 0xe1, 0x89, 0x0c, 0x8a,
+ 0x3c, 0x8a, 0x00, 0x00, 0x01, 0x7d, 0x00, 0x3b,
+ 0x00, 0x8c, 0x00, 0x59, 0x00, 0x7b, 0x00, 0x5e,
+ 0x00, 0x7b, 0x00, 0x5e, 0x00, 0x02, 0x01, 0x66,
+ 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x62, 0x65, 0x61, 0x75, 0x74,
+ 0x69, 0x66, 0x75, 0x6c, 0x21, 0x00, 0x00, 0x02,
+ 0x8d, 0x00, 0x3b, 0x00, 0x9e, 0x00, 0x57, 0x00,
+ 0xa0, 0x00, 0x5a, 0x00, 0xa0, 0x00, 0x5a, 0x00,
+ 0x04, 0x01, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72,
+ 0x00, 0x49, 0x74, 0x20, 0x73, 0x6d, 0x65, 0x6c,
+ 0x6c, 0x73, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20,
+ 0x6e, 0x69, 0x63, 0x65, 0x21, 0x00, 0x00, 0x03,
+ 0xd2, 0x00, 0x4c, 0x00, 0x38, 0x01, 0x7b, 0x00,
+ 0xec, 0x00, 0x5f, 0x00, 0xec, 0x00, 0x5f, 0x00,
+ 0x03, 0x01, 0x62, 0x6f, 0x61, 0x74, 0x00, 0x4e,
+ 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6e,
+ 0x65, 0x77, 0x2e, 0x20, 0x4c, 0x69, 0x74, 0x65,
+ 0x72, 0x61, 0x6c, 0x6c, 0x79, 0x2e, 0x00, 0x00,
+ 0x87, 0x8a, 0xa1, 0x8a, 0xbb, 0x8a, 0xd2, 0x8a,
+ 0xe9, 0x8a, 0x05, 0x8b, 0x3c, 0x8b, 0x1f, 0x8b,
+ 0x59, 0x8b, 0x76, 0x8b, 0x93, 0x8b, 0xae, 0x8b,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x01, 0x66, 0x69, 0x73,
+ 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x66,
+ 0x69, 0x73, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x05, 0x21, 0x00, 0xb1,
+ 0x00, 0x2b, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x61,
+ 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x00, 0x00, 0x00,
+ 0x06, 0x29, 0x00, 0x90, 0x00, 0x99, 0x00, 0xba,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x01, 0x62, 0x6f, 0x61, 0x74, 0x00,
+ 0x00, 0x00, 0x08, 0x0f, 0x00, 0x90, 0x00, 0x2d,
+ 0x00, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x01, 0x73, 0x65, 0x61,
+ 0x77, 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0x56, 0x00, 0x22, 0x00, 0x97, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x01, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65,
+ 0x64, 0x00, 0x00, 0x00, 0x09, 0xce, 0x00, 0xa3,
+ 0x00, 0xfc, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x73,
+ 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x00, 0x00,
+ 0x00, 0x0a, 0xde, 0x00, 0x3c, 0x00, 0x08, 0x01,
+ 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x73, 0x65, 0x61, 0x77,
+ 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x0b, 0x98,
+ 0x00, 0x96, 0x00, 0xbb, 0x00, 0xb5, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x01, 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x00, 0x00,
+ 0x00, 0x0c, 0x68, 0x00, 0x7a, 0x00, 0xe0, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x01, 0x73, 0x74, 0x6f, 0x6e,
+ 0x65, 0x73, 0x00, 0x00, 0x00, 0xda, 0x8b, 0x01,
+ 0x8c, 0x39, 0x8c, 0x63, 0x8c, 0x90, 0x8c, 0xb2,
+ 0x8c, 0xd2, 0x8c, 0x00, 0x00, 0x01, 0xbd, 0x00,
+ 0xaf, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0xc9, 0x00,
+ 0xc0, 0x00, 0xec, 0x00, 0xc7, 0x00, 0x02, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20,
+ 0x6c, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x68, 0x6f,
+ 0x72, 0x65, 0x00, 0x01, 0x02, 0x37, 0x00, 0x50,
+ 0x00, 0x50, 0x00, 0x69, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x01, 0x64,
+ 0x6f, 0x6f, 0x72, 0x00, 0x54, 0x68, 0x65, 0x72,
+ 0x65, 0x27, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x6e,
+ 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x74,
+ 0x68, 0x65, 0x00, 0x64, 0x6f, 0x6f, 0x72, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x03, 0x67, 0x00, 0x46,
+ 0x00, 0x85, 0x00, 0x5d, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x01, 0x77,
+ 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x00, 0x49,
+ 0x20, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x20,
+ 0x44, 0x4f, 0x53, 0x2e, 0x00, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9,
+ 0x00, 0xc0, 0x00, 0xc9, 0x00, 0xc0, 0x00, 0x01,
+ 0x01, 0x73, 0x71, 0x75, 0x69, 0x72, 0x72, 0x65,
+ 0x6c, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x76,
+ 0x65, 0x72, 0x79, 0x20, 0x66, 0x61, 0x73, 0x74,
+ 0x2e, 0x00, 0x00, 0x05, 0x92, 0x00, 0x35, 0x00,
+ 0x99, 0x00, 0x3c, 0x00, 0xc9, 0x00, 0xc0, 0x00,
+ 0xc9, 0x00, 0xc0, 0x00, 0x01, 0x01, 0x6e, 0x75,
+ 0x74, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x62,
+ 0x69, 0x67, 0x2e, 0x00, 0x00, 0x06, 0x8c, 0x00,
+ 0xbb, 0x00, 0x92, 0x00, 0xc1, 0x00, 0x9c, 0x00,
+ 0xc2, 0x00, 0x9c, 0x00, 0xc2, 0x00, 0x04, 0x00,
+ 0x6e, 0x75, 0x74, 0x00, 0x47, 0x6f, 0x74, 0x63,
+ 0x68, 0x61, 0x2e, 0x00, 0x00, 0x07, 0x48, 0x00,
+ 0xb4, 0x00, 0xaa, 0x00, 0xc7, 0x00, 0xa2, 0x00,
+ 0xc2, 0x00, 0xa2, 0x00, 0xc2, 0x00, 0x04, 0x01,
+ 0x67, 0x72, 0x61, 0x73, 0x73, 0x00, 0x01, 0x0c,
+ 0x8d, 0x28, 0x8d, 0x6f, 0x8d, 0xcb, 0x8d, 0xe8,
+ 0x8d, 0x22, 0x8e, 0x3f, 0x8e, 0x5e, 0x8e, 0x99,
+ 0x8e, 0xd7, 0x8e, 0x12, 0x8f, 0x2c, 0x8f, 0x54,
+ 0x8f, 0x71, 0x8f, 0xcc, 0x8f, 0x00, 0x00, 0x01,
+ 0x90, 0x00, 0xbd, 0x00, 0x3f, 0x01, 0xc7, 0x00,
+ 0xdf, 0x00, 0xc1, 0x00, 0xdf, 0x00, 0xc7, 0x00,
+ 0x03, 0x01, 0x77, 0x61, 0x79, 0x20, 0x6f, 0x75,
+ 0x74, 0x00, 0x01, 0x02, 0xcc, 0x00, 0x75, 0x00,
+ 0xe0, 0x00, 0x83, 0x00, 0xd8, 0x00, 0xa7, 0x00,
+ 0xd8, 0x00, 0xa7, 0x00, 0x01, 0x01, 0x68, 0x6f,
+ 0x72, 0x6e, 0x00, 0x49, 0x74, 0x20, 0x6d, 0x75,
+ 0x73, 0x74, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,
+ 0x61, 0x20, 0x62, 0x69, 0x67, 0x20, 0x69, 0x6d,
+ 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+ 0x20, 0x6f, 0x6e, 0x00, 0x74, 0x68, 0x65, 0x20,
+ 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x2e,
+ 0x00, 0x00, 0x03, 0x00, 0x00, 0x47, 0x00, 0x1c,
+ 0x00, 0x94, 0x00, 0x51, 0x00, 0xa7, 0x00, 0x51,
+ 0x00, 0xa7, 0x00, 0x04, 0x01, 0x77, 0x69, 0x6e,
+ 0x64, 0x6f, 0x77, 0x00, 0x49, 0x27, 0x6d, 0x20,
+ 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x72, 0x65,
+ 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x73,
+ 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x6e, 0x27, 0x74,
+ 0x20, 0x62, 0x65, 0x20, 0x6f, 0x6e, 0x00, 0x74,
+ 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72,
+ 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x6f, 0x66,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61, 0x6c,
+ 0x6c, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x04, 0x2e,
+ 0x00, 0x86, 0x00, 0x72, 0x00, 0x98, 0x00, 0x4e,
+ 0x00, 0xa4, 0x00, 0x4e, 0x00, 0xa4, 0x00, 0x01,
+ 0x01, 0x63, 0x75, 0x70, 0x62, 0x6f, 0x61, 0x72,
+ 0x64, 0x00, 0x01, 0x05, 0x81, 0x00, 0x67, 0x00,
+ 0x9a, 0x00, 0x70, 0x00, 0x8b, 0x00, 0xa5, 0x00,
+ 0x8b, 0x00, 0xa5, 0x00, 0x01, 0x01, 0x68, 0x65,
+ 0x61, 0x72, 0x74, 0x2d, 0x73, 0x68, 0x61, 0x70,
+ 0x65, 0x64, 0x20, 0x68, 0x6f, 0x6c, 0x65, 0x00,
+ 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6c,
+ 0x6f, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x68, 0x6f,
+ 0x6c, 0x65, 0x2e, 0x00, 0x00, 0x06, 0x7d, 0x00,
+ 0x8c, 0x00, 0x9e, 0x00, 0x9b, 0x00, 0x8f, 0x00,
+ 0xa4, 0x00, 0x8f, 0x00, 0xa4, 0x00, 0x01, 0x01,
+ 0x63, 0x75, 0x70, 0x62, 0x6f, 0x61, 0x72, 0x64,
+ 0x00, 0x01, 0x07, 0x89, 0x00, 0x06, 0x00, 0xb6,
+ 0x00, 0x29, 0x00, 0xa2, 0x00, 0xbb, 0x00, 0xa2,
+ 0x00, 0xbb, 0x00, 0x01, 0x01, 0x63, 0x68, 0x61,
+ 0x6e, 0x64, 0x65, 0x6c, 0x69, 0x65, 0x72, 0x00,
+ 0x01, 0x08, 0x13, 0x01, 0x5e, 0x00, 0x3f, 0x01,
+ 0x81, 0x00, 0xd8, 0x00, 0xa7, 0x00, 0xd8, 0x00,
+ 0xa7, 0x00, 0x02, 0x01, 0x70, 0x69, 0x63, 0x74,
+ 0x75, 0x72, 0x65, 0x00, 0x49, 0x74, 0x20, 0x6c,
+ 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x61, 0x6c, 0x6d,
+ 0x6f, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x6b, 0x65,
+ 0x20, 0x61, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f,
+ 0x77, 0x2e, 0x00, 0x00, 0x09, 0x11, 0x01, 0x8c,
+ 0x00, 0x25, 0x01, 0xb7, 0x00, 0x0e, 0x01, 0xb6,
+ 0x00, 0x0e, 0x01, 0xb6, 0x00, 0x02, 0x01, 0x66,
+ 0x69, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65,
+ 0x00, 0x54, 0x68, 0x65, 0x72, 0x65, 0x27, 0x73,
+ 0x20, 0x61, 0x20, 0x6c, 0x6f, 0x74, 0x20, 0x6f,
+ 0x66, 0x20, 0x73, 0x6f, 0x6f, 0x74, 0x20, 0x69,
+ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x2e,
+ 0x00, 0x00, 0x0a, 0xb9, 0x00, 0x60, 0x00, 0xe8,
+ 0x00, 0x83, 0x00, 0xd8, 0x00, 0xa7, 0x00, 0xd8,
+ 0x00, 0xa7, 0x00, 0x01, 0x01, 0x67, 0x75, 0x6e,
+ 0x73, 0x00, 0x54, 0x68, 0x65, 0x79, 0x20, 0x61,
+ 0x72, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20,
+ 0x70, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x20,
+ 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x00, 0x00, 0x0b, 0x37, 0x00,
+ 0xa5, 0x00, 0x8c, 0x00, 0xc7, 0x00, 0x51, 0x00,
+ 0xa7, 0x00, 0x51, 0x00, 0xa7, 0x00, 0x03, 0x01,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x01, 0x0c,
+ 0x68, 0x00, 0x71, 0x00, 0x6f, 0x00, 0x77, 0x00,
+ 0x6d, 0x00, 0xa4, 0x00, 0x6d, 0x00, 0xa4, 0x00,
+ 0x01, 0x01, 0x72, 0x6f, 0x74, 0x74, 0x65, 0x6e,
+ 0x20, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65, 0x00,
+ 0x50, 0x66, 0x75, 0x69, 0x21, 0x00, 0x00, 0x0d,
+ 0xa9, 0x00, 0x2f, 0x00, 0x3f, 0x01, 0x5d, 0x00,
+ 0xd8, 0x00, 0xa7, 0x00, 0xd8, 0x00, 0xa7, 0x00,
+ 0x01, 0x01, 0x74, 0x72, 0x6f, 0x70, 0x68, 0x69,
+ 0x65, 0x73, 0x00, 0x01, 0x0e, 0xa2, 0x00, 0x8b,
+ 0x00, 0xb6, 0x00, 0xa9, 0x00, 0xc1, 0x00, 0xa4,
+ 0x00, 0xc1, 0x00, 0xa4, 0x00, 0x04, 0x01, 0x63,
+ 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, 0x77, 0x00,
+ 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20,
+ 0x6b, 0x6e, 0x6f, 0x77, 0x20, 0x77, 0x68, 0x79,
+ 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x74, 0x20,
+ 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x73, 0x20,
+ 0x6f, 0x66, 0x00, 0x73, 0x6f, 0x6d, 0x65, 0x20,
+ 0x54, 0x65, 0x78, 0x61, 0x73, 0x20, 0x67, 0x75,
+ 0x79, 0x20, 0x49, 0x20, 0x6d, 0x65, 0x74, 0x20,
+ 0x6f, 0x6e, 0x63, 0x65, 0x2e, 0x00, 0x00, 0x0f,
+ 0x2d, 0x00, 0x6c, 0x00, 0x72, 0x00, 0x84, 0x00,
+ 0x51, 0x00, 0xa7, 0x00, 0x51, 0x00, 0xa7, 0x00,
+ 0x01, 0x01, 0x70, 0x6f, 0x72, 0x63, 0x65, 0x6c,
+ 0x61, 0x69, 0x6e, 0x00, 0x49, 0x27, 0x6d, 0x20,
+ 0x61, 0x66, 0x72, 0x61, 0x69, 0x64, 0x20, 0x65,
+ 0x76, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x62,
+ 0x72, 0x65, 0x61, 0x74, 0x68, 0x20, 0x61, 0x72,
+ 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65,
+ 0x73, 0x65, 0x00, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x73, 0x2e, 0x00, 0x00, 0x3b, 0x90, 0x67, 0x90,
+ 0xaf, 0x90, 0x01, 0x91, 0x55, 0x91, 0x6e, 0x91,
+ 0xc0, 0x91, 0xdb, 0x91, 0xf6, 0x91, 0x17, 0x92,
+ 0x38, 0x92, 0x51, 0x92, 0x73, 0x92, 0xf8, 0x92,
+ 0x20, 0x93, 0x52, 0x93, 0x00, 0x00, 0x01, 0x1d,
+ 0x01, 0x87, 0x00, 0x3b, 0x01, 0xaa, 0x00, 0x16,
+ 0x01, 0xbd, 0x00, 0x16, 0x01, 0xbd, 0x00, 0x02,
+ 0x01, 0x63, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6f,
+ 0x72, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x75,
+ 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x2e,
+ 0x00, 0x00, 0x02, 0xbf, 0x00, 0x88, 0x00, 0xe6,
+ 0x00, 0x9c, 0x00, 0xa8, 0x00, 0xb3, 0x00, 0xa8,
+ 0x00, 0xb3, 0x00, 0x02, 0x01, 0x74, 0x72, 0x75,
+ 0x6e, 0x6b, 0x00, 0x54, 0x68, 0x65, 0x72, 0x65,
+ 0x27, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79,
+ 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68,
+ 0x69, 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, 0x66,
+ 0x75, 0x6c, 0x00, 0x69, 0x6e, 0x20, 0x61, 0x20,
+ 0x74, 0x72, 0x75, 0x6e, 0x6b, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x03, 0x50, 0x00, 0x47, 0x00, 0x64,
+ 0x00, 0x51, 0x00, 0x51, 0x00, 0xb5, 0x00, 0x51,
+ 0x00, 0xb5, 0x00, 0x01, 0x01, 0x62, 0x61, 0x73,
+ 0x6b, 0x65, 0x74, 0x00, 0x49, 0x74, 0x20, 0x67,
+ 0x69, 0x76, 0x65, 0x73, 0x20, 0x6d, 0x65, 0x20,
+ 0x61, 0x6d, 0x62, 0x69, 0x76, 0x61, 0x6c, 0x65,
+ 0x6e, 0x74, 0x20, 0x66, 0x65, 0x65, 0x6c, 0x69,
+ 0x6e, 0x67, 0x73, 0x3a, 0x00, 0x72, 0x65, 0x6d,
+ 0x69, 0x6e, 0x64, 0x73, 0x20, 0x6d, 0x65, 0x20,
+ 0x6f, 0x66, 0x20, 0x73, 0x63, 0x68, 0x6f, 0x6f,
+ 0x6c, 0x2e, 0x00, 0x00, 0x04, 0x65, 0x00, 0x3c,
+ 0x00, 0x69, 0x00, 0xa0, 0x00, 0x65, 0x00, 0xb5,
+ 0x00, 0x65, 0x00, 0xb5, 0x00, 0x01, 0x01, 0x70,
+ 0x6f, 0x6c, 0x65, 0x00, 0x41, 0x62, 0x6f, 0x75,
+ 0x74, 0x20, 0x34, 0x20, 0x6d, 0x65, 0x74, 0x65,
+ 0x72, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x6d,
+ 0x65, 0x74, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x6c,
+ 0x65, 0x00, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,
+ 0x20, 0x62, 0x61, 0x73, 0x6b, 0x65, 0x74, 0x20,
+ 0x73, 0x63, 0x72, 0x65, 0x77, 0x65, 0x64, 0x20,
+ 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2e, 0x00, 0x00,
+ 0x05, 0x90, 0x00, 0x5a, 0x00, 0xb7, 0x00, 0x9f,
+ 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa1, 0x00, 0xa5,
+ 0x00, 0x01, 0x01, 0x64, 0x6f, 0x6f, 0x72, 0x00,
+ 0x01, 0x06, 0xbe, 0x00, 0x71, 0x00, 0xc5, 0x00,
+ 0x7c, 0x00, 0xa1, 0x00, 0xa5, 0x00, 0xa1, 0x00,
+ 0xa5, 0x00, 0x02, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x2d, 0x62, 0x65, 0x6c, 0x6c, 0x00, 0x4f, 0x6e,
+ 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x75, 0x73,
+ 0x65, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20,
+ 0x73, 0x63, 0x61, 0x72, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65,
+ 0x00, 0x62, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x6f, 0x72,
+ 0x2e, 0x00, 0x00, 0x07, 0xd0, 0x00, 0x4b, 0x00,
+ 0xfd, 0x00, 0x7e, 0x00, 0xa9, 0x00, 0xae, 0x00,
+ 0xa9, 0x00, 0xae, 0x00, 0x02, 0x01, 0x77, 0x69,
+ 0x6e, 0x64, 0x6f, 0x77, 0x00, 0x01, 0x08, 0x10,
+ 0x01, 0x4b, 0x00, 0x3d, 0x01, 0x7d, 0x00, 0xa9,
+ 0x00, 0xae, 0x00, 0xa9, 0x00, 0xae, 0x00, 0x02,
+ 0x01, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x00,
+ 0x01, 0x09, 0x4b, 0x00, 0x02, 0x00, 0x58, 0x00,
+ 0x1b, 0x00, 0x51, 0x00, 0xb5, 0x00, 0x51, 0x00,
+ 0xb5, 0x00, 0x01, 0x01, 0x61, 0x74, 0x74, 0x69,
+ 0x63, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77,
+ 0x00, 0x01, 0x0a, 0x00, 0x00, 0xaa, 0x00, 0x21,
+ 0x00, 0xc7, 0x00, 0x30, 0x00, 0xbb, 0x00, 0x00,
+ 0x00, 0xbb, 0x00, 0x04, 0x01, 0x70, 0x61, 0x74,
+ 0x68, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x61, 0x6b,
+ 0x65, 0x00, 0x01, 0x0b, 0x17, 0x01, 0xaa, 0x00,
+ 0x3f, 0x01, 0xc7, 0x00, 0x21, 0x01, 0xbe, 0x00,
+ 0x3f, 0x01, 0xbe, 0x00, 0x02, 0x01, 0x70, 0x61,
+ 0x74, 0x68, 0x00, 0x01, 0x0c, 0x00, 0x00, 0x74,
+ 0x00, 0x1c, 0x00, 0xa9, 0x00, 0x30, 0x00, 0xbb,
+ 0x00, 0x05, 0x00, 0x83, 0x00, 0x01, 0x01, 0x70,
+ 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x00, 0x01, 0x0d, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0xbb, 0x00, 0x40, 0x00, 0xbb, 0x00, 0x01,
+ 0x01, 0x62, 0x6f, 0x79, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x48, 0x65, 0x27, 0x73, 0x20,
+ 0x74, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68,
+ 0x61, 0x72, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73,
+ 0x63, 0x6f, 0x72, 0x65, 0x2c, 0x00, 0x62, 0x75,
+ 0x74, 0x20, 0x68, 0x65, 0x27, 0x73, 0x20, 0x74,
+ 0x6f, 0x6f, 0x20, 0x77, 0x65, 0x61, 0x6b, 0x20,
+ 0x74, 0x6f, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77,
+ 0x00, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x6c,
+ 0x6c, 0x20, 0x68, 0x69, 0x67, 0x68, 0x20, 0x65,
+ 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x21, 0x00, 0x00,
+ 0x53, 0x6f, 0x6e, 0x6e, 0x79, 0x20, 0x6f, 0x72,
+ 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65,
+ 0x72, 0x00, 0xff, 0x0e, 0x1d, 0x01, 0x91, 0x00,
+ 0x23, 0x01, 0x9b, 0x00, 0x16, 0x01, 0xbd, 0x00,
+ 0x16, 0x01, 0xbd, 0x00, 0x02, 0x00, 0x63, 0x6f,
+ 0x6d, 0x62, 0x00, 0x53, 0x74, 0x72, 0x61, 0x6e,
+ 0x67, 0x65, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x2e, 0x00, 0x00, 0x0f, 0x1e, 0x01, 0xa5, 0x00,
+ 0x24, 0x01, 0xa9, 0x00, 0x16, 0x01, 0xbd, 0x00,
+ 0x16, 0x01, 0xbd, 0x00, 0x02, 0x00, 0x6c, 0x65,
+ 0x76, 0x65, 0x72, 0x00, 0x49, 0x20, 0x77, 0x6f,
+ 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, 0x61,
+ 0x74, 0x00, 0x69, 0x74, 0x27, 0x73, 0x20, 0x66,
+ 0x6f, 0x72, 0x3f, 0x00, 0x00, 0x10, 0x26, 0x01,
+ 0x85, 0x00, 0x3b, 0x01, 0xac, 0x00, 0x16, 0x01,
+ 0xbd, 0x00, 0x16, 0x01, 0xbd, 0x00, 0x02, 0x00,
+ 0x63, 0x61, 0x72, 0x20, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x89, 0x93, 0xa2, 0x93, 0xc3, 0x93,
+ 0xdc, 0x93, 0x27, 0x94, 0x42, 0x94, 0x5d, 0x94,
+ 0x78, 0x94, 0xa6, 0x94, 0xda, 0x94, 0xfa, 0x94,
+ 0x13, 0x95, 0x00, 0x00, 0x01, 0x00, 0x00, 0xac,
+ 0x00, 0x2b, 0x00, 0xc3, 0x00, 0x30, 0x00, 0xbe,
+ 0x00, 0x00, 0x00, 0xbb, 0x00, 0x04, 0x01, 0x70,
+ 0x61, 0x74, 0x68, 0x00, 0x01, 0x02, 0xb0, 0x00,
+ 0xb6, 0x00, 0xdd, 0x00, 0xc7, 0x00, 0xc4, 0x00,
+ 0xc2, 0x00, 0xce, 0x00, 0xc7, 0x00, 0x03, 0x01,
+ 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20,
+ 0x63, 0x61, 0x76, 0x65, 0x00, 0x01, 0x03, 0x50,
+ 0x00, 0x68, 0x00, 0x79, 0x00, 0xa9, 0x00, 0x64,
+ 0x00, 0xb0, 0x00, 0x64, 0x00, 0xb0, 0x00, 0x01,
+ 0x01, 0x64, 0x6f, 0x6f, 0x72, 0x00, 0x01, 0x04,
+ 0x00, 0x00, 0x82, 0x00, 0x3f, 0x00, 0xab, 0x00,
+ 0x30, 0x00, 0xbe, 0x00, 0x30, 0x00, 0xbe, 0x00,
+ 0x04, 0x01, 0x6c, 0x61, 0x75, 0x6e, 0x64, 0x72,
+ 0x79, 0x00, 0x54, 0x68, 0x65, 0x20, 0x61, 0x69,
+ 0x72, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x6f,
+ 0x20, 0x64, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x6f,
+ 0x20, 0x64, 0x72, 0x79, 0x00, 0x74, 0x68, 0x69,
+ 0x73, 0x20, 0x77, 0x65, 0x74, 0x20, 0x6c, 0x61,
+ 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x05, 0x8d, 0x00, 0x58, 0x00, 0xba,
+ 0x00, 0x90, 0x00, 0x9f, 0x00, 0xbd, 0x00, 0x9f,
+ 0x00, 0xbd, 0x00, 0x01, 0x01, 0x77, 0x69, 0x6e,
+ 0x64, 0x6f, 0x77, 0x00, 0x01, 0x06, 0xce, 0x00,
+ 0x58, 0x00, 0xfb, 0x00, 0x90, 0x00, 0x9f, 0x00,
+ 0xbd, 0x00, 0x9f, 0x00, 0xbd, 0x00, 0x02, 0x01,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x00, 0x01,
+ 0x07, 0x15, 0x01, 0x55, 0x00, 0x36, 0x01, 0x82,
+ 0x00, 0xc4, 0x00, 0xc2, 0x00, 0xc4, 0x00, 0xc2,
+ 0x00, 0x02, 0x01, 0x77, 0x69, 0x6e, 0x64, 0x6f,
+ 0x77, 0x00, 0x01, 0x08, 0x1a, 0x01, 0x9c, 0x00,
+ 0x38, 0x01, 0xab, 0x00, 0x29, 0x01, 0xb5, 0x00,
+ 0x29, 0x01, 0xb2, 0x00, 0x01, 0x00, 0x68, 0x6f,
+ 0x6c, 0x65, 0x00, 0x41, 0x20, 0x77, 0x61, 0x79,
+ 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x72, 0x2e, 0x00,
+ 0x00, 0x09, 0x0b, 0x01, 0x83, 0x00, 0x3f, 0x01,
+ 0xb0, 0x00, 0xc4, 0x00, 0xc2, 0x00, 0xc4, 0x00,
+ 0xc2, 0x00, 0x02, 0x01, 0x76, 0x61, 0x6c, 0x76,
+ 0x65, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x61,
+ 0x20, 0x68, 0x65, 0x61, 0x76, 0x79, 0x20, 0x6d,
+ 0x65, 0x74, 0x61, 0x6c, 0x20, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x0a, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00,
+ 0xc2, 0x00, 0xc4, 0x00, 0xc2, 0x00, 0x02, 0x01,
+ 0x64, 0x6f, 0x67, 0x00, 0x53, 0x6e, 0x6f, 0x6f,
+ 0x70, 0x79, 0x2e, 0x00, 0x00, 0x0b, 0x7c, 0x00,
+ 0x84, 0x00, 0x81, 0x00, 0x8e, 0x00, 0x64, 0x00,
+ 0xb0, 0x00, 0x64, 0x00, 0xb0, 0x00, 0x02, 0x01,
+ 0x62, 0x65, 0x6c, 0x6c, 0x00, 0x01, 0x0c, 0x00,
+ 0x00, 0x82, 0x00, 0x3f, 0x00, 0xa1, 0x00, 0x3f,
+ 0x00, 0xbb, 0x00, 0x3f, 0x00, 0xbb, 0x00, 0x01,
+ 0x01, 0x72, 0x6f, 0x70, 0x65, 0x00, 0x01, 0x48,
+ 0x95, 0x86, 0x95, 0xa3, 0x95, 0xd2, 0x95, 0xfe,
+ 0x95, 0x2e, 0x96, 0x48, 0x96, 0x88, 0x96, 0xae,
+ 0x96, 0x0f, 0x97, 0x36, 0x97, 0x4f, 0x97, 0x6e,
+ 0x97, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe6, 0x00, 0xac, 0x00,
+ 0xe6, 0x00, 0xac, 0x00, 0x03, 0x01, 0x6f, 0x6c,
+ 0x64, 0x20, 0x6d, 0x61, 0x6e, 0x00, 0x48, 0x65,
+ 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x6c,
+ 0x69, 0x6b, 0x65, 0x20, 0x61, 0x20, 0x72, 0x65,
+ 0x74, 0x69, 0x72, 0x65, 0x64, 0x00, 0x73, 0x65,
+ 0x61, 0x20, 0x77, 0x6f, 0x6c, 0x66, 0x2e, 0x00,
+ 0x00, 0x02, 0x60, 0x00, 0x5e, 0x00, 0x7a, 0x00,
+ 0x7f, 0x00, 0x6d, 0x00, 0xa9, 0x00, 0x6d, 0x00,
+ 0xa9, 0x00, 0x01, 0x01, 0x63, 0x75, 0x70, 0x62,
+ 0x6f, 0x61, 0x72, 0x64, 0x00, 0x01, 0x03, 0x63,
+ 0x00, 0x83, 0x00, 0xb2, 0x00, 0x97, 0x00, 0xa3,
+ 0x00, 0xab, 0x00, 0xa3, 0x00, 0xab, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x73,
+ 0x00, 0x42, 0x6f, 0x79, 0x21, 0x20, 0x4c, 0x6f,
+ 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
+ 0x65, 0x6d, 0x21, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0xb7, 0x00, 0x8e, 0x00, 0xc7, 0x00, 0x63, 0x00,
+ 0xb4, 0x00, 0x63, 0x00, 0xb4, 0x00, 0x03, 0x01,
+ 0x62, 0x65, 0x64, 0x00, 0x48, 0x6f, 0x6d, 0x65,
+ 0x2c, 0x20, 0x73, 0x77, 0x65, 0x65, 0x74, 0x20,
+ 0x68, 0x6f, 0x6d, 0x65, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x05, 0x13, 0x01, 0x51, 0x00, 0x28, 0x01,
+ 0x92, 0x00, 0xf4, 0x00, 0xac, 0x00, 0xf4, 0x00,
+ 0xac, 0x00, 0x02, 0x01, 0x77, 0x69, 0x6e, 0x64,
+ 0x6f, 0x77, 0x00, 0x41, 0x20, 0x76, 0x69, 0x65,
+ 0x77, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x00,
+ 0x00, 0x06, 0xc8, 0x00, 0x87, 0x00, 0xf4, 0x00,
+ 0x9b, 0x00, 0xd2, 0x00, 0xac, 0x00, 0xd2, 0x00,
+ 0xac, 0x00, 0x01, 0x01, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x00, 0x01, 0x07, 0xc0, 0x00, 0x68, 0x00,
+ 0xec, 0x00, 0x7f, 0x00, 0xd2, 0x00, 0xac, 0x00,
+ 0xd2, 0x00, 0xac, 0x00, 0x01, 0x01, 0x73, 0x68,
+ 0x6f, 0x74, 0x67, 0x75, 0x6e, 0x00, 0x47, 0x65,
+ 0x65, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x6d, 0x75,
+ 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f,
+ 0x72, 0x00, 0x64, 0x69, 0x6e, 0x6f, 0x73, 0x61,
+ 0x75, 0x72, 0x75, 0x73, 0x65, 0x73, 0x21, 0x2e,
+ 0x2e, 0x00, 0x00, 0x08, 0xbd, 0x00, 0x38, 0x00,
+ 0xe6, 0x00, 0x65, 0x00, 0xd2, 0x00, 0xac, 0x00,
+ 0xd2, 0x00, 0xac, 0x00, 0x01, 0x01, 0x70, 0x69,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x43, 0x68,
+ 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x00,
+ 0x00, 0x09, 0x87, 0x00, 0x47, 0x00, 0xb8, 0x00,
+ 0x6a, 0x00, 0x96, 0x00, 0xac, 0x00, 0x96, 0x00,
+ 0xac, 0x00, 0x01, 0x01, 0x66, 0x61, 0x6d, 0x69,
+ 0x6c, 0x79, 0x20, 0x70, 0x69, 0x63, 0x74, 0x75,
+ 0x72, 0x65, 0x73, 0x00, 0x49, 0x20, 0x77, 0x6f,
+ 0x75, 0x6c, 0x64, 0x6e, 0x27, 0x74, 0x20, 0x6c,
+ 0x69, 0x6b, 0x65, 0x20, 0x68, 0x61, 0x76, 0x69,
+ 0x6e, 0x67, 0x20, 0x6d, 0x79, 0x20, 0x61, 0x6e,
+ 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x20,
+ 0x68, 0x61, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x00,
+ 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x74, 0x72, 0x6f,
+ 0x70, 0x68, 0x69, 0x65, 0x73, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x0a, 0x37, 0x00, 0x56, 0x00, 0x57,
+ 0x00, 0x89, 0x00, 0x46, 0x00, 0xac, 0x00, 0x46,
+ 0x00, 0xac, 0x00, 0x01, 0x01, 0x66, 0x6c, 0x6f,
+ 0x77, 0x65, 0x72, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x2e, 0x00,
+ 0x00, 0x0b, 0x0d, 0x00, 0x60, 0x00, 0x2c, 0x00,
+ 0xac, 0x00, 0x3d, 0x00, 0xaf, 0x00, 0x3d, 0x00,
+ 0xaf, 0x00, 0x04, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x0c, 0x94, 0x00, 0x04, 0x00, 0xb6,
+ 0x00, 0x37, 0x00, 0xa3, 0x00, 0xab, 0x00, 0xa3,
+ 0x00, 0xab, 0x00, 0x01, 0x01, 0x63, 0x68, 0x61,
+ 0x6e, 0x64, 0x65, 0x6c, 0x69, 0x65, 0x72, 0x00,
+ 0x01, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xb7, 0x00, 0xaa, 0x00, 0xb7, 0x00,
+ 0xaa, 0x00, 0x01, 0x01, 0x66, 0x61, 0x6e, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x62, 0x61, 0x74,
+ 0x74, 0x65, 0x72, 0x79, 0x20, 0x70, 0x6f, 0x77,
+ 0x65, 0x72, 0x65, 0x64, 0x2e, 0x00, 0x00, 0xbe,
+ 0x97, 0xfb, 0x97, 0x26, 0x98, 0x42, 0x98, 0x5d,
+ 0x98, 0x78, 0x98, 0x97, 0x98, 0xcb, 0x98, 0xe1,
+ 0x98, 0x23, 0x99, 0x51, 0x99, 0x97, 0x99, 0xdb,
+ 0x99, 0x3f, 0x9a, 0x7d, 0x9a, 0xe2, 0x9a, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x5d, 0x00, 0xba, 0x00, 0x5d, 0x00,
+ 0xba, 0x00, 0x04, 0x01, 0x6f, 0x6c, 0x64, 0x20,
+ 0x6c, 0x61, 0x64, 0x79, 0x00, 0x53, 0x68, 0x65,
+ 0x20, 0x6b, 0x6e, 0x69, 0x74, 0x73, 0x20, 0x69,
+ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x74,
+ 0x65, 0x61, 0x6d, 0x2e, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x67, 0x69, 0x72, 0x6c, 0x00, 0x53, 0x68,
+ 0x65, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6f, 0x6c,
+ 0x2e, 0x00, 0x00, 0x41, 0x6e, 0x6e, 0x65, 0x00,
+ 0xff, 0x03, 0x00, 0x00, 0xbc, 0x00, 0x6b, 0x00,
+ 0xc7, 0x00, 0x5e, 0x00, 0xbe, 0x00, 0x4c, 0x00,
+ 0xc7, 0x00, 0x03, 0x01, 0x77, 0x61, 0x79, 0x20,
+ 0x6f, 0x75, 0x74, 0x00, 0x01, 0x04, 0x02, 0x00,
+ 0x48, 0x00, 0x30, 0x00, 0x84, 0x00, 0x5d, 0x00,
+ 0xba, 0x00, 0x5d, 0x00, 0xba, 0x00, 0x01, 0x01,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x00, 0x01,
+ 0x05, 0x84, 0x00, 0x48, 0x00, 0xb0, 0x00, 0x84,
+ 0x00, 0x9b, 0x00, 0xac, 0x00, 0x9b, 0x00, 0xac,
+ 0x00, 0x01, 0x01, 0x77, 0x69, 0x6e, 0x64, 0x6f,
+ 0x77, 0x00, 0x01, 0x06, 0x4b, 0x00, 0x0a, 0x00,
+ 0x78, 0x00, 0x38, 0x00, 0x5d, 0x00, 0xba, 0x00,
+ 0x5d, 0x00, 0xba, 0x00, 0x01, 0x01, 0x63, 0x68,
+ 0x61, 0x6e, 0x64, 0x65, 0x6c, 0x69, 0x65, 0x72,
+ 0x00, 0x01, 0x07, 0x4d, 0x00, 0x61, 0x00, 0x6f,
+ 0x00, 0xa5, 0x00, 0x5d, 0x00, 0xab, 0x00, 0x5d,
+ 0x00, 0xab, 0x00, 0x01, 0x01, 0x63, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x00, 0x52, 0x65, 0x61, 0x6c, 0x6c,
+ 0x79, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x20,
+ 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x70, 0x69,
+ 0x65, 0x63, 0x65, 0x2e, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x09, 0x86, 0x00, 0x9f,
+ 0x00, 0x97, 0x00, 0xad, 0x00, 0x9e, 0x00, 0xc6,
+ 0x00, 0x9e, 0x00, 0xc6, 0x00, 0x03, 0x01, 0x69,
+ 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x66, 0x72, 0x75, 0x69, 0x74, 0x73, 0x00,
+ 0x54, 0x68, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c,
+ 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20,
+ 0x61, 0x6c, 0x6d, 0x6f, 0x73, 0x74, 0x00, 0x72,
+ 0x65, 0x61, 0x6c, 0x21, 0x00, 0x00, 0x0a, 0xac,
+ 0x00, 0x9f, 0x00, 0xb6, 0x00, 0xae, 0x00, 0x9e,
+ 0x00, 0xc6, 0x00, 0x9e, 0x00, 0xc6, 0x00, 0x03,
+ 0x01, 0x6a, 0x75, 0x67, 0x00, 0x49, 0x74, 0x20,
+ 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72,
+ 0x73, 0x2e, 0x00, 0x00, 0x0b, 0xa1, 0x00, 0x89,
+ 0x00, 0xc2, 0x00, 0x9e, 0x00, 0x9e, 0x00, 0xc6,
+ 0x00, 0x9e, 0x00, 0xc6, 0x00, 0x03, 0x01, 0x66,
+ 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x00, 0x49,
+ 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20,
+ 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d,
+ 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x00, 0x61, 0x64,
+ 0x6d, 0x69, 0x72, 0x65, 0x72, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x0c, 0x3c, 0x00, 0xa1, 0x00, 0x4c,
+ 0x00, 0xa8, 0x00, 0x5d, 0x00, 0xba, 0x00, 0x4e,
+ 0x00, 0xbc, 0x00, 0x04, 0x01, 0x66, 0x65, 0x61,
+ 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x75, 0x73,
+ 0x74, 0x65, 0x72, 0x00, 0x49, 0x74, 0x20, 0x6d,
+ 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64,
+ 0x75, 0x73, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x62,
+ 0x6c, 0x65, 0x6d, 0x2e, 0x00, 0x00, 0x0d, 0x7d,
+ 0x00, 0xa7, 0x00, 0xc2, 0x00, 0xc7, 0x00, 0x9e,
+ 0x00, 0xc6, 0x00, 0x9e, 0x00, 0xc6, 0x00, 0x03,
+ 0x01, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x72, 0x6f, 0x75, 0x6e,
+ 0x64, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x49,
+ 0x20, 0x64, 0x6f, 0x75, 0x62, 0x74, 0x20, 0x69,
+ 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6e,
+ 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x74,
+ 0x6f, 0x20, 0x64, 0x6f, 0x00, 0x77, 0x69, 0x74,
+ 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65,
+ 0x64, 0x69, 0x65, 0x76, 0x61, 0x6c, 0x20, 0x6c,
+ 0x65, 0x67, 0x65, 0x6e, 0x64, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x0e, 0xf1, 0x00, 0x60, 0x00, 0x1a,
+ 0x01, 0x94, 0x00, 0x02, 0x01, 0xb8, 0x00, 0x02,
+ 0x01, 0xb8, 0x00, 0x01, 0x01, 0x6d, 0x69, 0x72,
+ 0x72, 0x6f, 0x72, 0x00, 0x49, 0x20, 0x63, 0x61,
+ 0x6e, 0x20, 0x73, 0x65, 0x65, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x67, 0x69, 0x72, 0x6c, 0x27, 0x73,
+ 0x00, 0x66, 0x61, 0x63, 0x65, 0x20, 0x69, 0x6e,
+ 0x20, 0x69, 0x74, 0x2e, 0x2e, 0x2e, 0x00, 0x00,
+ 0x0f, 0x1d, 0x01, 0x3e, 0x00, 0x3f, 0x01, 0x68,
+ 0x00, 0x02, 0x01, 0xb8, 0x00, 0x02, 0x01, 0xb8,
+ 0x00, 0x02, 0x01, 0x70, 0x69, 0x63, 0x74, 0x75,
+ 0x72, 0x65, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x6e, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x6c, 0x69, 0x76, 0x65, 0x20, 0x69, 0x6e, 0x20,
+ 0x61, 0x20, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x67,
+ 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61,
+ 0x76, 0x65, 0x20, 0x76, 0x69, 0x6c, 0x6c, 0x61,
+ 0x67, 0x65, 0x00, 0x6c, 0x61, 0x6e, 0x64, 0x73,
+ 0x63, 0x61, 0x70, 0x65, 0x73, 0x20, 0x6f, 0x6e,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61, 0x6c,
+ 0x6c, 0x73, 0x2e, 0x00, 0x00, 0x10, 0x18, 0x01,
+ 0xa1, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0xf5, 0x00,
+ 0xc6, 0x00, 0xf5, 0x00, 0xc6, 0x00, 0x02, 0x01,
+ 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x00, 0x49, 0x6d,
+ 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x76, 0x65,
+ 0x2e, 0x00, 0x00, 0x1c, 0x9b, 0x3f, 0x9b, 0x77,
+ 0x9b, 0x9b, 0x9b, 0xd1, 0x9b, 0x2d, 0x9c, 0x47,
+ 0x9c, 0xa4, 0x9c, 0xf4, 0x9c, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x5e, 0x00, 0xaa, 0x00, 0x5e, 0x00, 0xaa, 0x00,
+ 0x04, 0x01, 0x73, 0x70, 0x69, 0x64, 0x65, 0x72,
+ 0x00, 0x49, 0x74, 0x27, 0x73, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x02, 0x38, 0x00, 0x86, 0x00, 0x4e,
+ 0x00, 0xa9, 0x00, 0x5e, 0x00, 0xaa, 0x00, 0x4e,
+ 0x00, 0xaa, 0x00, 0x04, 0x01, 0x73, 0x68, 0x6f,
+ 0x76, 0x65, 0x6c, 0x00, 0x49, 0x20, 0x63, 0x6f,
+ 0x75, 0x6c, 0x64, 0x20, 0x70, 0x6c, 0x61, 0x79,
+ 0x20, 0x64, 0x69, 0x67, 0x67, 0x65, 0x72, 0x20,
+ 0x77, 0x69, 0x74, 0x68, 0x20, 0x69, 0x74, 0x2e,
+ 0x00, 0x00, 0x03, 0xd5, 0x00, 0x15, 0x00, 0xf8,
+ 0x00, 0xa5, 0x00, 0xe6, 0x00, 0xaa, 0x00, 0xe6,
+ 0x00, 0xaa, 0x00, 0x01, 0x01, 0x6c, 0x61, 0x64,
+ 0x64, 0x65, 0x72, 0x00, 0x57, 0x61, 0x79, 0x20,
+ 0x6f, 0x75, 0x74, 0x2e, 0x00, 0x00, 0x04, 0xf7,
+ 0x00, 0x70, 0x00, 0xfe, 0x00, 0x7a, 0x00, 0x05,
+ 0x01, 0xa8, 0x00, 0x05, 0x01, 0xa8, 0x00, 0x01,
+ 0x00, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x6c, 0x69, 0x74,
+ 0x74, 0x6c, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74,
+ 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x66, 0x75,
+ 0x6c, 0x2e, 0x00, 0x00, 0x05, 0x05, 0x00, 0x5a,
+ 0x00, 0x1e, 0x00, 0x77, 0x00, 0x53, 0x00, 0xb4,
+ 0x00, 0x53, 0x00, 0xb4, 0x00, 0x04, 0x01, 0x61,
+ 0x78, 0x65, 0x00, 0x49, 0x20, 0x68, 0x6f, 0x70,
+ 0x65, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20,
+ 0x73, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6f,
+ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61,
+ 0x6c, 0x6c, 0x20, 0x68, 0x61, 0x76, 0x65, 0x00,
+ 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20,
+ 0x74, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x61, 0x78, 0x65, 0x2e, 0x2e, 0x2e, 0x00, 0x00,
+ 0x06, 0x1c, 0x01, 0x38, 0x00, 0x28, 0x01, 0x62,
+ 0x00, 0xf5, 0x00, 0xb2, 0x00, 0xf5, 0x00, 0xb2,
+ 0x00, 0x02, 0x01, 0x63, 0x68, 0x61, 0x69, 0x6e,
+ 0x00, 0x01, 0x07, 0x2e, 0x01, 0x50, 0x00, 0x36,
+ 0x01, 0x62, 0x00, 0xf5, 0x00, 0xb2, 0x00, 0xf5,
+ 0x00, 0xb2, 0x00, 0x02, 0x01, 0x74, 0x6f, 0x6e,
+ 0x67, 0x73, 0x00, 0x47, 0x65, 0x65, 0x2c, 0x20,
+ 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x6c, 0x61,
+ 0x63, 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73,
+ 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x61, 0x00, 0x74, 0x6f, 0x72,
+ 0x74, 0x75, 0x72, 0x65, 0x20, 0x63, 0x68, 0x61,
+ 0x6d, 0x62, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61,
+ 0x6e, 0x20, 0x61, 0x20, 0x63, 0x65, 0x6c, 0x6c,
+ 0x61, 0x72, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x08,
+ 0x6b, 0x00, 0x59, 0x00, 0xcc, 0x00, 0xa9, 0x00,
+ 0x99, 0x00, 0xb0, 0x00, 0x99, 0x00, 0xb0, 0x00,
+ 0x01, 0x01, 0x73, 0x68, 0x65, 0x6c, 0x76, 0x65,
+ 0x73, 0x00, 0x4c, 0x6f, 0x74, 0x73, 0x20, 0x6f,
+ 0x66, 0x20, 0x6a, 0x61, 0x72, 0x73, 0x20, 0x61,
+ 0x6e, 0x64, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66,
+ 0x2e, 0x20, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x00, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79,
+ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73,
+ 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x09,
+ 0x17, 0x01, 0x8c, 0x00, 0x3f, 0x01, 0xc2, 0x00,
+ 0xf5, 0x00, 0xb2, 0x00, 0xf5, 0x00, 0xb2, 0x00,
+ 0x02, 0x01, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
+ 0x6e, 0x65, 0x72, 0x73, 0x00, 0x54, 0x68, 0x65,
+ 0x79, 0x27, 0x72, 0x65, 0x20, 0x65, 0x6d, 0x70,
+ 0x74, 0x79, 0x2e, 0x00, 0x00, 0x32, 0x9d, 0x90,
+ 0x9d, 0x07, 0x9e, 0x29, 0x9e, 0x42, 0x9e, 0x9e,
+ 0x9e, 0xcf, 0x9e, 0x00, 0x00, 0x01, 0xe1, 0x00,
+ 0x8b, 0x00, 0xf6, 0x00, 0x91, 0x00, 0x0c, 0x01,
+ 0x91, 0x00, 0x0c, 0x01, 0x91, 0x00, 0x04, 0x00,
+ 0x62, 0x6f, 0x6e, 0x65, 0x00, 0x44, 0x75, 0x65,
+ 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x61, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x72, 0x6f, 0x63, 0x6b, 0x20,
+ 0x49, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x00,
+ 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20,
+ 0x62, 0x65, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20,
+ 0x64, 0x69, 0x6e, 0x6f, 0x73, 0x61, 0x75, 0x72,
+ 0x20, 0x62, 0x6f, 0x6e, 0x65, 0x2e, 0x2e, 0x2e,
+ 0x2e, 0x00, 0x00, 0x02, 0x90, 0x00, 0x49, 0x00,
+ 0xcb, 0x00, 0x9e, 0x00, 0xea, 0x00, 0x98, 0x00,
+ 0xea, 0x00, 0x98, 0x00, 0x04, 0x01, 0x62, 0x75,
+ 0x73, 0x68, 0x00, 0x49, 0x74, 0x20, 0x62, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x73, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x77, 0x61, 0x79, 0x20, 0x74, 0x6f, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x63, 0x61, 0x76, 0x65,
+ 0x2e, 0x00, 0x4d, 0x61, 0x79, 0x62, 0x65, 0x20,
+ 0x73, 0x6f, 0x6d, 0x65, 0x6f, 0x6e, 0x65, 0x20,
+ 0x70, 0x6c, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x20,
+ 0x69, 0x74, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20,
+ 0x74, 0x6f, 0x00, 0x6b, 0x65, 0x65, 0x70, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x63, 0x61, 0x76, 0x65,
+ 0x20, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73,
+ 0x20, 0x73, 0x61, 0x66, 0x65, 0x2e, 0x2e, 0x2e,
+ 0x00, 0x00, 0x03, 0x79, 0x00, 0x34, 0x00, 0xae,
+ 0x00, 0x9e, 0x00, 0xea, 0x00, 0x98, 0x00, 0xea,
+ 0x00, 0x98, 0x00, 0x04, 0x01, 0x63, 0x61, 0x76,
+ 0x65, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6e,
+ 0x63, 0x65, 0x00, 0x01, 0x04, 0x15, 0x01, 0x7a,
+ 0x00, 0x3f, 0x01, 0xa9, 0x00, 0x14, 0x01, 0x93,
+ 0x00, 0x3f, 0x01, 0x93, 0x00, 0x02, 0x01, 0x70,
+ 0x61, 0x74, 0x68, 0x00, 0x01, 0x05, 0xdd, 0x00,
+ 0x7a, 0x00, 0xfe, 0x00, 0x94, 0x00, 0xed, 0x00,
+ 0x98, 0x00, 0xed, 0x00, 0x98, 0x00, 0x01, 0x01,
+ 0x72, 0x6f, 0x63, 0x6b, 0x00, 0x49, 0x74, 0x20,
+ 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76,
+ 0x65, 0x20, 0x66, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
+ 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x67,
+ 0x65, 0x73, 0x20, 0x61, 0x67, 0x6f, 0x2e, 0x00,
+ 0x49, 0x20, 0x77, 0x6f, 0x6e, 0x64, 0x65, 0x72,
+ 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x62,
+ 0x6f, 0x64, 0x79, 0x20, 0x67, 0x6f, 0x74, 0x20,
+ 0x68, 0x75, 0x72, 0x74, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xed, 0x00, 0x98, 0x00, 0xed, 0x00,
+ 0x98, 0x00, 0x01, 0x01, 0x62, 0x75, 0x74, 0x74,
+ 0x65, 0x72, 0x66, 0x6c, 0x79, 0x00, 0x49, 0x73,
+ 0x6e, 0x27, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74,
+ 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x6c, 0x79, 0x3f,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xed, 0x00, 0x98, 0x00, 0xed,
+ 0x00, 0x98, 0x00, 0x01, 0x01, 0x62, 0x75, 0x74,
+ 0x74, 0x65, 0x72, 0x66, 0x6c, 0x79, 0x00, 0x49,
+ 0x73, 0x6e, 0x27, 0x74, 0x20, 0x74, 0x68, 0x61,
+ 0x74, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x6c, 0x79,
+ 0x3f, 0x00, 0x00, 0x0e, 0x9f, 0x29, 0x9f, 0x4e,
+ 0x9f, 0x6a, 0x9f, 0xbd, 0x9f, 0xea, 0x9f, 0x00,
+ 0x00, 0x01, 0x03, 0x01, 0xa4, 0x00, 0x1d, 0x01,
+ 0xb6, 0x00, 0xf8, 0x00, 0xa9, 0x00, 0xf8, 0x00,
+ 0xa9, 0x00, 0x03, 0x01, 0x6c, 0x69, 0x7a, 0x61,
+ 0x72, 0x64, 0x00, 0x01, 0x02, 0x3f, 0x00, 0x8a,
+ 0x00, 0x5c, 0x00, 0xbc, 0x00, 0x6e, 0x00, 0xaa,
+ 0x00, 0x6e, 0x00, 0xaa, 0x00, 0x03, 0x00, 0x3f,
+ 0x3f, 0x3f, 0x00, 0x57, 0x68, 0x61, 0x74, 0x20,
+ 0x49, 0x53, 0x20, 0x49, 0x54, 0x3f, 0x21, 0x00,
+ 0x00, 0x03, 0x11, 0x01, 0x70, 0x00, 0x3f, 0x01,
+ 0xc7, 0x00, 0xf8, 0x00, 0xa9, 0x00, 0x3f, 0x01,
+ 0xa9, 0x00, 0x02, 0x01, 0x77, 0x61, 0x79, 0x20,
+ 0x6f, 0x75, 0x74, 0x00, 0x01, 0x04, 0x97, 0x00,
+ 0x54, 0x00, 0xad, 0x00, 0x5d, 0x00, 0x9f, 0x00,
+ 0xaa, 0x00, 0x9f, 0x00, 0xaa, 0x00, 0x01, 0x01,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x00,
+ 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x69, 0x73, 0x20, 0x76, 0x65, 0x72, 0x79,
+ 0x20, 0x6f, 0x6c, 0x64, 0x2c, 0x20, 0x62, 0x75,
+ 0x74, 0x20, 0x49, 0x20, 0x63, 0x61, 0x6e, 0x20,
+ 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x00, 0x72, 0x65,
+ 0x61, 0x64, 0x20, 0x69, 0x74, 0x2e, 0x00, 0x00,
+ 0x05, 0x9a, 0x00, 0x5e, 0x00, 0xa6, 0x00, 0x67,
+ 0x00, 0x9f, 0x00, 0xaa, 0x00, 0x9f, 0x00, 0xaa,
+ 0x00, 0x01, 0x01, 0x68, 0x6f, 0x6c, 0x65, 0x00,
+ 0x49, 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73,
+ 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x64, 0x65,
+ 0x65, 0x70, 0x2e, 0x00, 0x00, 0x06, 0xf9, 0x00,
+ 0x9d, 0x00, 0xff, 0x00, 0xa3, 0x00, 0xee, 0x00,
+ 0xa8, 0x00, 0xee, 0x00, 0xa8, 0x00, 0x02, 0x00,
+ 0x6e, 0x75, 0x67, 0x67, 0x65, 0x74, 0x00, 0x50,
+ 0x75, 0x72, 0x65, 0x20, 0x67, 0x6f, 0x6c, 0x64,
+ 0x21, 0x00, 0x00, 0x32, 0xa0, 0x5e, 0xa0, 0x8d,
+ 0xa0, 0xb9, 0xa0, 0xe6, 0xa0, 0x1c, 0xa1, 0x51,
+ 0xa1, 0xb1, 0xa1, 0xe3, 0xa1, 0x07, 0xa2, 0x64,
+ 0xa2, 0xad, 0xa2, 0xe6, 0xa2, 0x21, 0xa3, 0x5f,
+ 0xa3, 0x7d, 0xa3, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00,
+ 0xc3, 0x00, 0x96, 0x00, 0xc3, 0x00, 0x02, 0x01,
+ 0x68, 0x65, 0x6e, 0x00, 0x41, 0x20, 0x6c, 0x69,
+ 0x74, 0x74, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x72,
+ 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x00, 0x87, 0x00, 0xe0, 0x00,
+ 0x87, 0x00, 0x01, 0x01, 0x63, 0x72, 0x6f, 0x77,
+ 0x00, 0x45, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65,
+ 0x6c, 0x79, 0x20, 0x75, 0x6e, 0x66, 0x72, 0x69,
+ 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x2e, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xe0, 0x00, 0x87, 0x00, 0xe0, 0x00, 0x87,
+ 0x00, 0x01, 0x01, 0x63, 0x72, 0x6f, 0x77, 0x00,
+ 0x4c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x64, 0x61,
+ 0x6e, 0x67, 0x65, 0x72, 0x6f, 0x75, 0x73, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, 0x8e,
+ 0x00, 0xec, 0x00, 0x8e, 0x00, 0x04, 0x01, 0x6d,
+ 0x6f, 0x75, 0x73, 0x65, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6e,
+ 0x65, 0x72, 0x76, 0x6f, 0x75, 0x73, 0x2e, 0x00,
+ 0x00, 0x05, 0xdb, 0x00, 0x41, 0x00, 0xe9, 0x00,
+ 0x47, 0x00, 0xe0, 0x00, 0x87, 0x00, 0xe0, 0x00,
+ 0x87, 0x00, 0x01, 0x01, 0x64, 0x69, 0x76, 0x65,
+ 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x00, 0x59, 0x65,
+ 0x61, 0x68, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x61,
+ 0x6d, 0x61, 0x7a, 0x65, 0x73, 0x20, 0x6d, 0x65,
+ 0x20, 0x74, 0x6f, 0x6f, 0x2e, 0x00, 0x00, 0x06,
+ 0xc9, 0x00, 0x72, 0x00, 0xf1, 0x00, 0x80, 0x00,
+ 0xe0, 0x00, 0x87, 0x00, 0xde, 0x00, 0x8f, 0x00,
+ 0x01, 0x01, 0x66, 0x69, 0x6e, 0x73, 0x00, 0x54,
+ 0x68, 0x65, 0x79, 0x20, 0x77, 0x69, 0x6c, 0x6c,
+ 0x20, 0x66, 0x69, 0x74, 0x20, 0x6d, 0x65, 0x20,
+ 0x70, 0x65, 0x72, 0x66, 0x65, 0x63, 0x74, 0x6c,
+ 0x79, 0x2e, 0x00, 0x00, 0x07, 0xc8, 0x00, 0x3a,
+ 0x00, 0xf5, 0x00, 0x80, 0x00, 0xe0, 0x00, 0x87,
+ 0x00, 0xe0, 0x00, 0x87, 0x00, 0x01, 0x01, 0x73,
+ 0x63, 0x61, 0x72, 0x65, 0x63, 0x72, 0x6f, 0x77,
+ 0x00, 0x41, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67,
+ 0x20, 0x74, 0x6f, 0x20, 0x73, 0x63, 0x61, 0x72,
+ 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72,
+ 0x6f, 0x77, 0x73, 0x2e, 0x00, 0x41, 0x74, 0x20,
+ 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x74, 0x68,
+ 0x61, 0x74, 0x27, 0x73, 0x20, 0x77, 0x68, 0x61,
+ 0x74, 0x20, 0x74, 0x68, 0x65, 0x00, 0x74, 0x68,
+ 0x65, 0x6f, 0x72, 0x79, 0x20, 0x73, 0x61, 0x79,
+ 0x73, 0x2e, 0x00, 0x00, 0x08, 0x7a, 0x00, 0xa7,
+ 0x00, 0x87, 0x00, 0xb3, 0x00, 0x90, 0x00, 0xb5,
+ 0x00, 0x90, 0x00, 0xb5, 0x00, 0x04, 0x01, 0x73,
+ 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x00, 0x41, 0x20,
+ 0x76, 0x65, 0x72, 0x79, 0x20, 0x64, 0x61, 0x6e,
+ 0x67, 0x65, 0x72, 0x6f, 0x75, 0x73, 0x20, 0x74,
+ 0x6f, 0x6f, 0x6c, 0x2e, 0x00, 0x00, 0x09, 0x3d,
+ 0x00, 0xb6, 0x00, 0x8d, 0x00, 0xc7, 0x00, 0x84,
+ 0x00, 0xbe, 0x00, 0x7e, 0x00, 0xc7, 0x00, 0x03,
+ 0x01, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f,
+ 0x20, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x67, 0x65,
+ 0x00, 0x01, 0x0a, 0x7b, 0x00, 0x7a, 0x00, 0x99,
+ 0x00, 0xa8, 0x00, 0xa2, 0x00, 0xb5, 0x00, 0xa2,
+ 0x00, 0xb5, 0x00, 0x04, 0x01, 0x68, 0x61, 0x79,
+ 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x00, 0x54,
+ 0x68, 0x65, 0x72, 0x65, 0x20, 0x6d, 0x75, 0x73,
+ 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6d,
+ 0x65, 0x74, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x73,
+ 0x69, 0x64, 0x65, 0x2c, 0x00, 0x49, 0x20, 0x63,
+ 0x61, 0x6e, 0x20, 0x73, 0x65, 0x65, 0x20, 0x69,
+ 0x74, 0x20, 0x67, 0x6c, 0x69, 0x74, 0x74, 0x65,
+ 0x72, 0x69, 0x6e, 0x67, 0x21, 0x00, 0x00, 0x0b,
+ 0x6a, 0x00, 0x94, 0x00, 0x7d, 0x00, 0xb3, 0x00,
+ 0x81, 0x00, 0xbf, 0x00, 0x81, 0x00, 0xbf, 0x00,
+ 0x04, 0x01, 0x72, 0x61, 0x6b, 0x65, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x76, 0x65, 0x72, 0x79,
+ 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x61, 0x6e, 0x64,
+ 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61,
+ 0x72, 0x65, 0x6e, 0x27, 0x74, 0x00, 0x6d, 0x61,
+ 0x6e, 0x79, 0x20, 0x74, 0x65, 0x65, 0x74, 0x68,
+ 0x20, 0x6c, 0x65, 0x66, 0x74, 0x2e, 0x00, 0x00,
+ 0x0c, 0xa2, 0x00, 0x73, 0x00, 0xb6, 0x00, 0x80,
+ 0x00, 0xec, 0x00, 0x8e, 0x00, 0xec, 0x00, 0x8e,
+ 0x00, 0x04, 0x01, 0x6d, 0x6f, 0x75, 0x73, 0x65,
+ 0x20, 0x68, 0x6f, 0x6c, 0x65, 0x00, 0x48, 0x6f,
+ 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70,
+ 0x61, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x69, 0x6e,
+ 0x20, 0x6f, 0x6e, 0x65, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x0d, 0xa5, 0x00, 0x5c, 0x00, 0xbf, 0x00,
+ 0x80, 0x00, 0xec, 0x00, 0x8e, 0x00, 0xec, 0x00,
+ 0x8e, 0x00, 0x04, 0x01, 0x68, 0x61, 0x79, 0x20,
+ 0x73, 0x74, 0x61, 0x63, 0x6b, 0x00, 0x54, 0x68,
+ 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x61, 0x20,
+ 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x68, 0x6f,
+ 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64,
+ 0x65, 0x21, 0x00, 0x00, 0x0e, 0xae, 0x00, 0xbc,
+ 0x00, 0xb4, 0x00, 0xc2, 0x00, 0xa1, 0x00, 0xc3,
+ 0x00, 0xa1, 0x00, 0xc3, 0x00, 0x02, 0x00, 0x66,
+ 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x00, 0x49,
+ 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68,
+ 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e,
+ 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64,
+ 0x20, 0x62, 0x79, 0x20, 0x68, 0x65, 0x6e, 0x2e,
+ 0x00, 0x00, 0x0f, 0x51, 0x00, 0x89, 0x00, 0x70,
+ 0x00, 0xb6, 0x00, 0x84, 0x00, 0xbe, 0x00, 0x84,
+ 0x00, 0xbe, 0x00, 0x04, 0x01, 0x68, 0x61, 0x79,
+ 0x20, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x00, 0x01,
+ 0x10, 0x04, 0x01, 0x0d, 0x00, 0x3f, 0x01, 0x5d,
+ 0x00, 0xe8, 0x00, 0x86, 0x00, 0xe8, 0x00, 0x86,
+ 0x00, 0x02, 0x01, 0x6d, 0x61, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x00, 0x47, 0x65, 0x65, 0x2c, 0x20,
+ 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x70, 0x65, 0x6f,
+ 0x70, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x61, 0x6c,
+ 0x6c, 0x79, 0x00, 0x68, 0x61, 0x76, 0x65, 0x20,
+ 0x6e, 0x6f, 0x20, 0x74, 0x61, 0x73, 0x74, 0x65,
+ 0x2e, 0x00, 0x00, 0xca, 0xa3, 0x0d, 0xa4, 0x3e,
+ 0xa4, 0x57, 0xa4, 0x00, 0x00, 0x01, 0x55, 0x00,
+ 0x35, 0x00, 0x79, 0x00, 0x56, 0x00, 0x67, 0x00,
+ 0x8f, 0x00, 0x67, 0x00, 0x8f, 0x00, 0x01, 0x01,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x00, 0x54,
+ 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x61,
+ 0x20, 0x73, 0x68, 0x75, 0x74, 0x74, 0x65, 0x72,
+ 0x2c, 0x20, 0x49, 0x20, 0x63, 0x61, 0x6e, 0x27,
+ 0x74, 0x20, 0x73, 0x65, 0x65, 0x20, 0x61, 0x20,
+ 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x00, 0x00,
+ 0x02, 0xaa, 0x00, 0x63, 0x00, 0xbd, 0x00, 0x7b,
+ 0x00, 0x8f, 0x00, 0x8f, 0x00, 0x8f, 0x00, 0x8f,
+ 0x00, 0x02, 0x01, 0x73, 0x63, 0x75, 0x6c, 0x70,
+ 0x74, 0x75, 0x72, 0x65, 0x00, 0x54, 0x68, 0x65,
+ 0x20, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x20, 0x69,
+ 0x73, 0x20, 0x73, 0x69, 0x63, 0x6b, 0x2e, 0x00,
+ 0x00, 0x03, 0xc6, 0x00, 0x53, 0x00, 0xf0, 0x00,
+ 0xa4, 0x00, 0xaa, 0x00, 0x99, 0x00, 0xd1, 0x00,
+ 0x99, 0x00, 0x02, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x04, 0x00, 0x00, 0x8b, 0x00, 0x22,
+ 0x00, 0xc7, 0x00, 0x42, 0x00, 0xa7, 0x00, 0x42,
+ 0x00, 0xa7, 0x00, 0x04, 0x01, 0x77, 0x61, 0x79,
+ 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x66, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x00, 0x01, 0x92, 0xa4, 0xab,
+ 0xa4, 0xc4, 0xa4, 0x09, 0xa5, 0x3d, 0xa5, 0x8e,
+ 0xa5, 0xbd, 0xa5, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x5b, 0x00, 0x1a, 0x00, 0xae, 0x00, 0x2b, 0x00,
+ 0xaa, 0x00, 0x2b, 0x00, 0xaa, 0x00, 0x04, 0x01,
+ 0x64, 0x6f, 0x6f, 0x72, 0x00, 0x01, 0x02, 0xe8,
+ 0x00, 0x5b, 0x00, 0x17, 0x01, 0xa8, 0x00, 0xff,
+ 0x00, 0xb2, 0x00, 0xff, 0x00, 0xa6, 0x00, 0x01,
+ 0x01, 0x64, 0x6f, 0x6f, 0x72, 0x00, 0x01, 0x03,
+ 0x2b, 0x00, 0x74, 0x00, 0x4f, 0x00, 0xae, 0x00,
+ 0x3e, 0x00, 0xb7, 0x00, 0x3e, 0x00, 0xb7, 0x00,
+ 0x01, 0x01, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72,
+ 0x73, 0x00, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69,
+ 0x73, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x72, 0x70,
+ 0x72, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68,
+ 0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x6e, 0x27,
+ 0x74, 0x00, 0x70, 0x6c, 0x61, 0x73, 0x74, 0x69,
+ 0x63, 0x2e, 0x00, 0x00, 0x04, 0x82, 0x00, 0x32,
+ 0x00, 0xab, 0x00, 0x69, 0x00, 0xa2, 0x00, 0xad,
+ 0x00, 0xa2, 0x00, 0xad, 0x00, 0x01, 0x01, 0x70,
+ 0x6c, 0x61, 0x6e, 0x74, 0x00, 0x48, 0x6f, 0x77,
+ 0x27, 0x73, 0x20, 0x69, 0x74, 0x20, 0x68, 0x61,
+ 0x6e, 0x67, 0x69, 0x6e, 0x27, 0x2c, 0x20, 0x52,
+ 0x6f, 0x62, 0x62, 0x69, 0x65, 0x3f, 0x00, 0x00,
+ 0x05, 0x1e, 0x00, 0x49, 0x00, 0x9d, 0x00, 0xa8,
+ 0x00, 0xa2, 0x00, 0xad, 0x00, 0xa2, 0x00, 0xad,
+ 0x00, 0x01, 0x01, 0x73, 0x74, 0x61, 0x69, 0x72,
+ 0x73, 0x00, 0x54, 0x68, 0x65, 0x79, 0x20, 0x73,
+ 0x61, 0x79, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79,
+ 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x6d, 0x61,
+ 0x6b, 0x65, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x72,
+ 0x20, 0x6c, 0x69, 0x66, 0x65, 0x00, 0x33, 0x20,
+ 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20,
+ 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x00,
+ 0x00, 0x06, 0x1f, 0x01, 0xa8, 0x00, 0x3f, 0x01,
+ 0xc7, 0x00, 0x18, 0x01, 0xbc, 0x00, 0x3f, 0x01,
+ 0xbc, 0x00, 0x02, 0x01, 0x6f, 0x74, 0x68, 0x65,
+ 0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f,
+ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f,
+ 0x72, 0x72, 0x69, 0x64, 0x6f, 0x72, 0x00, 0x01,
+ 0x07, 0x00, 0x00, 0xc0, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0xa0, 0x00, 0xbc, 0x00, 0xa0, 0x00, 0xc7,
+ 0x00, 0x03, 0x01, 0x77, 0x61, 0x79, 0x20, 0x74,
+ 0x6f, 0x20, 0x70, 0x6f, 0x72, 0x63, 0x68, 0x00,
+ 0x01, 0x00, 0xa6, 0x1f, 0xa6, 0x4d, 0xa6, 0x84,
+ 0xa6, 0xd4, 0xa6, 0xee, 0xa6, 0x11, 0xa7, 0x51,
+ 0xa7, 0x72, 0xa7, 0x8b, 0xa7, 0xb3, 0xa7, 0xdb,
+ 0xa7, 0x03, 0xa8, 0x2b, 0xa8, 0x53, 0xa8, 0x7b,
+ 0xa8, 0x00, 0x00, 0x01, 0x00, 0x00, 0x78, 0x00,
+ 0x51, 0x00, 0x9c, 0x00, 0x12, 0x00, 0x9f, 0x00,
+ 0x12, 0x00, 0x9f, 0x00, 0x01, 0x01, 0x64, 0x6f,
+ 0x77, 0x6e, 0x73, 0x74, 0x61, 0x69, 0x72, 0x73,
+ 0x00, 0x01, 0x02, 0x14, 0x00, 0x3f, 0x00, 0x55,
+ 0x00, 0x6a, 0x00, 0x34, 0x00, 0xa5, 0x00, 0x34,
+ 0x00, 0xa5, 0x00, 0x01, 0x01, 0x70, 0x69, 0x63,
+ 0x74, 0x75, 0x72, 0x65, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x63,
+ 0x61, 0x73, 0x74, 0x6c, 0x65, 0x2e, 0x00, 0x00,
+ 0x03, 0x29, 0x01, 0x5f, 0x00, 0x3f, 0x01, 0xb0,
+ 0x00, 0x0f, 0x01, 0xae, 0x00, 0x0f, 0x01, 0xae,
+ 0x00, 0x02, 0x01, 0x61, 0x72, 0x6d, 0x6f, 0x75,
+ 0x72, 0x00, 0x54, 0x68, 0x65, 0x20, 0x62, 0x65,
+ 0x74, 0x61, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20,
+ 0x74, 0x61, 0x6e, 0x6b, 0x2e, 0x00, 0x00, 0x04,
+ 0xcf, 0x00, 0x63, 0x00, 0xda, 0x00, 0x67, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x01, 0x00, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x20,
+ 0x74, 0x61, 0x70, 0x65, 0x00, 0x57, 0x68, 0x61,
+ 0x74, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f,
+ 0x66, 0x20, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x20,
+ 0x6d, 0x75, 0x73, 0x74, 0x20, 0x69, 0x74, 0x20,
+ 0x62, 0x65, 0x00, 0x68, 0x69, 0x64, 0x64, 0x65,
+ 0x6e, 0x20, 0x73, 0x6f, 0x20, 0x77, 0x65, 0x6c,
+ 0x6c, 0x3f, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x05,
+ 0xc3, 0x00, 0x54, 0x00, 0xc7, 0x00, 0x5d, 0x00,
+ 0xd0, 0x00, 0x97, 0x00, 0xd0, 0x00, 0x97, 0x00,
+ 0x01, 0x01, 0x62, 0x6f, 0x6f, 0x6b, 0x00, 0x00,
+ 0x00, 0x06, 0x6f, 0x00, 0x2f, 0x00, 0x3f, 0x01,
+ 0x6e, 0x00, 0xdd, 0x00, 0x9b, 0x00, 0xdd, 0x00,
+ 0x9b, 0x00, 0x01, 0x01, 0x62, 0x6f, 0x6f, 0x6b,
+ 0x73, 0x00, 0x4f, 0x68, 0x2c, 0x20, 0x62, 0x6f,
+ 0x79, 0x21, 0x00, 0x00, 0x07, 0xd5, 0x00, 0xab,
+ 0x00, 0xe3, 0x00, 0xbd, 0x00, 0xea, 0x00, 0xbd,
+ 0x00, 0xea, 0x00, 0xbd, 0x00, 0x04, 0x01, 0x74,
+ 0x72, 0x61, 0x73, 0x68, 0x20, 0x63, 0x61, 0x6e,
+ 0x00, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61,
+ 0x72, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x6f, 0x74,
+ 0x20, 0x6f, 0x66, 0x20, 0x70, 0x61, 0x70, 0x65,
+ 0x72, 0x73, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64,
+ 0x65, 0x2e, 0x00, 0x00, 0x08, 0x98, 0x00, 0x8d,
+ 0x00, 0xb2, 0x00, 0xc1, 0x00, 0xa5, 0x00, 0xc6,
+ 0x00, 0xa5, 0x00, 0xc6, 0x00, 0x01, 0x01, 0x63,
+ 0x68, 0x61, 0x69, 0x72, 0x00, 0x53, 0x6f, 0x66,
+ 0x74, 0x79, 0x2e, 0x00, 0x00, 0x09, 0x87, 0x00,
+ 0x86, 0x00, 0xa2, 0x00, 0x99, 0x00, 0x88, 0x00,
+ 0xc1, 0x00, 0x88, 0x00, 0xc1, 0x00, 0x01, 0x01,
+ 0x6c, 0x61, 0x6d, 0x70, 0x00, 0x01, 0x0a, 0x7c,
+ 0x00, 0x9e, 0x00, 0x95, 0x00, 0xa6, 0x00, 0x88,
+ 0x00, 0xc1, 0x00, 0x88, 0x00, 0xc1, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x0b, 0x7c,
+ 0x00, 0xa8, 0x00, 0x95, 0x00, 0xaf, 0x00, 0x88,
+ 0x00, 0xc1, 0x00, 0x88, 0x00, 0xc1, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x0c, 0x7c,
+ 0x00, 0xb1, 0x00, 0x95, 0x00, 0xb8, 0x00, 0x88,
+ 0x00, 0xc1, 0x00, 0x88, 0x00, 0xc1, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x0d, 0xb6,
+ 0x00, 0x9e, 0x00, 0xd0, 0x00, 0xa6, 0x00, 0xc4,
+ 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc0, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x0e, 0xb6,
+ 0x00, 0xa8, 0x00, 0xd0, 0x00, 0xaf, 0x00, 0xc4,
+ 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc0, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x0f, 0xb6,
+ 0x00, 0xb1, 0x00, 0xd0, 0x00, 0xb8, 0x00, 0xc4,
+ 0x00, 0xc0, 0x00, 0xc4, 0x00, 0xc0, 0x00, 0x01,
+ 0x01, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x10, 0xf3,
+ 0x00, 0x71, 0x00, 0x18, 0x01, 0x98, 0x00, 0x06,
+ 0x01, 0x9e, 0x00, 0x06, 0x01, 0x9e, 0x00, 0x01,
+ 0x01, 0x6c, 0x61, 0x64, 0x64, 0x65, 0x72, 0x00,
+ 0x49, 0x6e, 0x64, 0x69, 0x73, 0x70, 0x65, 0x6e,
+ 0x73, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x64,
+ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74,
+ 0x6f, 0x20, 0x67, 0x69, 0x72, 0x6c, 0x73, 0x20,
+ 0x69, 0x6e, 0x20, 0x73, 0x6b, 0x69, 0x72, 0x74,
+ 0x73, 0x2e, 0x00, 0x00, 0xd5, 0xa8, 0xee, 0xa8,
+ 0x1e, 0xa9, 0x58, 0xa9, 0x96, 0xa9, 0xcc, 0xa9,
+ 0xf4, 0xa9, 0x1f, 0xaa, 0x38, 0xaa, 0x00, 0x00,
+ 0x01, 0x73, 0x00, 0x5b, 0x00, 0xa3, 0x00, 0xa7,
+ 0x00, 0x8c, 0x00, 0xac, 0x00, 0x8c, 0x00, 0xa6,
+ 0x00, 0x01, 0x01, 0x64, 0x6f, 0x6f, 0x72, 0x00,
+ 0x01, 0x02, 0x36, 0x01, 0x8c, 0x00, 0x3b, 0x01,
+ 0x91, 0x00, 0x2c, 0x01, 0xb2, 0x00, 0x2c, 0x01,
+ 0xb2, 0x00, 0x02, 0x01, 0x68, 0x6f, 0x6c, 0x65,
+ 0x00, 0x49, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20,
+ 0x61, 0x20, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65,
+ 0x20, 0x73, 0x68, 0x61, 0x70, 0x65, 0x2e, 0x00,
+ 0x00, 0x03, 0x31, 0x01, 0x8b, 0x00, 0x3b, 0x01,
+ 0x91, 0x00, 0x2c, 0x01, 0xb2, 0x00, 0x2c, 0x01,
+ 0xb2, 0x00, 0x02, 0x00, 0x68, 0x61, 0x6e, 0x64,
+ 0x6c, 0x65, 0x00, 0x49, 0x74, 0x20, 0x66, 0x69,
+ 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x70,
+ 0x65, 0x72, 0x66, 0x65, 0x63, 0x74, 0x6c, 0x79,
+ 0x2e, 0x00, 0x00, 0x04, 0x04, 0x00, 0x3f, 0x00,
+ 0x64, 0x00, 0x61, 0x00, 0x3b, 0x00, 0xb2, 0x00,
+ 0x3b, 0x00, 0xb2, 0x00, 0x01, 0x01, 0x70, 0x69,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x00, 0x49, 0x20,
+ 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x6c,
+ 0x69, 0x6b, 0x65, 0x64, 0x20, 0x53, 0x60, 0x54,
+ 0x60, 0x41, 0x60, 0x52, 0x60, 0x20, 0x57, 0x60,
+ 0x41, 0x60, 0x52, 0x60, 0x53, 0x60, 0x2e, 0x00,
+ 0x00, 0x05, 0xd8, 0x00, 0x4d, 0x00, 0x09, 0x01,
+ 0x79, 0x00, 0xf3, 0x00, 0xb5, 0x00, 0xf3, 0x00,
+ 0xb5, 0x00, 0x01, 0x01, 0x70, 0x69, 0x63, 0x74,
+ 0x75, 0x72, 0x65, 0x00, 0x41, 0x6e, 0x64, 0x20,
+ 0x49, 0x20, 0x74, 0x6f, 0x75, 0x67, 0x68, 0x74,
+ 0x20, 0x49, 0x20, 0x77, 0x61, 0x73, 0x20, 0x77,
+ 0x65, 0x69, 0x72, 0x64, 0x2e, 0x00, 0x00, 0x06,
+ 0xf3, 0x00, 0x91, 0x00, 0x15, 0x01, 0xc7, 0x00,
+ 0xf3, 0x00, 0xb5, 0x00, 0xf3, 0x00, 0xb5, 0x00,
+ 0x03, 0x01, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72,
+ 0x73, 0x00, 0x4e, 0x69, 0x63, 0x65, 0x20, 0x73,
+ 0x6d, 0x65, 0x6c, 0x6c, 0x2e, 0x00, 0x00, 0x07,
+ 0x00, 0x00, 0xa8, 0x00, 0x1a, 0x00, 0xc7, 0x00,
+ 0x28, 0x00, 0xbc, 0x00, 0x00, 0x00, 0xbc, 0x00,
+ 0x04, 0x01, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,
+ 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20,
+ 0x63, 0x6f, 0x72, 0x72, 0x69, 0x64, 0x6f, 0x72,
+ 0x00, 0x01, 0x08, 0x25, 0x01, 0x5f, 0x00, 0x3f,
+ 0x01, 0xb6, 0x00, 0x11, 0x01, 0xab, 0x00, 0x11,
+ 0x01, 0xab, 0x00, 0x02, 0x01, 0x64, 0x6f, 0x6f,
+ 0x72, 0x00, 0x01, 0x09, 0x0e, 0x00, 0x5a, 0x00,
+ 0x32, 0x00, 0xb0, 0x00, 0x28, 0x00, 0xbc, 0x00,
+ 0x28, 0x00, 0xbc, 0x00, 0x01, 0x01, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x65, 0x00, 0x42, 0x69, 0x7a,
+ 0x61, 0x72, 0x72, 0x65, 0x2e, 0x00, 0x00, 0x6e,
+ 0xaa, 0x9a, 0xaa, 0xcd, 0xaa, 0x12, 0xab, 0x5d,
+ 0xab, 0x79, 0xab, 0x92, 0xab, 0xda, 0xab, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x00, 0xb6, 0x00, 0x52, 0x00,
+ 0xb6, 0x00, 0x01, 0x01, 0x72, 0x6f, 0x62, 0x6f,
+ 0x74, 0x00, 0x49, 0x6d, 0x70, 0x72, 0x65, 0x73,
+ 0x73, 0x69, 0x76, 0x65, 0x2e, 0x00, 0x00, 0x4d,
+ 0x69, 0x6b, 0x65, 0x00, 0xff, 0x02, 0x2d, 0x00,
+ 0x75, 0x00, 0x37, 0x00, 0x83, 0x00, 0x33, 0x00,
+ 0xaa, 0x00, 0x33, 0x00, 0xaa, 0x00, 0x01, 0x00,
+ 0x6a, 0x61, 0x72, 0x00, 0x54, 0x68, 0x69, 0x73,
+ 0x20, 0x6a, 0x61, 0x72, 0x20, 0x69, 0x73, 0x20,
+ 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20,
+ 0x70, 0x69, 0x6c, 0x6c, 0x73, 0x2e, 0x00, 0x00,
+ 0x03, 0x2d, 0x00, 0x75, 0x00, 0x37, 0x00, 0x83,
+ 0x00, 0x33, 0x00, 0xaa, 0x00, 0x33, 0x00, 0xaa,
+ 0x00, 0x01, 0x00, 0x62, 0x6f, 0x6f, 0x6b, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x62, 0x69, 0x67,
+ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x6f,
+ 0x6b, 0x73, 0x00, 0x6c, 0x69, 0x6b, 0x65, 0x20,
+ 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6b, 0x69, 0x6e,
+ 0x64, 0x20, 0x6f, 0x66, 0x00, 0x64, 0x69, 0x61,
+ 0x72, 0x79, 0x2e, 0x00, 0x00, 0x04, 0x74, 0x00,
+ 0x2d, 0x00, 0xb9, 0x00, 0x7e, 0x00, 0x98, 0x00,
+ 0xa5, 0x00, 0x98, 0x00, 0xa5, 0x00, 0x01, 0x01,
+ 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x00,
+ 0x54, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x65,
+ 0x27, 0x73, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74,
+ 0x2e, 0x20, 0x49, 0x27, 0x64, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x68, 0x61,
+ 0x76, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6d,
+ 0x79, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x00, 0x00,
+ 0x05, 0x88, 0x00, 0x88, 0x00, 0xa5, 0x00, 0x9f,
+ 0x00, 0x98, 0x00, 0xa5, 0x00, 0x98, 0x00, 0xa5,
+ 0x00, 0x01, 0x01, 0x63, 0x61, 0x62, 0x69, 0x6e,
+ 0x65, 0x74, 0x00, 0x01, 0x06, 0x4e, 0x00, 0xbd,
+ 0x00, 0xe0, 0x00, 0xc7, 0x00, 0x8b, 0x00, 0xbc,
+ 0x00, 0x8b, 0x00, 0xc7, 0x00, 0x03, 0x01, 0x65,
+ 0x78, 0x69, 0x74, 0x00, 0x01, 0x07, 0x00, 0x00,
+ 0xc7, 0x00, 0x4d, 0x00, 0xc7, 0x00, 0x8b, 0x00,
+ 0xbc, 0x00, 0x39, 0x00, 0xc6, 0x00, 0x03, 0x00,
+ 0x6c, 0x65, 0x66, 0x74, 0x20, 0x6c, 0x6f, 0x77,
+ 0x65, 0x72, 0x20, 0x65, 0x64, 0x67, 0x65, 0x20,
+ 0x6f, 0x66, 0x20, 0x73, 0x63, 0x72, 0x65, 0x65,
+ 0x6e, 0x00, 0x49, 0x20, 0x63, 0x6f, 0x75, 0x6c,
+ 0x64, 0x20, 0x74, 0x72, 0x79, 0x20, 0x74, 0x6f,
+ 0x20, 0x68, 0x69, 0x64, 0x65, 0x20, 0x68, 0x65,
+ 0x72, 0x65, 0x21, 0x00, 0x00, 0x08, 0x89, 0x00,
+ 0x7e, 0x00, 0x93, 0x00, 0x85, 0x00, 0x8f, 0x00,
+ 0xa3, 0x00, 0x8f, 0x00, 0xa3, 0x00, 0x01, 0x00,
+ 0x64, 0x6f, 0x6f, 0x72, 0x20, 0x68, 0x61, 0x6e,
+ 0x64, 0x6c, 0x65, 0x00, 0x4a, 0x6f, 0x68, 0x6e,
+ 0x20, 0x4e, 0x6f, 0x74, 0x79, 0x20, 0x6c, 0x65,
+ 0x66, 0x74, 0x20, 0x69, 0x74, 0x20, 0x68, 0x65,
+ 0x72, 0x65, 0x2e, 0x00, 0x00, 0x2c, 0xac, 0x6b,
+ 0xac, 0xb8, 0xac, 0xe3, 0xac, 0xff, 0xac, 0x43,
+ 0xad, 0x8d, 0xad, 0xcc, 0xad, 0x1d, 0xae, 0x6e,
+ 0xae, 0xbe, 0xae, 0xf8, 0xae, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x8d, 0x00, 0x9f, 0x00, 0x8d, 0x00, 0x9f, 0x00,
+ 0x04, 0x01, 0x63, 0x6f, 0x6f, 0x6b, 0x00, 0x48,
+ 0x65, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x70,
+ 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x61,
+ 0x64, 0x64, 0x69, 0x63, 0x74, 0x65, 0x64, 0x20,
+ 0x74, 0x6f, 0x20, 0x68, 0x69, 0x73, 0x20, 0x77,
+ 0x6f, 0x72, 0x6b, 0x2e, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04,
+ 0x01, 0x73, 0x74, 0x65, 0x77, 0x00, 0x49, 0x74,
+ 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65,
+ 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6b, 0x69,
+ 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f,
+ 0x75, 0x70, 0x2e, 0x00, 0x4e, 0x6f, 0x77, 0x20,
+ 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x78, 0x74,
+ 0x72, 0x61, 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72,
+ 0x2e, 0x00, 0x00, 0x03, 0x26, 0x00, 0x84, 0x00,
+ 0x30, 0x00, 0x8e, 0x00, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x04, 0x01, 0x68, 0x6f,
+ 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x00,
+ 0x54, 0x68, 0x61, 0x74, 0x27, 0x73, 0x20, 0x43,
+ 0x4f, 0x4f, 0x4c, 0x2e, 0x00, 0x00, 0x04, 0x1c,
+ 0x01, 0x9c, 0x00, 0x3f, 0x01, 0xc7, 0x00, 0x0b,
+ 0x01, 0xb2, 0x00, 0x3f, 0x01, 0xb2, 0x00, 0x02,
+ 0x01, 0x77, 0x61, 0x79, 0x20, 0x6f, 0x75, 0x74,
+ 0x00, 0x01, 0x05, 0x9e, 0x00, 0x7f, 0x00, 0xc1,
+ 0x00, 0x9b, 0x00, 0xc0, 0x00, 0xa0, 0x00, 0xc0,
+ 0x00, 0xa0, 0x00, 0x01, 0x01, 0x72, 0x65, 0x66,
+ 0x72, 0x69, 0x67, 0x65, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x00, 0x4d, 0x79, 0x20, 0x66, 0x61, 0x76,
+ 0x6f, 0x75, 0x72, 0x69, 0x74, 0x65, 0x20, 0x74,
+ 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x6b, 0x69, 0x74, 0x63,
+ 0x68, 0x65, 0x6e, 0x2e, 0x00, 0x00, 0x06, 0x81,
+ 0x00, 0x74, 0x00, 0x9c, 0x00, 0x7c, 0x00, 0x8d,
+ 0x00, 0x9f, 0x00, 0x8d, 0x00, 0x9f, 0x00, 0x01,
+ 0x01, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x00, 0x49,
+ 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20,
+ 0x77, 0x69, 0x74, 0x68, 0x20, 0x62, 0x61, 0x74,
+ 0x74, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x20,
+ 0x4a, 0x75, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x6b,
+ 0x65, 0x00, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61,
+ 0x6c, 0x6b, 0x6d, 0x61, 0x6e, 0x2e, 0x00, 0x00,
+ 0x07, 0xdb, 0x00, 0x70, 0x00, 0xe0, 0x00, 0x7c,
+ 0x00, 0xdd, 0x00, 0xa0, 0x00, 0xdd, 0x00, 0xa0,
+ 0x00, 0x01, 0x01, 0x63, 0x68, 0x69, 0x6c, 0x6c,
+ 0x69, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x72,
+ 0x65, 0x64, 0x2c, 0x20, 0x69, 0x74, 0x27, 0x73,
+ 0x20, 0x68, 0x6f, 0x74, 0x2c, 0x20, 0x69, 0x74,
+ 0x27, 0x73, 0x20, 0x2e, 0x2e, 0x2e, 0x43, 0x48,
+ 0x49, 0x4c, 0x4c, 0x49, 0x21, 0x00, 0x00, 0x08,
+ 0xd5, 0x00, 0x77, 0x00, 0xe6, 0x00, 0x7e, 0x00,
+ 0xdd, 0x00, 0xa0, 0x00, 0xdd, 0x00, 0xa0, 0x00,
+ 0x01, 0x00, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20,
+ 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x63, 0x68,
+ 0x69, 0x6c, 0x6c, 0x69, 0x20, 0x62, 0x6f, 0x74,
+ 0x74, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x6f,
+ 0x64, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65,
+ 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x2e,
+ 0x2e, 0x20, 0x65, 0x74, 0x63, 0x2e, 0x00, 0x00,
+ 0x09, 0x23, 0x01, 0x77, 0x00, 0x2f, 0x01, 0x7e,
+ 0x00, 0x28, 0x01, 0xa0, 0x00, 0x28, 0x01, 0xa0,
+ 0x00, 0x01, 0x01, 0x70, 0x61, 0x73, 0x74, 0x72,
+ 0x79, 0x20, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
+ 0x00, 0x4d, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65,
+ 0x20, 0x67, 0x75, 0x6e, 0x73, 0x2e, 0x20, 0x57,
+ 0x6f, 0x6d, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65,
+ 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x00, 0x31,
+ 0x20, 0x3a, 0x20, 0x30, 0x20, 0x66, 0x6f, 0x72,
+ 0x20, 0x77, 0x6f, 0x6d, 0x65, 0x6e, 0x2e, 0x00,
+ 0x00, 0x0a, 0x59, 0x00, 0x70, 0x00, 0x6d, 0x00,
+ 0x7d, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x01, 0x01, 0x6d, 0x69, 0x63, 0x72,
+ 0x6f, 0x77, 0x61, 0x76, 0x65, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x67,
+ 0x69, 0x63, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x2e,
+ 0x20, 0x49, 0x74, 0x20, 0x74, 0x75, 0x72, 0x6e,
+ 0x73, 0x00, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x69,
+ 0x73, 0x68, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20,
+ 0x72, 0x75, 0x62, 0x62, 0x65, 0x72, 0x2e, 0x00,
+ 0x00, 0x0b, 0xb4, 0x00, 0x67, 0x00, 0xd5, 0x00,
+ 0x74, 0x00, 0xc7, 0x00, 0xa2, 0x00, 0xc7, 0x00,
+ 0xa2, 0x00, 0x01, 0x01, 0x6b, 0x6e, 0x69, 0x76,
+ 0x65, 0x73, 0x00, 0x41, 0x20, 0x76, 0x65, 0x72,
+ 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2e, 0x00, 0x00, 0x0c, 0xad, 0x00, 0x82, 0x00,
+ 0xb8, 0x00, 0x8c, 0x00, 0xc0, 0x00, 0xa0, 0x00,
+ 0xc0, 0x00, 0xa0, 0x00, 0x01, 0x01, 0x6d, 0x65,
+ 0x61, 0x74, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x69, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x6c, 0x61,
+ 0x73, 0x74, 0x69, 0x63, 0x20, 0x62, 0x61, 0x67,
+ 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x68,
+ 0x61, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x7a, 0x65,
+ 0x6e, 0x20, 0x74, 0x6f, 0x00, 0x74, 0x68, 0x65,
+ 0x20, 0x73, 0x68, 0x65, 0x6c, 0x66, 0x2e, 0x00,
+ 0x00, 0x56, 0xaf, 0x6f, 0xaf, 0x97, 0xaf, 0xaf,
+ 0xaf, 0xe4, 0xaf, 0x00, 0xb0, 0x29, 0xb0, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x2d, 0x00, 0x23, 0x00,
+ 0x82, 0x00, 0x34, 0x00, 0x85, 0x00, 0x28, 0x00,
+ 0x80, 0x00, 0x04, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x02, 0x15, 0x01, 0x7d, 0x00, 0x36,
+ 0x01, 0x9e, 0x00, 0x25, 0x01, 0xa6, 0x00, 0x25,
+ 0x01, 0xa6, 0x00, 0x01, 0x01, 0x73, 0x69, 0x6e,
+ 0x6b, 0x00, 0x49, 0x74, 0x20, 0x68, 0x61, 0x73,
+ 0x20, 0x61, 0x20, 0x68, 0x6f, 0x6c, 0x65, 0x2e,
+ 0x00, 0x00, 0x03, 0x1e, 0x01, 0x70, 0x00, 0x2c,
+ 0x01, 0x7c, 0x00, 0x14, 0x01, 0x9f, 0x00, 0x14,
+ 0x01, 0x9f, 0x00, 0x02, 0x01, 0x74, 0x61, 0x70,
+ 0x00, 0x01, 0x04, 0x55, 0x00, 0x2e, 0x00, 0x76,
+ 0x00, 0x67, 0x00, 0x60, 0x00, 0x8c, 0x00, 0x60,
+ 0x00, 0x8c, 0x00, 0x01, 0x01, 0x6d, 0x69, 0x72,
+ 0x72, 0x6f, 0x72, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64,
+ 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x6c, 0x64, 0x20,
+ 0x64, 0x69, 0x72, 0x74, 0x2e, 0x00, 0x00, 0x05,
+ 0x4a, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x86, 0x00,
+ 0x62, 0x00, 0x87, 0x00, 0x62, 0x00, 0x87, 0x00,
+ 0x01, 0x01, 0x63, 0x61, 0x62, 0x69, 0x6e, 0x65,
+ 0x74, 0x00, 0x01, 0x06, 0x7a, 0x00, 0x82, 0x00,
+ 0xff, 0x00, 0xa4, 0x00, 0xc0, 0x00, 0xae, 0x00,
+ 0xc0, 0x00, 0xae, 0x00, 0x01, 0x01, 0x62, 0x61,
+ 0x74, 0x68, 0x00, 0x57, 0x68, 0x6f, 0x61, 0x21,
+ 0x20, 0x49, 0x74, 0x27, 0x73, 0x20, 0x62, 0x69,
+ 0x67, 0x21, 0x00, 0x00, 0x07, 0x34, 0x00, 0x72,
+ 0x00, 0x3a, 0x00, 0x7d, 0x00, 0x44, 0x00, 0x81,
+ 0x00, 0x44, 0x00, 0x81, 0x00, 0x04, 0x01, 0x73,
+ 0x6f, 0x63, 0x6b, 0x00, 0x49, 0x74, 0x20, 0x6d,
+ 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x4a,
+ 0x6f, 0x68, 0x6e, 0x20, 0x4e, 0x6f, 0x74, 0x79,
+ 0x27, 0x73, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x76,
+ 0xb0, 0xb4, 0xb0, 0xf9, 0xb0, 0x3b, 0xb1, 0x84,
+ 0xb1, 0xe6, 0xb1, 0x2a, 0xb2, 0x7d, 0xb2, 0xc3,
+ 0xb2, 0xdf, 0xb2, 0x1b, 0xb3, 0x6c, 0xb3, 0x00,
+ 0x00, 0x01, 0x52, 0x00, 0x8a, 0x00, 0x5e, 0x00,
+ 0x9b, 0x00, 0x68, 0x00, 0xb5, 0x00, 0x68, 0x00,
+ 0xb5, 0x00, 0x04, 0x01, 0x63, 0x6f, 0x67, 0x6e,
+ 0x61, 0x63, 0x00, 0x42, 0x6f, 0x74, 0x74, 0x6c,
+ 0x65, 0x20, 0x61, 0x73, 0x20, 0x62, 0x69, 0x67,
+ 0x20, 0x61, 0x73, 0x20, 0x4e, 0x61, 0x70, 0x6f,
+ 0x6c, 0x65, 0x6f, 0x6e, 0x20, 0x68, 0x69, 0x6d,
+ 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x00, 0x00, 0x02,
+ 0x52, 0x00, 0x8a, 0x00, 0x5e, 0x00, 0x96, 0x00,
+ 0x68, 0x00, 0xb5, 0x00, 0x68, 0x00, 0xb5, 0x00,
+ 0x04, 0x01, 0x70, 0x69, 0x6e, 0x63, 0x65, 0x72,
+ 0x73, 0x00, 0x54, 0x68, 0x65, 0x72, 0x65, 0x27,
+ 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x69, 0x72,
+ 0x20, 0x6f, 0x66, 0x20, 0x70, 0x69, 0x6e, 0x63,
+ 0x65, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x62, 0x75, 0x63, 0x6b, 0x65,
+ 0x74, 0x2e, 0x00, 0x00, 0x03, 0x71, 0x00, 0x27,
+ 0x00, 0x91, 0x00, 0x72, 0x00, 0x84, 0x00, 0xaf,
+ 0x00, 0x84, 0x00, 0xaf, 0x00, 0x01, 0x01, 0x6d,
+ 0x61, 0x73, 0x6b, 0x00, 0x54, 0x68, 0x69, 0x73,
+ 0x20, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65,
+ 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66,
+ 0x20, 0x63, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x72,
+ 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20,
+ 0x61, 0x72, 0x74, 0x2e, 0x00, 0x00, 0x04, 0x6c,
+ 0x00, 0x73, 0x00, 0x9e, 0x00, 0x91, 0x00, 0x87,
+ 0x00, 0xab, 0x00, 0x87, 0x00, 0xab, 0x00, 0x01,
+ 0x01, 0x54, 0x56, 0x00, 0x4f, 0x6e, 0x65, 0x20,
+ 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x6b, 0x69,
+ 0x6c, 0x6c, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20,
+ 0x74, 0x69, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64,
+ 0x00, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61,
+ 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x00, 0x00, 0x05,
+ 0x78, 0x00, 0x94, 0x00, 0x92, 0x00, 0x9a, 0x00,
+ 0x84, 0x00, 0xaf, 0x00, 0x84, 0x00, 0xaf, 0x00,
+ 0x01, 0x01, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x20,
+ 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x00, 0x49,
+ 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f,
+ 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x20,
+ 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2c, 0x00, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68,
+ 0x61, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e,
+ 0x27, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x74, 0x65,
+ 0x72, 0x00, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x20,
+ 0x61, 0x6e, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x00,
+ 0x00, 0x06, 0xb9, 0x00, 0x98, 0x00, 0xcb, 0x00,
+ 0xa4, 0x00, 0xc1, 0x00, 0xa9, 0x00, 0xc1, 0x00,
+ 0xa9, 0x00, 0x01, 0x01, 0x6e, 0x65, 0x77, 0x73,
+ 0x70, 0x61, 0x70, 0x65, 0x72, 0x00, 0x54, 0x68,
+ 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x73, 0x6f,
+ 0x6d, 0x65, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20,
+ 0x6f, 0x66, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x20, 0x6e, 0x65, 0x77, 0x73, 0x70, 0x61, 0x70,
+ 0x65, 0x72, 0x2e, 0x00, 0x00, 0x07, 0xd2, 0x00,
+ 0x93, 0x00, 0xe4, 0x00, 0xa0, 0x00, 0xdb, 0x00,
+ 0xaa, 0x00, 0xdb, 0x00, 0xaa, 0x00, 0x01, 0x01,
+ 0x68, 0x69, 0x2d, 0x66, 0x69, 0x00, 0x57, 0x68,
+ 0x61, 0x74, 0x20, 0x61, 0x20, 0x62, 0x61, 0x62,
+ 0x79, 0x21, 0x20, 0x49, 0x74, 0x20, 0x63, 0x6f,
+ 0x75, 0x6c, 0x64, 0x20, 0x64, 0x72, 0x69, 0x76,
+ 0x65, 0x00, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x79,
+ 0x20, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f,
+ 0x75, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x73, 0x61,
+ 0x6e, 0x65, 0x21, 0x2e, 0x2e, 0x2e, 0x00, 0x00,
+ 0x08, 0xc0, 0x00, 0xa4, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0xa5, 0x00, 0xc4, 0x00, 0xa5, 0x00, 0xc4,
+ 0x00, 0x02, 0x01, 0x63, 0x6f, 0x75, 0x63, 0x68,
+ 0x00, 0x49, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64,
+ 0x20, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x20, 0x6b,
+ 0x6e, 0x6f, 0x77, 0x20, 0x77, 0x68, 0x65, 0x72,
+ 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6c, 0x61,
+ 0x63, 0x65, 0x00, 0x61, 0x20, 0x70, 0x69, 0x6c,
+ 0x6c, 0x6f, 0x77, 0x2e, 0x00, 0x00, 0x09, 0x00,
+ 0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc7, 0x00, 0x9c,
+ 0x00, 0xbd, 0x00, 0x9c, 0x00, 0xc7, 0x00, 0x03,
+ 0x01, 0x77, 0x61, 0x79, 0x20, 0x6f, 0x75, 0x74,
+ 0x00, 0x01, 0x0a, 0xad, 0x00, 0x25, 0x00, 0x25,
+ 0x01, 0x79, 0x00, 0xdb, 0x00, 0xaa, 0x00, 0xdb,
+ 0x00, 0xaa, 0x00, 0x01, 0x01, 0x70, 0x69, 0x63,
+ 0x74, 0x75, 0x72, 0x65, 0x00, 0x54, 0x68, 0x61,
+ 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73,
+ 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x20,
+ 0x69, 0x6d, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
+ 0x69, 0x76, 0x65, 0x2e, 0x00, 0x00, 0x0b, 0xa1,
+ 0x00, 0xa5, 0x00, 0xac, 0x00, 0xaa, 0x00, 0x98,
+ 0x00, 0xad, 0x00, 0x98, 0x00, 0xad, 0x00, 0x02,
+ 0x00, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x20,
+ 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
+ 0x65, 0x72, 0x00, 0x49, 0x74, 0x20, 0x77, 0x61,
+ 0x73, 0x20, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e,
+ 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x77,
+ 0x73, 0x70, 0x61, 0x70, 0x65, 0x72, 0x20, 0x70,
+ 0x61, 0x67, 0x65, 0x73, 0x2e, 0x00, 0x00, 0x0c,
+ 0x2f, 0x00, 0x4f, 0x00, 0x57, 0x00, 0xaf, 0x00,
+ 0x68, 0x00, 0xb5, 0x00, 0x64, 0x00, 0xb5, 0x00,
+ 0x04, 0x00, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x77,
+ 0x61, 0x72, 0x64, 0x72, 0x6f, 0x62, 0x65, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20, 0x73,
+ 0x65, 0x63, 0x72, 0x65, 0x74, 0x20, 0x70, 0x61,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x21, 0x00, 0x00,
+ 0xad, 0xb3, 0xc6, 0xb3, 0xdf, 0xb3, 0x00, 0x00,
+ 0x01, 0x11, 0x01, 0x72, 0x00, 0x3f, 0x01, 0xc7,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x02, 0x01, 0x64, 0x6f, 0x6f, 0x72, 0x00,
+ 0x01, 0x02, 0x00, 0x00, 0x73, 0x00, 0x2a, 0x00,
+ 0xc7, 0x00, 0x2e, 0x00, 0xc1, 0x00, 0x2e, 0x00,
+ 0xc1, 0x00, 0x04, 0x01, 0x64, 0x6f, 0x6f, 0x72,
+ 0x00, 0x01, 0x03, 0xf2, 0x00, 0x89, 0x00, 0xf6,
+ 0x00, 0x8e, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x00, 0x01, 0x73, 0x77, 0x69,
+ 0x74, 0x63, 0x68, 0x00, 0x01, 0x00, 0x00, 0x08,
+ 0xb4, 0x4c, 0xb4, 0x74, 0xb4, 0x8d, 0xb4, 0xa6,
+ 0xb4, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0xa0, 0x00,
+ 0x78, 0x00, 0xa0, 0x00, 0x04, 0x01, 0x4a, 0x6f,
+ 0x68, 0x6e, 0x20, 0x4e, 0x6f, 0x74, 0x79, 0x00,
+ 0x48, 0x65, 0x27, 0x73, 0x20, 0x6f, 0x62, 0x73,
+ 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x69,
+ 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d,
+ 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x00, 0x00, 0x02,
+ 0xcf, 0x00, 0x6c, 0x00, 0x3f, 0x01, 0xc1, 0x00,
+ 0xc1, 0x00, 0xae, 0x00, 0xc1, 0x00, 0xae, 0x00,
+ 0x02, 0x01, 0x74, 0x6f, 0x6e, 0x73, 0x20, 0x6f,
+ 0x66, 0x20, 0x67, 0x6f, 0x6c, 0x64, 0x00, 0x28,
+ 0x67, 0x75, 0x6c, 0x70, 0x29, 0x00, 0x00, 0x03,
+ 0x06, 0x00, 0x5c, 0x00, 0x24, 0x00, 0x96, 0x00,
+ 0x58, 0x00, 0xad, 0x00, 0x58, 0x00, 0xad, 0x00,
+ 0x04, 0x01, 0x73, 0x61, 0x66, 0x65, 0x00, 0x01,
+ 0x04, 0x72, 0x00, 0x5e, 0x00, 0xb0, 0x00, 0x8d,
+ 0x00, 0x8c, 0x00, 0x9e, 0x00, 0x8c, 0x00, 0x9e,
+ 0x00, 0x01, 0x01, 0x73, 0x61, 0x66, 0x65, 0x00,
+ 0x01, 0x05, 0x0b, 0x01, 0x36, 0x00, 0x1c, 0x01,
+ 0x47, 0x00, 0xc1, 0x00, 0xae, 0x00, 0xc1, 0x00,
+ 0xae, 0x00, 0x02, 0x01, 0x63, 0x61, 0x6d, 0x65,
+ 0x72, 0x61, 0x00, 0x49, 0x74, 0x20, 0x6d, 0x75,
+ 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20,
+ 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x63, 0x75,
+ 0x72, 0x69, 0x74, 0x79, 0x20, 0x73, 0x79, 0x73,
+ 0x74, 0x65, 0x6d, 0x2e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x49, 0xb5, 0x4a, 0xb5, 0x4d, 0xb5, 0x4f, 0xb5,
+ 0x53, 0xb5, 0x55, 0xb5, 0x5a, 0xb5, 0x5d, 0xb5,
+ 0x61, 0xb5, 0x62, 0xb5, 0x63, 0xb5, 0x68, 0xb5,
+ 0x6c, 0xb5, 0x6f, 0xb5, 0x71, 0xb5, 0x75, 0xb5,
+ 0x7a, 0xb5, 0x7c, 0xb5, 0x7f, 0xb5, 0x82, 0xb5,
+ 0x88, 0xb5, 0x8b, 0xb5, 0x8d, 0xb5, 0x8f, 0xb5,
+ 0x93, 0xb5, 0x96, 0xb5, 0x99, 0xb5, 0xa0, 0xb5,
+ 0xa1, 0xb5, 0xa2, 0xb5, 0xaa, 0xb5, 0xac, 0xb5,
+ 0xb0, 0xb5, 0xb6, 0xb5, 0xb8, 0xb5, 0xbd, 0xb5,
+ 0xbe, 0xb5, 0xc3, 0xb5, 0xc4, 0xb5, 0xc6, 0xb5,
+ 0xc8, 0xb5, 0xcb, 0xb5, 0xff, 0x5f, 0x63, 0xff,
+ 0x00, 0xff, 0x5d, 0x00, 0x62, 0xff, 0x00, 0xff,
+ 0x54, 0x55, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
+ 0x65, 0x69, 0x00, 0xff, 0xff, 0xff, 0x00, 0x11,
+ 0x00, 0x00, 0xff, 0x0e, 0x00, 0x12, 0xff, 0x29,
+ 0x00, 0xff, 0x00, 0xff, 0x14, 0x15, 0x2b, 0xff,
+ 0x00, 0x0a, 0x0b, 0x0c, 0xff, 0x25, 0xff, 0x16,
+ 0x00, 0xff, 0x19, 0x27, 0xff, 0x02, 0x03, 0x00,
+ 0x00, 0x00, 0xff, 0x1b, 0x00, 0xff, 0x07, 0xff,
+ 0x0d, 0xff, 0x1f, 0x00, 0x30, 0xff, 0x1a, 0x2c,
+ 0xff, 0x00, 0x00, 0xff, 0x00, 0x13, 0x22, 0x00,
+ 0x26, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0x3e, 0x3f, 0x40, 0x41, 0x00,
+ 0xff, 0x52, 0xff, 0x34, 0x3c, 0x00, 0x00, 0xff,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00,
+ 0xff, 0x00, 0xff, 0x00, 0x00, 0xff, 0x6e, 0x6f,
+ 0xff, 0x22, 0xb6, 0x24, 0xb6, 0x2e, 0xb6, 0x3a,
+ 0xb6, 0x48, 0xb6, 0x56, 0xb6, 0x6a, 0xb6, 0x7a,
+ 0xb6, 0x8c, 0xb6, 0x9a, 0xb6, 0xa2, 0xb6, 0xc0,
+ 0xb6, 0xd2, 0xb6, 0xe0, 0xb6, 0xea, 0xb6, 0xfa,
+ 0xb6, 0x00, 0xb7, 0x02, 0xb7, 0x10, 0xb7, 0x2e,
+ 0xb7, 0x4e, 0xb7, 0x66, 0xb7, 0x80, 0xb7, 0xa0,
+ 0xb7, 0xb2, 0xb7, 0xc0, 0xb7, 0xcc, 0xb7, 0xec,
+ 0xb7, 0xf4, 0xb7, 0x02, 0xb8, 0x22, 0xb8, 0x34,
+ 0xb8, 0x44, 0xb8, 0x5c, 0xb8, 0x6a, 0xb8, 0x82,
+ 0xb8, 0x88, 0xb8, 0x8a, 0xb8, 0x94, 0xb8, 0x96,
+ 0xb8, 0x98, 0xb8, 0x9a, 0xb8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
+ 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xa9, 0x78, 0x00, 0x00, 0xbb, 0x78, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xcd, 0x78, 0xce, 0x78, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xe0, 0x78, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7,
+ 0x78, 0xee, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xf5, 0x78, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x79, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19,
+ 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x79, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x50, 0x79, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x62, 0x79, 0x66, 0x79, 0x00,
+ 0x00, 0x75, 0x79, 0x87, 0x79, 0x96, 0x79, 0xa5,
+ 0x79, 0xb4, 0x79, 0xc3, 0x79, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xd2, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xe4, 0x79, 0xeb, 0x79, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd,
+ 0x79, 0x0f, 0x7a, 0x49, 0x7a, 0x5b, 0x7a, 0x6d,
+ 0x7a, 0x7f, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x7a, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xd0, 0x7a, 0xd7, 0x7a, 0x00, 0x00, 0x00,
+ 0x00, 0xde, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf0, 0x7a, 0x00, 0x00, 0xf7, 0x7a, 0x00,
+ 0x00, 0x09, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
+ 0xb8, 0xf2, 0xb8, 0xfc, 0xb8, 0x08, 0xb9, 0x16,
+ 0xb9, 0x24, 0xb9, 0x38, 0xb9, 0x50, 0xb9, 0x62,
+ 0xb9, 0x70, 0xb9, 0x78, 0xb9, 0x96, 0xb9, 0xa8,
+ 0xb9, 0xb6, 0xb9, 0xc0, 0xb9, 0xd0, 0xb9, 0xd6,
+ 0xb9, 0xd8, 0xb9, 0xe6, 0xb9, 0x04, 0xba, 0x24,
+ 0xba, 0x3c, 0xba, 0x56, 0xba, 0x76, 0xba, 0x88,
+ 0xba, 0x96, 0xba, 0xa2, 0xba, 0xc2, 0xba, 0xca,
+ 0xba, 0xd8, 0xba, 0xf8, 0xba, 0x0a, 0xbb, 0x1a,
+ 0xbb, 0x32, 0xbb, 0x40, 0xbb, 0x58, 0xbb, 0x5e,
+ 0xbb, 0x60, 0xbb, 0x6a, 0xbb, 0x6c, 0xbb, 0x6e,
+ 0xbb, 0x70, 0xbb, 0x00, 0x00, 0xed, 0x3f, 0x07,
+ 0x40, 0x21, 0x40, 0x48, 0x40, 0x4f, 0x40, 0x56,
+ 0x40, 0x60, 0x40, 0x7a, 0x40, 0x94, 0x40, 0x95,
+ 0x41, 0x9c, 0x41, 0xc3, 0x41, 0xca, 0x41, 0xce,
+ 0x41, 0x2c, 0x42, 0x33, 0x42, 0x4d, 0x42, 0x67,
+ 0x42, 0x3a, 0x43, 0x54, 0x43, 0x6e, 0x43, 0x88,
+ 0x43, 0xb5, 0x43, 0x82, 0x44, 0xcb, 0x44, 0xfc,
+ 0x44, 0x32, 0x45, 0x39, 0x45, 0x62, 0x46, 0xaf,
+ 0x46, 0x05, 0x47, 0x94, 0x47, 0xbc, 0x47, 0xdb,
+ 0x47, 0x36, 0x48, 0x3a, 0x48, 0x44, 0x48, 0x71,
+ 0x48, 0x7e, 0x48, 0x85, 0x48, 0x8c, 0x48, 0x93,
+ 0x48, 0xd4, 0x48, 0xdb, 0x48, 0xe2, 0x48, 0xe6,
+ 0x48, 0xea, 0x48, 0x11, 0x49, 0x18, 0x49, 0x64,
+ 0x4a, 0x8c, 0x4a, 0xed, 0x4a, 0xf4, 0x4a, 0x23,
+ 0x4b, 0x27, 0x4b, 0x2e, 0x4b, 0x35, 0x4b, 0xf5,
+ 0x4b, 0x18, 0x4c, 0x1c, 0x4c, 0x29, 0x4c, 0x30,
+ 0x4c, 0x37, 0x4c, 0x3e, 0x4c, 0x70, 0x4c, 0xa5,
+ 0x4c, 0xac, 0x4c, 0xf1, 0x4c, 0x56, 0x4d, 0x7d,
+ 0x4d, 0x81, 0x4d, 0x85, 0x4d, 0x89, 0x4d, 0x90,
+ 0x4d, 0x94, 0x4d, 0x47, 0x4e, 0x61, 0x4e, 0x85,
+ 0x4e, 0x9f, 0x4e, 0xb9, 0x4e, 0xe1, 0x4e, 0xe5,
+ 0x4e, 0x13, 0x4f, 0x14, 0x4f, 0x25, 0x4f, 0x32,
+ 0x4f, 0x0d, 0x50, 0x5f, 0x50, 0x66, 0x50, 0x80,
+ 0x50, 0x9a, 0x50, 0xf6, 0x50, 0xfd, 0x50, 0x04,
+ 0x51, 0xc8, 0x51, 0xcf, 0x51, 0xe9, 0x51, 0xf0,
+ 0x51, 0x17, 0x52, 0x2c, 0x52, 0x33, 0x52, 0x37,
+ 0x52, 0x20, 0x53, 0x3a, 0x53, 0x41, 0x53, 0x48,
+ 0x53, 0xa1, 0x53, 0x03, 0x54, 0x0a, 0x54, 0x24,
+ 0x54, 0x3e, 0x54, 0x58, 0x54, 0xb3, 0x54, 0x02,
+ 0x55, 0x00, 0x00, 0x47, 0x55, 0x61, 0x55, 0xa1,
+ 0x55, 0xa8, 0x55, 0x34, 0x56, 0x3b, 0x56, 0x63,
+ 0x56, 0x74, 0x56, 0x8e, 0x56, 0x95, 0x56, 0x9c,
+ 0x56, 0xb3, 0x56, 0xb7, 0x56, 0xd6, 0x56, 0xdd,
+ 0x56, 0xe4, 0x56, 0xeb, 0x56, 0xf2, 0x56, 0xf6,
+ 0x56, 0x21, 0x57, 0x28, 0x57, 0x4f, 0x57, 0x56,
+ 0x57, 0x93, 0x57, 0xfa, 0x57, 0x01, 0x58, 0x05,
+ 0x58, 0x32, 0x58, 0x3f, 0x58, 0x46, 0x58, 0x4d,
+ 0x58, 0x54, 0x58, 0x6e, 0x58, 0x88, 0x58, 0xa2,
+ 0x58, 0xb7, 0x58, 0xdf, 0x58, 0x03, 0x59, 0x0a,
+ 0x59, 0x24, 0x59, 0x3e, 0x59, 0x78, 0x59, 0x7f,
+ 0x59, 0x86, 0x59, 0x8d, 0x59, 0x94, 0x59, 0x8b,
+ 0x5a, 0x3a, 0x5b, 0x44, 0x5b, 0x59, 0x5b, 0xe1,
+ 0x5b, 0xee, 0x5b, 0x0d, 0x5c, 0x72, 0x5c, 0x79,
+ 0x5c, 0x80, 0x5c, 0x84, 0x5c, 0xdb, 0x5c, 0xe2,
+ 0x5c, 0xe9, 0x5c, 0xf0, 0x5c, 0x1d, 0x5d, 0x24,
+ 0x5d, 0x88, 0x5d, 0x4d, 0x5e, 0x73, 0x5f, 0x9a,
+ 0x5f, 0xa1, 0x5f, 0xa8, 0x5f, 0xaf, 0x5f, 0xb6,
+ 0x5f, 0xba, 0x5f, 0xe5, 0x5f, 0xec, 0x5f, 0xf3,
+ 0x5f, 0x3a, 0x60, 0x3e, 0x60, 0x74, 0x60, 0x78,
+ 0x60, 0x7f, 0x60, 0x83, 0x60, 0x2b, 0x61, 0x76,
+ 0x61, 0xe9, 0x61, 0x05, 0x62, 0x17, 0x62, 0x29,
+ 0x62, 0xc1, 0x62, 0xd0, 0x62, 0x4a, 0x63, 0x51,
+ 0x63, 0x7f, 0x63, 0x99, 0x63, 0xa0, 0x63, 0xa7,
+ 0x63, 0xae, 0x63, 0xb5, 0x63, 0xbc, 0x63, 0xdc,
+ 0x63, 0xe3, 0x63, 0xea, 0x63, 0x11, 0x64, 0x6e,
+ 0x64, 0x75, 0x64, 0x79, 0x64, 0x80, 0x64, 0xc4,
+ 0x64, 0x07, 0x65, 0x19, 0x65, 0x41, 0x65, 0x5b,
+ 0x65, 0x92, 0x65, 0xc3, 0x65, 0x35, 0x66, 0x3c,
+ 0x66, 0x63, 0x66, 0x6a, 0x66, 0x71, 0x66, 0x78,
+ 0x66, 0x7c, 0x66, 0xa9, 0x66, 0xb5, 0x66, 0xe2,
+ 0x66, 0x0f, 0x67, 0x16, 0x67, 0x1d, 0x67, 0x72,
+ 0x67, 0x8c, 0x67, 0xa6, 0x67, 0xfa, 0x67, 0xfe,
+ 0x67, 0x05, 0x68, 0x7a, 0x68, 0x11, 0x69, 0x18,
+ 0x69, 0x54, 0x69, 0x5b, 0x69, 0x62, 0x69, 0xb8,
+ 0x69, 0x1b, 0x6a, 0x73, 0x6a, 0xcb, 0x6a, 0x2e,
+ 0x6b, 0xa6, 0x6b, 0xad, 0x6b, 0xda, 0x6b, 0xe1,
+ 0x6b, 0x1c, 0x6c, 0x20, 0x6c, 0x24, 0x6c, 0x2b,
+ 0x6c, 0x45, 0x6c, 0x7c, 0x6c, 0x83, 0x6c, 0x9d,
+ 0x6c, 0xc4, 0x6c, 0x20, 0x6f, 0x32, 0x6f, 0x4d,
+ 0x6f, 0x75, 0x6f, 0x96, 0x70, 0xbb, 0x70, 0xc8,
+ 0x70, 0xef, 0x70, 0xf9, 0x70, 0x2c, 0x71, 0xae,
+ 0x71, 0xeb, 0x71, 0x18, 0x72, 0x1c, 0x72, 0x44,
+ 0x72, 0x4e, 0x72, 0x55, 0x72, 0x91, 0x72, 0xbe,
+ 0x72, 0xc2, 0x72, 0x05, 0x73, 0x09, 0x73, 0x28,
+ 0x73, 0x2f, 0x73, 0x36, 0x73, 0x81, 0x73, 0x9c,
+ 0x73, 0xa3, 0x73, 0x01, 0x74, 0x08, 0x74, 0x6f,
+ 0x74, 0x76, 0x74, 0xb3, 0x74, 0xcd, 0x74, 0xd1,
+ 0x74, 0xf9, 0x74, 0x13, 0x75, 0xd5, 0x77, 0x02,
+ 0x78, 0x00, 0x00, 0x3d, 0x78, 0x4a, 0x78, 0x51,
+ 0x78, 0x58, 0x78, 0x5f, 0x78, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfa, 0x98,
+ 0x04, 0x10, 0x99, 0x29, 0x21, 0x99, 0x25, 0xca,
+ 0x9a, 0xff, 0x66, 0x9c, 0x33, 0x6d, 0x9c, 0x48,
+ 0x79, 0x9c, 0xde, 0xbb, 0xdf, 0xbb, 0xfb, 0xbb,
+ 0x29, 0xbc, 0x33, 0xbc, 0x34, 0xbc, 0x3e, 0xbc,
+ 0x5a, 0xbc, 0x76, 0xbc, 0x77, 0xbc, 0x8a, 0xbc,
+ 0x94, 0xbc, 0xb9, 0xbc, 0xcc, 0xbc, 0xd6, 0xbc,
+ 0x04, 0xbd, 0x05, 0xbd, 0x06, 0xbd, 0x19, 0xbd,
+ 0x2c, 0xbd, 0x36, 0xbd, 0x49, 0xbd, 0x4a, 0xbd,
+ 0x8a, 0xbd, 0x8b, 0xbd, 0xb9, 0xbd, 0xc3, 0xbd,
+ 0xe8, 0xbd, 0xe9, 0xbd, 0xea, 0xbd, 0xeb, 0xbd,
+ 0xf5, 0xbd, 0x1a, 0xbe, 0x51, 0xbe, 0x76, 0xbe,
+ 0xa4, 0xbe, 0xa5, 0xbe, 0xa6, 0xbe, 0xb0, 0xbe,
+ 0xb1, 0xbe, 0xb2, 0xbe, 0xb3, 0xbe, 0x00, 0x00,
+ 0x00, 0x00, 0x4f, 0x04, 0x02, 0x00, 0x01, 0x5f,
+ 0x00, 0x26, 0x7b, 0x51, 0x03, 0x01, 0x10, 0x01,
+ 0x64, 0x00, 0x89, 0x7b, 0x4f, 0x03, 0x02, 0x19,
+ 0x01, 0x5f, 0x00, 0xf6, 0x7b, 0x00, 0x5b, 0x04,
+ 0x01, 0xd1, 0x00, 0x9a, 0x00, 0xfd, 0x7b, 0x5b,
+ 0x01, 0x04, 0xf0, 0x00, 0xa3, 0x00, 0xc9, 0x7c,
+ 0x57, 0x01, 0x04, 0xf0, 0x00, 0xa3, 0x00, 0xd0,
+ 0x7c, 0x57, 0x04, 0x04, 0xd1, 0x00, 0x9a, 0x00,
+ 0xd7, 0x7c, 0x55, 0x05, 0x01, 0x73, 0x00, 0xc2,
+ 0x00, 0xde, 0x7c, 0x00, 0x50, 0x02, 0x04, 0xc7,
+ 0x00, 0xb3, 0x00, 0xe5, 0x7c, 0x00, 0x00, 0x4d,
+ 0x07, 0x02, 0x23, 0x01, 0xb9, 0x00, 0x1a, 0x7d,
+ 0x00, 0x4e, 0x01, 0x02, 0x52, 0x00, 0xb8, 0x00,
+ 0x02, 0x7e, 0x53, 0x01, 0x02, 0x49, 0x00, 0xbc,
+ 0x00, 0x4f, 0x7e, 0x59, 0x07, 0x01, 0xce, 0x00,
+ 0xc2, 0x00, 0x23, 0x7f, 0x00, 0x5c, 0x05, 0x04,
+ 0x6e, 0x00, 0x98, 0x00, 0xbd, 0x7f, 0x56, 0x01,
+ 0x01, 0xc0, 0x00, 0x98, 0x00, 0x47, 0x80, 0x5a,
+ 0x06, 0x02, 0x04, 0x01, 0xc2, 0x00, 0x84, 0x80,
+ 0x00, 0x00, 0x4b, 0x02, 0x01, 0x7a, 0x00, 0x97,
+ 0x00, 0x8b, 0x80, 0x52, 0x02, 0x01, 0x8b, 0x00,
+ 0x9c, 0x00, 0xc3, 0x80, 0x00, 0x32, 0x01, 0x02,
+ 0xbd, 0x00, 0x9f, 0x00, 0x17, 0x81, 0x00, 0x0e,
+ 0x03, 0x02, 0xcb, 0x00, 0xab, 0x00, 0x74, 0x81,
+ 0x22, 0x02, 0x02, 0x94, 0x00, 0xbd, 0x00, 0xc2,
+ 0x81, 0x2b, 0x06, 0x01, 0x5a, 0x00, 0xbc, 0x00,
+ 0x3d, 0x82, 0x0d, 0x03, 0x02, 0xcb, 0x00, 0xab,
+ 0x00, 0x0b, 0x83, 0x00, 0x1b, 0x06, 0x04, 0x67,
+ 0x00, 0xc0, 0x00, 0x12, 0x83, 0x2b, 0x04, 0x01,
+ 0xc5, 0x00, 0xb7, 0x00, 0x98, 0x83, 0x00, 0x20,
+ 0x01, 0x02, 0x6e, 0x00, 0xb9, 0x00, 0x9f, 0x83,
+ 0x00, 0x09, 0x03, 0x02, 0x2c, 0x00, 0xa8, 0x00,
+ 0xc7, 0x84, 0x2c, 0x04, 0x03, 0xec, 0x00, 0xb3,
+ 0x00, 0x38, 0x85, 0x08, 0x03, 0x02, 0x2c, 0x00,
+ 0xa8, 0x00, 0xd6, 0x85, 0x0f, 0x03, 0x02, 0x2c,
+ 0x00, 0xa8, 0x00, 0xdd, 0x85, 0x2e, 0x04, 0x03,
+ 0xec, 0x00, 0xb3, 0x00, 0xe4, 0x85, 0x00, 0x00,
+ 0x00, 0x19, 0x07, 0x04, 0xa2, 0x00, 0xc2, 0x00,
+ 0xeb, 0x85, 0x15, 0x07, 0x04, 0xa2, 0x00, 0xc2,
+ 0x00, 0x2c, 0x86, 0x00, 0x13, 0x05, 0x01, 0x8b,
+ 0x00, 0xa5, 0x00, 0x3d, 0x86, 0x0c, 0x09, 0x02,
+ 0x0e, 0x01, 0xb6, 0x00, 0x65, 0x86, 0x00, 0x05,
+ 0x03, 0x04, 0x57, 0x00, 0xb9, 0x00, 0xa9, 0x86,
+ 0x00, 0x07, 0x04, 0x04, 0x30, 0x00, 0xbe, 0x00,
+ 0x82, 0x8b, 0x24, 0x0a, 0x02, 0xcf, 0x00, 0xc2,
+ 0x00, 0xfc, 0x8b, 0x00, 0x00, 0x0a, 0x01, 0x04,
+ 0x3d, 0x00, 0xbb, 0x00, 0xc9, 0x88, 0x0b, 0x01,
+ 0x04, 0x3d, 0x00, 0xbb, 0x00, 0x18, 0x89, 0x0a,
+ 0x02, 0x04, 0x02, 0x01, 0xb5, 0x00, 0x2d, 0x89,
+ 0x0b, 0x02, 0x04, 0x02, 0x01, 0xb5, 0x00, 0xb7,
+ 0x89, 0x17, 0x02, 0x04, 0x02, 0x01, 0xb5, 0x00,
+ 0xcc, 0x89, 0x1a, 0x09, 0x03, 0x9e, 0x00, 0xc6,
+ 0x00, 0x22, 0x8a, 0x33, 0x02, 0x04, 0x02, 0x01,
+ 0xb5, 0x00, 0x6f, 0x8a, 0x00, 0x00, 0x23, 0x05,
+ 0x04, 0x0c, 0x01, 0x91, 0x00, 0x6e, 0x8c, 0x2e,
+ 0x02, 0x04, 0xcd, 0x00, 0x99, 0x00, 0xc8, 0x8c,
+ 0x2c, 0x02, 0x04, 0xea, 0x00, 0x98, 0x00, 0x42,
+ 0x8d, 0x0d, 0x02, 0x04, 0xea, 0x00, 0x98, 0x00,
+ 0x49, 0x8d, 0x0e, 0x02, 0x04, 0xea, 0x00, 0x98,
+ 0x00, 0x50, 0x8d, 0x00, 0x30, 0x05, 0x01, 0x9f,
+ 0x00, 0xa6, 0x00, 0x57, 0x8d, 0x00, 0x02, 0x02,
+ 0x01, 0xe6, 0x00, 0xa4, 0x00, 0x1d, 0x8f, 0x02,
+ 0x03, 0x01, 0xe6, 0x00, 0xa4, 0x00, 0x1d, 0x8f,
+ 0x2d, 0x04, 0x04, 0xec, 0x00, 0x8e, 0x00, 0xc8,
+ 0x8f, 0x2f, 0x0c, 0x04, 0xec, 0x00, 0x8e, 0x00,
+ 0x54, 0x90, 0x00, 0x00, 0x00, 0x00, 0x49, 0x02,
+ 0x02, 0x2c, 0x01, 0xb2, 0x00, 0xbc, 0x90, 0x00,
+ 0x34, 0x01, 0x01, 0x3d, 0x00, 0xaf, 0x00, 0xf5,
+ 0x90, 0x43, 0x01, 0x01, 0x3d, 0x00, 0xaf, 0x00,
+ 0xfc, 0x90, 0x47, 0x01, 0x01, 0x3d, 0x00, 0xaf,
+ 0x00, 0xcb, 0x91, 0x3d, 0x01, 0x01, 0x3d, 0x00,
+ 0xaf, 0x00, 0x09, 0x92, 0x00, 0x38, 0x08, 0x01,
+ 0xdd, 0x00, 0xa0, 0x00, 0x47, 0x92, 0x40, 0x08,
+ 0x01, 0xdd, 0x00, 0xa0, 0x00, 0x4e, 0x92, 0x3f,
+ 0x06, 0x01, 0x8d, 0x00, 0x9f, 0x00, 0x3d, 0x93,
+ 0x37, 0x03, 0x04, 0x3f, 0x00, 0xa8, 0x00, 0xaf,
+ 0x93, 0x44, 0x0c, 0x01, 0xc0, 0x00, 0xa0, 0x00,
+ 0xd5, 0x93, 0x45, 0x02, 0x04, 0x51, 0x00, 0xa0,
+ 0x00, 0x49, 0x94, 0x00, 0x3c, 0x02, 0x02, 0x14,
+ 0x01, 0x9f, 0x00, 0x72, 0x94, 0x3e, 0x02, 0x02,
+ 0x14, 0x01, 0x9f, 0x00, 0x9b, 0x94, 0x3a, 0x07,
+ 0x04, 0x44, 0x00, 0x81, 0x00, 0xd4, 0x94, 0x3b,
+ 0x02, 0x02, 0x14, 0x01, 0x9f, 0x00, 0x1b, 0x95,
+ 0x00, 0x39, 0x05, 0x01, 0x91, 0x00, 0xc5, 0x00,
+ 0x37, 0x95, 0x36, 0x05, 0x01, 0x81, 0x00, 0xad,
+ 0x00, 0xc8, 0x95, 0x35, 0x04, 0x01, 0x74, 0x00,
+ 0xbf, 0x00, 0xeb, 0x95, 0x43, 0x04, 0x01, 0x74,
+ 0x00, 0xbf, 0x00, 0x2f, 0x96, 0x34, 0x04, 0x01,
+ 0x74, 0x00, 0xbf, 0x00, 0x6c, 0x96, 0x00, 0x00,
+ 0x00, 0x4a, 0x01, 0x01, 0x3b, 0x00, 0xa3, 0x00,
+ 0x73, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57,
+ 0x6f, 0x77, 0x2c, 0x20, 0x6e, 0x6f, 0x77, 0x20,
+ 0x69, 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73,
+ 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x69, 0x74,
+ 0x20, 0x63, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x74,
+ 0x72, 0x61, 0x69, 0x67, 0x68, 0x74, 0x00, 0x66,
+ 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x21, 0x00, 0x00,
+ 0x54, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x72, 0x69, 0x62, 0x62, 0x6f, 0x6e,
+ 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x72, 0x61, 0x6b, 0x65,
+ 0x20, 0x6e, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x65,
+ 0x64, 0x00, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70,
+ 0x61, 0x63, 0x65, 0x20, 0x62, 0x65, 0x74, 0x77,
+ 0x65, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x74, 0x65, 0x65, 0x74, 0x68, 0x21, 0x00, 0x00,
+ 0x57, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x68, 0x65, 0x6c, 0x70, 0x20, 0x6f, 0x66,
+ 0x20, 0x73, 0x75, 0x70, 0x65, 0x72, 0x20, 0x67,
+ 0x6c, 0x75, 0x65, 0x20, 0x49, 0x20, 0x6d, 0x61,
+ 0x64, 0x65, 0x2e, 0x2e, 0x2e, 0x00, 0x73, 0x6f,
+ 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x55, 0x73, 0x69, 0x6e,
+ 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x75,
+ 0x70, 0x65, 0x72, 0x20, 0x67, 0x6c, 0x75, 0x65,
+ 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x67,
+ 0x61, 0x69, 0x6e, 0x2e, 0x2e, 0x2e, 0x00, 0x00,
+ 0x54, 0x68, 0x65, 0x20, 0x77, 0x68, 0x69, 0x73,
+ 0x6b, 0x79, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74,
+ 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x6f,
+ 0x75, 0x67, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x75,
+ 0x73, 0x65, 0x20, 0x61, 0x73, 0x00, 0x66, 0x75,
+ 0x65, 0x6c, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20,
+ 0x49, 0x20, 0x77, 0x6f, 0x6e, 0x64, 0x65, 0x72,
+ 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, 0x77,
+ 0x00, 0x63, 0x61, 0x6e, 0x20, 0x74, 0x61, 0x6b,
+ 0x65, 0x20, 0x69, 0x74, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x4f, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x67,
+ 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x73, 0x75, 0x70, 0x65, 0x72, 0x2d, 0x67, 0x6c,
+ 0x75, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x65, 0x73,
+ 0x20, 0x69, 0x6e, 0x20, 0x68, 0x61, 0x6e, 0x64,
+ 0x79, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x54, 0x68,
+ 0x65, 0x20, 0x73, 0x6f, 0x6f, 0x74, 0x20, 0x67,
+ 0x69, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f, 0x65,
+ 0x20, 0x61, 0x20, 0x62, 0x72, 0x61, 0x6e, 0x64,
+ 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6c, 0x6f, 0x6f,
+ 0x6b, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x4e, 0x6f,
+ 0x77, 0x20, 0x49, 0x27, 0x6d, 0x20, 0x72, 0x65,
+ 0x61, 0x64, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x63,
+ 0x6f, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x6c, 0x61, 0x6b, 0x65, 0x21,
+ 0x00, 0x00, 0x49, 0x74, 0x20, 0x6d, 0x61, 0x6b,
+ 0x65, 0x73, 0x20, 0x6d, 0x65, 0x20, 0x66, 0x65,
+ 0x65, 0x6c, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20,
+ 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x00,
+ 0x77, 0x61, 0x6e, 0x6e, 0x61, 0x2d, 0x62, 0x65,
+ 0x20, 0x63, 0x6c, 0x69, 0x66, 0x66, 0x68, 0x61,
+ 0x6e, 0x67, 0x65, 0x72, 0x2e, 0x00, 0x00, 0x49,
+ 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x6e, 0x27,
+ 0x74, 0x20, 0x69, 0x6d, 0x70, 0x72, 0x65, 0x73,
+ 0x73, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65,
+ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x75,
+ 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x64, 0x79,
+ 0x2e, 0x00, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x65,
+ 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x2e, 0x00, 0x00,
+ 0x47, 0x72, 0x65, 0x61, 0x74, 0x20, 0x69, 0x64,
+ 0x65, 0x61, 0x21, 0x20, 0x42, 0x75, 0x74, 0x2c,
+ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x73, 0x65, 0x65,
+ 0x2c, 0x20, 0x65, 0x63, 0x6f, 0x6d, 0x61, 0x6e,
+ 0x69, 0x61, 0x63, 0x73, 0x20, 0x6d, 0x69, 0x67,
+ 0x68, 0x74, 0x00, 0x62, 0x65, 0x20, 0x77, 0x61,
+ 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x2e,
+ 0x2e, 0x00, 0x00, 0x49, 0x74, 0x20, 0x77, 0x6f,
+ 0x6e, 0x27, 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b,
+ 0x20, 0x61, 0x6e, 0x79, 0x20, 0x62, 0x65, 0x74,
+ 0x74, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x61,
+ 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
+ 0x2e, 0x00, 0x00, 0x54, 0x68, 0x65, 0x20, 0x63,
+ 0x61, 0x6b, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74,
+ 0x6f, 0x6f, 0x20, 0x62, 0x69, 0x67, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e,
+ 0x00, 0x00, 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27,
+ 0x74, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74,
+ 0x6f, 0x20, 0x77, 0x61, 0x73, 0x74, 0x65, 0x20,
+ 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e,
+ 0x64, 0x79, 0x2e, 0x00, 0x00, 0x54, 0x68, 0x65,
+ 0x20, 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x20,
+ 0x69, 0x73, 0x20, 0x62, 0x65, 0x61, 0x75, 0x74,
+ 0x69, 0x66, 0x75, 0x6c, 0x20, 0x65, 0x6e, 0x6f,
+ 0x75, 0x67, 0x68, 0x20, 0x77, 0x69, 0x74, 0x68,
+ 0x6f, 0x75, 0x74, 0x00, 0x61, 0x6e, 0x79, 0x20,
+ 0x66, 0x61, 0x6e, 0x63, 0x79, 0x20, 0x65, 0x78,
+ 0x74, 0x72, 0x61, 0x73, 0x2e, 0x00, 0x00, 0x47,
+ 0x6f, 0x6f, 0x64, 0x20, 0x69, 0x64, 0x65, 0x61,
+ 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x49, 0x20,
+ 0x6e, 0x65, 0x65, 0x64, 0x20, 0x73, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x73,
+ 0x6d, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x00, 0x74,
+ 0x68, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73,
+ 0x20, 0x72, 0x6f, 0x70, 0x65, 0x2e, 0x00, 0x00,
+ 0x49, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20,
+ 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x68, 0x69,
+ 0x73, 0x20, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65,
+ 0x2e, 0x20, 0x41, 0x67, 0x61, 0x69, 0x6e, 0x2e,
+ 0x00, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x6e,
+ 0x6f, 0x74, 0x20, 0x44, 0x4f, 0x4f, 0x4d, 0x2e,
+ 0x20, 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20,
+ 0x68, 0x61, 0x72, 0x6d, 0x6c, 0x65, 0x73, 0x73,
+ 0x20, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
+ 0x20, 0x61, 0x64, 0x76, 0x65, 0x6e, 0x74, 0x75,
+ 0x72, 0x65, 0x00, 0x66, 0x6f, 0x72, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65,
+ 0x20, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x20,
+ 0x28, 0x77, 0x65, 0x20, 0x77, 0x61, 0x6e, 0x74,
+ 0x20, 0x44, 0x4f, 0x4f, 0x4d, 0x21, 0x20, 0x77,
+ 0x65, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x00, 0x44,
+ 0x4f, 0x4f, 0x4d, 0x21, 0x29, 0x2e, 0x00, 0x00,
+ 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20,
+ 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20,
+ 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69,
+ 0x73, 0x20, 0x6e, 0x75, 0x74, 0x2e, 0x00, 0x00,
+ 0x4c, 0x65, 0x74, 0x27, 0x73, 0x20, 0x6d, 0x61,
+ 0x6b, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x63, 0x6f, 0x72, 0x6b, 0x20, 0x6c, 0x61, 0x72,
+ 0x67, 0x65, 0x72, 0x2e, 0x00, 0x00, 0x4f, 0x6e,
+ 0x63, 0x65, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x75, 0x70,
+ 0x65, 0x72, 0x20, 0x67, 0x6c, 0x75, 0x65, 0x20,
+ 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x20, 0x69, 0x6e,
+ 0x20, 0x68, 0x61, 0x6e, 0x64, 0x79, 0x2e, 0x00,
+ 0x00, 0x54, 0x68, 0x65, 0x20, 0x62, 0x61, 0x74,
+ 0x74, 0x65, 0x72, 0x69, 0x65, 0x73, 0x20, 0x66,
+ 0x69, 0x74, 0x21, 0x00, 0x00, 0x49, 0x20, 0x74,
+ 0x69, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x72, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x6f, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x70, 0x69, 0x6e, 0x2e,
+ 0x00, 0x00, 0x4c, 0x65, 0x74, 0x27, 0x73, 0x20,
+ 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x20,
+ 0x73, 0x70, 0x69, 0x63, 0x79, 0x2e, 0x00, 0x00,
+ 0x12, 0x16, 0x17, 0xb4, 0xbe, 0x15, 0x18, 0x19,
+ 0xed, 0xbe, 0x01, 0x1c, 0x1f, 0x35, 0xbf, 0x11,
+ 0x1c, 0x1e, 0x35, 0xbf, 0x1f, 0x11, 0x20, 0x69,
+ 0xbf, 0x1e, 0x01, 0x20, 0x69, 0xbf, 0x0d, 0x10,
+ 0x0e, 0x8d, 0xbf, 0x08, 0x0f, 0x09, 0xe6, 0xbf,
+ 0x14, 0x21, 0x22, 0x13, 0xc0, 0x27, 0x28, 0x29,
+ 0x43, 0xc0, 0x26, 0x2a, 0x2b, 0x67, 0xc0, 0x12,
+ 0x13, 0x00, 0x9c, 0xc0, 0x01, 0x30, 0x00, 0xc8,
+ 0xc0, 0x10, 0x30, 0x00, 0xdd, 0xc0, 0x12, 0x14,
+ 0x00, 0x18, 0xc1, 0x12, 0x22, 0x00, 0x18, 0xc1,
+ 0x12, 0x1a, 0x00, 0x18, 0xc1, 0x12, 0x1c, 0x00,
+ 0x18, 0xc1, 0x12, 0x31, 0x00, 0x18, 0xc1, 0x12,
+ 0x13, 0x00, 0x40, 0xc1, 0x13, 0x30, 0x00, 0x67,
+ 0xc1, 0x18, 0x0a, 0x00, 0x8a, 0xc1, 0x18, 0x0b,
+ 0x00, 0x8a, 0xc1, 0x15, 0x26, 0x00, 0xc4, 0xc1,
+ 0x2d, 0x30, 0x00, 0xfd, 0xc1, 0x2c, 0x30, 0x00,
+ 0x1f, 0xc2, 0x2e, 0x30, 0x00, 0x1f, 0xc2, 0x31,
+ 0x1a, 0x00, 0x85, 0xc2, 0x31, 0x30, 0x00, 0x1f,
+ 0xc2, 0x37, 0x3b, 0x3c, 0xa5, 0xc2, 0x41, 0x38,
+ 0x40, 0xc3, 0xc2, 0x42, 0x34, 0x43, 0xee, 0xc2,
+ 0x54, 0x58, 0x59, 0x02, 0xc3, 0x57, 0x5a, 0x5b,
+ 0x1f, 0xc3, 0x00, 0x00, 0x00, 0x55, 0x73, 0x69,
+ 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65,
+ 0x20, 0x74, 0x77, 0x6f, 0x20, 0x6f, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x67,
+ 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x6f,
+ 0x6e, 0x27, 0x74, 0x00, 0x61, 0x63, 0x63, 0x6f,
+ 0x6d, 0x70, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x61,
+ 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 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,
+ 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x5e, 0xc5, 0x7b, 0xc5, 0x9a, 0xc5, 0xc3,
+ 0xc5, 0xcf, 0xc5, 0xfd, 0xc5, 0x2c, 0xc6, 0x3f,
+ 0xc6, 0x62, 0xc6, 0x93, 0xc6, 0xb9, 0xc6, 0xda,
+ 0xc6, 0x0a, 0xc7, 0x42, 0xc7, 0x75, 0xc7, 0x96,
+ 0xc7, 0xcb, 0xc7, 0xf4, 0xc7, 0x60, 0xc8, 0xa0,
+ 0xc8, 0xd3, 0xc8, 0x21, 0xc9, 0x65, 0xc9, 0xa2,
+ 0xc9, 0xf2, 0xc9, 0x09, 0xca, 0x22, 0xca, 0x6b,
+ 0xca, 0xe7, 0xca, 0x2d, 0xcb, 0x61, 0xcb, 0x96,
+ 0xcb, 0xba, 0xcb, 0xf2, 0xcb, 0x5d, 0xcc, 0x79,
+ 0xcc, 0xdd, 0xcc, 0x0f, 0xcd, 0x25, 0xcd, 0x54,
+ 0xcd, 0x95, 0xcd, 0xc8, 0xcd, 0xfe, 0xcd, 0x33,
+ 0xce, 0x75, 0xce, 0xa6, 0xce, 0xe3, 0xce, 0x4f,
+ 0xcf, 0x6a, 0xcf, 0x9d, 0xcf, 0xf8, 0xcf, 0x05,
+ 0xd0, 0x32, 0xd0, 0x5c, 0xd0, 0x7b, 0xd0, 0xb1,
+ 0xd0, 0xe7, 0xd0, 0x30, 0xd1, 0x4e, 0xd1, 0x73,
+ 0xd1, 0x9d, 0xd1, 0xf4, 0xd1, 0x41, 0xd2, 0x6f,
+ 0xd2, 0xa7, 0xd2, 0xcb, 0xd2, 0xf6, 0xd2, 0x46,
+ 0xd3, 0x8a, 0xd3, 0xb3, 0xd3, 0xfb, 0xd3, 0x16,
+ 0xd4, 0x49, 0xd4, 0x7b, 0xd4, 0xa4, 0xd4, 0xca,
+ 0xd4, 0xeb, 0xd4, 0x1f, 0xd5, 0x43, 0xd5, 0x7f,
+ 0xd5, 0xaa, 0xd5, 0xc6, 0xd5, 0x42, 0xd6, 0xb7,
+ 0xd6, 0x0a, 0xd7, 0x1d, 0xd7, 0x67, 0xd7, 0x92,
+ 0xd7, 0xae, 0xd7, 0xe6, 0xd7, 0x35, 0xd8, 0x5e,
+ 0xd8, 0x01, 0x00, 0x66, 0x65, 0x61, 0x74, 0x68,
+ 0x65, 0x72, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x6b, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20,
+ 0x61, 0x73, 0x73, 0x21, 0x00, 0x00, 0x02, 0x00,
+ 0x73, 0x68, 0x6f, 0x74, 0x67, 0x75, 0x6e, 0x00,
+ 0x4c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x69, 0x6d,
+ 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x76, 0x65,
+ 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x03, 0x00, 0x74,
+ 0x6f, 0x6f, 0x6c, 0x62, 0x6f, 0x78, 0x00, 0x44,
+ 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x73,
+ 0x65, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x62,
+ 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64,
+ 0x21, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x04, 0x00,
+ 0x74, 0x6f, 0x6f, 0x6c, 0x62, 0x6f, 0x78, 0x00,
+ 0x00, 0x00, 0x05, 0x00, 0x73, 0x70, 0x61, 0x6e,
+ 0x6e, 0x65, 0x72, 0x00, 0x54, 0x68, 0x65, 0x73,
+ 0x65, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73,
+ 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20,
+ 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x20,
+ 0x68, 0x61, 0x6e, 0x64, 0x79, 0x2e, 0x00, 0x00,
+ 0x06, 0x00, 0x63, 0x6f, 0x6d, 0x62, 0x00, 0x49,
+ 0x27, 0x76, 0x65, 0x20, 0x68, 0x65, 0x61, 0x72,
+ 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73,
+ 0x6f, 0x6d, 0x65, 0x20, 0x70, 0x65, 0x6f, 0x70,
+ 0x6c, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74,
+ 0x68, 0x65, 0x73, 0x65, 0x2e, 0x00, 0x00, 0x07,
+ 0x01, 0x66, 0x61, 0x6e, 0x00, 0x52, 0x65, 0x66,
+ 0x72, 0x65, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e,
+ 0x00, 0x00, 0x08, 0x00, 0x62, 0x72, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x20, 0x70, 0x61, 0x64, 0x64, 0x6c,
+ 0x65, 0x00, 0x54, 0x6f, 0x6f, 0x20, 0x73, 0x68,
+ 0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x75,
+ 0x73, 0x65, 0x2e, 0x00, 0x00, 0x09, 0x00, 0x70,
+ 0x61, 0x64, 0x64, 0x6c, 0x65, 0x00, 0x54, 0x68,
+ 0x65, 0x20, 0x67, 0x6c, 0x75, 0x65, 0x20, 0x6b,
+ 0x65, 0x65, 0x70, 0x73, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x00,
+ 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x68,
+ 0x61, 0x72, 0x64, 0x2e, 0x00, 0x00, 0x0a, 0x00,
+ 0x66, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x00, 0x49,
+ 0x74, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79,
+ 0x20, 0x73, 0x6d, 0x65, 0x6c, 0x6c, 0x73, 0x00,
+ 0x76, 0x65, 0x72, 0x79, 0x20, 0x6e, 0x69, 0x63,
+ 0x65, 0x2e, 0x00, 0x00, 0x0b, 0x00, 0x66, 0x6c,
+ 0x6f, 0x77, 0x65, 0x72, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79,
+ 0x20, 0x62, 0x65, 0x61, 0x75, 0x74, 0x69, 0x66,
+ 0x75, 0x6c, 0x2e, 0x00, 0x00, 0x0c, 0x00, 0x66,
+ 0x65, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64,
+ 0x75, 0x73, 0x74, 0x65, 0x72, 0x00, 0x49, 0x20,
+ 0x63, 0x61, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x79,
+ 0x20, 0x6a, 0x61, 0x6e, 0x69, 0x74, 0x6f, 0x72,
+ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
+ 0x69, 0x73, 0x2e, 0x00, 0x00, 0x0d, 0x00, 0x63,
+ 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, 0x77, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x69, 0x6e, 0x20,
+ 0x67, 0x6f, 0x6f, 0x64, 0x20, 0x63, 0x6f, 0x6e,
+ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20,
+ 0x62, 0x75, 0x74, 0x20, 0x69, 0x74, 0x20, 0x68,
+ 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x66, 0x75,
+ 0x65, 0x6c, 0x2e, 0x00, 0x00, 0x0e, 0x01, 0x64,
+ 0x72, 0x75, 0x6e, 0x6b, 0x65, 0x6e, 0x20, 0x63,
+ 0x68, 0x61, 0x69, 0x6e, 0x73, 0x61, 0x77, 0x00,
+ 0x41, 0x20, 0x62, 0x69, 0x74, 0x20, 0x75, 0x6e,
+ 0x73, 0x74, 0x65, 0x61, 0x64, 0x79, 0x2c, 0x20,
+ 0x62, 0x75, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c,
+ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x00, 0x00,
+ 0x0f, 0x00, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x00, 0x54, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x6f,
+ 0x64, 0x20, 0x69, 0x73, 0x20, 0x76, 0x65, 0x72,
+ 0x79, 0x20, 0x68, 0x61, 0x72, 0x64, 0x2e, 0x00,
+ 0x00, 0x10, 0x00, 0x77, 0x68, 0x69, 0x73, 0x6b,
+ 0x79, 0x00, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x20, 0x73, 0x61, 0x79, 0x73,
+ 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x68,
+ 0x69, 0x73, 0x6b, 0x79, 0x20, 0x69, 0x73, 0x00,
+ 0x76, 0x65, 0x72, 0x79, 0x20, 0x73, 0x74, 0x72,
+ 0x6f, 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x11, 0x00,
+ 0x6e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x71, 0x75, 0x69, 0x74,
+ 0x65, 0x20, 0x62, 0x69, 0x67, 0x20, 0x66, 0x6f,
+ 0x72, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x65, 0x64,
+ 0x6c, 0x65, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x12,
+ 0x00, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
+ 0x00, 0x4e, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65,
+ 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x20, 0x45, 0x73,
+ 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79,
+ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x27, 0x4c,
+ 0x4f, 0x56, 0x45, 0x20, 0x43, 0x41, 0x4e, 0x44,
+ 0x59, 0x27, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c,
+ 0x2e, 0x00, 0x41, 0x6e, 0x64, 0x20, 0x74, 0x68,
+ 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x61, 0x20,
+ 0x68, 0x65, 0x61, 0x72, 0x74, 0x20, 0x70, 0x61,
+ 0x69, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e,
+ 0x20, 0x69, 0x74, 0x2e, 0x00, 0x48, 0x6f, 0x77,
+ 0x20, 0x53, 0x57, 0x45, 0x45, 0x54, 0x2e, 0x2e,
+ 0x2e, 0x00, 0x00, 0x13, 0x00, 0x63, 0x68, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x63,
+ 0x61, 0x6e, 0x64, 0x79, 0x00, 0x49, 0x74, 0x27,
+ 0x73, 0x20, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20,
+ 0x63, 0x68, 0x6f, 0x63, 0x6f, 0x6c, 0x61, 0x74,
+ 0x65, 0x20, 0x63, 0x61, 0x6e, 0x64, 0x79, 0x2e,
+ 0x00, 0x41, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74,
+ 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74,
+ 0x2e, 0x00, 0x00, 0x14, 0x00, 0x77, 0x69, 0x6c,
+ 0x64, 0x20, 0x70, 0x6f, 0x74, 0x61, 0x74, 0x6f,
+ 0x65, 0x00, 0x57, 0x6f, 0x77, 0x21, 0x20, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x73, 0x68, 0x61, 0x70,
+ 0x65, 0x64, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20,
+ 0x61, 0x20, 0x67, 0x72, 0x65, 0x6e, 0x61, 0x64,
+ 0x65, 0x21, 0x2e, 0x2e, 0x00, 0x00, 0x15, 0x00,
+ 0x72, 0x61, 0x6b, 0x65, 0x00, 0x54, 0x68, 0x65,
+ 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x62,
+ 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x74, 0x65, 0x65, 0x74, 0x68,
+ 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x6f, 0x20,
+ 0x6c, 0x61, 0x72, 0x67, 0x65, 0x00, 0x74, 0x6f,
+ 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x74, 0x68,
+ 0x69, 0x73, 0x20, 0x72, 0x61, 0x6b, 0x65, 0x20,
+ 0x61, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75,
+ 0x6c, 0x2e, 0x00, 0x00, 0x16, 0x00, 0x68, 0x65,
+ 0x61, 0x72, 0x74, 0x2d, 0x73, 0x68, 0x61, 0x70,
+ 0x65, 0x64, 0x20, 0x63, 0x61, 0x6e, 0x64, 0x79,
+ 0x00, 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74,
+ 0x20, 0x74, 0x68, 0x69, 0x6e, 0x6b, 0x20, 0x74,
+ 0x68, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x20,
+ 0x69, 0x6d, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x6d,
+ 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x65,
+ 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x2e, 0x00, 0x00,
+ 0x17, 0x00, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
+ 0x64, 0x20, 0x63, 0x61, 0x6e, 0x64, 0x79, 0x00,
+ 0x42, 0x72, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x65,
+ 0x77, 0x20, 0x63, 0x61, 0x6e, 0x64, 0x79, 0x2e,
+ 0x20, 0x41, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73,
+ 0x74, 0x20, 0x69, 0x74, 0x20, 0x6c, 0x6f, 0x6f,
+ 0x6b, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20,
+ 0x69, 0x74, 0x2e, 0x00, 0x00, 0x18, 0x00, 0x72,
+ 0x69, 0x62, 0x62, 0x6f, 0x6e, 0x00, 0x49, 0x74,
+ 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65,
+ 0x6d, 0x69, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x20,
+ 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
+ 0x62, 0x65, 0x61, 0x74, 0x69, 0x66, 0x75, 0x6c,
+ 0x20, 0x63, 0x68, 0x69, 0x63, 0x6b, 0x2c, 0x00,
+ 0x49, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x2c, 0x20,
+ 0x66, 0x65, 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x68,
+ 0x75, 0x6d, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x69,
+ 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x19, 0x00, 0x72,
+ 0x61, 0x6b, 0x65, 0x00, 0x52, 0x65, 0x61, 0x64,
+ 0x79, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x00, 0x00, 0x1a, 0x00, 0x6e, 0x75,
+ 0x74, 0x00, 0x41, 0x20, 0x72, 0x65, 0x61, 0x6c,
+ 0x6c, 0x79, 0x20, 0x62, 0x69, 0x67, 0x20, 0x6f,
+ 0x6e, 0x65, 0x2e, 0x00, 0x00, 0x1b, 0x00, 0x70,
+ 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x20, 0x61,
+ 0x70, 0x70, 0x6c, 0x65, 0x00, 0x49, 0x74, 0x20,
+ 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x73, 0x6f,
+ 0x20, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x74, 0x68,
+ 0x61, 0x74, 0x20, 0x49, 0x20, 0x63, 0x6f, 0x75,
+ 0x6c, 0x64, 0x00, 0x65, 0x76, 0x65, 0x6e, 0x20,
+ 0x73, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x70, 0x69, 0x70, 0x73, 0x20, 0x69, 0x6e, 0x73,
+ 0x69, 0x64, 0x65, 0x2e, 0x00, 0x00, 0x1c, 0x00,
+ 0x63, 0x6f, 0x6e, 0x65, 0x00, 0x49, 0x74, 0x20,
+ 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f,
+ 0x66, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20,
+ 0x48, 0x61, 0x76, 0x61, 0x6e, 0x61, 0x20, 0x67,
+ 0x6f, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x20, 0x65,
+ 0x76, 0x65, 0x72, 0x79, 0x00, 0x73, 0x65, 0x6c,
+ 0x66, 0x2d, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63,
+ 0x74, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x75, 0x73,
+ 0x69, 0x6e, 0x65, 0x73, 0x73, 0x6d, 0x61, 0x6e,
+ 0x20, 0x69, 0x73, 0x20, 0x73, 0x75, 0x70, 0x70,
+ 0x6f, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20,
+ 0x68, 0x61, 0x76, 0x65, 0x00, 0x67, 0x6c, 0x75,
+ 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x68, 0x69,
+ 0x73, 0x20, 0x73, 0x6d, 0x69, 0x6c, 0x65, 0x2e,
+ 0x00, 0x00, 0x1d, 0x00, 0x73, 0x75, 0x70, 0x65,
+ 0x72, 0x20, 0x67, 0x6c, 0x75, 0x65, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x74, 0x75, 0x72, 0x62,
+ 0x6f, 0x20, 0x6d, 0x65, 0x67, 0x61, 0x20, 0x67,
+ 0x69, 0x67, 0x61, 0x20, 0x73, 0x75, 0x70, 0x65,
+ 0x72, 0x20, 0x75, 0x6c, 0x74, 0x72, 0x61, 0x00,
+ 0x66, 0x61, 0x73, 0x74, 0x20, 0x64, 0x72, 0x79,
+ 0x69, 0x6e, 0x67, 0x20, 0x67, 0x6c, 0x75, 0x65,
+ 0x20, 0x70, 0x6c, 0x75, 0x73, 0x2e, 0x00, 0x00,
+ 0x1e, 0x00, 0x63, 0x6f, 0x6e, 0x65, 0x20, 0x26,
+ 0x20, 0x6e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x00,
+ 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e,
+ 0x67, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74, 0x69,
+ 0x6c, 0x6c, 0x20, 0x6d, 0x69, 0x73, 0x73, 0x69,
+ 0x6e, 0x67, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e,
+ 0x2e, 0x2e, 0x00, 0x00, 0x1f, 0x00, 0x63, 0x6f,
+ 0x6e, 0x65, 0x20, 0x26, 0x20, 0x66, 0x65, 0x61,
+ 0x74, 0x68, 0x65, 0x72, 0x00, 0x53, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69,
+ 0x73, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20,
+ 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20,
+ 0x68, 0x65, 0x72, 0x65, 0x2e, 0x2e, 0x2e, 0x00,
+ 0x00, 0x20, 0x00, 0x64, 0x61, 0x72, 0x74, 0x00,
+ 0x4e, 0x6f, 0x77, 0x20, 0x61, 0x6c, 0x6c, 0x20,
+ 0x49, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x69,
+ 0x73, 0x20, 0x61, 0x20, 0x74, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x21, 0x00, 0x00, 0x21, 0x00, 0x64,
+ 0x69, 0x72, 0x74, 0x79, 0x20, 0x66, 0x65, 0x61,
+ 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x75, 0x73,
+ 0x74, 0x65, 0x72, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x6d, 0x79, 0x20,
+ 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6f, 0x69, 0x6c,
+ 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x6f,
+ 0x6f, 0x74, 0x2e, 0x00, 0x00, 0x22, 0x00, 0x70,
+ 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x70,
+ 0x6f, 0x74, 0x61, 0x74, 0x6f, 0x65, 0x00, 0x54,
+ 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20,
+ 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e,
+ 0x63, 0x65, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65,
+ 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x67, 0x72,
+ 0x65, 0x6e, 0x61, 0x64, 0x65, 0x00, 0x69, 0x73,
+ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x6f,
+ 0x74, 0x61, 0x74, 0x6f, 0x65, 0x65, 0x73, 0x20,
+ 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20,
+ 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x62, 0x6c,
+ 0x6f, 0x77, 0x20, 0x75, 0x70, 0x2e, 0x00, 0x00,
+ 0x23, 0x00, 0x63, 0x61, 0x72, 0x20, 0x6a, 0x61,
+ 0x63, 0x6b, 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x73,
+ 0x20, 0x72, 0x65, 0x6c, 0x69, 0x61, 0x62, 0x6c,
+ 0x65, 0x2e, 0x00, 0x00, 0x24, 0x00, 0x64, 0x69,
+ 0x6e, 0x6f, 0x20, 0x62, 0x6f, 0x6e, 0x65, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x62, 0x69, 0x67,
+ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x65, 0x6c,
+ 0x6c, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72,
+ 0x76, 0x65, 0x64, 0x2e, 0x20, 0x49, 0x74, 0x20,
+ 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76,
+ 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x00, 0x61,
+ 0x20, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x20,
+ 0x62, 0x69, 0x67, 0x2c, 0x20, 0x65, 0x72, 0x2e,
+ 0x2e, 0x2e, 0x2c, 0x20, 0x61, 0x6e, 0x69, 0x6d,
+ 0x61, 0x6c, 0x2c, 0x20, 0x49, 0x20, 0x74, 0x68,
+ 0x69, 0x6e, 0x6b, 0x2e, 0x2e, 0x2e, 0x00, 0x00,
+ 0x25, 0x00, 0x73, 0x68, 0x6f, 0x76, 0x65, 0x6c,
+ 0x00, 0x49, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x50,
+ 0x4c, 0x41, 0x59, 0x20, 0x44, 0x49, 0x47, 0x47,
+ 0x45, 0x52, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
+ 0x69, 0x74, 0x2e, 0x20, 0x53, 0x6f, 0x20, 0x74,
+ 0x6f, 0x20, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x2e,
+ 0x00, 0x00, 0x26, 0x00, 0x72, 0x6f, 0x70, 0x65,
+ 0x00, 0x4c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x73,
+ 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x2e, 0x00, 0x00,
+ 0x27, 0x00, 0x6d, 0x61, 0x73, 0x6b, 0x00, 0x49,
+ 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x68,
+ 0x65, 0x6c, 0x70, 0x20, 0x6d, 0x65, 0x20, 0x73,
+ 0x65, 0x65, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65,
+ 0x72, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x77,
+ 0x61, 0x74, 0x65, 0x72, 0x2e, 0x00, 0x00, 0x28,
+ 0x00, 0x66, 0x69, 0x6e, 0x73, 0x00, 0x54, 0x68,
+ 0x65, 0x79, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20,
+ 0x68, 0x65, 0x6c, 0x70, 0x20, 0x6d, 0x65, 0x20,
+ 0x66, 0x65, 0x65, 0x6c, 0x20, 0x6d, 0x6f, 0x72,
+ 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x6d,
+ 0x79, 0x00, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x77,
+ 0x61, 0x74, 0x65, 0x72, 0x20, 0x62, 0x72, 0x6f,
+ 0x74, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x00, 0x00,
+ 0x29, 0x00, 0x64, 0x69, 0x76, 0x69, 0x6e, 0x67,
+ 0x20, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
+ 0x6e, 0x74, 0x00, 0x57, 0x61, 0x74, 0x63, 0x68,
+ 0x20, 0x6f, 0x75, 0x74, 0x2c, 0x20, 0x77, 0x61,
+ 0x74, 0x65, 0x72, 0x21, 0x20, 0x48, 0x65, 0x72,
+ 0x65, 0x20, 0x49, 0x20, 0x63, 0x6f, 0x6d, 0x65,
+ 0x21, 0x00, 0x00, 0x2a, 0x00, 0x61, 0x6e, 0x63,
+ 0x68, 0x6f, 0x72, 0x00, 0x4e, 0x6f, 0x74, 0x20,
+ 0x62, 0x69, 0x67, 0x2c, 0x20, 0x62, 0x75, 0x74,
+ 0x20, 0x68, 0x65, 0x61, 0x76, 0x79, 0x20, 0x65,
+ 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x6f,
+ 0x20, 0x73, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68,
+ 0x65, 0x20, 0x62, 0x6f, 0x61, 0x74, 0x2e, 0x00,
+ 0x00, 0x2b, 0x00, 0x67, 0x72, 0x61, 0x70, 0x70,
+ 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x6f,
+ 0x6b, 0x00, 0x57, 0x61, 0x74, 0x63, 0x68, 0x20,
+ 0x6f, 0x75, 0x74, 0x2c, 0x20, 0x6d, 0x6f, 0x75,
+ 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x2c, 0x20,
+ 0x68, 0x65, 0x72, 0x65, 0x20, 0x49, 0x20, 0x63,
+ 0x6f, 0x6d, 0x65, 0x21, 0x00, 0x00, 0x2c, 0x00,
+ 0x73, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x73, 0x6f, 0x20, 0x62,
+ 0x6c, 0x75, 0x6e, 0x74, 0x2c, 0x20, 0x74, 0x68,
+ 0x61, 0x74, 0x20, 0x49, 0x20, 0x63, 0x6f, 0x75,
+ 0x6c, 0x64, 0x6e, 0x27, 0x74, 0x20, 0x65, 0x76,
+ 0x65, 0x6e, 0x20, 0x63, 0x75, 0x74, 0x00, 0x62,
+ 0x75, 0x74, 0x74, 0x65, 0x72, 0x20, 0x77, 0x69,
+ 0x74, 0x68, 0x20, 0x69, 0x74, 0x2e, 0x00, 0x00,
+ 0x2d, 0x00, 0x73, 0x6f, 0x6d, 0x65, 0x77, 0x68,
+ 0x61, 0x74, 0x20, 0x72, 0x6f, 0x74, 0x74, 0x65,
+ 0x6e, 0x20, 0x63, 0x68, 0x65, 0x65, 0x73, 0x65,
+ 0x00, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x73,
+ 0x20, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6d,
+ 0x79, 0x20, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x00,
+ 0x00, 0x2e, 0x00, 0x73, 0x68, 0x61, 0x72, 0x70,
+ 0x65, 0x6e, 0x65, 0x64, 0x20, 0x73, 0x69, 0x63,
+ 0x6b, 0x6c, 0x65, 0x00, 0x4c, 0x61, 0x6d, 0x62,
+ 0x73, 0x2c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69,
+ 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x48, 0x65,
+ 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x65, 0x73,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x69,
+ 0x6e, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x2f, 0x00,
+ 0x68, 0x61, 0x6e, 0x64, 0x6b, 0x65, 0x72, 0x63,
+ 0x68, 0x69, 0x65, 0x66, 0x00, 0x54, 0x68, 0x65,
+ 0x20, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x20, 0x6d,
+ 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65,
+ 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x62, 0x69,
+ 0x67, 0x20, 0x6e, 0x6f, 0x73, 0x65, 0x20, 0x74,
+ 0x68, 0x61, 0x74, 0x20, 0x68, 0x65, 0x20, 0x6e,
+ 0x65, 0x65, 0x64, 0x73, 0x00, 0x74, 0x6f, 0x20,
+ 0x75, 0x73, 0x65, 0x20, 0x61, 0x20, 0x77, 0x68,
+ 0x6f, 0x6c, 0x65, 0x20, 0x62, 0x61, 0x72, 0x20,
+ 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x61, 0x70, 0x20,
+ 0x6a, 0x75, 0x73, 0x74, 0x20, 0x74, 0x6f, 0x20,
+ 0x77, 0x61, 0x73, 0x68, 0x20, 0x69, 0x74, 0x2e,
+ 0x00, 0x00, 0x30, 0x01, 0x6d, 0x6f, 0x75, 0x73,
+ 0x65, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x76,
+ 0x65, 0x72, 0x79, 0x20, 0x61, 0x63, 0x74, 0x69,
+ 0x76, 0x65, 0x2e, 0x00, 0x00, 0x31, 0x00, 0x72,
+ 0x6f, 0x63, 0x6b, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x72, 0x65,
+ 0x67, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x6a,
+ 0x75, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x6b, 0x65,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6e, 0x6f,
+ 0x77, 0x62, 0x61, 0x6c, 0x6c, 0x2e, 0x00, 0x00,
+ 0x32, 0x01, 0x6e, 0x75, 0x67, 0x67, 0x65, 0x74,
+ 0x00, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x3a,
+ 0x20, 0x41, 0x75, 0x2c, 0x20, 0x61, 0x74, 0x6f,
+ 0x6d, 0x69, 0x63, 0x20, 0x6e, 0x6f, 0x3a, 0x20,
+ 0x37, 0x39, 0x2c, 0x20, 0x61, 0x74, 0x6f, 0x6d,
+ 0x69, 0x63, 0x20, 0x77, 0x74, 0x2e, 0x3a, 0x20,
+ 0x31, 0x39, 0x36, 0x2e, 0x39, 0x37, 0x2e, 0x00,
+ 0x49, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72,
+ 0x20, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x20,
+ 0x47, 0x4f, 0x4c, 0x44, 0x21, 0x21, 0x21, 0x20,
+ 0x59, 0x65, 0x73, 0x21, 0x20, 0x59, 0x65, 0x73,
+ 0x21, 0x00, 0x00, 0x33, 0x00, 0x62, 0x61, 0x6e,
+ 0x6b, 0x6e, 0x6f, 0x74, 0x65, 0x00, 0x00, 0x00,
+ 0x34, 0x00, 0x64, 0x69, 0x63, 0x74, 0x61, 0x70,
+ 0x68, 0x6f, 0x6e, 0x65, 0x00, 0x54, 0x68, 0x65,
+ 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e,
+ 0x6f, 0x20, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72,
+ 0x69, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x73, 0x69,
+ 0x64, 0x65, 0x2e, 0x00, 0x00, 0x35, 0x00, 0x70,
+ 0x6f, 0x6c, 0x61, 0x72, 0x6f, 0x69, 0x64, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x72, 0x65, 0x61,
+ 0x64, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x61,
+ 0x6b, 0x65, 0x20, 0x61, 0x20, 0x70, 0x69, 0x63,
+ 0x74, 0x75, 0x72, 0x65, 0x2e, 0x00, 0x00, 0x36,
+ 0x00, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x20, 0x74,
+ 0x61, 0x70, 0x65, 0x00, 0x49, 0x74, 0x20, 0x68,
+ 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x6c, 0x61,
+ 0x62, 0x65, 0x6c, 0x2e, 0x00, 0x00, 0x37, 0x00,
+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x20, 0x6f, 0x66,
+ 0x20, 0x70, 0x61, 0x70, 0x65, 0x72, 0x00, 0x54,
+ 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x6e,
+ 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69,
+ 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74,
+ 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x69,
+ 0x74, 0x2e, 0x00, 0x00, 0x38, 0x00, 0x63, 0x6f,
+ 0x67, 0x6e, 0x61, 0x63, 0x00, 0x46, 0x61, 0x6e,
+ 0x63, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20,
+ 0x6a, 0x75, 0x73, 0x74, 0x20, 0x66, 0x6f, 0x72,
+ 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x75,
+ 0x73, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64,
+ 0x72, 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x2e,
+ 0x00, 0x00, 0x39, 0x00, 0x72, 0x65, 0x6d, 0x6f,
+ 0x74, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x00, 0x49, 0x74, 0x20, 0x68, 0x61,
+ 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x66,
+ 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x20,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
+ 0x65, 0x2e, 0x00, 0x4f, 0x6e, 0x65, 0x20, 0x63,
+ 0x61, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x79, 0x20,
+ 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x6f, 0x70,
+ 0x2e, 0x00, 0x00, 0x3a, 0x00, 0x69, 0x63, 0x65,
+ 0x20, 0x74, 0x6f, 0x6e, 0x67, 0x73, 0x00, 0x56,
+ 0x65, 0x72, 0x79, 0x20, 0x68, 0x61, 0x6e, 0x64,
+ 0x79, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x2e, 0x00,
+ 0x00, 0x3b, 0x00, 0x63, 0x6f, 0x72, 0x6b, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20, 0x73,
+ 0x74, 0x6f, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6b,
+ 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x63,
+ 0x6f, 0x72, 0x6b, 0x2e, 0x00, 0x00, 0x3c, 0x00,
+ 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x20,
+ 0x63, 0x6f, 0x72, 0x6b, 0x00, 0x4e, 0x6f, 0x77,
+ 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x6d, 0x6f,
+ 0x72, 0x65, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f,
+ 0x70, 0x69, 0x61, 0x74, 0x65, 0x2e, 0x00, 0x00,
+ 0x3d, 0x00, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x00,
+ 0x49, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20, 0x70,
+ 0x68, 0x6f, 0x74, 0x6f, 0x20, 0x6f, 0x66, 0x20,
+ 0x4a, 0x6f, 0x68, 0x6e, 0x20, 0x4e, 0x6f, 0x74,
+ 0x79, 0x2e, 0x20, 0x49, 0x20, 0x63, 0x61, 0x75,
+ 0x67, 0x68, 0x74, 0x20, 0x68, 0x69, 0x6d, 0x00,
+ 0x77, 0x68, 0x65, 0x6e, 0x20, 0x68, 0x65, 0x20,
+ 0x77, 0x61, 0x73, 0x20, 0x73, 0x69, 0x6e, 0x67,
+ 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x68, 0x69, 0x67, 0x68, 0x20, 0x43, 0x2e, 0x20,
+ 0x59, 0x75, 0x63, 0x6b, 0x21, 0x00, 0x00, 0x3e,
+ 0x00, 0x63, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x00,
+ 0x54, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65,
+ 0x20, 0x62, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x20,
+ 0x73, 0x61, 0x79, 0x73, 0x20, 0x69, 0x74, 0x27,
+ 0x73, 0x00, 0x27, 0x4f, 0x52, 0x49, 0x47, 0x49,
+ 0x4e, 0x41, 0x4c, 0x20, 0x4d, 0x45, 0x58, 0x49,
+ 0x43, 0x41, 0x4e, 0x20, 0x43, 0x48, 0x49, 0x4c,
+ 0x4c, 0x49, 0x27, 0x2e, 0x20, 0x53, 0x75, 0x72,
+ 0x65, 0x2e, 0x00, 0x00, 0x3f, 0x00, 0x70, 0x61,
+ 0x73, 0x74, 0x72, 0x79, 0x20, 0x72, 0x6f, 0x6c,
+ 0x6c, 0x65, 0x72, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x6f, 0x66,
+ 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x68, 0x61,
+ 0x72, 0x64, 0x20, 0x77, 0x6f, 0x6f, 0x64, 0x2e,
+ 0x00, 0x00, 0x40, 0x00, 0x66, 0x61, 0x6b, 0x65,
+ 0x20, 0x63, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x00,
+ 0x4e, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x61, 0x74,
+ 0x27, 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20,
+ 0x49, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x73,
+ 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x73, 0x65,
+ 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e,
+ 0x00, 0x00, 0x41, 0x00, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x00, 0x27, 0x4f, 0x52, 0x49, 0x47, 0x49,
+ 0x4e, 0x41, 0x4c, 0x20, 0x4d, 0x45, 0x58, 0x49,
+ 0x43, 0x41, 0x4e, 0x20, 0x43, 0x48, 0x49, 0x4c,
+ 0x4c, 0x49, 0x27, 0x2e, 0x00, 0x00, 0x42, 0x00,
+ 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x69, 0x65,
+ 0x73, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20, 0x61,
+ 0x20, 0x70, 0x61, 0x69, 0x72, 0x20, 0x6f, 0x66,
+ 0x20, 0x6e, 0x65, 0x77, 0x20, 0x62, 0x61, 0x74,
+ 0x74, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x00,
+ 0x00, 0x43, 0x00, 0x64, 0x69, 0x63, 0x74, 0x61,
+ 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x00, 0x27, 0x4f,
+ 0x6e, 0x65, 0x2d, 0x74, 0x77, 0x6f, 0x2d, 0x6f,
+ 0x6e, 0x65, 0x2d, 0x74, 0x77, 0x6f, 0x2c, 0x20,
+ 0x69, 0x74, 0x27, 0x73, 0x20, 0x6d, 0x65, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x00,
+ 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79,
+ 0x20, 0x4d, 0x61, 0x72, 0x6b, 0x20, 0x4d, 0x43,
+ 0x2e, 0x2e, 0x2e, 0x2e, 0x27, 0x00, 0x49, 0x74,
+ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x00,
+ 0x00, 0x44, 0x01, 0x62, 0x75, 0x72, 0x6e, 0x69,
+ 0x6e, 0x67, 0x20, 0x70, 0x61, 0x70, 0x65, 0x72,
+ 0x00, 0x41, 0x6d, 0x61, 0x7a, 0x69, 0x6e, 0x67,
+ 0x2c, 0x20, 0x69, 0x73, 0x6e, 0x27, 0x74, 0x20,
+ 0x69, 0x74, 0x3f, 0x00, 0x28, 0x4e, 0x6f, 0x74,
+ 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x6e, 0x74,
+ 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x75, 0x6e, 0x62,
+ 0x65, 0x6c, 0x69, 0x65, 0x76, 0x61, 0x62, 0x6c,
+ 0x65, 0x29, 0x2e, 0x00, 0x00, 0x45, 0x00, 0x6d,
+ 0x65, 0x61, 0x74, 0x00, 0x54, 0x68, 0x65, 0x72,
+ 0x65, 0x27, 0x73, 0x20, 0x76, 0x65, 0x61, 0x6c,
+ 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x70, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x20,
+ 0x62, 0x61, 0x67, 0x2e, 0x00, 0x00, 0x46, 0x00,
+ 0x70, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x20,
+ 0x62, 0x61, 0x67, 0x00, 0x47, 0x65, 0x65, 0x2c,
+ 0x20, 0x49, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20,
+ 0x69, 0x74, 0x27, 0x73, 0x20, 0x72, 0x65, 0x63,
+ 0x79, 0x63, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x2e,
+ 0x20, 0x49, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64,
+ 0x6e, 0x27, 0x74, 0x00, 0x73, 0x6c, 0x65, 0x65,
+ 0x70, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77,
+ 0x69, 0x73, 0x65, 0x2e, 0x00, 0x00, 0x47, 0x00,
+ 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x00, 0x54, 0x68,
+ 0x65, 0x73, 0x65, 0x20, 0x73, 0x6f, 0x63, 0x6b,
+ 0x73, 0x20, 0x73, 0x75, 0x63, 0x6b, 0x2e, 0x00,
+ 0x00, 0x48, 0x00, 0x70, 0x69, 0x6c, 0x6c, 0x73,
+ 0x00, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61,
+ 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74,
+ 0x20, 0x74, 0x77, 0x65, 0x6e, 0x74, 0x79, 0x20,
+ 0x70, 0x69, 0x6c, 0x6c, 0x73, 0x20, 0x69, 0x6e,
+ 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6a, 0x61,
+ 0x72, 0x2e, 0x00, 0x00, 0x49, 0x00, 0x68, 0x61,
+ 0x6e, 0x64, 0x6c, 0x65, 0x00, 0x49, 0x74, 0x20,
+ 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61,
+ 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x64, 0x6f,
+ 0x6f, 0x72, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c,
+ 0x65, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x4a, 0x00,
+ 0x63, 0x68, 0x69, 0x6c, 0x6c, 0x69, 0x00, 0x4e,
+ 0x69, 0x63, 0x65, 0x20, 0x62, 0x6f, 0x74, 0x74,
+ 0x6c, 0x65, 0x2e, 0x20, 0x49, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
+ 0x68, 0x61, 0x70, 0x65, 0x2e, 0x00, 0x00, 0x4b,
+ 0x00, 0x70, 0x61, 0x73, 0x73, 0x00, 0x22, 0x4c,
+ 0x65, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
+ 0x67, 0x75, 0x79, 0x20, 0x69, 0x6e, 0x2e, 0x20,
+ 0x52, 0x47, 0x42, 0x20, 0x43, 0x68, 0x69, 0x65,
+ 0x66, 0x2e, 0x22, 0x00, 0x00, 0x4c, 0x00, 0x62,
+ 0x75, 0x6c, 0x62, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
+ 0x65, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x6c,
+ 0x65, 0x73, 0x73, 0x2e, 0x00, 0x00, 0x4d, 0x00,
+ 0x6a, 0x61, 0x69, 0x6c, 0x20, 0x6b, 0x65, 0x79,
+ 0x00, 0x53, 0x75, 0x72, 0x70, 0x72, 0x69, 0x73,
+ 0x69, 0x6e, 0x67, 0x6c, 0x79, 0x2c, 0x20, 0x69,
+ 0x74, 0x27, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,
+ 0x6b, 0x65, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x6a, 0x61, 0x69, 0x6c, 0x2e,
+ 0x00, 0x00, 0x4e, 0x00, 0x64, 0x65, 0x6c, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x20, 0x70, 0x6c, 0x61,
+ 0x6e, 0x74, 0x00, 0x57, 0x68, 0x6f, 0x61, 0x2c,
+ 0x20, 0x69, 0x74, 0x20, 0x74, 0x69, 0x63, 0x6b,
+ 0x6c, 0x65, 0x73, 0x21, 0x00, 0x00, 0x4f, 0x00,
+ 0x53, 0x77, 0x69, 0x73, 0x73, 0x20, 0x41, 0x72,
+ 0x6d, 0x79, 0x20, 0x6b, 0x6e, 0x69, 0x66, 0x65,
+ 0x00, 0x49, 0x20, 0x77, 0x6f, 0x6e, 0x64, 0x65,
+ 0x72, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x27,
+ 0x73, 0x20, 0x67, 0x6f, 0x74, 0x20, 0x61, 0x20,
+ 0x54, 0x56, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,
+ 0x65, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x6f, 0x2e,
+ 0x00, 0x00, 0x50, 0x00, 0x73, 0x70, 0x72, 0x69,
+ 0x6e, 0x67, 0x00, 0x49, 0x20, 0x63, 0x6f, 0x75,
+ 0x6c, 0x64, 0x20, 0x6c, 0x61, 0x75, 0x6e, 0x63,
+ 0x68, 0x20, 0x61, 0x20, 0x72, 0x6f, 0x63, 0x6b,
+ 0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
+ 0x69, 0x74, 0x21, 0x00, 0x00, 0x51, 0x00, 0x73,
+ 0x68, 0x6f, 0x76, 0x65, 0x6c, 0x00, 0x4e, 0x69,
+ 0x63, 0x65, 0x2c, 0x20, 0x68, 0x61, 0x6e, 0x64,
+ 0x79, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x2e, 0x00,
+ 0x00, 0x52, 0x00, 0x6b, 0x61, 0x6c, 0x65, 0x69,
+ 0x64, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00,
+ 0x49, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20,
+ 0x73, 0x70, 0x65, 0x6e, 0x64, 0x20, 0x6d, 0x79,
+ 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x6c,
+ 0x69, 0x66, 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x6b,
+ 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x72, 0x6f,
+ 0x75, 0x67, 0x68, 0x00, 0x74, 0x68, 0x69, 0x73,
+ 0x2e, 0x20, 0x57, 0x65, 0x6c, 0x6c, 0x2c, 0x20,
+ 0x6c, 0x65, 0x74, 0x27, 0x73, 0x20, 0x73, 0x61,
+ 0x79, 0x20, 0x66, 0x69, 0x76, 0x65, 0x20, 0x6d,
+ 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x00,
+ 0x4f, 0x68, 0x2c, 0x20, 0x61, 0x6c, 0x6c, 0x20,
+ 0x72, 0x69, 0x67, 0x68, 0x74, 0x2c, 0x20, 0x69,
+ 0x74, 0x27, 0x73, 0x20, 0x62, 0x6f, 0x72, 0x69,
+ 0x6e, 0x67, 0x2e, 0x00, 0x00, 0x53, 0x00, 0x22,
+ 0x53, 0x6f, 0x6c, 0x64, 0x69, 0x65, 0x72, 0x20,
+ 0x4e, 0x65, 0x77, 0x73, 0x22, 0x00, 0x49, 0x74,
+ 0x27, 0x73, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65,
+ 0x20, 0x61, 0x73, 0x20, 0x77, 0x6f, 0x6d, 0x65,
+ 0x6e, 0x27, 0x73, 0x20, 0x6d, 0x61, 0x67, 0x61,
+ 0x7a, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x00, 0x62,
+ 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65,
+ 0x20, 0x61, 0x72, 0x65, 0x20, 0x67, 0x75, 0x6e,
+ 0x73, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61,
+ 0x64, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x65, 0x72,
+ 0x66, 0x75, 0x6d, 0x65, 0x73, 0x2e, 0x00, 0x49,
+ 0x74, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6f, 0x6c,
+ 0x20, 0x61, 0x6e, 0x79, 0x77, 0x61, 0x79, 0x2e,
+ 0x00, 0x00, 0x54, 0x00, 0x67, 0x72, 0x65, 0x6e,
+ 0x61, 0x64, 0x65, 0x00, 0x49, 0x20, 0x6d, 0x75,
+ 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x72,
+ 0x61, 0x7a, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x70,
+ 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x79,
+ 0x20, 0x70, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e,
+ 0x00, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69,
+ 0x6e, 0x67, 0x20, 0x68, 0x6f, 0x72, 0x72, 0x69,
+ 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x69, 0x67, 0x68,
+ 0x74, 0x20, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e,
+ 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0x55, 0x00, 0x6d,
+ 0x75, 0x67, 0x00, 0x49, 0x74, 0x27, 0x73, 0x20,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x00, 0x00,
+ 0x56, 0x00, 0x6d, 0x75, 0x67, 0x20, 0x66, 0x75,
+ 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x6d, 0x75,
+ 0x64, 0x00, 0x57, 0x68, 0x79, 0x20, 0x64, 0x69,
+ 0x64, 0x20, 0x49, 0x20, 0x66, 0x69, 0x6c, 0x6c,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x75, 0x67,
+ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6d, 0x75,
+ 0x64, 0x3f, 0x00, 0x00, 0x54, 0x68, 0x61, 0x74,
+ 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x6e,
+ 0x6f, 0x20, 0x73, 0x65, 0x6e, 0x73, 0x65, 0x21,
+ 0x00, 0x00, 0x57, 0x00, 0x63, 0x72, 0x75, 0x6d,
+ 0x62, 0x73, 0x00, 0x54, 0x68, 0x65, 0x73, 0x65,
+ 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x6f, 0x6d,
+ 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e,
+ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x62, 0x72, 0x65,
+ 0x61, 0x64, 0x2e, 0x00, 0x00, 0x58, 0x00, 0x72,
+ 0x6f, 0x70, 0x65, 0x00, 0x49, 0x74, 0x27, 0x73,
+ 0x20, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x6e,
+ 0x64, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x2e, 0x00,
+ 0x00, 0x59, 0x00, 0x72, 0x6f, 0x70, 0x65, 0x20,
+ 0x74, 0x69, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20,
+ 0x67, 0x72, 0x65, 0x6e, 0x61, 0x64, 0x65, 0x00,
+ 0x4d, 0x79, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e,
+ 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20,
+ 0x62, 0x6f, 0x6d, 0x62, 0x61, 0x73, 0x74, 0x69,
+ 0x63, 0x20, 0x79, 0x6f, 0x79, 0x6f, 0x2e, 0x00,
+ 0x00, 0x5a, 0x00, 0x6d, 0x65, 0x64, 0x69, 0x63,
+ 0x69, 0x6e, 0x65, 0x00, 0x54, 0x68, 0x65, 0x79,
+ 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x73, 0x6c, 0x65, 0x65, 0x70,
+ 0x69, 0x6e, 0x67, 0x20, 0x70, 0x69, 0x6c, 0x6c,
+ 0x73, 0x2e, 0x00, 0x41, 0x6c, 0x74, 0x68, 0x6f,
+ 0x75, 0x67, 0x68, 0x20, 0x49, 0x20, 0x64, 0x6f,
+ 0x6e, 0x27, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65,
+ 0x20, 0x61, 0x6e, 0x79, 0x20, 0x69, 0x64, 0x65,
+ 0x61, 0x20, 0x77, 0x68, 0x79, 0x2e, 0x00, 0x00,
+ 0x5b, 0x00, 0x64, 0x72, 0x75, 0x67, 0x67, 0x65,
+ 0x64, 0x20, 0x66, 0x6f, 0x6f, 0x64, 0x00, 0x53,
+ 0x6d, 0x65, 0x6c, 0x6c, 0x73, 0x20, 0x6c, 0x69,
+ 0x6b, 0x65, 0x20, 0x54, 0x65, 0x65, 0x6e, 0x20,
+ 0x53, 0x70, 0x69, 0x72, 0x69, 0x74, 0x2e, 0x00,
+ 0x00, 0x5c, 0x01, 0x62, 0x69, 0x72, 0x64, 0x00,
+ 0x49, 0x74, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64,
+ 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x61, 0x20,
+ 0x67, 0x72, 0x65, 0x61, 0x74, 0x20, 0x64, 0x69,
+ 0x6e, 0x6e, 0x2e, 0x2e, 0x2e, 0x20, 0x49, 0x20,
+ 0x6d, 0x65, 0x61, 0x6e, 0x00, 0x66, 0x72, 0x69,
+ 0x65, 0x6e, 0x64, 0x2c, 0x20, 0x6f, 0x66, 0x20,
+ 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x2e, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
+ 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0x01, 0xff, 0x00, 0x00, 0x02, 0xff, 0xff,
+ 0xff, 0x01, 0xff, 0x00, 0x00, 0x02, 0xff, 0x00,
+ 0x00, 0x01, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x06, 0xff, 0xff, 0x00, 0x02, 0xff, 0x00,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0x01, 0x02, 0xff, 0x00, 0x04, 0xff, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00,
+ 0x00, 0x0a, 0xff, 0x00, 0x00, 0x01, 0x0d, 0x00,
+ 0x00, 0x01, 0x02, 0xff, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x06, 0x07, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0x00, 0x01, 0x04, 0x02, 0x03, 0xff, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0xff, 0xff,
+ 0x00, 0x01, 0x02, 0xff, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00,
+ 0x00, 0xf8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x28, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x67, 0x7c, 0x04, 0x4f, 0x29, 0x00,
+ 0x00, 0xec, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x2a, 0x66, 0x37, 0x03, 0xca, 0x0c, 0x00,
+ 0x00, 0x75, 0xbf, 0x91, 0x0c, 0x00, 0x00, 0x00,
+ 0x00, 0x99, 0x5f, 0x87, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x64, 0x34, 0xbe, 0x47, 0xad, 0x03, 0x86,
+ 0x02, 0x18, 0x20, 0xd4, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0xd6, 0x22, 0x58, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x67, 0xac, 0xf3, 0x00, 0x00, 0x00,
+ 0x00, 0xc3, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xdf, 0x27, 0xc8, 0x4d, 0x64, 0x08, 0x00,
+ 0x00, 0x4e, 0x7e, 0x5c, 0xe6, 0x00, 0x00, 0x00,
+ 0x00, 0x69, 0x0d, 0x27, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0x4a, 0x0d, 0x45, 0x0d, 0x00, 0x00, 0x00,
+ 0x00, 0xb9, 0x48, 0x71, 0x12, 0x04, 0x27, 0x00,
+ 0x00, 0xdb, 0x73, 0xfe, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0xfc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x5b, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x13, 0x40, 0x51, 0x93, 0x00, 0x00, 0x00,
+ 0x00, 0x13, 0x4f, 0x4f, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x7a, 0x50, 0x64, 0x5d, 0x6f, 0x04, 0x00,
+ 0x00, 0xa3, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x88, 0x02, 0x91, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0xce, 0x02, 0x77, 0x04, 0x2f, 0x1d, 0x00,
+ 0x00, 0x08, 0x69, 0x06, 0x23, 0x32, 0x4b, 0x3e,
+ 0x6c, 0x46, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf6, 0x16, 0xc5, 0x13, 0x00, 0x00, 0x00,
+ 0x00, 0xfb, 0x0a, 0x21, 0x73, 0x68, 0x3b, 0x00,
+ 0x00, 0x9b, 0x15, 0x0d, 0x1a, 0x00, 0x00, 0x00,
+ 0x00, 0xce, 0xf7, 0x25, 0x6b, 0xcb, 0x13, 0x00,
+ 0x00, 0x33, 0xa5, 0xbf, 0x01, 0xb3, 0x10, 0x00,
+ 0x00, 0xcb, 0x13, 0x7c, 0x05, 0x00, 0x00, 0x00,
+ 0x00, 0x7e, 0x0f, 0x14, 0x59, 0xc5, 0x13, 0x00,
+ 0x00, 0x95, 0x51, 0xce, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x4d, 0x29, 0xfc, 0x14, 0xe1, 0xa4, 0xad,
+ 0x8e, 0x07, 0x5b, 0x47, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0xbf, 0x52, 0x3c, 0x0e, 0xc5, 0x0e, 0x00,
+ 0x00, 0x44, 0x6b, 0xe0, 0x76, 0x97, 0x00, 0x00,
+ 0x00, 0x5a, 0x1a, 0xb8, 0xb3, 0x00, 0x00, 0x00,
+ 0x00, 0x6c, 0x66, 0x8f, 0xdc, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0xb4, 0x01, 0x6f, 0x04, 0xcb,
+ 0x07, 0x01, 0x09, 0xff, 0xff, 0x36, 0x09, 0x02,
+ 0x0a, 0x2d, 0x0a, 0xff, 0xff, 0x43, 0x0c, 0x75,
+ 0x0d, 0x0e, 0x0f, 0xb8, 0x0f, 0xff, 0xff, 0xdb,
+ 0x10, 0xac, 0x11, 0xd9, 0x12, 0x68, 0x14, 0xff,
+ 0xff, 0x85, 0x14, 0x28, 0x15, 0xff, 0xff, 0xde,
+ 0x16, 0x26, 0x17, 0xff, 0xff, 0x52, 0x17, 0x8c,
+ 0x17, 0x13, 0x19, 0x3e, 0x1a, 0x63, 0x1a, 0x84,
+ 0x1a, 0xc9, 0x1a, 0xf7, 0x1a, 0x27, 0x1b, 0x4a,
+ 0x1b, 0xff, 0xff, 0x97, 0x1c, 0xec, 0x1c, 0xff,
+ 0xff, 0x2c, 0x1d, 0xd8, 0x1d, 0xff, 0xff, 0x41,
+ 0x20, 0x5f, 0x21, 0xff, 0xff, 0x82, 0x25, 0xfe,
+ 0x25, 0xff, 0xff, 0x6f, 0x2b, 0xb2, 0x2b, 0xdd,
+ 0x2b, 0x5d, 0x2c, 0x9b, 0x2c, 0xff, 0xff, 0x02,
+ 0x31, 0x1b, 0x31, 0x37, 0x31, 0x6f, 0x31, 0xff,
+ 0xff, 0x7d, 0x31, 0x15, 0x32, 0xff, 0xff, 0x41,
+ 0x3e, 0xa3, 0x3e, 0x08, 0x3f, 0xea, 0x3f, 0xff,
+ 0xff, 0x0d, 0x40, 0x39, 0x44, 0x6a, 0x44, 0xff,
+ 0xff, 0xe2, 0x58, 0xc5, 0x59, 0x9d, 0x5a, 0xd7,
+ 0x5a, 0xff, 0xff, 0xf3, 0x5a, 0xa9, 0x5b, 0x53,
+ 0x5c, 0x99, 0x5c, 0x3e, 0x5d, 0xff, 0xff, 0x5b,
+ 0x5d, 0x0a, 0x5f, 0xae, 0x5f, 0xcf, 0x5f, 0xff,
+ 0xff, 0xfe, 0x5f, 0x88, 0x60, 0xff, 0xff, 0xf0,
+ 0x62, 0x18, 0x63, 0x47, 0x63, 0x6b, 0x63, 0x82,
+ 0x63, 0xff, 0xff, 0xf7, 0x6b, 0x7f, 0x6d, 0x7b,
+ 0x6e, 0xa4, 0x6e, 0xff, 0xff, 0xc0, 0x6e, 0xe9,
+ 0x6e, 0x03, 0x6f, 0xff, 0xff, 0x5e, 0x73, 0xb3,
+ 0x73, 0xe8, 0x73, 0xff, 0xff, 0xfc, 0x64, 0x4c,
+ 0x65, 0xab, 0x65, 0xff, 0xff, 0x03, 0x74, 0x59,
+ 0x74, 0xff, 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, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0xec, 0x50,
+ 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75,
+ 0x6e, 0x64, 0x73, 0x00, 0x69, 0x41, 0x4e, 0x44,
+ 0x52, 0x5a, 0x45, 0x4a, 0x20, 0x44, 0x4f, 0x42,
+ 0x52, 0x5a, 0x59, 0x3b, 0x53, 0x4b, 0x49, 0x00,
+ 0x00, 0xe3, 0xd2, 0x50, 0x6d, 0x75, 0x73, 0x69,
+ 0x63, 0x00, 0x69, 0x52, 0x41, 0x44, 0x45, 0x4b,
+ 0x20, 0x53, 0x5a, 0x41, 0x4d, 0x52, 0x45, 0x4a,
+ 0x00, 0x00, 0xd7, 0xe6, 0x50, 0x61, 0x6e, 0x69,
+ 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61,
+ 0x6e, 0x64, 0x20, 0x67, 0x72, 0x61, 0x70, 0x68,
+ 0x69, 0x63, 0x73, 0x00, 0x69, 0x47, 0x52, 0x5a,
+ 0x45, 0x47, 0x4f, 0x52, 0x5a, 0x20, 0x4d, 0x49,
+ 0x45, 0x43, 0x48, 0x4f, 0x57, 0x53, 0x4b, 0x49,
+ 0x00, 0x00, 0xd9, 0xe8, 0x50, 0x70, 0x72, 0x6f,
+ 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67,
+ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x00, 0x69, 0x41, 0x44, 0x52,
+ 0x49, 0x41, 0x4e, 0x20, 0x43, 0x48, 0x4d, 0x49,
+ 0x45, 0x4c, 0x41, 0x52, 0x5a, 0x00, 0x00, 0xdd,
+ 0xec, 0x5c, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x72, 0x69,
+ 0x6e, 0x67, 0x20, 0x6a, 0x6f, 0x75, 0x72, 0x6e,
+ 0x65, 0x79, 0x2e, 0x2e, 0x2e, 0x00, 0x00, 0xdd,
+ 0xec, 0x5c, 0x54, 0x48, 0x45, 0x20, 0x45, 0x4e,
+ 0x44, 0x00, 0x00, 0x70, 0x72, 0x6f, 0x67, 0x72,
+ 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x00, 0x41,
+ 0x44, 0x52, 0x49, 0x41, 0x4e, 0x20, 0x43, 0x48,
+ 0x4d, 0x49, 0x45, 0x4c, 0x41, 0x52, 0x5a, 0x00,
+ 0x20, 0x00, 0x20, 0x00, 0x61, 0x6e, 0x69, 0x6d,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x47, 0x52,
+ 0x5a, 0x45, 0x47, 0x4f, 0x52, 0x5a, 0x20, 0x4d,
+ 0x49, 0x45, 0x43, 0x48, 0x4f, 0x57, 0x53, 0x4b,
+ 0x49, 0x00, 0x20, 0x00, 0x20, 0x00, 0x61, 0x64,
+ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
+ 0x20, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x00, 0x54, 0x4f, 0x4d, 0x41,
+ 0x53, 0x5a, 0x20, 0x50, 0x49, 0x4c, 0x49, 0x4b,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x62, 0x61, 0x63,
+ 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73,
+ 0x00, 0x41, 0x4e, 0x44, 0x52, 0x5a, 0x45, 0x4a,
+ 0x20, 0x44, 0x4f, 0x42, 0x52, 0x5a, 0x59, 0x4e,
+ 0x53, 0x4b, 0x49, 0x00, 0x20, 0x00, 0x20, 0x00,
+ 0x6d, 0x75, 0x73, 0x69, 0x63, 0x00, 0x52, 0x41,
+ 0x44, 0x45, 0x4b, 0x20, 0x53, 0x5a, 0x41, 0x4d,
+ 0x52, 0x45, 0x4a, 0x00, 0x20, 0x00, 0x20, 0x00,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x61, 0x72,
+ 0x74, 0x00, 0x44, 0x41, 0x52, 0x49, 0x55, 0x53,
+ 0x5a, 0x20, 0x41, 0x4e, 0x41, 0x43, 0x4b, 0x49,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x20, 0x68, 0x65, 0x6c, 0x70, 0x00, 0x50, 0x45,
+ 0x54, 0x45, 0x52, 0x20, 0x57, 0x45, 0x4c, 0x4c,
+ 0x53, 0x00, 0x20, 0x00, 0x20, 0x00, 0x62, 0x65,
+ 0x74, 0x61, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72,
+ 0x73, 0x00, 0x54, 0x4f, 0x4d, 0x41, 0x53, 0x5a,
+ 0x20, 0x46, 0x55, 0x52, 0x4d, 0x41, 0x4e, 0x49,
+ 0x55, 0x4b, 0x00, 0x50, 0x41, 0x54, 0x52, 0x59,
+ 0x4b, 0x20, 0x53, 0x41, 0x57, 0x49, 0x43, 0x4b,
+ 0x49, 0x00, 0x50, 0x41, 0x57, 0x45, 0x4c, 0x20,
+ 0x4d, 0x49, 0x45, 0x43, 0x48, 0x4f, 0x57, 0x53,
+ 0x4b, 0x49, 0x00, 0x4d, 0x41, 0x52, 0x45, 0x4b,
+ 0x20, 0x43, 0x48, 0x4d, 0x49, 0x45, 0x4c, 0x41,
+ 0x52, 0x5a, 0x00, 0x4a, 0x45, 0x44, 0x52, 0x45,
+ 0x4b, 0x20, 0x57, 0x49, 0x43, 0x48, 0x41, 0x00,
+ 0x4d, 0x52, 0x2e, 0x20, 0x4a, 0x4f, 0x48, 0x4e,
+ 0x20, 0x44, 0x4f, 0x45, 0x00, 0x4d, 0x41, 0x52,
+ 0x43, 0x49, 0x4e, 0x20, 0x44, 0x52, 0x45, 0x57,
+ 0x53, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
+ 0x69, 0x64, 0x65, 0x61, 0x73, 0x00, 0x41, 0x44,
+ 0x52, 0x49, 0x41, 0x4e, 0x20, 0x43, 0x48, 0x4d,
+ 0x49, 0x45, 0x4c, 0x41, 0x52, 0x5a, 0x00, 0x47,
+ 0x52, 0x5a, 0x45, 0x47, 0x4f, 0x52, 0x5a, 0x20,
+ 0x4d, 0x49, 0x45, 0x43, 0x48, 0x4f, 0x57, 0x53,
+ 0x4b, 0x49, 0x00, 0x41, 0x4e, 0x44, 0x52, 0x5a,
+ 0x45, 0x4a, 0x20, 0x53, 0x41, 0x57, 0x49, 0x43,
+ 0x4b, 0x49, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x00, 0x4a,
+ 0x41, 0x52, 0x4f, 0x53, 0x5d, 0x41, 0x57, 0x20,
+ 0x57, 0x45, 0x49, 0x53, 0x53, 0x00, 0x41, 0x47,
+ 0x45, 0x4e, 0x43, 0x4a, 0x41, 0x20, 0x53, 0x54,
+ 0x59, 0x4c, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x74, 0x68, 0x61, 0x6e, 0x6b, 0x73, 0x00,
+ 0x48, 0x45, 0x4e, 0x52, 0x59, 0x20, 0x4b, 0x55,
+ 0x54, 0x54, 0x4e, 0x45, 0x52, 0x00, 0x55, 0x2d,
+ 0x4b, 0x4e, 0x4f, 0x57, 0x2d, 0x57, 0x48, 0x4f,
+ 0x2d, 0x55, 0x2d, 0x52, 0x2d, 0x42, 0x55, 0x54,
+ 0x2d, 0x57, 0x41, 0x4e, 0x54, 0x2d, 0x32, 0x2d,
+ 0x53, 0x54, 0x41, 0x59, 0x2d, 0x49, 0x4e, 0x2d,
+ 0x53, 0x48, 0x41, 0x44, 0x4f, 0x57, 0x00, 0x45,
+ 0x50, 0x49, 0x43, 0x20, 0x4d, 0x45, 0x47, 0x41,
+ 0x47, 0x41, 0x4d, 0x45, 0x53, 0x00, 0x58, 0x4c,
+ 0x41, 0x4e, 0x44, 0x20, 0x53, 0x4f, 0x46, 0x54,
+ 0x57, 0x41, 0x52, 0x45, 0x20, 0x50, 0x55, 0x42,
+ 0x4c, 0x49, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x00,
+ 0x4b, 0x41, 0x54, 0x41, 0x52, 0x5a, 0x59, 0x4e,
+ 0x41, 0x20, 0x4d, 0x49, 0x45, 0x43, 0x48, 0x4f,
+ 0x57, 0x53, 0x4b, 0x41, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x73, 0x70, 0x65, 0x63, 0x69,
+ 0x61, 0x6c, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x6b,
+ 0x73, 0x00, 0x41, 0x4e, 0x44, 0x52, 0x5a, 0x45,
+ 0x4a, 0x20, 0x4d, 0x49, 0x43, 0x48, 0x41, 0x4c,
+ 0x41, 0x4b, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x70, 0x72, 0x6f,
+ 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00,
+ 0x4d, 0x45, 0x54, 0x52, 0x4f, 0x50, 0x4f, 0x4c,
+ 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57,
+ 0x41, 0x52, 0x45, 0x20, 0x48, 0x4f, 0x55, 0x53,
+ 0x45, 0x00, 0x28, 0x63, 0x29, 0x20, 0x31, 0x39,
+ 0x39, 0x34, 0x2d, 0x31, 0x39, 0x39, 0x35, 0x00,
+ 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x41, 0x6c,
+ 0x6c, 0x20, 0x61, 0x6c, 0x6c, 0x75, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
+ 0x70, 0x75, 0x6e, 0x73, 0x00, 0x61, 0x72, 0x65,
+ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69,
+ 0x6f, 0x6e, 0x61, 0x6c, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
+ 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00
+};
+
+// Dialog Strings Block
+
+#define ANIM_WAIT "\xff"
+#define NEW_LINE "\n"
+#define DISPLAY_MESSAGE "\n\n"
+#define CHANGE_CHARACTER "\n\n\n"
+#define END_DIALOG "\n\n\n\n"
+
+const static char* dialog_0[] = {
+ ANIM_WAIT,
+ "Good day.",
+ CHANGE_CHARACTER,
+ "Yeah.",
+ CHANGE_CHARACTER,
+ "Why are you standing here?",
+ CHANGE_CHARACTER,
+ "It's a question of gravitation.",
+ CHANGE_CHARACTER,
+ "Extremely funny joke.",
+ DISPLAY_MESSAGE,
+ "For a soldier.",
+ CHANGE_CHARACTER,
+ "I'm not a soldier, although I tried",
+ NEW_LINE,
+ "to be.",
+ DISPLAY_MESSAGE,
+ "I didn't pass the intell...",
+ NEW_LINE,
+ "the physical test.",
+ DISPLAY_MESSAGE,
+ "They ordered me to shoot at",
+ NEW_LINE,
+ "a thrown coin when jumping",
+ NEW_LINE,
+ "from the tree onto a horse.",
+ CHANGE_CHARACTER,
+ "Yep, that seems hard.",
+ CHANGE_CHARACTER,
+ "Special Forces ain't a piece of cake,",
+ NEW_LINE,
+ "you know.",
+ CHANGE_CHARACTER,
+ "I'm sorry you didn't make it.",
+ CHANGE_CHARACTER,
+ "Yeah, I missed the horse.",
+ END_DIALOG
+};
+
+const static char* dialog_1[] = {
+ "So...",
+ DISPLAY_MESSAGE,
+ "What are you doing now?",
+ CHANGE_CHARACTER,
+ "Wanna hear a funny answer?",
+ CHANGE_CHARACTER,
+ "Please don't bother.",
+ CHANGE_CHARACTER,
+ "All right, but you know, there's not much",
+ NEW_LINE,
+ "entertainment here.",
+ DISPLAY_MESSAGE,
+ "Sometimes I like to joke a bit.",
+ NEW_LINE,
+ "Or a byte, heh-heh!",
+ CHANGE_CHARACTER,
+ "Well then...",
+ CHANGE_CHARACTER,
+ "I'm guarding this place...",
+ CHANGE_CHARACTER,
+ "Wow. That's a surprise.",
+ CHANGE_CHARACTER,
+ "...And I'm told to kill ANYBODY",
+ NEW_LINE,
+ "who tries to get in.",
+ CHANGE_CHARACTER,
+ "What about the owner?",
+ CHANGE_CHARACTER,
+ "He's not just ANYBODY, you know.",
+ CHANGE_CHARACTER,
+ "I guess you won't let ME in then?",
+ CHANGE_CHARACTER,
+ "Bingo.",
+ CHANGE_CHARACTER,
+ "Even if say I please?",
+ CHANGE_CHARACTER,
+ "No way, kiddo.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "PLEEEEEASE.",
+ CHANGE_CHARACTER,
+ "Forget it.",
+ NEW_LINE,
+ "I've got a heart of stone.",
+ CHANGE_CHARACTER,
+ "Like your brain.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "I don't follow.",
+ CHANGE_CHARACTER,
+ "Never mind.",
+ NEW_LINE,
+ "How can I soften your stone heart?",
+ CHANGE_CHARACTER,
+ "You can't. I'm a really tough guy.",
+ DISPLAY_MESSAGE,
+ "But come here, I'll give you",
+ NEW_LINE,
+ "a consolation...",
+ END_DIALOG
+};
+
+const static char* dialog_2[] = {
+ "Thanks. What is it?",
+ CHANGE_CHARACTER,
+ "Chocolate candy.",
+ DISPLAY_MESSAGE,
+ "My employer gave me a few of these",
+ NEW_LINE,
+ "for lunch and...",
+ CHANGE_CHARACTER,
+ "Is your employer home?!",
+ CHANGE_CHARACTER,
+ "Mr. John Noty? Yeah, why?",
+ CHANGE_CHARACTER,
+ "Oh, nothing...",
+ DISPLAY_MESSAGE,
+ "John Noty...",
+ DISPLAY_MESSAGE,
+ "I think I've heard of him...",
+ CHANGE_CHARACTER,
+ "You should have. He's making big money,",
+ NEW_LINE,
+ "you know.",
+ DISPLAY_MESSAGE,
+ "Especially lately...",
+ CHANGE_CHARACTER,
+ "Yeah?...",
+ CHANGE_CHARACTER,
+ "Well, I don't know how.",
+ DISPLAY_MESSAGE,
+ "Maybe it has something to do with",
+ NEW_LINE,
+ "the mad scientist that came round",
+ NEW_LINE,
+ "one day...",
+ DISPLAY_MESSAGE,
+ "Oh, you think you're smart, don't you?!",
+ NEW_LINE,
+ "Are you a spy?!",
+ CHANGE_CHARACTER,
+ "Hey, I'm just a common homeboy.",
+ DISPLAY_MESSAGE,
+ "If you don't wanna talk,",
+ NEW_LINE,
+ "don't talk.",
+ CHANGE_CHARACTER,
+ "Mr. Bad Gay told me to watch",
+ NEW_LINE,
+ "for spies...",
+ CHANGE_CHARACTER,
+ "Do I really look like a spy?",
+ CHANGE_CHARACTER,
+ "...And kill them immediately...",
+ CHANGE_CHARACTER,
+ "Hey, chill...",
+ CHANGE_CHARACTER,
+ "...And I haven't killed anybody",
+ NEW_LINE,
+ "for a loooong time...",
+ CHANGE_CHARACTER,
+ "It's about this candy, isn't it?",
+ NEW_LINE,
+ "Do you want it back? No problem.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Sorry, I just got carried away.",
+ CHANGE_CHARACTER,
+ "I understand.",
+ NEW_LINE,
+ "It's hot around here.",
+ CHANGE_CHARACTER,
+ "Yeah.",
+ END_DIALOG
+};
+
+const static char* dialog_3[] = {
+ "Mister guard, I...",
+ CHANGE_CHARACTER,
+ "Listen, boy.",
+ DISPLAY_MESSAGE,
+ "A spy or not a spy, it's out of",
+ NEW_LINE,
+ "the question.",
+ DISPLAY_MESSAGE,
+ "You won't get in, no matter if you just want",
+ NEW_LINE,
+ "to visit the place, steal something or",
+ NEW_LINE,
+ "talk to Mr. John Noty.",
+ DISPLAY_MESSAGE,
+ "Also you won't make me talk.",
+ DISPLAY_MESSAGE,
+ "One more try and I'll make a few",
+ NEW_LINE,
+ "highways for worms.",
+ DISPLAY_MESSAGE,
+ "In your body.",
+ DISPLAY_MESSAGE,
+ "Got it?",
+ CHANGE_CHARACTER,
+ "Got it.",
+ END_DIALOG
+};
+
+const static char* dialog_4[] = {
+ "Nice suit.",
+ CHANGE_CHARACTER,
+ "Yeah.",
+ END_DIALOG
+};
+
+const static char* dialog_5[] = {
+ CHANGE_CHARACTER,
+ "Damn!",
+ DISPLAY_MESSAGE,
+ "It's only you!...",
+ END_DIALOG
+};
+
+const static char* dialog_6[] = {
+ "Hey!",
+ CHANGE_CHARACTER,
+ "What?",
+ CHANGE_CHARACTER,
+ "What's in this bottle?",
+ CHANGE_CHARACTER,
+ "You can't prove anything!",
+ CHANGE_CHARACTER,
+ "Something hot, I guess?..",
+ CHANGE_CHARACTER,
+ "None of your business.",
+ CHANGE_CHARACTER,
+ "Drinking on duty, huh?",
+ CHANGE_CHARACTER,
+ "You think you've almost got me,",
+ NEW_LINE,
+ "don't you?",
+ DISPLAY_MESSAGE,
+ "Forget it.",
+ END_DIALOG
+};
+
+const static char* dialog_7[] = {
+ "Hey!",
+ CHANGE_CHARACTER,
+ "You've seen nothing.",
+ DISPLAY_MESSAGE,
+ "I'm clean.",
+ END_DIALOG
+};
+
+const static char* dialog_8[] = {
+ "Hey!",
+ CHANGE_CHARACTER,
+ "Get lost.",
+ END_DIALOG
+};
+
+const static char* dialog_9[] = {
+ "What would you say if I gave you some",
+ NEW_LINE,
+ "gold?...",
+ CHANGE_CHARACTER,
+ "I'd say thanks.",
+ CHANGE_CHARACTER,
+ "Would you let me in?",
+ CHANGE_CHARACTER,
+ "I guess so...",
+ CHANGE_CHARACTER,
+ "You have to be sure.",
+ CHANGE_CHARACTER,
+ "OK, I'm sure. I will let you in.",
+ CHANGE_CHARACTER,
+ "All right. Here we go.",
+ END_DIALOG
+};
+
+const static char* dialog_10[] = {
+ "Now please open the door.",
+ CHANGE_CHARACTER,
+ "No way. Now buzz off.",
+ CHANGE_CHARACTER,
+ "Hey! I gave you the gold, remember?...",
+ CHANGE_CHARACTER,
+ "What gold?",
+ CHANGE_CHARACTER,
+ "WHAT GOLD?!?",
+ CHANGE_CHARACTER,
+ "I don't know nothing 'bout any gold.",
+ END_DIALOG
+};
+
+const static char* dialog_11[] = {
+ "You... You...",
+ CHANGE_CHARACTER,
+ "Buzz off.",
+ CHANGE_CHARACTER,
+ "You said you'd let me in!",
+ DISPLAY_MESSAGE,
+ "But you've let me down!",
+ CHANGE_CHARACTER,
+ "Yeah, but I'll let you off.",
+ END_DIALOG
+};
+
+const static char* dialog_12[] = {
+ "You can't even trust corrupt",
+ NEW_LINE,
+ "guards these days.",
+ END_DIALOG
+};
+
+const static char* dialog_13[] = {
+ "Hi.",
+ CHANGE_CHARACTER,
+ "Hello.",
+ CHANGE_CHARACTER,
+ "I'm Mark.",
+ DISPLAY_MESSAGE,
+ "What's your name?",
+ CHANGE_CHARACTER,
+ "What's my name?",
+ CHANGE_CHARACTER,
+ "I don't know, you tell me.",
+ CHANGE_CHARACTER,
+ "Me.",
+ CHANGE_CHARACTER,
+ "Don't tell me 'me', just say",
+ NEW_LINE,
+ "your name!",
+ CHANGE_CHARACTER,
+ "Your na..",
+ CHANGE_CHARACTER,
+ "Gee!",
+ DISPLAY_MESSAGE,
+ "What did your dad call you?",
+ CHANGE_CHARACTER,
+ "Sonny.",
+ CHANGE_CHARACTER,
+ "Sonny as in the name or sonny",
+ NEW_LINE,
+ "as in son?",
+ CHANGE_CHARACTER,
+ "Sonny.",
+ CHANGE_CHARACTER,
+ "Are you stupid or just rude?",
+ CHANGE_CHARACTER,
+ "Sonny, I am.",
+ CHANGE_CHARACTER,
+ "(sigh)",
+ END_DIALOG
+};
+
+const static char* dialog_14[] = {
+ "Listen, Sonny or whatever.",
+ DISPLAY_MESSAGE,
+ "What are you trying to do",
+ NEW_LINE,
+ "with this ball?",
+ CHANGE_CHARACTER,
+ "Well, grandpa said he'd take",
+ NEW_LINE,
+ "me to ZOO if I score.",
+ CHANGE_CHARACTER,
+ "I think you should throw the ball",
+ NEW_LINE,
+ "a little bit higher.",
+ CHANGE_CHARACTER,
+ "Yeah, I know.",
+ CHANGE_CHARACTER,
+ "So?",
+ CHANGE_CHARACTER,
+ "So what?",
+ CHANGE_CHARACTER,
+ "So why don't you do it?!",
+ CHANGE_CHARACTER,
+ "It must be something with",
+ NEW_LINE,
+ "my eyes.",
+ CHANGE_CHARACTER,
+ "You should wear glassess?",
+ CHANGE_CHARACTER,
+ "No, why?",
+ CHANGE_CHARACTER,
+ "(sigh)",
+ DISPLAY_MESSAGE,
+ "Maybe you're just too weak to",
+ NEW_LINE,
+ "send the ball high enough?",
+ CHANGE_CHARACTER,
+ "No kidding.",
+ CHANGE_CHARACTER,
+ "(sigh)",
+ END_DIALOG
+};
+
+const static char* dialog_15[] = {
+ "Hey, kid!",
+ DISPLAY_MESSAGE,
+ "I've got a great idea!",
+ CHANGE_CHARACTER,
+ "Yeah?",
+ CHANGE_CHARACTER,
+ "Go to your grandpa and",
+ NEW_LINE,
+ "say you've scored!",
+ CHANGE_CHARACTER,
+ "You mean lie?",
+ CHANGE_CHARACTER,
+ "Well, sort of...",
+ CHANGE_CHARACTER,
+ "I NEVER LIE!",
+ CHANGE_CHARACTER,
+ "Never?!",
+ CHANGE_CHARACTER,
+ "NEVER!",
+ CHANGE_CHARACTER,
+ "Good boy.",
+ END_DIALOG
+};
+
+const static char* dialog_16[] = {
+ "Hey...",
+ CHANGE_CHARACTER,
+ "Go away.",
+ END_DIALOG
+};
+
+const static char* dialog_17[] = {
+ "Hey, boy! It's unbelievable!",
+ CHANGE_CHARACTER,
+ "What?",
+ CHANGE_CHARACTER,
+ "You might think it's a joke,",
+ NEW_LINE,
+ "but there's a hand holding",
+ NEW_LINE,
+ "a sword appearing from the lake!",
+ CHANGE_CHARACTER,
+ "OK, I'll look but just don't ",
+ NEW_LINE,
+ "think you've fooled me.",
+ NEW_LINE,
+ "This hand appears every year.",
+ DISPLAY_MESSAGE,
+ "Maybe this time will bring me luck",
+ NEW_LINE,
+ "at basketball...",
+ END_DIALOG
+};
+
+const static char* dialog_18[] = {
+ "Good day, sir!",
+ CHANGE_CHARACTER,
+ "And good day to",
+ NEW_LINE,
+ "you, my son.",
+ CHANGE_CHARACTER,
+ "My name is Mark, sir.",
+ CHANGE_CHARACTER,
+ "Great.",
+ DISPLAY_MESSAGE,
+ "What do you want?",
+ CHANGE_CHARACTER,
+ "I'm just admiring your arm-chair.",
+ DISPLAY_MESSAGE,
+ "It's nice.",
+ CHANGE_CHARACTER,
+ "Nice and pretty",
+ NEW_LINE,
+ "comfortable.",
+ CHANGE_CHARACTER,
+ "And big.",
+ CHANGE_CHARACTER,
+ "2-person model.",
+ END_DIALOG
+};
+
+const static char* dialog_19[] = {
+ "Do you know the boy",
+ NEW_LINE,
+ "playing with the ball",
+ NEW_LINE,
+ "outside?",
+ CHANGE_CHARACTER,
+ "Of course, he's",
+ NEW_LINE,
+ "my grandson.",
+ CHANGE_CHARACTER,
+ "Nice kid.",
+ CHANGE_CHARACTER,
+ "Nice and smart.",
+ CHANGE_CHARACTER,
+ "Nice and small.",
+ CHANGE_CHARACTER,
+ "He'll grow.",
+ CHANGE_CHARACTER,
+ "And become a very",
+ NEW_LINE,
+ "famous basketball",
+ NEW_LINE,
+ "player?...",
+ CHANGE_CHARACTER,
+ "I hope he won't.",
+ CHANGE_CHARACTER,
+ "Then tell him to stop playing!",
+ CHANGE_CHARACTER,
+ "Yeah.",
+ DISPLAY_MESSAGE,
+ "Later.",
+ DISPLAY_MESSAGE,
+ "Maybe.",
+ DISPLAY_MESSAGE,
+ "Right now I need",
+ NEW_LINE,
+ "some rest.",
+ END_DIALOG
+};
+
+const static char* dialog_20[] = {
+ "Are you going to sit here",
+ NEW_LINE,
+ "all day long?",
+ CHANGE_CHARACTER,
+ "Hope so.",
+ CHANGE_CHARACTER,
+ "For all of this beautiful day?",
+ CHANGE_CHARACTER,
+ "Hope so.",
+ CHANGE_CHARACTER,
+ "Aren't you interested",
+ NEW_LINE,
+ "in the outside world?!",
+ CHANGE_CHARACTER,
+ "Not really.",
+ CHANGE_CHARACTER,
+ "Why's that?",
+ CHANGE_CHARACTER,
+ "I'm not interested",
+ NEW_LINE,
+ "in news.",
+ CHANGE_CHARACTER,
+ "But...",
+ CHANGE_CHARACTER,
+ "As they say...",
+ DISPLAY_MESSAGE,
+ "The best news",
+ NEW_LINE,
+ "is no news.",
+ CHANGE_CHARACTER,
+ "But people must know about",
+ NEW_LINE,
+ "progress and stuff!",
+ CHANGE_CHARACTER,
+ "I won't even bother",
+ NEW_LINE,
+ "to ask you why...",
+ CHANGE_CHARACTER,
+ "Because...",
+ DISPLAY_MESSAGE,
+ "Er...",
+ DISPLAY_MESSAGE,
+ "Because...",
+ DISPLAY_MESSAGE,
+ "Uhm...",
+ CHANGE_CHARACTER,
+ "Right.",
+ NEW_LINE,
+ " ",
+ END_DIALOG
+};
+
+const static char* dialog_21[] = {
+ "Anything new?",
+ CHANGE_CHARACTER,
+ "Hope not.",
+ END_DIALOG
+};
+
+const static char* dialog_22[] = {
+ "May I borrow this shotgun?",
+ CHANGE_CHARACTER,
+ "No.",
+ CHANGE_CHARACTER,
+ "Pleeeease...",
+ CHANGE_CHARACTER,
+ "Young man, this weapon is",
+ NEW_LINE,
+ "very old and dangerous...",
+ DISPLAY_MESSAGE,
+ "and I'm a responsible man,",
+ NEW_LINE,
+ "got it?",
+ CHANGE_CHARACTER,
+ "But I will...",
+ CHANGE_CHARACTER,
+ "No.",
+ END_DIALOG
+};
+
+const static char* dialog_23[] = {
+ "Maybe you will change your mind",
+ NEW_LINE,
+ "about the shotgun?...",
+ CHANGE_CHARACTER,
+ "No.",
+ DISPLAY_MESSAGE,
+ "Nope.",
+ DISPLAY_MESSAGE,
+ "Niet.",
+ DISPLAY_MESSAGE,
+ "Nein.",
+ DISPLAY_MESSAGE,
+ "Niente.",
+ DISPLAY_MESSAGE,
+ "Nie.",
+ DISPLAY_MESSAGE,
+ "Ne.",
+ CHANGE_CHARACTER,
+ "OK, I got it.",
+ END_DIALOG
+};
+
+const static char* dialog_24[] = {
+ "May I search your drawers?",
+ CHANGE_CHARACTER,
+ "Yes.",
+ CHANGE_CHARACTER,
+ "YES?!?",
+ CHANGE_CHARACTER,
+ "Oh, I forgot to tell you they are all",
+ NEW_LINE,
+ "empty.",
+ DISPLAY_MESSAGE,
+ "Only the right upper one has a handkerchief",
+ NEW_LINE,
+ "in it.",
+ DISPLAY_MESSAGE,
+ "You can take if you want, I don't need it.",
+ CHANGE_CHARACTER,
+ "Well, thank you.",
+ DISPLAY_MESSAGE,
+ "You are very... kind...",
+ CHANGE_CHARACTER,
+ "Just don't think I let you take",
+ NEW_LINE,
+ "anything else.",
+ CHANGE_CHARACTER,
+ "Of course, I wouldn't even dream.",
+ END_DIALOG
+};
+
+const static char* dialog_25[] = {
+ "May I borrow the fan?",
+ CHANGE_CHARACTER,
+ "No way. It makes this hot day more",
+ NEW_LINE,
+ "bearable.",
+ END_DIALOG
+};
+
+const static char* dialog_26[] = {
+ "About this fan...",
+ CHANGE_CHARACTER,
+ "Come back in winter.",
+ END_DIALOG
+};
+
+const static char* dialog_27[] = {
+ "Nice weather we have",
+ NEW_LINE,
+ "today...",
+ CHANGE_CHARACTER,
+ "Indeed it is,",
+ NEW_LINE,
+ "my dear.",
+ END_DIALOG
+};
+
+const static char* dialog_28[] = {
+ "Is it your daughter?",
+ CHANGE_CHARACTER,
+ "You are very kind,",
+ NEW_LINE,
+ "my dear, making",
+ NEW_LINE,
+ "me so young,",
+ DISPLAY_MESSAGE,
+ "but of course",
+ NEW_LINE,
+ "that sweetie is my",
+ NEW_LINE,
+ "grand-daughter.",
+ CHANGE_CHARACTER,
+ "Oh, yes! She really",
+ NEW_LINE,
+ "looks grand!",
+ CHANGE_CHARACTER,
+ "Well, I was once",
+ NEW_LINE,
+ "like that...",
+ CHANGE_CHARACTER,
+ "But you still are!",
+ CHANGE_CHARACTER,
+ "How sweet of you...",
+ DISPLAY_MESSAGE,
+ "But nobody sings",
+ NEW_LINE,
+ "at my window",
+ NEW_LINE,
+ "anymore,",
+ DISPLAY_MESSAGE,
+ "if you know",
+ NEW_LINE,
+ "what I mean.",
+ CHANGE_CHARACTER,
+ "Errr...",
+ DISPLAY_MESSAGE,
+ "Yes...",
+ DISPLAY_MESSAGE,
+ "I know...",
+ DISPLAY_MESSAGE,
+ "I have similiar",
+ NEW_LINE,
+ "feelings myself...",
+ DISPLAY_MESSAGE,
+ "Sometimes...",
+ DISPLAY_MESSAGE,
+ "I guess...",
+ END_DIALOG
+};
+
+const static char* dialog_29[] = {
+ "May I ask what you are",
+ NEW_LINE,
+ "doing?",
+ CHANGE_CHARACTER,
+ "Yes, you may,",
+ NEW_LINE,
+ "my dear.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "What are you doing?",
+ CHANGE_CHARACTER,
+ "I'm knitting.",
+ CHANGE_CHARACTER,
+ "I understand.",
+ DISPLAY_MESSAGE,
+ "What are you knitting?",
+ CHANGE_CHARACTER,
+ "This time you",
+ NEW_LINE,
+ "didn't ask if",
+ NEW_LINE,
+ "you may ask.",
+ CHANGE_CHARACTER,
+ "Oh, sorry. May I ask?",
+ CHANGE_CHARACTER,
+ "Ask about what?",
+ CHANGE_CHARACTER,
+ "About what are you",
+ NEW_LINE,
+ "knitting.",
+ CHANGE_CHARACTER,
+ "You asked me",
+ NEW_LINE,
+ "about that before,",
+ NEW_LINE,
+ "didn't you?",
+ END_DIALOG
+};
+
+const static char* dialog_30[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "Indeed it is.",
+ END_DIALOG
+};
+
+const static char* dialog_31[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "You know.",
+ END_DIALOG
+};
+
+const static char* dialog_32[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "It's nice you ask,",
+ NEW_LINE,
+ "but I've told you",
+ NEW_LINE,
+ "already.",
+ END_DIALOG
+};
+
+const static char* dialog_33[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "Don't repeat",
+ NEW_LINE,
+ "yourself.",
+ END_DIALOG
+};
+
+const static char* dialog_34[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "Don't interrupt",
+ NEW_LINE,
+ "my work.",
+ END_DIALOG
+};
+
+const static char* dialog_35[] = {
+ "Is everything OK?",
+ CHANGE_CHARACTER,
+ "Oh shut up.",
+ END_DIALOG
+};
+
+const static char* dialog_36[] = {
+ "Is everything OK?",
+ END_DIALOG
+};
+
+const static char* dialog_37[] = {
+ "Excuse my",
+ NEW_LINE,
+ "immodesty...",
+ CHANGE_CHARACTER,
+ "Yes?...",
+ CHANGE_CHARACTER,
+ "...but I thought",
+ NEW_LINE,
+ "that an innocent",
+ NEW_LINE,
+ "flower...",
+ DISPLAY_MESSAGE,
+ "...would express",
+ NEW_LINE,
+ "my happiness at",
+ NEW_LINE,
+ "meeting you.",
+ END_DIALOG
+};
+
+const static char* dialog_38[] = {
+ "I hope you",
+ NEW_LINE,
+ "like it...",
+ CHANGE_CHARACTER,
+ "Oh, dear!",
+ DISPLAY_MESSAGE,
+ "I'm really",
+ NEW_LINE,
+ "touched...",
+ DISPLAY_MESSAGE,
+ "That's the nicest",
+ NEW_LINE,
+ "thing anybody has",
+ NEW_LINE,
+ "done for me...",
+ DISPLAY_MESSAGE,
+ "...in last ten",
+ NEW_LINE,
+ "years!",
+ DISPLAY_MESSAGE,
+ "Thank you from all",
+ NEW_LINE,
+ "my heart!",
+ CHANGE_CHARACTER,
+ "You're welcome.",
+ END_DIALOG
+};
+
+const static char* dialog_39[] = {
+ "Would you care for",
+ NEW_LINE,
+ "another flower?",
+ CHANGE_CHARACTER,
+ "You're very kind,",
+ NEW_LINE,
+ "my boy, but no,",
+ NEW_LINE,
+ "thank you.",
+ END_DIALOG
+};
+
+const static char* dialog_40[] = {
+ "Are you sure you don't",
+ NEW_LINE,
+ "want another flower?",
+ CHANGE_CHARACTER,
+ "Yes. I'm sure.",
+ END_DIALOG
+};
+
+const static char* dialog_41[] = {
+ "May I borrow this",
+ NEW_LINE,
+ "duster?",
+ CHANGE_CHARACTER,
+ "We don't know each",
+ NEW_LINE,
+ "other too well, and",
+ NEW_LINE,
+ "I don't...",
+ DISPLAY_MESSAGE,
+ "...lend things to",
+ NEW_LINE,
+ "anybody who asks",
+ NEW_LINE,
+ "for them.",
+ CHANGE_CHARACTER,
+ "Don't I look reliable?",
+ CHANGE_CHARACTER,
+ "I've said enough.",
+ END_DIALOG
+};
+
+const static char* dialog_42[] = {
+ "Any chances to borrow the",
+ NEW_LINE,
+ "feather duster?",
+ CHANGE_CHARACTER,
+ "I like it where it is.",
+ END_DIALOG
+};
+
+const static char* dialog_43[] = {
+ "Do you think you could",
+ NEW_LINE,
+ "lend me the feather duster",
+ NEW_LINE,
+ "now?",
+ CHANGE_CHARACTER,
+ "But of course, I can't",
+ NEW_LINE,
+ "see why I shouldn't...",
+ DISPLAY_MESSAGE,
+ "...help to such a nice",
+ NEW_LINE,
+ "young man like you!..",
+ CHANGE_CHARACTER,
+ "Thank you very much.",
+ END_DIALOG
+};
+
+const static char* dialog_44[] = {
+ "Ha! I'm even faster than Indy`!",
+ CHANGE_CHARACTER,
+ "I've seen it all, boy!",
+ END_DIALOG
+};
+
+const static char* dialog_45[] = {
+ "Er...",
+ DISPLAY_MESSAGE,
+ "Uh...",
+ DISPLAY_MESSAGE,
+ "I just...",
+ CHANGE_CHARACTER,
+ "Don't worry. I hope you killed",
+ NEW_LINE,
+ "that fly.",
+ END_DIALOG
+};
+
+const static char* dialog_46[] = {
+ "Excuse me, lady, but I think your",
+ NEW_LINE,
+ "laundry is dry now...",
+ DISPLAY_MESSAGE,
+ "...and too much sun will distort",
+ NEW_LINE,
+ "the clothes...",
+ CHANGE_CHARACTER,
+ "How come the laundry dried",
+ NEW_LINE,
+ "out so fast?",
+ DISPLAY_MESSAGE,
+ "I'd better go and check it.",
+ END_DIALOG
+};
+
+const static char* dialog_47[] = {
+ CHANGE_CHARACTER,
+ "You were right, young man.",
+ DISPLAY_MESSAGE,
+ "Thank you.",
+ CHANGE_CHARACTER,
+ "You're welcome.",
+ END_DIALOG
+};
+
+const static char* dialog_48[] = {
+ "Do you need this fake apple?",
+ CHANGE_CHARACTER,
+ "It depends. This apple",
+ NEW_LINE,
+ "has its own story.",
+ DISPLAY_MESSAGE,
+ "I remember how one day",
+ NEW_LINE,
+ "my younger sister Mary",
+ NEW_LINE,
+ "was making...",
+ CHANGE_CHARACTER,
+ "Er, how long is the story?",
+ CHANGE_CHARACTER,
+ "Oh, there's no need to rush.",
+ DISPLAY_MESSAGE,
+ "We do have hours to talk,",
+ NEW_LINE,
+ "don't we?",
+ CHANGE_CHARACTER,
+ "I just realised I don't need that",
+ NEW_LINE,
+ "apple.",
+ DISPLAY_MESSAGE,
+ "Thanks.",
+ END_DIALOG
+};
+
+const static char* dialog_49[] = {
+ "This apple...",
+ CHANGE_CHARACTER,
+ "No story, no apple.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "No apple.",
+ END_DIALOG
+};
+
+const static char* dialog_50[] = {
+ "Could she be...",
+ DISPLAY_MESSAGE,
+ "...the most beautiful girl...",
+ DISPLAY_MESSAGE,
+ "in the world?...",
+ END_DIALOG
+};
+
+const static char* dialog_51[] = {
+ "I think it's high time to",
+ NEW_LINE,
+ "introduce myself.",
+ DISPLAY_MESSAGE,
+ "I'm Mark.",
+ CHANGE_CHARACTER,
+ "Anne.",
+ END_DIALOG
+};
+
+const static char* dialog_52[] = {
+ "The moment I saw those eyes",
+ NEW_LINE,
+ "was the best moment of my entire",
+ NEW_LINE,
+ "life.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Not counting the time",
+ NEW_LINE,
+ "I played doctor with",
+ NEW_LINE,
+ "Susie.",
+ END_DIALOG
+};
+
+const static char* dialog_53[] = {
+ "Uh...",
+ DISPLAY_MESSAGE,
+ "Er...",
+ DISPLAY_MESSAGE,
+ "I wonder...",
+ DISPLAY_MESSAGE,
+ "I wonder if",
+ NEW_LINE,
+ "you would like",
+ NEW_LINE,
+ "to get some...",
+ DISPLAY_MESSAGE,
+ "Er...",
+ DISPLAY_MESSAGE,
+ "I mean...",
+ DISPLAY_MESSAGE,
+ "I have something",
+ NEW_LINE,
+ "I would like to give",
+ NEW_LINE,
+ "you, because...",
+ DISPLAY_MESSAGE,
+ "Uh...",
+ DISPLAY_MESSAGE,
+ "I think you",
+ NEW_LINE,
+ "are... And...",
+ CHANGE_CHARACTER,
+ "Hey! I don't bite!",
+ DISPLAY_MESSAGE,
+ "I see you want to tell me",
+ NEW_LINE,
+ "something nice.",
+ DISPLAY_MESSAGE,
+ "Just use simple",
+ NEW_LINE,
+ "words...",
+ CHANGE_CHARACTER,
+ "Simple words?!",
+ CHANGE_CHARACTER,
+ "Yes, simple words make",
+ NEW_LINE,
+ "things simple.",
+ CHANGE_CHARACTER,
+ "Oh, yes.",
+ DISPLAY_MESSAGE,
+ "OK.",
+ DISPLAY_MESSAGE,
+ "Simple words.",
+ DISPLAY_MESSAGE,
+ "OK.",
+ DISPLAY_MESSAGE,
+ "Here I go.",
+ DISPLAY_MESSAGE,
+ "Me like you and",
+ NEW_LINE,
+ "want give flower.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Well, maybe you should",
+ NEW_LINE,
+ "try something...",
+ DISPLAY_MESSAGE,
+ "...more complicated.",
+ CHANGE_CHARACTER,
+ "Uh...",
+ DISPLAY_MESSAGE,
+ "Sorry...",
+ DISPLAY_MESSAGE,
+ "I just...",
+ DISPLAY_MESSAGE,
+ "I just brought you",
+ NEW_LINE,
+ "a flower.",
+ CHANGE_CHARACTER,
+ "Oh?...",
+ END_DIALOG
+};
+
+const static char* dialog_54[] = {
+ "Do you like it?",
+ CHANGE_CHARACTER,
+ "You're charming.",
+ END_DIALOG
+};
+
+const static char* dialog_55[] = {
+ "As a matter",
+ NEW_LINE,
+ "of fact...",
+ CHANGE_CHARACTER,
+ "Simple words, boy!",
+ NEW_LINE,
+ "Simple words!",
+ END_DIALOG
+};
+
+const static char* dialog_56[] = {
+ "Oh,yes...",
+ DISPLAY_MESSAGE,
+ "I just wanted to say",
+ NEW_LINE,
+ "that you're charming",
+ NEW_LINE,
+ "too.",
+ CHANGE_CHARACTER,
+ "I guess I should say",
+ NEW_LINE,
+ "thanks.",
+ END_DIALOG
+};
+
+const static char* dialog_57[] = {
+ "I hate myself.",
+ END_DIALOG
+};
+
+const static char* dialog_58[] = {
+ "I have another",
+ NEW_LINE,
+ "flower...",
+ CHANGE_CHARACTER,
+ "Oh, let's not",
+ NEW_LINE,
+ "exaggerate.",
+ DISPLAY_MESSAGE,
+ "And, as you can see, I'm",
+ NEW_LINE,
+ "not the only...",
+ DISPLAY_MESSAGE,
+ "...woman in this room...",
+ END_DIALOG
+};
+
+const static char* dialog_59[] = {
+ "So you don't want",
+ NEW_LINE,
+ "another flower?",
+ CHANGE_CHARACTER,
+ "No, thank you.",
+ END_DIALOG
+};
+
+const static char* dialog_60[] = {
+ "Would you like some candy?",
+ CHANGE_CHARACTER,
+ "You're nice, but no, thanks.",
+ NEW_LINE,
+ "I don't want to get fat.",
+ CHANGE_CHARACTER,
+ "Hey, don't worry. Even Obelix",
+ NEW_LINE,
+ "has friends.",
+ CHANGE_CHARACTER,
+ "Who's Obelix?!",
+ CHANGE_CHARACTER,
+ "Er, never mind. It's just that I found",
+ NEW_LINE,
+ "this candy...",
+ CHANGE_CHARACTER,
+ "You FOUND IT?!",
+ CHANGE_CHARACTER,
+ "...I found it's pretty hard to get,",
+ NEW_LINE,
+ "of course.",
+ DISPLAY_MESSAGE,
+ "It's not some cheap pseudo-chocolate,",
+ NEW_LINE,
+ "but the highest quality goodie!",
+ DISPLAY_MESSAGE,
+ "It's made only from the things you",
+ NEW_LINE,
+ "can find in a natural environment.",
+ DISPLAY_MESSAGE,
+ "No preservatives added.",
+ CHANGE_CHARACTER,
+ "Oh, all right. If you insist...",
+ END_DIALOG
+};
+
+const static char* dialog_61[] = {
+ ANIM_WAIT,
+ "Khm...",
+ CHANGE_CHARACTER,
+ "Oh yes, I think I should give you",
+ NEW_LINE,
+ "something in return...",
+ CHANGE_CHARACTER,
+ "Oh, no... You really don't",
+ NEW_LINE,
+ "have to...",
+ CHANGE_CHARACTER,
+ "OK. Your wish.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Well, on second thoughts...",
+ CHANGE_CHARACTER,
+ "I knew it. You boys always want",
+ NEW_LINE,
+ "something.",
+ DISPLAY_MESSAGE,
+ "You can't do anything for",
+ NEW_LINE,
+ "free.",
+ CHANGE_CHARACTER,
+ "I cleaned my room once.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Well...",
+ DISPLAY_MESSAGE,
+ "Let's forget it.",
+ DISPLAY_MESSAGE,
+ "Here's my present for",
+ NEW_LINE,
+ "you.",
+ DISPLAY_MESSAGE,
+ "It's my ribbon. Think of me",
+ NEW_LINE,
+ "sometimes.",
+ END_DIALOG
+};
+
+const static char* dialog_62[] = {
+ "Thanks. I will never",
+ NEW_LINE,
+ "wash it.",
+ END_DIALOG
+};
+
+const static char* dialog_63[] = {
+ "I found your name on a banknote",
+ NEW_LINE,
+ "some fatso gave me. Do you know",
+ NEW_LINE,
+ "anything about it?",
+ CHANGE_CHARACTER,
+ "Show me the banknote.",
+ END_DIALOG
+};
+
+const static char* dialog_64[] = {
+ "Hey, what's up?!",
+ CHANGE_CHARACTER,
+ "Oh, poor me!...",
+ CHANGE_CHARACTER,
+ "Why are you crying?!",
+ CHANGE_CHARACTER,
+ "This... this...",
+ DISPLAY_MESSAGE,
+ "Oh, poor me!...",
+ DISPLAY_MESSAGE,
+ "Our... our neighbour, Mr.",
+ NEW_LINE,
+ "John Noty gave me some",
+ NEW_LINE,
+ "money one day...",
+ DISPLAY_MESSAGE,
+ "...and said that if I gave",
+ NEW_LINE,
+ "him a kiss he'd give",
+ NEW_LINE,
+ "me more...",
+ DISPLAY_MESSAGE,
+ "...but I thought it over",
+ NEW_LINE,
+ "and I gave him all the",
+ NEW_LINE,
+ "money back.",
+ CHANGE_CHARACTER,
+ "You mean, that pig tried",
+ NEW_LINE,
+ "to buy you?!",
+ CHANGE_CHARACTER,
+ "I'm so unhappy!",
+ CHANGE_CHARACTER,
+ "Oh, man! That",
+ NEW_LINE,
+ "does it!",
+ END_DIALOG
+};
+
+const static char* dialog_65[] = {
+ "Hey, you!",
+ DISPLAY_MESSAGE,
+ "Would you please give me that nut",
+ NEW_LINE,
+ "lying next to you?",
+ END_DIALOG
+};
+
+const static char* dialog_66[] = {
+ "Are you gonna give me that nut or not?!",
+ END_DIALOG
+};
+
+const static char* dialog_67[] = {
+ "All right.",
+ DISPLAY_MESSAGE,
+ "That's it.",
+ DISPLAY_MESSAGE,
+ "Now you'll get what you deserve.",
+ DISPLAY_MESSAGE,
+ "I'm gonna insult you until I get that nut.",
+ DISPLAY_MESSAGE,
+ "You ugly squirrel you.",
+ END_DIALOG
+};
+
+const static char* dialog_68[] = {
+ "Don't you know it's not politically",
+ NEW_LINE,
+ "correct to wear a fur?",
+ END_DIALOG
+};
+
+const static char* dialog_69[] = {
+ "Hey, thanks again for the nut.",
+ END_DIALOG
+};
+
+const static char* dialog_70[] = {
+ "I didn't ask if I could take the rope.",
+ DISPLAY_MESSAGE,
+ "It's really rude to take someone else's",
+ NEW_LINE,
+ "property without their permission.",
+ DISPLAY_MESSAGE,
+ "And I might get caught, of",
+ NEW_LINE,
+ "course.",
+ DISPLAY_MESSAGE,
+ "And they will put me in jail and",
+ NEW_LINE,
+ "nobody will respect me anymore.",
+ DISPLAY_MESSAGE,
+ "I could really ruin my life doing that.",
+ END_DIALOG
+};
+
+const static char* dialog_71[] = {
+ "No pain no gain.",
+ END_DIALOG
+};
+
+const static char* dialog_72[] = {
+ "Listen, guys. I want you to get",
+ NEW_LINE,
+ "outta here at once!",
+ DISPLAY_MESSAGE,
+ "Or I'll have to shoot.",
+ DISPLAY_MESSAGE,
+ "With a real gun.",
+ DISPLAY_MESSAGE,
+ "I think.",
+ END_DIALOG
+};
+
+const static char* dialog_73[] = {
+ "I can see...",
+ DISPLAY_MESSAGE,
+ "...there's a...",
+ DISPLAY_MESSAGE,
+ "SPIDER!!!",
+ END_DIALOG
+};
+
+const static char* dialog_74[] = {
+ "Not that I'm chicken.",
+ DISPLAY_MESSAGE,
+ "It's just that it could be",
+ NEW_LINE,
+ "a mutant spider and it",
+ NEW_LINE,
+ "could bite me...",
+ DISPLAY_MESSAGE,
+ "...and I'd get mutant too...",
+ DISPLAY_MESSAGE,
+ "...and I'd have to wear those",
+ NEW_LINE,
+ "funny gloves and stuff...",
+ DISPLAY_MESSAGE,
+ "...and I'd have a double life...",
+ DISPLAY_MESSAGE,
+ "...and I'd have to fight with Venom`",
+ NEW_LINE,
+ "and others and I might get hurt...",
+ DISPLAY_MESSAGE,
+ "...and everybody would be making",
+ NEW_LINE,
+ "money on me but me...",
+ DISPLAY_MESSAGE,
+ "I think I'll pass then.",
+ END_DIALOG
+};
+
+const static char* dialog_75[] = {
+ "This spider gives me thrills...",
+ END_DIALOG
+};
+
+const static char* dialog_76[] = {
+ "Hey, little buddy!",
+ DISPLAY_MESSAGE,
+ "I've got a DECENT PROPOSAL for you.",
+ DISPLAY_MESSAGE,
+ "A big, fresh and juicy apple for this old cone",
+ NEW_LINE,
+ "which presses your back.",
+ DISPLAY_MESSAGE,
+ "If you want to make a deal, stand here",
+ NEW_LINE,
+ "and shake your muzzle.",
+ END_DIALOG
+};
+
+const static char* dialog_77[] = {
+ "I should have know",
+ NEW_LINE,
+ "there's a catch.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "The paddle is broken.",
+ END_DIALOG
+};
+
+const static char* dialog_78[] = {
+ "Hello there, big boy.",
+ END_DIALOG
+};
+
+const static char* dialog_79[] = {
+ "Don't ignore me, please.",
+ END_DIALOG
+};
+
+const static char* dialog_80[] = {
+ "You know, I'm a little bit dog-tired",
+ NEW_LINE,
+ "talking to you.",
+ END_DIALOG
+};
+
+const static char* dialog_81[] = {
+ "What's up?",
+ END_DIALOG
+};
+
+const static char* dialog_82[] = {
+ "Yes, I could take this...",
+ DISPLAY_MESSAGE,
+ "It's a quiet little village...",
+ DISPLAY_MESSAGE,
+ "No police...",
+ DISPLAY_MESSAGE,
+ "Noone will hear their screams...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "But I don't have a hockey mask.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "(sigh)",
+ END_DIALOG
+};
+
+const static char* dialog_83[] = {
+ "I don't want my fingerprints on it.",
+ DISPLAY_MESSAGE,
+ " Who knows what it was used for.",
+ END_DIALOG
+};
+
+const static char* dialog_84[] = {
+ "I'm afraid that it's too hard",
+ NEW_LINE,
+ "to catch a mouse just like",
+ NEW_LINE,
+ "that.",
+ DISPLAY_MESSAGE,
+ "And what challenge would it be?",
+ END_DIALOG
+};
+
+const static char* dialog_85[] = {
+ "I could try to scare these birds myself",
+ NEW_LINE,
+ "if I hadn't watched that Hitchcock",
+ NEW_LINE,
+ "movie when I was five.",
+ DISPLAY_MESSAGE,
+ "My mum should never let me watch that.",
+ DISPLAY_MESSAGE,
+ "Now I'm CHICKEN even when I eat eggs.",
+ END_DIALOG
+};
+
+const static char* dialog_86[] = {
+ "Great. Let's GET THE MESSAGE.",
+ DISPLAY_MESSAGE,
+ "\"Gold awaits at the end of the road.\"",
+ END_DIALOG
+};
+
+const static char* dialog_87[] = {
+ "Are you Mr. John Noty?",
+ CHANGE_CHARACTER,
+ "How do you do, my friend.",
+ DISPLAY_MESSAGE,
+ "My people told me you tried",
+ NEW_LINE,
+ "to get inside my mansion.",
+ NEW_LINE,
+ "Why?",
+ CHANGE_CHARACTER,
+ "Er... You see...",
+ DISPLAY_MESSAGE,
+ "I'm here to...",
+ NEW_LINE,
+ "To...",
+ DISPLAY_MESSAGE,
+ "I mean, I'm here on my vacations,",
+ NEW_LINE,
+ "but I got sick of all these green",
+ NEW_LINE,
+ "plants and trees around...",
+ DISPLAY_MESSAGE,
+ "...and I just wanted to lick some",
+ NEW_LINE,
+ "civilisation.",
+ CHANGE_CHARACTER,
+ "Well... I can understand you,",
+ NEW_LINE,
+ "my friend.",
+ DISPLAY_MESSAGE,
+ "I also think that the natural",
+ NEW_LINE,
+ "environment for us, people",
+ NEW_LINE,
+ "of 20th century...",
+ DISPLAY_MESSAGE,
+ "is TV and a bag of pop-corn.",
+ NEW_LINE,
+ "But talking about the green",
+ NEW_LINE,
+ "stuff...",
+ DISPLAY_MESSAGE,
+ "I can't allow you to enter",
+ NEW_LINE,
+ "my house, because... uhm...",
+ NEW_LINE,
+ "because it's ...being...",
+ DISPLAY_MESSAGE,
+ "...under renovation, but as",
+ NEW_LINE,
+ "a rich man I'll give you",
+ NEW_LINE,
+ "a hundred bucks...",
+ DISPLAY_MESSAGE,
+ "so you can buy yourself",
+ NEW_LINE,
+ "something that will help",
+ NEW_LINE,
+ "you survive here.",
+ DISPLAY_MESSAGE,
+ "A walkman for example.",
+ NEW_LINE,
+ "What do you say?",
+ CHANGE_CHARACTER,
+ "What do you take me for?!",
+ END_DIALOG
+};
+
+const static char* dialog_88[] = {
+ "I will NEVER take this!",
+ DISPLAY_MESSAGE,
+ "NEVER!",
+ CHANGE_CHARACTER,
+ "Don't get so excited.",
+ DISPLAY_MESSAGE,
+ "Pecunia non olet.",
+ DISPLAY_MESSAGE,
+ "I'll leave now. Don't be shy",
+ NEW_LINE,
+ "and pick up the banknote.",
+ DISPLAY_MESSAGE,
+ "Noone has to know...",
+ DISPLAY_MESSAGE,
+ "Good bye, my friend.",
+ END_DIALOG
+};
+
+const static char* dialog_89[] = {
+ "I can't believe he treated me",
+ NEW_LINE,
+ "like that.",
+ DISPLAY_MESSAGE,
+ "By the way...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Peculiar non omelette?...",
+ END_DIALOG
+};
+
+const static char* dialog_90[] = {
+ "Boy...",
+ DISPLAY_MESSAGE,
+ "It's all black...",
+ DISPLAY_MESSAGE,
+ "...and it looks like a man...",
+ DISPLAY_MESSAGE,
+ "...with some long pole...",
+ DISPLAY_MESSAGE,
+ "...and a pot on its head...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "VGA artist shouldn't drink so much.",
+ END_DIALOG
+};
+
+const static char* dialog_91[] = {
+ "Searching trash cans again?",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Oh, all right, there are only some",
+ NEW_LINE,
+ "papers.",
+ END_DIALOG
+};
+
+const static char* dialog_92[] = {
+ "The same as usual...",
+ DISPLAY_MESSAGE,
+ "Disasters...",
+ DISPLAY_MESSAGE,
+ "Corruption...",
+ DISPLAY_MESSAGE,
+ "Murders...",
+ DISPLAY_MESSAGE,
+ "Puzzle...",
+ DISPLAY_MESSAGE,
+ "Half-naked babes...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "I gotta subscribe.",
+ END_DIALOG
+};
+
+const static char* dialog_93[] = {
+ ANIM_WAIT,
+ "Gee...",
+ CHANGE_CHARACTER,
+ "...I'm daaaancing...",
+ DISPLAY_MESSAGE,
+ "...and siiiinging...",
+ CHANGE_CHARACTER,
+ "It's John Noty...",
+ CHANGE_CHARACTER,
+ "...raaain!...",
+ CHANGE_CHARACTER,
+ "...singing to the camera!",
+ CHANGE_CHARACTER,
+ "...what a beaaaaautifuuuul...",
+ CHANGE_CHARACTER,
+ "Although he definitely shouldn't.",
+ CHANGE_CHARACTER,
+ "...feeeliiing...",
+ CHANGE_CHARACTER,
+ "I can't believe it.",
+ CHANGE_CHARACTER,
+ "...haaaappy agaaain!..",
+ CHANGE_CHARACTER,
+ "What a horror.",
+ CHANGE_CHARACTER,
+ "...just daaancing in the raaain...",
+ CHANGE_CHARACTER,
+ "My neighbour's dog will do it better.",
+ CHANGE_CHARACTER,
+ "...la, laaaaa!...",
+ CHANGE_CHARACTER,
+ "I've had enough.",
+ CHANGE_CHARACTER,
+ "...la, la! La, laaaa....",
+ END_DIALOG
+};
+
+const static char* dialog_94[] = {
+ "There's nothing intere...",
+ DISPLAY_MESSAGE,
+ "No, wait a minute...",
+ DISPLAY_MESSAGE,
+ "There's something under the couch!",
+ END_DIALOG
+};
+
+const static char* dialog_95[] = {
+ "Don't you think you",
+ NEW_LINE,
+ "should add a little",
+ NEW_LINE,
+ "bit of chilli?",
+ CHANGE_CHARACTER,
+ "Add?",
+ DISPLAY_MESSAGE,
+ "Why?",
+ CHANGE_CHARACTER,
+ "I see you're not happy",
+ NEW_LINE,
+ "with the stew you're",
+ NEW_LINE,
+ "cooking.",
+ DISPLAY_MESSAGE,
+ "Maybe you should try",
+ NEW_LINE,
+ "to spice it up a",
+ NEW_LINE,
+ "little?",
+ CHANGE_CHARACTER,
+ "Well...",
+ DISPLAY_MESSAGE,
+ "That's good idea.",
+ DISPLAY_MESSAGE,
+ "Luckily I've got something here.",
+ END_DIALOG
+};
+
+const static char* dialog_96[] = {
+ CHANGE_CHARACTER,
+ "This... hic!...",
+ DISPLAY_MESSAGE,
+ "This chilllllleeeeee... hep!",
+ DISPLAY_MESSAGE,
+ "...must have been...",
+ DISPLAY_MESSAGE,
+ "...fermented...",
+ DISPLAY_MESSAGE,
+ "The stew yyys spoiled aaand...",
+ DISPLAY_MESSAGE,
+ "...I'm fired!",
+ DISPLAY_MESSAGE,
+ "Hic!",
+ END_DIALOG
+};
+
+const static char* dialog_97[] = {
+ "I don't need this radio, but",
+ NEW_LINE,
+ "I can use its batteries.",
+ DISPLAY_MESSAGE,
+ "Unfortunately I never know",
+ NEW_LINE,
+ "where to open those Japanese",
+ NEW_LINE,
+ "babies.",
+ END_DIALOG
+};
+
+const static char* dialog_98[] = {
+ CHANGE_CHARACTER,
+ "Security test: voice, scent, view.",
+ DISPLAY_MESSAGE,
+ "Voice positively identified.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Nice song, man.",
+ END_DIALOG
+};
+
+const static char* dialog_99[] = {
+ CHANGE_CHARACTER,
+ "Security test: voice, scent, view.",
+ DISPLAY_MESSAGE,
+ "Scent positively identified.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "I don't like water too, bro.",
+ END_DIALOG
+};
+
+const static char* dialog_100[] = {
+ CHANGE_CHARACTER,
+ "Security test: voice, scent, view.",
+ DISPLAY_MESSAGE,
+ "View positively identified.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Next time stand a bit closer, man.",
+ END_DIALOG
+};
+
+const static char* dialog_101[] = {
+ "May I talk with...",
+ CHANGE_CHARACTER,
+ "Go away.",
+ DISPLAY_MESSAGE,
+ "I'm busy.",
+ DISPLAY_MESSAGE,
+ "Working.",
+ DISPLAY_MESSAGE,
+ "Dinner soon.",
+ DISPLAY_MESSAGE,
+ "Gotta hurry.",
+ CHANGE_CHARACTER,
+ "Aye, captain.",
+ END_DIALOG
+};
+
+const static char* dialog_102[] = {
+ "Well, but maybe...",
+ CHANGE_CHARACTER,
+ "I...",
+ DISPLAY_MESSAGE,
+ "...AM...",
+ DISPLAY_MESSAGE,
+ "...BUSY.",
+ DISPLAY_MESSAGE,
+ "DON'T...",
+ DISPLAY_MESSAGE,
+ "...DISTURB...",
+ DISPLAY_MESSAGE,
+ "...ME.",
+ DISPLAY_MESSAGE,
+ "OK?",
+ CHANGE_CHARACTER,
+ "Okay, okay.",
+ END_DIALOG
+};
+
+const static char* dialog_103[] = {
+ "Last time I ask you...",
+ CHANGE_CHARACTER,
+ "BUSY.",
+ DISPLAY_MESSAGE,
+ "B like Bill.",
+ DISPLAY_MESSAGE,
+ "U like Ulrik.",
+ DISPLAY_MESSAGE,
+ "S like Sean.",
+ DISPLAY_MESSAGE,
+ "Y like...",
+ DISPLAY_MESSAGE,
+ "...like...",
+ CHANGE_CHARACTER,
+ "Yeti?",
+ CHANGE_CHARACTER,
+ "No. Like...",
+ CHANGE_CHARACTER,
+ "Yabbadabbadoo?",
+ CHANGE_CHARACTER,
+ "No, no. Like...",
+ CHANGE_CHARACTER,
+ "Yoko?",
+ CHANGE_CHARACTER,
+ "Yoko.",
+ DISPLAY_MESSAGE,
+ "Leave me alone now, PLEASE!",
+ CHANGE_CHARACTER,
+ "All right, all right.",
+ END_DIALOG
+};
+
+const static char* dialog_104[] = {
+ "Er...",
+ CHANGE_CHARACTER,
+ "Wrrrr...",
+ CHANGE_CHARACTER,
+ "Oh, nothing.",
+ END_DIALOG
+};
+
+const static char* dialog_105[] = {
+ "Good day, Mr. Robot.",
+ CHANGE_CHARACTER,
+ "Hey, yo, wassup my man,",
+ NEW_LINE,
+ "you know what I'm sayin'?",
+ DISPLAY_MESSAGE,
+ "Call me Mike, you know",
+ NEW_LINE,
+ "what I'm sayin'?",
+ CHANGE_CHARACTER,
+ "Er...",
+ DISPLAY_MESSAGE,
+ "Are you sure everything's",
+ NEW_LINE,
+ "all right with your...",
+ DISPLAY_MESSAGE,
+ "...program?...",
+ CHANGE_CHARACTER,
+ "What's da problem, man?!",
+ DISPLAY_MESSAGE,
+ "Neva seen da rappin' robo-safe,",
+ NEW_LINE,
+ "you know what I'm sayin'?",
+ CHANGE_CHARACTER,
+ "Actually, never.",
+ CHANGE_CHARACTER,
+ "I'm brand new, bro.",
+ DISPLAY_MESSAGE,
+ "Fresh stuff, you know what I mean?",
+ DISPLAY_MESSAGE,
+ "Smart people sez da robots",
+ NEW_LINE,
+ "should be for everybody,",
+ DISPLAY_MESSAGE,
+ "you know what I'm sayin',",
+ NEW_LINE,
+ "so they gave me human",
+ NEW_LINE,
+ "personality,",
+ DISPLAY_MESSAGE,
+ "you know what I mean?",
+ NEW_LINE,
+ "Cool, ain't that?",
+ CHANGE_CHARACTER,
+ "Khm... Yeah, great.",
+ DISPLAY_MESSAGE,
+ "So, you're some kind of safe?",
+ CHANGE_CHARACTER,
+ "That's right, man.",
+ DISPLAY_MESSAGE,
+ "Totally reliable, you know",
+ NEW_LINE,
+ "what I'm sayin'?",
+ DISPLAY_MESSAGE,
+ "If you wanna get me open, you",
+ NEW_LINE,
+ "gotta prove you're da owner.",
+ DISPLAY_MESSAGE,
+ "Now check diz (CENSORED) out:",
+ NEW_LINE,
+ "I can judge if it's the right",
+ NEW_LINE,
+ "homie by three things:",
+ DISPLAY_MESSAGE,
+ "...view, scent and da voice.",
+ NEW_LINE,
+ "You know what I'm sayin'?",
+ CHANGE_CHARACTER,
+ "But will you please open",
+ NEW_LINE,
+ "...yourself... just to let me see",
+ NEW_LINE,
+ "what you got inside?",
+ CHANGE_CHARACTER,
+ "Sorry, bro.",
+ DISPLAY_MESSAGE,
+ "You don't look like da owner...",
+ DISPLAY_MESSAGE,
+ "...you don't smell like him...",
+ DISPLAY_MESSAGE,
+ "...and your voice is kinda different.",
+ DISPLAY_MESSAGE,
+ "Now (CENSORED), you know what I mean?",
+ END_DIALOG
+};
+
+const static char* dialog_106[] = {
+ "Sesame, open...",
+ CHANGE_CHARACTER,
+ "(CENSORED), you (CENSORED).",
+ END_DIALOG
+};
+
+const static char* dialog_107[] = {
+ "Hi there!",
+ CHANGE_CHARACTER,
+ "(PARENTAL GUIDANCE: EXPLICIT LYRICS)",
+ END_DIALOG
+};
+
+const static char* dialog_108[] = {
+ "I'm telling you, it's something great.",
+ CHANGE_CHARACTER,
+ "I remember when you killed my",
+ NEW_LINE,
+ "servant, testing your bullet-proof",
+ NEW_LINE,
+ "T-shirt.",
+ CHANGE_CHARACTER,
+ "That was a long time ago...",
+ CHANGE_CHARACTER,
+ "Or like you made rapping",
+ NEW_LINE,
+ "robo-safe, which goes mad",
+ NEW_LINE,
+ "every time...",
+ DISPLAY_MESSAGE,
+ "...I ask it to open.",
+ CHANGE_CHARACTER,
+ "You got a bad attitude...",
+ CHANGE_CHARACTER,
+ "Or like you sold me",
+ NEW_LINE,
+ "the recipe for girls'",
+ NEW_LINE,
+ "heart-breaking.",
+ CHANGE_CHARACTER,
+ "Money didn't work?",
+ CHANGE_CHARACTER,
+ "Nope.",
+ CHANGE_CHARACTER,
+ "Strange. Usually it works.",
+ CHANGE_CHARACTER,
+ "Or when you...",
+ CHANGE_CHARACTER,
+ "ALL RIGHT, ALL RIGHT!",
+ DISPLAY_MESSAGE,
+ "Let's forget this!",
+ DISPLAY_MESSAGE,
+ "I already tested my new",
+ NEW_LINE,
+ "invention on myself!",
+ CHANGE_CHARACTER,
+ "Really?",
+ CHANGE_CHARACTER,
+ "Really.",
+ DISPLAY_MESSAGE,
+ "I can demonstrate it.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Ok, I'll take my chance.",
+ END_DIALOG
+};
+
+const static char* dialog_109[] = {
+ ANIM_WAIT,
+ "Great.",
+ DISPLAY_MESSAGE,
+ "Ultimate gnome-maker.",
+ CHANGE_CHARACTER,
+ "Khm, it's just a side effect.",
+ DISPLAY_MESSAGE,
+ "Sometimes I can't control my",
+ NEW_LINE,
+ "inventions.",
+ DISPLAY_MESSAGE,
+ "But don't worry, it lasts only",
+ NEW_LINE,
+ "a second.",
+ CHANGE_CHARACTER,
+ "I hope so.",
+ END_DIALOG
+};
+
+const static char* dialog_110[] = {
+ "Here I am.",
+ DISPLAY_MESSAGE,
+ "Well, have you noticed anything",
+ NEW_LINE,
+ "else unusual?",
+ CHANGE_CHARACTER,
+ "Nope.",
+ CHANGE_CHARACTER,
+ "Great!",
+ DISPLAY_MESSAGE,
+ "So the pills still work!",
+ CHANGE_CHARACTER,
+ "Oh yeah?",
+ CHANGE_CHARACTER,
+ "Yes!",
+ DISPLAY_MESSAGE,
+ "Check out your wallet!",
+ CHANGE_CHARACTER,
+ "My wallet is still...",
+ END_DIALOG
+};
+
+const static char* dialog_111[] = {
+ "Where is my wallet?!",
+ DISPLAY_MESSAGE,
+ "You thief!",
+ DISPLAY_MESSAGE,
+ "Give it back!",
+ CHANGE_CHARACTER,
+ "Take it easy, here's your",
+ NEW_LINE,
+ "wallet.",
+ END_DIALOG
+};
+
+const static char* dialog_112[] = {
+ "I demand an explanation.",
+ CHANGE_CHARACTER,
+ "Hah!",
+ DISPLAY_MESSAGE,
+ "This is the best thing I have",
+ NEW_LINE,
+ "ever invented!",
+ CHANGE_CHARACTER,
+ "What's that?",
+ CHANGE_CHARACTER,
+ "You didn't see me steal",
+ NEW_LINE,
+ "your wallet,",
+ DISPLAY_MESSAGE,
+ "...because I have eaten...",
+ DISPLAY_MESSAGE,
+ "THE TIME PILL!",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "The time pill?",
+ CHANGE_CHARACTER,
+ "Yes!",
+ DISPLAY_MESSAGE,
+ "Anyone who eats it, lives",
+ NEW_LINE,
+ "1000 times faster than the",
+ NEW_LINE,
+ "rest of the world!",
+ CHANGE_CHARACTER,
+ "That means...",
+ CHANGE_CHARACTER,
+ "That means the world for",
+ NEW_LINE,
+ "this person moves 1000",
+ NEW_LINE,
+ "times slower!",
+ DISPLAY_MESSAGE,
+ "Only for a few seconds,",
+ NEW_LINE,
+ "though...",
+ CHANGE_CHARACTER,
+ "Well... That's interesting.",
+ NEW_LINE,
+ "But what's the use?",
+ CHANGE_CHARACTER,
+ "I don't care.",
+ DISPLAY_MESSAGE,
+ "Think about it.",
+ DISPLAY_MESSAGE,
+ "You could, for example, get in",
+ NEW_LINE,
+ "the cinema without a ticket,",
+ NEW_LINE,
+ "and nobody would notice you.",
+ CHANGE_CHARACTER,
+ "Of course!",
+ DISPLAY_MESSAGE,
+ "Great!",
+ DISPLAY_MESSAGE,
+ "I want to buy the patent!",
+ CHANGE_CHARACTER,
+ "That's the problem...",
+ DISPLAY_MESSAGE,
+ "As you know, my uncel Gallagher,",
+ NEW_LINE,
+ "used to invent the best things",
+ NEW_LINE,
+ "when he was ...let's say...",
+ CHANGE_CHARACTER,
+ "...drunk...",
+ CHANGE_CHARACTER,
+ "...intoxicated.",
+ DISPLAY_MESSAGE,
+ "And the same happened to me",
+ NEW_LINE,
+ "(sigh).",
+ DISPLAY_MESSAGE,
+ "So last night I woke up with",
+ NEW_LINE,
+ "a horrible headache and",
+ NEW_LINE,
+ "found those pills.",
+ DISPLAY_MESSAGE,
+ "I don't remember how I made them.",
+ CHANGE_CHARACTER,
+ "Oh no!",
+ CHANGE_CHARACTER,
+ "But I may try to work on them.",
+ DISPLAY_MESSAGE,
+ "I need your money for that.",
+ DISPLAY_MESSAGE,
+ "Let's make a deal.",
+ DISPLAY_MESSAGE,
+ "You build me a new",
+ NEW_LINE,
+ "laboratory and stuff...",
+ DISPLAY_MESSAGE,
+ "...and I'll give you my rights.",
+ CHANGE_CHARACTER,
+ "You'll give me the patent?!",
+ CHANGE_CHARACTER,
+ "Yes.",
+ DISPLAY_MESSAGE,
+ "All I care about is the",
+ NEW_LINE,
+ "respect of the science",
+ NEW_LINE,
+ "society respect.",
+ DISPLAY_MESSAGE,
+ "And Nobel.",
+ DISPLAY_MESSAGE,
+ "You know, honoris causa here",
+ NEW_LINE,
+ "and there, interviews...",
+ CHANGE_CHARACTER,
+ "All right. You got the deal.",
+ DISPLAY_MESSAGE,
+ "Prepare the list of necessary",
+ NEW_LINE,
+ "equipment.",
+ CHANGE_CHARACTER,
+ "Wonderful.",
+ END_DIALOG
+};
+
+const static char* dialog_113[] = {
+ "This fool trusts me.",
+ DISPLAY_MESSAGE,
+ "But I will use him...",
+ DISPLAY_MESSAGE,
+ "The time pills...",
+ DISPLAY_MESSAGE,
+ "I won't be selling them to",
+ NEW_LINE,
+ "those stupid people!",
+ DISPLAY_MESSAGE,
+ "I don't care about the",
+ NEW_LINE,
+ "patent!",
+ DISPLAY_MESSAGE,
+ "I could rob any bank",
+ NEW_LINE,
+ "without being seen!",
+ DISPLAY_MESSAGE,
+ "Faster than light!",
+ DISPLAY_MESSAGE,
+ "I need to steal some money",
+ NEW_LINE,
+ "or gold for this mad man's",
+ NEW_LINE,
+ "laboratory.",
+ END_DIALOG
+};
+
+const static char* dialog_114[] = {
+ "But soon...",
+ DISPLAY_MESSAGE,
+ "I'll get rich.",
+ DISPLAY_MESSAGE,
+ "Veeeery rich.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "I feel like I could...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "...like I could...",
+ END_DIALOG
+};
+
+const static char* dialog_115[] = {
+ ANIM_WAIT,
+ "TAKE ON THE WORLD!...",
+ END_DIALOG
+};
+
+const static char* dialog_116[] = {
+ ANIM_WAIT,
+ "I always wanted to say that.",
+ END_DIALOG
+};
+
+const static char* dialog_117[] = {
+ "It's me again.",
+ CHANGE_CHARACTER,
+ "Goodbye again.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Let's say I haven't heard that.",
+ DISPLAY_MESSAGE,
+ "Is Mr. John Noty home?",
+ CHANGE_CHARACTER,
+ "Yeah, but he said you can't get in.",
+ CHANGE_CHARACTER,
+ "Me?! Why?!",
+ CHANGE_CHARACTER,
+ "Your last invention cost him",
+ NEW_LINE,
+ "two walls.",
+ CHANGE_CHARACTER,
+ "Oh, that time machine...",
+ DISPLAY_MESSAGE,
+ "But now I have some...",
+ CHANGE_CHARACTER,
+ "Not to mention the disapearance of his cat.",
+ CHANGE_CHARACTER,
+ "The cat is happier than",
+ NEW_LINE,
+ "any of us now!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "If the world still exists in",
+ NEW_LINE,
+ "XXV century.",
+ DISPLAY_MESSAGE,
+ "Never mind.",
+ DISPLAY_MESSAGE,
+ "You just have to let me in.",
+ CHANGE_CHARACTER,
+ "Oh yeah?",
+ CHANGE_CHARACTER,
+ "Or I'll tell Mr. John Noty you drink on duty.",
+ CHANGE_CHARACTER,
+ "You're bluffing. You have no proof.",
+ CHANGE_CHARACTER,
+ "Yeah, but you never know.",
+ END_DIALOG
+};
+
+const static char* dialog_118[] = {
+ "Ok, get in, you filthy terrorist.",
+ DISPLAY_MESSAGE,
+ "Just don't tell anybody.",
+ CHANGE_CHARACTER,
+ "Of course. Thank you.",
+ END_DIALOG
+};
+
+const static char* dialog_119[] = {
+ "So...",
+ DISPLAY_MESSAGE,
+ "That's how it all happened...",
+ DISPLAY_MESSAGE,
+ "That's why nobody has seen",
+ NEW_LINE,
+ "how things were",
+ NEW_LINE,
+ "being stolen...",
+ DISPLAY_MESSAGE,
+ "It's a really dangerous",
+ NEW_LINE,
+ "invention!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "I HAVE TO stop John Noty!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Somehow.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Boy! Those pills I took",
+ NEW_LINE,
+ "from Mike must be...",
+ DISPLAY_MESSAGE,
+ "Oh, no!",
+ DISPLAY_MESSAGE,
+ "I can hear somebody coming!",
+ END_DIALOG
+};
+
+const static char* dialog_120[] = {
+ "I have to hide somewhere!",
+ DISPLAY_MESSAGE,
+ "Now!",
+ END_DIALOG
+};
+
+const static char* dialog_121[] = {
+ "I have to buy an old-fashioned safe.",
+ DISPLAY_MESSAGE,
+ "That stupid robot went mad again.",
+ DISPLAY_MESSAGE,
+ "I hate it.",
+ DISPLAY_MESSAGE,
+ "CLOSE, YOU PIECE OF JUNK!",
+ END_DIALOG
+};
+
+const static char* dialog_122[] = {
+ "Third time this week.",
+ DISPLAY_MESSAGE,
+ "Oh, all right, all right!...",
+ DISPLAY_MESSAGE,
+ "I'm coming!...",
+ END_DIALOG
+};
+
+const static char* dialog_123[] = {
+ "...cover it all.",
+ DISPLAY_MESSAGE,
+ "I need more money for the security system.",
+ DISPLAY_MESSAGE,
+ "I've got only two men and...",
+ CHANGE_CHARACTER,
+ "More and more!",
+ DISPLAY_MESSAGE,
+ "It's all I hear!",
+ CHANGE_CHARACTER,
+ "All right, I'll explain again...",
+ END_DIALOG
+};
+
+const static char* dialog_124[] = {
+ "Mr. John Noty?",
+ DISPLAY_MESSAGE,
+ "I just received some information from",
+ NEW_LINE,
+ "the professor.",
+ DISPLAY_MESSAGE,
+ "He's asked you to come to the laboratory.",
+ DISPLAY_MESSAGE,
+ "He says he's found out the structure of",
+ NEW_LINE,
+ "the pills.",
+ END_DIALOG
+};
+
+const static char* dialog_125[] = {
+ "So this is it?!",
+ CHANGE_CHARACTER,
+ "Definitely ...hic!... yes.",
+ CHANGE_CHARACTER,
+ "Great!",
+ END_DIALOG
+};
+
+const static char* dialog_126[] = {
+ "I have to stop them!",
+ DISPLAY_MESSAGE,
+ "There's no time to waste!",
+ END_DIALOG
+};
+
+const static char* dialog_127[] = {
+ "Well, well, well...",
+ DISPLAY_MESSAGE,
+ "You really play on my nerves.",
+ DISPLAY_MESSAGE,
+ "It was a good idea not to save money",
+ NEW_LINE,
+ "on the security system...",
+ DISPLAY_MESSAGE,
+ "This force field is indestructible!",
+ DISPLAY_MESSAGE,
+ "Hah!",
+ END_DIALOG
+};
+
+const static char* dialog_128[] = {
+ "But I have to kill you anyway.",
+ CHANGE_CHARACTER,
+ "No, no!",
+ CHANGE_CHARACTER,
+ "Shut up!",
+ CHANGE_CHARACTER,
+ "It's not worth it!",
+ CHANGE_CHARACTER,
+ "Oh really?",
+ CHANGE_CHARACTER,
+ "I don't want to...",
+ END_DIALOG
+};
+
+const static char* dialog_129[] = {
+ CHANGE_CHARACTER,
+ "The poor professor has fainted...",
+ CHANGE_CHARACTER,
+ "But... How...",
+ DISPLAY_MESSAGE,
+ "I DON'T UNDERSTAND ANYTHING!!!",
+ CHANGE_CHARACTER,
+ "It's very easy.",
+ DISPLAY_MESSAGE,
+ "We attached a secret micro-camera",
+ NEW_LINE,
+ "to your cap.",
+ DISPLAY_MESSAGE,
+ "This way we knew all the time what was",
+ NEW_LINE,
+ "happening.",
+ CHANGE_CHARACTER,
+ "You have seen when I?...",
+ CHANGE_CHARACTER,
+ "I don't want to embarass you.",
+ DISPLAY_MESSAGE,
+ "You did a good job for the RGB.",
+ CHANGE_CHARACTER,
+ "But John Noty has escaped!",
+ CHANGE_CHARACTER,
+ "He's not important.",
+ DISPLAY_MESSAGE,
+ "We have the professor, you'll give us the pills.",
+ DISPLAY_MESSAGE,
+ "Sorry, but you can't keep them for yourself.",
+ CHANGE_CHARACTER,
+ "Okay, but...",
+ DISPLAY_MESSAGE,
+ "Could you please give me just a minute?",
+ DISPLAY_MESSAGE,
+ "I have some private business to do with",
+ NEW_LINE,
+ "this scum.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "All right. But hurry up.",
+ END_DIALOG
+};
+
+const static char* dialog_130[] = {
+ ANIM_WAIT,
+ "(gulp)",
+ DISPLAY_MESSAGE,
+ "This time-effect really doesn't last",
+ NEW_LINE,
+ "long...",
+ END_DIALOG
+};
+
+const static char* dialog_131[] = {
+ "You've lost, mister!",
+ DISPLAY_MESSAGE,
+ "The police are surrounding the building!",
+ CHANGE_CHARACTER,
+ "Don't be stupid.",
+ DISPLAY_MESSAGE,
+ "Didn't you think I'd have",
+ NEW_LINE,
+ "a secret way out?",
+ CHANGE_CHARACTER,
+ "Oh yeah?",
+ DISPLAY_MESSAGE,
+ "What's that?",
+ CHANGE_CHARACTER,
+ "Like I'm going to tell you...",
+ DISPLAY_MESSAGE,
+ "Get lost, you little creep.",
+ DISPLAY_MESSAGE,
+ "I'm busy.",
+ END_DIALOG
+};
+
+const static char* dialog_132[] = {
+ "I'll have to disarm you.",
+ DISPLAY_MESSAGE,
+ "Be nice and surrender without problems.",
+ CHANGE_CHARACTER,
+ "I don't have time for jokes.",
+ DISPLAY_MESSAGE,
+ "Get the hell out of here,",
+ NEW_LINE,
+ "before I point my gun at you",
+ NEW_LINE,
+ "again.",
+ CHANGE_CHARACTER,
+ "I warn you...",
+ CHANGE_CHARACTER,
+ "Where do they sell",
+ NEW_LINE,
+ "bores like you?",
+ END_DIALOG
+};
+
+const static char* dialog_133[] = {
+ "I won't give you any more chances...",
+ CHANGE_CHARACTER,
+ "Good.",
+ DISPLAY_MESSAGE,
+ "And bye.",
+ END_DIALOG
+};
+
+const static char* dialog_134[] = {
+ "Stop packing that money!",
+ END_DIALOG
+};
+
+const static char* dialog_135[] = {
+ "Hi, there!",
+ CHANGE_CHARACTER,
+ "Hi.",
+ DISPLAY_MESSAGE,
+ "What's your problem?",
+ CHANGE_CHARACTER,
+ "I was sent here for some training.",
+ CHANGE_CHARACTER,
+ "Another wanna-be secret agent, huh?",
+ CHANGE_CHARACTER,
+ "Yep.",
+ CHANGE_CHARACTER,
+ "Show me your documents and you'll get in.",
+ CHANGE_CHARACTER,
+ "Okey dokey.",
+ END_DIALOG
+};
+
+const static char* dialog_136[] = {
+ "Can't you let me in without all that",
+ NEW_LINE,
+ "bureaucracy?",
+ CHANGE_CHARACTER,
+ "Sorry, no.",
+ DISPLAY_MESSAGE,
+ "Rules are rules.",
+ CHANGE_CHARACTER,
+ "And morons are morons.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "And dead people are dead people.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Have a good day, sir.",
+ END_DIALOG
+};
+
+const static char* dialog_137[] = {
+ "MAY I PASS, PLEASE?!",
+ CHANGE_CHARACTER,
+ "YES, YOU MAY!",
+ DISPLAY_MESSAGE,
+ "JUST SHOW ME YOUR DOCUMENTS!",
+ END_DIALOG
+};
+
+const static char* dialog_138[] = {
+ "Let me in!",
+ CHANGE_CHARACTER,
+ "Show your documents!",
+ CHANGE_CHARACTER,
+ "You take your job really seriously,",
+ NEW_LINE,
+ "don't you?",
+ CHANGE_CHARACTER,
+ "Are you blind or what?",
+ DISPLAY_MESSAGE,
+ "I'm reading a magazine on duty.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Oh, yeah.",
+ DISPLAY_MESSAGE,
+ "Sorry.",
+ END_DIALOG
+};
+
+const static char* dialog_139[] = {
+ "I have to...",
+ CHANGE_CHARACTER,
+ "Documents!",
+ END_DIALOG
+};
+
+const static char* dialog_140[] = {
+ "What are you reading?",
+ CHANGE_CHARACTER,
+ "'Soldier News', of course.",
+ CHANGE_CHARACTER,
+ "You love all that military stuff,",
+ NEW_LINE,
+ "don't you?",
+ CHANGE_CHARACTER,
+ "Are you crazy?",
+ DISPLAY_MESSAGE,
+ "I like pictures of cool babes...",
+ DISPLAY_MESSAGE,
+ "...crosswords...",
+ DISPLAY_MESSAGE,
+ "...the humor page...",
+ DISPLAY_MESSAGE,
+ "...rumors...",
+ DISPLAY_MESSAGE,
+ "...recipes...",
+ CHANGE_CHARACTER,
+ "COOKING?!",
+ CHANGE_CHARACTER,
+ "Yes, they try to raise their profile.",
+ DISPLAY_MESSAGE,
+ "Gain new readers, you know.",
+ CHANGE_CHARACTER,
+ "Oh yeah.",
+ DISPLAY_MESSAGE,
+ "Great idea.",
+ DISPLAY_MESSAGE,
+ "Is there a knitting page too?",
+ CHANGE_CHARACTER,
+ "I get the feeling you're",
+ NEW_LINE,
+ "trying to be funny.",
+ CHANGE_CHARACTER,
+ "Nah, me?",
+ DISPLAY_MESSAGE,
+ "Never.",
+ CHANGE_CHARACTER,
+ "Good.",
+ END_DIALOG
+};
+
+const static char* dialog_141[] = {
+ "Would you lend me the magazine?",
+ CHANGE_CHARACTER,
+ "And what am I supposed",
+ NEW_LINE,
+ "to kill the time with",
+ NEW_LINE,
+ "then?",
+ CHANGE_CHARACTER,
+ "Erm...",
+ DISPLAY_MESSAGE,
+ "You could count the leaves.",
+ CHANGE_CHARACTER,
+ "There're 11034 leaves here.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Wow.",
+ END_DIALOG
+};
+
+const static char* dialog_142[] = {
+ "What's up?",
+ CHANGE_CHARACTER,
+ "The sky, I hope.",
+ END_DIALOG
+};
+
+const static char* dialog_143[] = {
+ "Keep up the good work.",
+ END_DIALOG
+};
+
+const static char* dialog_144[] = {
+ CHANGE_CHARACTER,
+ "Hey, get back!",
+ END_DIALOG
+};
+
+const static char* dialog_145[] = {
+ "What's the matter?",
+ CHANGE_CHARACTER,
+ "You must show me your pass",
+ NEW_LINE,
+ "before I let you enter the",
+ NEW_LINE,
+ "camp.",
+ CHANGE_CHARACTER,
+ "What if I don't?",
+ CHANGE_CHARACTER,
+ "I'll have to shoot you.",
+ CHANGE_CHARACTER,
+ "(gulp)",
+ END_DIALOG
+};
+
+const static char* dialog_146[] = {
+ CHANGE_CHARACTER,
+ "I warn you...",
+ DISPLAY_MESSAGE,
+ "My bullets are faster than you...",
+ END_DIALOG
+};
+
+const static char* dialog_147[] = {
+ CHANGE_CHARACTER,
+ "All right.",
+ DISPLAY_MESSAGE,
+ "Report to the captain.",
+ DISPLAY_MESSAGE,
+ "He should be around somewhere.",
+ CHANGE_CHARACTER,
+ "Thanks, man.",
+ END_DIALOG
+};
+
+const static char* dialog_148[] = {
+ CHANGE_CHARACTER,
+ "We're gonna turn you into a real man,",
+ NEW_LINE,
+ "right, son?!",
+ CHANGE_CHARACTER,
+ "Erm...",
+ CHANGE_CHARACTER,
+ "Best of the best!...",
+ CHANGE_CHARACTER,
+ "Uh...",
+ CHANGE_CHARACTER,
+ "By sweat, blood and tears!",
+ CHANGE_CHARACTER,
+ "I'd rather...",
+ CHANGE_CHARACTER,
+ "I'm glad to see your enthusiasm, son!",
+ DISPLAY_MESSAGE,
+ "Let's not waste time!",
+ DISPLAY_MESSAGE,
+ "I was told to give you some express training.",
+ DISPLAY_MESSAGE,
+ "All right, son!",
+ DISPLAY_MESSAGE,
+ "You'll have to pass three trials!",
+ DISPLAY_MESSAGE,
+ "Let's begin with the easy one!...",
+ END_DIALOG
+};
+
+const static char* dialog_149[] = {
+ CHANGE_CHARACTER,
+ "The task is simple.",
+ DISPLAY_MESSAGE,
+ "I'll lock up you here...",
+ DISPLAY_MESSAGE,
+ "...and you must escape.",
+ DISPLAY_MESSAGE,
+ "Is it clear?!",
+ CHANGE_CHARACTER,
+ "Sir, I...",
+ CHANGE_CHARACTER,
+ "GOOD!!!",
+ END_DIALOG
+};
+
+const static char* dialog_150[] = {
+ ANIM_WAIT,
+ "Hello?",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Great.",
+ END_DIALOG
+};
+
+const static char* dialog_151[] = {
+ "OK, that was funny.",
+ DISPLAY_MESSAGE,
+ "Now let me out!",
+ END_DIALOG
+};
+
+const static char* dialog_152[] = {
+ "Hey! Is there anybody out",
+ NEW_LINE,
+ "there?!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "HELP!!!",
+ END_DIALOG
+};
+
+const static char* dialog_153[] = {
+ "Have mercy!",
+ DISPLAY_MESSAGE,
+ "I'm gonna die here!",
+ END_DIALOG
+};
+
+const static char* dialog_154[] = {
+ "I'm getting hungry!",
+ END_DIALOG
+};
+
+const static char* dialog_155[] = {
+ "I don't know what to say now...",
+ END_DIALOG
+};
+
+const static char* dialog_156[] = {
+ "I think...",
+ DISPLAY_MESSAGE,
+ "...you've passed...",
+ DISPLAY_MESSAGE,
+ "...the first test...",
+ DISPLAY_MESSAGE,
+ "...Let's get...",
+ DISPLAY_MESSAGE,
+ "...to the next one...",
+ END_DIALOG
+};
+
+const static char* dialog_157[] = {
+ CHANGE_CHARACTER,
+ "Ok, soldier.",
+ DISPLAY_MESSAGE,
+ "Let's assume I'm your captive...",
+ DISPLAY_MESSAGE,
+ "...and I know some secret password.",
+ DISPLAY_MESSAGE,
+ "Your task is to get it from me.",
+ DISPLAY_MESSAGE,
+ "CLEAR?!?",
+ CHANGE_CHARACTER,
+ "Am I restricted?",
+ CHANGE_CHARACTER,
+ "No.",
+ DISPLAY_MESSAGE,
+ "Do anything you want.",
+ CHANGE_CHARACTER,
+ "May I even spit in your eye?",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Yes.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Thanks, just checking.",
+ END_DIALOG
+};
+
+const static char* dialog_158[] = {
+ "Please tell me the password",
+ NEW_LINE,
+ "and let's get over it all.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "OK, think about it.",
+ END_DIALOG
+};
+
+const static char* dialog_159[] = {
+ "Hey, talk to me.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Do you hear me?",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "EARTH TO CAPTAIN, EARTH TO CAPTAIN!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "You're hopeless.",
+ END_DIALOG
+};
+
+const static char* dialog_160[] = {
+ "Are you ready to talk?",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "OK, I'll give you some more time.",
+ END_DIALOG
+};
+
+const static char* dialog_161[] = {
+ "Now, what is the password?",
+ CHANGE_CHARACTER,
+ "Get lost, you pathetic wimp.",
+ CHANGE_CHARACTER,
+ "Be nice, or I'll tickle you again.",
+ CHANGE_CHARACTER,
+ "Go on, that'll be a pleasure.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "You enjoyed that, didn't you?",
+ CHANGE_CHARACTER,
+ "Well, you know...",
+ CHANGE_CHARACTER,
+ "Ok, I'll find some other way.",
+ END_DIALOG
+};
+
+const static char* dialog_162[] = {
+ "I brought you something...",
+ CHANGE_CHARACTER,
+ "You can't bribe me.",
+ CHANGE_CHARACTER,
+ "Oh, yeah?",
+ END_DIALOG
+};
+
+// Note:
+// The usage of this in the engine overlaps the previous dialog i.e. the
+// starting offset used is two bytes early, thus implicitly changing the
+// first command of this dialog from NEW_LINE to CHANGE_CHARACTER.
+const static char* dialog_163[] = {
+ NEW_LINE,
+ "OH GIMMIE GIMMIE GIMMIE!!!",
+ DISPLAY_MESSAGE,
+ "I'LL DO ANYTHING!!!",
+ CHANGE_CHARACTER,
+ "Password...",
+ CHANGE_CHARACTER,
+ "The password is 'COFFEE'.",
+ DISPLAY_MESSAGE,
+ "Tell it to the barman and",
+ NEW_LINE,
+ "he'll give you something.",
+ DISPLAY_MESSAGE,
+ "Then he'll tell you about the third task.",
+ DISPLAY_MESSAGE,
+ "NOW FREE ME!!!",
+ CHANGE_CHARACTER,
+ "I'll think about it.",
+ END_DIALOG
+};
+
+const static char* dialog_164[] = {
+ "You...",
+ DISPLAY_MESSAGE,
+ "...you...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "...have passed, sir!",
+ END_DIALOG
+};
+
+const static char* dialog_165[] = {
+ "Would you care for a wonderful kaleidoscope?",
+ CHANGE_CHARACTER,
+ "I had one once, but captain saw me",
+ NEW_LINE,
+ "playing with it and took it from me.",
+ DISPLAY_MESSAGE,
+ "I think he uses it himself,",
+ NEW_LINE,
+ "you know.",
+ CHANGE_CHARACTER,
+ "If you give me the gazette,",
+ NEW_LINE,
+ "I'll give you that kaleidoscope.",
+ CHANGE_CHARACTER,
+ "I don't want to know how you got it...",
+ CHANGE_CHARACTER,
+ "Good.",
+ CHANGE_CHARACTER,
+ "...but what if the captain sees me again?",
+ CHANGE_CHARACTER,
+ "Don't worry, he's tied up.",
+ CHANGE_CHARACTER,
+ "Oh, test number two, I guess?...",
+ CHANGE_CHARACTER,
+ "Yep.",
+ CHANGE_CHARACTER,
+ "OK, let's have some fun here.",
+ END_DIALOG
+};
+
+const static char* dialog_166[] = {
+ "'COFFEE'.",
+ END_DIALOG
+};
+
+const static char* dialog_167[] = {
+ CHANGE_CHARACTER,
+ "Hot, wasn't it?",
+ CHANGE_CHARACTER,
+ "Uh-huh.",
+ DISPLAY_MESSAGE,
+ "The captain says you're gonna tell me",
+ NEW_LINE,
+ "about the third task.",
+ CHANGE_CHARACTER,
+ "Again...",
+ DISPLAY_MESSAGE,
+ "Well, it's kinda hide'n'seek.",
+ DISPLAY_MESSAGE,
+ "The captain hides, you seek.",
+ CHANGE_CHARACTER,
+ "But I left him tied to a chair!",
+ CHANGE_CHARACTER,
+ "That man and his sick games...",
+ DISPLAY_MESSAGE,
+ "He enjoys it more than he should!...",
+ DISPLAY_MESSAGE,
+ "He cheated you.",
+ DISPLAY_MESSAGE,
+ "Go and check.",
+ DISPLAY_MESSAGE,
+ "I'm sure he's already free.",
+ CHANGE_CHARACTER,
+ "But I took his knife!",
+ DISPLAY_MESSAGE,
+ "How could he cut the ties?!",
+ CHANGE_CHARACTER,
+ "Maybe he walked away with the chair",
+ NEW_LINE,
+ "tied to his...",
+ CHANGE_CHARACTER,
+ "Never mind.",
+ DISPLAY_MESSAGE,
+ "Any hints about where he might hide?",
+ CHANGE_CHARACTER,
+ "None.",
+ CHANGE_CHARACTER,
+ "Oh, c'mon.",
+ CHANGE_CHARACTER,
+ "No, boy. Play fair.",
+ END_DIALOG
+};
+
+const static char* dialog_168[] = {
+ "Time for a little hint?",
+ CHANGE_CHARACTER,
+ "No.",
+ END_DIALOG
+};
+
+const static char* dialog_169[] = {
+ "Hello, sir. I'm Mark.",
+ CHANGE_CHARACTER,
+ "What a pity you're not a dollar.",
+ DISPLAY_MESSAGE,
+ "What can I do for you?",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "You can give me a lot of money...",
+ DISPLAY_MESSAGE,
+ "...or you can do a headstand...",
+ DISPLAY_MESSAGE,
+ "...or...",
+ CHANGE_CHARACTER,
+ "Okay, okay. It's a tie.",
+ DISPLAY_MESSAGE,
+ "So?...",
+ CHANGE_CHARACTER,
+ "Who's else is in the camp?",
+ CHANGE_CHARACTER,
+ "You're a journalist?",
+ CHANGE_CHARACTER,
+ "No, I'm a secret agent.",
+ CHANGE_CHARACTER,
+ "You too?",
+ DISPLAY_MESSAGE,
+ "Anyway, there are only three men.",
+ DISPLAY_MESSAGE,
+ "Me, the captain and the guard.",
+ CHANGE_CHARACTER,
+ "No women?",
+ CHANGE_CHARACTER,
+ "No cry.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Erm, well...",
+ END_DIALOG
+};
+
+const static char* dialog_170[] = {
+ "Not much of a rush on, is there?",
+ CHANGE_CHARACTER,
+ "Do you want to order something or not?",
+ CHANGE_CHARACTER,
+ "I don't have money.",
+ CHANGE_CHARACTER,
+ "Today's free.",
+ CHANGE_CHARACTER,
+ "Really?",
+ CHANGE_CHARACTER,
+ "Really.",
+ CHANGE_CHARACTER,
+ "I want a hot-dog.",
+ CHANGE_CHARACTER,
+ "Miss.",
+ CHANGE_CHARACTER,
+ "Pizza?",
+ CHANGE_CHARACTER,
+ "Miss.",
+ CHANGE_CHARACTER,
+ "Toast?",
+ CHANGE_CHARACTER,
+ "Miss.",
+ CHANGE_CHARACTER,
+ "Anything?",
+ CHANGE_CHARACTER,
+ "Miss.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "No, thank you.",
+ DISPLAY_MESSAGE,
+ "I'm not hungry.",
+ END_DIALOG
+};
+
+const static char* dialog_171[] = {
+ "What are you drinking?",
+ CHANGE_CHARACTER,
+ "Tea.",
+ CHANGE_CHARACTER,
+ "Sure.",
+ END_DIALOG
+};
+
+const static char* dialog_172[] = {
+ "Nice weather.",
+ CHANGE_CHARACTER,
+ "Mhmmm...",
+ END_DIALOG
+};
+
+const static char* dialog_173[] = {
+ "Sometimes I feel tired.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Very tired.",
+ END_DIALOG
+};
+
+const static char* dialog_174[] = {
+ "Hey, Woodstock's over!",
+ END_DIALOG
+};
+
+const static char* dialog_175[] = {
+ "Thanks.",
+ END_DIALOG
+};
+
+const static char* dialog_176[] = {
+ CHANGE_CHARACTER,
+ "What the...",
+ END_DIALOG
+};
+
+const static char* dialog_177[] = {
+ "Hey, aren't you thirsty?",
+ DISPLAY_MESSAGE,
+ "Have you forgotten about your cup?",
+ END_DIALOG
+};
+
+const static char* dialog_178[] = {
+ "Sir, we have been informed that...",
+ CHANGE_CHARACTER,
+ "Later!",
+ DISPLAY_MESSAGE,
+ "I'm busy right now!",
+ CHANGE_CHARACTER,
+ "As you wish, sir.",
+ END_DIALOG
+};
+
+const static char* dialog_179[] = {
+ "Sir, some young boy tried to get inside",
+ NEW_LINE,
+ "the mansion.",
+ END_DIALOG
+};
+
+const static char* dialog_180[] = {
+ "Don't worry.",
+ DISPLAY_MESSAGE,
+ "Young boys are curious...",
+ DISPLAY_MESSAGE,
+ "...and my house plays on their imaginations.",
+ DISPLAY_MESSAGE,
+ "But keep an eye on him.",
+ CHANGE_CHARACTER,
+ "Yes, sir!",
+ END_DIALOG
+};
+
+const static char* dialog_181[] = {
+ "Sir, that boy tried to get in again.",
+ END_DIALOG
+};
+
+const static char* dialog_182[] = {
+ "Do you think it's serious?",
+ CHANGE_CHARACTER,
+ "Hmmm... No...",
+ DISPLAY_MESSAGE,
+ "He doesn't look dangerously.",
+ DISPLAY_MESSAGE,
+ "But maybe we should...",
+ CHANGE_CHARACTER,
+ "Nah.",
+ DISPLAY_MESSAGE,
+ "Just keep him out of the mansion.",
+ DISPLAY_MESSAGE,
+ "But tell me if he appears again.",
+ DISPLAY_MESSAGE,
+ "Now get back to your job.",
+ END_DIALOG
+};
+
+const static char* dialog_183[] = {
+ "Don't tell me it's that boy again...",
+ CHANGE_CHARACTER,
+ "I'm afraid so.",
+ DISPLAY_MESSAGE,
+ "The guard says the boy's really desperate.",
+ END_DIALOG
+};
+
+const static char* dialog_184[] = {
+ "He's starting to get on my nerves.",
+ DISPLAY_MESSAGE,
+ "And what am I paying you for?",
+ CHANGE_CHARACTER,
+ "Should I...",
+ CHANGE_CHARACTER,
+ "Not yet.",
+ DISPLAY_MESSAGE,
+ "Let's give him a last chance.",
+ END_DIALOG
+};
+
+const static char* dialog_185[] = {
+ "Sir...",
+ CHANGE_CHARACTER,
+ "Let me guess...",
+ DISPLAY_MESSAGE,
+ "THE BOY?!?...",
+ CHANGE_CHARACTER,
+ "Bingo.",
+ CHANGE_CHARACTER,
+ "Why do I have to do everything?!",
+ DISPLAY_MESSAGE,
+ "Can't you do anything yourself?",
+ CHANGE_CHARACTER,
+ "Shall I kill him or just beat him to pieces?",
+ CHANGE_CHARACTER,
+ "You're stupid.",
+ DISPLAY_MESSAGE,
+ "There are ...better ways...",
+ END_DIALOG
+};
+
+const static char* dialog_186[] = {
+ "I'll handle it myself.",
+ DISPLAY_MESSAGE,
+ "Now get out!",
+ DISPLAY_MESSAGE,
+ "I have to change my clothes.",
+ END_DIALOG
+};
+
+const static char* dialog_187[] = {
+ "Hey, you up there!",
+ DISPLAY_MESSAGE,
+ "Get down at once!",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Zero reaction.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Is it deaf or something?",
+ END_DIALOG
+};
+
+const static char* dialog_188[] = {
+ "Hey, birdy, don't be shy.",
+ DISPLAY_MESSAGE,
+ "Come to me...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "(sigh)",
+ END_DIALOG
+};
+
+const static char* dialog_189[] = {
+ "Come here, little bird...",
+ END_DIALOG
+};
+
+const static char* dialog_190[] = {
+ NEW_LINE,
+ "Hey, keep away from this door!",
+ CHANGE_CHARACTER,
+ "Why?",
+ CHANGE_CHARACTER,
+ "None of your business.",
+ DISPLAY_MESSAGE,
+ "Just keep away.",
+ END_DIALOG
+};
+
+const static char* dialog_191[] = {
+ CHANGE_CHARACTER,
+ "I told you to keep away, didn't I?",
+ CHANGE_CHARACTER,
+ "OK, OK...",
+ END_DIALOG
+};
+
+const static char* dialog_192[] = {
+ "I've got a new delivery of gold.",
+ CHANGE_CHARACTER,
+ "Yeah, I know.",
+ DISPLAY_MESSAGE,
+ "Password?",
+ CHANGE_CHARACTER,
+ "Bimbo.",
+ CHANGE_CHARACTER,
+ "All right.",
+ DISPLAY_MESSAGE,
+ "You can bring the gold in.",
+ CHANGE_CHARACTER,
+ "Okey dokey.",
+ END_DIALOG
+};
+
+const static char* dialog_193[] = {
+ "As I told you, our organisation",
+ NEW_LINE,
+ "takes care of unusual problems.",
+ DISPLAY_MESSAGE,
+ "Last time we solved the problem of a UFO",
+ NEW_LINE,
+ "over the White House.",
+ CHANGE_CHARACTER,
+ "Oh, heally?",
+ DISPLAY_MESSAGE,
+ "How?",
+ CHANGE_CHARACTER,
+ "We shot the thing down.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "I undehstand.",
+ DISPLAY_MESSAGE,
+ "And who oh ...what was inside?",
+ CHANGE_CHARACTER,
+ "You want to know?",
+ CHANGE_CHARACTER,
+ "Oh, yes! As a fohtune-telleh",
+ NEW_LINE,
+ "I'm a cuhious pehson.",
+ CHANGE_CHARACTER,
+ "Do you REALLY want to know?",
+ CHANGE_CHARACTER,
+ "YES!",
+ CHANGE_CHARACTER,
+ "But...",
+ DISPLAY_MESSAGE,
+ "...REALLY REALLY?",
+ CHANGE_CHARACTER,
+ "YES!",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Sorry, I can't tell you.",
+ DISPLAY_MESSAGE,
+ "Anyway, we need your help.",
+ CHANGE_CHARACTER,
+ "I'm not a sechet agent, I'm a fohtune-tell...",
+ CHANGE_CHARACTER,
+ "I know.",
+ DISPLAY_MESSAGE,
+ "We have a very difficult case,",
+ NEW_LINE,
+ "which we haven't been able",
+ NEW_LINE,
+ "to solve for 6 months.",
+ DISPLAY_MESSAGE,
+ "We're in a hopeless situation.",
+ DISPLAY_MESSAGE,
+ "I thought to myself, if we handle",
+ NEW_LINE,
+ "strange cases...",
+ DISPLAY_MESSAGE,
+ "...then why not use",
+ NEW_LINE,
+ "strange means?",
+ CHANGE_CHARACTER,
+ "And?...",
+ CHANGE_CHARACTER,
+ "Let me show you the phone-book.",
+ DISPLAY_MESSAGE,
+ "Use your powers and select a name.",
+ DISPLAY_MESSAGE,
+ "Maybe a fresh mind will solve the case.",
+ CHANGE_CHARACTER,
+ "You don't believe it will wohk, do you?",
+ CHANGE_CHARACTER,
+ "No, I don't.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "This is stupid.",
+ CHANGE_CHARACTER,
+ "I know.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Okay. Show me the book.",
+ END_DIALOG
+};
+
+const static char* dialog_194[] = {
+ ANIM_WAIT,
+ "The name is...",
+ DISPLAY_MESSAGE,
+ "...Hoppeh...",
+ DISPLAY_MESSAGE,
+ "...Mahk Hoppeh...",
+ DISPLAY_MESSAGE,
+ "Hm...",
+ END_DIALOG
+};
+
+const static char* dialog_195[] = {
+ "He's coming.",
+ END_DIALOG
+};
+
+const static char* dialog_196[] = {
+ "Oh, I'm sorry about my men.",
+ DISPLAY_MESSAGE,
+ "Sometimes they get a bit too nervous...",
+ DISPLAY_MESSAGE,
+ "But, please...",
+ DISPLAY_MESSAGE,
+ "Let's talk...",
+ END_DIALOG
+};
+
+const static char* dialog_197[] = {
+ "Listen, mister...",
+ CHANGE_CHARACTER,
+ "I know, I know.",
+ DISPLAY_MESSAGE,
+ "Please, give me five minutes and",
+ NEW_LINE,
+ "everything will become clear.",
+ CHANGE_CHARACTER,
+ "Go on, I always liked that conspiracy stuff.",
+ CHANGE_CHARACTER,
+ "Well...",
+ DISPLAY_MESSAGE,
+ "I'm head of a secret government organization",
+ NEW_LINE,
+ "called the RGB.",
+ CHANGE_CHARACTER,
+ "Why RGB?",
+ CHANGE_CHARACTER,
+ "Even I don't know.",
+ DISPLAY_MESSAGE,
+ "It's so secret.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Cool.",
+ CHANGE_CHARACTER,
+ "The aim of my organization is to solve",
+ NEW_LINE,
+ "all the extraordinary problems around",
+ NEW_LINE,
+ "the world.",
+ CHANGE_CHARACTER,
+ "Like taxes?",
+ CHANGE_CHARACTER,
+ "No, like UFOs, strange inventions,",
+ NEW_LINE,
+ "spirits...",
+ CHANGE_CHARACTER,
+ "Wow!",
+ CHANGE_CHARACTER,
+ "Yes, when the police, the secret service and so on",
+ NEW_LINE,
+ "can't solve the problem...",
+ DISPLAY_MESSAGE,
+ "...it's delivered to us. But...",
+ DISPLAY_MESSAGE,
+ "You see, six months ago gold and cash",
+ NEW_LINE,
+ "deposited in bank safes started to",
+ NEW_LINE,
+ "disappear.",
+ DISPLAY_MESSAGE,
+ "Literally. Pum! And it's gone!",
+ CHANGE_CHARACTER,
+ "And?...",
+ CHANGE_CHARACTER,
+ "Gone - without a trace.",
+ DISPLAY_MESSAGE,
+ "The whole thing happens in a few seconds.",
+ DISPLAY_MESSAGE,
+ "We have video recordings but they don't",
+ NEW_LINE,
+ "show anything.",
+ DISPLAY_MESSAGE,
+ "That's why we hired the fortune-teller",
+ NEW_LINE,
+ "to show us someone who could be our",
+ NEW_LINE,
+ "salvation.",
+ DISPLAY_MESSAGE,
+ "She has chosen you.",
+ CHANGE_CHARACTER,
+ "I beg your pardon...",
+ DISPLAY_MESSAGE,
+ "You said you have hired...",
+ DISPLAY_MESSAGE,
+ "...A FORTUNE TELLER?!?",
+ CHANGE_CHARACTER,
+ "Yes, we're desperate and",
+ NEW_LINE,
+ "we'll try everything once.",
+ CHANGE_CHARACTER,
+ "This is crazy. Mum, wake me up!",
+ CHANGE_CHARACTER,
+ "Relax.",
+ DISPLAY_MESSAGE,
+ "We have a proposal for you.",
+ DISPLAY_MESSAGE,
+ "Try to help us and you will be rewarded.",
+ CHANGE_CHARACTER,
+ "What's in it for me?",
+ CHANGE_CHARACTER,
+ "Self-satisfaction?",
+ END_DIALOG
+};
+
+const static char* dialog_198[] = {
+ CHANGE_CHARACTER,
+ "Our respect?",
+ END_DIALOG
+};
+
+const static char* dialog_199[] = {
+ CHANGE_CHARACTER,
+ "Patriotism?",
+ END_DIALOG
+};
+
+const static char* dialog_200[] = {
+ CHANGE_CHARACTER,
+ "Girls?",
+ CHANGE_CHARACTER,
+ "What do you mean?",
+ CHANGE_CHARACTER,
+ "Every girl loves a secret agent.",
+ END_DIALOG
+};
+
+const static char* dialog_201[] = {
+ "Ok, I agree. What am I supposed to do?",
+ CHANGE_CHARACTER,
+ "Before you start, I suggest that first",
+ NEW_LINE,
+ "you get some training in our special",
+ NEW_LINE,
+ "secret camp.",
+ DISPLAY_MESSAGE,
+ "I'll issue a pass for you.",
+ DISPLAY_MESSAGE,
+ "Deal?",
+ CHANGE_CHARACTER,
+ "Deal!",
+ END_DIALOG
+};
+
+const static char* dialog_202[] = {
+ "...and it was even fun.",
+ CHANGE_CHARACTER,
+ "I'm glad you liked our training methods.",
+ DISPLAY_MESSAGE,
+ "But let's get to the point.",
+ DISPLAY_MESSAGE,
+ "I must admit I didn't believe you could",
+ NEW_LINE,
+ "actually help.",
+ DISPLAY_MESSAGE,
+ "Nothing personal.",
+ CHANGE_CHARACTER,
+ "I hope so.",
+ CHANGE_CHARACTER,
+ "But you brought us luck.",
+ DISPLAY_MESSAGE,
+ "Our people found out that some",
+ NEW_LINE,
+ "businessman is spending his",
+ NEW_LINE,
+ "money like crazy...",
+ DISPLAY_MESSAGE,
+ "...for some strange materials.",
+ DISPLAY_MESSAGE,
+ "There are three very suspicious things",
+ NEW_LINE,
+ "about him:",
+ DISPLAY_MESSAGE,
+ "...He pays in cash, which is very strange",
+ NEW_LINE,
+ "in a plastic card century...",
+ DISPLAY_MESSAGE,
+ "...Second, half a year ago he wasn't nearly",
+ NEW_LINE,
+ "as rich as he is now...",
+ DISPLAY_MESSAGE,
+ "...Third, what the hell does he need",
+ NEW_LINE,
+ "100 kg of borax for?",
+ CHANGE_CHARACTER,
+ "Maybe he's just a weirdo.",
+ CHANGE_CHARACTER,
+ "Maybe.",
+ DISPLAY_MESSAGE,
+ "But I want you to fly to the place",
+ NEW_LINE,
+ "and try to sneak inside his mansion...",
+ DISPLAY_MESSAGE,
+ "...to find out some more information.",
+ DISPLAY_MESSAGE,
+ "What do you say?",
+ CHANGE_CHARACTER,
+ "Well...",
+ CHANGE_CHARACTER,
+ "I promise you'll be an official secret",
+ NEW_LINE,
+ "agent after this mission.",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Promise?",
+ CHANGE_CHARACTER,
+ "My word of honour.",
+ CHANGE_CHARACTER,
+ "Okay. I'm ready.",
+ DISPLAY_MESSAGE,
+ "Where am I supposed to go?",
+ CHANGE_CHARACTER,
+ "It's a little village.",
+ DISPLAY_MESSAGE,
+ "You won't find it on many maps...",
+ DISPLAY_MESSAGE,
+ "But before you go, let me give you some special",
+ NEW_LINE,
+ "agent equipment.",
+ DISPLAY_MESSAGE,
+ "I would give you some boots to make you fly,",
+ NEW_LINE,
+ "but I've lent them to somebody.",
+ DISPLAY_MESSAGE,
+ "The mega-power gauntlets are also",
+ NEW_LINE,
+ "out of stock.",
+ DISPLAY_MESSAGE,
+ "As a matter of act I only have special",
+ NEW_LINE,
+ "super glue.",
+ DISPLAY_MESSAGE,
+ "Well, that's better than nothing...",
+ DISPLAY_MESSAGE,
+ "Good luck!",
+ END_DIALOG
+};
+
+const static char* dialog_203[] = {
+ CHANGE_CHARACTER,
+ "Don't worry.",
+ DISPLAY_MESSAGE,
+ "He'll be okay.",
+ DISPLAY_MESSAGE,
+ "Just... oh, look, here he goes...",
+ END_DIALOG
+};
+
+const static char* dialog_204[] = {
+ CHANGE_CHARACTER,
+ "He got what he deserved.",
+ DISPLAY_MESSAGE,
+ "But we've wasted enough time. Let's go!",
+ CHANGE_CHARACTER,
+ "No! Wait!",
+ DISPLAY_MESSAGE,
+ "I have to see Anne!",
+ CHANGE_CHARACTER,
+ "Ermm... You can't.",
+ CHANGE_CHARACTER,
+ "And why is that?!",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "You see... Anne was our man.",
+ DISPLAY_MESSAGE,
+ "She was ordered to keep an eye on you",
+ NEW_LINE,
+ "in case the microcamera got out of",
+ NEW_LINE,
+ "order.",
+ DISPLAY_MESSAGE,
+ "And she was also your motivation...",
+ CHANGE_CHARACTER,
+ "I don't believe you!",
+ CHANGE_CHARACTER,
+ "She has already gone off on",
+ NEW_LINE,
+ "her next mission.",
+ DISPLAY_MESSAGE,
+ "Sorry.",
+ CHANGE_CHARACTER,
+ "I guess grandma was involved too?",
+ CHANGE_CHARACTER,
+ "No, she's from here. We payed her.",
+ CHANGE_CHARACTER,
+ "Now that's interesting.",
+ DISPLAY_MESSAGE,
+ "Because if so, why did I have so",
+ NEW_LINE,
+ "many problems?...",
+ CHANGE_CHARACTER,
+ "We were pumping up your determination.",
+ DISPLAY_MESSAGE,
+ "We counted on you to have some strong will.",
+ DISPLAY_MESSAGE,
+ "We were not wrong, were we?",
+ CHANGE_CHARACTER,
+ "You treat people like animals in",
+ NEW_LINE,
+ "an experiment.",
+ DISPLAY_MESSAGE,
+ "You're ruthless...",
+ CHANGE_CHARACTER,
+ "It worked, didn't it?",
+ CHANGE_CHARACTER,
+ "This is all so unbelievable.",
+ DISPLAY_MESSAGE,
+ "Maybe you're gonna tell me that the dog is",
+ NEW_LINE,
+ "a masked agent...",
+ DISPLAY_MESSAGE,
+ "...the old man was my guard...",
+ DISPLAY_MESSAGE,
+ "...and you are from Mars?!",
+ END_DIALOG
+};
+
+const static char* dialog_205[] = {
+ CHANGE_CHARACTER,
+ "It's not a soap opera, it's",
+ NEW_LINE,
+ "just usual agent work.",
+ DISPLAY_MESSAGE,
+ "But hey, join the RGB and you could",
+ NEW_LINE,
+ "work with Anne there!",
+ CHANGE_CHARACTER,
+ ANIM_WAIT,
+ "Well...",
+ DISPLAY_MESSAGE,
+ "I'll think about it...",
+ CHANGE_CHARACTER,
+ "Great.",
+ DISPLAY_MESSAGE,
+ "It was a pleasure to see you in action!",
+ END_DIALOG
+};
+
+const static char* dialog_206[] = {
+ CHANGE_CHARACTER,
+ "You don't have to tell me.",
+ DISPLAY_MESSAGE,
+ "I have already read a very detailed report.",
+ CHANGE_CHARACTER,
+ "But what happened to the professor?",
+ CHANGE_CHARACTER,
+ "Oh, that poor man has forgotten the pill recipe",
+ NEW_LINE,
+ "again.",
+ DISPLAY_MESSAGE,
+ "We'll give him the best laboratory we can.",
+ DISPLAY_MESSAGE,
+ "Right now we have only those few pills",
+ NEW_LINE,
+ "you gave us.",
+ CHANGE_CHARACTER,
+ "And John Noty?",
+ CHANGE_CHARACTER,
+ "Don't worry, his greediness will be punished.",
+ CHANGE_CHARACTER,
+ "I hope so...",
+ DISPLAY_MESSAGE,
+ "And one more little thing...",
+ DISPLAY_MESSAGE,
+ "You have promised me something...",
+ END_DIALOG
+};
+
+const static char* dialog_207[] = {
+ CHANGE_CHARACTER,
+ "Me?...",
+ DISPLAY_MESSAGE,
+ "I don't remember...",
+ CHANGE_CHARACTER,
+ "You said you'll make me an official agent...",
+ DISPLAY_MESSAGE,
+ "'Girls love secret agents'. Remember?",
+ END_DIALOG
+};
+
+const static char* dialog_208[] = {
+ CHANGE_CHARACTER,
+ "(sigh)",
+ DISPLAY_MESSAGE,
+ "A promise is a promise...",
+ DISPLAY_MESSAGE,
+ "Let me think.",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "All right. Come here.",
+ END_DIALOG
+};
+
+const static char* dialog_209[] = {
+ "In the name of...",
+ DISPLAY_MESSAGE,
+ "...blah...blah...blah...",
+ DISPLAY_MESSAGE,
+ "...blah...blah...",
+ DISPLAY_MESSAGE,
+ "...for our country.",
+ END_DIALOG
+};
+
+const static char* dialog_210[] = {
+ " Well... ",
+ DISPLAY_MESSAGE,
+ "That's all, folks!",
+ END_DIALOG
+};
+
+const static char* dialog_211[] = {
+ "I found the time pill!",
+ DISPLAY_MESSAGE,
+ "It must have fallen out of the jar!...",
+ DISPLAY_MESSAGE,
+ ANIM_WAIT,
+ "Cool.",
+ END_DIALOG
+};
+
+const static char* dialog_212[] = {
+ "Wow!",
+ DISPLAY_MESSAGE,
+ "This is charming!...",
+ END_DIALOG
+};
+
+const static char** dialogs[] = {
+ dialog_0,
+ dialog_1,
+ dialog_2,
+ dialog_3,
+ dialog_4,
+ dialog_5,
+ dialog_6,
+ dialog_7,
+ dialog_8,
+ dialog_9,
+ dialog_10,
+ dialog_11,
+ dialog_12,
+ dialog_13,
+ dialog_14,
+ dialog_15,
+ dialog_16,
+ dialog_17,
+ dialog_18,
+ dialog_19,
+ dialog_20,
+ dialog_21,
+ dialog_22,
+ dialog_23,
+ dialog_24,
+ dialog_25,
+ dialog_26,
+ dialog_27,
+ dialog_28,
+ dialog_29,
+ dialog_30,
+ dialog_31,
+ dialog_32,
+ dialog_33,
+ dialog_34,
+ dialog_35,
+ dialog_36,
+ dialog_37,
+ dialog_38,
+ dialog_39,
+ dialog_40,
+ dialog_41,
+ dialog_42,
+ dialog_43,
+ dialog_44,
+ dialog_45,
+ dialog_46,
+ dialog_47,
+ dialog_48,
+ dialog_49,
+ dialog_50,
+ dialog_51,
+ dialog_52,
+ dialog_53,
+ dialog_54,
+ dialog_55,
+ dialog_56,
+ dialog_57,
+ dialog_58,
+ dialog_59,
+ dialog_60,
+ dialog_61,
+ dialog_62,
+ dialog_63,
+ dialog_64,
+ dialog_65,
+ dialog_66,
+ dialog_67,
+ dialog_68,
+ dialog_69,
+ dialog_70,
+ dialog_71,
+ dialog_72,
+ dialog_73,
+ dialog_74,
+ dialog_75,
+ dialog_76,
+ dialog_77,
+ dialog_78,
+ dialog_79,
+ dialog_80,
+ dialog_81,
+ dialog_82,
+ dialog_83,
+ dialog_84,
+ dialog_85,
+ dialog_86,
+ dialog_87,
+ dialog_88,
+ dialog_89,
+ dialog_90,
+ dialog_91,
+ dialog_92,
+ dialog_93,
+ dialog_94,
+ dialog_95,
+ dialog_96,
+ dialog_97,
+ dialog_98,
+ dialog_99,
+ dialog_100,
+ dialog_101,
+ dialog_102,
+ dialog_103,
+ dialog_104,
+ dialog_105,
+ dialog_106,
+ dialog_107,
+ dialog_108,
+ dialog_109,
+ dialog_110,
+ dialog_111,
+ dialog_112,
+ dialog_113,
+ dialog_114,
+ dialog_115,
+ dialog_116,
+ dialog_117,
+ dialog_118,
+ dialog_119,
+ dialog_120,
+ dialog_121,
+ dialog_122,
+ dialog_123,
+ dialog_124,
+ dialog_125,
+ dialog_126,
+ dialog_127,
+ dialog_128,
+ dialog_129,
+ dialog_130,
+ dialog_131,
+ dialog_132,
+ dialog_133,
+ dialog_134,
+ dialog_135,
+ dialog_136,
+ dialog_137,
+ dialog_138,
+ dialog_139,
+ dialog_140,
+ dialog_141,
+ dialog_142,
+ dialog_143,
+ dialog_144,
+ dialog_145,
+ dialog_146,
+ dialog_147,
+ dialog_148,
+ dialog_149,
+ dialog_150,
+ dialog_151,
+ dialog_152,
+ dialog_153,
+ dialog_154,
+ dialog_155,
+ dialog_156,
+ dialog_157,
+ dialog_158,
+ dialog_159,
+ dialog_160,
+ dialog_161,
+ dialog_162,
+ dialog_163,
+ dialog_164,
+ dialog_165,
+ dialog_166,
+ dialog_167,
+ dialog_168,
+ dialog_169,
+ dialog_170,
+ dialog_171,
+ dialog_172,
+ dialog_173,
+ dialog_174,
+ dialog_175,
+ dialog_176,
+ dialog_177,
+ dialog_178,
+ dialog_179,
+ dialog_180,
+ dialog_181,
+ dialog_182,
+ dialog_183,
+ dialog_184,
+ dialog_185,
+ dialog_186,
+ dialog_187,
+ dialog_188,
+ dialog_189,
+ dialog_190,
+ dialog_191,
+ dialog_192,
+ dialog_193,
+ dialog_194,
+ dialog_195,
+ dialog_196,
+ dialog_197,
+ dialog_198,
+ dialog_199,
+ dialog_200,
+ dialog_201,
+ dialog_202,
+ dialog_203,
+ dialog_204,
+ dialog_205,
+ dialog_206,
+ dialog_207,
+ dialog_208,
+ dialog_209,
+ dialog_210,
+ dialog_211,
+ dialog_212
+};
+
+#endif
diff --git a/devtools/create_teenagent/util.cpp b/devtools/create_teenagent/util.cpp
new file mode 100644
index 0000000000..5ce8237b85
--- /dev/null
+++ b/devtools/create_teenagent/util.cpp
@@ -0,0 +1,152 @@
+/* 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.
+ *
+ */
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include "util.h"
+#include <stdarg.h>
+
+#ifdef _MSC_VER
+ #define vsnprintf _vsnprintf
+#endif
+
+void error(const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "ERROR: %s!\n", buf);
+
+ exit(1);
+}
+
+void warning(const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "WARNING: %s!\n", buf);
+}
+
+int scumm_stricmp(const char *s1, const char *s2) {
+ byte l1, l2;
+ do {
+ // Don't use ++ inside tolower, in case the macro uses its
+ // arguments more than once.
+ l1 = (byte)*s1++;
+ l1 = tolower(l1);
+ l2 = (byte)*s2++;
+ l2 = tolower(l2);
+ } while (l1 == l2 && l1 != 0);
+ return l1 - l2;
+}
+
+void debug(int level, const char *s, ...) {
+ char buf[1024];
+ va_list va;
+
+ va_start(va, s);
+ vsnprintf(buf, 1024, s, va);
+ va_end(va);
+
+ fprintf(stderr, "DEBUG: %s!\n", buf);
+}
+
+uint8 readByte(FILE *fp) {
+ return fgetc(fp);
+}
+
+uint16 readUint16BE(FILE *fp) {
+ uint16 ret = 0;
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp);
+ return ret;
+}
+
+uint16 readUint16LE(FILE *fp) {
+ uint16 ret = 0;
+ ret |= fgetc(fp);
+ ret |= fgetc(fp) << 8;
+ return ret;
+}
+
+uint32 readUint32BE(FILE *fp) {
+ uint32 ret = 0;
+ ret |= fgetc(fp) << 24;
+ ret |= fgetc(fp) << 16;
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp);
+ return ret;
+}
+
+uint32 readUint32LE(FILE *fp) {
+ uint32 ret = 0;
+ ret |= fgetc(fp);
+ ret |= fgetc(fp) << 8;
+ ret |= fgetc(fp) << 16;
+ ret |= fgetc(fp) << 24;
+ return ret;
+}
+
+void writeByte(FILE *fp, uint8 b) {
+ fwrite(&b, 1, 1, fp);
+}
+
+void writeUint16BE(FILE *fp, uint16 value) {
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value));
+}
+
+void writeUint16LE(FILE *fp, uint16 value) {
+ writeByte(fp, (uint8)(value));
+ writeByte(fp, (uint8)(value >> 8));
+}
+
+void writeUint32BE(FILE *fp, uint32 value) {
+ writeByte(fp, (uint8)(value >> 24));
+ writeByte(fp, (uint8)(value >> 16));
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value));
+}
+
+void writeUint32LE(FILE *fp, uint32 value) {
+ writeByte(fp, (uint8)(value));
+ writeByte(fp, (uint8)(value >> 8));
+ writeByte(fp, (uint8)(value >> 16));
+ writeByte(fp, (uint8)(value >> 24));
+}
+
+uint32 fileSize(FILE *fp) {
+ uint32 sz;
+ uint32 pos = ftell(fp);
+ fseek(fp, 0, SEEK_END);
+ sz = ftell(fp);
+ fseek(fp, pos, SEEK_SET);
+ return sz;
+}
diff --git a/devtools/create_teenagent/util.h b/devtools/create_teenagent/util.h
index 0d8e15cc37..a2783cca71 100644
--- a/devtools/create_teenagent/util.h
+++ b/devtools/create_teenagent/util.h
@@ -50,6 +50,7 @@ uint32 fileSize(FILE *fp);
void NORETURN_PRE error(const char *s, ...) NORETURN_POST;
void warning(const char *s, ...);
void debug(int level, const char *s, ...);
+int scumm_stricmp(const char *s1, const char *s2);
using namespace Common;
diff --git a/devtools/credits.pl b/devtools/credits.pl
index e04e35d3be..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();
@@ -940,6 +972,9 @@ begin_credits("Credits");
begin_section("Basque");
add_person("Mikel Iturbe Urretxa", "", "");
end_section();
+ begin_section("Belarusian");
+ add_person("Ivan Lukyanov", "", "");
+ end_section();
begin_section("Catalan");
add_person("Jordi Vilalta Prat", "jvprat", "");
end_section();
@@ -949,6 +984,9 @@ begin_credits("Credits");
begin_section("Danish");
add_person("Steffen Nyeland", "", "");
end_section();
+ begin_section("Finnish");
+ add_person("Toni Saarela", "catnose", "");
+ end_section();
begin_section("French");
add_person("Thierry Crozat", "criezy", "");
end_section();
diff --git a/devtools/md5table.c b/devtools/md5table.c
index cb1434c90b..e94a11c9de 100644
--- a/devtools/md5table.c
+++ b/devtools/md5table.c
@@ -79,7 +79,7 @@ static const StringMap platformMap[] = {
{ "Amiga", "kPlatformAmiga" },
{ "Atari", "kPlatformAtariST" },
{ "C64", "kPlatformC64" },
- { "DOS", "kPlatformPC" },
+ { "DOS", "kPlatformDOS" },
{ "FM-TOWNS", "kPlatformFMTowns" },
{ "iOS", "kPlatformIOS" },
{ "Mac", "kPlatformMacintosh" },
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index 42dcb27d1a..6e3bae1d7e 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -346,7 +346,8 @@ ft Full Throttle
4bedb49943df95a9c900a5a82ccbe9de -1 fr All? - - - cyx
8bdb0bf87b5e303dd35693afb9351215 -1 de All? - - - dhewg
55518cd73cf9c6d23ea29c51ee06bdfe -1 it All? - - - delfino
- 55e4cc866ff9046824e1c638ba2b8c7f -1 ru All? - - - sev
+ 55e4cc866ff9046824e1c638ba2b8c7f -1 ru All? - Akella - sev
+ 291fb06071e65897f755846611f5ad40 19697 ru All? - 7-Wolf - sev
e72bb4c2b613db2cf50f89ff6350e70a -1 es All? - - -
fe381e45117878b1e942cb876b050fd6 513243679 en Mac - - Mac bundle Fingolfin
04401d747f1a2c1c4b388daff71ed378 535405461 de Mac - - Mac bundle Fingolfin
@@ -546,6 +547,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 +562,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 +718,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/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index a3c02474eb..320ed16a6e 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -4,7 +4,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm"
android:versionCode="@ANDROID_VERSIONCODE@"
- android:versionName="1.6.0git"
+ android:versionName="1.7.0git"
android:installLocation="preferExternal"
android:sharedUserId="org.scummvm.scummvm">
diff --git a/dists/android/plugin-manifest.xml b/dists/android/plugin-manifest.xml
index 7855c330c6..f96cd4eb91 100644
--- a/dists/android/plugin-manifest.xml
+++ b/dists/android/plugin-manifest.xml
@@ -3,7 +3,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.scummvm.scummvm.plugin.@PLUGIN_NAME@"
android:versionCode="@PLUGIN_VERSION_CODE@"
- android:versionName="1.6.0git"
+ android:versionName="1.7.0git"
android:installLocation="preferExternal"
android:sharedUserId="org.scummvm.scummvm">
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/neverhood.dat b/dists/engine-data/neverhood.dat
new file mode 100644
index 0000000000..dc95c00965
--- /dev/null
+++ b/dists/engine-data/neverhood.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/gph/README-GPH b/dists/gph/README-GPH
index 974c2cf266..e3ce3e86b6 100644
--- a/dists/gph/README-GPH
+++ b/dists/gph/README-GPH
@@ -1,4 +1,4 @@
-ScummVM 1.6.0git - GPH DEVICE SPECIFIC README
+ScummVM 1.7.0git - GPH DEVICE SPECIFIC README
------------------------------------------------------------------------
diff --git a/dists/gph/scummvm.ini b/dists/gph/scummvm.ini
index 7d9d85fcc2..36251c7c5c 100644
--- a/dists/gph/scummvm.ini
+++ b/dists/gph/scummvm.ini
@@ -1,5 +1,5 @@
[info]
-name="ScummVM 1.6.0git"
+name="ScummVM 1.7.0git"
path="/scummvm/scummvm.gpe"
icon="/scummvm/scummvm.png"
title="/scummvm/scummvmb.png"
diff --git a/dists/iphone/Info.plist b/dists/iphone/Info.plist
index 2f6ba85b00..9667f807eb 100644
--- a/dists/iphone/Info.plist
+++ b/dists/iphone/Info.plist
@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.6.0git</string>
+ <string>1.7.0git</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.6.0git</string>
+ <string>1.7.0git</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
diff --git a/dists/irix/scummvm.spec b/dists/irix/scummvm.spec
index bbdf31cc2c..66f7bda998 100644
--- a/dists/irix/scummvm.spec
+++ b/dists/irix/scummvm.spec
@@ -1,5 +1,5 @@
product scummvm
- id "ScummVM 1.6.0git"
+ id "ScummVM 1.7.0git"
image sw
id "software"
version 18
diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist
index d8c28f6a08..b9a4eff1b8 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.7.0git, Copyright 2001-2013 The ScummVM team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -40,13 +40,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.6.0git</string>
+ <string>1.7.0git</string>
<key>CFBundleVersion</key>
- <string>1.6.0git</string>
+ <string>1.7.0git</string>
<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/openpandora/PXML.xml b/dists/openpandora/PXML.xml
index b759c311ba..157a773677 100644
--- a/dists/openpandora/PXML.xml
+++ b/dists/openpandora/PXML.xml
@@ -4,11 +4,11 @@
<package id="scummvm.djwillis.0001">
<author name="DJWillis" website="http://www.scummvm.org/"/>
<!-- version type can be alpha, beta or release, set to release in branch -->
- <version major="1" minor="6" release="0" build="1" type="release"/>
+ <version major="1" minor="7" release="0" build="1" type="release"/>
<!-- Both title and titles are needed -->
- <title lang="en_US">ScummVM 1.6.0git</title>
+ <title lang="en_US">ScummVM 1.7.0git</title>
<titles>
- <title lang="en_US">ScummVM 1.6.0git</title>
+ <title lang="en_US">ScummVM 1.7.0git</title>
</titles>
<descriptions>
<description lang="en_US">
@@ -25,7 +25,7 @@
<exec command="./runscummvm.sh"/>
<author name="DJWillis" website="http://www.scummvm.org/"/>
<!-- version type can be alpha, beta or release, set to release in branch -->
- <version major="1" minor="6" release="0" build="1" type="release"/>
+ <version major="1" minor="7" release="0" build="1" type="release"/>
<!-- Both title and titles are needed -->
<title lang="en_US">ScummVM</title>
<titles>
diff --git a/dists/openpandora/README-OPENPANDORA b/dists/openpandora/README-OPENPANDORA
index e3c7c9d631..d9c4c9d0bb 100644
--- a/dists/openpandora/README-OPENPANDORA
+++ b/dists/openpandora/README-OPENPANDORA
@@ -1,4 +1,4 @@
-ScummVM 1.6.0git - OPENPANDORA SPECIFIC README
+ScummVM 1.7.0git - OPENPANDORA SPECIFIC README
------------------------------------------------------------------------
Please refer to the:
diff --git a/dists/openpandora/README-PND.txt b/dists/openpandora/README-PND.txt
index 594ad293ed..e7fee27f1b 100644
--- a/dists/openpandora/README-PND.txt
+++ b/dists/openpandora/README-PND.txt
@@ -1,4 +1,4 @@
-ScummVM 1.6.0git - OPENPANDORA README - HOW TO INSTALL
+ScummVM 1.7.0git - OPENPANDORA README - HOW TO INSTALL
------------------------------------------------------------------------
Please refer to the:
diff --git a/dists/openpandora/index.html b/dists/openpandora/index.html
index 5da951546c..b109e55df3 100644
--- a/dists/openpandora/index.html
+++ b/dists/openpandora/index.html
@@ -5,7 +5,7 @@
</h3>
<h4>
- <p>ScummVM 1.6.0git: OpenPandora Specific Documentation</p>
+ <p>ScummVM 1.7.0git: OpenPandora Specific Documentation</p>
</h4>
<A href="docs/README-OPENPANDORA">ScummVM OpenPandora README</a><br/>
@@ -13,7 +13,7 @@
<A href="http://wiki.scummvm.org/index.php/OpenPandora">ScummVM OpenPandora WiKi</a><br/>
<h4>
- <p>ScummVM 1.6.0git: General Documentation</p>
+ <p>ScummVM 1.7.0git: General Documentation</p>
</h4>
<A href="http://www.scummvm.org/">ScummVM website</a><br/>
diff --git a/dists/redhat/scummvm-tools.spec b/dists/redhat/scummvm-tools.spec
index 2f65931a70..50af873541 100644
--- a/dists/redhat/scummvm-tools.spec
+++ b/dists/redhat/scummvm-tools.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm-tools
-Version : 1.6.0git
+Version : 1.7.0git
Release : 1
Summary : ScummVM-related tools
Group : Interpreters
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index bd17017fbf..33622ffb9b 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm
-Version : 1.6.0git
+Version : 1.7.0git
Release : 1
Summary : Graphic adventure game interpreter
Group : Interpreters
@@ -72,6 +72,7 @@ install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.c
install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat
install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
+install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
@@ -111,6 +112,7 @@ fi
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in
index 9dbd8add5b..5db2807d0e 100644
--- a/dists/redhat/scummvm.spec.in
+++ b/dists/redhat/scummvm.spec.in
@@ -72,6 +72,7 @@ install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.c
install -m644 -D dists/engine-data/drascula.dat %{buildroot}%{_datadir}/scummvm/drascula.dat
install -m644 -D dists/engine-data/teenagent.dat %{buildroot}%{_datadir}/scummvm/teenagent.dat
install -m644 -D dists/engine-data/hugo.dat %{buildroot}%{_datadir}/scummvm/hugo.dat
+install -m644 -D dists/engine-data/tony.dat %{buildroot}%{_datadir}/scummvm/tony.dat
install -m644 -D dists/engine-data/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
@@ -111,6 +112,7 @@ fi
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/tony.dat
%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 8527c668c8..f3fa14c95a 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -20,40 +20,46 @@ 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_NEVERHOOD == STATIC_PLUGIN
+neverhood.dat FILE "dists/engine-data/neverhood.dat"
+#endif
+#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_TONY == STATIC_PLUGIN
+tony.dat FILE "dists/engine-data/tony.dat"
+#endif
+#if ENABLE_TOON == STATIC_PLUGIN
toon.dat FILE "dists/engine-data/toon.dat"
#endif
-#if ENABLE_TONY == STATIC_PLUGIN
-tony.dat FILE "dists/engine-data/tony.dat"
+#if ENABLE_WINTERMUTE == STATIC_PLUGIN
+wintermute.zip FILE "dists/engine-data/wintermute.zip"
#endif
-#if ENABLE_AGI == STATIC_PLUGIN
+#if ENABLE_AGI == STATIC_PLUGIN
pred.dic FILE "dists/pred.dic"
#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,6,0,0
- PRODUCTVERSION 1,6,0,0
+ FILEVERSION 1,7,0,0
+ PRODUCTVERSION 1,7,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -70,13 +76,13 @@ BEGIN
BEGIN
VALUE "Comments", "Look! A three headed monkey (TM)! .. Nice use of the TM!\0"
VALUE "FileDescription", "http://www.scummvm.org/\0"
- VALUE "FileVersion", "1.6.0git\0"
+ VALUE "FileVersion", "1.7.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"
- VALUE "ProductVersion", "1.6.0git\0"
+ VALUE "ProductVersion", "1.7.0git\0"
END
END
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index a874b98514..b7a87f4e3d 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -20,31 +20,40 @@ 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_NEVERHOOD == STATIC_PLUGIN
+neverhood.dat FILE "dists/engine-data/neverhood.dat"
+#endif
+#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_TONY == STATIC_PLUGIN
+tony.dat FILE "dists/engine-data/tony.dat"
+#endif
+#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 +78,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/slackware/scummvm.SlackBuild b/dists/slackware/scummvm.SlackBuild
index 076a1d20ea..215b502f2a 100755
--- a/dists/slackware/scummvm.SlackBuild
+++ b/dists/slackware/scummvm.SlackBuild
@@ -9,7 +9,7 @@ if [ "$TMP" = "" ]; then
fi
PKG=$TMP/package-scummvm
-VERSION=1.6.0git
+VERSION=1.7.0git
ARCH=i486
BUILD=1
diff --git a/dists/wii/meta.xml b/dists/wii/meta.xml
index 5a4c46e144..ad4ec9cc7d 100644
--- a/dists/wii/meta.xml
+++ b/dists/wii/meta.xml
@@ -2,7 +2,7 @@
<app version="1">
<name>ScummVM</name>
<coder>The ScummVM Team</coder>
- <version>1.6.0git@REVISION@</version>
+ <version>1.7.0git@REVISION@</version>
<release_date>@TIMESTAMP@</release_date>
<short_description>Point &amp; Click Adventures</short_description>
<long_description>ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!
diff --git a/dists/win32/ScummVM.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..5357be9fe4 100644
--- a/dists/win32/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -72,11 +72,11 @@ Name ScummVM
# General Symbol Definitions
#########################################################################################
!define REGKEY "Software\$(^Name)\$(^Name)"
-!define VERSION "1.6.0git"
+!define VERSION "1.7.0git"
!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
@@ -92,7 +92,7 @@ XPStyle on
#TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent
; (will build unicode installer with NSIS 2.50+)
-VIProductVersion 1.6.0.0
+VIProductVersion 1.7.0.0
VIAddVersionKey ProductName $(^Name)
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey CompanyName "${COMPANY}"
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..390d20ab1d 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,15 @@ 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 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]
@@ -315,21 +321,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 +1522,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 +1583,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 +1685,4 @@ http://www.scummvm.org/
+
diff --git a/doc/de/Liesmich b/doc/de/Liesmich
index 88b6ce6de8..8e28c201c7 100644
--- a/doc/de/Liesmich
+++ b/doc/de/Liesmich
@@ -304,10 +304,15 @@ Andere Spiele:
Discworld 2: Vermutlich vermisst [dw2]
DraÄi Historie [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]
Erben der Erde: Die große Suche [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]
@@ -425,21 +430,25 @@ akzeptiert wird.
ScummVM wird den Kopierschutz in folgenden Spielen überspringen:
- * 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
-- umgangen mit freundlicher Genehmigung von Revolution Software.
+ * Dreamweb
+ -- eine Liste der verfügbaren Befehle in den Terminals im Spiel wird nun
+ angezeigt, wenn der Spieler den Befehl „HILFE“ oder „HELP“ verwendet.
* Erben der Erde: Die große Suche (Diskettenversion)
-- umgangen mit freundlicher Genehmigung von Wyrmkeep Entertainment,
da er in allen CD-Versionen des Spiels umgangen wurde.
+ * Loom (EGA)
+ * Maniac Mansion
+ * Monkey Island 2: LeChuck's Revenge
* Simon the Sorcerer 1 (Diskettenversion)
* Simon the Sorcerer 2 (Diskettenversion)
-- umgangen mit freundlicher Genehmigung von Adventure Soft,
da er in allen CD-Versionen des Spiels umgangen wurde.
+ * The Secret of Monkey Island (VGA)
* Waxworks
+ * Zak McKracken and the Alien Mindbenders
+
3.2) Hinweise zu Commodore64-Spielen:
---- --------------------------------
@@ -2305,9 +2314,17 @@ Schlüsselwort:
walkspeed Zahl Bewegungsgeschwindigkeit (0-4)
+The Legend of Kyrandia: The Hand of Fate verfügt zusätzlich über folgendes nicht
+standardmäßiges Schlüsselwort:
+
+ walkspeed Zahl Bewegungsgeschwindigkeit (3 oder 5,
+ entsprechend schnell oder langsam)
+
The Legend of Kyrandia: Malcolm's Revenge verfügt zusätzlich über folgende nicht
standardmäßige Schlüsselwörter:
+ walkspeed Zahl Bewegungsgeschwindigkeit (3 oder 5,
+ entsprechend schnell oder langsam)
studio_audience Bool Falls „true“, hört man stets Applaus- und
Jubelgeräusche, wenn Malcolm einen Scherz macht.
skip_support Bool Falls „true“, kann der Spieler Textteile und
@@ -2318,9 +2335,12 @@ standardmäßige Schlüsselwörter:
The 7th Guest verfügt zusätzlich über folgendes nicht standardmäßiges
Schlüsselwort:
- t7g_speed Text Videowiedergabe-Geschwindigkeit
- (normal, tweaked [optimiert],
- im_an_ios [ich bin ein iOS])
+ fast_movie_speed Bool Falls „true“, werden Filme in erhöhter
+ Geschwindigkeit wiedergegeben, die der
+ Geschwindigkeit der iOS-Version entspricht.
+ Filme ohne Ton werden weiterhin in normaler
+ Geschwindigkeit wiedergegeben, um Probleme bei
+ der Musik-Synchronität zu vermeiden.
8.2) Spielspezifische Optionen bei der grafischen Benutzeroberfläche
diff --git a/doc/de/Neues b/doc/de/Neues
index 74203148e7..11dbb9309a 100644
--- a/doc/de/Neues
+++ b/doc/de/Neues
@@ -2,6 +2,99 @@ Umfangreichere Änderungsaufzeichnungen des neusten experimentellen Codes finden
Sie auf Englisch unter:
https://github.com/scummvm/scummvm/commits/
+1.6.0 (31.05.2013)
+ Neue Spiele:
+ - Unterstützung für 3 Skulls of the Toltecs hinzugefügt.
+ - Unterstützung für Eye of the Beholder hinzugefügt.
+ - Unterstützung für Eye of the Beholder II: The Legend of Darkmoon
+ hinzugefügt.
+ - Unterstützung für Hopkins FBI hinzugefügt.
+ - Unterstützung für Tony Tough and the Night of Roasted Moths hinzugefügt.
+ - Unterstützung für The Journeyman Project: Pegasus Prime hinzugefügt.
+ - Unterstützung für Macintosh-Version von Discworld 1 hinzugefügt.
+
+ Allgemein:
+ - Eine neue Spielstandauswahl hinzugefügt, die auf einem Raster kleiner
+ Vorschaubilder basiert. Diese wird nur bei einer Auflösung von mindestens
+ 640x400 unterstützt. Die alte Spielstandauswahl ist weiterhin verfügbar und
+ wird bei Spielen verwendet, die keine kleinen Vorschaubilder unterstützen.
+ Es ist zudem möglich, die alte Spielstandauswahl als Voreinstellung
+ festzulegen.
+ - Untersystem für Videodekodierung umgeschrieben.
+ - Galicische Übersetzung hinzugefügt.
+ - Finnische Übersetzung hinzugefügt.
+ - Weißrussische Übersetzung hinzugefügt.
+ - Die Verwendung des Mausrades auf einem Schieberegler ändert nun den Wert im
+ kleinstmöglichen Umfang. Dies ist berechenbarer als das alte Verhalten,
+ nach welchem der Wert um „ein Pixel“ geändert wurde, wodurch er sich
+ manchmal überhaupt nicht geändert hat.
+ - MT-32-Emulationscode auf den neusten Stand des Munt-Projekt-Schnappschusses
+ gebracht.
+ - Fenster für FluidSynth-Einstellungen hinzugefügt, hauptsächlich für Hall-
+ und Chor-Einstellungen.
+ - Abstürze einiger Smacker-Videos beseitigt.
+
+ Cine:
+ - Audio-Unterstützung für Amiga und AtariST-Versionen von Future Wars
+ verbessert. Musik wird nun langsam ausgeblendet anstatt abrupt zu stoppen.
+ Die Balance-Regelung der Sound-Effekte funktioniert nun richtig, wenn sie
+ vom Spiel verlangt wird.
+
+ CGE:
+ - Soltys enthält ein Puzzle, bei welchem man die ALT-Taste drücken muss,
+ während man auf ein Objekt klickt. Dieses Puzzle wurde auf Geräten
+ deaktiviert, auf denen diese Taste nicht verfügbar ist.
+
+ Drascula:
+ - Einige Probleme der Benutzeroberfläche im Zusammenhang mit dem Bildschirm
+ zum Speichern und Laden gelöst.
+ - Erweiterte Spielstandfunktionsweise hinzugefügt, einschließlich Zeitstempel
+ und kleiner Vorschaubilder für Spielstände und die Möglichkeit, Spielstände
+ aus der Spieleliste heraus zu laden und zu löschen. Es ist nun möglich, die
+ Menüs von ScummVM zum Speichern und Laden zu verwenden.
+ - Die Taste F7 (vorher ohne Funktion) zeigt nun immer das Lade-Menü von
+ ScummVM. Die Taste F10 zeigt entweder das originale Lade-Menü oder das
+ Lade-Menü von ScummVM, abhängig davon, ob der Benutzer eingestellt hat,
+ dass die Menüs von ScummVM zum Speichern und Laden verwendet werden sollen.
+
+ Dreamweb:
+ - Da das Spiel nun Freeware ist, gibt es einen kleinen zusätzlichen
+ Hilfetext, der die verfügbaren Befehle bei Terminals im Spiel aufzählt,
+ wenn der Spiele den Befehl „help“ eingibt. Zuvor mussten Spieler die
+ verfügbaren Befehle im Handbuch nachschlagen. Da dieser Bezug auf das
+ Handbuch eine Art Kopierschutz ist, kann dieser zusätzliche Text durch den
+ Kopierschutz-Parameter bei den Kommandozeilenoptionen von ScummVM
+ deaktiviert und aktiviert werden.
+
+ Groovie:
+ - Optionen für Filmgeschwindigkeit vereinfacht und spezifische Option für
+ The 7th Guest hinzugefügt. Filmoptionen sind nun „normal“ und
+ „fast“ (schnell), wobei letztere die Filmgeschwindigkeit in T7G erhöht, um
+ derjenigen der iOS-Version zu entsprechen. Der Spieleintrag muss
+ möglicherweise erneut zur Spieleliste hinzugefügt werden, damit die neue
+ Einstellung sichtbar wird.
+
+ SAGA:
+ - Musikunterstützung für Macintosh-Version von
+ I Have No Mouth, and I Must Scream hinzugefügt.
+
+ SCUMM:
+ - Audio-Treiber für Macintosh-Version von Monkey Island 2 integriert. Nun
+ wird die auf Samples basierende Audio-Ausgabe richtig unterstützt. Dieselbe
+ Ausgabe wird für die m68k-Macintosh-Version von Indiana Jones and the
+ Fate of Atlantis verwendet.
+ - Verbesserte Musikunterstützung für Macintosh-Version von Monkey Island 1.
+ Nun werden die originalen Instrumente verwendet, anstatt sie näherungsweise
+ mit Instrumenten von General MIDI zu simulieren, und sollte viel ähnlicher
+ zum Original klingen.
+ - Sound- und Musikunterstützung für Macintosh-Version von Loom hinzugefügt.
+ - Handhabung von Doppelklicks in Macintosh-Version von Loom hinzugefügt.
+ - Größere Fehlerbeseitigungen in INSANE (bei den Motorradkämpfen in Vollgas).
+
+ TOUCHE:
+ - Unterstützung hinzugefügt für verbesserte Musik von James Woodcock.
+ http://www.jameswoodcock.co.uk/category/scummvm-music-enhancement-project/
+
1.5.0 (27.07.2012)
Neue Spiele:
- Unterstützung für Backyard Baseball 2003 hinzugefügt.
@@ -16,7 +109,7 @@ Sie auf Englisch unter:
- Unterstützung für Soltys hinzugefügt.
- Unterstützung für The Princess and the Crab hinzugefügt.
-Allgemein:
+ Allgemein:
- MT-32-Emulationscode auf den neusten Stand des Munt-Projekt-Schnappschusses
gebracht. Die Emulation hat sich drastisch verbessert.
- Unterstützung für TrueType-Schriftarten über FreeType2 in unserer
diff --git a/doc/se/LasMig b/doc/se/LasMig
index 9ac79b4c35..d47918d1f4 100644
--- a/doc/se/LasMig
+++ b/doc/se/LasMig
@@ -214,10 +214,15 @@ MADE-spel från Activision:
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]
@@ -317,21 +322,24 @@ I vissa fall visar ScummVM fortfarande skärmen för kopieringsskydd. Försök a
ScummVM skippar kopieringsskyddet för följande spel:
- * 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
-- överskridit med tillstånd från Revolution Software.
+ * Dreamweb
+ -- en lista med tillgängliga kommandon i spelets terminaler visas nu
+ när spelaren använder 'help'-kommandot.
* Inherit the Earth: Quest for the Orb (Diskettversionen)
-- överskridit med tillstånd från Wyrmkeep Entertainment,
då det överskridits på alla CD-utgåvor av spelet.
+ * Loom (EGA DOS)
+ * Maniac Mansion
+ * Monkey Island 2: LeChuck's Revenge
* Simon the Sorcerer 1 (Diskettversionen)
* Simon the Sorcerer 2 (Diskettversionen)
-- överskridit med tillstånd från Adventure Soft,
då det överskridits på alla CD-utgåvor av spelet.
+ * The Secret of Monkey Island (VGA)
* Waxworks
+ * Zak McKracken and the Alien Mindbenders
3.2) Notiser om Commodore64-spel:
@@ -889,9 +897,9 @@ ScummVM stöder ett antal kortkommandon medan du spelar. De är olika för SCUMM
- och + - Texthastighet långsammare/snabbare
F5 - Visar en ladda/spara-ruta
Alt-F5 - Visar spelets originalruta för att ladda/spara,
- förutsatt att det finns en. Du kan ladda och spara
- på det här viset, men det rekommenderas ej då det
- kan orsaka krascher.
+ förutsatt att det finns en. Du kan ladda och
+ spara på det här viset, men det
+ rekommenderas ej då det kan orsaka krascher.
i - Visar IQ-poäng (Indiana Jones and the Last
Crusade och Indiana Jones and the Fate of
Atlantis)
@@ -1512,7 +1520,8 @@ Ett exempel på en konfigurationsfil ser ut så här:
Följande nyckelord kan användas:
path string Sökvägen dit spelets datafiler ligger
- autosave_period number Antal sekunder mellan autosparningar (standard: 300)
+ autosave_period number Antal sekunder mellan autosparningar
+ (standard: 300)
save_slot number Positionsnumret för spardata att ladda vid
uppstart.
savepath string Sökvägen där spelet lagrar sina spardata.
@@ -1527,24 +1536,29 @@ Följande nyckelord kan användas:
language string Bestäm språk (en, us, de, fr, it, pt, es,
jp, zh, kr, se, gb, hb, cz, ru)
- speech_mute bool Ställ in till “true†för att stänga av röster
- subtitles bool Ställ in till “true†för att visa undertexter
- talkspeed number Textfördröjning i SCUMM-spel, eller texthastighet
- i andra spel.
+ speech_mute bool Ställ in till “true†för att
+ stänga av röster
+ subtitles bool Ställ in till “true†för att
+ visa undertexter
+ talkspeed number Textfördröjning i SCUMM-spel, eller
+ texthastighet i andra spel.
fullscreen bool Fullskärmsläge
aspect_ratio bool Aktivera korrektion av bildförhållande
gfx_mode string Grafikläge (normalt, 2x, 3x, 2xsai,
- super2xsai, supereagle, advmame2x, advmame3x,
- hq2x, hq3x, tv2x, dotmatrix)
-
- confirm_exit bool Be om bekräftelse från användaren innan avslutnig
- (endast SDL-back-end).
- console bool Öppna konsolfönstret (standard: på) (endast Windows)
- cdrom number Nummer på CD-ROM enhet för använding av ljud.
- Försök inte använda CD-ROM enheten om detta numret
- är negativt.
- joystick_num number Nummer på joystick-enhet att använda för input
+ super2xsai, supereagle, advmame2x,
+ advmame3x, hq2x, hq3x, tv2x, dotmatrix)
+
+ confirm_exit bool Be om bekräftelse från användaren innan
+ avslutnig (endast SDL-back-end).
+ console bool Öppna konsolfönstret (standard: på)
+ (endast Windows)
+ cdrom number Nummer på CD-ROM enhet för
+ använding av ljud.
+ Försök inte använda CD-ROM enheten om
+ detta numret är negativt.
+ joystick_num number Nummer på joystick-enhet att använda
+ för input
music_driver string Musikenheten att använda.
opl_driver string AdLib (OPL)-emulatorn att använda.
output_rate number Uppspelningsvärdet i Hz. Lämpliga värden är
@@ -1554,28 +1568,30 @@ Följande nyckelord kan användas:
music_volume number Musikvolym (0-255)
multi_midi bool Ställ in till “true†för att kombinera AdLib
och Native MIDI.
- soundfont string SoundFont att använda för MIDI-uppspelning. (Stöds
- endast av vissa MIDI-drivers.)
+ soundfont string SoundFont att använda för MIDI-uppspelning.
+ (Stöds endast av vissa MIDI-drivers.)
native_mt32 bool Ställ in till “true†för att deaktivera GM-
- emulation och utgå ifrån att en verklig Roland
- MT-32 finns tillhanda.
- enable_gs bool Ställ in till “true†för att aktivera Roland GS-
- specifika funktioner för att förbättra GM-
- emulation. Om native_mt32 även ställts till â€trueâ€
- kommer GS-enheten att välja en MT-32 karta för att
- spela rätt instrument.
+ emulation och utgå ifrån att en verklig
+ Roland MT-32 finns tillhanda.
+ enable_gs bool Ställ in till “true†för att aktivera
+ Roland GS-specifika funktioner för att
+ förbättra GM-emulation. Om native_mt32 även
+ ställts till â€true†sÃ¥ kommer GS-enheten att
+ välja en MT-32 karta för att spela
+ rätt instrument.
sfx_volume number Ljudeffektsvolym (0-255)
tempo number Musiktempo (50-200) (standard: 100)
speech_volume number Röstvolym (0-255)
- midi_gain number MIDI gain (0-1000) (standard: 100) (Stöds endast
- av vissa MIDI-drivers.)
+ midi_gain number MIDI gain (0-1000) (standard: 100)
+ (Stöds endast av vissa MIDI-drivers.)
- copy_protection bool Aktiverar kopieringsskyddet för vissa spel i fall
- där ScummVM automatiskt deaktiverar det.
+ copy_protection bool Aktiverar kopieringsskyddet för vissa spel
+ i fall där ScummVM automatiskt
+ deaktiverar det.
demo_mode bool Öppna demon i Maniac Mansion
- alt_intro bool Använd alternativt intro för CD-versionerna av
- Beneath a Steel Sky och Flight of the Amazon
- Queen
+ alt_intro bool Använd alternativt intro för
+ CD-versionerna av Beneath a Steel Sky
+ och Flight of the Amazon Queen
boot_param number Skicka det här numret till boot script
@@ -1605,9 +1621,10 @@ Sierra-spel som använder SCI-motorn använder även följande nyckelord:
Broken Sword II lägger till följande nyckelord:
gfx_details number Grafisk detalj (0-3)
- music_mute bool Ställ in till “true†för att deaktivera musik
- object_labels bool Ställ in till “true†för att aktivera etiketter för
- föremål
+ music_mute bool Ställ in till “true†för att
+ deaktivera musik
+ object_labels bool Ställ in till “true†för att aktivera
+ etiketter för föremål
reverse_stereo bool Ställ in till “true†för att ivertera
stereokanalerna
sfx_mute bool Ställ in till “true†för att deaktivera
@@ -1615,9 +1632,10 @@ Broken Sword II lägger till följande nyckelord:
Flight of the Amazon Queen lägger till följande nyckelord:
- music_mute bool Ställ in till “true†för att deaktivera musik
- sfx_mute bool Ställ in till “true†för att deaktivera
- ljudeffekter
+ music_mute bool Ställ in till “true†för att
+ deaktivera musik
+ sfx_mute bool Ställ in till “true†för att
+ deaktivera ljudeffekter
Jones in the Fast Lane använder även följande nyckelord:
@@ -1628,10 +1646,12 @@ Jones in the Fast Lane använder även följande nyckelord:
King's Quest VI Windows lägger till följande nyckelord:
- windows_cursors bool Ställ in till “true†för att använda de svartvita
- Windows-muspekarna istället för DOS-muspekarna.
- Ställ in till â€false†för att använda de uppskalade
- muspekarna som matchar resten av grafiken.
+ windows_cursors bool Ställ in till “true†för att använda
+ de svartvita Windows-muspekarna istället
+ för DOS-muspekarna.
+ Ställ in till â€false†för att använda
+ de uppskalade muspekarna som matchar
+ resten av grafiken.
Lands of Lore: The Throne of Chaos använder även följande nyckelord:
@@ -1654,18 +1674,25 @@ Space Quest IV CD använder även följande nyckelord:
Simon the Sorcerer 1 och 2 lägger till följande nyckelord:
- music_mute bool Ställ in till “true†för att deaktivera musik
- sfx_mute bool Ställ in till “true†för att deaktivera
- ljudeffekter
+ music_mute bool Ställ in till “true†för att
+ deaktivera musik
+ sfx_mute bool Ställ in till “true†för att
+ deaktivera ljudeffekter
The Legend of Kyrandia lägger till följande nyckelord:
- walkspeed int GÃ¥nghastighet (0-4)
+ walkspeed number GÃ¥nghastighet (0-4)
+
+The Legend of Kyrandia: The Hand of Fate använder även följande nyckelord:
+ walkspeed number Gånghastighet (3 eller 5, för fast
+ eller långsamt)
The Legend of Kyrandia: Malcolm's Revenge använder även följande nyckelord:
+ walkspeed number Gånghastighet (3 eller 5, för fast
+ eller långsamt)
studio_audience bool Ställ in till “true†för att höra
skratt och applåder när Malcolm
berättar ett skämt
@@ -1676,9 +1703,13 @@ The Legend of Kyrandia: Malcolm's Revenge använder även följande nyckelord:
The 7th Guest använder även följande nyckelord:
- t7g_speed string Hastighet på videouppspelning
- (normal, tweaked, im_an_ios)
+ fast_movie_speed bool Ställ in till true för att spela filmer
+ med högre hastighet för att matcha
+ hastigheten av iOS-versionen.
+ Filmer utan ljud spelas fortfarande
+ med dess normala hastighet för att
+ undvika problem med musiksynkronisering.
8.2) Spelinställningar som kan aktiveras via användargränssnittet
---- ------------------------------------------------------------
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 9beba6ce4a..b1d1008b60 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -78,7 +78,7 @@ static Common::String generatePreferredTarget(const Common::String &id, const AD
res = res + "-cd";
}
- if (desc->platform != Common::kPlatformPC && desc->platform != Common::kPlatformUnknown) {
+ if (desc->platform != Common::kPlatformDOS && desc->platform != Common::kPlatformUnknown) {
res = res + "-" + getPlatformAbbrev(desc->platform);
}
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 98ffca22ed..1c342183cd 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -513,10 +513,7 @@ AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(sys
AgiBase::~AgiBase() {
delete _rnd;
- if (_sound) {
- _sound->deinitSound();
- delete _sound;
- }
+ delete _sound;
}
void AgiBase::initRenderMode() {
@@ -588,6 +585,21 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
setupOpcodes();
_game._curLogic = NULL;
_timerHack = 0;
+
+ _lastSaveTime = 0;
+ _lastTick = 0;
+
+ memset(_keyQueue, 0, sizeof(_keyQueue));
+ memset(_predictiveResult, 0, sizeof(_predictiveResult));
+
+ _sprites = NULL;
+ _picture = NULL;
+ _loader = NULL;
+ _console = NULL;
+
+ _egoHoldKey = false;
+
+
}
void AgiEngine::initialize() {
@@ -650,7 +662,6 @@ void AgiEngine::initialize() {
_game.sbuf = _game.sbuf16c; // Make sbuf point to the 16 color (+control line & priority info) AGI screen by default
_gfx->initVideo();
- _sound->initSound();
_lastSaveTime = 0;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 520b0aae59..93a456b9a6 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -942,7 +942,7 @@ public:
void setvar(int, int);
void decrypt(uint8 *mem, int len);
void releaseSprites();
- int mainCycle();
+ int mainCycle(bool onlyCheckForEvents = false);
int viewPictures();
int runGame();
void inventory();
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp
index dd06736290..b9a64bc572 100644
--- a/engines/agi/console.cpp
+++ b/engines/agi/console.cpp
@@ -35,7 +35,6 @@ Console::Console(AgiEngine *vm) : GUI::Debugger() {
DCmd_Register("debug", WRAP_METHOD(Console, Cmd_Debug));
DCmd_Register("cont", WRAP_METHOD(Console, Cmd_Cont));
DCmd_Register("agiver", WRAP_METHOD(Console, Cmd_Agiver));
- DCmd_Register("crc", WRAP_METHOD(Console, Cmd_Crc));
DCmd_Register("flags", WRAP_METHOD(Console, Cmd_Flags));
DCmd_Register("logic0", WRAP_METHOD(Console, Cmd_Logic0));
DCmd_Register("objs", WRAP_METHOD(Console, Cmd_Objs));
@@ -119,12 +118,6 @@ bool Console::Cmd_RunOpcode(int argc, const char **argv) {
return true;
}
-bool Console::Cmd_Crc(int argc, const char **argv) {
- DebugPrintf("command removed from scummvm\n");
-
- return true;
-}
-
bool Console::Cmd_Agiver(int argc, const char **argv) {
int ver, maj, min;
@@ -278,22 +271,17 @@ bool Console::Cmd_BT(int argc, const char **argv) {
MickeyConsole::MickeyConsole(MickeyEngine *mickey) : GUI::Debugger() {
_mickey = mickey;
- DCmd_Register("curRoom", WRAP_METHOD(MickeyConsole, Cmd_CurRoom));
- DCmd_Register("gotoRoom", WRAP_METHOD(MickeyConsole, Cmd_GotoRoom));
+ DCmd_Register("room", WRAP_METHOD(MickeyConsole, Cmd_Room));
DCmd_Register("drawPic", WRAP_METHOD(MickeyConsole, Cmd_DrawPic));
DCmd_Register("drawObj", WRAP_METHOD(MickeyConsole, Cmd_DrawObj));
}
-bool MickeyConsole::Cmd_CurRoom(int argc, const char **argv) {
+bool MickeyConsole::Cmd_Room(int argc, const char **argv) {
+ if (argc == 2)
+ _mickey->debugGotoRoom(atoi(argv[1]));
+
_mickey->debugCurRoom();
- return true;
-}
-bool MickeyConsole::Cmd_GotoRoom(int argc, const char **argv) {
- if (argc != 2)
- DebugPrintf("Usage: %s <Room number>\n", argv[0]);
- else
- _mickey->debugGotoRoom(atoi(argv[1]));
return true;
}
diff --git a/engines/agi/console.h b/engines/agi/console.h
index 5f69460907..f8025e0562 100644
--- a/engines/agi/console.h
+++ b/engines/agi/console.h
@@ -49,7 +49,6 @@ private:
bool Cmd_SetFlag(int argc, const char **argv);
bool Cmd_SetObj(int argc, const char **argv);
bool Cmd_RunOpcode(int argc, const char **argv);
- bool Cmd_Crc(int argc, const char **argv);
bool Cmd_Agiver(int argc, const char **argv);
bool Cmd_Flags(int argc, const char **argv);
bool Cmd_Vars(int argc, const char **argv);
@@ -75,8 +74,7 @@ public:
private:
MickeyEngine *_mickey;
- bool Cmd_CurRoom(int argc, const char **argv);
- bool Cmd_GotoRoom(int argc, const char **argv);
+ bool Cmd_Room(int argc, const char **argv);
bool Cmd_DrawPic(int argc, const char **argv);
bool Cmd_DrawObj(int argc, const char **argv);
};
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 5daadbd1df..702ca907d7 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -187,12 +187,14 @@ void AgiEngine::oldInputMode() {
}
// If main_cycle returns false, don't process more events!
-int AgiEngine::mainCycle() {
+int AgiEngine::mainCycle(bool onlyCheckForEvents) {
unsigned int key, kascii;
VtEntry *v = &_game.viewTable[0];
- pollTimer();
- updateTimer();
+ if (!onlyCheckForEvents) {
+ pollTimer();
+ updateTimer();
+ }
key = doPollKeyboard();
@@ -205,7 +207,13 @@ int AgiEngine::mainCycle() {
_game.vars[29] = _mouse.y;
//}
- if (key == KEY_PRIORITY) {
+ if (key == KEY_STATUSLN) { // F11
+ _debug.statusline = !_debug.statusline;
+ writeStatus();
+ key = 0;
+ }
+
+ if (key == KEY_PRIORITY) { // F12
_sprites->eraseBoth();
_debug.priority = !_debug.priority;
_picture->showPic();
@@ -214,14 +222,8 @@ int AgiEngine::mainCycle() {
key = 0;
}
- if (key == KEY_STATUSLN) {
- _debug.statusline = !_debug.statusline;
- writeStatus();
- key = 0;
- }
-
// Click-to-walk mouse interface
- if (_game.playerControl && v->flags & fAdjEgoXY) {
+ if (_game.playerControl && (v->flags & fAdjEgoXY)) {
int toX = v->parm1;
int toY = v->parm2;
@@ -289,10 +291,13 @@ int AgiEngine::mainCycle() {
break;
}
} while (restartProcessKey);
- _gfx->doUpdate();
- if (_game.msgBoxTicks > 0)
- _game.msgBoxTicks--;
+ if (!onlyCheckForEvents) {
+ _gfx->doUpdate();
+
+ if (_game.msgBoxTicks > 0)
+ _game.msgBoxTicks--;
+ }
return true;
}
@@ -412,7 +417,7 @@ int AgiEngine::runGame() {
else
setvar(vSoundgen, kAgiSoundTandy);
break;
- case Common::kPlatformPC:
+ case Common::kPlatformDOS:
default:
setvar(vComputer, kAgiComputerPC);
setvar(vSoundgen, kAgiSoundPC);
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 5f7780bfe3..3f55117868 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -318,8 +318,6 @@ SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int sl
int minutes = saveTime & 0xFF;
desc.setSaveTime(hour, minutes);
-
- // TODO: played time
}
@@ -350,7 +348,7 @@ const ADGameDescription *AgiMetaEngine::fallbackDetect(const FileMap &allFilesXX
// Set the default values for the fallback descriptor's ADGameDescription part.
g_fallbackDesc.desc.language = Common::UNK_LANG;
- g_fallbackDesc.desc.platform = Common::kPlatformPC;
+ g_fallbackDesc.desc.platform = Common::kPlatformDOS;
g_fallbackDesc.desc.flags = ADGF_NO_FLAGS;
// Set default values for the fallback descriptor's AGIGameDescription part.
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index 9d67b15adb..0c2c3ed3be 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -54,14 +54,14 @@ namespace Agi {
ver \
}
-#define BOOTER2(id,extra,fname,md5,size,ver,gid) GAME_LVFPN(id,extra,fname,md5,size,Common::EN_ANY,ver,0,gid,Common::kPlatformPC,GType_V2)
-#define GAME(id,extra,md5,ver,gid) GAME_LVFPN(id,extra,"logdir",md5,-1,Common::EN_ANY,ver,0,gid,Common::kPlatformPC,GType_V2)
-#define GAME3(id,extra,fname,md5,ver,gid) GAME_LVFPN(id,extra,fname,md5,-1,Common::EN_ANY,ver,0,gid,Common::kPlatformPC,GType_V3)
+#define BOOTER2(id,extra,fname,md5,size,ver,gid) GAME_LVFPN(id,extra,fname,md5,size,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V2)
+#define GAME(id,extra,md5,ver,gid) GAME_LVFPN(id,extra,"logdir",md5,-1,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V2)
+#define GAME3(id,extra,fname,md5,ver,gid) GAME_LVFPN(id,extra,fname,md5,-1,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V3)
#define GAME_P(id,extra,md5,ver,gid,platform) GAME_LVFPN(id,extra,"logdir",md5,-1,Common::EN_ANY,ver,0,gid,platform,GType_V2)
#define GAME_FP(id,extra,md5,ver,flags,gid,platform) GAME_LVFPN(id,extra,"logdir",md5,-1,Common::EN_ANY,ver,flags,gid,platform,GType_V2)
-#define GAME_F(id,extra,md5,ver,flags,gid) GAME_FP(id,extra,md5,ver,flags,gid,Common::kPlatformPC)
+#define GAME_F(id,extra,md5,ver,flags,gid) GAME_FP(id,extra,md5,ver,flags,gid,Common::kPlatformDOS)
#define GAME_PS(id,extra,md5,size,ver,gid,platform) GAME_LVFPN(id,extra,"logdir",md5,size,Common::EN_ANY,ver,0,gid,platform,GType_V2)
@@ -77,7 +77,7 @@ namespace Agi {
#define GAME3_PS(id,extra,fname,md5,size,ver,flags,gid,platform) GAME_LVFPN(id,extra,fname,md5,size,Common::EN_ANY,ver,flags,gid,platform,GType_V3)
-#define FANMADE_ILVF(id,name,md5,lang,ver,features) GAME_LVFPNF(id,name,"logdir",md5,-1,lang,ver,(GF_FANMADE|features),GID_FANMADE,Common::kPlatformPC,GType_V2)
+#define FANMADE_ILVF(id,name,md5,lang,ver,features) GAME_LVFPNF(id,name,"logdir",md5,-1,lang,ver,(GF_FANMADE|features),GID_FANMADE,Common::kPlatformDOS,GType_V2)
#define FANMADE_ISVP(id,name,md5,size,ver,platform) GAME_LVFPNF(id,name,"logdir",md5,size,Common::EN_ANY,ver,GF_FANMADE,GID_FANMADE,platform,GType_V2)
#define FANMADE_SVP(name,md5,size,ver,platform) FANMADE_ISVP("agi-fanmade",name,md5,size,ver,platform)
@@ -128,7 +128,7 @@ static const AGIGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -149,7 +149,7 @@ static const AGIGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -170,7 +170,7 @@ static const AGIGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -191,7 +191,7 @@ static const AGIGameDescription gameDescriptions[] = {
GAME("bc", "2.00 1987-06-14", "7f598d4712319b09d7bd5b3be10a2e4a", 0x2440, GID_BC),
// Black Cauldron (Russian)
- GAME_LPS("bc", "", "b7de782dfdf8ea7dde8064f09804bcf5", 357, Common::RU_RUS, 0x2440, GID_BC, Common::kPlatformPC),
+ GAME_LPS("bc", "", "b7de782dfdf8ea7dde8064f09804bcf5", 357, Common::RU_RUS, 0x2440, GID_BC, Common::kPlatformDOS),
// Black Cauldron (PC 5.25") 2.10 11/10/88 [AGI 3.002.098]
GAME3("bc", "2.10 1988-11-10 5.25\"", "bcdir", "0c5a9acbcc7e51127c34818e75806df6", 0x3149, GID_BC),
@@ -218,7 +218,7 @@ static const AGIGameDescription gameDescriptions[] = {
// reported by Filippos (thebluegr) in bugreport #1654500
// Menus not tested
- GAME_PS("ddp", "1.0C 1986-06-09", "550971d196f65190a5c760d2479406ef", 132, 0x2272, GID_DDP, Common::kPlatformPC),
+ GAME_PS("ddp", "1.0C 1986-06-09", "550971d196f65190a5c760d2479406ef", 132, 0x2272, GID_DDP, Common::kPlatformDOS),
// Gold Rush! (Amiga) 1.01 1/13/89 aka 2.05 3/9/89 # 2.316
GAME3_PS("goldrush", "1.01 1989-01-13 aka 2.05 1989-03-09", "dirs", "a1d4de3e75c2688c1e2ca2634ffc3bd8", 2399, 0x3149, 0, GID_GOLDRUSH, Common::kPlatformAmiga),
@@ -311,7 +311,7 @@ static const AGIGameDescription gameDescriptions[] = {
GAME("kq2", "2.2 1987-05-07 5.25\"/3.5\"", "b944c4ff18fb8867362dc21cc688a283", 0x2917, GID_KQ2),
// King's Quest 2 (Russian)
- GAME_LPS("kq2", "", "35211c574ececebdc723b23e35f99275", 543, Common::RU_RUS, 0x2917, GID_KQ2, Common::kPlatformPC),
+ GAME_LPS("kq2", "", "35211c574ececebdc723b23e35f99275", 543, Common::RU_RUS, 0x2917, GID_KQ2, Common::kPlatformDOS),
// King's Quest 2 (CoCo3 360k) [AGI 2.023]
GAME_PS("kq2", "", "b944c4ff18fb8867362dc21cc688a283", 543, 0x2440, GID_KQ2, Common::kPlatformCoCo3),
@@ -344,10 +344,10 @@ static const AGIGameDescription gameDescriptions[] = {
// King's Quest 3 (PC) 1.01 11/08/86 [AGI 2.272]
// Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game
- GAME_FP("kq3", "1.01 1986-11-08", "9c2b34e7ffaa89c8e2ecfeb3695d444b", 0x2272, GF_ESCPAUSE, GID_KQ3, Common::kPlatformPC),
+ GAME_FP("kq3", "1.01 1986-11-08", "9c2b34e7ffaa89c8e2ecfeb3695d444b", 0x2272, GF_ESCPAUSE, GID_KQ3, Common::kPlatformDOS),
// King's Quest 3 (Russian)
- GAME_LFPS("kq3", "", "5856dec6ccb9c4b70aee21044a19270a", 390, Common::RU_RUS, 0x2272, GF_ESCPAUSE, GID_KQ3, Common::kPlatformPC),
+ GAME_LFPS("kq3", "", "5856dec6ccb9c4b70aee21044a19270a", 390, Common::RU_RUS, 0x2272, GF_ESCPAUSE, GID_KQ3, Common::kPlatformDOS),
// King's Quest 3 (PC 5.25") 2.00 5/25/87 [AGI 2.435]
GAME("kq3", "2.00 1987-05-25 5.25\"", "18aad8f7acaaff760720c5c6885b6bab", 0x2440, GID_KQ3),
@@ -396,10 +396,10 @@ static const AGIGameDescription gameDescriptions[] = {
GAME("lsl1", "1.00 1987-06-01 5.25\"/3.5\"", "1fe764e66857e7f305a5f03ca3f4971d", 0x2440, GID_LSL1),
// Leisure Suit Larry 1 Polish
- GAME_LPS("lsl1", "2.00 2001-12-11", "7ba1fccc46d27c141e704706c1d0a85f", 303, Common::PL_POL, 0x2440, GID_LSL1, Common::kPlatformPC),
+ GAME_LPS("lsl1", "2.00 2001-12-11", "7ba1fccc46d27c141e704706c1d0a85f", 303, Common::PL_POL, 0x2440, GID_LSL1, Common::kPlatformDOS),
// Leisure Suit Larry 1 Polish - Demo
- GAME_LPS("lsl1", "Demo", "3b2f564306c401dff6334441df967ddd", 666, Common::PL_POL, 0x2917, GID_LSL1, Common::kPlatformPC),
+ GAME_LPS("lsl1", "Demo", "3b2f564306c401dff6334441df967ddd", 666, Common::PL_POL, 0x2917, GID_LSL1, Common::kPlatformDOS),
// Leisure Suit Larry 1 (ST) 1.04 6/18/87
GAME_P("lsl1", "1.04 1987-06-18", "8b579f8673fe9448c2538f5ed9887cf0", 0x2440, GID_LSL1, Common::kPlatformAtariST),
@@ -427,10 +427,10 @@ static const AGIGameDescription gameDescriptions[] = {
// reported by Filippos (thebluegr) in bugreport #1654500
// Manhunter NY (PC 5.25") 1.22 8/31/88 [AGI 3.002.107]
- GAME3_PS("mh1", "1.22 1988-08-31", "mhdir", "0c7b86f05fe02c2e26cff1b07450b82a", 2123, 0x3149, 0, GID_MH1, Common::kPlatformPC),
+ GAME3_PS("mh1", "1.22 1988-08-31", "mhdir", "0c7b86f05fe02c2e26cff1b07450b82a", 2123, 0x3149, 0, GID_MH1, Common::kPlatformDOS),
// Manhunter NY (PC 3.5") 1.22 8/31/88 [AGI 3.002.102]
- GAME3_PS("mh1", "1.22 1988-08-31", "mhdir", "5b625329021ad49fd0c1d6f2d6f54bba", 2141, 0x3149, 0, GID_MH1, Common::kPlatformPC),
+ GAME3_PS("mh1", "1.22 1988-08-31", "mhdir", "5b625329021ad49fd0c1d6f2d6f54bba", 2141, 0x3149, 0, GID_MH1, Common::kPlatformDOS),
// Manhunter NY (CoCo3 720k) [AGI 2.023]
GAME_PS("mh1", "", "b968285caf2f591c78dd9c9e26ab8974", 495, 0x2440, GID_MH1, Common::kPlatformCoCo3),
@@ -458,7 +458,7 @@ static const AGIGameDescription gameDescriptions[] = {
// Mickey's Space Adventure
// Preagi game
- GAMEpre_P("mickey", "", "1.pic", "b6ec04c91a05df374792872c4d4ce66d", 0x0000, GID_MICKEY, Common::kPlatformPC),
+ GAMEpre_P("mickey", "", "1.pic", "b6ec04c91a05df374792872c4d4ce66d", 0x0000, GID_MICKEY, Common::kPlatformDOS),
#if 0
// Mixed-Up Mother Goose (Amiga) 1.1
@@ -495,7 +495,7 @@ static const AGIGameDescription gameDescriptions[] = {
GAME("pq1", "2.0A 1987-10-23", "b9dbb305092851da5e34d6a9f00240b1", 0x2917, GID_PQ1),
// Police Quest 1 (Russian)
- GAME_LPS("pq1", "", "604cc8041d24c4c7e5fa8baf386ef76e", 360, Common::RU_RUS, 0x2917, GID_PQ1, Common::kPlatformPC),
+ GAME_LPS("pq1", "", "604cc8041d24c4c7e5fa8baf386ef76e", 360, Common::RU_RUS, 0x2917, GID_PQ1, Common::kPlatformDOS),
// Police Quest 1 2.0G 12/3/87
GAME("pq1", "2.0G 1987-12-03 5.25\"/ST", "231f3e28170d6e982fc0ced4c98c5c1c", 0x2440, GID_PQ1),
@@ -516,11 +516,11 @@ static const AGIGameDescription gameDescriptions[] = {
// Space Quest 1 (PC 360k) 1.1A [AGI 2.272]
// The original game did not have menus, they are enabled under ScummVM
- GAME_FP("sq1", "1.1A 1986-11-13", "8d8c20ab9f4b6e4817698637174a1cb6", 0x2272, GF_MENUS, GID_SQ1, Common::kPlatformPC),
+ GAME_FP("sq1", "1.1A 1986-11-13", "8d8c20ab9f4b6e4817698637174a1cb6", 0x2272, GF_MENUS, GID_SQ1, Common::kPlatformDOS),
// Space Quest 1 (PC 720k) 1.1A [AGI 2.272]
// The original game did not have menus, they are enabled under ScummVM
- GAME_FP("sq1", "1.1A 720kb", "0a92b1be7daf3bb98caad3f849868aeb", 0x2272, GF_MENUS, GID_SQ1, Common::kPlatformPC),
+ GAME_FP("sq1", "1.1A 720kb", "0a92b1be7daf3bb98caad3f849868aeb", 0x2272, GF_MENUS, GID_SQ1, Common::kPlatformDOS),
// Space Quest 1 (Amiga) 1.2 # 2.082
// The original game did not have menus, they are enabled under ScummVM
@@ -534,10 +534,10 @@ static const AGIGameDescription gameDescriptions[] = {
// Space Quest 1 (PC) 1.0X [AGI 2.089]
// Does not have menus, crashes if menus are enforced. Therefore, ESC pauses the game
- GAME_FP("sq1", "1.0X 1986-09-24", "af93941b6c51460790a9efa0e8cb7122", 0x2089, GF_ESCPAUSE, GID_SQ1, Common::kPlatformPC),
+ GAME_FP("sq1", "1.0X 1986-09-24", "af93941b6c51460790a9efa0e8cb7122", 0x2089, GF_ESCPAUSE, GID_SQ1, Common::kPlatformDOS),
// Space Quest 1 (Russian)
- GAME_LFPS("sq1", "", "a279eb8ddbdefdb1ea6adc827a1d632a", 372, Common::RU_RUS, 0x2089, GF_ESCPAUSE, GID_SQ1, Common::kPlatformPC),
+ GAME_LFPS("sq1", "", "a279eb8ddbdefdb1ea6adc827a1d632a", 372, Common::RU_RUS, 0x2089, GF_ESCPAUSE, GID_SQ1, Common::kPlatformDOS),
// Space Quest 1 (PC 5.25"/3.5") 2.2 [AGI 2.426/2.917]
GAME("sq1", "2.2 1987-05-07 5.25\"/3.5\"", "5d67630aba008ec5f7f9a6d0a00582f4", 0x2440, GID_SQ1),
@@ -584,17 +584,17 @@ static const AGIGameDescription gameDescriptions[] = {
// reported by Filippos (thebluegr) in bugreport #1654500
// Space Quest 2 (PC 5.25") 2.0A [AGI 2.912]
- GAME_PS("sq2", "2.0A 1987-11-06 5.25\"", "ad7ce8f800581ecc536f3e8021d7a74d", 423, 0x2917, GID_SQ2, Common::kPlatformPC),
+ GAME_PS("sq2", "2.0A 1987-11-06 5.25\"", "ad7ce8f800581ecc536f3e8021d7a74d", 423, 0x2917, GID_SQ2, Common::kPlatformDOS),
// reported by RadG (radg123) in bug report #3260349
// Space Quest 2 (Spanish)
- GAME_LPS("sq2", "", "1ae7640dd4d253c3ac2d708d61a35379", 426, Common::ES_ESP, 0x2917, GID_SQ2, Common::kPlatformPC),
+ GAME_LPS("sq2", "", "1ae7640dd4d253c3ac2d708d61a35379", 426, Common::ES_ESP, 0x2917, GID_SQ2, Common::kPlatformDOS),
// Space Quest 2 (Russian)
- GAME_LPS("sq2", "", "ba21c8934caf28e3ba45ce7d1cd6b041", 423, Common::RU_RUS, 0x2917, GID_SQ2, Common::kPlatformPC),
+ GAME_LPS("sq2", "", "ba21c8934caf28e3ba45ce7d1cd6b041", 423, Common::RU_RUS, 0x2917, GID_SQ2, Common::kPlatformDOS),
// Space Quest 2 (PC 3.5") 2.0A [AGI 2.912]
- GAME_PS("sq2", "2.0A 1987-11-06 3.5\"", "6c25e33d23b8bed42a5c7fa63d588e5c", 423, 0x2917, GID_SQ2, Common::kPlatformPC),
+ GAME_PS("sq2", "2.0A 1987-11-06 3.5\"", "6c25e33d23b8bed42a5c7fa63d588e5c", 423, 0x2917, GID_SQ2, Common::kPlatformDOS),
// Space Quest 2 (PC 5.25"/ST) 2.0C/A [AGI 2.915]
// Menus not tested
@@ -610,10 +610,10 @@ static const AGIGameDescription gameDescriptions[] = {
GAME_PS("sq2", "updated", "d24f19b047e65e1763eff4b46f3d50df", 768, 0x2440, GID_SQ2, Common::kPlatformCoCo3),
// Troll's Tale
- GAMEpre_PS("troll", "", "troll.img", "62903f264b3d849be4214b3a5c42a2fa", 184320, 0x0000, GID_TROLL, Common::kPlatformPC),
+ GAMEpre_PS("troll", "", "troll.img", "62903f264b3d849be4214b3a5c42a2fa", 184320, 0x0000, GID_TROLL, Common::kPlatformDOS),
// Winnie the Pooh in the Hundred Acre Wood
- GAMEpre_P("winnie", "", "title.pic", "2e7900c1ccaa7671d65405f6d1efed30", 0x0000, GID_WINNIE, Common::kPlatformPC),
+ GAMEpre_P("winnie", "", "title.pic", "2e7900c1ccaa7671d65405f6d1efed30", 0x0000, GID_WINNIE, Common::kPlatformDOS),
// Winnie the Pooh in the Hundred Acre Wood (Amiga)
GAMEpre_P("winnie", "", "title", "2e7900c1ccaa7671d65405f6d1efed30", 0x0000, GID_WINNIE, Common::kPlatformAmiga),
@@ -707,10 +707,10 @@ static const AGIGameDescription gameDescriptions[] = {
FANMADE("Good Man (demo v3.41)", "3facd8a8f856b7b6e0f6c3200274d88c"),
GAME_LVFPNF("agi-fanmade", "Groza (russian) [AGDS sample]", "logdir", "421da3a18004122a966d64ab6bd86d2e", -1,
- Common::RU_RUS, 0x2440, GF_AGDS, GID_FANMADE, Common::kPlatformPC,GType_V2),
+ Common::RU_RUS, 0x2440, GF_AGDS, GID_FANMADE, Common::kPlatformDOS,GType_V2),
GAME_LVFPNF("agi-fanmade", "Get Outta Space Quest", "logdir", "aaea5b4a348acb669d13b0e6f22d4dc9", -1,
- Common::EN_ANY, 0x2440, GF_FANMADE, GID_GETOUTTASQ, Common::kPlatformPC,GType_V2),
+ Common::EN_ANY, 0x2440, GF_FANMADE, GID_GETOUTTASQ, Common::kPlatformDOS,GType_V2),
FANMADE_F("Half-Death - Terror At White-Mesa", "b62c05d0ace878261392073f57ae788c", GF_AGIMOUSE),
FANMADE("Hank's Quest (v1.0 English) - Victim of Society", "64c15b3d0483d17888129100dc5af213"),
@@ -857,7 +857,7 @@ static const AGIGameDescription gameDescriptions[] = {
"V - The Graphical Adventure (Demo 2)",
AD_ENTRY1s("vdir", "c71f5c1e008d352ae9040b77fcf79327", 3080),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_USEEXTRAASTITLE,
GUIO0()
},
@@ -885,7 +885,7 @@ static AGIGameDescription g_fallbackDesc = {
"",
AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
diff --git a/engines/agi/loader_v1.cpp b/engines/agi/loader_v1.cpp
index 189c98ee98..33e956af41 100644
--- a/engines/agi/loader_v1.cpp
+++ b/engines/agi/loader_v1.cpp
@@ -254,7 +254,7 @@ int AgiLoader_v1::loadResource(int t, int n) {
if (data != NULL) {
// Freeing of the raw resource from memory is delegated to the createFromRawResource-function
- _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, *_vm->_sound, _vm->_soundemu);
+ _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, _vm->_soundemu);
_vm->_game.dirSound[n].flags |= RES_LOADED;
} else {
ec = errBadResource;
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index a2ac6f0111..ee69bb5b27 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -230,7 +230,7 @@ int AgiLoader_v2::loadResource(int t, int n) {
if (data != NULL) {
// Freeing of the raw resource from memory is delegated to the createFromRawResource-function
- _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, *_vm->_sound, _vm->_soundemu);
+ _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, _vm->_soundemu);
_vm->_game.dirSound[n].flags |= RES_LOADED;
} else {
ec = errBadResource;
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index 29635f935b..250d8e7615 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -314,7 +314,7 @@ int AgiLoader_v3::loadResource(int t, int n) {
data = loadVolRes(&_vm->_game.dirSound[n]);
if (data != NULL) {
// Freeing of the raw resource from memory is delegated to the createFromRawResource-function
- _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, *_vm->_sound, _vm->_soundemu);
+ _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, _vm->_soundemu);
_vm->_game.dirSound[n].flags |= RES_LOADED;
} else {
ec = errBadResource;
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..2366d97a82 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1219,7 +1219,7 @@ void cmdWander(AgiGame *state, uint8 *p) {
void cmdSetGameID(AgiGame *state, uint8 *p) {
if (state->_curLogic->texts && (p0 - 1) <= state->_curLogic->numTexts)
- strncpy(state->id, state->_curLogic->texts[p0 - 1], 8);
+ Common::strlcpy(state->id, state->_curLogic->texts[p0 - 1], 8);
else
state->id[0] = 0;
@@ -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
@@ -1705,7 +1705,9 @@ void cmdCallV1(AgiGame *state, uint8 *p) {
// FIXME: The following instruction looks incomplete.
// Maybe something is meant to be assigned to, or read from,
// the logic_list entry?
- state->logic_list[++state->max_logics];
+// state->logic_list[++state->max_logics];
+ // For now, just do the increment, to silence a clang warning
+ ++state->max_logics;
_v[13] = 1;
}
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index 4d5e6fffe1..18861a2190 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -82,7 +82,7 @@ void condIsSet(AgiGame *state, uint8 *p) {
}
void condIsSetV(AgiGame *state, uint8 *p) {
- state->testResult = testIsSet(getvar(p[1]));
+ state->testResult = testIsSet(getvar(p[0]));
}
void condIsSetV1(AgiGame *state, uint8 *p) {
@@ -259,7 +259,12 @@ uint8 AgiEngine::testKeypressed() {
InputMode mode = _game.inputMode;
_game.inputMode = INPUT_NONE;
- mainCycle();
+ // Only check for events here, without updating the game cycle,
+ // otherwise the animations in some games are drawn too quickly
+ // like, for example, Manannan's lightnings in the intro of KQ3
+ // and the bullets opened in the logo of PQ1, during its intro.
+ // Fixes bug #3600733
+ mainCycle(true);
_game.inputMode = mode;
}
diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp
index 7a427bd94f..807ab2dc2c 100644
--- a/engines/agi/opcodes.cpp
+++ b/engines/agi/opcodes.cpp
@@ -376,6 +376,18 @@ void AgiEngine::setupOpcodes() {
logicNamesTest = insV1Test;
logicNamesCmd = insV1;
}
+
+ // Alter opcode parameters for specific games
+ // TODO: This could be either turned into a game feature, or a version
+ // specific check, instead of a game version check
+
+ // The Apple IIGS versions of MH1 and Goldrush both have a parameter for
+ // show.mouse and hide.mouse. Fixes bugs #3577754 and #3426946.
+ if ((getGameID() == GID_MH1 || getGameID() == GID_GOLDRUSH) &&
+ getPlatform() == Common::kPlatformApple2GS) {
+ logicNamesCmd[176].args = "n"; // hide.mouse
+ logicNamesCmd[178].args = "n"; // show.mouse
+ }
}
}
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 53863a8c7e..bbe9ddd0c6 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -90,7 +90,7 @@ void WinnieEngine::parseObjHeader(WTP_OBJ_HDR *objHdr, byte *buffer, int len) {
uint32 WinnieEngine::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) {
Common::String fileName;
- if (getPlatform() == Common::kPlatformPC)
+ if (getPlatform() == Common::kPlatformDOS)
fileName = Common::String::format(IDS_WTP_ROOM_DOS, iRoom);
else if (getPlatform() == Common::kPlatformAmiga)
fileName = Common::String::format(IDS_WTP_ROOM_AMIGA, iRoom);
@@ -123,7 +123,7 @@ uint32 WinnieEngine::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) {
uint32 WinnieEngine::readObj(int iObj, uint8 *buffer) {
Common::String fileName;
- if (getPlatform() == Common::kPlatformPC)
+ if (getPlatform() == Common::kPlatformDOS)
fileName = Common::String::format(IDS_WTP_OBJ_DOS, iObj);
else if (getPlatform() == Common::kPlatformAmiga)
fileName = Common::String::format(IDS_WTP_OBJ_AMIGA, iObj);
@@ -1118,7 +1118,7 @@ void WinnieEngine::drawRoomPic() {
bool WinnieEngine::playSound(ENUM_WTP_SOUND iSound) {
// TODO: Only DOS sound is supported, currently
- if (getPlatform() != Common::kPlatformPC) {
+ if (getPlatform() != Common::kPlatformDOS) {
warning("STUB: playSound(%d)", iSound);
return false;
}
@@ -1134,7 +1134,7 @@ bool WinnieEngine::playSound(ENUM_WTP_SOUND iSound) {
file.read(data, size);
file.close();
- _game.sounds[0] = AgiSound::createFromRawResource(data, size, 0, *_sound, _soundemu);
+ _game.sounds[0] = AgiSound::createFromRawResource(data, size, 0, _soundemu);
_sound->startSound(0, 0);
bool cursorShowing = CursorMan.showMouse(false);
@@ -1334,7 +1334,6 @@ void WinnieEngine::init() {
}
_sound = new SoundMgr(this, _mixer);
- _sound->initSound();
setflag(fSoundOn, true); // enable sound
memset(&_gameStateWinnie, 0, sizeof(_gameStateWinnie));
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/agi/saveload.cpp b/engines/agi/saveload.cpp
index d451a799a0..c449f076e7 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -316,7 +316,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
return errBadFileOpen;
}
- strncpy(_game.id, loadId, 8);
+ Common::strlcpy(_game.id, loadId, 8);
if (saveVersion >= 5) {
char md5[32 + 1];
@@ -678,7 +678,7 @@ int AgiEngine::selectSlot() {
switch (key) {
case KEY_ENTER:
rc = active;
- strncpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN);
+ Common::strlcpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN);
debugC(8, kDebugLevelMain | kDebugLevelInput, "Button pressed: %d", rc);
exitSelectSlot = true;
break;
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index ca3d799ecc..56c7ebcb0b 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -36,25 +36,25 @@ namespace Agi {
// TODO: add support for variable sampling rate in the output device
//
-AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, SoundMgr &manager, int soundemu) {
+AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, int soundemu) {
if (data == NULL || len < 2) // Check for too small resource or no resource at all
return NULL;
uint16 type = READ_LE_UINT16(data);
// For V1 sound resources
if (type != AGI_SOUND_SAMPLE && (type & 0xFF) == 0x01)
- return new PCjrSound(data, len, resnum, manager);
+ return new PCjrSound(data, len, resnum);
switch (type) { // Create a sound object based on the type
case AGI_SOUND_SAMPLE:
- return new IIgsSample(data, len, resnum, manager);
+ return new IIgsSample(data, len, resnum);
case AGI_SOUND_MIDI:
- return new IIgsMidi(data, len, resnum, manager);
+ return new IIgsMidi(data, len, resnum);
case AGI_SOUND_4CHN:
if (soundemu == SOUND_EMU_MIDI) {
- return new MIDISound(data, len, resnum, manager);
+ return new MIDISound(data, len, resnum);
} else {
- return new PCjrSound(data, len, resnum, manager);
+ return new PCjrSound(data, len, resnum);
}
}
@@ -62,7 +62,7 @@ AgiSound *AgiSound::createFromRawResource(uint8 *data, uint32 len, int resnum, S
return NULL;
}
-PCjrSound::PCjrSound(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : AgiSound(manager) {
+PCjrSound::PCjrSound(uint8 *data, uint32 len, int resnum) : AgiSound() {
_data = data; // Save the resource pointer
_len = len; // Save the resource's length
_type = READ_LE_UINT16(data); // Read sound resource's type
@@ -167,16 +167,6 @@ void SoundMgr::stopSound() {
_endflag = -1;
}
-int SoundMgr::initSound() {
- return -1;
-}
-
-void SoundMgr::deinitSound() {
- stopSound();
-
- delete _soundGen;
-}
-
void SoundMgr::soundIsFinished() {
if (_endflag != -1)
_vm->setflag(_endflag, true);
@@ -219,6 +209,9 @@ void SoundMgr::setVolume(uint8 volume) {
}
SoundMgr::~SoundMgr() {
+ stopSound();
+
+ delete _soundGen;
}
} // End of namespace Agi
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 6fd8dd516e..f300af83a3 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -93,7 +93,7 @@ public:
*/
class AgiSound {
public:
- AgiSound(SoundMgr &manager) : _manager(manager), _isPlaying(false), _isValid(false) {}
+ AgiSound() : _isPlaying(false), _isValid(false) {}
virtual ~AgiSound() {}
virtual void play() { _isPlaying = true; }
virtual void stop() { _isPlaying = false; }
@@ -108,17 +108,16 @@ public:
* from memory using free() or delegate the responsibility onwards to some other
* function!
*/
- static AgiSound *createFromRawResource(uint8 *data, uint32 len, int resnum, SoundMgr &manager, int soundemu);
+ static AgiSound *createFromRawResource(uint8 *data, uint32 len, int resnum, int soundemu);
protected:
- SoundMgr &_manager; ///< AGI sound manager object
bool _isPlaying; ///< Is the sound playing?
bool _isValid; ///< Is this a valid sound object?
};
class PCjrSound : public AgiSound {
public:
- PCjrSound(uint8 *data, uint32 len, int resnum, SoundMgr &manager);
+ PCjrSound(uint8 *data, uint32 len, int resnum);
~PCjrSound() { free(_data); }
virtual uint16 type() { return _type; }
const uint8 *getVoicePointer(uint voiceNum);
@@ -140,8 +139,6 @@ public:
void unloadSound(int);
void playSound();
- int initSound();
- void deinitSound();
void startSound(int, int);
void stopSound();
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index bfc8d4d8f3..f088ad3a01 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -447,7 +447,7 @@ void SoundGen2GS::setProgramChangeMapping(const IIgsMidiProgramMapping *mapping)
_progToInst = mapping;
}
-IIgsMidi::IIgsMidi(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : AgiSound(manager) {
+IIgsMidi::IIgsMidi(uint8 *data, uint32 len, int resnum) : AgiSound() {
_data = data; // Save the resource pointer
_ptr = _data + 2; // Set current position to just after the header
_len = len; // Save the resource's length
@@ -472,7 +472,7 @@ static bool convertWave(Common::SeekableReadStream &source, int8 *dest, uint len
return !(source.eos() || source.err());
}
-IIgsSample::IIgsSample(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : AgiSound(manager) {
+IIgsSample::IIgsSample(uint8 *data, uint32 len, int resnum) : AgiSound() {
Common::MemoryReadStream stream(data, len, DisposeAfterUse::YES);
// Check that the header was read ok and that it's of the correct type
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h
index 404f4a47a1..12e7b7b951 100644
--- a/engines/agi/sound_2gs.h
+++ b/engines/agi/sound_2gs.h
@@ -144,7 +144,7 @@ public:
class IIgsMidi : public AgiSound {
public:
- IIgsMidi(uint8 *data, uint32 len, int resnum, SoundMgr &manager);
+ IIgsMidi(uint8 *data, uint32 len, int resnum);
~IIgsMidi() { if (_data != NULL) free(_data); }
virtual uint16 type() { return _type; }
virtual const uint8 *getPtr() { return _ptr; }
@@ -161,7 +161,7 @@ public:
class IIgsSample : public AgiSound {
public:
- IIgsSample(uint8 *data, uint32 len, int resnum, SoundMgr &manager);
+ IIgsSample(uint8 *data, uint32 len, int resnum);
~IIgsSample() { delete[] _sample; }
virtual uint16 type() { return _header.type; }
const IIgsSampleHeader &getHeader() const { return _header; }
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 47d354093b..24e3ca8fb7 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -59,7 +59,7 @@ namespace Agi {
static uint32 convertSND2MIDI(byte *snddata, byte **data);
-MIDISound::MIDISound(uint8 *data, uint32 len, int resnum, SoundMgr &manager) : AgiSound(manager) {
+MIDISound::MIDISound(uint8 *data, uint32 len, int resnum) : AgiSound() {
_data = data; // Save the resource pointer
_len = len; // Save the resource's length
_type = READ_LE_UINT16(data); // Read sound resource's type
diff --git a/engines/agi/sound_midi.h b/engines/agi/sound_midi.h
index 36bd66ee76..ac1b100b12 100644
--- a/engines/agi/sound_midi.h
+++ b/engines/agi/sound_midi.h
@@ -33,7 +33,7 @@ namespace Agi {
class MIDISound : public AgiSound {
public:
- MIDISound(uint8 *data, uint32 len, int resnum, SoundMgr &manager);
+ MIDISound(uint8 *data, uint32 len, int resnum);
~MIDISound() { free(_data); }
virtual uint16 type() { return _type; }
uint8 *_data; ///< Raw sound resource data
@@ -61,8 +61,6 @@ public:
private:
bool _isGM;
-
- SoundMgr *_manager;
};
} // End of namespace Agi
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 61feac5d17..644ca7c103 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -98,7 +98,7 @@ void WagProperty::setDefaults() {
}
void WagProperty::deleteData() {
- delete _propData;
+ delete[] _propData;
_propData = NULL;
}
@@ -178,7 +178,7 @@ bool WagFileParser::parse(const Common::FSNode &node) {
_parsedOk = false; // We haven't parsed the file yet
stream = node.createReadStream(); // Open the file
- if (stream) { // Check that opening the file was succesful
+ if (stream) { // Check that opening the file was successful
if (checkWagVersion(*stream)) { // Check that WinAGI version string is valid
// It seems we've got a valid *.wag file so let's parse its properties from the start.
stream->seek(0); // Rewind the stream
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 73a37e42ef..359a6f7289 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -580,7 +580,7 @@ Common::Error AGOSEngine::init() {
if ((getGameType() == GType_SIMON2 && getPlatform() == Common::kPlatformWindows) ||
(getGameType() == GType_SIMON1 && getPlatform() == Common::kPlatformWindows) ||
((getFeatures() & GF_TALKIE) && getPlatform() == Common::kPlatformAcorn) ||
- (getPlatform() == Common::kPlatformPC)) {
+ (getPlatform() == Common::kPlatformDOS)) {
int ret = _midi->open(getGameType());
if (ret)
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 13559c2f4f..a5a42a86ad 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -53,12 +53,12 @@ static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = {
{"simon1acorn", "simon1", Common::kPlatformAcorn},
{"simon1amiga", "simon1", Common::kPlatformAmiga},
{"simon1cd32", "simon1", Common::kPlatformAmiga},
- {"simon1demo", "simon1", Common::kPlatformPC},
- {"simon1dos", "simon1", Common::kPlatformPC},
- {"simon1talkie", "simon1", Common::kPlatformPC},
+ {"simon1demo", "simon1", Common::kPlatformDOS},
+ {"simon1dos", "simon1", Common::kPlatformDOS},
+ {"simon1talkie", "simon1", Common::kPlatformDOS},
{"simon1win", "simon1", Common::kPlatformWindows},
- {"simon2dos", "simon2", Common::kPlatformPC},
- {"simon2talkie", "simon2", Common::kPlatformPC},
+ {"simon2dos", "simon2", Common::kPlatformDOS},
+ {"simon2talkie", "simon2", Common::kPlatformDOS},
{"simon2mac", "simon2", Common::kPlatformMacintosh},
{"simon2win", "simon2", Common::kPlatformWindows},
{0, 0, Common::kPlatformUnknown}
diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h
index 7fe6df5f17..70757865f5 100644
--- a/engines/agos/detection_tables.h
+++ b/engines/agos/detection_tables.h
@@ -105,7 +105,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -283,7 +283,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSPEECH)
},
@@ -306,7 +306,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -329,7 +329,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -352,7 +352,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -375,7 +375,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -584,7 +584,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -610,7 +610,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -636,7 +636,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -662,7 +662,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -688,7 +688,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -714,7 +714,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -740,7 +740,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -766,7 +766,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -843,7 +843,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSPEECH)
},
@@ -872,7 +872,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -901,7 +901,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -930,7 +930,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -959,7 +959,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1249,7 +1249,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSPEECH)
},
@@ -1273,7 +1273,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1297,7 +1297,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::CZ_CZE,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1321,7 +1321,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1345,7 +1345,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1369,7 +1369,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::CZ_CZE,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1393,7 +1393,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1417,7 +1417,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1441,7 +1441,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1465,7 +1465,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1489,7 +1489,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1514,7 +1514,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -1539,7 +1539,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -1564,7 +1564,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -1589,7 +1589,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -1614,7 +1614,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -1639,7 +1639,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -1664,7 +1664,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::HE_ISR,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -1689,7 +1689,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -1740,7 +1740,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -1815,7 +1815,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1840,7 +1840,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1865,7 +1865,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1890,7 +1890,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1915,7 +1915,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -1940,7 +1940,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO0()
},
@@ -1965,7 +1965,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO0()
},
@@ -1990,7 +1990,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO0()
},
@@ -2015,7 +2015,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2040,7 +2040,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2065,7 +2065,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2090,7 +2090,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2115,7 +2115,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2140,7 +2140,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::HE_ISR,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2191,7 +2191,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -2338,7 +2338,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOMUSIC, GUIO_NOASPECT)
},
@@ -2359,7 +2359,7 @@ static const AGOSGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOMUSIC, GUIO_NOASPECT)
},
diff --git a/engines/agos/feeble.cpp b/engines/agos/feeble.cpp
index 4608969667..a96caa9f8b 100644
--- a/engines/agos/feeble.cpp
+++ b/engines/agos/feeble.cpp
@@ -38,6 +38,7 @@ AGOSEngine_Feeble::AGOSEngine_Feeble(OSystem *system, const AGOSGameDescription
_interactiveVideo = 0;
_moviePlayer = 0;
_vgaCurSpritePriority = 0;
+ _mouseToggle = false;
}
AGOSEngine_Feeble::~AGOSEngine_Feeble() {
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index fbf7f416ed..db0817250b 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -1450,7 +1450,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas
}
if (getGameType() == GType_PN && !_wiped && !specialCase) {
- uint8 color = (getPlatform() == Common::kPlatformPC) ? 7 : 15;
+ uint8 color = (getPlatform() == Common::kPlatformDOS) ? 7 : 15;
dst = (byte *)screen->pixels + 48;
memset(dst, color, 224);
@@ -1475,7 +1475,7 @@ void AGOSEngine::setWindowImage(uint16 mode, uint16 vgaSpriteId, bool specialCas
// Personal Nightmare specific
void AGOSEngine::drawEdging() {
byte *dst;
- uint8 color = (getPlatform() == Common::kPlatformPC) ? 7 : 15;
+ uint8 color = (getPlatform() == Common::kPlatformDOS) ? 7 : 15;
Graphics::Surface *screen = _system->lockScreen();
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index 7db2d85f21..0ee1d62fde 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -1044,7 +1044,7 @@ void AGOSEngine_PN::drawIconHitBar() {
Graphics::Surface *screen = _system->lockScreen();
byte *dst = (byte *)screen->pixels + 3 * screen->pitch + 6 * 8;
const byte *src = hitBarData;
- uint8 color = (getPlatform() == Common::kPlatformPC) ? 7 : 15;
+ uint8 color = (getPlatform() == Common::kPlatformDOS) ? 7 : 15;
for (int h = 0; h < 7; h++) {
for (int w = 0; w < 12; w++) {
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 2e44a6575c..cf1d062d96 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -932,7 +932,7 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
}
dstSize = srcSize = in->size();
- if (getGameType() == GType_PN && getPlatform() == Common::kPlatformPC && id == 17 && type == 2) {
+ if (getGameType() == GType_PN && getPlatform() == Common::kPlatformDOS && id == 17 && type == 2) {
// The A2.out file isn't compressed in PC version of Personal Nightmare
dst = allocBlock(dstSize + extraBuffer);
if (in->read(dst, dstSize) != dstSize)
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index e13fa214d1..48671390f0 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -105,7 +105,7 @@ char *AGOSEngine_Simon1::genSaveName(int slot) {
char *AGOSEngine_Waxworks::genSaveName(int slot) {
static char buf[20];
- if (getPlatform() == Common::kPlatformPC)
+ if (getPlatform() == Common::kPlatformDOS)
sprintf(buf, "waxworks-pc.%.3d", slot);
else
sprintf(buf, "waxworks.%.3d", slot);
@@ -116,7 +116,7 @@ char *AGOSEngine_Waxworks::genSaveName(int slot) {
char *AGOSEngine_Elvira2::genSaveName(int slot) {
static char buf[20];
- if (getPlatform() == Common::kPlatformPC)
+ if (getPlatform() == Common::kPlatformDOS)
sprintf(buf, "elvira2-pc.%.3d", slot);
else
sprintf(buf, "elvira2.%.3d", slot);
@@ -1264,7 +1264,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
addTimeEvent(timeout, subroutine_id);
}
- if (getGameType() == GType_WW && getPlatform() == Common::kPlatformPC) {
+ if (getGameType() == GType_WW && getPlatform() == Common::kPlatformDOS) {
for (uint s = 0; s < _numRoomStates; s++) {
_roomStates[s].state = f->readUint16BE();
_roomStates[s].classFlags = f->readUint16BE();
@@ -1385,7 +1385,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
if (getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) {
_itemStore[i] = derefItem(f->readUint16BE() / 16);
} else if (getGameType() == GType_ELVIRA2) {
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_itemStore[i] = derefItem(readItemID(f));
} else {
_itemStore[i] = derefItem(f->readUint16BE() / 18);
@@ -1475,7 +1475,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
f->writeUint16BE(te->subroutine_id);
}
- if (getGameType() == GType_WW && getPlatform() == Common::kPlatformPC) {
+ if (getGameType() == GType_WW && getPlatform() == Common::kPlatformDOS) {
if (_roomsListPtr) {
byte *p = _roomsListPtr;
for (;;) {
@@ -1564,7 +1564,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
if (getGameType() == GType_WW && getPlatform() == Common::kPlatformAmiga) {
f->writeUint16BE(itemPtrToID(_itemStore[i]) * 16);
} else if (getGameType() == GType_ELVIRA2) {
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
writeItemID(f, itemPtrToID(_itemStore[i]));
} else {
f->writeUint16BE(itemPtrToID(_itemStore[i]) * 18);
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index bec41bbbd3..a6a731ab24 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -674,7 +674,7 @@ void Sound::playRawData(byte *soundData, uint sound, uint size, uint freq) {
memcpy(buffer, soundData, size);
byte flags = 0;
- if (_vm->getPlatform() == Common::kPlatformPC)
+ if (_vm->getPlatform() == Common::kPlatformDOS)
flags = Audio::FLAG_UNSIGNED;
Audio::AudioStream *stream = Audio::makeRawStream(buffer, size, freq, flags);
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index dec05f6703..93077ed83e 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -1004,7 +1004,7 @@ void AGOSEngine::invertBox(HitArea *ha, byte a, byte b, byte c, byte d) {
src[i] = color;
}
} else if (getGameType() == GType_PN) {
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
if (color != 15) {
color ^= 7;
src[i] = color;
diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp
index 3bd5400504..1e7b2ba060 100644
--- a/engines/agos/vga_pn.cpp
+++ b/engines/agos/vga_pn.cpp
@@ -152,7 +152,7 @@ void AGOSEngine::vc48_specialEffect() {
uint16 num = vcReadNextWord();
vcReadNextWord();
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
if (num == 1) {
Graphics::Surface *screen = _system->lockScreen();
byte *dst = (byte *)screen->pixels;
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index 7089c8e0d1..989d2bbe99 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -51,7 +51,7 @@ Bitmap::Bitmap(CGEEngine *vm, const char *fname) : _m(NULL), _v(NULL), _map(0),
}
}
-Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 *map) : _w(w), _h(h), _m(map), _v(NULL), _map(0), _vm(vm) {
+Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 *map) : _w(w), _h(h), _m(map), _v(NULL), _map(0), _b(NULL), _vm(vm) {
debugC(1, kCGEDebugBitmap, "Bitmap::Bitmap(%d, %d, map)", w, h);
if (map)
code();
@@ -62,7 +62,7 @@ Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 *map) : _w(w), _h(h), _m
// especially for text line real time display
Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 fill)
: _w((w + 3) & ~3), // only full uint32 allowed!
- _h(h), _m(NULL), _map(0), _vm(vm) {
+ _h(h), _m(NULL), _map(0), _b(NULL), _vm(vm) {
debugC(1, kCGEDebugBitmap, "Bitmap::Bitmap(%d, %d, %d)", w, h, fill);
uint16 dsiz = _w >> 2; // data size (1 plane line size)
@@ -100,7 +100,7 @@ Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 fill)
_b = b;
}
-Bitmap::Bitmap(CGEEngine *vm, const Bitmap &bmp) : _w(bmp._w), _h(bmp._h), _m(NULL), _v(NULL), _map(0), _vm(vm) {
+Bitmap::Bitmap(CGEEngine *vm, const Bitmap &bmp) : _w(bmp._w), _h(bmp._h), _m(NULL), _v(NULL), _map(0), _b(NULL), _vm(vm) {
debugC(1, kCGEDebugBitmap, "Bitmap::Bitmap(bmp)");
uint8 *v0 = bmp._v;
if (!v0)
diff --git a/engines/cge/cge.h b/engines/cge/cge.h
index 0e8c5a05bb..61558c0989 100644
--- a/engines/cge/cge.h
+++ b/engines/cge/cge.h
@@ -80,6 +80,12 @@ class Talk;
#define kSayTheEnd 41
+enum GameType {
+ kGameTypeNone = 0,
+ kGameTypeSoltys,
+ kGameTypeSfinx
+};
+
// our engine debug channels
enum {
kCGEDebugBitmap = 1 << 0,
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 3d6c24d68b..d29c1224fd 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -30,72 +30,110 @@
static const PlainGameDescriptor CGEGames[] = {
{ "soltys", "Soltys" },
+ { "sfinx", "Sfinx" },
{ 0, 0 }
};
namespace CGE {
-static const ADGameDescription gameDescriptions[] = {
+struct CgeGameDescription {
+ ADGameDescription desc;
+ GameType gameType;
+};
+
+static const CgeGameDescription gameDescriptions[] = {
{
- "soltys", "",
{
- {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
- {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437572},
- AD_LISTEND
+ "soltys", "",
+ {
+ {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
+ {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437572},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
- Common::PL_POL, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ kGameTypeSoltys
},
{
- "soltys", "Soltys Freeware",
{
- {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
- {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
- AD_LISTEND
+ "soltys", "Soltys Freeware",
+ {
+ {"vol.cat", 0, "0c33e2c304821a2444d297fc5e2d67c6", 50176},
+ {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
- Common::PL_POL, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ kGameTypeSoltys
},
{
- "soltys", "Soltys Demo (not supported)",
{
- {"vol.cat", 0, "1e077c8ff58109a187f07ac54b0c873a", 18788},
- {"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
- AD_LISTEND
+ "soltys", "Soltys Demo (not supported)",
+ {
+ {"vol.cat", 0, "1e077c8ff58109a187f07ac54b0c873a", 18788},
+ {"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
+ AD_LISTEND
+ },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO , GUIO0()
+ kGameTypeSoltys
},
{
- "soltys", "Soltys Demo (not supported)",
{
- {"vol.cat", 0, "f17987487fab1ebddd781d8d02fedecc", 7168},
- {"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
- AD_LISTEND
+ "soltys", "Soltys Demo (not supported)",
+ {
+ {"vol.cat", 0, "f17987487fab1ebddd781d8d02fedecc", 7168},
+ {"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
},
- Common::PL_POL, Common::kPlatformPC, ADGF_DEMO , GUIO0()
+ kGameTypeSoltys
},
{
- "soltys", "Soltys Freeware v1.0",
{
- {"vol.cat", 0, "f1675684c68ab90272f5776f8f2c3974", 50176},
- {"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
- AD_LISTEND
+ "soltys", "Soltys Freeware v1.0",
+ {
+ {"vol.cat", 0, "f1675684c68ab90272f5776f8f2c3974", 50176},
+ {"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
+ AD_LISTEND
+ },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO0()
},
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS , GUIO0()
+ kGameTypeSoltys
},
{
- "soltys", "Soltys Freeware v1.0",
{
- {"vol.cat", 0, "20fdce799adb618100ef9ee2362be875", 50176},
- {"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
- AD_LISTEND
+ "soltys", "Soltys Freeware v1.0",
+ {
+ {"vol.cat", 0, "20fdce799adb618100ef9ee2362be875", 50176},
+ {"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
- Common::PL_POL, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ kGameTypeSoltys
},
- AD_TABLE_END_MARKER
+ {
+ {
+ // Polish version, provided by Strangerke
+ "sfinx", "Sfinx Freeware",
+ {
+ {"vol.cat", 0, "21197b287d397c53261b6616bf0dd880", 129024},
+ {"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844},
+ AD_LISTEND
+ },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
+ },
+ kGameTypeSfinx
+ },
+
+ {AD_TABLE_END_MARKER, kGameTypeNone}
};
static const ADFileBasedFallback fileBasedFallback[] = {
- { &gameDescriptions[0], { "vol.cat", "vol.dat", 0 } },
+ { &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } },
{ 0, { 0 } }
};
@@ -103,7 +141,7 @@ static const ADFileBasedFallback fileBasedFallback[] = {
class CGEMetaEngine : public AdvancedMetaEngine {
public:
- CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames) {
+ CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames) {
_singleid = "soltys";
}
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp
index 1530c870ef..89802058f4 100644
--- a/engines/cge/events.cpp
+++ b/engines/cge/events.cpp
@@ -184,7 +184,7 @@ void Mouse::on() {
step(0);
if (_busy)
_busy->step(0);
- }
+ }
}
void Mouse::off() {
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index c26f68fa7b..edb8972040 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);
@@ -1191,6 +1199,8 @@ void CGEEngine::snFlash(bool on) {
}
_vga->setColors(pal, 64);
}
+
+ free(pal);
} else
_vga->setColors(_vga->_sysPal, 64);
_dark = false;
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index a8ce8777c5..27bb0608fd 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -68,7 +68,7 @@ int16 Text::count() {
for (line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
char *s;
-
+ assert(line.size() <= 513);
strcpy(tmpStr, line.c_str());
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
continue;
@@ -101,7 +101,7 @@ void Text::load() {
for (idx = 0, line = tf.readLine(); !tf.eos(); line = tf.readLine()) {
int n = line.size();
char *s;
-
+ assert(n <= 513);
strcpy(tmpStr, line.c_str());
if ((s = strtok(tmpStr, " =,;/\t\n")) == NULL)
continue;
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index e178795b7c..56a0754527 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -214,6 +214,7 @@ Sprite *Sprite::expand() {
for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) {
len = line.size();
+ assert(len <= 513);
strcpy(tmpStr, line.c_str());
lcnt++;
if (len == 0 || *tmpStr == '.')
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index aa7221f733..63092a8ffd 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -84,7 +84,7 @@ Common::Error CineEngine::run() {
// Initialize backend
initGraphics(320, 200, false);
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
g_sound = new PCSound(_mixer, this);
} else {
// Paula chipset for Amiga and Atari versions
diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp
index 4af28592e7..46f0ea61d3 100644
--- a/engines/cine/console.cpp
+++ b/engines/cine/console.cpp
@@ -28,6 +28,7 @@ namespace Cine {
bool labyrinthCheat;
CineConsole::CineConsole(CineEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
DCmd_Register("labyrinthCheat", WRAP_METHOD(CineConsole, Cmd_LabyrinthCheat));
labyrinthCheat = false;
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 823b8e38b5..a3d36cfd97 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -184,7 +184,7 @@ void CineMetaEngine::removeSaveState(const char *target, int slot) const {
// Set description for selected slot
char slotName[20];
slotName[0] = 0;
- strncpy(saveNames[slot], slotName, 20);
+ Common::strlcpy(saveNames[slot], slotName, 20);
// Update savegame descriptions
Common::String indexFile = Common::String::format("%s.dir", target);
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index bf02f0519c..224ebe5de2 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -29,7 +29,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("part01", "61d003202d301c29dd399acfb1354310"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -49,7 +49,7 @@ static const CINEGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_USA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -64,7 +64,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("part01", "91d7271155520eae6915a9dd2dac120c"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -78,7 +78,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("part01", "f5e98fcca3fb5e7afa284c81c39d8b14"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -92,7 +92,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("part01", "570109f965c7f53984b98c83d86eb206"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -106,7 +106,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("part01", "5d1acb97abe9591f9008e00d07add95a"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -250,7 +250,7 @@ static const CINEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("procs00", "d6752e7d25924cb866b61eb7cb0c8b56"),
Common::EN_GRB,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -266,7 +266,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("procs1", "9629129b86979fa592c1787385bf3695"),
Common::EN_GRB,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -280,7 +280,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("procs1", "d8c3a9d05a63e4cfa801826a7063a126"),
Common::EN_USA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -294,7 +294,7 @@ static const CINEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("procs00", "862a75d76fb7fffec30e52be9ad1c474"),
Common::EN_USA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -308,7 +308,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("procs1", "39b91ae35d1297ce0a76a1a803ca1593"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -322,7 +322,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("procs1", "74c2dabd9d212525fca8875a5f6d8994"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -340,7 +340,7 @@ static const CINEGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -354,7 +354,7 @@ static const CINEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("procs00", "f143567f08cfd1a9b1c9a41c89eadfef"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
@@ -368,7 +368,7 @@ static const CINEGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("procs1", "da066e6b8dd93f2502c2a3755f08dc12"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO0()
},
diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp
index 813cbe50af..7c0ba3af0a 100644
--- a/engines/cine/part.cpp
+++ b/engines/cine/part.cpp
@@ -57,7 +57,7 @@ void loadPart(const char *partName) {
g_cine->_partFileHandle.readUint32BE(); // unused
}
- if (g_cine->getGameType() == Cine::GType_FW && g_cine->getPlatform() == Common::kPlatformPC && strcmp(partName, "BASESON.SND") != 0)
+ if (g_cine->getGameType() == Cine::GType_FW && g_cine->getPlatform() == Common::kPlatformDOS && strcmp(partName, "BASESON.SND") != 0)
loadPal(partName);
}
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index b4fe68c343..176380c14f 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -1727,7 +1727,7 @@ int FWScript::o1_loadMusic() {
debugC(5, kCineDebugScript, "Line: %d: loadMusic(%s)", _line, param);
g_sound->loadMusic(param);
- strncpy(currentDatName, param, 30);
+ Common::strlcpy(currentDatName, param, 30);
musicIsPlaying = 0;
return 0;
@@ -1868,7 +1868,7 @@ int FWScript::o1_playSampleSwapped() {
// since the only stereo output it supports should be the Roland MT-32.
// So it probably does the same as o1_playSample here. Checking this will
// be a good idea never the less.
- if (g_cine->getPlatform() == Common::kPlatformPC) {
+ if (g_cine->getPlatform() == Common::kPlatformDOS) {
return o1_playSample();
}
diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp
index b452d9a8ee..84bb484369 100644
--- a/engines/cine/script_os.cpp
+++ b/engines/cine/script_os.cpp
@@ -421,7 +421,7 @@ int FWScript::o2_playSampleAlt() {
size = g_cine->_animDataTable[num]._width * g_cine->_animDataTable[num]._height;
}
if (g_cine->_animDataTable[num].data()) {
- if (g_cine->getPlatform() == Common::kPlatformPC) {
+ if (g_cine->getPlatform() == Common::kPlatformDOS) {
// if speaker output is available, play sound on it
// if it's another device, don't play anything
// TODO: implement this, it's used in the introduction for example
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 23f439a7a7..99d93cfc09 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -427,7 +427,7 @@ void CineEngine::makeSystemMenu() {
if (!makeTextEntryMenu(otherMessages[6], saveName, 20, 120))
break;
- strncpy(currentSaveName[selectedSave], saveName, 20);
+ Common::strlcpy(currentSaveName[selectedSave], saveName, 20);
sprintf(saveFileName, "%s.%1d", _targetName.c_str(), selectedSave);
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index 555b703da9..5db778dfda 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -102,13 +102,14 @@ Common::Error ComposerEngine::run() {
if (_bookIni.hasKey("Height", "Common"))
height = atoi(getStringFromConfig("Common", "Height").c_str());
initGraphics(width, height, true);
- _surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+ _screen.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_needsUpdate = true;
Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(),
cursor->getHotspotY(), cursor->getKeyColor());
CursorMan.replaceCursorPalette(cursor->getPalette(), cursor->getPaletteStartIndex(), cursor->getPaletteCount());
+ delete cursor;
loadLibrary(0);
@@ -213,6 +214,8 @@ Common::Error ComposerEngine::run() {
_system->delayMillis(20);
}
+ _screen.free();
+
return Common::kNoError;
}
diff --git a/engines/composer/composer.h b/engines/composer/composer.h
index 0f53258289..33a5356b3a 100644
--- a/engines/composer/composer.h
+++ b/engines/composer/composer.h
@@ -170,7 +170,7 @@ private:
bool _needsUpdate;
Common::Array<Common::Rect> _dirtyRects;
- Graphics::Surface _surface;
+ Graphics::Surface _screen;
Common::List<Sprite> _sprites;
uint _directoriesToStrip;
diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp
index 835f3c5683..8411441c60 100644
--- a/engines/composer/detection.cpp
+++ b/engines/composer/detection.cpp
@@ -374,7 +374,7 @@ static const ComposerGameDescription gameDescriptions[] = {
using namespace Composer;
// we match from data too, to stop detection from a non-top-level directory
-const static char *directoryGlobs[] = {
+static const char *directoryGlobs[] = {
"data",
"liam",
"programs",
diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index 1314e903ae..2b68fac233 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -507,7 +507,7 @@ const Sprite *ComposerEngine::getSpriteAtPos(const Common::Point &pos) {
void ComposerEngine::dirtySprite(const Sprite &sprite) {
Common::Rect rect(sprite._pos.x, sprite._pos.y, sprite._pos.x + sprite._surface.w, sprite._pos.y + sprite._surface.h);
- rect.clip(_surface.w, _surface.h);
+ rect.clip(_screen.w, _screen.h);
if (rect.isEmpty())
return;
@@ -541,8 +541,8 @@ void ComposerEngine::redraw() {
for (uint i = 0; i < _dirtyRects.size(); i++) {
const Common::Rect &rect = _dirtyRects[i];
- byte *pixels = (byte *)_surface.pixels + (rect.top * _surface.pitch) + rect.left;
- _system->copyRectToScreen(pixels, _surface.pitch, rect.left, rect.top, rect.width(), rect.height());
+ byte *pixels = (byte *)_screen.pixels + (rect.top * _screen.pitch) + rect.left;
+ _system->copyRectToScreen(pixels, _screen.pitch, rect.left, rect.top, rect.width(), rect.height());
}
_system->updateScreen();
@@ -814,16 +814,16 @@ void ComposerEngine::drawSprite(const Sprite &sprite) {
int y = sprite._pos.y;
// incoming data is BMP-style (bottom-up), so flip it
- byte *pixels = (byte *)_surface.pixels;
+ byte *pixels = (byte *)_screen.pixels;
for (int j = 0; j < sprite._surface.h; j++) {
if (j + y < 0)
continue;
- if (j + y >= _surface.h)
+ if (j + y >= _screen.h)
break;
byte *in = (byte *)sprite._surface.pixels + (sprite._surface.h - j - 1) * sprite._surface.w;
- byte *out = pixels + ((j + y) * _surface.w) + x;
+ byte *out = pixels + ((j + y) * _screen.w) + x;
for (int i = 0; i < sprite._surface.w; i++)
- if ((x + i >= 0) && (x + i < _surface.w) && in[i])
+ if ((x + i >= 0) && (x + i < _screen.w) && in[i])
out[i] = in[i];
}
}
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 ee29e3223a..963b9f774f 100644
--- a/engines/configure.engines
+++ b/engines/configure.engines
@@ -16,10 +16,11 @@ 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" yes "" "" "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
-add_engine eob "Eye of the Beholder" no
+add_engine eob "Eye of the Beholder" yes
add_engine lastexpress "The Last Express" no "" "" "16bit"
add_engine lure "Lure of the Temptress" yes
add_engine made "MADE" yes
@@ -28,8 +29,9 @@ add_engine mortevielle "Mortevielle" no
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 neverhood "Neverhood" no
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
@@ -43,10 +45,10 @@ 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" no "" "" "16bit"
+add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit"
add_engine tsage "TsAGE" yes
add_engine tucker "Bud Tucker in Double Trouble" yes
add_engine wintermute "Wintermute" no "" "" "png zlib vorbis 16bit"
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index 9782df8f09..3e49e77770 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -43,10 +43,6 @@
*/
namespace Cruise {
-enum CruiseGameType {
- GType_CRUISE = 1
-};
-
#define GAME_FRAME_DELAY_1 50
#define GAME_FRAME_DELAY_2 100
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index 94d075ecc3..b2a319bb85 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -265,6 +265,8 @@ int loadFile(const char* name, int idx, int destIdx) {
error("Unknown fileType in loadFile");
}
+ MemFree(ptr);
+
return -1;
}
@@ -283,6 +285,7 @@ int loadFileRange(const char *name, int startIdx, int currentEntryIdx, int numId
for (i = 0; i < numIdx; i++) {
if ((startIdx + i) > numMaxEntriesInSet) {
+ MemFree(ptr);
return 0; // exit if limit is reached
}
loadSetEntry(name, ptr, startIdx + i, currentEntryIdx + i);
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index ba79df4822..bce3f184db 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -20,8 +20,6 @@
*
*/
-
-
#include "base/plugins.h"
#include "common/savefile.h"
#include "common/system.h"
@@ -34,21 +32,12 @@ namespace Cruise {
struct CRUISEGameDescription {
ADGameDescription desc;
-
- int gameType;
- uint32 features;
};
const char *CruiseEngine::getGameId() const {
return _gameDescription->desc.gameid;
}
-int CruiseEngine::getGameType() const {
- return _gameDescription->gameType;
-}
-uint32 CruiseEngine::getFeatures() const {
- return _gameDescription->features;
-}
Common::Language CruiseEngine::getLanguage() const {
return _gameDescription->desc.language;
}
@@ -73,12 +62,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"16 colors",
AD_ENTRY1("D1", "cd29a4cd9162076e9a18495fe56a48f3"),
Common::EN_GRB,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -86,12 +73,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"16 colors",
AD_ENTRY1("D1", "41a7a4d426dbd048eb369cfee4bb2717"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -99,12 +84,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("D1", "a90d2b9ead6b4d812cd14268672cf178"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -112,12 +95,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("D1", "e258865807ea31b2d523340e6f0a606b"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -125,12 +106,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"16 colors",
AD_ENTRY1("D1", "287d2ec1799e2f881dee23c70be96e81"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -138,12 +117,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("D1", "f2a26522d49983c4ae32bcccbb801b02"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -155,8 +132,6 @@ static const CRUISEGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{ // Amiga English US GOLD edition.
{
@@ -168,8 +143,6 @@ static const CRUISEGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{ // Amiga Italian US GOLD edition.
{
@@ -181,8 +154,6 @@ static const CRUISEGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{ // AtariST English KixxXL edition.
{
@@ -194,8 +165,6 @@ static const CRUISEGameDescription gameDescriptions[] = {
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -203,12 +172,10 @@ static const CRUISEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("D1", "e19a4ab2e24a69087e4ea994a5506231"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
{
{
@@ -216,14 +183,12 @@ static const CRUISEGameDescription gameDescriptions[] = {
"256 colors",
AD_ENTRY1("D1", "9a302ada55600d96061fda1d63a6ccda"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
- GType_CRUISE,
- 0,
},
- {AD_TABLE_END_MARKER, 0, 0}
+ {AD_TABLE_END_MARKER}
};
}
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/staticres.cpp b/engines/cruise/staticres.cpp
index a3fc4f884b..08ff4d7548 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -177,9 +177,9 @@ const int16 spanish_fontCharacterTable[256] = {
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 92,
-1, -1, -1,
- 0x72, 0x80
+ 0x72, 0x80,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0x7f, 0x79, 0x7b, 0x81, 0x82, 0x83,
-1, -1,
0x7d,
diff --git a/engines/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/draci/console.cpp b/engines/draci/console.cpp
index a0013c59fe..07f0ff5542 100644
--- a/engines/draci/console.cpp
+++ b/engines/draci/console.cpp
@@ -26,6 +26,7 @@
namespace Draci {
DraciConsole::DraciConsole(DraciEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
DraciConsole::~DraciConsole() {
diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp
index 2d78d05933..98a74824c8 100644
--- a/engines/draci/detection.cpp
+++ b/engines/draci/detection.cpp
@@ -41,7 +41,7 @@ const ADGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("INIT.DFW", "b890a5aeebaf16af39219cba2416b0a3", 906),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -51,7 +51,7 @@ const ADGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("INIT.DFW", "9921c8f0045679a8f37eca8d41c5ec02", 906),
Common::CZ_CZE,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -61,7 +61,7 @@ const ADGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("INIT.DFW", "76b9b78a8a8809a240acc395df4d0715", 906),
Common::PL_POL,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -71,7 +71,7 @@ const ADGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("INIT.DFW", "9a7115b91cdea361bcaff3e046ac7ded", 906),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
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 760d8b7d98..1917bc879d 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"
@@ -65,34 +68,58 @@ static const PlainGameDescriptor drasculaGames[] = {
namespace Drascula {
static const DrasculaGameDescription gameDescriptions[] = {
+
+ //// Packed versions //////////////////////////////////////////////////////
+
{
- // Drascula English version
+ // Drascula English version (original packed files)
{
"drascula",
0,
- AD_ENTRY1s("14.ald", "09b2735953edcd43af115c65ae00b10e", 1595),
+ {
+ {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+ // HACK: List packet.001 twice to ensure this detector entry
+ // is ranked just as high as the others (which each have two
+ // detection files).
+ {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+ {NULL, 0, NULL, 0}
+ },
Common::EN_ANY,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ Common::kPlatformDOS,
+ GF_PACKED,
GUIO0()
},
},
{
- // Drascula English version (original packed files)
+ // Drascula French version (original packed files)
{
"drascula",
0,
{
{"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
- // HACK: List packet.001 twice to ensure this detector entry
- // is ranked just as high as the others (which each have two
- // detection files).
+ {"packet.002", 1, "4401123400f22f212b89f15fb4b43013", 721122},
+ {NULL, 0, NULL, 0}
+ },
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ GF_PACKED,
+ GUIO0()
+ },
+ },
+
+ {
+ // Drascula French version (ScummVM repacked files)
+ {
+ "drascula",
+ 0,
+ {
{"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+ {"packet.002", 1, "7b83cedb9bb326ed5143e5c459508d43", 722383},
{NULL, 0, NULL, 0}
},
- Common::EN_ANY,
- Common::kPlatformPC,
+ Common::FR_FRA,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
@@ -109,24 +136,37 @@ static const DrasculaGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
},
{
- // Drascula French version (original packed files)
+ // Drascula Italian version (original packed version)
+ {
+ "drascula",
+ 0,
+ AD_ENTRY1s("packet.001", "0253e924af223f5fe52537023385159b", 32564209),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ GF_PACKED,
+ GUIO0()
+ },
+ },
+
+ {
+ // Drascula Italian version (ScummVM repacked files)
{
"drascula",
0,
{
{"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
- {"packet.002", 1, "4401123400f22f212b89f15fb4b43013", 721122},
+ {"packet.005", 1, "58caac54b891f5d7f335e710e45e5d29", 16209623},
{NULL, 0, NULL, 0}
},
- Common::FR_FRA,
- Common::kPlatformPC,
+ Common::IT_ITA,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
@@ -139,33 +179,39 @@ static const DrasculaGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("packet.001", "3c971aba65a037d29d0b479cad6f5943", 31702652),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
},
{
- // Drascula Spanish version
+ // Drascula Spanish version (ScummVM repacked files)
{
"drascula",
0,
- AD_ENTRY1s("14.ald", "0746ed1a5cc8d9728f790c29813f4b43", 23059),
+ {
+ {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+ {"packet.004", 1, "a289d3cf80d50f25ec569b653248437e", 17205838},
+ {NULL, 0, NULL, 0}
+ },
Common::ES_ESP,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ Common::kPlatformDOS,
+ GF_PACKED,
GUIO0()
},
},
+ //// Unpacked versions ////////////////////////////////////////////////////
+
{
- // Drascula German version
+ // Drascula English version
{
"drascula",
0,
- AD_ENTRY1s("14.ald", "72e46089033d56bad1c179ac36e2a9d2", 610),
- Common::DE_DEU,
- Common::kPlatformPC,
+ AD_ENTRY1s("14.ald", "09b2735953edcd43af115c65ae00b10e", 1595),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -178,84 +224,73 @@ static const DrasculaGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("14.ald", "eeeee96b82169003630e08992248296c", 608),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
},
{
- // Drascula Italian version (original packed version)
+ // Drascula French version (updated - bug #3612236)
{
"drascula",
0,
- AD_ENTRY1s("packet.001", "0253e924af223f5fe52537023385159b", 32564209),
- Common::IT_ITA,
- Common::kPlatformPC,
- GF_PACKED,
+ AD_ENTRY1s("14.ald", "1f9fbded768bee061cc22bc5bdeab540", 611),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO0()
},
},
+
{
- // Drascula Italian version
+ // Drascula German version
{
"drascula",
0,
- AD_ENTRY1s("14.ald", "02b49a18328d0bf2efe6ba658c9c7a1d", 2098),
- Common::IT_ITA,
- Common::kPlatformPC,
+ AD_ENTRY1s("14.ald", "72e46089033d56bad1c179ac36e2a9d2", 610),
+ Common::DE_DEU,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
},
{
- // Drascula Spanish version (ScummVM repacked files)
+ // Drascula Italian version
{
"drascula",
0,
- {
- {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
- {"packet.004", 1, "a289d3cf80d50f25ec569b653248437e", 17205838},
- {NULL, 0, NULL, 0}
- },
- Common::ES_ESP,
- Common::kPlatformPC,
- GF_PACKED,
+ AD_ENTRY1s("14.ald", "02b49a18328d0bf2efe6ba658c9c7a1d", 2098),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO0()
},
},
{
- // Drascula Italian version (ScummVM repacked files)
+ // Drascula Italian version (updated - bug #3612236)
{
"drascula",
0,
- {
- {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
- {"packet.005", 1, "58caac54b891f5d7f335e710e45e5d29", 16209623},
- {NULL, 0, NULL, 0}
- },
+ AD_ENTRY1s("14.ald", "ccaee939bb3b344c048f28f9205710d1", 2925),
Common::IT_ITA,
- Common::kPlatformPC,
- GF_PACKED,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO0()
},
},
{
- // Drascula French version (ScummVM repacked files)
+ // Drascula Spanish version
{
"drascula",
0,
- {
- {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
- {"packet.002", 1, "7b83cedb9bb326ed5143e5c459508d43", 722383},
- {NULL, 0, NULL, 0}
- },
- Common::FR_FRA,
- Common::kPlatformPC,
- GF_PACKED,
+ AD_ENTRY1s("14.ald", "0746ed1a5cc8d9728f790c29813f4b43", 23059),
+ Common::ES_ESP,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO0()
},
},
@@ -263,81 +298,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 bool hasFeature(MetaEngineFeature f) const {
- return (f == kSupportsListSaves);
+ virtual const char *getName() const {
+ return "Drascula";
}
- virtual SaveStateList listSaves(const char *target) const {
- Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
- Common::String pattern = Common::String::format("%s??", target);
+ virtual const char *getOriginalCopyright() const {
+ return "Drascula Engine (C) 2000 Alcachofa Soft, (C) 1996 Digital Dreams Multimedia, (C) 1994 Emilio de Paz";
+ }
- // 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) {
+ 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;
+};
- // Obtain the last 2 digits of the filename, since they correspond to the save slot
- int slotNum = atoi(file->c_str() + file->size() - 2);
+bool DrasculaMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
+}
- // Ensure save slot is within valid range
- if (slotNum >= 1 && slotNum <= 10) {
- slots.push_back(slotNum);
+const ExtraGuiOptions DrasculaMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ options.push_back(drasculaExtraGuiOption);
+ return options;
+}
+
+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 (size_t 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 +424,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..fca8040f59 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -121,10 +121,8 @@ bool DrasculaEngine::confirmExit() {
void DrasculaEngine::showMenu() {
int h, n, x;
- char textIcon[13];
byte *srcSurface = (currentChapter == 6) ? tableSurface : frontSurface;
x = whichObject();
- strcpy(textIcon, iconName[x]);
for (n = 1; n < ARRAYSIZE(inventoryObjects); n++) {
h = inventoryObjects[n];
@@ -138,7 +136,7 @@ void DrasculaEngine::showMenu() {
}
if (x < 7)
- print_abc(textIcon, _itemLocations[x].x - 2, _itemLocations[x].y - 7);
+ print_abc(iconName[x], _itemLocations[x].x - 2, _itemLocations[x].y - 7);
}
void DrasculaEngine::clearMenu() {
@@ -153,52 +151,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 +165,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..996c9d3f03 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -21,218 +21,268 @@
*/
#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)
+ return;
+
+ 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);
}
}
- // 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
- }
- delete sav;
-}
+ // Sort save slot ids
+ Common::sort<int>(slots.begin(), slots.end());
-/**
- * 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());
+ // Get savegame names from index
+ Common::String saveDesc;
- 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");
+ 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;
+ }
+}
- delay(5);
+void DrasculaEngine::saveGame(int slot, Common::String &desc) {
+ Common::OutSaveFile *out;
+ int l;
+
+ 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 +293,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/backdrop.cpp b/engines/dreamweb/backdrop.cpp
index 1db2663624..5ccc68704a 100644
--- a/engines/dreamweb/backdrop.cpp
+++ b/engines/dreamweb/backdrop.cpp
@@ -25,35 +25,35 @@
namespace DreamWeb {
void DreamWebEngine::doBlocks() {
- uint16 dstOffset = _mapAdY * 320 + _mapAdX;
+ uint16 dstOffset = _mapAdY * kScreenwidth + _mapAdX;
uint16 mapOffset = _mapY * kMapWidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
uint8 *dstBuffer = workspace() + dstOffset;
- for (size_t i = 0; i < 10; ++i) {
- for (size_t j = 0; j < 11; ++j) {
+ for (uint i = 0; i < 10; ++i) {
+ for (uint j = 0; j < 11; ++j) {
uint16 blockType = mapData[j];
if (blockType != 0) {
- uint8 *dst = dstBuffer + i * 320 * 16 + j * 16;
+ uint8 *dst = dstBuffer + i * kScreenwidth * 16 + j * 16;
const uint8 *block = _backdropBlocks + blockType * 256;
- for (size_t k = 0; k < 4; ++k) {
+ for (uint k = 0; k < 4; ++k) {
memcpy(dst, block, 16);
block += 16;
- dst += 320;
+ dst += kScreenwidth;
}
- for (size_t k = 0; k < 12; ++k) {
+ for (uint k = 0; k < 12; ++k) {
memcpy(dst, block, 16);
memset(dst + 16, 0xdf, 4);
block += 16;
- dst += 320;
+ dst += kScreenwidth;
}
dst += 4;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
- dst += 320;
+ dst += kScreenwidth;
memset(dst, 0xdf, 16);
}
}
@@ -129,7 +129,7 @@ void DreamWebEngine::showAllObs() {
_setList.clear();
const GraphicsFile &frameBase = _setFrames;
- for (size_t i = 0; i < 128; ++i) {
+ for (uint i = 0; i < 128; ++i) {
SetObject *setEntry = &_setDat[i];
uint16 x, y;
if (getMapAd(setEntry->mapad, &x, &y) == 0)
@@ -154,7 +154,7 @@ void DreamWebEngine::showAllObs() {
}
static bool addAlong(const MapFlag *mapFlags) {
- for (size_t i = 0; i < 11; ++i) {
+ for (uint i = 0; i < 11; ++i) {
if (mapFlags[i]._flag != 0)
return true;
}
@@ -162,7 +162,7 @@ static bool addAlong(const MapFlag *mapFlags) {
}
static bool addLength(const MapFlag *mapFlags) {
- for (size_t i = 0; i < 10; ++i) {
+ for (uint i = 0; i < 10; ++i) {
if (mapFlags[11 * i]._flag != 0)
return true;
}
@@ -205,13 +205,13 @@ void DreamWebEngine::calcMapAd() {
}
void DreamWebEngine::showAllFree() {
- const unsigned int count = 80;
+ const uint count = 80;
_freeList.clear();
const DynObject *freeObjects = _freeDat;
const GraphicsFile &frameBase = _freeFrames;
- for (size_t i = 0; i < count; ++i) {
+ for (uint i = 0; i < count; ++i) {
uint16 x, y;
uint8 mapAd = getMapAd(freeObjects[i].mapad, &x, &y);
if (mapAd != 0) {
@@ -236,8 +236,8 @@ void DreamWebEngine::drawFlags() {
uint16 mapOffset = _mapY * kMapWidth + _mapX;
const uint8 *mapData = _mapData + mapOffset;
- for (size_t i = 0; i < 10; ++i) {
- for (size_t j = 0; j < 11; ++j) {
+ for (uint i = 0; i < 10; ++i) {
+ for (uint j = 0; j < 11; ++j) {
uint8 tile = mapData[i * kMapWidth + j];
mapFlag->_flag = _backdropFlags[tile]._flag;
mapFlag->_flagEx = _backdropFlags[tile]._flagEx;
@@ -248,13 +248,13 @@ void DreamWebEngine::drawFlags() {
}
void DreamWebEngine::showAllEx() {
- const unsigned int count = 100;
+ const uint count = 100;
_exList.clear();
DynObject *objects = _exData;
const GraphicsFile &frameBase = _exFrames;
- for (size_t i = 0; i < count; ++i) {
+ for (uint i = 0; i < count; ++i) {
DynObject *object = objects + i;
if (object->mapad[0] == 0xff)
continue;
diff --git a/engines/dreamweb/console.cpp b/engines/dreamweb/console.cpp
index d415089a48..532bf815ef 100644
--- a/engines/dreamweb/console.cpp
+++ b/engines/dreamweb/console.cpp
@@ -25,6 +25,7 @@
namespace DreamWeb {
DreamWebConsole::DreamWebConsole(DreamWebEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
DreamWebConsole::~DreamWebConsole() {
diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h
index 8a2f94f99b..ec54484d28 100644
--- a/engines/dreamweb/detection_tables.h
+++ b/engines/dreamweb/detection_tables.h
@@ -45,7 +45,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
0,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -62,7 +62,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -83,7 +83,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::EN_GRB,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -100,7 +100,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::EN_USA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -117,7 +117,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -135,7 +135,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -152,7 +152,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
0,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -169,7 +169,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -186,7 +186,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
0,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -203,7 +203,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -221,7 +221,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
@@ -238,7 +238,7 @@ static const DreamWebGameDescription gameDescriptions[] = {
AD_LISTEND
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
0,
GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE)
},
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 5f5d627553..c3ede46df2 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -208,7 +208,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_addToRed = 0;
_addToBlue = 0;
_lastSoundReel = 0;
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
_bufferIn = 0;
_bufferOut = 0;
_blinkFrame = 23;
@@ -263,7 +263,7 @@ void DreamWebEngine::waitForVSync() {
void DreamWebEngine::quit() {
_quitRequested = true;
- _lastHardKey = 1;
+ _lastHardKey = Common::KEYCODE_ESCAPE;
}
void DreamWebEngine::processEvents() {
@@ -274,7 +274,7 @@ void DreamWebEngine::processEvents() {
_sound->soundHandler();
Common::Event event;
- int softKey, hardKey;
+ int softKey;
while (_eventMan->pollEvent(event)) {
switch(event.type) {
case Common::EVENT_RTL:
@@ -309,28 +309,21 @@ void DreamWebEngine::processEvents() {
return; //do not pass ctrl + key to the engine
}
- // Some parts of the ASM code uses the hardware key
- // code directly. We don't have that code, so we fake
- // it for the keys where it's needed and assume it's
- // 0 (which is actually an invalid value, as far as I
- // know) otherwise.
-
- hardKey = 0;
+ // Some parts of the code uses the hardware key
+ // code directly.
switch (event.kbd.keycode) {
case Common::KEYCODE_ESCAPE:
- hardKey = 1;
+ _lastHardKey = Common::KEYCODE_ESCAPE;
break;
case Common::KEYCODE_SPACE:
- hardKey = 57;
+ _lastHardKey = Common::KEYCODE_SPACE;
break;
default:
- hardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
break;
}
- _lastHardKey = hardKey;
-
// The rest of the keys are converted to ASCII. This
// is fairly restrictive, and eventually we may want
// to let through more keys. I think this is mostly to
@@ -338,11 +331,13 @@ void DreamWebEngine::processEvents() {
softKey = 0;
- if (event.kbd.keycode >= Common::KEYCODE_a && event.kbd.keycode <= Common::KEYCODE_z) {
- softKey = event.kbd.ascii & ~0x20;
- } else if (event.kbd.keycode == Common::KEYCODE_MINUS ||
- event.kbd.keycode == Common::KEYCODE_SPACE ||
- (event.kbd.keycode >= Common::KEYCODE_0 && event.kbd.keycode <= Common::KEYCODE_9)) {
+ debug(1, "DreamWebEngine::processEvents() KeyDown keycode:%d ascii:0x%02x", event.kbd.keycode, event.kbd.ascii);
+ if ((event.kbd.ascii >= 'a' && event.kbd.ascii <= 'z') ||
+ (event.kbd.ascii >= 'A' && event.kbd.ascii <= 'Z')) {
+ softKey = event.kbd.ascii & ~0x20; // (& ~0x20) forces ascii codes for a-z to map to A-Z
+ } else if (event.kbd.ascii == '-' ||
+ event.kbd.ascii == ' ' ||
+ (event.kbd.ascii >= '0' && event.kbd.ascii <= '9')) {
softKey = event.kbd.ascii;
} else if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) {
softKey = event.kbd.keycode - Common::KEYCODE_KP0 + '0';
@@ -374,6 +369,7 @@ Common::Error DreamWebEngine::run() {
ConfMan.registerDefault("bright_palette", true);
_hasSpeech = Common::File::exists(_speechDirName + "/r01c0000.raw") && !ConfMan.getBool("speech_mute");
_brightPalette = ConfMan.getBool("bright_palette");
+ _copyProtection = ConfMan.getBool("copy_protection");
_timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync");
dreamweb();
@@ -403,14 +399,14 @@ Common::String DreamWebEngine::getSavegameFilename(int slot) const {
void DreamWebEngine::keyPressed(uint16 ascii) {
debug(2, "key pressed = %04x", ascii);
- uint16 in = (_bufferIn + 1) & 0x0f;
+ uint16 in = (_bufferIn + 1) % ARRAYSIZE(_keyBuffer);
uint16 out = _bufferOut;
if (in == out) {
warning("keyboard buffer is full");
return;
}
_bufferIn = in;
- DreamWeb::g_keyBuffer[in] = ascii;
+ _keyBuffer[in] = ascii;
}
void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) {
@@ -421,7 +417,7 @@ void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) {
void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
assert(start + count <= 256);
- uint8 fixed[768];
+ uint8 fixed[3*256];
for (uint i = 0; i < count * 3; ++i) {
fixed[i] = data[i] << 2;
}
@@ -429,10 +425,10 @@ void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
}
void DreamWebEngine::blit(const uint8 *src, int pitch, int x, int y, int w, int h) {
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
+ if (y + h > (int)kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > (int)kScreenwidth)
+ w = kScreenwidth - x;
if (h <= 0 || w <= 0)
return;
_system->copyRectToScreen(src, pitch, x, y, w, h);
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index a4597b1867..5746568e4e 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -25,6 +25,7 @@
#include "common/error.h"
#include "common/file.h"
+#include "common/keyboard.h"
#include "common/random.h"
#include "common/rect.h"
#include "common/savefile.h"
@@ -63,6 +64,7 @@ const unsigned int kMapHeight = 60;
const unsigned int kLengthOfMap = kMapWidth * kMapHeight;
const unsigned int kNumExObjects = 114;
const unsigned int kScreenwidth = 320;
+const unsigned int kScreenheight = 200;
const unsigned int kDiaryx = (68+24);
const unsigned int kDiaryy = (48+12);
const unsigned int kInventx = 80;
@@ -88,10 +90,6 @@ const unsigned int kNumRoomTexts = 38;
const unsigned int kNumFreeTexts = 82;
const unsigned int kNumPersonTexts = 1026;
-// Keyboard buffer. data.word(kBufferin) and data.word(kBufferout) are indexes
-// into this, making it a ring buffer
-extern uint8 g_keyBuffer[16];
-
// Engine Debug Flags
enum {
kDebugAnimation = (1 << 0),
@@ -156,6 +154,12 @@ public:
const Common::String& getSpeechDirName() { return _speechDirName; }
private:
+ // Keyboard buffer. _bufferIn and _bufferOut are indexes
+ // into this, making it a ring buffer
+ uint8 _keyBuffer[16];
+ uint16 _bufferIn;
+ uint16 _bufferOut;
+
void keyPressed(uint16 ascii);
void setSpeed(uint speed);
@@ -316,6 +320,7 @@ public:
uint16 _charShift;
uint8 _kerning;
bool _brightPalette;
+ bool _copyProtection;
uint8 _roomLoaded;
uint8 _didZoom;
uint16 _lineSpacing;
@@ -419,9 +424,7 @@ public:
uint8 _addToRed;
uint8 _addToBlue;
uint16 _lastSoundReel;
- uint8 _lastHardKey;
- uint16 _bufferIn;
- uint16 _bufferOut;
+ Common::KeyCode _lastHardKey;
uint8 _blinkFrame;
uint8 _blinkCount;
uint8 _reAssesChanges;
@@ -510,6 +513,7 @@ public:
void dirCom();
void useMon();
bool execCommand();
+ int findCommand(const char *const cmdList[]);
// from newplace.cpp
void getUnderCentre();
@@ -750,7 +754,6 @@ public:
void showRyanPage();
void switchRyanOn();
void switchRyanOff();
- void middlePanel();
void showDiary();
void readMouse();
uint16 readMouseState();
@@ -882,7 +885,6 @@ public:
void obsThatDoThings();
void describeOb();
void putBackObStuff();
- void reExFromOpen();
void showDiaryPage();
void showDiaryKeys();
void dumpDiaryKeys();
diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp
index 3580f8ad52..7bbca2b979 100644
--- a/engines/dreamweb/keypad.cpp
+++ b/engines/dreamweb/keypad.cpp
@@ -103,7 +103,6 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d
// Note: isItRight comes from use.asm, but is only used by enterCode(),
// so we place it here.
bool DreamWebEngine::isItRight(uint8 digit0, uint8 digit1, uint8 digit2, uint8 digit3) {
-
return digit0 == _pressList[0] && digit1 == _pressList[1]
&& digit2 == _pressList[2] && digit3 == _pressList[3];
}
@@ -434,7 +433,7 @@ void DreamWebEngine::folderExit() {
void DreamWebEngine::showLeftPage() {
showFrame(_folderGraphics2, 0, 12, 3, 0);
uint16 y = 12+5;
- for (size_t i = 0; i < 9; ++i) {
+ for (uint i = 0; i < 9; ++i) {
showFrame(_folderGraphics2, 0, y, 4, 0);
y += 16;
}
@@ -445,7 +444,7 @@ void DreamWebEngine::showLeftPage() {
uint8 pageIndex = _folderPage - 2;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
- for (size_t i = 0; i < 2; ++i) {
+ for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
lastChar = printDirect(&string, 2, &y, 140, false);
@@ -455,19 +454,19 @@ void DreamWebEngine::showLeftPage() {
_kerning = 0;
_charShift = 0;
_lineSpacing = 10;
- uint8 *bufferToSwap = workspace() + (48*320)+2;
- for (size_t i = 0; i < 120; ++i) {
- for (size_t j = 0; j < 65; ++j) {
+ uint8 *bufferToSwap = workspace() + (48*kScreenwidth)+2;
+ for (uint i = 0; i < 120; ++i) {
+ for (uint j = 0; j < 65; ++j) {
SWAP(bufferToSwap[j], bufferToSwap[130 - j]);
}
- bufferToSwap += 320;
+ bufferToSwap += kScreenwidth;
}
}
void DreamWebEngine::showRightPage() {
showFrame(_folderGraphics2, 143, 12, 0, 0);
uint16 y = 12+37;
- for (size_t i = 0; i < 7; ++i) {
+ for (uint i = 0; i < 7; ++i) {
showFrame(_folderGraphics2, 143, y, 1, 0);
y += 16;
}
@@ -478,7 +477,7 @@ void DreamWebEngine::showRightPage() {
uint8 pageIndex = _folderPage - 1;
const uint8 *string = getTextInFile1(pageIndex * 2);
y = 48;
- for (size_t i = 0; i < 2; ++i) {
+ for (uint i = 0; i < 2; ++i) {
uint8 lastChar;
do {
lastChar = printDirect(&string, 152, &y, 140, false);
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 1886a80b6a..1f9fa8d24f 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -104,15 +104,76 @@ 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",
+ "HILF",
+ "LISTE",
+ "LIES",
+ "ZUGRIFF",
+ "DATEN",
+ NULL
+ };
+
+ static const char *const comlistIT[] = {
+ "ESCI",
+ "AIUTO",
+ "ELENCA",
+ "LEGGI",
+ "ACCEDI",
+ "CHIAVI",
+ NULL
+ };
+
+ static const char *const comlistES[] = {
+ "SALIR",
+ "AYUDA",
+ "LISTA",
+ "LEER",
+ "ACCESO",
+ "CLAVES",
+ NULL
};
if (_inputLine[0] == 0) {
@@ -121,26 +182,25 @@ 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:
+ cmd = findCommand(comlistES);
break;
+ default:
+ break;
+ }
}
// Execute the selected command
@@ -149,6 +209,27 @@ bool DreamWebEngine::execCommand() {
return true;
case 1:
monMessage(6);
+ // An extra addition in ScummVM: available commands.
+ // Since the reference to the game manual is a form of copy protection,
+ // this extra text is wrapped around the common copy protection check,
+ // to keep it faithful to the original, if requested.
+ if (!_copyProtection) {
+ 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, ACCEDI, CHIAVI");
+ break;
+ case Common::ES_ESP:
+ default:
+ monPrint("VALID COMMANDS ARE EXIT, HELP, LIST, READ, LOGON, KEYS");
+ break;
+ }
+ }
break;
case 2:
dirCom();
@@ -170,7 +251,6 @@ bool DreamWebEngine::execCommand() {
}
-
void DreamWebEngine::monitorLogo() {
if (_logoNum != _oldLogoNum) {
_oldLogoNum = _logoNum;
@@ -366,7 +446,7 @@ void DreamWebEngine::lockLightOff() {
}
void DreamWebEngine::turnOnPower() {
- for (size_t i = 0; i < 3; ++i) {
+ for (uint i = 0; i < 3; ++i) {
powerLightOn();
hangOn(30);
powerLightOff();
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 5b4b0260f5..6b1f9d097b 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -140,7 +140,7 @@ void DreamWebEngine::putUnderCentre() {
}
void DreamWebEngine::locationPic() {
- const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0 };
+ const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0, 0 };
byte picture = roomPics[_destPos];
if (picture >= 6)
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index 1e84aba6bd..bee3a6d511 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -31,7 +31,7 @@ void DreamWebEngine::showRyanPage() {
void DreamWebEngine::findAllRyan() {
memset(_ryanInvList, 0xff, sizeof(_ryanInvList));
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
const DynObject *extra = getExAd(i);
if (extra->mapad[0] != kExObjectType)
continue;
@@ -47,8 +47,8 @@ void DreamWebEngine::findAllRyan() {
void DreamWebEngine::fillRyan() {
ObjectRef *inv = &_ryanInvList[_vars._ryanPage * 10];
findAllRyan();
- for (size_t i = 0; i < 2; ++i) {
- for (size_t j = 0; j < 5; ++j) {
+ for (uint i = 0; i < 2; ++i) {
+ for (uint j = 0; j < 5; ++j) {
obToInv(inv->_index, inv->_type, kInventx + j * kItempicsize, kInventy + i * kItempicsize);
++inv;
}
@@ -435,10 +435,23 @@ void DreamWebEngine::deleteExFrame(uint8 frameNum) {
_vars._exFramePos -= frameSize;
// Adjust all frame pointers pointing into the shifted data
- for (unsigned int i = 0; i < 3*kNumexobjects; ++i) {
- frame = &_exFrames._frames[i];
- if (frame->ptr() >= startOff)
- frame->setPtr(frame->ptr() - frameSize);
+ for (unsigned int i = 0; i < kNumexobjects; ++i) {
+ if (_exData[i].mapad[0] != 0xff) {
+ frame = &_exFrames._frames[3*i+0];
+ if (frame->ptr() >= startOff) {
+ frame->setPtr(frame->ptr() - frameSize);
+ assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos);
+ } else {
+ assert(frame->ptr() + frame->width*frame->height <= startOff);
+ }
+ frame = &_exFrames._frames[3*i+1];
+ if (frame->ptr() >= startOff) {
+ frame->setPtr(frame->ptr() - frameSize);
+ assert(frame->ptr() + frame->width*frame->height <= _vars._exFramePos);
+ } else {
+ assert(frame->ptr() + frame->width*frame->height <= startOff);
+ }
+ }
}
}
@@ -875,7 +888,7 @@ void DreamWebEngine::useOpened() {
void DreamWebEngine::outOfOpen() {
if (_openedOb == 255)
- return; // cannot use opened object
+ return; // cannot use opened object
ObjectRef objectId = findOpenPos();
@@ -892,13 +905,10 @@ void DreamWebEngine::outOfOpen() {
}
if (_mouseButton == _oldButton)
- return; // notletgo4
+ return; // notletgo4
- if (_mouseButton != 1) {
- if (_mouseButton == 2)
- reExFromOpen();
+ if (_mouseButton != 1)
return;
- }
delPointer();
_pickUp = 1;
@@ -1102,4 +1112,136 @@ void DreamWebEngine::pickupConts(uint8 from, uint8 containerEx) {
}
}
+void DreamWebEngine::incRyanPage() {
+ commandOnlyCond(31, 222);
+
+ if (_mouseButton == _oldButton || !(_mouseButton & 1))
+ return;
+
+ _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
+
+ delPointer();
+ fillRyan();
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
+void DreamWebEngine::emergencyPurge() {
+ debug(2, "Ex memory: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen);
+
+ while (_vars._exFramePos + 4000 >= kExframeslen ||
+ _vars._exTextPos + 400 >= kExtextlen)
+ {
+ purgeAnItem();
+ debug(2, "Ex memory after purging: frames %d/%d, text %d/%d", _vars._exFramePos, kExframeslen, _vars._exTextPos, kExtextlen);
+ }
+}
+
+void DreamWebEngine::purgeAnItem() {
+ const DynObject *extraObjects = _exData;
+
+
+ for (uint i = 0; i < kNumexobjects; ++i) {
+ if (extraObjects[i].mapad[0] == 0 &&
+ (extraObjects[i].objId[0] == 255 || extraObjects[i].objId[0] == 2) &&
+ extraObjects[i].initialLocation != _realLocation) {
+ debug(1, "Purging ex object %d", i);
+ deleteExObject(i);
+ return;
+ }
+ }
+
+ for (uint i = 0; i < kNumexobjects; ++i) {
+ if (extraObjects[i].mapad[0] == 0 && extraObjects[i].objId[0] == 255) {
+ debug(1, "Purging ex object %d", i);
+ deleteExObject(i);
+ return;
+ }
+ }
+
+ error("Out of Ex object memory");
+}
+
+void DreamWebEngine::dropError() {
+ _commandType = 255;
+ delPointer();
+ printMessage(76, 21, 56, 240, 240 & 1);
+ workToScreenM();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ _commandType = 255;
+ workToScreenM();
+}
+
+void DreamWebEngine::cantDrop() {
+ _commandType = 255;
+ delPointer();
+ printMessage(76, 21, 24, 240, 240 & 1);
+ workToScreenM();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ _commandType = 255;
+ workToScreenM();
+}
+
+void DreamWebEngine::examineInventory() {
+ commandOnlyCond(32, 249);
+
+ if (!(_mouseButton & 1))
+ return;
+
+ createPanel();
+ showPanel();
+ showMan();
+ showExit();
+ examIcon();
+ _pickUp = 0;
+ _invOpen = 2;
+ openInv();
+ workToScreenM();
+}
+
+void DreamWebEngine::openInv() {
+ _invOpen = 1;
+ printMessage(80, 58 - 10, 61, 240, (240 & 1));
+ fillRyan();
+ _commandType = 255;
+}
+
+void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
+ _lastInvPos = pos;
+ _objectType = kFreeObjectType;
+ _itemFrame = command;
+ _command = command;
+ //uint8 dummy;
+ //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here
+ transferToEx(command);
+}
+
+void DreamWebEngine::initialInv() {
+ if (_realLocation != 24)
+ return;
+
+ pickupOb(11, 5);
+ pickupOb(12, 6);
+ pickupOb(13, 7);
+ pickupOb(14, 8);
+ pickupOb(18, 0);
+ pickupOb(19, 1);
+ pickupOb(20, 9);
+ pickupOb(16, 2);
+ _vars._watchMode = 1;
+ _vars._reelToHold = 0;
+ _vars._endOfHoldReel = 6;
+ _vars._watchSpeed = 1;
+ _vars._speedCount = 1;
+ switchRyanOff();
+}
+
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp
index c39070532c..64cffde4de 100644
--- a/engines/dreamweb/pathfind.cpp
+++ b/engines/dreamweb/pathfind.cpp
@@ -110,7 +110,7 @@ void DreamWebEngine::checkDest(const RoomPaths *roomsPaths) {
const PathSegment *segments = roomsPaths->segments;
const uint8 tmp = _mansPath << 4;
uint8 destination = _destination;
- for (size_t i = 0; i < 24; ++i) {
+ for (uint i = 0; i < 24; ++i) {
if ((segments[i].b0 & 0xf0) == tmp &&
(segments[i].b0 & 0x0f) == _destination) {
_destination = segments[i].b1 & 0x0f;
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index dbb81406cd..53f04d482b 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -194,7 +194,7 @@ void DreamWebEngine::madman(ReelRoutine &routine) {
if (newReelPointer == 66) {
++_vars._combatCount;
- if (_lastHardKey == 1) // ESC pressed, skip the mad man's speech
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) // ESC pressed, skip the mad man's speech
_vars._combatCount = _speechCount = (hasSpeech() ? 65 : 63);
madmanText();
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index 64b9849980..bc75b97e71 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -49,7 +49,9 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri
return 0;
}
firstChar = modifyChar(firstChar);
- if (firstChar != 255) {
+ // WORKAROUND: Also filter out invalid characters here (refer to the
+ // workaround in printChar() below for more info).
+ if (firstChar >= 32 && firstChar != 255) {
uint8 secondChar = *string;
uint8 width = charSet._frames[firstChar - 32 + _charShift].width;
width = kernChars(firstChar, secondChar, width);
@@ -59,9 +61,13 @@ uint8 DreamWebEngine::getNextWord(const GraphicsFile &charSet, const uint8 *stri
}
void DreamWebEngine::printChar(const GraphicsFile &charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {
- if (c == 255)
+ // WORKAROUND: Some texts contain leftover tab characters, which will cause
+ // OOB memory access when showing a character, as all the printable ones are
+ // from 32 onwards. We compensate for that here by ignoring all the invalid
+ // characters (0 - 31).
+ if (c < 32 || c == 255)
return;
-
+
uint8 dummyWidth, dummyHeight;
if (width == NULL)
width = &dummyWidth;
@@ -315,7 +321,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
waitForVSync();
multiDump(25, 20, 160, 160);
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return;
}
@@ -325,7 +331,7 @@ void DreamWebEngine::rollEndCreditsGameLost() {
c = *string++;
} while (c != ':' && c != 0);
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return;
}
diff --git a/engines/dreamweb/rain.cpp b/engines/dreamweb/rain.cpp
index 8e42e0c161..b636b7def7 100644
--- a/engines/dreamweb/rain.cpp
+++ b/engines/dreamweb/rain.cpp
@@ -42,12 +42,12 @@ void DreamWebEngine::showRain() {
uint16 offset = (rain.w3 - rain.b5) & 511;
rain.w3 = offset;
const uint8 *src = frameData + offset;
- uint8 *dst = workspace() + y * 320 + x;
+ uint8 *dst = workspace() + y * kScreenwidth + x;
for (uint16 j = 0; j < size; ++j) {
uint8 v = src[j];
if (v != 0)
*dst = v;
- dst += 320-1; // advance diagonally
+ dst += kScreenwidth-1; // advance diagonally
}
}
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index ea9cdc0249..8a0791d19b 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -156,8 +156,16 @@ void DreamWebEngine::doLoad(int savegameId) {
} else {
if (savegameId == -1) {
- // Open dialog to get savegameId
+ // Wait till both mouse buttons are up. We should wait till the user
+ // releases the mouse button, otherwise the follow-up mouseup event
+ // will trigger a load of the save slot under the mouse cursor. Fixes
+ // bug #3582582.
+ while (_oldMouseState > 0) {
+ readMouse();
+ g_system->delayMillis(10);
+ }
+ // Open dialog to get savegameId
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
savegameId = dialog->runModalWithCurrentTarget();
delete dialog;
@@ -241,6 +249,15 @@ void DreamWebEngine::saveGame() {
}
return;
} else {
+ // Wait till both mouse buttons are up. We should wait till the user
+ // releases the mouse button, otherwise the follow-up mouseup event
+ // will trigger a save into the save slot under the mouse cursor. Fixes
+ // bug #3582582.
+ while (_oldMouseState > 0) {
+ readMouse();
+ g_system->delayMillis(10);
+ }
+
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
int savegameId = dialog->runModalWithCurrentTarget();
Common::String game_description = dialog->getResultString();
@@ -557,6 +574,14 @@ void DreamWebEngine::savePosition(unsigned int slot, const char *descbuf) {
delete outSaveFile;
}
+
+// Utility struct for a savegame sanity check in loadPosition
+struct FrameExtent {
+ uint16 start;
+ uint16 length;
+ bool operator<(const struct FrameExtent& other) const { return start<other.start; }
+};
+
void DreamWebEngine::loadPosition(unsigned int slot) {
_timeCount = 0;
clearChanges();
@@ -636,6 +661,42 @@ void DreamWebEngine::loadPosition(unsigned int slot) {
}
delete inSaveFile;
+
+
+ // Do a sanity check on exFrames data to detect exFrames corruption
+ // caused by a (now fixed) bug in emergencyPurge. See bug #3591088.
+ // Gather the location of frame data of all used ex object frames.
+ Common::List<FrameExtent> flist;
+ for (unsigned int i = 0; i < kNumexobjects; ++i) {
+ if (_exData[i].mapad[0] != 0xff) {
+ FrameExtent fe;
+ Frame *frame = &_exFrames._frames[3*i+0];
+ fe.start = frame->ptr();
+ fe.length = frame->width * frame->height;
+ flist.push_back(fe);
+
+ frame = &_exFrames._frames[3*i+1];
+ fe.start = frame->ptr();
+ fe.length = frame->width * frame->height;
+ flist.push_back(fe);
+ }
+ }
+ // ...and check if the frames overlap.
+ Common::sort(flist.begin(), flist.end(), Common::Less<FrameExtent>());
+ Common::List<FrameExtent>::const_iterator iter;
+ uint16 curEnd = 0;
+ for (iter = flist.begin(); iter != flist.end(); ++iter) {
+ if (iter->start < curEnd)
+ error("exFrames data corruption in savegame");
+ curEnd = iter->start + iter->length;
+ }
+ if (curEnd > _vars._exFramePos) {
+ if (curEnd > kExframeslen)
+ error("exFrames data corruption in savegame");
+ warning("Fixing up exFramePos");
+ _vars._exFramePos = curEnd;
+ }
+ // (end of sanity check)
}
// Count number of save files, and load their descriptions into _saveNames
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 01570c907a..1fa2e7d6a4 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -26,7 +26,7 @@
namespace DreamWeb {
void DreamWebEngine::printSprites() {
- for (size_t priority = 0; priority < 7; ++priority) {
+ for (uint priority = 0; priority < 7; ++priority) {
Common::List<Sprite>::const_iterator i;
for (i = _spriteTable.begin(); i != _spriteTable.end(); ++i) {
const Sprite &sprite = *i;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index f235f7c2fd..057a0c847a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -26,10 +26,6 @@
namespace DreamWeb {
-// Keyboard buffer. _bufferIn and _bufferOut are indexes
-// into this, making it a ring buffer
-uint8 g_keyBuffer[16];
-
const Room g_roomData[] = {
// location 0
{ "DREAMWEB.R00", // Ryan's apartment
@@ -723,7 +719,6 @@ void DreamWebEngine::dreamweb() {
showGun();
fadeScreenDown();
hangOn(100);
-
}
}
@@ -965,7 +960,6 @@ void DreamWebEngine::useTimedText() {
}
void DreamWebEngine::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {
-
if (hasSpeech() && voiceIndex != 0) {
_speechLoaded = _sound->loadSpeech('T', voiceIndex, 'T', textIndex);
if (_speechLoaded)
@@ -1056,7 +1050,7 @@ void DreamWebEngine::lockMon() {
// key because calling readkey() drains characters from the input
// buffer, we we want the user to be able to type ahead while the text
// is being printed.
- if (_lastHardKey == 57) {
+ if (_lastHardKey == Common::KEYCODE_SPACE) {
// Clear the keyboard buffer. Otherwise the space that caused
// the pause will be read immediately unpause the game.
do {
@@ -1072,7 +1066,7 @@ void DreamWebEngine::lockMon() {
}
// Forget the last "hard" key, otherwise the space that caused
// the unpausing will immediately re-pause the game.
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
lockLightOff();
}
}
@@ -1148,7 +1142,7 @@ void DreamWebEngine::plotReel(uint16 &reelPointer) {
reel += 8;
}
- for (size_t i = 0; i < 8; ++i) {
+ for (uint i = 0; i < 8; ++i) {
if (reel->frame() != 0xffff)
showReelFrame(reel);
++reel;
@@ -1247,7 +1241,7 @@ const uint8 *DreamWebEngine::findObName(uint8 type, uint8 index) {
void DreamWebEngine::copyName(uint8 type, uint8 index, uint8 *dst) {
const uint8 *src = findObName(type, index);
- size_t i;
+ uint i;
for (i = 0; i < 28; ++i) {
char c = src[i];
if (c == ':')
@@ -1265,6 +1259,10 @@ void DreamWebEngine::commandWithOb(uint8 command, uint8 type, uint8 index) {
uint8 textLen = _textLen;
const uint8 *string = (const uint8 *)_commandText.getString(command);
+ // Fix spelling in command 3 FR: "Aller ver" => "Aller vers"
+ const char *command3Fr = "Aller vers";
+ if (command == 3 && getLanguage() == Common::FR_FRA)
+ string = (const uint8 *)command3Fr;
printDirect(string, _textAddressX, _textAddressY, textLen, (bool)(textLen & 1));
copyName(type, index, commandLine);
@@ -1377,7 +1375,7 @@ void DreamWebEngine::doChange(uint8 index, uint8 value, uint8 type) {
}
void DreamWebEngine::deleteTaken() {
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
uint8 location = _exData[i].initialLocation;
if (location == _realLocation) {
uint8 index = _exData[i].index;
@@ -1388,7 +1386,7 @@ void DreamWebEngine::deleteTaken() {
uint8 DreamWebEngine::getExPos() {
DynObject *objects = _exData;
- for (size_t i = 0; i < kNumexobjects; ++i) {
+ for (uint i = 0; i < kNumexobjects; ++i) {
if (objects[i].mapad[0] == 0xff)
return i;
}
@@ -1543,7 +1541,7 @@ void DreamWebEngine::printMessage2(uint16 x, uint16 y, uint8 index, uint8 maxWid
bool DreamWebEngine::objectMatches(void *object, const char *id) {
const char *objId = (const char *)object + 12; // whether it is a DynObject or a SetObject
- for (size_t i = 0; i < 4; ++i) {
+ for (uint i = 0; i < 4; ++i) {
if (id[i] != objId[i] + 'A')
return false;
}
@@ -2138,7 +2136,6 @@ void DreamWebEngine::workToScreenM() {
}
void DreamWebEngine::atmospheres() {
-
const Atmosphere *a = &g_atmosphereList[0];
for (; a->_location != 255; ++a) {
@@ -2208,8 +2205,8 @@ void DreamWebEngine::readKey() {
return;
}
- bufOut = (bufOut + 1) & 15; // The buffer has size 16
- _currentKey = g_keyBuffer[bufOut];
+ bufOut = (bufOut + 1) % ARRAYSIZE(_keyBuffer);
+ _currentKey = _keyBuffer[bufOut];
_bufferOut = bufOut;
}
@@ -2220,36 +2217,6 @@ void DreamWebEngine::newGame() {
_getBack = 3;
}
-void DreamWebEngine::pickupOb(uint8 command, uint8 pos) {
- _lastInvPos = pos;
- _objectType = kFreeObjectType;
- _itemFrame = command;
- _command = command;
- //uint8 dummy;
- //getAnyAd(&dummy, &dummy); // was in the original source, seems useless here
- transferToEx(command);
-}
-
-void DreamWebEngine::initialInv() {
- if (_realLocation != 24)
- return;
-
- pickupOb(11, 5);
- pickupOb(12, 6);
- pickupOb(13, 7);
- pickupOb(14, 8);
- pickupOb(18, 0);
- pickupOb(19, 1);
- pickupOb(20, 9);
- pickupOb(16, 2);
- _vars._watchMode = 1;
- _vars._reelToHold = 0;
- _vars._endOfHoldReel = 6;
- _vars._watchSpeed = 1;
- _vars._speedCount = 1;
- switchRyanOff();
-}
-
void DreamWebEngine::walkIntoRoom() {
if (_vars._location == 14 && _mapX == 22) {
_destination = 1;
@@ -2314,13 +2281,6 @@ void DreamWebEngine::makeMainScreen() {
_manIsOffScreen = 0;
}
-void DreamWebEngine::openInv() {
- _invOpen = 1;
- printMessage(80, 58 - 10, 61, 240, (240 & 1));
- fillRyan();
- _commandType = 255;
-}
-
void DreamWebEngine::obsThatDoThings() {
if (!compare(_command, _objectType, "MEMB"))
return; // notlouiscard
@@ -2420,10 +2380,6 @@ void DreamWebEngine::errorMessage3() {
delPointer();
}
-void DreamWebEngine::reExFromOpen() {
-
-}
-
void DreamWebEngine::putBackObStuff() {
createPanel();
showPanel();
@@ -2444,26 +2400,6 @@ bool DreamWebEngine::isSetObOnMap(uint8 index) {
return (getSetAd(index)->mapad[0] == 0);
}
-void DreamWebEngine::examineInventory() {
- commandOnlyCond(32, 249);
-
- if (!(_mouseButton & 1))
- return;
-
- createPanel();
- showPanel();
- showMan();
- showExit();
- examIcon();
- _pickUp = 0;
- _invOpen = 2;
- openInv();
- workToScreenM();
-}
-
-void DreamWebEngine::middlePanel() {
-}
-
void DreamWebEngine::underTextLine() {
if (_foreignRelease)
multiGet(_textUnder, _textAddressX, _textAddressY - 3, kUnderTextSizeX_f, kUnderTextSizeY_f);
@@ -2575,7 +2511,6 @@ void DreamWebEngine::madmanRun() {
_vars._lastWeapon = 8;
}
-
void DreamWebEngine::decide() {
setMode();
loadPalFromIFF();
@@ -2659,39 +2594,12 @@ void DreamWebEngine::showGun() {
getRidOfTempText();
}
-void DreamWebEngine::dropError() {
- _commandType = 255;
- delPointer();
- printMessage(76, 21, 56, 240, 240 & 1);
- workToScreenM();
- hangOnP(50);
- showPanel();
- showMan();
- examIcon();
- _commandType = 255;
- workToScreenM();
-}
-
-void DreamWebEngine::cantDrop() {
- _commandType = 255;
- delPointer();
- printMessage(76, 21, 24, 240, 240 & 1);
- workToScreenM();
- hangOnP(50);
- showPanel();
- showMan();
- examIcon();
- _commandType = 255;
- workToScreenM();
-}
-
void DreamWebEngine::getBack1() {
if (_pickUp != 0) {
blank();
return;
}
-
commandOnlyCond(26, 202);
if (_mouseButton == _oldButton)
@@ -3003,52 +2911,4 @@ void DreamWebEngine::edensFlatReminders() {
_vars._progressPoints++; // got card
}
-void DreamWebEngine::incRyanPage() {
- commandOnlyCond(31, 222);
-
- if (_mouseButton == _oldButton || !(_mouseButton & 1))
- return;
-
- _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18;
-
- delPointer();
- fillRyan();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
-
-}
-
-void DreamWebEngine::emergencyPurge() {
- while (true) {
- if (_vars._exFramePos + 4000 < kExframeslen) {
- // Not near frame end
- if (_vars._exTextPos + 400 < kExtextlen)
- return; // notneartextend
- }
-
- purgeAnItem();
- }
-}
-
-void DreamWebEngine::purgeAnItem() {
- const DynObject *extraObjects = _exData;
-
- for (size_t i = 0; i < kNumexobjects; ++i) {
- if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255 &&
- extraObjects[i].initialLocation != _realLocation) {
- deleteExObject(i);
- return;
- }
- }
-
- for (size_t i = 0; i < kNumexobjects; ++i) {
- if (extraObjects[i].mapad[0] && extraObjects[i].objId[0] == 255) {
- deleteExObject(i);
- return;
- }
- }
-}
-
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp
index f005279ba0..4e4faa75a0 100644
--- a/engines/dreamweb/titles.cpp
+++ b/engines/dreamweb/titles.cpp
@@ -105,34 +105,34 @@ void DreamWebEngine::bibleQuote() {
fadeScreenUps();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
hangOne(560);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
fadeScreenDowns();
hangOne(200);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "biblequotearly"
}
_sound->cancelCh0();
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
void DreamWebEngine::hangOne(uint16 delay) {
do {
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
return; // "hangonearly"
} while (--delay);
}
@@ -150,8 +150,8 @@ void DreamWebEngine::intro() {
fadeScreenUps();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -160,8 +160,8 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -170,8 +170,8 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
@@ -181,15 +181,15 @@ void DreamWebEngine::intro() {
loadIntroRoom();
runIntroSeq();
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "introearly"
}
getRidOfTempText();
clearBeforeLoad();
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
void DreamWebEngine::runIntroSeq() {
@@ -198,13 +198,13 @@ void DreamWebEngine::runIntroSeq() {
do {
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
spriteUpdate();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
delEverything();
@@ -214,20 +214,20 @@ void DreamWebEngine::runIntroSeq() {
useTimedText();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
dumpMap();
dumpTimedText();
waitForVSync();
- if (_lastHardKey == 1)
+ if (_lastHardKey == Common::KEYCODE_ESCAPE)
break;
} while (_getBack != 1);
- if (_lastHardKey == 1) {
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
getRidOfTempText();
clearBeforeLoad();
}
@@ -266,7 +266,7 @@ void DreamWebEngine::loadIntroRoom() {
_mapOffsetY = 16;
clearSprites();
_vars._throughDoor = 0;
- _currentKey = '0';
+ _currentKey = 0;
_mainMode = 0;
clearWork();
_vars._newObs = 1;
@@ -293,24 +293,24 @@ void DreamWebEngine::realCredits() {
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -318,24 +318,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -343,24 +343,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -368,24 +368,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -393,24 +393,24 @@ void DreamWebEngine::realCredits() {
_sound->playChannel0(12, 0);
hangOne(2);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
allPalette();
hangOne(80);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
@@ -418,23 +418,23 @@ void DreamWebEngine::realCredits() {
fadeScreenUps();
hangOne(60);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
_sound->playChannel0(13, 0);
hangOne(350);
- if (_lastHardKey == 1) {
- _lastHardKey = 0;
+ if (_lastHardKey == Common::KEYCODE_ESCAPE) {
+ _lastHardKey = Common::KEYCODE_INVALID;
return; // "realcreditsearly"
}
fadeScreenDowns();
hangOne(256);
- _lastHardKey = 0;
+ _lastHardKey = Common::KEYCODE_INVALID;
}
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 995eef04cd..476f847c40 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -131,7 +131,7 @@ void DreamWebEngine::useRoutine() {
uint8 dummy;
void *obj = getAnyAd(&dummy, &dummy);
- for (size_t i = 0; i < sizeof(kUseList)/sizeof(UseListEntry); ++i) {
+ for (uint i = 0; i < ARRAYSIZE(kUseList); ++i) {
const UseListEntry &entry = kUseList[i];
if (objectMatches(obj, entry.id)) {
(this->*entry.callback)();
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index c8f05641b5..d1e2480f70 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -56,8 +56,8 @@ void DreamWebEngine::fadeDOS() {
//processEvents will be called from waitForVSync
uint8 *dst = _startPal;
getPalette(dst, 0, 64);
- for (int fade = 0; fade < 64; ++fade) {
- for (int c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors
+ for (uint fade = 0; fade < 64; ++fade) {
+ for (uint c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors
if (dst[c]) {
--dst[c];
}
@@ -88,7 +88,7 @@ void DreamWebEngine::fadeCalculation() {
uint8 *startPal = _startPal;
const uint8 *endPal = _endPal;
- for (size_t i = 0; i < 256 * 3; ++i) {
+ for (uint i = 0; i < 256 * 3; ++i) {
uint8 s = startPal[i];
uint8 e = endPal[i];
if (s == e)
@@ -212,7 +212,7 @@ void DreamWebEngine::fadeScreenDownHalf() {
const uint8 *startPal = _startPal;
uint8 *endPal = _endPal;
- for (int i = 0; i < 256 * 3; ++i) {
+ for (uint i = 0; i < 256 * 3; ++i) {
*endPal >>= 1;
endPal++;
}
@@ -239,7 +239,7 @@ void DreamWebEngine::greyscaleSum() {
byte *src = _mainPal;
byte *dst = _endPal;
- for (int i = 0; i < 256; ++i) {
+ for (uint i = 0; i < 256; ++i) {
const unsigned int r = 20 * *src++;
const unsigned int g = 59 * *src++;
const unsigned int b = 11 * *src++;
diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp
index d2390fb1fd..d8984d312b 100644
--- a/engines/dreamweb/vgagrafx.cpp
+++ b/engines/dreamweb/vgagrafx.cpp
@@ -31,14 +31,16 @@ const uint16 kZoomx = 8;
const uint16 kZoomy = 132;
void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {
- assert(x < 320);
- assert(y < 200);
+ assert(x < kScreenwidth);
+ assert(y < kScreenheight);
+
const uint8 *src = workspace() + x + y * kScreenwidth;
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
- //debug(1, "multiGet %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es);
+
+ if (y + h > kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > kScreenwidth)
+ w = kScreenwidth - x;
+
for (unsigned l = 0; l < h; ++l) {
const uint8 *src_p = src + kScreenwidth * l;
uint8 *dst_p = dst + w * l;
@@ -47,14 +49,16 @@ void DreamWebEngine::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h)
}
void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) {
- assert(x < 320);
- assert(y < 200);
+ assert(x < kScreenwidth);
+ assert(y < kScreenheight);
+
uint8 *dst = workspace() + x + y * kScreenwidth;
- if (y + h > 200)
- h = 200 - y;
- if (x + w > 320)
- w = 320 - x;
- //debug(1, "multiPut %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es);
+
+ if (y + h > kScreenheight)
+ h = kScreenheight - y;
+ if (x + w > kScreenwidth)
+ w = kScreenwidth - x;
+
for (unsigned l = 0; l < h; ++l) {
const uint8 *src_p = src + w * l;
uint8 *dst_p = dst + kScreenwidth * l;
@@ -64,12 +68,11 @@ void DreamWebEngine::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uin
void DreamWebEngine::multiDump(uint16 x, uint16 y, uint8 width, uint8 height) {
unsigned offset = x + y * kScreenwidth;
- //debug(1, "multiDump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset);
blit(workspace() + offset, kScreenwidth, x, y, width, height);
}
void DreamWebEngine::workToScreen() {
- blit(workspace(), 320, 0, 0, 320, 200);
+ blit(workspace(), kScreenwidth, 0, 0, kScreenwidth, kScreenheight);
}
void DreamWebEngine::frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
@@ -147,7 +150,7 @@ void DreamWebEngine::doShake() {
void DreamWebEngine::setMode() {
waitForVSync();
- initGraphics(320, 200, false);
+ initGraphics(kScreenwidth, kScreenheight, false);
}
void DreamWebEngine::showPCX(const Common::String &suffix) {
@@ -185,7 +188,7 @@ void DreamWebEngine::showPCX(const Common::String &suffix) {
void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) {
// NB : These resilience checks were not in the original engine, but did they result in undefined behaviour
// or was something broken during porting to C++?
- assert(pitch == 320);
+ assert(pitch == kScreenwidth);
if (x < 0) {
assert(width >= -x);
@@ -199,15 +202,16 @@ void DreamWebEngine::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint1
src += (-y) * width;
y = 0;
}
- if (x >= 320)
+
+ if ((uint16)x >= kScreenwidth)
return;
- if (y >= 200)
+ if ((uint16)y >= kScreenheight)
return;
- if (x + width > 320) {
- width = 320 - x;
+ if ((uint16)x + width > kScreenwidth) {
+ width = kScreenwidth - x;
}
- if (y + height > 200) {
- height = 200 - y;
+ if ((uint16)y + height > kScreenheight) {
+ height = kScreenheight - y;
}
uint16 stride = pitch - width;
@@ -246,20 +250,20 @@ void DreamWebEngine::showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, ui
//addToPrintList(x - _mapAdX, y - _mapAdY); // NB: Commented in the original asm
}
if (effectsFlag & 4) { // flippedX
- frameOutFx(workspace(), pSrc, 320, width, height, x, y);
+ frameOutFx(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
if (effectsFlag & 2) { // noMask
- frameOutNm(workspace(), pSrc, 320, width, height, x, y);
+ frameOutNm(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
if (effectsFlag & 32) {
- frameOutBh(workspace(), pSrc, 320, width, height, x, y);
+ frameOutBh(workspace(), pSrc, kScreenwidth, width, height, x, y);
return;
}
}
// "noEffects"
- frameOutV(workspace(), pSrc, 320, width, height, x, y);
+ frameOutV(workspace(), pSrc, kScreenwidth, width, height, x, y);
}
void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {
@@ -285,7 +289,7 @@ void DreamWebEngine::showFrame(const GraphicsFile &frameData, uint16 x, uint16 y
}
void DreamWebEngine::clearWork() {
- memset(workspace(), 0, 320*200);
+ memset(workspace(), 0, kScreenwidth*kScreenheight);
}
void DreamWebEngine::dumpZoom() {
@@ -326,20 +330,20 @@ void DreamWebEngine::zoom() {
putUnderZoom();
return;
}
- uint16 srcOffset = (_oldPointerY - 9) * 320 + (_oldPointerX - 11);
- uint16 dstOffset = (kZoomy + 4) * 320 + (kZoomx + 5);
+ uint16 srcOffset = (_oldPointerY - 9) * kScreenwidth + (_oldPointerX - 11);
+ uint16 dstOffset = (kZoomy + 4) * kScreenwidth + (kZoomx + 5);
const uint8 *src = workspace() + srcOffset;
uint8 *dst = workspace() + dstOffset;
- for (size_t i = 0; i < 20; ++i) {
- for (size_t j = 0; j < 23; ++j) {
+ for (uint i = 0; i < 20; ++i) {
+ for (uint j = 0; j < 23; ++j) {
uint8 v = src[j];
dst[2*j+0] = v;
dst[2*j+1] = v;
- dst[2*j+320] = v;
- dst[2*j+321] = v;
+ dst[2*j+kScreenwidth] = v;
+ dst[2*j+kScreenwidth+1] = v;
}
- src += 320;
- dst += 320*2;
+ src += kScreenwidth;
+ dst += kScreenwidth*2;
}
crosshair();
_didZoom = 1;
@@ -375,7 +379,7 @@ void DreamWebEngine::loadPalFromIFF() {
const uint8 *src = buf + 0x30;
uint8 *dst = _mainPal;
- for (size_t i = 0; i < 256*3; ++i) {
+ for (uint i = 0; i < 256*3; ++i) {
uint8 c = src[i] / 4;
if (_brightPalette) {
if (c) {
diff --git a/engines/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 9c83433a73..f58dba0d6d 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
@@ -125,6 +130,11 @@ DEFINES += -DENABLE_RIVEN
endif
endif
+ifdef ENABLE_NEVERHOOD
+DEFINES += -DENABLE_NEVERHOOD=$(ENABLE_NEVERHOOD)
+MODULES += engines/neverhood
+endif
+
ifdef ENABLE_MORTEVIELLE
DEFINES += -DENABLE_MORTEVIELLE=$(ENABLE_MORTEVIELLE)
MODULES += engines/mortevielle
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_adi2.h b/engines/gob/detection/tables_adi2.h
index da05a31f40..e59552a554 100644
--- a/engines/gob/detection/tables_adi2.h
+++ b/engines/gob/detection/tables_adi2.h
@@ -33,7 +33,7 @@
"Adi 2.0 for Teachers",
AD_ENTRY1s("adi2.stk", "da6f1fb68bff32260c5eecdf9286a2f5", 1533168),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -47,7 +47,7 @@
"Adi 2",
AD_ENTRY1s("adi2.stk", "23f279615c736dc38320f1348e70c36e", 10817668),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -61,7 +61,7 @@
"Adi 2",
AD_ENTRY1s("adi2.stk", "d4162c4298f9423ecc1fb04965557e90", 11531214),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -75,7 +75,7 @@
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "fcac60e6627f37aee219575b60859de9", 16944268),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -89,7 +89,7 @@
"Adi 2.5",
AD_ENTRY1s("adi2.stk", "072d5e2d7826a7c055865568ebf918bb", 16934596),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -103,7 +103,7 @@
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "2fb940eb8105b12871f6b88c8c4d1615", 16780058),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -120,7 +120,7 @@
"Adi 2.6",
AD_ENTRY1s("adi2.stk", "fde7d98a67dbf859423b6473796e932a", 18044780),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -134,7 +134,7 @@
"Adi 2.7.1",
AD_ENTRY1s("adi2.stk", "6fa5dffebf5c7243c6af6b8c188ee00a", 19278008),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -151,7 +151,7 @@
"Adi 2",
AD_ENTRY1s("adi2.stk", "2a40bb48ccbd4e6fb3f7f0fc2f069d80", 17720132),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -191,7 +191,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_adi4.h b/engines/gob/detection/tables_adi4.h
index 4b967d76d3..7147a84d7a 100644
--- a/engines/gob/detection/tables_adi4.h
+++ b/engines/gob/detection/tables_adi4.h
@@ -33,7 +33,7 @@
"Adi 4.0",
AD_ENTRY1s("intro.stk", "a3c35d19b2d28ea261d96321d208cb5a", 6021466),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -47,7 +47,7 @@
"Adi 4.0",
AD_ENTRY1s("intro.stk", "44491d85648810bc6fcf84f9b3aa47d5", 5834944),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -61,7 +61,7 @@
"Adi 4.0",
AD_ENTRY1s("intro.stk", "29374c0e3c10b17dd8463b06a55ad093", 6012072),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -75,7 +75,7 @@
"Adi 4.0 Limited Edition",
AD_ENTRY1s("intro.stk", "ebbbc5e28a4adb695535ed989c1b8d66", 5929644),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -89,7 +89,7 @@
"ADI 4.10",
AD_ENTRY1s("intro.stk", "6afc2590856433b9f5295b032f2b205d", 5923112),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -103,7 +103,7 @@
"ADI 4.11",
AD_ENTRY1s("intro.stk", "6296e4be4e0c270c24d1330881900c7f", 5921234),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -117,7 +117,7 @@
"ADI 4.21",
AD_ENTRY1s("intro.stk", "c5b9f6222c0b463f51dab47317c5b687", 5950490),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -134,7 +134,7 @@
"Addy 4 Grundschule Basis CD",
AD_ENTRY1s("intro.stk", "d2f0fb8909e396328dc85c0e29131ba8", 5847588),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -148,7 +148,7 @@
"Addy 4 Sekundarstufe Basis CD",
AD_ENTRY1s("intro.stk", "367340e59c461b4fa36651cd74e32c4e", 5847378),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -162,7 +162,7 @@
"Addy 4.21",
AD_ENTRY1s("intro.stk", "534f0b674cd4830df94a9c32c4ea7225", 6878034),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -179,7 +179,7 @@
"ADI 4.10",
AD_ENTRY1s("intro.stk", "3e3fa9656e37d802027635ace88c4cc5", 5359144),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -196,7 +196,7 @@
"Adi 4.0 Interactive Demo",
AD_ENTRY1s("intro.stk", "89ace204dbaac001425c73f394334f6f", 2413102),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -210,7 +210,7 @@
"Adi 4.0 / Adibou 2 Demo",
AD_ENTRY1s("intro.stk", "d41d8cd98f00b204e9800998ecf8427e", 0),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_adibou.h b/engines/gob/detection/tables_adibou.h
index 0e652839bb..e257ffdf8f 100644
--- a/engines/gob/detection/tables_adibou.h
+++ b/engines/gob/detection/tables_adibou.h
@@ -33,7 +33,7 @@
"ADIBOU 1 Environnement 4-7 ans",
AD_ENTRY1s("intro.stk", "6db110188fcb7c5208d9721b5282682a", 4805104),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"ADIBOU 2",
AD_ENTRY1s("intro.stk", "94ae7004348dc8bf99c23a9a6ef81827", 956162),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -61,7 +61,7 @@
"Le Jardin Magique d'Adibou",
AD_ENTRY1s("intro.stk", "a8ff86f3cc40dfe5898e0a741217ef27", 956328),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -75,7 +75,7 @@
"ADIBOU Version Decouverte",
AD_ENTRY1s("intro.stk", "558c14327b79ed39214b49d567a75e33", 8737856),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -89,7 +89,7 @@
"ADIBOU 2.10 Environnement",
AD_ENTRY1s("intro.stk", "f2b797819aeedee557e904b0b5ccd82e", 8736454),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -103,7 +103,7 @@
"ADIBOU 2.11 Environnement",
AD_ENTRY1s("intro.stk", "7b1f1f6f6477f54401e95d913f75e333", 8736904),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -117,7 +117,7 @@
"ADIBOU 2.12 Environnement",
AD_ENTRY1s("intro.stk", "1e49c39a4a3ce6032a84b712539c2d63", 8738134),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -131,7 +131,7 @@
"ADIBOU 2.13s Environnement",
AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -145,7 +145,7 @@
"ADIBOO 2.14 Environnement",
AD_ENTRY1s("intro.stk", "ff63637e3cb7f0a457edf79457b1c6b3", 9333874),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -162,7 +162,7 @@
"ADIBOU 2",
AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -178,7 +178,7 @@
"ADIB\xD9 2",
AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -199,7 +199,7 @@
{0, 0, 0, 0}
},
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -217,7 +217,7 @@
{0, 0, 0, 0}
},
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -235,7 +235,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_ajworld.h b/engines/gob/detection/tables_ajworld.h
index d86bdb16be..99d61c882e 100644
--- a/engines/gob/detection/tables_ajworld.h
+++ b/engines/gob/detection/tables_ajworld.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "e453bea7b28a67c930764d945f64d898", 3913628),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_bargon.h b/engines/gob/detection/tables_bargon.h
index ac90355476..5f7fa2ab6f 100644
--- a/engines/gob/detection/tables_bargon.h
+++ b/engines/gob/detection/tables_bargon.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1("intro.stk", "da3c54be18ab73fbdb32db24624a9c23"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "11103b304286c23945560b391fd37e7d", 3181890),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "00f6b4e2ee26e5c40b488e2df5adcf03", 3975580),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"Fanmade",
AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_dynasty.h b/engines/gob/detection/tables_dynasty.h
index 147bf32075..21e4ecc89f 100644
--- a/engines/gob/detection/tables_dynasty.h
+++ b/engines/gob/detection/tables_dynasty.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "6190e32404b672f4bbbc39cf76f41fda", 2511470),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "b3f8472484b7a1df94557b51e7b6fca0", 2322644),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1s("intro.stk", "bdbdac8919200a5e71ffb9fb0709f704", 2446652),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -106,7 +106,7 @@
"Demo",
AD_ENTRY1s("intro.stk", "464538a17ed39755d7f1ba9c751af1bd", 1847864),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h
index 05f579c08c..69a9e4fd6b 100644
--- a/engines/gob/detection/tables_fallback.h
+++ b/engines/gob/detection/tables_fallback.h
@@ -32,7 +32,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -46,7 +46,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -60,7 +60,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -88,7 +88,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -102,7 +102,7 @@ static const GOBGameDescription fallbackDescs[] = {
"",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -116,7 +116,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -130,7 +130,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -144,7 +144,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -158,7 +158,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -186,7 +186,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -200,7 +200,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -214,7 +214,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -228,7 +228,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -242,7 +242,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -256,7 +256,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -270,7 +270,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -284,7 +284,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -298,7 +298,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -312,7 +312,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -326,7 +326,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -340,7 +340,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -382,7 +382,7 @@ static const GOBGameDescription fallbackDescs[] = {
"",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -396,7 +396,7 @@ static const GOBGameDescription fallbackDescs[] = {
"",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -410,7 +410,7 @@ static const GOBGameDescription fallbackDescs[] = {
"unknown",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -478,7 +478,7 @@ static const GOBGameDescription fallbackOnceUpon[kOnceUponATimeMAX][kOnceUponATi
"",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -522,7 +522,7 @@ static const GOBGameDescription fallbackOnceUpon[kOnceUponATimeMAX][kOnceUponATi
"",
AD_ENTRY1(0, 0),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_fascin.h b/engines/gob/detection/tables_fascin.h
index 1c9cced303..b74a057db9 100644
--- a/engines/gob/detection/tables_fascin.h
+++ b/engines/gob/detection/tables_fascin.h
@@ -33,7 +33,7 @@
"VGA",
AD_ENTRY1s("disk0.stk", "c14330d052fe4da5a441ac9d81bc5891", 1061955),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"VGA",
AD_ENTRY1s("disk0.stk", "e8ab4f200a2304849f462dc901705599", 183337),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -64,7 +64,7 @@
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -78,7 +78,7 @@
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "a50a8495e1b2d67699fb562cb98fc3e2", 1064387),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -92,7 +92,7 @@
"Hebrew edition (censored)",
AD_ENTRY1s("intro.stk", "d6e45ce548598727e2b5587a99718eba", 1055909),
HE_ISR,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -106,7 +106,7 @@
"VGA 3 disks edition",
AD_ENTRY1s("disk0.stk", "3a24e60a035250189643c86a9ceafb97", 1062480),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -123,7 +123,7 @@
"CD Version (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -137,7 +137,7 @@
"CD Version (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -151,7 +151,7 @@
"CD Version (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -165,7 +165,7 @@
"CD Version (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
@@ -179,7 +179,7 @@
"CD Version (Censored)",
AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSUBTITLES)
},
diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h
index a32d1ebf81..e9a5cfb77f 100644
--- a/engines/gob/detection/tables_geisha.h
+++ b/engines/gob/detection/tables_geisha.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("disk1.stk", "0c4c16090921664f50baefdfd24d7f5d", 211889),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,21 @@
"",
AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
+ },
+ kGameTypeGeisha,
+ kFeaturesEGA | kFeaturesAdLib,
+ "disk1.stk", "intro.tot", 0
+},
+{ // Supplied by alestedx in bug report #3610207
+ {
+ "geisha",
+ "",
+ AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212164),
+ ES_ESP,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -103,7 +117,7 @@
"",
AD_ENTRY1s("disk1.stk", "f4d4d9d20f7ad1f879fc417d47faba89", 336732),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_gob1.h b/engines/gob/detection/tables_gob1.h
index e6086e990a..8ae72abf33 100644
--- a/engines/gob/detection/tables_gob1.h
+++ b/engines/gob/detection/tables_gob1.h
@@ -33,7 +33,7 @@
"EGA",
AD_ENTRY1("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"EGA",
AD_ENTRY1("intro.stk", "f9233283a0be2464248d83e14b95f09c"),
RU_RUS,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -64,7 +64,7 @@
"VGA",
AD_ENTRY1("intro.stk", "26a9118c0770fa5ac93a9626761600b2"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -78,7 +78,7 @@
"VGA",
AD_ENTRY1s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -95,7 +95,7 @@
"Polish",
AD_ENTRY1s("intro.stk", "97d2443948b2e367cf567fe7e101f5f2", 4049267),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -109,7 +109,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -123,7 +123,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -137,7 +137,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -151,7 +151,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -165,7 +165,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -179,7 +179,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -193,7 +193,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -207,7 +207,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -221,7 +221,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -235,7 +235,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -249,7 +249,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
HU_HUN,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -263,7 +263,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -277,7 +277,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -291,7 +291,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -662,7 +662,7 @@
"Interactive Demo",
AD_ENTRY1("intro.stk", "e72bd1e3828c7dec4c8a3e58c48bdfdb"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -676,7 +676,7 @@
"Interactive Demo",
AD_ENTRY1s("intro.stk", "a796096280d5efd48cf8e7dfbe426eb5", 193595),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -690,7 +690,7 @@
"Interactive Demo",
AD_ENTRY1s("intro.stk", "35a098571af9a03c04e2303aec7c9249", 116582),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_gob2.h b/engines/gob/detection/tables_gob2.h
index 659e6df063..f2449d086d 100644
--- a/engines/gob/detection/tables_gob2.h
+++ b/engines/gob/detection/tables_gob2.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1("intro.stk", "b45b984ee8017efd6ea965b9becd4d66"),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1("intro.stk", "dedb5d31d8c8050a8cf77abedcc53dae"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1("intro.stk", "3e4e7db0d201587dd2df4003b2993ef6"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1("intro.stk", "a13892cdf4badda85a6f6fb47603a128"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -117,7 +117,7 @@
"",
AD_ENTRY1("intro.stk", "c47faf1d406504e6ffe63243610bb1f4"),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -131,7 +131,7 @@
"",
AD_ENTRY1("intro.stk", "cd3e1df8b273636ee32e34b7064f50e8"),
RU_RUS,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -145,7 +145,7 @@
"",
AD_ENTRY1s("intro.stk", "5f53c56e3aa2f1e76c2e4f0caa15887f", 829232),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -162,7 +162,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "9de5fbb41cf97182109e5fecc9d90347"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -176,7 +176,7 @@
"v2.01 Polish",
AD_ENTRY1s("intro.stk", "3025f05482b646c18c2c79c615a3a1df", 5011726),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -190,7 +190,7 @@
"v2.01",
AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -204,7 +204,7 @@
"v2.01",
AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -218,7 +218,7 @@
"v2.01",
AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -232,7 +232,7 @@
"v2.01",
AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -246,7 +246,7 @@
"v2.01",
AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -260,7 +260,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
HU_HUN,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -274,7 +274,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -288,7 +288,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -302,7 +302,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -316,7 +316,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -587,7 +587,7 @@
"Non-Interactive Demo",
AD_ENTRY1("intro.stk", "8b1c98ff2ab2e14f47a1b891e9b92217"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -601,7 +601,7 @@
"Interactive Demo",
AD_ENTRY1("intro.stk", "cf1c95b2939bd8ff58a25c756cb6125e"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_gob3.h b/engines/gob/detection/tables_gob3.h
index 22ec69054b..29a76d2491 100644
--- a/engines/gob/detection/tables_gob3.h
+++ b/engines/gob/detection/tables_gob3.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "32b0f57f5ae79a9ae97e8011df38af42", 157084),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "904fc32032295baa3efb3a41f17db611", 178582),
HE_ISR,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1("intro.stk", "1e2f64ec8dfa89f42ee49936a27e66e7"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1("intro.stk", "f6d225b25a180606fa5dbe6405c97380"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1("intro.stk", "e42a4f2337d6549487a80864d7826972"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -117,7 +117,7 @@
"",
AD_ENTRY1s("intro.stk", "fe8144daece35538085adb59c2d29613", 159402),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -131,7 +131,7 @@
"",
AD_ENTRY1("intro.stk", "4e3af248a48a2321364736afab868527"),
RU_RUS,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -145,7 +145,7 @@
"",
AD_ENTRY1("intro.stk", "8d28ce1591b0e9cc79bf41cad0fc4c9c"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -159,7 +159,7 @@
"",
AD_ENTRY1s("intro.stk", "d3b72938fbbc8159198088811f9e6d19", 160382),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -353,7 +353,7 @@
"v1.000",
AD_ENTRY1("intro.stk", "6f2c226c62dd7ab0ab6f850e89d3fc47"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -367,7 +367,7 @@
"v1.02 Polish",
AD_ENTRY1s("intro.stk", "978afddcac81bb95a04757b61f78471c", 619825),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -381,7 +381,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -395,7 +395,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -409,7 +409,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -423,7 +423,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -437,7 +437,7 @@
"v1.02",
AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -451,7 +451,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
HU_HUN,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -465,7 +465,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -479,7 +479,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -493,7 +493,7 @@
"v1.02",
AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -510,7 +510,7 @@
"Non-interactive Demo",
AD_ENTRY1("intro.stk", "b9b898fccebe02b69c086052d5024a55"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -524,7 +524,7 @@
"Interactive Demo",
AD_ENTRY1("intro.stk", "7aebd94e49c2c5c518c9e7b74f25de9d"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -538,7 +538,7 @@
"Interactive Demo 2",
AD_ENTRY1("intro.stk", "e5dcbc9f6658ebb1e8fe26bc4da0806d"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -552,7 +552,7 @@
"Interactive Demo 3",
AD_ENTRY1s("intro.stk", "9e20ad7b471b01f84db526da34eaf0a2", 395561),
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_inca2.h b/engines/gob/detection/tables_inca2.h
index 26989f7d1a..8ca9463277 100644
--- a/engines/gob/detection/tables_inca2.h
+++ b/engines/gob/detection/tables_inca2.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -78,7 +78,7 @@
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -92,7 +92,7 @@
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -106,7 +106,7 @@
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -120,7 +120,7 @@
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -134,7 +134,7 @@
"",
AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -237,7 +237,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_lit.h b/engines/gob/detection/tables_lit.h
index 019d001f97..c4453312ec 100644
--- a/engines/gob/detection/tables_lit.h
+++ b/engines/gob/detection/tables_lit.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "7b7f48490dedc8a7cb999388e2fadbe3", 3930674),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "e0767783ff662ed93665446665693aef", 4371238),
HE_ISR,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "f1f78b663893b58887add182a77df151", 3944090),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "cd322cb3c64ef2ba2f2134aa2122cfe9", 3936700),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -117,7 +117,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -131,7 +131,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -145,7 +145,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -159,7 +159,7 @@
"",
AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -173,7 +173,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -187,7 +187,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -201,7 +201,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -215,7 +215,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -229,7 +229,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -243,7 +243,7 @@
"",
AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -441,7 +441,7 @@
"Demo",
AD_ENTRY1("demo.stk", "c06f8cc20eb239d4c71f225ce3093edf"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -455,7 +455,7 @@
"Non-interactive Demo",
AD_ENTRY1("demo.stk", "2eba8abd9e3878c57307576012dd2fec"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -472,7 +472,7 @@
"",
AD_ENTRY1s("intro.stk", "3712e7527ba8ce5637d2aadf62783005", 72318),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_PIRATED,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_littlered.h b/engines/gob/detection/tables_littlered.h
index 2b41b65a71..55279f72b6 100644
--- a/engines/gob/detection/tables_littlered.h
+++ b/engines/gob/detection/tables_littlered.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_onceupon.h b/engines/gob/detection/tables_onceupon.h
index 366024d43c..c516719c55 100644
--- a/engines/gob/detection/tables_onceupon.h
+++ b/engines/gob/detection/tables_onceupon.h
@@ -234,7 +234,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -253,7 +253,7 @@
{0, 0, 0, 0}
},
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -272,7 +272,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -291,7 +291,7 @@
{0, 0, 0, 0}
},
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -310,7 +310,7 @@
{0, 0, 0, 0}
},
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_playtoons.h b/engines/gob/detection/tables_playtoons.h
index 4eb5945b04..5bdc337eba 100644
--- a/engines/gob/detection/tables_playtoons.h
+++ b/engines/gob/detection/tables_playtoons.h
@@ -37,7 +37,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -55,7 +55,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -73,7 +73,7 @@
{0, 0, 0, 0}
},
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -91,7 +91,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -114,7 +114,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -132,7 +132,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -154,7 +154,7 @@
{0, 0, 0, 0}
},
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -175,7 +175,7 @@
{0, 0, 0, 0}
},
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -196,7 +196,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -214,7 +214,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -232,7 +232,7 @@
{0, 0, 0, 0}
},
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -250,7 +250,7 @@
{0, 0, 0, 0}
},
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -268,7 +268,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -289,7 +289,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -307,7 +307,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -325,7 +325,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -343,7 +343,7 @@
{0, 0, 0, 0}
},
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -361,7 +361,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -382,7 +382,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -400,7 +400,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -421,7 +421,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -442,7 +442,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -463,7 +463,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -484,7 +484,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -505,7 +505,7 @@
{0, 0, 0, 0}
},
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_urban.h b/engines/gob/detection/tables_urban.h
index d24f6a5011..71c34c9d89 100644
--- a/engines/gob/detection/tables_urban.h
+++ b/engines/gob/detection/tables_urban.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "3ab2c542bd9216ae5d02cc6f45701ae1", 1252436),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "6ce3d878178932053267237ec4843ce1", 1252518),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "b991ed1d31c793e560edefdb349882ef", 1276408),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "4ec3c0864e2b54c5b4ccf9f6ad96528d", 1253328),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1s("intro.stk", "9ea647085a16dd0fb9ecd84cd8778ec9", 1253436),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -117,7 +117,7 @@
"",
AD_ENTRY1s("intro.stk", "4bd31979ea3d77a58a358c09000a85ed", 1253018),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -139,7 +139,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
diff --git a/engines/gob/detection/tables_ween.h b/engines/gob/detection/tables_ween.h
index a02b931b85..89da5ba794 100644
--- a/engines/gob/detection/tables_ween.h
+++ b/engines/gob/detection/tables_ween.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -236,7 +236,7 @@
"",
AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -250,7 +250,7 @@
"",
AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -264,7 +264,7 @@
"",
AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -278,7 +278,7 @@
"",
AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -292,7 +292,7 @@
"",
AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -306,7 +306,7 @@
"",
AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -323,7 +323,7 @@
"Demo",
AD_ENTRY1("intro.stk", "2e9c2898f6bf206ede801e3b2e7ee428"),
UNK_LANG,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
@@ -337,7 +337,7 @@
"Demo",
AD_ENTRY1("intro.stk", "15fb91a1b9b09684b28ac75edf66e504"),
EN_USA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH)
},
diff --git a/engines/gob/detection/tables_woodruff.h b/engines/gob/detection/tables_woodruff.h
index e369539984..f6675a0981 100644
--- a/engines/gob/detection/tables_woodruff.h
+++ b/engines/gob/detection/tables_woodruff.h
@@ -33,7 +33,7 @@
"",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -47,7 +47,7 @@
"",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -61,7 +61,7 @@
"",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -75,7 +75,7 @@
"",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -89,7 +89,7 @@
"",
AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -103,7 +103,7 @@
"",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -117,7 +117,7 @@
"",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -131,7 +131,7 @@
"",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -145,7 +145,7 @@
"",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -159,7 +159,7 @@
"",
AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -173,7 +173,7 @@
"",
AD_ENTRY1s("intro.stk", "5f5f4e0a72c33391e67a47674b120cc6", 20296422),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -187,7 +187,7 @@
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -201,7 +201,7 @@
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -215,7 +215,7 @@
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -229,7 +229,7 @@
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -243,7 +243,7 @@
"",
AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -257,7 +257,7 @@
"",
AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -271,7 +271,7 @@
"",
AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -285,7 +285,7 @@
"",
AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -299,7 +299,7 @@
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
EN_GRB,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -313,7 +313,7 @@
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
DE_DEU,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -327,7 +327,7 @@
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
FR_FRA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -341,7 +341,7 @@
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
IT_ITA,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -355,7 +355,7 @@
"",
AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736),
ES_ESP,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -369,7 +369,7 @@
"",
AD_ENTRY1s("intro.stk", "08a96bf061af1fa4f75c6a7cc56b60a4", 20734979),
PL_POL,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT)
},
@@ -390,7 +390,7 @@
{0, 0, 0, 0}
},
EN_ANY,
- kPlatformPC,
+ kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT)
},
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index 8c6919416d..e1322c2831 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -488,7 +488,7 @@ void Draw::oPlaytoons_sub_F_1B(uint16 id, int16 left, int16 top, int16 right, in
int16 width;
char tmpStr[128];
- strcpy(tmpStr, paramStr);
+ Common::strlcpy(tmpStr, paramStr, 128);
adjustCoords(1, &left, &top);
adjustCoords(1, &right, &bottom);
diff --git a/engines/gob/expression.cpp b/engines/gob/expression.cpp
index fdb4233444..5cea8c0485 100644
--- a/engines/gob/expression.cpp
+++ b/engines/gob/expression.cpp
@@ -21,6 +21,7 @@
*/
#include "common/endian.h"
+#include "common/str.h"
#include "gob/gob.h"
#include "gob/expression.h"
@@ -491,7 +492,7 @@ int Expression::cmpHelper(const StackFrame &stackFrame) {
cmpTemp = (int)stackFrame.values[-3] - (int)stackFrame.values[-1];
} else if (type == OP_LOAD_IMM_STR) {
if ((char *)decodePtr(stackFrame.values[-3]) != _resultStr) {
- strcpy(_resultStr, (char *)decodePtr(stackFrame.values[-3]));
+ Common::strlcpy(_resultStr, (char *)decodePtr(stackFrame.values[-3]), sizeof(_resultStr));
stackFrame.values[-3] = encodePtr((byte *)_resultStr, kResStr);
}
cmpTemp = strcmp(_resultStr, (char *)decodePtr(stackFrame.values[-1]));
@@ -795,10 +796,10 @@ void Expression::simpleArithmetic1(StackFrame &stackFrame) {
case OP_ADD:
if (stackFrame.opers[-2] == OP_LOAD_IMM_STR) {
if ((char *)decodePtr(stackFrame.values[-2]) != _resultStr) {
- strcpy(_resultStr, (char *)decodePtr(stackFrame.values[-2]));
+ Common::strlcpy(_resultStr, (char *)decodePtr(stackFrame.values[-2]), sizeof(_resultStr));
stackFrame.values[-2] = encodePtr((byte *)_resultStr, kResStr);
}
- strcat(_resultStr, (char *)decodePtr(stackFrame.values[0]));
+ Common::strlcat(_resultStr, (char *)decodePtr(stackFrame.values[0]), sizeof(_resultStr));
stackFrame.pop(2);
}
break;
@@ -871,11 +872,11 @@ bool Expression::complexArithmetic(Stack &stack, StackFrame &stackFrame, int16 b
stack.values[brackStart] += stackFrame.values[-1];
} else if (stack.opers[brackStart] == OP_LOAD_IMM_STR) {
if ((char *)decodePtr(stack.values[brackStart]) != _resultStr) {
- strcpy(_resultStr, (char *)decodePtr(stack.values[brackStart]));
+ Common::strlcpy(_resultStr, (char *)decodePtr(stack.values[brackStart]), sizeof(_resultStr));
stack.values[brackStart] =
encodePtr((byte *)_resultStr, kResStr);
}
- strcat(_resultStr, (char *)decodePtr(stackFrame.values[-1]));
+ Common::strlcat(_resultStr, (char *)decodePtr(stackFrame.values[-1]), sizeof(_resultStr));
}
stackFrame.pop(2);
break;
@@ -980,7 +981,7 @@ void Expression::getResult(byte operation, int32 value, byte *type) {
case OP_LOAD_IMM_STR:
if ((char *)decodePtr(value) != _resultStr)
- strcpy(_resultStr, (char *)decodePtr(value));
+ Common::strlcpy(_resultStr, (char *)decodePtr(value), sizeof(_resultStr));
break;
case OP_LOAD_VAR_INT32:
@@ -1109,10 +1110,10 @@ int16 Expression::parseExpr(byte stopToken, byte *type) {
stackFrame.values[-3] += stackFrame.values[-1];
} else if (stackFrame.opers[-3] == OP_LOAD_IMM_STR) {
if ((char *)decodePtr(stackFrame.values[-3]) != _resultStr) {
- strcpy(_resultStr, (char *)decodePtr(stackFrame.values[-3]));
+ Common::strlcpy(_resultStr, (char *)decodePtr(stackFrame.values[-3]), sizeof(_resultStr));
stackFrame.values[-3] = encodePtr((byte *)_resultStr, kResStr);
}
- strcat(_resultStr, (char *)decodePtr(stackFrame.values[-1]));
+ Common::strlcat(_resultStr, (char *)decodePtr(stackFrame.values[-1]), sizeof(_resultStr));
}
stackFrame.pop(2);
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index ecab9bb906..cd00cd13d7 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -1031,12 +1031,12 @@ uint16 Hotspots::updateInput(uint16 xPos, uint16 yPos, uint16 width, uint16 heig
// Delete the character to the left
_vm->_util->cutFromStr(str, pos - 1, 1);
pos--;
- continue;
} else {
if (pos < strlen(str))
// Delete the character to the right
_vm->_util->cutFromStr(str, pos, 1);
}
+ continue;
case kKeyDelete:
if (pos >= strlen(str))
@@ -1995,6 +1995,7 @@ bool Hotspots::leaveNthPlain(uint16 n, uint16 startIndex, int16 timeVal, const u
// Call the leave and time it
startTime = _vm->_util->getTimeKey();
call(spot.funcLeave);
+ _vm->_inter->animPalette();
callTime = _vm->_util->getTimeKey() - startTime;
// Remove the time it took from the time we have available
diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp
index c204b04a40..1540ff6601 100644
--- a/engines/gob/init_v2.cpp
+++ b/engines/gob/init_v2.cpp
@@ -47,7 +47,7 @@ void Init_v2::initVideo() {
_vm->_global->_colorCount = 16;
if (!_vm->isEGA() &&
- ((_vm->getPlatform() == Common::kPlatformPC) ||
+ ((_vm->getPlatform() == Common::kPlatformDOS) ||
(_vm->getPlatform() == Common::kPlatformMacintosh) ||
(_vm->getPlatform() == Common::kPlatformWindows)) &&
((_vm->_global->_videoMode == 0x13) ||
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_fascin.cpp b/engines/gob/inter_fascin.cpp
index 001ec06635..c3b5d98a58 100644
--- a/engines/gob/inter_fascin.cpp
+++ b/engines/gob/inter_fascin.cpp
@@ -132,7 +132,7 @@ void Inter_Fascination::oFascin_repeatUntil(OpFuncParams &params) {
// WORKAROUND: The script of the PC version of Fascination, when the protection check
// fails, writes on purpose everywhere in the memory in order to hang the computer.
// This results in a crash in Scummvm. This workaround avoids that crash.
- if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
if (((blockPos == 3533) && _vm->isCurrentTot("INTRO1.TOT")) ||
((blockPos == 3519) && _vm->isCurrentTot("INTRO2.TOT")) ||
((blockPos == 3265) && _vm->isCurrentTot("INTRO2.TOT"))) //PC Hebrew
diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp
index f76ba8e97b..b0bdde07ac 100644
--- a/engines/gob/inter_playtoons.cpp
+++ b/engines/gob/inter_playtoons.cpp
@@ -301,7 +301,7 @@ void Inter_Playtoons::oPlaytoons_readData(OpFuncParams &params) {
WRITE_VAR(59, stream->readUint32LE());
// The scripts in some versions divide through 256^3 then,
// effectively doing a LE->BE conversion
- if ((_vm->getPlatform() != Common::kPlatformPC) && (VAR(59) < 256))
+ if ((_vm->getPlatform() != Common::kPlatformDOS) && (VAR(59) < 256))
WRITE_VAR(59, SWAP_BYTES_32(VAR(59)));
} else
retSize = stream->read(buf, size);
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index cb58fe86f7..6b7a4f03bd 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -1326,7 +1326,7 @@ void Inter_v2::o2_readData(OpFuncParams &params) {
WRITE_VAR(59, stream->readUint32LE());
// The scripts in some versions divide through 256^3 then,
// effectively doing a LE->BE conversion
- if ((_vm->getPlatform() != Common::kPlatformPC) && (VAR(59) < 256))
+ if ((_vm->getPlatform() != Common::kPlatformDOS) && (VAR(59) < 256))
WRITE_VAR(59, SWAP_BYTES_32(VAR(59)));
} else
retSize = stream->read(buf, size);
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/map_v1.cpp b/engines/gob/map_v1.cpp
index 45499b71fe..ce3d584e7f 100644
--- a/engines/gob/map_v1.cpp
+++ b/engines/gob/map_v1.cpp
@@ -148,7 +148,7 @@ void Map_v1::loadMapObjects(const char *avjFile) {
void Map_v1::loadSounds(Common::SeekableReadStream &data) {
int16 count;
char buf[19];
- char sndNames[20][14];
+ char sndNames[20][19];
count = data.readUint16LE();
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 64b9d19e33..f6dddec71e 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -754,8 +754,10 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
case 1:
animData.frame = 0;
- *(animObj.pPosX) += animLayer->animDeltaX;
- *(animObj.pPosY) += animLayer->animDeltaY;
+ if (animLayer) {
+ *(animObj.pPosX) += animLayer->animDeltaX;
+ *(animObj.pPosY) += animLayer->animDeltaY;
+ }
break;
case 2:
diff --git a/engines/gob/pregob/onceupon/stork.h b/engines/gob/pregob/onceupon/stork.h
index 756f5258c7..ae57983000 100644
--- a/engines/gob/pregob/onceupon/stork.h
+++ b/engines/gob/pregob/onceupon/stork.h
@@ -79,8 +79,6 @@ private:
};
- GobEngine *_vm;
-
Surface *_frame;
ANIObject *_bundle;
diff --git a/engines/gob/pregob/onceupon/title.cpp b/engines/gob/pregob/onceupon/title.cpp
index 5163ff6822..a3905541a0 100644
--- a/engines/gob/pregob/onceupon/title.cpp
+++ b/engines/gob/pregob/onceupon/title.cpp
@@ -62,7 +62,7 @@ void Title::handleFrameEvent() {
void Title::playMusic() {
// Look at what platform this is and play the appropriate music type
- if (_vm->getPlatform() == Common::kPlatformPC)
+ if (_vm->getPlatform() == Common::kPlatformDOS)
playMusicDOS();
else if (_vm->getPlatform() == Common::kPlatformAmiga)
playMusicAmiga();
diff --git a/engines/gob/save/saveconverter.cpp b/engines/gob/save/saveconverter.cpp
index ec8bcbcfea..2db3379aa7 100644
--- a/engines/gob/save/saveconverter.cpp
+++ b/engines/gob/save/saveconverter.cpp
@@ -272,6 +272,7 @@ SavePartSprite *SaveConverter::readSprite(Common::SeekableReadStream &stream,
if (!sprite->readSpriteRaw(data, spriteSize)) {
delete[] data;
+ delete sprite;
return 0;
}
diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h
index 834484757b..f20532dffa 100644
--- a/engines/gob/save/saveload.h
+++ b/engines/gob/save/saveload.h
@@ -247,9 +247,6 @@ protected:
static SaveFile _saveFiles[];
- NotesHandler *_notesHandler;
- TempSpriteHandler *_tempSpriteHandler;
-
SaveHandler *getHandler(const char *fileName) const;
const char *getDescription(const char *fileName) const;
@@ -809,7 +806,6 @@ protected:
uint8 _id;
int _slot;
- TempHandler *_tmp;
GameHandler *_game;
};
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index d9fc362547..2bf7f266a1 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -375,8 +375,10 @@ void AdLib::setVoiceTimbre(uint8 voice, const uint16 *params) {
const int voicePerc = voice - kVoiceBaseDrum;
if (!isPercussionMode() || (voice < kVoiceBaseDrum)) {
- setOperatorParams(kVoiceMelodyOperator[0][voice], params0, waves[0]);
- setOperatorParams(kVoiceMelodyOperator[1][voice], params1, waves[1]);
+ if (voice < kMelodyVoiceCount) {
+ setOperatorParams(kVoiceMelodyOperator[0][voice], params0, waves[0]);
+ setOperatorParams(kVoiceMelodyOperator[1][voice], params1, waves[1]);
+ }
} else if (voice == kVoiceBaseDrum) {
setOperatorParams(kVoicePercussionOperator[0][voicePerc], params0, waves[0]);
setOperatorParams(kVoicePercussionOperator[1][voicePerc], params1, waves[1]);
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp
index 63af6aeef4..a4c74642dd 100644
--- a/engines/gob/sound/sound.cpp
+++ b/engines/gob/sound/sound.cpp
@@ -119,7 +119,7 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName)
byte *data = _vm->_dataIO->getFile(fileName, size);
if (!data || !sndDesc->load(type, data, size)) {
- delete data;
+ delete[] data;
warning("Sound::sampleLoad(): Failed to load sound \"%s\"", fileName);
return false;
diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp
index f267eee32d..4d6f6f0bf7 100644
--- a/engines/gob/sound/soundblaster.cpp
+++ b/engines/gob/sound/soundblaster.cpp
@@ -98,7 +98,7 @@ void SoundBlaster::playComposition(const int16 *composition, int16 freqVal,
do {
i++;
_composition[i] = composition[i];
- } while ((i < 50) && (composition[i] != -1));
+ } while ((i < 49) && (composition[i] != -1));
_compositionPos = -1;
nextCompositionPos();
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/cursor.cpp b/engines/groovie/cursor.cpp
index 6422570220..cac78a95a3 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -378,8 +378,7 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) {
}
}
-
-
+ delete[] tmp;
}
void Cursor_v2::enable() {
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 895686b5e0..7c89114e83 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"},
@@ -51,8 +54,8 @@ 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)
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS,
+ 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
},
@@ -105,8 +108,8 @@ static const GroovieGameDescription gameDescriptions[] = {
{ "intro.gjd", 0, NULL, 31711554},
{ NULL, 0, NULL, 0}
},
- Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS,
- GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ Common::RU_RUS, Common::kPlatformDOS, ADGF_NO_FLAGS,
+ 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
},
@@ -131,7 +134,37 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 1
+ },
+
+ // The 11th Hour Macintosh English
+ {
+ {
+ "11h", "",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 1
+ },
+
+ // The 11th Hour Macintosh English (Installed)
+ {
+ {
+ "11h", "Installed",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
},
kGroovieV2, 1
@@ -142,7 +175,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "Demo",
AD_ENTRY1s("disk.1", "aacb32ce07e0df2894bd83a3dee40c12", 70),
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE,
GUIO5(GUIO_NOLAUNCHLOAD, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
},
kGroovieV2, 1
@@ -153,29 +186,89 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "Making Of",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
GUIO3(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD, GUIO_NOASPECT)
},
kGroovieV2, 2
},
+ // The Making of The 11th Hour Macintosh English
+ {
+ {
+ "11h", "Making Of",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 2
+ },
+
+ // The Making of The 11th Hour Macintosh English (Installed)
+ {
+ {
+ "11h", "Making Of (Installed)",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 2
+ },
+
// Clandestiny Trailer DOS English
{
{
"clandestiny", "Trailer",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
GUIO3(GUIO_NOMIDI, GUIO_NOLAUNCHLOAD, GUIO_NOASPECT)
},
kGroovieV2, 3
},
+ // Clandestiny Trailer Macintosh English
+ {
+ {
+ "clandestiny", "Trailer",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "The 11th Hour Installer", 0, "bcdb4040b27f15b18f39fb9e496d384a", 1002987 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 3
+ },
+
+ // Clandestiny Trailer Macintosh English (Installed)
+ {
+ {
+ "clandestiny", "Trailer (Installed)",
+ {
+ { "disk.1", 0, "5c0428cd3659fc7bbcd0aa16485ed5da", 227 },
+ { "el01.mov", 0, "70f42dfc25b1488a08011dc45bb5145d", 6039 },
+ { 0, 0, 0, 0 }
+ },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_UNSTABLE,
+ GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_NOASPECT)
+ },
+ kGroovieV2, 3
+ },
+
// Clandestiny DOS English
{
{
"clandestiny", "",
AD_ENTRY1s("disk.1", "f79fc1515174540fef6a34132efc4c53", 76),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)
},
kGroovieV2, 1
@@ -186,7 +279,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"unclehenry", "",
AD_ENTRY1s("disk.1", "0e1b1d3cecc4fc7efa62a968844d1f7a", 72),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)
},
kGroovieV2, 1
@@ -197,7 +290,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"tlc", "",
AD_ENTRY1s("disk.1", "32a1afa68478f1f9d2b25eeea427f2e3", 84),
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE,
GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)
},
kGroovieV2, 1
@@ -207,9 +300,28 @@ static const GroovieGameDescription gameDescriptions[] = {
{AD_TABLE_END_MARKER, kGroovieT7G, 0}
};
+static const char *directoryGlobs[] = {
+ "MIDI",
+ 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
@@ -222,6 +334,10 @@ public:
// replaced with an according explanation.
_flags = kADFlagUseExtraAsHint;
_guioptions = GUIO3(GUIO_NOSUBTITLES, GUIO_NOSFX, GUIO_NOASPECT);
+
+ // Need MIDI directory to detect 11H Mac Installed
+ _maxScanDepth = 2;
+ _directoryGlobs = directoryGlobs;
}
const char *getName() const {
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 726e7cbede..5ade442742 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -30,6 +30,7 @@
#include "groovie/music.h"
#include "groovie/resource.h"
#include "groovie/roq.h"
+#include "groovie/stuffit.h"
#include "groovie/vdx.h"
#include "common/config-manager.h"
@@ -56,15 +57,11 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
SearchMan.addSubDirectoryMatching(gameDataDir, "groovie");
SearchMan.addSubDirectoryMatching(gameDataDir, "media");
SearchMan.addSubDirectoryMatching(gameDataDir, "system");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "MIDI");
_modeSpeed = kGroovieSpeedNormal;
- if (ConfMan.hasKey("t7g_speed")) {
- 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");
@@ -93,6 +90,15 @@ GroovieEngine::~GroovieEngine() {
}
Common::Error GroovieEngine::run() {
+ if (_gameDescription->version == kGroovieV2 && getPlatform() == Common::kPlatformMacintosh) {
+ // Load the Mac installer with the lowest priority (in case the user has installed
+ // the game and has the MIDI folder present; faster to just load them)
+ Common::Archive *archive = createStuffItArchive("The 11th Hour Installer");
+
+ if (archive)
+ SearchMan.add("The 11th Hour Installer", archive);
+ }
+
_script = new Script(this, _gameDescription->version);
// Initialize the graphics
@@ -160,10 +166,10 @@ Common::Error GroovieEngine::run() {
// Create the music player
switch (getPlatform()) {
case Common::kPlatformMacintosh:
- // TODO: The 11th Hour Mac uses QuickTime MIDI files
- // Right now, since the XMIDI are present and it is still detected as
- // the DOS version, we don't have to do anything here.
- _musicPlayer = new MusicPlayerMac(this);
+ if (_gameDescription->version == kGroovieT7G)
+ _musicPlayer = new MusicPlayerMac_t7g(this);
+ else
+ _musicPlayer = new MusicPlayerMac_v2(this);
break;
case Common::kPlatformIOS:
_musicPlayer = new MusicPlayerIOS(this);
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index df2f062757..79abc13b1c 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -72,10 +72,16 @@ enum DebugLevels {
// the current limitation is 32 debug levels (1 << 31 is the last one)
};
+/**
+ * This enum reflects the available movie speed settings:
+ * - 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/module.mk b/engines/groovie/module.mk
index 1e89ff66f5..b47eed912b 100644
--- a/engines/groovie/module.mk
+++ b/engines/groovie/module.mk
@@ -15,6 +15,7 @@ MODULE_OBJS := \
roq.o \
saveload.o \
script.o \
+ stuffit.o \
vdx.o
# This module can be built as a plugin
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index af929d439b..95637fc407 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -678,9 +678,9 @@ void MusicPlayerXMI::setTimbreMT(byte channel, const Timbre &timbre) {
}
-// MusicPlayerMac
+// MusicPlayerMac_t7g
-MusicPlayerMac::MusicPlayerMac(GroovieEngine *vm) : MusicPlayerMidi(vm) {
+MusicPlayerMac_t7g::MusicPlayerMac_t7g(GroovieEngine *vm) : MusicPlayerMidi(vm) {
// Create the parser
_midiParser = MidiParser::createParser_SMF();
@@ -701,7 +701,7 @@ MusicPlayerMac::MusicPlayerMac(GroovieEngine *vm) : MusicPlayerMidi(vm) {
assert(_vm->_macResFork);
}
-bool MusicPlayerMac::load(uint32 fileref, bool loop) {
+bool MusicPlayerMac_t7g::load(uint32 fileref, bool loop) {
debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Starting the playback of song: %04X", fileref);
// First try for compressed MIDI
@@ -722,7 +722,7 @@ bool MusicPlayerMac::load(uint32 fileref, bool loop) {
return loadParser(file, loop);
}
-Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadStream *stream) {
+Common::SeekableReadStream *MusicPlayerMac_t7g::decompressMidi(Common::SeekableReadStream *stream) {
// Initialize an output buffer of the given size
uint32 size = stream->readUint32BE();
byte *output = (byte *)malloc(size);
@@ -768,6 +768,52 @@ Common::SeekableReadStream *MusicPlayerMac::decompressMidi(Common::SeekableReadS
return new Common::MemoryReadStream(output, size, DisposeAfterUse::YES);
}
+// MusicPlayerMac_v2
+
+MusicPlayerMac_v2::MusicPlayerMac_v2(GroovieEngine *vm) : MusicPlayerMidi(vm) {
+ // Create the parser
+ _midiParser = MidiParser::createParser_QT();
+
+ // Create the driver
+ MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
+ _driver = MidiDriver::createMidi(dev);
+ assert(_driver);
+
+ _driver->open(); // TODO: Handle return value != 0 (indicating an error)
+
+ // Set the parser's driver
+ _midiParser->setMidiDriver(this);
+
+ // Set the timer rate
+ _midiParser->setTimerRate(_driver->getBaseTempo());
+}
+
+bool MusicPlayerMac_v2::load(uint32 fileref, bool loop) {
+ debugC(1, kGroovieDebugMIDI | kGroovieDebugAll, "Groovie::Music: Starting the playback of song: %04X", fileref);
+
+ // Find correct filename
+ ResInfo info;
+ _vm->_resMan->getResInfo(fileref, info);
+ uint len = info.filename.size();
+ if (len < 4)
+ return false; // This shouldn't actually occur
+
+ // Remove the extension and add ".mov"
+ info.filename.deleteLastChar();
+ info.filename.deleteLastChar();
+ info.filename.deleteLastChar();
+ info.filename += "mov";
+
+ Common::SeekableReadStream *file = SearchMan.createReadStreamForMember(info.filename);
+
+ if (!file) {
+ warning("Could not find file '%s'", info.filename.c_str());
+ return false;
+ }
+
+ return loadParser(file, loop);
+}
+
MusicPlayerIOS::MusicPlayerIOS(GroovieEngine *vm) : MusicPlayer(vm) {
vm->getTimerManager()->installTimerProc(&onTimer, 50 * 1000, this, "groovieMusic");
}
diff --git a/engines/groovie/music.h b/engines/groovie/music.h
index cc852aa8dc..92e9c8b487 100644
--- a/engines/groovie/music.h
+++ b/engines/groovie/music.h
@@ -150,9 +150,9 @@ private:
void setTimbreMT(byte channel, const Timbre &timbre);
};
-class MusicPlayerMac : public MusicPlayerMidi {
+class MusicPlayerMac_t7g : public MusicPlayerMidi {
public:
- MusicPlayerMac(GroovieEngine *vm);
+ MusicPlayerMac_t7g(GroovieEngine *vm);
protected:
bool load(uint32 fileref, bool loop);
@@ -161,6 +161,14 @@ private:
Common::SeekableReadStream *decompressMidi(Common::SeekableReadStream *stream);
};
+class MusicPlayerMac_v2 : public MusicPlayerMidi {
+public:
+ MusicPlayerMac_v2(GroovieEngine *vm);
+
+protected:
+ bool load(uint32 fileref, bool loop);
+};
+
class MusicPlayerIOS : public MusicPlayer {
public:
MusicPlayerIOS(GroovieEngine *vm);
diff --git a/engines/groovie/stuffit.cpp b/engines/groovie/stuffit.cpp
new file mode 100644
index 0000000000..37f12585e7
--- /dev/null
+++ b/engines/groovie/stuffit.cpp
@@ -0,0 +1,537 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+// Based on the StuffIt code in ResidualVM
+// StuffIt parsing based on http://code.google.com/p/theunarchiver/wiki/StuffItFormat
+// Compression 14 based on libxad (http://sourceforge.net/projects/libxad/)
+
+#include "groovie/stuffit.h"
+
+#include "common/archive.h"
+#include "common/bitstream.h"
+#include "common/debug.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
+#include "common/memstream.h"
+#include "common/substream.h"
+
+namespace Groovie {
+
+struct SIT14Data;
+
+class StuffItArchive : public Common::Archive {
+public:
+ StuffItArchive();
+ ~StuffItArchive();
+
+ bool open(const Common::String &filename);
+ void close();
+ bool isOpen() const { return _stream != 0; }
+
+ // Common::Archive API implementation
+ bool hasFile(const Common::String &name) const;
+ int listMembers(Common::ArchiveMemberList &list) const;
+ const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
+ Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
+
+private:
+ struct FileEntry {
+ byte compression;
+ uint32 uncompressedSize;
+ uint32 compressedSize;
+ uint32 offset;
+ };
+
+ Common::SeekableReadStream *_stream;
+
+ typedef Common::HashMap<Common::String, FileEntry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap;
+ FileMap _map;
+
+ // Decompression Functions
+ Common::SeekableReadStream *decompress14(Common::SeekableReadStream *src, uint32 uncompressedSize) const;
+
+ // Decompression Helpers
+ void update14(uint16 first, uint16 last, byte *code, uint16 *freq) const;
+ void readTree14(Common::BitStream *bits, SIT14Data *dat, uint16 codesize, uint16 *result) const;
+};
+
+StuffItArchive::StuffItArchive() : Common::Archive() {
+ _stream = 0;
+}
+
+StuffItArchive::~StuffItArchive() {
+ close();
+}
+
+// Some known values of StuffIt FourCC's
+// 11H Mac in particular uses ST46
+static const uint32 s_magicNumbers[] = {
+ MKTAG('S', 'I', 'T', '!'), MKTAG('S', 'T', '6', '5'), MKTAG('S', 'T', '5', '0'),
+ MKTAG('S', 'T', '6', '0'), MKTAG('S', 'T', 'i', 'n'), MKTAG('S', 'T', 'i', '2'),
+ MKTAG('S', 'T', 'i', '3'), MKTAG('S', 'T', 'i', '4'), MKTAG('S', 'T', '4', '6')
+};
+
+bool StuffItArchive::open(const Common::String &filename) {
+ close();
+
+ _stream = SearchMan.createReadStreamForMember(filename);
+
+ if (!_stream)
+ return false;
+
+ uint32 tag = _stream->readUint32BE();
+
+ // Check all the possible FourCC's
+ bool found = false;
+ for (int i = 0; i < ARRAYSIZE(s_magicNumbers); i++) {
+ if (tag == s_magicNumbers[i]) {
+ found = true;
+ break;
+ }
+ }
+
+ // Didn't find one, let's bail out
+ if (!found) {
+ close();
+ return false;
+ }
+
+ /* uint16 fileCount = */ _stream->readUint16BE();
+ /* uint32 archiveSize = */ _stream->readUint32BE();
+
+ // Some sort of second magic number
+ if (_stream->readUint32BE() != MKTAG('r', 'L', 'a', 'u')) {
+ close();
+ return false;
+ }
+
+ /* byte version = */ _stream->readByte(); // meaning not clear
+
+ _stream->skip(7); // unknown
+
+ while (_stream->pos() < _stream->size() && !_stream->eos()) {
+ byte resForkCompression = _stream->readByte();
+ byte dataForkCompression = _stream->readByte();
+
+ byte fileNameLength = _stream->readByte();
+ Common::String name;
+
+ for (byte i = 0; i < fileNameLength; i++)
+ name += (char)_stream->readByte();
+
+ // Skip remaining bytes
+ _stream->skip(63 - fileNameLength);
+
+ /* uint32 fileType = */ _stream->readUint32BE();
+ /* uint32 fileCreator = */ _stream->readUint32BE();
+ /* uint16 finderFlags = */ _stream->readUint16BE();
+ /* uint32 creationDate = */ _stream->readUint32BE();
+ /* uint32 modificationDate = */ _stream->readUint32BE();
+ uint32 resForkUncompressedSize = _stream->readUint32BE();
+ uint32 dataForkUncompressedSize = _stream->readUint32BE();
+ uint32 resForkCompressedSize = _stream->readUint32BE();
+ uint32 dataForkCompressedSize = _stream->readUint32BE();
+ /* uint16 resForkCRC = */ _stream->readUint16BE();
+ /* uint16 dataForkCRC = */ _stream->readUint16BE();
+ _stream->skip(6); // unknown
+ /* uint16 headerCRC = */ _stream->readUint16BE();
+
+ // Ignore directories for now
+ if (dataForkCompression == 32 || dataForkCompression == 33)
+ continue;
+
+ if (dataForkUncompressedSize != 0) {
+ // We have a data fork
+
+ FileEntry entry;
+ entry.compression = dataForkCompression;
+ entry.uncompressedSize = dataForkUncompressedSize;
+ entry.compressedSize = dataForkCompressedSize;
+ entry.offset = _stream->pos() + resForkCompressedSize;
+ _map[name] = entry;
+
+ debug(0, "StuffIt file '%s', Compression = %d", name.c_str(), entry.compression);
+ }
+
+ if (resForkUncompressedSize != 0) {
+ // We have a resource fork
+
+ // Add a .rsrc extension so we know it's the resource fork
+ name += ".rsrc";
+
+ FileEntry entry;
+ entry.compression = resForkCompression;
+ entry.uncompressedSize = resForkUncompressedSize;
+ entry.compressedSize = resForkCompressedSize;
+ entry.offset = _stream->pos();
+ _map[name] = entry;
+
+ debug(0, "StuffIt file '%s', Compression = %d", name.c_str(), entry.compression);
+ }
+
+ // Go to the next entry
+ _stream->skip(dataForkCompressedSize + resForkCompressedSize);
+ }
+
+ return true;
+}
+
+void StuffItArchive::close() {
+ delete _stream; _stream = 0;
+ _map.clear();
+}
+
+bool StuffItArchive::hasFile(const Common::String &name) const {
+ return _map.contains(name);
+}
+
+int StuffItArchive::listMembers(Common::ArchiveMemberList &list) const {
+ for (FileMap::const_iterator it = _map.begin(); it != _map.end(); it++)
+ list.push_back(getMember(it->_key));
+
+ return _map.size();
+}
+
+const Common::ArchiveMemberPtr StuffItArchive::getMember(const Common::String &name) const {
+ return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
+}
+
+Common::SeekableReadStream *StuffItArchive::createReadStreamForMember(const Common::String &name) const {
+ if (!_stream || !_map.contains(name))
+ return 0;
+
+ const FileEntry &entry = _map[name];
+
+ if (entry.compression & 0xF0)
+ error("Unhandled StuffIt encryption");
+
+ Common::SeekableSubReadStream subStream(_stream, entry.offset, entry.offset + entry.compressedSize);
+
+ // We currently only support type 14 compression
+ switch (entry.compression) {
+ case 0: // Uncompressed
+ return subStream.readStream(subStream.size());
+ case 14: // Installer
+ return decompress14(&subStream, entry.uncompressedSize);
+ default:
+ error("Unhandled StuffIt compression %d", entry.compression);
+ }
+
+ return 0;
+}
+
+void StuffItArchive::update14(uint16 first, uint16 last, byte *code, uint16 *freq) const {
+ uint16 i, j;
+
+ while (last - first > 1) {
+ i = first;
+ j = last;
+
+ do {
+ while (++i < last && code[first] > code[i])
+ ;
+
+ while (--j > first && code[first] < code[j])
+ ;
+
+ if (j > i) {
+ SWAP(code[i], code[j]);
+ SWAP(freq[i], freq[j]);
+ }
+ } while (j > i);
+
+ if (first != j) {
+ SWAP(code[first], code[j]);
+ SWAP(freq[first], freq[j]);
+
+ i = j + 1;
+
+ if (last - i <= j - first) {
+ update14(i, last, code, freq);
+ last = j;
+ } else {
+ update14(first, j, code, freq);
+ first = i;
+ }
+ } else {
+ ++first;
+ }
+ }
+}
+
+struct SIT14Data {
+ byte code[308];
+ byte codecopy[308];
+ uint16 freq[308];
+ uint32 buff[308];
+
+ byte var1[52];
+ uint16 var2[52];
+ uint16 var3[75 * 2];
+
+ byte var4[76];
+ uint32 var5[75];
+ byte var6[1024];
+ uint16 var7[308 * 2];
+ byte var8[0x4000];
+
+ byte window[0x40000];
+};
+
+// Realign to a byte boundary
+#define ALIGN_BITS(b) \
+ if (b->pos() & 7) \
+ b->skip(8 - (b->pos() & 7))
+
+void StuffItArchive::readTree14(Common::BitStream *bits, SIT14Data *dat, uint16 codesize, uint16 *result) const {
+ uint32 i, l, n;
+ uint32 k = bits->getBit();
+ uint32 j = bits->getBits(2) + 2;
+ uint32 o = bits->getBits(3) + 1;
+ uint32 size = 1 << j;
+ uint32 m = size - 1;
+ k = k ? (m - 1) : 0xFFFFFFFF;
+
+ if (bits->getBits(2) & 1) { // skip 1 bit!
+ // requirements for this call: dat->buff[32], dat->code[32], dat->freq[32*2]
+ readTree14(bits, dat, size, dat->freq);
+
+ for (i = 0; i < codesize; ) {
+ l = 0;
+
+ do {
+ l = dat->freq[l + bits->getBit()];
+ n = size << 1;
+ } while (n > l);
+
+ l -= n;
+
+ if (k != l) {
+ if (l == m) {
+ l = 0;
+
+ do {
+ l = dat->freq[l + bits->getBit()];
+ n = size << 1;
+ } while (n > l);
+
+ l += 3 - n;
+
+ while (l--) {
+ dat->code[i] = dat->code[i - 1];
+ ++i;
+ }
+ } else {
+ dat->code[i++] = l + o;
+ }
+ } else {
+ dat->code[i++] = 0;
+ }
+ }
+ } else {
+ for (i = 0; i < codesize; ) {
+ l = bits->getBits(j);
+
+ if (k != l) {
+ if (l == m) {
+ l = bits->getBits(j) + 3;
+
+ while (l--) {
+ dat->code[i] = dat->code[i - 1];
+ ++i;
+ }
+ } else {
+ dat->code[i++] = l+o;
+ }
+ } else {
+ dat->code[i++] = 0;
+ }
+ }
+ }
+
+ for (i = 0; i < codesize; ++i) {
+ dat->codecopy[i] = dat->code[i];
+ dat->freq[i] = i;
+ }
+
+ update14(0, codesize, dat->codecopy, dat->freq);
+
+ for (i = 0; i < codesize && !dat->codecopy[i]; ++i)
+ ; // find first nonempty
+
+ for (j = 0; i < codesize; ++i, ++j) {
+ if (i)
+ j <<= (dat->codecopy[i] - dat->codecopy[i - 1]);
+
+ k = dat->codecopy[i]; m = 0;
+
+ for (l = j; k--; l >>= 1)
+ m = (m << 1) | (l & 1);
+
+ dat->buff[dat->freq[i]] = m;
+ }
+
+ for (i = 0; i < (uint32)codesize * 2; ++i)
+ result[i] = 0;
+
+ j = 2;
+
+ for (i = 0; i < codesize; ++i) {
+ l = 0;
+ m = dat->buff[i];
+
+ for (k = 0; k < dat->code[i]; ++k) {
+ l += (m & 1);
+
+ if (dat->code[i] - 1 <= (int32)k) {
+ result[l] = codesize * 2 + i;
+ } else {
+ if (!result[l]) {
+ result[l] = j;
+ j += 2;
+ }
+
+ l = result[l];
+ }
+
+ m >>= 1;
+ }
+ }
+
+ ALIGN_BITS(bits);
+}
+
+#define OUTPUT_VAL(x) \
+ out.writeByte(x); \
+ dat->window[j++] = x; \
+ j &= 0x3FFFF
+
+Common::SeekableReadStream *StuffItArchive::decompress14(Common::SeekableReadStream *src, uint32 uncompressedSize) const {
+ byte *dst = (byte *)malloc(uncompressedSize);
+ Common::MemoryWriteStream out(dst, uncompressedSize);
+
+ Common::BitStream *bits = new Common::BitStream8LSB(src);
+
+ uint32 i, j, k, l, m, n;
+
+ SIT14Data *dat = new SIT14Data();
+
+ // initialization
+ for (i = k = 0; i < 52; ++i) {
+ dat->var2[i] = k;
+ k += (1 << (dat->var1[i] = ((i >= 4) ? ((i - 4) >> 2) : 0)));
+ }
+
+ for (i = 0; i < 4; ++i)
+ dat->var8[i] = i;
+
+ for (m = 1, l = 4; i < 0x4000; m <<= 1) // i is 4
+ for (n = l+4; l < n; ++l)
+ for (j = 0; j < m; ++j)
+ dat->var8[i++] = l;
+
+ for (i = 0, k = 1; i < 75; ++i) {
+ dat->var5[i] = k;
+ k += (1 << (dat->var4[i] = (i >= 3 ? ((i - 3) >> 2) : 0)));
+ }
+
+ for (i = 0; i < 4; ++i)
+ dat->var6[i] = i - 1;
+
+ for (m = 1, l = 3; i < 0x400; m <<= 1) // i is 4
+ for (n = l + 4; l < n; ++l)
+ for (j = 0; j < m; ++j)
+ dat->var6[i++] = l;
+
+ m = bits->getBits(16); // number of blocks
+ j = 0; // window position
+
+ while (m-- && !bits->eos()) {
+ bits->getBits(16); // skip crunched block size
+ bits->getBits(16);
+ n = bits->getBits(16); // number of uncrunched bytes
+ n |= bits->getBits(16) << 16;
+ readTree14(bits, dat, 308, dat->var7);
+ readTree14(bits, dat, 75, dat->var3);
+
+ while (n && !bits->eos()) {
+ for (i = 0; i < 616;)
+ i = dat->var7[i + bits->getBit()];
+
+ i -= 616;
+
+ if (i < 0x100) {
+ OUTPUT_VAL(i);
+ --n;
+ } else {
+ i -= 0x100;
+ k = dat->var2[i]+4;
+ i = dat->var1[i];
+
+ if (i)
+ k += bits->getBits(i);
+
+ for (i = 0; i < 150;)
+ i = dat->var3[i + bits->getBit()];
+
+ i -= 150;
+ l = dat->var5[i];
+ i = dat->var4[i];
+
+ if (i)
+ l += bits->getBits(i);
+
+ n -= k;
+ l = j + 0x40000 - l;
+
+ while (k--) {
+ l &= 0x3FFFF;
+ OUTPUT_VAL(dat->window[l]);
+ l++;
+ }
+ }
+ }
+
+ ALIGN_BITS(bits);
+ }
+
+ delete dat;
+ delete bits;
+
+ return new Common::MemoryReadStream(dst, uncompressedSize, DisposeAfterUse::YES);
+}
+
+#undef OUTPUT_VAL
+#undef ALIGN_BITS
+
+Common::Archive *createStuffItArchive(const Common::String &fileName) {
+ StuffItArchive *archive = new StuffItArchive();
+
+ if (!archive->open(fileName)) {
+ delete archive;
+ return 0;
+ }
+
+ return archive;
+}
+
+} // End of namespace Groovie
diff --git a/engines/groovie/stuffit.h b/engines/groovie/stuffit.h
new file mode 100644
index 0000000000..44f593dbea
--- /dev/null
+++ b/engines/groovie/stuffit.h
@@ -0,0 +1,43 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef GROOVIE_STUFFIT_H
+#define GROOVIE_STUFFIT_H
+
+namespace Common {
+class Archive;
+class String;
+}
+
+namespace Groovie {
+
+/**
+ * This factory method creates an Archive instance corresponding to the content
+ * of the StuffIt compressed file.
+ *
+ * May return 0 in case of a failure.
+ */
+Common::Archive *createStuffItArchive(const Common::String &fileName);
+
+} // End of namespace Groovie
+
+#endif
diff --git a/engines/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/groovie/vdx.h b/engines/groovie/vdx.h
index ebe58cb119..a9bfaa1eb4 100644
--- a/engines/groovie/vdx.h
+++ b/engines/groovie/vdx.h
@@ -62,11 +62,11 @@ private:
bool _flagEight;
bool _flagNine;
- bool _flagSkipStill;
+ //bool _flagSkipStill;
bool _flagSkipPalette;
bool _flagFirstFrame;
- bool _flagTransparent;
- bool _flagUpdateStill;
+ //bool _flagTransparent;
+ //bool _flagUpdateStill;
void getStill(Common::ReadStream *in);
void getDelta(Common::ReadStream *in);
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
new file mode 100644
index 0000000000..2ec9cec009
--- /dev/null
+++ b/engines/hopkins/anim.cpp
@@ -0,0 +1,797 @@
+/* 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 &hiresName, const Common::String &lowresName, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl) {
+ Common::File f;
+
+ if (_vm->shouldQuit())
+ return;
+
+ _vm->_events->mouseOff();
+
+ byte *screenP = _vm->_graphicsMan->_backBuffer;
+
+ if (!f.open(hiresName)) {
+ if (!f.open(lowresName))
+ error("Files not found: %s - %s", hiresName.c_str(), lowresName.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->display8BitRect(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 &hiresName, const Common::String &lowresName, 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(hiresName)) {
+ if (!f.open(lowresName))
+ error("Error opening files: %s - %s", hiresName.c_str(), lowresName.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->display8BitRect(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->display8BitRect(_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->display8BitRect(_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->display8BitRect(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;
+
+ 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->display8BitRect(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);
+ }
+
+ 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);
+ 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..bf9b55aaae
--- /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 &hiresName, const Common::String &lowresName, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false);
+ void playAnim2(const Common::String &hiresName, const Common::String &lowresName, 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..f7b923badf
--- /dev/null
+++ b/engines/hopkins/computer.cpp
@@ -0,0 +1,1226 @@
+/* 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\0245A ES: ALLFREE\n"
+"% ESCRIBE CONTRASE\0245A ACTUAL\n"
+"% **** ACCESO DENEGADO ****\n"
+"% 1) *** JUEGO ***\n"
+"% 0) SALIR DEL ORDENADOR\n"
+"% 2) CADAVER EXTRA\0245O\n"
+"% 3) CADAVER EXTRA\0245O\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();
+
+ // Refresh the entire screen
+ _vm->_graphicsMan->addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ _vm->_graphicsMan->updateScreen();
+}
+
+/**
+ * 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..f111eb50d3
--- /dev/null
+++ b/engines/hopkins/debugger.cpp
@@ -0,0 +1,90 @@
+/* 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));
+ DCmd_Register("zones", WRAP_METHOD(Debugger, cmd_Zones));
+ DCmd_Register("lines", WRAP_METHOD(Debugger, cmd_Lines));
+}
+
+// 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;
+}
+
+bool Debugger::cmd_Zones(int argc, const char **argv) {
+if (argc != 2) {
+ DebugPrintf("%s: [on | off]\n", argv[0]);
+ return true;
+ } else {
+ _vm->_graphicsMan->_showZones = !strcmp(argv[1], "on");
+ return false;
+ }
+}
+
+bool Debugger::cmd_Lines(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("%s: [on | off]\n", argv[0]);
+ return true;
+ } else {
+ _vm->_graphicsMan->_showLines = !strcmp(argv[1], "on");
+ return false;
+ }
+}
+
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/debugger.h b/engines/hopkins/debugger.h
new file mode 100644
index 0000000000..746c54a675
--- /dev/null
+++ b/engines/hopkins/debugger.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_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);
+ bool cmd_Zones(int argc, const char **argv);
+ bool cmd_Lines(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..9d16b0ab51
--- /dev/null
+++ b/engines/hopkins/detection.cpp
@@ -0,0 +1,192 @@
+/* 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",
+ "link",
+ 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..c3ff563f6f
--- /dev/null
+++ b/engines/hopkins/detection_tables.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.
+ *
+ */
+
+namespace Hopkins {
+
+static const HopkinsGameDescription gameDescriptions[] = {
+ {
+ // Hopkins FBI Linux Demo UK 1.00 and 1.02
+ {
+ "hopkins",
+ "Linux Demo",
+ {
+ {"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,
+ {
+ {"ENG_VOI.RES", 0, "fa5789d1d8c19d160bce44a33e742fdf", 66860711},
+ {"CREAN.TXT", 0, "e13aa69d9e043f066776e1d0ef98fdf5", 1871},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformOS2,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI BeOS, provided by Strangerke & Eriktorbjorn
+ {
+ "hopkins",
+ 0,
+ {
+ {"ENG_VOI.RES", 0, "fa5789d1d8c19d160bce44a33e742fdf", 66860711},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformBeOS,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 Spanish
+ {
+ "hopkins",
+ 0,
+ {
+ {"RES_VES.RES", 0, "77ee08896466ae88cc1af3bf1a0bf78c", 32882302},
+ AD_LISTEND
+ },
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 UK, provided by Strangerke, alexbevi, greencis
+ {
+ "hopkins",
+ 0,
+ {
+ {"RES_VAN.RES", 0, "f1693ac0b0859c8ecd8cb30ff43cf55f", 38296346},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95 RU, provided by greencis in bug #3613068
+ {
+ "hopkins",
+ 0,
+ {
+ {"res_van.res", 0, "bf17c710e184a25a6c8e9d1d9503c38e", 32197685},
+ AD_LISTEND
+ },
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Linux, provided by Strangerke
+ {
+ "hopkins",
+ 0,
+ {
+ {"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,
+ {
+ {"RES_VAN.RES", 0, "29414c05be8f9fe794c61572a65def12", 38832455},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformLinux,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+ {
+ // Hopkins FBI Win95, French, provided by SylvainTV
+ {
+ "hopkins",
+ 0,
+ {
+ {"RES_VFR.RES", 0, "b8a3849063c9eeefe80e82cfce1ad3cd", 39269361},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformWindows,
+ 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",
+ {
+ {"RES_VAN.RES", 0, "8262cfba261c200af4451902689dffe0", 12233202},
+ AD_LISTEND
+ },
+ Common::PL_POL,
+ Common::kPlatformWindows,
+ ADGF_DEMO,
+ 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..6cdfbf47d1
--- /dev/null
+++ b/engines/hopkins/dialogs.cpp
@@ -0,0 +1,783 @@
+/* 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);
+ cursorId = _vm->_events->_mouseCursorId;
+ 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);
+
+ _vm->_events->refreshScreenAndEvents();
+ // 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..51c66c4f92
--- /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 (!_vm->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->display8BitRect(_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..ac0eee2866
--- /dev/null
+++ b/engines/hopkins/font.cpp
@@ -0,0 +1,496 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "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);
+ _vm->_graphicsMan->addDirtyRect(xp, yp, xp + _vm->_objectsMan->getWidth(_font, characterIndex) + 1, yp + _vm->_objectsMan->getHeight(_font, characterIndex) + 1);
+ 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..28f22ed99e
--- /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 = CHARACTER_HOPKINS;
+ _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.
+ // The Russian version looks like a translation of the English version, based on the filenames.
+ switch (_vm->getLanguage()) {
+ case Common::EN_ANY:
+ case Common::PL_POL:
+ case Common::RU_RUS:
+ _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() {
+ 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..94512c3d26
--- /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];
+ PlayerCharacter _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..ebc5cfa8da
--- /dev/null
+++ b/engines/hopkins/graphics.cpp
@@ -0,0 +1,1933 @@
+/* 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;
+ _clipX1 = _clipY1 = 0;
+ _clipFl = false;
+ _reduceX = _reducedY = 0;
+ _zoomOutFactor = 0;
+ _width = 0;
+ _specialWidth = 0;
+ _showZones = false;
+ _showLines = false;
+
+ Common::fill(&_paletteBuffer[0], &_paletteBuffer[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?
+ _manualScroll = true;
+ else
+ _manualScroll = false;
+ _scrollSpeed = 16;
+ } else {
+ _manualScroll = 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 = _paletteBuffer;
+ _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();
+
+ display8BitRect(_backBuffer, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ } else {
+ setScreenWidth(SCREEN_WIDTH * 2);
+ _maxX = SCREEN_WIDTH * 2;
+ clearScreen();
+
+ if (_manualScroll)
+ display8BitRect(_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.
+ _paletteBuffer[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::display8BitRect(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::displayScaled8BitRect(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);
+ display8BitRect(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
+ display8BitRect(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);
+ display8BitRect(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);
+ display8BitRect(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);
+ display8BitRect(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_UINT16(&_paletteBuffer[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_UINT16(&_paletteBuffer[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() {
+ // Display any aras of the screen that need refreshing
+ displayDirtyRects();
+ displayRefreshRects();
+
+ // Extra checks for debug information
+ if (_showZones)
+ displayZones();
+
+ if (_showLines)
+ displayLines();
+
+ // 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
+ _clipX1 = width;
+ if ((xp + width) <= _minX + 300)
+ return;
+ if (xp < _minX + 300) {
+ _posXClipped = _minX + 300 - xp;
+ _clipFl = true;
+ }
+
+ // Clip Y
+ _clipY1 = 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;
+
+ _clipX1 = 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;
+
+ // _clipY1 is always positive thanks to the previous check
+ _clipY1 = 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 < _clipY1; ++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 < _clipX1)
+ *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 < 36; ++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) {
+ displayScaled8BitRect(_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);
+
+ display8BitRect(_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();
+}
+
+/**
+ * Display any zones for the current room
+ */
+void GraphicsManager::displayZones() {
+ Graphics::Surface *screenSurface = g_system->lockScreen();
+
+ for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) {
+ int bobId = _vm->_linesMan->_bobZone[bobZoneId];
+ if (bobId) {
+ // Get the rectangle for the zone
+ Common::Rect r(_vm->_objectsMan->_bob[bobId]._oldX, _vm->_objectsMan->_bob[bobId]._oldY,
+ _vm->_objectsMan->_bob[bobId]._oldX + _vm->_objectsMan->_bob[bobId]._oldWidth,
+ _vm->_objectsMan->_bob[bobId]._oldY + _vm->_objectsMan->_bob[bobId]._oldHeight);
+
+ displayDebugRect(screenSurface, r, 0xff0000);
+ }
+ }
+
+ for (int squareZoneId = 0; squareZoneId <= 99; squareZoneId++) {
+ if (_vm->_linesMan->_zone[squareZoneId]._enabledFl && _vm->_linesMan->_squareZone[squareZoneId]._enabledFl) {
+ Common::Rect r(_vm->_linesMan->_squareZone[squareZoneId]._left, _vm->_linesMan->_squareZone[squareZoneId]._top,
+ _vm->_linesMan->_squareZone[squareZoneId]._right, _vm->_linesMan->_squareZone[squareZoneId]._bottom);
+
+ displayDebugRect(screenSurface, r, 0x00ff00);
+ }
+ }
+
+ g_system->unlockScreen();
+}
+
+/**
+ * Display any zones for the current room
+ */
+void GraphicsManager::displayLines() {
+ Graphics::Surface *screenSurface = g_system->lockScreen();
+
+ uint16* pixels = (uint16*)screenSurface->pixels;
+
+ for (int lineIndex = 0; lineIndex < _vm->_linesMan->_linesNumb; lineIndex++) {
+ int i = 0;
+ do {
+ int x = _vm->_linesMan->_lineItem[lineIndex]._lineData[i] - _scrollPosX;
+ int y = _vm->_linesMan->_lineItem[lineIndex]._lineData[i+1];
+ if (x >= 0 && x < SCREEN_WIDTH && y >= 0 && y < SCREEN_HEIGHT) {
+ pixels[ y * screenSurface->w + x ] = 0xffff;
+ }
+ i += 2;
+ }
+ while(_vm->_linesMan->_lineItem[lineIndex]._lineData[i] != -1);
+ }
+
+ g_system->unlockScreen();
+}
+
+
+void GraphicsManager::displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect, uint32 color) {
+ Common::Rect r = srcRect;
+
+ // Move for scrolling offset and adjust to crop on-screen
+ r.translate(-_scrollPosX, 0);
+ r.left = MAX(r.left, (int16)0);
+ r.top = MAX(r.top, (int16)0);
+ r.right = MIN(r.right, (int16)SCREEN_WIDTH);
+ r.bottom = MIN(r.bottom, (int16)SCREEN_HEIGHT);
+
+ // If there's an on-screen portion, display it
+ if (r.isValidRect())
+ surface->frameRect(r, color);
+}
+
+/**
+ * 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;
+ _clipX1 = 0;
+ _clipY1 = 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
+ _clipX1 = _maxX + 300 - xp300;
+ _clipY1 = _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 > _clipY1)
+ zoomedHeight = _clipY1;
+ if (_posXClipped) {
+ if (_posXClipped >= zoomedWidth)
+ return;
+ zoomedWidth -= _posXClipped;
+ }
+ if (zoomedWidth > _clipX1) {
+ int clippedZoomedWidth = zoomedWidth - _clipX1;
+ clippedDestP -= clippedZoomedWidth;
+ int closestWidth = 0;
+ while (zoomIn(++closestWidth, zoom2) < clippedZoomedWidth)
+ ;
+ spritePixelsP += closestWidth;
+ zoomedWidth = _clipX1;
+ }
+ 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 > _clipY1)
+ zoomedHeight = _clipY1;
+ if (_posXClipped) {
+ if (_posXClipped >= zoomedWidth)
+ return;
+ int closerWidth = 0;
+ while (zoomIn(++closerWidth, zoom2) < _posXClipped)
+ ;
+ spritePixelsP += closerWidth;
+ dest1P += _posXClipped;
+ zoomedWidth = zoomedWidth - _posXClipped;
+ }
+ if (zoomedWidth > _clipX1)
+ zoomedWidth = _clipX1;
+
+ 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 < _clipX1 && *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 < _clipX1 && *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 > _clipY1)
+ spriteHeight1 = _clipY1;
+
+ if (_posXClipped >= spriteWidth)
+ return;
+ spriteWidth -= _posXClipped;
+
+ if (spriteWidth > _clipX1) {
+ int clippedWidth = spriteWidth - _clipX1;
+ spritePixelsP += clippedWidth;
+ dest2P -= clippedWidth;
+ spriteWidth = _clipX1;
+ }
+ 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 > _clipY1)
+ spriteHeight1 = _clipY1;
+ if (_posXClipped) {
+ if (_posXClipped >= spriteWidth)
+ return;
+ spritePixelsP += _posXClipped;
+ dest1P += _posXClipped;
+ spriteWidth -= _posXClipped;
+ }
+ if (spriteWidth > _clipX1)
+ spriteWidth = _clipX1;
+ 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);
+
+ display8BitRect(_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..268db7fc2b
--- /dev/null
+++ b/engines/hopkins/graphics.h
@@ -0,0 +1,193 @@
+/* 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 _clipX1, _clipY1;
+ int _reduceX, _reducedY;
+ int _zoomOutFactor;
+
+ bool _manualScroll;
+
+ 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 displayScaled8BitRect(const byte *surface, int xp, int yp, int width, int height, int destX, int destY);
+
+ void lockScreen();
+ void unlockScreen();
+public:
+ byte _paletteBuffer[PALETTE_SIZE * 2];
+ 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;
+ bool _showZones;
+ bool _showLines;
+
+ 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 displayZones();
+ void displayLines();
+ void displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect, uint32 color = 0xffffff);
+ 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 display8BitRect(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..b773808c50
--- /dev/null
+++ b/engines/hopkins/hopkins.cpp
@@ -0,0 +1,2903 @@
+/* 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::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc) : Engine(syst),
+ _gameDescription(gameDesc), _randomSource("Hopkins") {
+ DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level");
+ _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 && _globals->_curRoomNum != 0;
+}
+
+/**
+ * Returns true if it is currently okay to save the game
+ */
+bool HopkinsEngine::canSaveGameStateCurrently() {
+ return !_globals->_exitId && !_globals->_cityMapEnabledFl && _events->_mouseFl
+ && _globals->_curRoomNum != 0 && !isUnderwaterSubScene();
+}
+
+/**
+ * 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;
+ _events->delay(500);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ if (_events->_rateCounter > 475)
+ _globals->_speed = 2;
+ if (_events->_rateCounter > 700)
+ _globals->_speed = 3;
+
+ if (_startGameSlot == -1)
+ _graphicsMan->fadeOutShort();
+
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+
+ _globals->_characterType = CHARACTER_HOPKINS;
+ _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0;
+ memset(_globals->_saveData, 0, 2000);
+ _globals->_exitId = 0;
+
+ if (getLanguage() != Common::PL_POL)
+ if (!displayAdultDisclaimer())
+ return Common::kNoError;
+
+ 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:
+ // Handles room: Apartment
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM01", "IM01", "ANIM01", "IM01", 2, true);
+ break;
+
+ case 3:
+ // - Displays bank attack when leaving the apartment
+ // - Handles room: bottom of the apartment
+ 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", "BANKUK.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANQUE.ANM", "BANKUK.ANM", 200, 28, 200);
+ _soundMan->_specialSoundNum = 0;
+ _soundMan->removeSample(1);
+ _soundMan->removeSample(2);
+ _soundMan->removeSample(3);
+ _soundMan->removeSample(4);
+ _graphicsMan->fadeOutShort();
+ _globals->_saveData->_data[svBankAttackAnimPlayedFl] = 1;
+ }
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM03", "IM03", "ANIM03", "IM03", 2, false);
+ break;
+
+ case 4:
+ // Handle room: City map
+ _globals->_disableInventFl = true;
+ _objectsMan->handleCityMap();
+ _globals->_disableInventFl = false;
+ break;
+
+ case 5:
+ // Handle room: Outside the bank
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 455;
+
+ if (_globals->_saveData->_data[svFreedHostageFl]) {
+ if (_globals->_saveData->_data[svFreedHostageFl] == 1)
+ _objectsMan->sceneControl2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ } else {
+ _objectsMan->sceneControl2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ }
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->sceneControl2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->sceneControl("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->sceneControl("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _globals->_characterMaxPosY = 440;
+ _linesMan->setMaxLineIdx(20);
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->sceneControl2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ else
+ bombExplosion();
+ break;
+
+ case 10:
+ _objectsMan->sceneControl("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("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->sceneControl("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->sceneControl("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", "JOUR1A.ANM", 12, 12, 2000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ break;
+
+ case 151:
+ if (_fileIO->fileExists("JOUR3A.ANM")) {
+ // The Polish demo uses the animation file than the complete versions
+ _soundMan->playSound(16);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("JOUR3A.ANM", "JOUR3A.ANM", 12, 12, 2000);
+ } else {
+ // The other demos only display a nag screen
+ _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", "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 = CHARACTER_HOPKINS;
+ _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->sceneControl2("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", "BANKUK.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANKUK.ANM", "BANQUE.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->sceneControl2("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->sceneControl2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ else
+ _objectsMan->sceneControl2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->sceneControl2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->sceneControl("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->sceneControl("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+
+ if (!_globals->_saveData->_data[svBombDisarmedFl])
+ bombExplosion();
+ else
+ _objectsMan->sceneControl2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ break;
+
+ case 10:
+ _objectsMan->sceneControl("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM11", "IM11", "ANIM11", "IM11", 2, false);
+ break;
+
+ case 12:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->sceneControl2("IM12", "IM12", "ANIM12", "IM12", 1, false);
+ else
+ bombExplosion();
+ break;
+
+ case 13:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM13", "IM13", "ANIM13", "IM13", 1, true);
+ break;
+
+ case 14:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM14", "IM14", "ANIM14", "IM14", 1, true);
+ break;
+
+ case 15:
+ _objectsMan->sceneControl("IM15", "IM15", "ANIM15", "IM15", 29, false);
+ break;
+
+ case 16:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+
+ if (_globals->_saveData->_data[svForestAvailableFl] == 1) {
+ _objectsMan->sceneControl2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
+ } else if (!_globals->_saveData->_data[svForestAvailableFl]) {
+ _objectsMan->sceneControl2("IM16", "IM16", "ANIM16", "IM16", 7, true);
+ }
+ break;
+
+ case 25:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM25", "IM25", "ANIM25", "IM25", 30, true);
+ break;
+
+ case 26:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM26", "IM26", "ANIM26", "IM26", 30, true);
+
+ case 33:
+ _objectsMan->sceneControl("IM33", "IM33", "ANIM33", "IM33", 8, false);
+ break;
+
+ case 35:
+ displayEndDemo();
+ break;
+
+ case 111:
+ _objectsMan->sceneControl("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->sceneControl("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", "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", "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", "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", "MP.ANM", 10, 16, 200);
+ } else {
+ _animMan->playAnim("MP.ANM", "MP.ANM", 10, 16, 200);
+ _graphicsMan->fadeOutLong();
+ }
+ }
+
+ _events->mouseOff();
+
+ 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 = CHARACTER_HOPKINS;
+ _objectsMan->_mapCarPosX = _objectsMan->_mapCarPosY = 0;
+ memset(_globals->_saveData, 0, 2000);
+
+ _globals->_exitId = 0;
+
+
+ if (_startGameSlot != -1) {
+ _soundMan->playSound(28);
+ _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->sceneControl2("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", "BANKUK.ANM", 200, 28, 200);
+ else
+ _animMan->playAnim("BANKUK.ANM", "BANQUE.ANM", 200, 28, 200);
+ } else {
+ _animMan->playAnim("BANQUE.ANM", "BANKUK.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->sceneControl2("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->sceneControl2("IM05", "IM05A", "ANIM05B", "IM05", 3, false);
+ else
+ _objectsMan->sceneControl2("IM05", "IM05", "ANIM05", "IM05", 3, false);
+ break;
+
+ case 6:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->sceneControl2("IM06", "IM06", "ANIM06", "IM06", 2, true);
+ break;
+
+ case 7:
+ if (_globals->_saveData->_data[svBombBoxOpenedFl])
+ _objectsMan->sceneControl("BOMBEB", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ else
+ _objectsMan->sceneControl("BOMBEA", "BOMBE", "BOMBE", "BOMBE", 2, true);
+ break;
+
+ case 8:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM08", "IM08", "ANIM08", "IM08", 2, true);
+ break;
+
+ case 9:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->sceneControl2("IM09", "IM09", "ANIM09", "IM09", 10, true);
+ else
+ bombExplosion();
+ break;
+
+ case 10:
+ _objectsMan->sceneControl("IM10", "IM10", "ANIM10", "IM10", 9, false);
+ break;
+
+ case 11:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ _objectsMan->sceneControl2("IM11", "IM11", "ANIM11", "IM11", 2, false);
+ break;
+
+ case 12:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svBombDisarmedFl])
+ _objectsMan->sceneControl2("IM12", "IM12", "ANIM12", "IM12", 1, false);
+ else
+ bombExplosion();
+ break;
+
+ case 13:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM13", "IM13", "ANIM13", "IM13", 1, true);
+ break;
+
+ case 14:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM14", "IM14", "ANIM14", "IM14", 1, true);
+ break;
+
+ case 15:
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->sceneControl("IM15", "IM15", "ANIM15", "IM15", 29, false);
+ else
+ _objectsMan->sceneControl("IM15", "IM15", "ANIM15", "IM15", 18, false);
+ break;
+
+ case 16:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svForestAvailableFl] == 1)
+ _objectsMan->sceneControl2("IM16", "IM16A", "ANIM16", "IM16", 7, true);
+ else
+ _objectsMan->sceneControl2("IM16", "IM16", "ANIM16", "IM16", 7, true);
+ break;
+
+ case 17:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svHutBurningFl] == 1)
+ _objectsMan->sceneControl2("IM17", "IM17A", "ANIM17", "IM17", 11, true);
+ else if (!_globals->_saveData->_data[svHutBurningFl])
+ _objectsMan->sceneControl2("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", "PURG1.ANM", 12, 18, 50);
+ } else if (getPlatform() == Common::kPlatformWindows) {
+ _soundMan->playSound(29);
+ _animMan->playAnim("PURG1A.ANM", "PURG1.ANM", 12, 18, 50);
+ _graphicsMan->fadeOutShort();
+ } else {
+ _soundMan->playSound(6);
+ _animMan->playAnim("PURG1A.ANM", "PURG1.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->sceneControl2("IM18", "IM18", "ANIM18", "IM18", 29, false);
+ else
+ _objectsMan->sceneControl2("IM18", "IM18", "ANIM18", "IM18", 6, false);
+ break;
+
+ case 19:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svHeavenGuardGoneFl])
+ _objectsMan->sceneControl2("IM19", "IM19A", "ANIM19", "IM19", 6, true);
+ else
+ _objectsMan->sceneControl2("IM19", "IM19", "ANIM19", "IM19", 6, true);
+ break;
+
+ case 20:
+ _linesMan->setMaxLineIdx(10);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("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", "PURG2.ANM", 12, 18, 50);
+ if (getPlatform() != Common::kPlatformLinux)
+ _graphicsMan->fadeOutShort();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+ break;
+
+ case 22:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM22", "IM22", "ANIM22", "IM22", 6, true);
+ break;
+
+ case 23:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM23", "IM23", "ANIM23", "IM23", 6, true);
+ break;
+
+ case 24:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 450;
+ if (_globals->_saveData->_data[svCinemaDogGoneFl] == 1)
+ _objectsMan->sceneControl2("IM24", "IM24A", "ANIM24", "IM24", 1, true);
+ else
+ _objectsMan->sceneControl2("IM24", "IM24", "ANIM24", "IM24", 1, true);
+ break;
+
+ case 25:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->sceneControl2("IM25", "IM25", "ANIM25", "IM25", 30, true);
+ else
+ _objectsMan->sceneControl2("IM25", "IM25", "ANIM25", "IM25", 8, true);
+ break;
+
+ case 26:
+ _linesMan->setMaxLineIdx(40);
+ _globals->_characterMaxPosY = 435;
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->sceneControl2("IM26", "IM26", "ANIM26", "IM26", 30, true);
+ else
+ _objectsMan->sceneControl2("IM26", "IM26", "ANIM26", "IM26", 8, true);
+ break;
+
+ case 27:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 440;
+ if (_globals->_saveData->_data[svPoolDogGoneFl] == 1)
+ _objectsMan->sceneControl2("IM27", "IM27A", "ANIM27", "IM27", 27, true);
+ else
+ _objectsMan->sceneControl2("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->sceneControl2("IM28", "IM28", "ANIM28", "IM28", 1, false);
+ else
+ _objectsMan->sceneControl2("IM28A", "IM28", "ANIM28", "IM28", 1, false);
+ break;
+
+ case 29:
+ _linesMan->setMaxLineIdx(50);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM29", "IM29", "ANIM29", "IM29", 1, true);
+ break;
+
+ case 30:
+ // Shooting
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM30", "IM30", "ANIM30", "IM30", 24, false);
+ break;
+
+ case 31:
+ // Shooting target
+ _objectsMan->sceneControl("IM31", "IM31", "ANIM31", "IM31", 10, true);
+ break;
+
+ case 32:
+ _linesMan->setMaxLineIdx(20);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM32", "IM32", "ANIM32", "IM32", 2, true);
+ break;
+
+ case 33:
+ _objectsMan->sceneControl("IM33", "IM33", "ANIM33", "IM33", 8, false);
+ break;
+
+ case 34:
+ // In the airport, before the flight cut-scene
+ _objectsMan->sceneControl("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->sceneControl2(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:
+ // Flight cut scene
+ playPlaneCutscene();
+ _globals->_exitId = 51;
+ break;
+
+ case 51:
+ _linesMan->setMaxLineIdx(10);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM51", "IM51", "ANIM51", "IM51", 14, true);
+ break;
+
+ case 52:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM52", "IM52", "ANIM52", "IM52", 14, true);
+ break;
+
+ case 54:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM54", "IM54", "ANIM54", "IM54", 14, true);
+ break;
+
+ case 55:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 460;
+ _objectsMan->sceneControl2("IM55", "IM55", "ANIM55", "IM55", 14, false);
+ break;
+
+ case 56:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM56", "IM56", "ANIM56", "IM56", 14, false);
+ break;
+
+ case 57:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM57", "IM57", "ANIM57", "IM57", 14, true);
+ break;
+
+ case 58:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM58", "IM58", "ANIM58", "IM58", 14, false);
+ break;
+
+ case 59:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM59", "IM59", "ANIM59", "IM59", 21, false);
+ break;
+
+ case 60:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM60", "IM60", "ANIM60", "IM60", 21, false);
+ break;
+
+ case 61:
+ if (_globals->_saveData->_data[svBaseElevatorCond1] == 1 && !_globals->_saveData->_data[svBaseFireFl])
+ handleConflagration();
+ _objectsMan->sceneControl("IM61", "IM61", "ANIM61", "IM61", 21, false);
+ break;
+
+ case 62:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM62", "IM62", NULL, "IM62", 21, false);
+ break;
+
+ case 63:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM63", "IM63", "ANIM63", "IM63", 21, false);
+ break;
+
+ case 64:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM64", "IM64", "ANIM64", "IM64", 21, true);
+ break;
+
+ case 65:
+ _linesMan->setMaxLineIdx(30);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM65", "IM65", "ANIM65", "IM65", 21, false);
+ break;
+
+ case 66:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM66", "IM66", "ANIM66", "IM66", 21, false);
+ break;
+
+ case 67:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM67", "IM67", NULL, "IM67", 21, false);
+ break;
+
+ case 68:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM68", "IM68", "ANIM68", "IM68", 21, true);
+ break;
+
+ case 69:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM69", "IM69", "ANIM69", "IM69", 21, false);
+ break;
+
+ case 70:
+ _linesMan->setMaxLineIdx(8);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM70", "IM70", NULL, "IM70", 21, false);
+ break;
+
+ case 71:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 445;
+ _objectsMan->sceneControl2("IM71", "IM71", "ANIM71", "IM71", 21, false);
+ break;
+
+ case 73:
+ _linesMan->setMaxLineIdx(15);
+ _globals->_characterMaxPosY = 445;
+ if (_globals->_saveData->_data[svSecondElevatorAvailableFl] == 1)
+ _objectsMan->sceneControl2("IM73", "IM73A", "ANIM73", "IM73", 21, true);
+ else
+ _objectsMan->sceneControl2("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->sceneControl2("IM93", "IM93C", "ANIM93", "IM93", 29, true);
+ else
+ _objectsMan->sceneControl2("IM93", "IM93C", "ANIM93", "IM93", 26, true);
+ } else {
+ if (getPlatform() == Common::kPlatformLinux || getPlatform() == Common::kPlatformWindows)
+ _objectsMan->sceneControl2("IM93", "IM93", "ANIM93", "IM93", 29, true);
+ else
+ _objectsMan->sceneControl2("IM93", "IM93", "ANIM93", "IM93", 26, true);
+ }
+ break;
+
+ case 94:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 440;
+ _objectsMan->sceneControl2("IM94", "IM94", "ANIM94", "IM94", 19, true);
+ break;
+
+ case 95:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM95", "IM95", "ANIM95", "IM95", 19, false);
+ break;
+
+ case 96:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM96", "IM96", "ANIM96", "IM96", 19, false);
+ break;
+
+ case 97:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("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", "PURG1.ANM", 12, 18, 50);
+ _graphicsMan->fadeOutShort();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ }
+ break;
+
+ case 98:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM98", "IM98", "ANIM98", "IM98", 19, true);
+ break;
+
+ case 99:
+ _linesMan->setMaxLineIdx(5);
+ _globals->_characterMaxPosY = 435;
+ _objectsMan->sceneControl2("IM99", "IM99", "ANIM99", "IM99", 19, true);
+ break;
+
+ case 100:
+ playEnding();
+ break;
+
+ case 111:
+ _objectsMan->sceneControl("IM111", "IM111", "ANIM111", "IM111", 10, false);
+ break;
+
+ case 112:
+ _objectsMan->sceneControl("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", "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", "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", "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 = CHARACTER_HOPKINS;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _graphicsMan->_lineNbr = SCREEN_WIDTH;
+ break;
+ }
+ }
+ _globals->_characterSpriteBuf = _globals->freeMemory(_globals->_characterSpriteBuf);
+ restoreSystem();
+ return true;
+}
+
+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", "J1.ANM", 12, 12, 50);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+ _events->mouseOff();
+ _soundMan->mixVoice(1, 3);
+ _animMan->playAnim("J2.ANM", "J2.ANM", 12, 12, 50);
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _events->mouseOff();
+ _soundMan->mixVoice(2, 3);
+ _animMan->playAnim("J3.ANM", "J3.ANM", 12, 12, 50);
+
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _events->mouseOff();
+ _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);
+
+ _events->delay(500);
+
+ _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", "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", "INTRO1.ANM", 10, 24, 18);
+ _soundMan->_specialSoundNum = 0;
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _animMan->playAnim("INTRO2.ANM", "INTRO2.ANM", 10, 24, 18);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _animMan->playAnim("INTRO3.ANM", "INTRO3.ANM", 10, 24, 200);
+ if (shouldQuit() || _events->_escKeyFl)
+ return;
+
+ _graphicsMan->_fadingFl = true;
+ _animMan->unsetClearAnimFlag();
+ _animMan->playAnim("J4.ANM", "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", "BOMBE2.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", "BASE00.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE05A.ANM", "BASE05.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE10A.ANM", "BASE10.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE20A.ANM", "BASE20.ANM", 10, 18, 18);
+ // CHECKME: The original code was doing the opposite test, which was a bug.
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE30A.ANM", "BASE30.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE40A.ANM", "BASE40.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("BASE50A.ANM", "BASE50.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC00A.ANM", "OC00.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC05A.ANM", "OC05.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC10A.ANM", "OC10.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("OC20A.ANM", "OC20.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl) {
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("OC30A.ANM", "OC30.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", "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", "JOUR2A.anm", 12, 12, 1000);
+ _soundMan->playSound(11);
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+ _animMan->playAnim("FF1a.anm", "FF1.anm", 18, 18, 9);
+ _animMan->playAnim("FF1a.anm", "FF1.anm", 9, 18, 9);
+ _animMan->playAnim("FF1a.anm", "FF1.anm", 9, 18, 18);
+ _animMan->playAnim("FF1a.anm", "FF1.anm", 9, 18, 9);
+ _animMan->playAnim("FF2a.anm", "FF2.anm", 24, 24, 100);
+ _events->mouseOff();
+ displayCredits();
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ _dialog->enableInvent();
+ _globals->_disableInventFl = false;
+ } else {
+ _soundMan->_specialSoundNum = 200;
+ _soundMan->_skipRefreshFl = true;
+ _animMan->playAnim2("BERM.ANM", "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", "JOUR4A.ANM", 12, 12, 1000);
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+ _globals->_exitId = 300;
+ }
+ _globals->_characterSpriteBuf = _fileIO->loadFile("PERSO.SPR");
+ _globals->_characterType = CHARACTER_HOPKINS;
+ _globals->_eventMode = EVENTMODE_DEFAULT;
+}
+
+void HopkinsEngine::playPlaneCutscene() {
+ _soundMan->playSound(28);
+ _globals->_eventMode = EVENTMODE_IGNORE;
+ _graphicsMan->clearScreen();
+ _graphicsMan->clearPalette();
+
+ _animMan->unsetClearAnimFlag();
+ _animMan->playAnim("AEROP00A.ANM", "AEROP00.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("SEROP10A.ANM", "SEROP10A.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP20A.ANM", "AEROP20.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP30A.ANM", "AEROP30.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP40A.ANM", "AEROP40.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP50A.ANM", "AEROP50.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP60A.ANM", "AEROP60.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("AEROP70A.ANM", "AEROP70.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS00A.ANM", "TRANS00.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS10A.ANM", "TRANS10.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS15A.ANM", "TRANS15.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS20A.ANM", "TRANS20.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS30A.ANM", "TRANS30.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl)
+ _animMan->playAnim("TRANS40A.ANM", "TRANS40.ANM", 10, 18, 18);
+ if (!_events->_escKeyFl) {
+ _graphicsMan->_fadingFl = true;
+ _animMan->playAnim("PARA00A.ANM", "PARA00.ANM", 9, 9, 9);
+ } else {
+ _graphicsMan->fadeOutShort();
+ }
+
+ _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;
+ Common::String filename;
+ switch (_globals->_language) {
+ case LANG_EN:
+ filename = "CREAN.TXT";
+ break;
+ case LANG_FR:
+ filename = "CREFR.TXT";
+ break;
+ case LANG_SP:
+ filename = "CREES.TXT";
+ break;
+ default:
+ error("Unhandled language");
+ break;
+ }
+
+ if (!_fileIO->fileExists(filename)) {
+ _globals->_creditsLineNumb = 1;
+ _globals->_creditsItem[0]._color = '1';
+ _globals->_creditsItem[0]._actvFl = true;
+ _globals->_creditsItem[0]._linePosY = _globals->_creditsPosY;
+ strcpy((char *)_globals->_creditsItem[0]._line, "The End");
+ _globals->_creditsItem[0]._lineSize = 7;
+ return;
+ }
+
+ bufPtr = _fileIO->loadFile(filename);
+
+ 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 >= 51) && (nextY <= 460)) {
+ 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, 430, _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 = CHARACTER_HOPKINS;
+}
+
+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;
+ }
+}
+
+bool HopkinsEngine::isUnderwaterSubScene() {
+ return (_globals->_curRoomNum >= 77) && (_globals->_curRoomNum <= 89);
+}
+
+} // End of namespace Hopkins
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
new file mode 100644
index 0000000000..398e41a4d2
--- /dev/null
+++ b/engines/hopkins/hopkins.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_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 {
+
+#define DEBUG_BASIC 1
+#define DEBUG_INTERMEDIATE 2
+#define DEBUG_DETAILED 3
+
+#define SCREEN_WIDTH 640
+#define SCREEN_HEIGHT 480
+
+enum HopkinsDebugChannels {
+ kDebugPath = 1 << 0
+};
+
+/**
+ * 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();
+ bool isUnderwaterSubScene();
+
+ /**
+ * 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;
+
+ 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();
+};
+
+} // 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..aa708fdfb2
--- /dev/null
+++ b/engines/hopkins/lines.cpp
@@ -0,0 +1,2956 @@
+/* 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 + 1; ++i)
+ Common::fill((byte *)&_zoneLine[i], (byte *)&_zoneLine[i] + sizeof(LigneZoneItem), 0);
+
+ for (int i = 0; i < MAX_LINES; ++i)
+ 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) {
+ debugC(5, kDebugPath, "appendToRouteInc(%d, %d, route, %d)", from, to, 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) {
+ debugC(5, kDebugPath, "appendToRouteDecc(%d, %d, route, %d)", from, to, 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) {
+ debugC(5, kDebugPath, "loadLines(%s)", file.c_str());
+ 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) {
+ debugC(5, kDebugPath, "checkInventoryHotspots(%d, %d)", posX, 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) {
+ debugC(5, kDebugPath, "checkInventoryHotspotsRow(%d, %d, %d)", posX, minZoneNum, lastRow ? 1 : 0);
+ 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) {
+ debugC(5, kDebugPath, "addZoneLine(%d, %d, %d, %d, %d, %d)", idx, fromX, fromY, destX, destY, bobZoneIdx);
+ int16 *zoneData;
+
+ if (fromX == fromY && fromY == destX && fromY == destY) {
+ _bobZoneFl[bobZoneIdx] = true;
+ _bobZone[bobZoneIdx] = fromY;
+ } else {
+ assert(idx < MAX_LINES + 1);
+ _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) {
+ debugC(5, kDebugPath, "addLine(%d, %d, %d, %d, %d, %d)", lineIdx, direction, fromX, fromY, destX, 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) {
+ debugC(5, kDebugPath, "checkCollisionLine(%d, %d, foundDataIdx, foundLineIdx, %d, %d)", xp, yp, startLineIdx ,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() {
+ debugC(5, kDebugPath, "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) {
+ debugC(5, kDebugPath, "avoidObstacle(%d, %d, %d, %d, %d, route)", lineIdx, lineDataIdx, routeIdx, destLineIdx, destLineDataIdx);
+ 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) {
+ debugC(5, kDebugPath, "avoidObstacleOnSegment(%d, %d, %d, %d, %d, route, %d, %d)", lineIdx, lineDataIdx, routeIdx, destLineIdx, destLineDataIdx, startLineIdx, 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) {
+ debugC(5, kDebugPath, "MIRACLE(%d, %d, %d, %d, %d)", fromX, fromY, lineIdx, destLineIdx, 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) {
+ debugC(5, kDebugPath, "computeRouteIdx(%d, %d, %d, %d, %d, %d, %d)", lineIdx, dataIdx, fromX, fromY, destX, destY, routerIdx);
+ 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;
+ do {
+ --curY;
+ if (checkCollisionLine(destX, curY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx)) {
+ linesIdxUp = foundLineIdx;
+ break;
+ }
+ } while (curY && curY >= minLineY);
+
+ curY = destY;
+ int lineIdxDown = -1;
+ do {
+ ++curY;
+ if (checkCollisionLine(destX, curY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx)) {
+ lineIdxDown = foundLineIdx;
+ break;
+ }
+ } while (curY < _vm->_globals->_characterMaxPosY && curY < maxLineY);
+
+ int curX = destX;
+ int lineIdxRight = -1;
+ do {
+ ++curX;
+ if (checkCollisionLine(curX, destY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx)) {
+ lineIdxRight = foundLineIdx;
+ break;
+ }
+ } while (curX < _vm->_graphicsMan->_maxX && curX < maxLineX);
+
+ curX = destX;
+ int lineIdxLeft = -1;
+ do {
+ --curX;
+ if (checkCollisionLine(curX, destY, &foundDataIdx, &foundLineIdx, startLineIdx, endLineIdx)) {
+ lineIdxLeft = foundLineIdx;
+ break;
+ }
+ } while (curX > 0 && curX > minLineX);
+
+ 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) {
+ debugC(5, kDebugPath, "findRoute(%d, %d, %d, %d)", fromX, fromY, destX, 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) {
+ debugC(5, kDebugPath, "useRoute0(%d, %d)", idx, 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) {
+ debugC(5, kDebugPath, "useRoute1(%d, %d)", idx, 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) {
+ debugC(5, kDebugPath, "useRoute2(%d, %d)", idx, 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) {
+ debugC(5, kDebugPath, "characterRoute(%d, %d, %d, %d, %d, %d, %d)", fromX, fromY, destX, destY, startLineIdx, endLineIdx, 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;
+ 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 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;
+ }
+
+ if (_testRoute0[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) {
+ debugC(5, kDebugPath, "cityMapCarRoute(%d, %d, %d, %d)", x1, y1, x2, 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) {
+ debugC(5, kDebugPath, "checkSmoothMove(%d, %d, %d, %d)", fromX, fromY, destX, 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) {
+ debugC(5, kDebugPath, "makeSmoothMove(%d, %d, %d, %d)", fromX, fromY, destX, 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);
+ }
+ int oldY = curY;
+ for (int i = 0; i < realSpeedX; i++) {
+ --curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if (curY != oldY + 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);
+ }
+ int oldY = curY;
+ for (int i = 0; i < realSpeedX; i++) {
+ ++curX;
+ _smoothRoute[smoothIdx]._posX = curX;
+ if (curY != oldY + 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) {
+ debugC(5, kDebugPath, "PLAN_TEST(%d, %d, %d, %d, %d)", paramX, paramY, superRouteIdx, paramStartLineIdx, 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) {
+ debugC(5, kDebugPath, "testLine(%d, %d, testValue, foundLineIdx, foundDataIdx)", paramX, paramY);
+ 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)
+ continue;
+
+ 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) {
+ debugC(5, kDebugPath, "computeYSteps(%d)", idx);
+ int zoomPct = _vm->_globals->_spriteSize[idx];
+ if (_vm->_globals->_characterType == CHARACTER_HOPKINS_CLONE) {
+ if (zoomPct < 0)
+ zoomPct = -zoomPct;
+ zoomPct = 20 * (5 * zoomPct - 100) / -80;
+ } else if (_vm->_globals->_characterType == CHARACTER_SAMANTHA) {
+ 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) {
+ debugC(5, kDebugPath, "optimizeRoute(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() {
+ debugC(9, kDebugPath, "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;
+ }
+
+ // WORKAROUND: Avoid allowing hotspots that should remain non-interactive
+ if (bobZoneId == 24 && _vm->_globals->_curRoomNum == 14)
+ continue;
+
+ 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) {
+ debugC(7, kDebugPath, "checkCollision(%d, %d)", xp, 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() {
+ debugC(5, kDebugPath, "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 + 1; ++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() {
+ debugC(5, kDebugPath, "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() {
+ debugC(5, kDebugPath, "clearAllZones()");
+ for (int idx = 0; idx < MAX_LINES; ++idx)
+ removeZoneLine(idx);
+}
+
+/**
+ * Remove Zone Line
+ */
+void LinesManager::removeZoneLine(int idx) {
+ debugC(5, kDebugPath, "removeZoneLine(%d)", idx);
+ assert(idx < MAX_LINES + 1);
+ _zoneLine[idx]._zoneData = (int16 *)_vm->_globals->freeMemory((byte *)_zoneLine[idx]._zoneData);
+}
+
+void LinesManager::resetLines() {
+ debugC(5, kDebugPath, "resetLines()");
+ for (int idx = 0; idx < MAX_LINES; ++idx) {
+ _lineItem[idx]._lineData = (int16 *)_vm->_globals->freeMemory((byte *)_lineItem[idx]._lineData);
+ _lineItem[idx]._lineDataEndIdx = 0;
+ _lineItem[idx]._lineData = NULL;
+ }
+}
+
+void LinesManager::setMaxLineIdx(int idx) {
+ debugC(5, kDebugPath, "setMaxLineIdx(%d)", idx);
+ _maxLineIdx = idx;
+}
+
+void LinesManager::resetLastLine() {
+ debugC(5, kDebugPath, "resetLastLine()");
+ _lastLine = 0;
+}
+
+void LinesManager::resetLinesNumb() {
+ debugC(5, kDebugPath, "resetLinesNumb()");
+ _linesNumb = 0;
+}
+
+void LinesManager::enableZone(int idx) {
+ debugC(5, kDebugPath, "enableZone(%d)", idx);
+ if (_bobZone[idx]) {
+ _bobZoneFl[idx] = true;
+ } else {
+ _zone[idx]._enabledFl = true;
+ }
+}
+
+void LinesManager::disableZone(int idx) {
+ debugC(5, kDebugPath, "disableZone(%d)", idx);
+ if (_bobZone[idx]) {
+ _bobZoneFl[idx] = false;
+ } else {
+ _zone[idx]._enabledFl = false;
+ }
+}
+
+void LinesManager::checkZone() {
+ debugC(9, kDebugPath, "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();
+
+ // WORKAROUND: Incorrect hotspot zones in the guard's control room
+ if (_vm->_globals->_curRoomNum == 71 && (zoneId == 14 || zoneId == 12 || zoneId == 17))
+ zoneId = _oldMouseZoneId;
+ } 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..b32dc6e2a5
--- /dev/null
+++ b/engines/hopkins/lines.h
@@ -0,0 +1,198 @@
+/* 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
+
+#define MAX_LINES 400
+
+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[MAX_LINES+1];
+ SegmentItem _segment[101];
+ int _currentSegmentId;
+ int _maxLineIdx;
+ int _lastLine;
+ 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;
+ 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];
+ SquareZoneItem _squareZone[101];
+ LigneItem _lineItem[MAX_LINES];
+ int _linesNumb;
+
+ 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..455f4ad8d4
--- /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 (_vm->shouldQuit())
+ return -1;
+
+ result = 0;
+ while (!_vm->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 (_vm->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..f2f547557f
--- /dev/null
+++ b/engines/hopkins/objects.cpp
@@ -0,0 +1,4061 @@
+/* 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);
+ Common::fill((byte *)&_lockedAnims[i], (byte *)&_lockedAnims[i] + sizeof(LockAnimItem), 0);
+ }
+
+ for (int i = 0; i < 30; ++i) {
+ Common::fill((byte *)&_vBob[i], (byte *)&_vBob[i] + sizeof(VBobItem), 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]._zoomFactor;
+
+ 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 = CHARACTER_HOPKINS;
+ 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 = CHARACTER_SAMANTHA;
+ 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 == CHARACTER_HOPKINS_CLONE) {
+ size = 20 * (5 * abs(size) - 100) / -80;
+ } else if (_vm->_globals->_characterType == CHARACTER_SAMANTHA) {
+ 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", "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->display8BitRect(_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) {
+ assert(idx < 36);
+ 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) {
+ assert(idx < 36);
+ _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;
+ break;
+ 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", "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::sceneControl(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::sceneControl2(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 != CHARACTER_HOPKINS && !_vm->_globals->_saveData->_data[svAlternateSpriteFl] && !_vm->_globals->_saveData->_data[svField356]) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR");
+ _vm->_globals->_characterType = CHARACTER_HOPKINS;
+ }
+
+ if (_vm->_globals->_characterType == CHARACTER_HOPKINS && _vm->_globals->_saveData->_data[svAlternateSpriteFl] == 1) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("HOPFEM.SPR");
+ _vm->_globals->_characterType = CHARACTER_HOPKINS_CLONE;
+ }
+
+ if (_vm->_globals->_characterType != CHARACTER_SAMANTHA && _vm->_globals->_saveData->_data[svField356] == 1) {
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PSAMAN.SPR");
+ _vm->_globals->_characterType = CHARACTER_SAMANTHA;
+ }
+ _vm->_globals->loadCharacterData();
+ switch (_vm->_globals->_characterType) {
+ case CHARACTER_HOPKINS:
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 34, 190);
+ break;
+ case CHARACTER_HOPKINS_CLONE:
+ addStaticSprite(_vm->_globals->_characterSpriteBuf, _characterPos, 0, _startSpriteIndex, 0, false, 28, 155);
+ break;
+ case CHARACTER_SAMANTHA:
+ 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..5f1f5b1f59
--- /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[36];
+ 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 sceneControl(const Common::String &backgroundFile, const Common::String &linkFile,
+ const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen);
+ void sceneControl2(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..98fb15046e
--- /dev/null
+++ b/engines/hopkins/saveload.cpp
@@ -0,0 +1,337 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#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 *savefile = g_system->getSavefileManager()->openForSaving(file);
+
+ if (savefile) {
+ size_t bytesWritten = savefile->write(buf, n);
+ savefile->finalize();
+ delete savefile;
+
+ 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 *savefile = g_system->getSavefileManager()->openForLoading(file);
+ if (savefile == NULL)
+ error("Error opening file - %s", file.c_str());
+
+ int32 filesize = savefile->size();
+ savefile->read(buf, filesize);
+ delete savefile;
+}
+
+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(
+ _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_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);
+
+ // Do like in the original and show thumbnail as a grayscale picture
+ int lum = (r * 21 + g * 72 + b * 7) / 100;
+ r = g = b = lum;
+
+ // 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..6fee814180
--- /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);
+ 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..7e150624b8
--- /dev/null
+++ b/engines/hopkins/script.cpp
@@ -0,0 +1,2628 @@
+/* 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 == 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 == 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) {
+ // HACK: This piece of code is a replacement to the missing STE opcode when entering the FBI lab.
+ if (_vm->_globals->_curRoomNum == 10) {
+ _vm->_globals->_prevScreenId = _vm->_globals->_screenId;
+ _vm->_globals->_saveData->_data[svLastPrevScreenId] = _vm->_globals->_screenId;
+ _vm->_globals->_screenId = _vm->_globals->_saveData->_data[svLastScreenId] = 10;
+ }
+ _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:
+ // Bank - negotiations between Hopkins and one of the killers
+ _vm->_fontMan->hideText(9);
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_events->refreshScreenAndEvents();
+ _vm->_talkMan->startAnimatedCharacterDialogue("bqetueur.pe2");
+ break;
+
+ case 13:
+ // Bank - after negotiations, Hopkins enters the bank
+ _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->_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", "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;
+ _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", "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 = CHARACTER_HOPKINS_CLONE;
+ _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 1;
+ _vm->_globals->loadCharacterData();
+ _vm->_objectsMan->_sprite[0]._deltaX = 28;
+ _vm->_objectsMan->_sprite[0]._deltaY = 155;
+ _vm->_objectsMan->_sprite[0]._spriteData = _vm->_globals->_characterSpriteBuf;
+ _vm->_objectsMan->computeAndSetSpriteSize();
+ break;
+
+ case 57:
+ _vm->_globals->_characterSpriteBuf = _vm->_fileIO->loadFile("PERSO.SPR");
+ _vm->_globals->_characterType = CHARACTER_HOPKINS;
+ _vm->_globals->_saveData->_data[svAlternateSpriteFl] = 0;
+ _vm->_globals->loadCharacterData();
+ _vm->_objectsMan->_sprite[0]._deltaX = 34;
+ _vm->_objectsMan->_sprite[0]._deltaY = 190;
+ _vm->_objectsMan->_sprite[0]._spriteData = _vm->_globals->_characterSpriteBuf;
+ _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;
+ }
+ break;
+ 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:
+ // Shooting target - Shooting at target
+ 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:
+ // Shooting target - Using the level
+ _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("T421A.ANM", "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->fadeOutShort();
+
+ 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:
+ // Discuss with pilot just before Flight cutscene
+ _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", "BOMBE1.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", "BOMBE2.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", "BOMBE2.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", "BOMBE2.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", "BOMBE3.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", "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..bf816c08a4
--- /dev/null
+++ b/engines/hopkins/sound.cpp
@@ -0,0 +1,905 @@
+/* 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)
+ hasActiveVoice |= checkVoiceStatus(i);
+
+ if (!hasActiveVoice && _soundFl) {
+ _soundFl = false;
+ _currentSoundIndex = 0;
+ }
+}
+
+bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) {
+ int fileNumber;
+ 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;
+ }
+ }
+ }
+ int 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);
+ 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 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;
+ 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..736ec9865c
--- /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->display8BitRect(_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->display8BitRect(_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/hugo/detection.cpp b/engines/hugo/detection.cpp
index bb5944acc8..ede4ab2279 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -61,7 +61,7 @@ static const HugoGameDescription gameDescriptions[] = {
"hugo1", 0,
AD_ENTRY1s("house.art", "c9403b2fe539185c9fd569b6cc4ff5ca", 14811),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -85,7 +85,7 @@ static const HugoGameDescription gameDescriptions[] = {
"hugo2", 0,
AD_ENTRY1s("objects.dat", "88a718cc0ff2b3b25d49aaaa69d6d52c", 155240),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
@@ -109,7 +109,7 @@ static const HugoGameDescription gameDescriptions[] = {
"hugo3", 0,
AD_ENTRY1s("objects.dat", "bb1b061538a445f2eb99b682c0f506cc", 136419),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
GF_PACKED,
GUIO0()
},
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index 1758f3f6a5..e58c2e57d6 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -59,6 +59,11 @@ static const int s_bootCypherLen = sizeof(s_bootCypher) - 1;
FileManager::FileManager(HugoEngine *vm) : _vm(vm) {
_hasReadHeader = false;
_firstUIFFl = true;
+
+ _UIFHeader->_size = 0;
+ _UIFHeader->_offset = 0;
+ _soundHdr->_size = 0;
+ _soundHdr->_offset = 0;
}
FileManager::~FileManager() {
@@ -491,7 +496,7 @@ void FileManager::readBootFile() {
memset(_vm->_boot._distrib, '\0', sizeof(_vm->_boot._distrib));
_vm->_boot._registered = kRegFreeware;
return;
- } else if (_vm->getPlatform() == Common::kPlatformPC) {
+ } else if (_vm->getPlatform() == Common::kPlatformDOS) {
warning("readBootFile - Skipping as H2 and H3 Dos may be shareware");
memset(_vm->_boot._distrib, '\0', sizeof(_vm->_boot._distrib));
_vm->_boot._registered = kRegShareware;
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 9d28e0ac69..bcf06055f8 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -66,6 +66,33 @@ HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(sy
_console = new HugoConsole(this);
_rnd = 0;
+
+ _screen = NULL;
+ _mouse = NULL;
+ _inventory = NULL;
+ _parser = NULL;
+ _route = NULL;
+ _sound = NULL;
+ _intro = NULL;
+ _object = NULL;
+ _text = NULL;
+ _topMenu = NULL;
+ _status._storyModeFl = false;
+ _status._gameOverFl = false;
+ _status._lookFl = false;
+ _status._recallFl = false;
+ _status._newScreenFl = false;
+ _status._godModeFl = false;
+ _status._showBoundariesFl = false;
+ _status._doQuitFl = false;
+ _status._skipIntroFl = false;
+ _status._helpFl = false;
+ _status._tick = 0;
+ _status._viewState = kViewIntroInit;
+ _status._song = 0;
+ _gameType = kGameTypeNone;
+ _platform = Common::kPlatformUnknown;
+ _packedFl = false;
}
HugoEngine::~HugoEngine() {
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index f2ae06eb39..505e356049 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -41,6 +41,7 @@ namespace Hugo {
IntroHandler::IntroHandler(HugoEngine *vm) : _vm(vm), _introX(0), _introY(0) {
_introXSize = 0;
+ _introTicks = 0;
}
IntroHandler::~IntroHandler() {
@@ -76,6 +77,7 @@ void IntroHandler::freeIntroData() {
}
intro_v1d::intro_v1d(HugoEngine *vm) : IntroHandler(vm) {
+ _introState = 0;
}
intro_v1d::~intro_v1d() {
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index a95170696c..ae286c8afb 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -169,7 +169,7 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in
_vm->_object->useObject(objId); // Use status.objid on object
} else { // Clicked over viewport object
Object *obj = &_vm->_object->_objects[objId];
- int16 x, y;
+ int16 x = 0, y = 0;
switch (obj->_viewx) { // Where to walk to
case -1: // Walk to object position
if (_vm->_object->findObjectSpace(obj, &x, &y))
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 5fdb2026a7..2585c64fd8 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -235,7 +235,7 @@ void Parser::charHandler() {
if (_cmdLineIndex >= kMaxLineSize) {
//MessageBeep(MB_ICONASTERISK);
warning("STUB: MessageBeep() - Command line too long");
- } else if (isprint(static_cast<unsigned char>(c))) {
+ } else if (Common::isPrint(c)) {
_cmdLine[_cmdLineIndex++] = c;
_cmdLine[_cmdLineIndex] = '\0';
}
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index 54e1abcc2c..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;
@@ -1206,7 +1206,7 @@ void CharacterGenerator::finish() {
static const int8 itemList1[] = { 1, 2, 0, 17, -1, 0, 0 };
static const int8 itemList2[] = { 2, 56, 1, 17, 31, 0, 1, 23, 1, 17, 31, 0, 1 };
static const int8 itemList3[] = { 2, 1, 1, 17, 31, 1, 1, 1, 0, 17, 31, 2, 1 };
- static const int8 *itemList[] = { itemList0, itemList1, itemList2, itemList3 };
+ static const int8 *const itemList[] = { itemList0, itemList1, itemList2, itemList3 };
for (int i = 0; i < 4; i++) {
EoBCharacter *c = &_characters[i];
@@ -1496,7 +1496,7 @@ TransferPartyWiz::~TransferPartyWiz() {
}
bool TransferPartyWiz::start() {
- _screen->copyPage(0, _vm->_useHiResDithering ? 1 : 12);
+ _screen->copyPage(0, 12);
if (!selectAndLoadTransferFile())
return false;
@@ -1536,7 +1536,7 @@ bool TransferPartyWiz::start() {
bool TransferPartyWiz::selectAndLoadTransferFile() {
do {
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
if (transferFileDialogue(_vm->_savegameFilename))
break;
} while (_vm->_gui->confirmDialogue2(15, 68, 1));
@@ -1566,7 +1566,7 @@ bool TransferPartyWiz::selectAndLoadTransferFile() {
return false;
Common::String target = _vm->_gui->transferTargetMenu(eobTargets);
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
if (target.empty())
return true;
@@ -1579,10 +1579,10 @@ bool TransferPartyWiz::selectAndLoadTransferFile() {
return true;
}
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
bool result = _vm->_gui->transferFileMenu(target, dest);
- _screen->copyPage(_vm->_useHiResDithering ? 1 : 12, 0);
+ _screen->copyPage(12, 0);
return result;
}
@@ -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 16bd3dad58..a694a4aba5 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
@@ -158,10 +158,7 @@ void DarkMoonEngine::generateMonsterPalettes(const char *file, int16 monsterInde
int colx = 302 + 3 * i;
for (int ii = 0; ii < 16; ii++) {
- // Don't use getPagePixel() here, since in EGA mode it will try to
- // undither the pixel (although the shape bitmap is undithered already)
- uint8 col = _screen->getCPagePtr(_screen->_curPage | 1)[(184 + ii) * Screen::SCREEN_W + colx];
-
+ uint8 col = _screen->getPagePixel(_screen->_curPage, colx, 184 + ii);
int iii = 0;
for (; iii < 16; iii++) {
if (tmpPal[iii] == col) {
@@ -178,9 +175,7 @@ void DarkMoonEngine::generateMonsterPalettes(const char *file, int16 monsterInde
memcpy(tmpPal, _monsterShapes[dci] + 4, 16);
for (int iii = 0; iii < 16; iii++) {
- // Don't use getPagePixel() here, since in EGA mode it will try to
- // undither the pixel (although the shape bitmap is undithered already)
- uint8 col = _screen->getCPagePtr(_screen->_curPage | 1)[(184 + iii) * Screen::SCREEN_W + colx + ii];
+ uint8 col = _screen->getPagePixel(_screen->_curPage, colx + ii, 184 + iii);
if (newPal[iii])
tmpPal[newPal[iii]] = col;
}
@@ -248,6 +243,17 @@ void DarkMoonEngine::replaceMonster(int unit, uint16 block, int pos, int dir, in
if (_monsters[i].flags & 0x40)
continue;
+ // WORKAROUND for bug #3611077 (Dran's dragon transformation sequence triggered prematurely):
+ // The boss level and the mindflayer level share the same monster data. If you hang around
+ // long enough in the mindflayer level all 30 monster slots will be used up. When this
+ // happens it will trigger the dragon transformation sequence when Dran is moved around by script.
+ // We avoid removing Dran here by prefering monster slots occupied by monsters from another
+ // sub level.
+ if (_monsters[i].sub != _currentSub) {
+ index = i;
+ break;
+ }
+
int dist = getBlockDistance(_monsters[i].block, _currentBlock);
if (dist > maxDist) {
@@ -266,7 +272,10 @@ void DarkMoonEngine::replaceMonster(int unit, uint16 block, int pos, int dir, in
}
bool DarkMoonEngine::killMonsterExtra(EoBMonsterInPlay *m) {
- if (_currentLevel == 16 && _currentSub == 1 && (_monsterProps[m->type].capsFlags & 4)) {
+ // WORKAROUND for bug #3611077 (see DarkMoonEngine::replaceMonster())
+ // The mindflayers have monster type 0, just like Dran. Using a monster slot occupied by a mindflayer would trigger the dragon transformation
+ // sequence when all 30 monster slots are used up. We avoid this by checking for m->sub == 1.
+ if (_currentLevel == 16 && _currentSub == 1 && m->sub == 1 && (_monsterProps[m->type].capsFlags & 4)) {
if (m->type) {
_playFinale = true;
_runFlag = false;
@@ -455,7 +464,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/darkmoon.h b/engines/kyra/darkmoon.h
index f6e7b3ed2c..f0057ddd66 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -72,21 +72,21 @@ private:
void seq_playFinale();
void seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *data, int sd, int backupPage, int tempPage, int speed);
- const char * const *_introStrings;
- const char * const *_cpsFilesIntro;
+ const char *const *_introStrings;
+ const char *const *_cpsFilesIntro;
const DarkMoonAnimCommand **_animIntro;
const DarkMoonShapeDef **_shapesIntro;
- const char * const *_finaleStrings;
+ const char *const *_finaleStrings;
const uint8 *_creditsData;
- const char * const *_cpsFilesFinale;
+ const char *const *_cpsFilesFinale;
const DarkMoonAnimCommand **_animFinale;
const DarkMoonShapeDef **_shapesFinale;
- static const char *_palFilesIntroVGA[];
- static const char *_palFilesIntroEGA[];
- static const char *_palFilesFinaleVGA[];
- static const char *_palFilesFinaleEGA[];
+ static const char *const _palFilesIntroVGA[];
+ static const char *const _palFilesIntroEGA[];
+ static const char *const _palFilesFinaleVGA[];
+ static const char *const _palFilesFinaleEGA[];
// Ingame sequence
void seq_nightmare();
@@ -140,7 +140,7 @@ private:
static const uint8 _egaDefaultPalette[];
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index c0a91ac098..99d73d19c7 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -482,12 +482,21 @@ Debugger_EoB::Debugger_EoB(EoBCoreEngine *vm) : Debugger(vm), _vm(vm) {
}
void Debugger_EoB::initialize() {
- DCmd_Register("import_savefile", WRAP_METHOD(Debugger_EoB, cmd_importSaveFile));
+ DCmd_Register("import_savefile", WRAP_METHOD(Debugger_EoB, cmd_importSaveFile));
+ DCmd_Register("save_original", WRAP_METHOD(Debugger_EoB, cmd_saveOriginal));
+ DCmd_Register("list_monsters", WRAP_METHOD(Debugger_EoB, cmd_listMonsters));
+ DCmd_Register("show_position", WRAP_METHOD(Debugger_EoB, cmd_showPosition));
+ DCmd_Register("set_position", WRAP_METHOD(Debugger_EoB, cmd_setPosition));
+ DCmd_Register("open_door", WRAP_METHOD(Debugger_EoB, cmd_openDoor));
+ DCmd_Register("close_door", WRAP_METHOD(Debugger_EoB, cmd_closeDoor));
+ DCmd_Register("list_flags", WRAP_METHOD(Debugger_EoB, cmd_listFlags));
+ DCmd_Register("set_flag", WRAP_METHOD(Debugger_EoB, cmd_setFlag));
+ DCmd_Register("clear_flag", WRAP_METHOD(Debugger_EoB, cmd_clearFlag));
}
bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
if (!_vm->_allowImport) {
- DebugPrintf("This command may only be used from the main menu.\n");
+ DebugPrintf("This command only works from the main menu.\n");
return true;
}
@@ -507,6 +516,185 @@ bool Debugger_EoB::cmd_importSaveFile(int argc, const char **argv) {
return true;
}
+bool Debugger_EoB::cmd_saveOriginal(int argc, const char **argv) {
+ if (!_vm->_runFlag) {
+ DebugPrintf("This command doesn't work during intro or outro sequences,\nfrom the main menu or from the character generation.\n");
+ return true;
+ }
+
+ Common::String dir = ConfMan.get("savepath");
+ if (dir == "None")
+ dir.clear();
+
+ Common::FSNode nd(dir);
+ if (!nd.isDirectory())
+ return false;
+
+ if (_vm->game() == GI_EOB1) {
+ if (argc == 1) {
+ if (_vm->saveAsOriginalSaveFile()) {
+ Common::FSNode nf = nd.getChild(Common::String::format("EOBDATA.SAV"));
+ if (nf.isReadable())
+ DebugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
+ else
+ DebugPrintf("Failure.\n");
+ } else {
+ DebugPrintf("Failure.\n");
+ }
+ } else {
+ DebugPrintf("Syntax: save_original\n (Saves game in original file format to a file which can be used with the orginal game executable.)\n\n");
+ }
+ return true;
+
+ } else if (argc == 2) {
+ int slot = atoi(argv[1]);
+ if (slot < 0 || slot > 5) {
+ DebugPrintf("Slot must be between (including) 0 and 5.\n");
+ } else if (_vm->saveAsOriginalSaveFile(slot)) {
+ Common::FSNode nf = nd.getChild(Common::String::format("EOBDATA%d.SAV", slot));
+ if (nf.isReadable())
+ DebugPrintf("Saved to file: %s\n\n", nf.getPath().c_str());
+ else
+ DebugPrintf("Failure.\n");
+ } else {
+ DebugPrintf("Failure.\n");
+ }
+ return true;
+ }
+
+ DebugPrintf("Syntax: save_original <slot>\n (Saves game in original file format to a file which can be used with the orginal game executable.\n A save slot between 0 and 5 must be specified.)\n\n");
+ return true;
+}
+
+bool Debugger_EoB::cmd_listMonsters(int, const char **) {
+ DebugPrintf("\nCurrent level: %d\n----------------------\n\n", _vm->_currentLevel);
+ DebugPrintf("Id Type Unit Block Position Direction Sub Level Mode Dst.block HP Flags\n--------------------------------------------------------------------------------------------------------------\n");
+
+ for (int i = 0; i < 30; i++) {
+ EoBMonsterInPlay *m = &_vm->_monsters[i];
+ DebugPrintf("%.02d %.02d %.02d 0x%.04x %d %d %d %.02d 0x%.04x %.03d/%.03d 0x%.02x\n", i, m->type, m->unit, m->block, m->pos, m->dir, m->sub, m->mode, m->dest, m->hitPointsCur, m->hitPointsMax, m->flags);
+ }
+
+ DebugPrintf("\n");
+
+ return true;
+}
+
+bool Debugger_EoB::cmd_showPosition(int, const char **) {
+ DebugPrintf("\nCurrent level: %d\nCurrent Sub Level: %d\nCurrent block: %d (0x%.04x)\nNext block: %d (0x%.04x)\nCurrent direction: %d\n\n", _vm->_currentLevel, _vm->_currentSub, _vm->_currentBlock, _vm->_currentBlock, _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection), _vm->_currentDirection);
+ return true;
+}
+
+bool Debugger_EoB::cmd_setPosition(int argc, const char **argv) {
+ if (argc == 4) {
+ _vm->_currentBlock = atoi(argv[3]);
+ int sub = atoi(argv[2]);
+ int level = atoi(argv[1]);
+
+ int maxLevel = (_vm->game() == GI_EOB1) ? 12 : 16;
+ if (level < 1 || level > maxLevel) {
+ DebugPrintf("<level> must be a value from 1 to %d.\n\n", maxLevel);
+ return true;
+ }
+
+ if (level != _vm->_currentLevel || sub != _vm->_currentSub) {
+ _vm->completeDoorOperations();
+ _vm->generateTempData();
+ _vm->txt()->removePageBreakFlag();
+ _vm->screen()->setScreenDim(7);
+
+ _vm->loadLevel(level, sub);
+
+ if (_vm->_dialogueField)
+ _vm->restoreAfterDialogueSequence();
+ }
+
+ _vm->moveParty(_vm->_currentBlock);
+
+ _vm->_sceneUpdateRequired = true;
+ _vm->gui_drawAllCharPortraitsWithStats();
+ DebugPrintf("Success.\n\n");
+
+ } else {
+ DebugPrintf("Syntax: set_position <level>, <sub level>, <block>\n");
+ DebugPrintf(" (Warning: The sub level and block position parameters will not be checked. Invalid parameters may cause problems.)\n\n");
+ }
+ return true;
+}
+
+bool Debugger_EoB::cmd_openDoor(int, const char **) {
+ DebugPrintf("Warning: Using this command may cause glitches.\n");
+ uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
+ int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
+ int v = _vm->_levelBlockProperties[block].walls[c];
+ int flg = (_vm->_flags.gameID == GI_EOB1) ? 1 : 0x10;
+ if (_vm->_wllWallFlags[v] & flg) {
+ DebugPrintf("Couldn't open any door. Make sure you're facing the door you wish to open and standing right in front of it.\n\n");
+ } else {
+ _vm->openDoor(block);
+ DebugPrintf("Trying to open door at block %d.\n\n", block);
+ }
+ return true;
+}
+
+bool Debugger_EoB::cmd_closeDoor(int, const char **) {
+ DebugPrintf("Warning: Using this command may cause glitches.\n");
+ uint16 block = _vm->calcNewBlockPosition(_vm->_currentBlock, _vm->_currentDirection);
+ int c = (_vm->_wllWallFlags[_vm->_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
+ int v = _vm->_levelBlockProperties[block].walls[c];
+ if ((_vm->_flags.gameID == GI_EOB1 && !(_vm->_wllWallFlags[v] & 1)) || (_vm->_flags.gameID == GI_EOB2 && (_vm->_wllWallFlags[v] & 0x20))) {
+ DebugPrintf("Couldn't close any door. Make sure you're facing the door you wish to close and standing right in front of it.\n\n");
+ } else {
+ _vm->closeDoor(block);
+ DebugPrintf("Trying to close door at block %d.\n\n", block);
+ }
+ return true;
+}
+
+bool Debugger_EoB::cmd_listFlags(int, const char **) {
+ DebugPrintf("Flag Status\n----------------------\n\n");
+ for (int i = 0; i < 32; i++) {
+ uint32 flag = 1 << i;
+ DebugPrintf("%.2d %s\n", i, _vm->checkScriptFlags(flag) ? "TRUE" : "FALSE");
+ }
+ DebugPrintf("\n");
+ return true;
+}
+
+bool Debugger_EoB::cmd_setFlag(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("Syntax: set_flag <flag>\n\n");
+ return true;
+ }
+
+ int flag = atoi(argv[1]);
+ if (flag < 0 || flag > 31) {
+ DebugPrintf("<flag> must be a value from 0 to 31.\n\n");
+ } else {
+ _vm->setScriptFlags(1 << flag);
+ DebugPrintf("Flag '%.2d' has been set.\n\n", flag);
+ }
+
+ return true;
+}
+
+bool Debugger_EoB::cmd_clearFlag(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("Syntax: clear_flag <flag>\n\n");
+ return true;
+ }
+
+ int flag = atoi(argv[1]);
+ if (flag < 0 || flag > 31) {
+ DebugPrintf("<flag> must be a value from 0 to 31.\n\n");
+ } else {
+ _vm->clearScriptFlags(1 << flag);
+ DebugPrintf("Flag '%.2d' has been cleared.\n\n", flag);
+ }
+
+ return true;
+}
+
#endif // ENABLE_EOB
} // End of namespace Kyra
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index 2b1dcbe505..c1056a6cf3 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -120,6 +120,15 @@ protected:
EoBCoreEngine *_vm;
bool cmd_importSaveFile(int argc, const char **argv);
+ bool cmd_saveOriginal(int argc, const char **argv);
+ bool cmd_listMonsters(int argc, const char **argv);
+ bool cmd_showPosition(int argc, const char **argv);
+ bool cmd_setPosition(int argc, const char **argv);
+ bool cmd_openDoor(int argc, const char **argv);
+ bool cmd_closeDoor(int argc, const char **argv);
+ bool cmd_listFlags(int argc, const char **argv);
+ bool cmd_setFlag(int argc, const char **argv);
+ bool cmd_clearFlag(int argc, const char **argv);
};
#endif // ENABLE_EOB
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index e422f3ea19..95c4accd29 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -298,7 +298,7 @@ SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int s
if (in) {
Kyra::KyraEngine_v1::SaveHeader header;
- Kyra::KyraEngine_v1::kReadSaveHeaderError error;
+ Kyra::KyraEngine_v1::ReadSaveHeaderError error;
error = Kyra::KyraEngine_v1::readSaveHeader(in, true, header);
delete in;
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index e2162f20e2..f59d173fe6 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)
@@ -77,7 +78,7 @@ const KYRAGameDescription adGameDescs[] = {
0,
AD_ENTRY1("DISK1.EXE", "c8641d0414d6c966d0a3dad79db07bf4"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO4(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK)
},
@@ -90,7 +91,7 @@ const KYRAGameDescription adGameDescs[] = {
0,
AD_ENTRY1("DISK1.EXE", "5d5cee4c3d0b68d586788b74243d254a"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO4(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK)
},
@@ -104,7 +105,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "3c244298395520bb62b5edfe41688879"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -117,7 +118,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "796e44863dd22fa635b042df1bf16673"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -129,7 +130,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "abf8eb360e79a6c2a837751fbd4d3d24"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -141,7 +142,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "6018e1dfeaca7fe83f8d0b00eb0dd049"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -153,7 +154,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "f0b276781f47c130f423ec9679fe9ed9"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -165,7 +166,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "689b62b7519215c1b2571d466c95624c"),
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -177,7 +178,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "8909b41596913b3f5deaf3c9f1017b01"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -189,7 +190,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "747861d2a9c643c59fdab570df5b9093"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -201,7 +202,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("GEMCUT.EMC", "ef08c8c237ee1473fd52578303fc36df"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -317,7 +318,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("GEMCUT.PAK", "fac399fe62f98671e56a005c5e94e39f"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -329,7 +330,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("GEMCUT.PAK", "230f54e6afc007ab4117159181a1c722"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -341,7 +342,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("GEMCUT.PAK", "b037c41768b652a040360ffa3556fd2a"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -354,7 +355,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("GEMCUT.PAK", "d8327fc4b7a72b23c900fa13aef4093a"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -416,7 +417,7 @@ const KYRAGameDescription adGameDescs[] = {
"Demo",
AD_ENTRY1("DEMO1.WSA", "fb722947d94897512b13b50cc84fd648"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO5(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -429,7 +430,7 @@ const KYRAGameDescription adGameDescs[] = {
"Demo/CD",
AD_ENTRY1("INTRO.VRM", "e3045fb69b8c29db84b8fda3ccbdac54"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO | ADGF_CD,
GUIO4(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -442,7 +443,7 @@ const KYRAGameDescription adGameDescs[] = {
0,
AD_ENTRY1("WESTWOOD.001", "3f52dda68c4f7696c8309038be9f4151"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -455,7 +456,7 @@ const KYRAGameDescription adGameDescs[] = {
0,
AD_ENTRY1("WESTWOOD.001", "d787b9559afddfe058b84c0b3a787224"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -468,7 +469,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("FATE.PAK", "1ba18be685ad8e5a0ab5d46a0ce4d345"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -481,7 +482,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("FATE.PAK", "262fb69dd8e52e596c7aefc6456f7c1b"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -494,7 +495,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("FATE.PAK", "f7de11506b4c8fdf64bc763206c3e4e7"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -507,7 +508,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("FATE.PAK", "e0a70c31b022cb4bb3061890020fc27c"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -520,7 +521,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("CH01-S00.DLG", "54b7a5a94f6e1ec91f0fb1311eec09ab"),
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -533,7 +534,7 @@ const KYRAGameDescription adGameDescs[] = {
"Extracted",
AD_ENTRY1("CH01-S00.DLG", "7c36c0e63ab8c81cbb3ea58681331366"),
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -546,7 +547,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -558,7 +559,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -570,7 +571,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -584,7 +585,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -596,7 +597,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -608,7 +609,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "30487f3b8d7790c7857f4769ff2dd125"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -621,7 +622,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -634,7 +635,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -647,7 +648,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FATE.PAK", "39772ff82e42c4c520050518deb82e64"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -661,7 +662,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD",
AD_ENTRY1("FERRY.CPS", "763e2103858347d4ffffc329910d323f"),
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -674,7 +675,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD/Demo",
AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -687,7 +688,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD/Demo",
AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -700,7 +701,7 @@ const KYRAGameDescription adGameDescs[] = {
"CD/Demo",
AD_ENTRY1("THANKS.CPS", "b1a78d990b120bb2234b7094f74e30a5"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD | ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -713,7 +714,7 @@ const KYRAGameDescription adGameDescs[] = {
"Demo",
AD_ENTRY1("VOC.PAK", "ecb3561b63749158172bf21528cf5f45"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -782,7 +783,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -798,7 +799,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -814,7 +815,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -832,7 +833,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -848,7 +849,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -864,7 +865,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -932,7 +933,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -948,7 +949,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -964,7 +965,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -982,7 +983,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -998,7 +999,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -1014,7 +1015,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO5(GUIO_NOMIDI, GUIO_RENDERVGA, GAMEOPTION_KYRA3_AUDIENCE, GAMEOPTION_KYRA3_SKIP, GAMEOPTION_KYRA3_HELIUM)
},
@@ -1033,7 +1034,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1050,7 +1051,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1067,7 +1068,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1084,7 +1085,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1101,7 +1102,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1118,7 +1119,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1136,7 +1137,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1154,7 +1155,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1171,7 +1172,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1189,7 +1190,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1206,7 +1207,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1223,7 +1224,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1240,7 +1241,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1257,7 +1258,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1274,7 +1275,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO7(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1290,7 +1291,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1306,7 +1307,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1322,7 +1323,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1338,7 +1339,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1355,7 +1356,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1372,7 +1373,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1389,7 +1390,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1406,7 +1407,24 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
+ 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.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::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1423,7 +1441,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -1441,7 +1459,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS)
},
@@ -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
},
{
@@ -1475,7 +1510,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
@@ -1491,11 +1526,11 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO5(GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA)
},
- LOL_KYRA2_DEMO_FLAGS
+ LOL_DEMO_FLAGS
},
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
@@ -1509,7 +1544,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_TESTING,
GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
},
@@ -1525,7 +1560,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_TESTING,
GUIO7(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GUIO_RENDERCGA, GAMEOPTION_EOB_HPGRAPHS)
},
@@ -1541,7 +1576,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_TESTING,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
},
@@ -1557,7 +1592,7 @@ const KYRAGameDescription adGameDescs[] = {
{ 0, 0, 0, 0 }
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_TESTING,
GUIO6(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GUIO_RENDEREGA, GAMEOPTION_EOB_HPGRAPHS)
},
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index a7bde9f1ee..405ea2129a 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -178,13 +178,14 @@ void EoBEngine::runNpcDialogue(int npcIndex) {
case 1:
if (!checkScriptFlags(0x10000)) {
if (checkScriptFlags(0x8000)) {
- a = 1;
+ a = 13;
} else {
setScriptFlags(0x8000);
r = DLG2(3, 3);
+ a = 4;
}
if (!r)
- r = DLG2(a ? 13 : 4, 4);
+ r = DLG2(a, 4);
if (!r) {
for (a = 0; a < 6; a++)
@@ -214,8 +215,8 @@ void EoBEngine::runNpcDialogue(int npcIndex) {
if (!checkScriptFlags(0x100000)) {
if (deletePartyItems(6, -1)) {
- //_npcSequenceSub = 0;
- //drawNpcScene(npcIndex);
+ _npcSequenceSub = 0;
+ drawNpcScene(npcIndex);
TXT(28);
createItemOnCurrentBlock(32);
setScriptFlags(0x100000);
@@ -316,7 +317,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
@@ -338,6 +339,14 @@ void EoBEngine::replaceMonster(int unit, uint16 block, int pos, int dir, int typ
}
}
+bool EoBEngine::killMonsterExtra(EoBMonsterInPlay *m) {
+ if (m->type == 21) {
+ _playFinale = true;
+ _runFlag = false;
+ }
+ return true;
+}
+
void EoBEngine::updateScriptTimersExtra() {
int cnt = 0;
for (int i = 1; i < 30; i++) {
@@ -359,7 +368,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 +379,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);
@@ -387,6 +396,8 @@ void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
void EoBEngine::drawDoorIntern(int type, int index, int x, int y, int w, int wall, int mDim, int16 y1, int16 y2) {
int shapeIndex = type + 2 - mDim;
uint8 *shp = _doorShapes[shapeIndex];
+ if (!shp)
+ return;
int d1 = 0;
int d2 = 0;
@@ -460,7 +471,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 +516,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/eob.h b/engines/kyra/eob.h
index 37ce483702..b423b0da9d 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -74,6 +74,7 @@ private:
// Monsters
void replaceMonster(int unit, uint16 block, int d, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem);
+ bool killMonsterExtra(EoBMonsterInPlay *m);
void updateScriptTimersExtra();
// Level
@@ -99,7 +100,7 @@ private:
void turnUndeadAuto();
void turnUndeadAutoHit();
- const char * const *_turnUndeadString;
+ const char *const *_turnUndeadString;
// Misc
bool checkPartyStatusExtra();
@@ -113,8 +114,7 @@ private:
static const uint8 _egaDefaultPalette[];
};
-
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index fadb1066e0..d477209e5b 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -57,7 +57,7 @@ EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags)
_configMouse = true;
_loading = false;
- _useHiResDithering = false;
+ _enableHiResDithering = false;
_envAudioTimer = 0;
_flashShapeTimer = 0;
@@ -364,14 +364,14 @@ 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;
if (ConfMan.hasKey("render_mode"))
_configRenderMode = Common::parseRenderMode(ConfMan.get("render_mode"));
- _useHiResDithering = (_configRenderMode == Common::kRenderEGA && _flags.useHiRes);
+ _enableHiResDithering = (_configRenderMode == Common::kRenderEGA && _flags.useHiRes);
_screen = new Screen_EoB(this, _system);
assert(_screen);
@@ -417,12 +417,6 @@ Common::Error EoBCoreEngine::init() {
_screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT");
_screen->loadFont(Screen::FID_8_FNT, "FONT8.FNT");
- if (_useHiResDithering) {
- _vcnBlockWidth <<= 1;
- _vcnBlockHeight <<= 1;
- SWAP(_vcnFlip0, _vcnFlip1);
- }
-
Common::Error err = KyraRpgEngine::init();
if (err.getCode() != Common::kNoError)
return err;
@@ -494,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
@@ -991,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;
@@ -1003,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;
}
@@ -1060,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;
@@ -1275,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;
@@ -1326,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)
@@ -1337,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];
@@ -1625,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();
}
@@ -1658,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;
@@ -1667,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;
}
@@ -1748,7 +1742,7 @@ void EoBCoreEngine::seq_portal() {
bool EoBCoreEngine::checkPassword() {
char answ[20];
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
- _screen->copyPage(0, _useHiResDithering ? 4 : 10);
+ _screen->copyPage(0, 10);
_screen->setScreenDim(13);
gui_drawBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, guiSettings()->colors.frame1, guiSettings()->colors.frame2, -1);
@@ -1775,7 +1769,7 @@ bool EoBCoreEngine::checkPassword() {
_screen->modifyScreenDim(13, _screen->_curDim->sx - 1, _screen->_curDim->sy - 2, _screen->_curDim->w + 2, _screen->_curDim->h + 16);
_screen->setFont(of);
- _screen->copyPage(_useHiResDithering ? 4 : 10, 0);
+ _screen->copyPage(10, 0);
return true;
}
@@ -1786,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) {
@@ -1829,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]++;
}
}
@@ -1927,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);
@@ -2033,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 ?
@@ -2212,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);
}
@@ -2318,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 f60e755dd7..6421159dbe 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -487,7 +487,7 @@ protected:
void placeMonster(EoBMonsterInPlay *m, uint16 block, int dir);
virtual void replaceMonster(int b, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem) = 0;
void killMonster(EoBMonsterInPlay *m, bool giveExperience);
- virtual bool killMonsterExtra(EoBMonsterInPlay *m);
+ virtual bool killMonsterExtra(EoBMonsterInPlay *m) = 0;
int countSpecificMonsters(int type);
void updateAttackingMonsterFlags();
@@ -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;
@@ -845,11 +845,12 @@ protected:
const uint8 *_cgaMappingLevel[5];
const uint8 *_cgaLevelMappingIndex;
- bool _useHiResDithering;
+ bool _enableHiResDithering;
// Default parameters will import all present original save files and push them to the top of the save dialog.
bool importOriginalSaveFile(int destSlot, const char *sourceFile = 0);
Common::String readOriginalSaveFile(Common::String &file);
+ bool saveAsOriginalSaveFile(int slot = -1);
void *generateMonsterTempData(LevelTempData *tmp);
void restoreMonsterTempData(LevelTempData *tmp);
@@ -858,11 +859,11 @@ protected:
void restoreWallOfForceTempData(LevelTempData *tmp);
void releaseWallOfForceTempData(LevelTempData *tmp);
- const char * const *_saveLoadStrings;
+ const char *const *_saveLoadStrings;
const uint8 *_mnDef;
- const char * const *_mnWord;
- const char * const *_mnPrompt;
+ const char *const *_mnWord;
+ const char *const *_mnPrompt;
int _mnNumWord;
int _rrCount;
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index e3c0743e5c..9b4c09d7f4 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);
}
@@ -321,7 +321,7 @@ void EoBCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
break;
}
- int textColor= (_configRenderMode == Common::kRenderCGA) ? 2 : 15;
+ int textColor = (_configRenderMode == Common::kRenderCGA) ? 2 : 15;
if (!tmpStr2.empty()) {
_screen->printText(tmpStr.c_str(), x + (16 - tmpStr.size() * 3), y + 2, textColor, 0);
@@ -485,7 +485,7 @@ void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
uint8 col1 = guiSettings()->colors.frame1;
uint8 col2 = guiSettings()->colors.frame2;
- if (_configRenderMode == Common::kRenderCGA ) {
+ if (_configRenderMode == Common::kRenderCGA) {
col1 = 1;
col2 = 3;
}
@@ -777,11 +777,11 @@ int EoBCoreEngine::clickedCamp(Button *button) {
}
_screen->copyPage(0, 7);
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
_gui->runCampMenu();
- _screen->copyRegion(0, 0, 0, 120, 176, 24, _useHiResDithering ? 1 : 12, 2, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 0, 0, 120, 176, 24, 12, 2, Screen::CR_NO_P_CHECK);
_screen->setScreenDim(cd);
drawScene(0);
@@ -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();
@@ -1170,7 +1170,7 @@ int EoBCoreEngine::clickedSceneSpecial(Button *button) {
int EoBCoreEngine::clickedSpellbookAbort(Button *button) {
_updateFlags = 0;
- _screen->copyRegion(0, 0, 64, 121, 112, 56, _useHiResDithering ? 4 : 10, 0, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 0, 64, 121, 112, 56, 10, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
gui_drawCompass(true);
gui_toggleButtons();
@@ -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:
@@ -1300,24 +1300,24 @@ void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex
case 14:
// Potion
- usePotion(charIndex, wslot);
+ usePotion(charIndex, slotIndex);
break;
case 18:
- useWand(charIndex, wslot);
+ useWand(charIndex, slotIndex);
break;
case 19:
// eob2 horn
- useHorn(charIndex, wslot);
+ useHorn(charIndex, slotIndex);
break;
case 20:
if (vl == 1)
inflictCharacterDamage(charIndex, 200);
else
- useMagicScroll(charIndex, 55, wslot);
- deleteInventoryItem(charIndex, wslot);
+ useMagicScroll(charIndex, 55, slotIndex);
+ deleteInventoryItem(charIndex, slotIndex);
break;
default:
@@ -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;
@@ -1568,8 +1568,8 @@ int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
// UNUSED
//if (buttonList->flags2 & 0x20) {
- //if (_processButtonListExtraCallback)
- // this->*_processButtonListExtraCallback(buttonList);
+ // if (_processButtonListExtraCallback)
+ // this->*_processButtonListExtraCallback(buttonList);
//}
if (buttonList->nextButton)
@@ -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,16 +2051,15 @@ 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])
inputFlag = 0x8007;
- else if (inputFlag == _vm->_keyMap[Common::KEYCODE_KP5] || inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]) {
+ else if (prevHighlightButton && (inputFlag == _vm->_keyMap[Common::KEYCODE_KP5] || inputFlag == _vm->_keyMap[Common::KEYCODE_SPACE] || inputFlag == _vm->_keyMap[Common::KEYCODE_RETURN]))
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 +2139,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 +2162,7 @@ void GUI_EoB::runCampMenu() {
newMenu = 1;
break;
- case 0x800a:
+ case 0x800A:
for (; i < 6; i++) {
if (_vm->testCharacter(i, 1))
cnt++;
@@ -2172,7 +2171,7 @@ void GUI_EoB::runCampMenu() {
if (cnt > 4) {
_vm->dropCharacter(selectCharacterDialogue(53));
_vm->gui_drawPlayField(false);
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _vm->_useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
_screen->setFont(Screen::FID_6_FNT);
_vm->gui_drawAllCharPortraitsWithStats();
_screen->setFont(Screen::FID_8_FNT);
@@ -2183,19 +2182,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 +2289,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 +2350,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 +2391,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) {
@@ -2607,7 +2606,7 @@ Common::String GUI_EoB::transferTargetMenu(Common::Array<Common::String> &target
break;
} while (_saveSlotIdTemp[slot] == -1);
- _screen->copyRegion(72, 14, 72, 14, 176, 144, _vm->_useHiResDithering ? 7 : 12, 0, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(72, 14, 72, 14, 176, 144, 12, 0, Screen::CR_NO_P_CHECK);
_screen->modifyScreenDim(11, xo, yo, dm->w, dm->h);
return (slot < 6) ? _savegameList[_savegameOffset + slot] : Common::String();
@@ -2650,7 +2649,7 @@ void GUI_EoB::createScreenThumbnail(Graphics::Surface &dst) {
_screen->getRealPalette(0, screenPal);
uint16 width = Screen::SCREEN_W;
uint16 height = Screen::SCREEN_H;
- if (_vm->_useHiResDithering) {
+ if (_vm->gameFlags().useHiRes) {
width <<= 1;
height <<= 1;
}
@@ -2705,11 +2704,20 @@ bool GUI_EoB::runSaveMenu(int x, int y) {
for (int in = -1; in == -1 && !_vm->shouldQuit();) {
_screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
in = getTextInput(_saveSlotStringsTemp[slot], x + 1, fy, 19, 2, 0, 8);
+ if (in == -1) {
+ useSlot = false;
+ break;
+ }
+
if (!strlen(_saveSlotStringsTemp[slot])) {
messageDialogue(11, 54, 6);
in = -1;
}
- };
+ }
+
+ if (!useSlot) {
+ continue;
+ }
_screen->fillRect(fx - 2, fy, fx + 160, fy + 8, _vm->guiSettings()->colors.fill);
_screen->printShadedText(_saveSlotStringsTemp[slot], (x + 1) << 3, fy, 15, 0);
@@ -2755,7 +2763,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]) {
@@ -2999,11 +3007,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]) {
@@ -3018,7 +3026,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);
@@ -3065,9 +3073,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);
}
}
@@ -3544,7 +3552,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_eob.h b/engines/kyra/gui_eob.h
index f6be18ffbb..1b7bdf3482 100644
--- a/engines/kyra/gui_eob.h
+++ b/engines/kyra/gui_eob.h
@@ -156,7 +156,7 @@ private:
static const uint8 _highlightColorTableEGA[];
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/gui_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..8808c313fc 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,15 +366,15 @@ 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);
} else {
gui_drawLiveMagicBar(33, 32, _characters[charNum].magicPointsCur, 0, _characters[charNum].magicPointsMax, 5, 32, 162, 1, 0);
gui_drawLiveMagicBar(39, 32, _characters[charNum].hitPointsCur, 0, _characters[charNum].hitPointsMax, 5, 32, 154, 1, 1);
- _screen->printText((_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? "M" : getLangString(0x4253), 33, 1, 160, 0);
- _screen->printText((_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? "H" : getLangString(0x4254), 39, 1, 152, 0);
+ _screen->printText((_flags.platform == Common::kPlatformDOS && !_flags.isTalkie) ? "M" : getLangString(0x4253), 33, 1, 160, 0);
+ _screen->printText((_flags.platform == Common::kPlatformDOS && !_flags.isTalkie) ? "H" : getLangString(0x4254), 39, 1, 152, 0);
}
int spellLevels = 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;
@@ -697,7 +697,7 @@ void LoLEngine::gui_toggleButtonDisplayMode(int shapeIndex, int mode) {
t = _system->getMillis();
if (_buttonPressTimer > t)
delay(_buttonPressTimer - t);
-
+ // fall through
case 2:
mode = 0;
_lastButtonShape = 0;
@@ -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_mr.cpp b/engines/kyra/gui_mr.cpp
index 37526f9a5f..bcbfe27b69 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -25,7 +25,7 @@
#include "kyra/text_mr.h"
#include "kyra/resource.h"
#include "kyra/timer.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "common/system.h"
diff --git a/engines/kyra/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..f4024471d2 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;
@@ -265,6 +265,7 @@ bool LoLEngine::addItemToInventory(Item itemIndex) {
gui_drawInventory();
}
+ assert(pos > 0 && pos < 48);
_inventory[pos] = itemIndex;
gui_drawInventory();
@@ -292,7 +293,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 +352,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 +365,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 +430,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 +456,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_hof.cpp b/engines/kyra/kyra_hof.cpp
index 7fbecb7f53..ce9b530dbe 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -52,13 +52,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
_screen = 0;
_text = 0;
- _seqProcessedString = 0;
- _activeWSA = 0;
- _activeText = 0;
- _seqWsa = 0;
- _sequences = 0;
- _sequenceSoundList = 0;
-
_gamePlayBuffer = 0;
_cCodeBuffer = _optionsBuffer = _chapterBuffer = 0;
@@ -89,7 +82,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
memset(&_invWsa, 0, sizeof(_invWsa));
_itemAnimDefinition = 0;
- _demoAnimData = 0;
_nextAnimItem = 0;
for (int i = 0; i < 15; i++)
@@ -136,7 +128,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
memset(_cauldronStateTables, 0, sizeof(_cauldronStateTables));
_menuDirectlyToLoad = false;
- _menu = 0;
_chatIsNote = false;
memset(&_npcScriptData, 0, sizeof(_npcScriptData));
@@ -148,7 +139,6 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
KyraEngine_HoF::~KyraEngine_HoF() {
cleanup();
- seq_uninit();
delete _screen;
delete _text;
@@ -157,15 +147,6 @@ KyraEngine_HoF::~KyraEngine_HoF() {
_text = 0;
delete _invWsa.wsa;
- if (_sequenceSoundList) {
- for (int i = 0; i < _sequenceSoundListSize; i++) {
- if (_sequenceSoundList[i])
- delete[] _sequenceSoundList[i];
- }
- delete[] _sequenceSoundList;
- _sequenceSoundList = NULL;
- }
-
delete[] _dlgBuffer;
for (int i = 0; i < 19; i++)
delete[] _conversationState[i];
@@ -179,41 +160,13 @@ KyraEngine_HoF::~KyraEngine_HoF() {
void KyraEngine_HoF::pauseEngineIntern(bool pause) {
KyraEngine_v2::pauseEngineIntern(pause);
+ seq_pausePlayer(pause);
+
if (!pause) {
uint32 pausedTime = _system->getMillis() - _pauseStart;
_pauseStart = 0;
- // sequence player
- //
- // Timers in KyraEngine_HoF::seq_cmpFadeFrame() and KyraEngine_HoF::seq_animatedSubFrame()
- // have been left out for now. I think we don't need them here.
-
- _seqStartTime += pausedTime;
- _seqSubFrameStartTime += pausedTime;
- _seqEndTime += pausedTime;
- _seqSubFrameEndTimeInternal += pausedTime;
- _seqWsaChatTimeout += pausedTime;
- _seqWsaChatFrameTimeout += pausedTime;
-
- if (_activeText) {
- for (int x = 0; x < 10; x++) {
- if (_activeText[x].duration != -1)
- _activeText[x].startTime += pausedTime;
- }
- }
-
- if (_activeWSA) {
- for (int x = 0; x < 8; x++) {
- if (_activeWSA[x].flags != -1)
- _activeWSA[x].nextFrame += pausedTime;
- }
- }
-
_nextIdleAnim += pausedTime;
-
- for (int x = 0; x < _itemAnimDefinitionSize; x++)
- _activeItemAnim[x].nextFrameTime += pausedTime;
-
_tim->refreshTimersAfterPause(pausedTime);
}
}
@@ -244,8 +197,6 @@ Common::Error KyraEngine_HoF::init() {
_screen->loadFont(_screen->FID_8_FNT, "8FAT.FNT");
_screen->loadFont(_screen->FID_BOOKFONT_FNT, "BOOKFONT.FNT");
}
- _screen->loadFont(_screen->FID_GOLDFONT_FNT, "GOLDFONT.FNT");
-
_screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : _screen->FID_8_FNT);
_screen->setAnimBlockPtr(3504);
@@ -254,13 +205,6 @@ Common::Error KyraEngine_HoF::init() {
if (!_sound->init())
error("Couldn't init sound");
- _abortIntroFlag = false;
-
- if (_sequenceStrings) {
- for (int i = 0; i < MIN(33, _sequenceStringsSize); i++)
- _sequenceStringsDuration[i] = (int) strlen(_sequenceStrings[i]) * 8;
- }
-
// No mouse display in demo
if (_flags.isDemo && !_flags.isTalkie)
return Common::kNoError;
@@ -279,32 +223,28 @@ Common::Error KyraEngine_HoF::init() {
}
Common::Error KyraEngine_HoF::go() {
+ int menuChoice = 0;
+
if (_gameToLoad == -1) {
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
seq_showStarcraftLogo();
if (_flags.isDemo && !_flags.isTalkie) {
-#ifdef ENABLE_LOL
- if (_flags.gameID == GI_LOL)
- seq_playSequences(kSequenceLoLDemoScene1, kSequenceLoLDemoScene6);
- else
-#endif // ENABLE_LOL
- seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher);
- _menuChoice = 4;
+ menuChoice = seq_playDemo();
} else {
- seq_playSequences(kSequenceVirgin, kSequenceZanfaun);
+ menuChoice = seq_playIntro();
}
} else {
- _menuChoice = 1;
+ menuChoice = 1;
}
_res->unloadAllPakFiles();
- if (_menuChoice != 4) {
+ if (menuChoice != 4) {
// load just the pak files needed for ingame
_staticres->loadStaticResourceFile();
- if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) {
+ if (_flags.platform == Common::kPlatformDOS && _flags.isTalkie) {
if (!_res->loadFileList("FILEDATA.FDT"))
error("couldn't load 'FILEDATA.FDT'");
} else {
@@ -317,24 +257,24 @@ Common::Error KyraEngine_HoF::go() {
}
}
- _menuDirectlyToLoad = (_menuChoice == 3) ? true : false;
+ _menuDirectlyToLoad = (menuChoice == 3) ? true : false;
_menuDirectlyToLoad &= saveFileLoadable(0);
- if (_menuChoice & 1) {
+ if (menuChoice & 1) {
startup();
if (!shouldQuit())
runLoop();
cleanup();
if (_showOutro)
- seq_playSequences(kSequenceFunters, kSequenceFrash);
+ seq_playOutro();
}
return Common::kNoError;
}
void KyraEngine_HoF::startup() {
- _sound->setSoundList(&_soundData[kMusicIngame]);
+ _sound->selectAudioResourceSet(kMusicIngame);
// The track map is exactly the same
// for FM-TOWNS and DOS
_trackMap = _dosTrackMap;
@@ -1050,7 +990,7 @@ void KyraEngine_HoF::loadNPCScript() {
char filename[] = "_NPC.EMC";
- if (_flags.platform != Common::kPlatformPC || _flags.isTalkie) {
+ if (_flags.platform != Common::kPlatformDOS || _flags.isTalkie) {
switch (_lang) {
case 0:
filename[5] = 'E';
@@ -1508,8 +1448,8 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
if (vocIndex != -1) {
- _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, true);
- } else if (_flags.platform == Common::kPlatformPC) {
+ _sound->voicePlay(_ingameSoundList[vocIndex], 0, 255, 255, true);
+ } else if (_flags.platform == Common::kPlatformDOS) {
if (_sound->getSfxType() == Sound::kMidiMT32)
track = track < _mt32SfxMapSize ? _mt32SfxMap[track] - 1 : -1;
else if (_sound->getSfxType() == Sound::kMidiGM)
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 182854cdf1..1b84e5b56f 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -35,158 +35,13 @@
namespace Kyra {
-enum Sequences {
- kSequenceVirgin = 0,
- kSequenceWestwood,
- kSequenceTitle,
- kSequenceOverview,
- kSequenceLibrary,
- kSequenceHand,
- kSequencePoint,
- kSequenceZanfaun,
-
- kSequenceFunters,
- kSequenceFerb,
- kSequenceFish,
- kSequenceFheep,
- kSequenceFarmer,
- kSequenceFuards,
- kSequenceFirates,
- kSequenceFrash,
-
- kSequenceArraySize
-};
-
-enum NestedSequences {
- kSequenceFiggle = 0,
- kSequenceOver1,
- kSequenceOver2,
- kSequenceForest,
- kSequenceDragon,
- kSequenceDarm,
- kSequenceLibrary2,
- kSequenceLibrary3,
- kSequenceMarco,
- kSequenceHand1a,
- kSequenceHand1b,
- kSequenceHand1c,
- kSequenceHand2,
- kSequenceHand3,
- kSequenceHand4
-};
-
-enum SequencesDemo {
- kSequenceDemoVirgin = 0,
- kSequenceDemoWestwood,
- kSequenceDemoTitle,
- kSequenceDemoHill,
- kSequenceDemoOuthome,
- kSequenceDemoWharf,
- kSequenceDemoDinob,
- kSequenceDemoFisher
-};
-
-enum NestedSequencesDemo {
- kSequenceDemoWharf2 = 0,
- kSequenceDemoDinob2,
- kSequenceDemoWater,
- kSequenceDemoBail,
- kSequenceDemoDig
-};
-
-#ifdef ENABLE_LOL
-enum SequencesLoLDemo {
- kSequenceLoLDemoScene1 = 0,
- kSequenceLoLDemoText1,
- kSequenceLoLDemoScene2,
- kSequenceLoLDemoText2,
- kSequenceLoLDemoScene3,
- kSequenceLoLDemoText3,
- kSequenceLoLDemoScene4,
- kSequenceLoLDemoText4,
- kSequenceLoLDemoScene5,
- kSequenceLoLDemoText5,
- kSequenceLoLDemoScene6
-};
-#endif // ENABLE_LOL
-
-class WSAMovie_v2;
-class KyraEngine_HoF;
+//class WSAMovie_v2;
+//class KyraEngine_HoF;
class TextDisplayer_HoF;
+class SeqPlayer_HOF;
struct TIM;
-typedef int (KyraEngine_HoF::*SeqProc)(WSAMovie_v2 *, int, int, int);
-
-struct ActiveWSA {
- SeqProc callback;
- WSAMovie_v2 *movie;
- const FrameControl *control;
- int16 flags;
- uint16 startFrame;
- uint16 endFrame;
- uint16 frameDelay;
- uint32 nextFrame;
- uint16 currentFrame;
- uint16 lastFrame;
- uint16 x;
- uint16 y;
- uint16 startupCommand;
- uint16 finalCommand;
-};
-
-struct ActiveText {
- uint16 strIndex;
- uint16 x;
- uint16 y;
- uint16 width;
- int32 duration;
- uint32 startTime;
- int16 textcolor;
-};
-
-struct Sequence {
- const char *wsaFile;
- const char *cpsFile;
- uint16 flags;
- uint8 startupCommand;
- uint8 finalCommand;
- int16 stringIndex1;
- int16 stringIndex2;
- uint16 startFrame;
- uint16 numFrames;
- uint16 frameDelay;
- uint16 xPos;
- uint16 yPos;
- uint16 duration;
-};
-
-struct NestedSequence {
- const char *wsaFile;
- const FrameControl *wsaControl;
- uint16 flags;
- uint16 startframe;
- uint16 endFrame;
- uint16 frameDelay;
- uint16 x;
- uint16 y;
- uint16 startupCommand;
- uint16 finalCommand;
-};
-
-struct HofSeqData {
- const Sequence *seq;
- int numSeq;
- const NestedSequence *seqn;
- int numSeqn;
-};
-
-struct ItemAnimData_v1 {
- int16 itemIndex;
- uint16 y;
- const uint16 *frames;
-};
-
class KyraEngine_HoF : public KyraEngine_v2 {
friend class Debugger_HoF;
friend class TextDisplayer_HoF;
@@ -202,98 +57,18 @@ public:
GUI *gui() const { return _gui; }
virtual TextDisplayer *text() { return _text; }
int language() const { return _lang; }
+
protected:
static const EngineDesc _hofEngineDesc;
// intro/outro
- void seq_playSequences(int startSeq, int endSeq = -1);
-
- int seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
- int seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-
-#ifdef ENABLE_LOL
- int seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene4(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoText5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
- int seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm);
-#endif // ENABLE_LOL
-
- void seq_sequenceCommand(int command);
- void seq_loadNestedSequence(int wsaNum, int seqNum);
- void seq_nestedSequenceFrame(int command, int wsaNum);
- void seq_animatedSubFrame(int srcPage, int dstPage, int delaytime,
- int steps, int x, int y, int w, int h, int openClose, int directionFlags);
- bool seq_processNextSubFrame(int wsaNum);
- void seq_resetActiveWSA(int wsaNum);
- void seq_unloadWSA(int wsaNum);
- void seq_processWSAs();
- void seq_cmpFadeFrame(const char *cmpFile);
- void seq_playTalkText(uint8 chatNum);
- void seq_resetAllTextEntries();
- uint32 seq_activeTextsTimeLeft();
- void seq_waitForTextsTimeout();
- int seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width);
- void seq_processText();
- char *seq_preprocessString(const char *str, int width);
- void seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor);
- void seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width,
- WSAMovie_v2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos);
- void seq_finaleActorScreen();
- void seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0);
- void seq_scrollPage(int bottom, int top);
void seq_showStarcraftLogo();
- MainMenu *_menu;
+ int seq_playIntro();
+ int seq_playOutro();
+ int seq_playDemo();
- void seq_init();
- void seq_uninit();
+ void seq_pausePlayer(bool toggle);
Common::Error init();
Common::Error go();
@@ -311,7 +86,6 @@ protected:
static const int8 _pcSpkSfxMap[];
static const int _pcSpkSfxMapSize;
- AudioDataStruct _soundData[3];
protected:
// game initialization
void startup();
@@ -841,19 +615,19 @@ protected:
bool _chatAltFlag;
// sequence player
- ActiveWSA *_activeWSA;
+/* ActiveWSA *_activeWSA;
ActiveText *_activeText;
-
- const char * const *_sequencePakList;
- int _sequencePakListSize;
- const char * const *_ingamePakList;
+ */
+ /*const char *const *_sequencePakList;
+ int _sequencePakListSize;*/
+ const char *const *_ingamePakList;
int _ingamePakListSize;
- const char * const *_musicFileListIntro;
+ const char *const *_musicFileListIntro;
int _musicFileListIntroSize;
- const char * const *_musicFileListFinale;
+ const char *const *_musicFileListFinale;
int _musicFileListFinaleSize;
- const char * const *_musicFileListIngame;
+ const char *const *_musicFileListIngame;
int _musicFileListIngameSize;
const uint8 *_cdaTrackTableIntro;
int _cdaTrackTableIntroSize;
@@ -861,34 +635,33 @@ protected:
int _cdaTrackTableIngameSize;
const uint8 *_cdaTrackTableFinale;
int _cdaTrackTableFinaleSize;
- const char * const *_sequenceSoundList;
- int _sequenceSoundListSize;
- const char * const *_ingameSoundList;
+ const char *const *_ingameSoundList;
int _ingameSoundListSize;
const uint16 *_ingameSoundIndex;
int _ingameSoundIndexSize;
- const char * const *_sequenceStrings;
- int _sequenceStringsSize;
const uint16 *_ingameTalkObjIndex;
int _ingameTalkObjIndexSize;
- const char * const *_ingameTimJpStr;
+ const char *const *_ingameTimJpStr;
int _ingameTimJpStrSize;
- const HofSeqData *_sequences;
+
const ItemAnimDefinition *_itemAnimDefinition;
int _itemAnimDefinitionSize;
+
+ /*const HofSeqData *_sequences;
+
const ItemAnimData_v1 *_demoAnimData;
int _demoAnimSize;
- int _sequenceStringsDuration[33];
+ int _sequenceStringsDuration[33];*/
- static const uint8 _seqTextColorPresets[];
+/* static const uint8 _seqTextColorPresets[];
char *_seqProcessedString;
WSAMovie_v2 *_seqWsa;
bool _abortIntroFlag;
- int _menuChoice;
+ int _menuChoice;*/
- uint32 _seqFrameDelay;
+ /*uint32 _seqFrameDelay;
uint32 _seqStartTime;
uint32 _seqSubFrameStartTime;
uint32 _seqEndTime;
@@ -902,10 +675,7 @@ protected:
bool _seqSpecialFlag;
bool _seqSubframePlaying;
uint8 _seqTextColor[2];
- uint8 _seqTextColorMap[16];
-
- const SeqProc *_callbackS;
- const SeqProc *_callbackN;
+ uint8 _seqTextColorMap[16];*/
static const uint8 _rainbowRoomData[];
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 27bc2ad22a..7d4e35092f 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -98,8 +98,6 @@ KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags)
_malcolmFrame = 0;
_malcolmTimer1 = _malcolmTimer2 = 0;
-
- _soundFiles = 0;
}
KyraEngine_LoK::~KyraEngine_LoK() {
@@ -123,8 +121,6 @@ KyraEngine_LoK::~KyraEngine_LoK() {
delete _animator;
delete _seq;
- delete[] _soundFiles;
-
delete[] _characterList;
delete[] _roomTable;
@@ -194,7 +190,7 @@ Common::Error KyraEngine_LoK::init() {
initStaticResource();
- _sound->setSoundList(&_soundData[kMusicIntro]);
+ _sound->selectAudioResourceSet(kMusicIntro);
if (_flags.platform == Common::kPlatformAmiga) {
_trackMap = _amigaTrackMap;
@@ -349,7 +345,7 @@ void KyraEngine_LoK::startup() {
static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 };
_screen->setTextColorMap(colorMap);
- _sound->setSoundList(&_soundData[kMusicIngame]);
+ _sound->selectAudioResourceSet(kMusicIngame);
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("SE.DAT");
else
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index e5fb3cddca..def5cbcf6f 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -126,13 +126,13 @@ public:
typedef bool (KyraEngine_LoK::*IntroProc)();
// static data access
- const char * const *seqWSATable() { return _seq_WSATable; }
- const char * const *seqCPSTable() { return _seq_CPSTable; }
- const char * const *seqCOLTable() { return _seq_COLTable; }
- const char * const *seqTextsTable() { return _seq_textsTable; }
+ const char *const *seqWSATable() { return _seq_WSATable; }
+ const char *const *seqCPSTable() { return _seq_CPSTable; }
+ const char *const *seqCOLTable() { return _seq_COLTable; }
+ const char *const *seqTextsTable() { return _seq_textsTable; }
- const uint8 * const *palTable1() { return &_specialPalettes[0]; }
- const uint8 * const *palTable2() { return &_specialPalettes[29]; }
+ const uint8 *const *palTable1() { return &_specialPalettes[0]; }
+ const uint8 *const *palTable2() { return &_specialPalettes[29]; }
protected:
virtual Common::Error go();
@@ -538,12 +538,12 @@ protected:
const uint8 *_seq_Demo4;
const uint8 *_seq_Reunion;
- const char * const *_seq_WSATable;
- const char * const *_seq_CPSTable;
- const char * const *_seq_COLTable;
- const char * const *_seq_textsTable;
+ const char *const *_seq_WSATable;
+ const char *const *_seq_CPSTable;
+ const char *const *_seq_COLTable;
+ const char *const *_seq_textsTable;
- const char * const *_storyStrings;
+ const char *const *_storyStrings;
int _seq_WSATable_Size;
int _seq_CPSTable_Size;
@@ -552,25 +552,25 @@ protected:
int _storyStringsSize;
- const char * const *_itemList;
- const char * const *_takenList;
- const char * const *_placedList;
- const char * const *_droppedList;
- const char * const *_noDropList;
- const char * const *_putDownFirst;
- const char * const *_waitForAmulet;
- const char * const *_blackJewel;
- const char * const *_poisonGone;
- const char * const *_healingTip;
- const char * const *_thePoison;
- const char * const *_fluteString;
- const char * const *_wispJewelStrings;
- const char * const *_magicJewelString;
- const char * const *_flaskFull;
- const char * const *_fullFlask;
- const char * const *_veryClever;
- const char * const *_homeString;
- const char * const *_newGameString;
+ const char *const *_itemList;
+ const char *const *_takenList;
+ const char *const *_placedList;
+ const char *const *_droppedList;
+ const char *const *_noDropList;
+ const char *const *_putDownFirst;
+ const char *const *_waitForAmulet;
+ const char *const *_blackJewel;
+ const char *const *_poisonGone;
+ const char *const *_healingTip;
+ const char *const *_thePoison;
+ const char *const *_fluteString;
+ const char *const *_wispJewelStrings;
+ const char *const *_magicJewelString;
+ const char *const *_flaskFull;
+ const char *const *_fullFlask;
+ const char *const *_veryClever;
+ const char *const *_homeString;
+ const char *const *_newGameString;
int _itemList_Size;
int _takenList_Size;
@@ -592,13 +592,13 @@ protected:
int _homeString_Size;
int _newGameString_Size;
- const char * const *_characterImageTable;
+ const char *const *_characterImageTable;
int _characterImageTableSize;
- const char * const *_guiStrings;
+ const char *const *_guiStrings;
int _guiStringsSize;
- const char * const *_configStrings;
+ const char *const *_configStrings;
int _configStringsSize;
Shape *_defaultShapeTable;
@@ -636,20 +636,12 @@ protected:
Room *_roomTable;
int _roomTableSize;
- const char * const *_roomFilenameTable;
+ const char *const *_roomFilenameTable;
int _roomFilenameTableSize;
const uint8 *_amuleteAnim;
- const uint8 * const *_specialPalettes;
-
- const char * const *_soundFiles;
- int _soundFilesSize;
- const char * const *_soundFilesIntro;
- int _soundFilesIntroSize;
- const int32 *_cdaTrackTable;
- int _cdaTrackTableSize;
- AudioDataStruct _soundData[3];
+ const uint8 *const *_specialPalettes;
// positions of the inventory
static const uint16 _itemPosX[];
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 448e4ef70d..48ba96ec8b 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -28,7 +28,7 @@
#include "kyra/debugger.h"
#include "kyra/gui_mr.h"
#include "kyra/resource.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "common/system.h"
#include "common/config-manager.h"
@@ -213,8 +213,6 @@ Common::Error KyraEngine_MR::init() {
_soundDigital = new SoundDigital(this, _mixer);
assert(_soundDigital);
- if (!_soundDigital->init())
- error("_soundDigital->init() failed");
KyraEngine_v1::_text = _text = new TextDisplayer_MR(this, _screen);
assert(_text);
_gui = new GUI_MR(this);
@@ -724,7 +722,7 @@ void KyraEngine_MR::loadCharacterShapes(int newShapes) {
static const uint8 numberOffset[] = { 3, 3, 4, 4, 3, 3 };
static const uint8 startShape[] = { 0x32, 0x58, 0x78, 0x98, 0xB8, 0xD8 };
static const uint8 endShape[] = { 0x57, 0x77, 0x97, 0xB7, 0xD7, 0xF7 };
- static const char * const filenames[] = {
+ static const char *const filenames[] = {
"MSW##.SHP",
"MTA##.SHP",
"MTFL##.SHP",
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index 004236ca04..d194fedd4d 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -182,11 +182,11 @@ private:
private:
// main menu
- const char * const *_mainMenuStrings;
+ const char *const *_mainMenuStrings;
int _mainMenuStringsSize;
- static const char * const _mainMenuSpanishFan[];
- static const char * const _mainMenuItalianFan[];
+ static const char *const _mainMenuSpanishFan[];
+ static const char *const _mainMenuItalianFan[];
// animator
uint8 *_gamePlayBuffer;
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index f1d9550e8f..f8eb7d00cd 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -46,12 +46,7 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_vcnTransitionMask = 0;
_vcnShift = 0;
_vcnColTable = 0;
- _vcnBlockWidth = 4;
- _vcnBlockHeight = 8;
- _vcnFlip0 = 0;
- _vcnFlip1 = 1;
_vmpPtr = 0;
- _vmpSize = 0;
_blockBrightness = _wllVcnOffset = 0;
_blockDrawingBuffer = 0;
_sceneWindowBuffer = 0;
@@ -173,9 +168,8 @@ Common::Error KyraRpgEngine::init() {
_blockDrawingBuffer = new uint16[1320];
memset(_blockDrawingBuffer, 0, 1320 * sizeof(uint16));
- uint32 swbSize = 22 * _vcnBlockWidth * 2 * 15 * _vcnBlockHeight;
- _sceneWindowBuffer = new uint8[swbSize];
- memset(_sceneWindowBuffer, 0, swbSize);
+ _sceneWindowBuffer = new uint8[21120];
+ memset(_sceneWindowBuffer, 0, 21120);
_lvlShapeTop = new int16[18];
memset(_lvlShapeTop, 0, 18 * sizeof(int16));
@@ -186,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 *));
@@ -210,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);
@@ -234,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 50a4c9bdc1..cd36d2a5cd 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -222,7 +222,6 @@ protected:
uint16 _decorationCount;
int16 _mappedDecorationsCount;
uint16 *_vmpPtr;
- uint16 _vmpSize;
uint8 *_vcnBlocks;
uint8 *_vcfBlocks;
uint8 *_vcnTransitionMask;
@@ -232,10 +231,6 @@ protected:
uint8 *_sceneWindowBuffer;
uint8 _blockBrightness;
uint8 _wllVcnOffset;
- uint8 _vcnBlockWidth;
- uint8 _vcnBlockHeight;
- uint8 _vcnFlip0;
- uint8 _vcnFlip1;
uint8 **_doorShapes;
@@ -288,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();
@@ -385,7 +380,7 @@ protected:
bool lineIsPassable(int, int) { return false; }
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB || ENABLE_LOL
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 2672618c67..9194b64155 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -172,19 +172,6 @@ Common::Error KyraEngine_v1::init() {
assert(_res);
_res->reset();
- if (_flags.isDemo) {
- // HACK: check whether this is the HOF demo or the LOL demo.
- // The LOL demo needs to be detected and run as KyraEngine_HoF,
- // but the static resource loader and the sequence player will
- // need correct IDs.
- if (_res->exists("scene1.cps"))
-#ifdef ENABLE_LOL
- _flags.gameID = GI_LOL;
-#else
- error("Lands of Lore demo is not supported in this build");
-#endif // !ENABLE_LOL
- }
-
_staticres = new StaticResource(this);
assert(_staticres);
if (!_staticres->init())
@@ -366,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/kyra_v1.h b/engines/kyra/kyra_v1.h
index 0033969047..cd048563ca 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -140,14 +140,6 @@ enum {
GI_EOB2 = 6
};
-struct AudioDataStruct {
- const char *const *fileList;
- int fileListLen;
- const void *cdaTracks;
- int cdaNumTracks;
- int extraOffset;
-};
-
// TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable
// in the future we maybe merge some flags and/or create new ones
enum DebugLevels {
@@ -164,7 +156,7 @@ enum DebugLevels {
kDebugLevelTimer = 1 << 10 ///< debug level for "TimerManager" functions
};
-enum MusicDataID {
+enum AudioResourceSet {
kMusicIntro = 0,
kMusicIngame,
kMusicFinale
@@ -188,6 +180,7 @@ friend class GUI;
friend class GUI_v1;
friend class GUI_EoB;
friend class SoundMidiPC; // For _eventMan
+friend class SeqPlayer_HOF; // For skipFlag()
friend class TransferPartyWiz; // For save state API
public:
KyraEngine_v1(OSystem *system, const GameFlags &flags);
@@ -415,14 +408,14 @@ protected:
Graphics::Surface *thumbnail;
};
- enum kReadSaveHeaderError {
+ enum ReadSaveHeaderError {
kRSHENoError = 0,
kRSHEInvalidType = 1,
kRSHEInvalidVersion = 2,
kRSHEIoError = 3
};
- static kReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *file, bool loadThumbnail, SaveHeader &header);
+ static ReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *file, bool loadThumbnail, SaveHeader &header);
void loadGameStateCheck(int slot);
virtual Common::Error loadGameState(int slot) = 0;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index d3028c5e2d..3695041b83 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);
@@ -499,6 +499,11 @@ void LoLEngine::initKeymap() {
#endif
}
+void LoLEngine::pauseEngineIntern(bool pause) {
+ KyraEngine_v1::pauseEngineIntern(pause);
+ pauseDemoPlayer(pause);
+}
+
Common::Error LoLEngine::go() {
int action = -1;
@@ -519,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
@@ -529,8 +534,8 @@ Common::Error LoLEngine::go() {
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("sound.dat");
- _sound->setSoundList(&_soundData[kMusicIngame]);
- if (_flags.platform != Common::kPlatformPC)
+ _sound->selectAudioResourceSet(kMusicIngame);
+ if (_flags.platform != Common::kPlatformDOS)
_sound->loadSoundFile(0);
_tim = new TIMInterpreter_LoL(this, _screen, _system);
@@ -669,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];
}
@@ -678,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 },
@@ -928,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;
@@ -1024,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;
@@ -1336,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
@@ -1358,7 +1363,7 @@ void LoLEngine::setCharacterMagicOrHitPoints(int charNum, int type, int points,
{ 0x21, 0xAA, 0x99, 0x00, 0x4253 }
};
- if (charNum > 3)
+ if (charNum > 2)
return;
LoLCharacter *c = &_characters[charNum];
@@ -1485,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() {
@@ -1556,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();
}
@@ -1567,7 +1572,7 @@ void LoLEngine::gui_specialSceneRestoreControls(int restoreLamp) {
void LoLEngine::restoreAfterSceneWindowDialogue(int redraw) {
gui_enableControls();
_txt->setupField(false);
- _updateFlags &= 0xffdf;
+ _updateFlags &= 0xFFDF;
setDefaultButtonState();
@@ -1596,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);
@@ -1646,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);
@@ -1709,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;
}
}
}
@@ -1726,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;
@@ -1750,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--) {
@@ -1758,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);
@@ -1846,7 +1851,7 @@ int LoLEngine::playCharacterScriptChat(int charId, int mode, int restorePortrait
} else if (charId > 0) {
int i = 0;
- for (; i < 4; i++) {
+ for (; i < 3; i++) {
if (_characters[i].id != charId || !(_characters[i].flags & 1))
continue;
if (charId == ch)
@@ -1948,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) {
@@ -2093,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);
@@ -2111,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;
}
@@ -2162,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;
@@ -2245,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);
@@ -2328,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;
}
}
@@ -2361,7 +2366,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
playSpellAnimation(0, 0, 0, 2, 0, 0, 0, s.getData(), tpal.getData(), 40, false);
- _screen->fadePaletteStep(s.getData(), tpal.getData(), _system->getMillis(), _tickLength);
+ _screen->timedPaletteFadeStep(s.getData(), tpal.getData(), _system->getMillis(), _tickLength);
if (mov->opened()) {
int r = true;
if (spellLevel > 2) {
@@ -2390,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;
@@ -2430,7 +2435,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
playSpellAnimation(0, 0, 0, 2, 0, 0, 0, tpal.getData(), swampCol.getData(), 40, 0);
- _screen->fadePaletteStep(tpal.getData(), swampCol.getData(), _system->getMillis(), _tickLength);
+ _screen->timedPaletteFadeStep(tpal.getData(), swampCol.getData(), _system->getMillis(), _tickLength);
if (breakWall)
breakIceWall(tpal.getData(), swampCol.getData());
@@ -2469,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);
@@ -2519,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];
@@ -2532,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);
@@ -2634,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;
@@ -2662,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);
}
}
@@ -2778,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);
@@ -2803,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;
@@ -2811,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;
@@ -2886,7 +2891,7 @@ int LoLEngine::processMagicVaelansCube() {
uint32 endTime = _system->getMillis() + 70 * _tickLength;
while (_system->getMillis() < endTime) {
- _screen->fadePaletteStep(tmpPal1, tmpPal2, _system->getMillis() - ctime, 70 * _tickLength);
+ _screen->timedPaletteFadeStep(tmpPal1, tmpPal2, _system->getMillis() - ctime, 70 * _tickLength);
updateInput();
}
@@ -2903,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;
@@ -2915,7 +2920,7 @@ int LoLEngine::processMagicVaelansCube() {
endTime = _system->getMillis() + 70 * _tickLength;
while (_system->getMillis() < endTime) {
- _screen->fadePaletteStep(tmpPal2, tmpPal1, _system->getMillis() - ctime, 70 * _tickLength);
+ _screen->timedPaletteFadeStep(tmpPal2, tmpPal1, _system->getMillis() - ctime, 70 * _tickLength);
updateInput();
}
@@ -3031,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);
@@ -3068,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;
}
}
@@ -3096,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;
@@ -3244,7 +3249,7 @@ void LoLEngine::playSpellAnimation(WSAMovie_v2 *mov, int firstFrame, int lastFra
continue;
}
- if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
+ if (!_screen->timedPaletteFadeStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
return;
if (del) {
@@ -3284,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;
@@ -3316,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;
}
}
@@ -3331,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;
}
@@ -3340,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];
@@ -3351,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];
}
@@ -3387,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;
@@ -3477,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;
@@ -3486,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:
@@ -3552,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++) {
@@ -3591,7 +3598,7 @@ void LoLEngine::checkForPartyDeath() {
_gui->runMenu(_gui->_deathMenu);
setMouseCursorToItemInHand();
- _updateFlags &= 0xfffb;
+ _updateFlags &= 0xFFFB;
resetLampStatus();
gui_enableDefaultPlayfieldButtons();
@@ -3608,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))
@@ -3625,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;
@@ -3679,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;
@@ -3890,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);
@@ -3918,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);
@@ -3929,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;
@@ -3948,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)
@@ -3966,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)
@@ -4049,7 +4056,7 @@ void LoLEngine::displayAutomap() {
delayTimer = _system->getMillis() + 8 * _tickLength;
}
- int f = checkInput(0) & 0xff;
+ int f = checkInput(0) & 0xFF;
removeInputTop();
if (f) {
@@ -4057,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;
@@ -4089,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);
@@ -4107,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++;
@@ -4117,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;
}
@@ -4125,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;
@@ -4142,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);
@@ -4184,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;
@@ -4194,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);
@@ -4211,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);
}
@@ -4244,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();
@@ -4255,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;
}
@@ -4338,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;
@@ -4355,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;
@@ -4396,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;
@@ -4406,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);
@@ -4473,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;
@@ -4494,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 dcd13804b3..4002346d31 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -270,6 +270,8 @@ public:
virtual void initKeymap();
+ void pauseEngineIntern(bool pause);
+
Screen *screen();
GUI *gui() const;
@@ -334,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[];
@@ -389,7 +391,7 @@ private:
uint8 _outroShapeTable[256];
// TODO: Consider moving these tables to kyra.dat
- static const char * const _outroShapeFileTable[];
+ static const char *const _outroShapeFileTable[];
static const uint8 _outroFrameTable[];
static const int16 _outroRightMonsterPos[];
@@ -400,6 +402,10 @@ private:
static const int _outroMonsterScaleTableX[];
static const int _outroMonsterScaleTableY[];
+ // Non-interactive demo
+ int playDemo();
+ void pauseDemoPlayer(bool toggle);
+
// timers
void setupTimers();
@@ -464,8 +470,6 @@ private:
const uint8 *_ingamePCSpeakerSoundIndex;
int _ingamePCSpeakerSoundIndexSize;
- AudioDataStruct _soundData[3];
-
// gui
void gui_drawPlayField();
void gui_drawScene(int pageNum);
@@ -554,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);
@@ -810,7 +814,7 @@ private:
void decodeSjis(const char *src, char *dst);
int decodeCyrillic(const char *src, char *dst);
- static const char * const _languageExt[];
+ static const char *const _languageExt[];
// graphics
void setupScreenDims();
@@ -1009,8 +1013,8 @@ private:
uint8 *_tempBuffer5120;
- const char * const *_levelDatList;
- const char * const *_levelShpList;
+ const char *const *_levelDatList;
+ const char *const *_levelShpList;
const int8 *_dscWalls;
@@ -1133,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 985286854b..2180c5359d 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -60,7 +60,7 @@ void EoBCoreEngine::useMagicBookOrSymbol(int charIndex, int type) {
}
if (!_updateFlags)
- _screen->copyRegion(64, 121, 0, 0, 112, 56, 0, _useHiResDithering ? 4 : 10, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(64, 121, 0, 0, 112, 56, 0, 10, Screen::CR_NO_P_CHECK);
_updateFlags = 1;
gui_setPlayFieldButtons();
gui_drawSpellbook();
@@ -179,7 +179,7 @@ void EoBCoreEngine::castSpell(int spell, int weaponSlot) {
if ((s->flags & 0x100) && (c->effectFlags & 0x40))
// remove invisibility effect
- removeCharacterEffect(10, _openBookChar, 1);
+ removeCharacterEffect(_flags.gameID == GI_EOB1 ? 8 : 10, _openBookChar, 1);
int ci = _openBookChar;
if (ci > 3)
@@ -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 f2bc4e8146..5c179a7864 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -62,7 +62,7 @@ public:
bool isInCacheList(Common::String name);
bool loadFileList(const Common::String &filedata);
- bool loadFileList(const char * const *filelist, uint32 numFiles);
+ bool loadFileList(const char *const *filelist, uint32 numFiles);
// This unloads *all* pakfiles, even kyra.dat and protected ones.
// It does not remove files from cache though!
@@ -87,7 +87,7 @@ protected:
Common::Archive *loadArchive(const Common::String &name, Common::ArchiveMemberPtr member);
Common::Archive *loadInstallerArchive(const Common::String &file, const Common::String &ext, const uint8 offset);
- bool loadProtectedFiles(const char * const * list);
+ bool loadProtectedFiles(const char *const * list);
void initializeLoaders();
@@ -679,7 +679,10 @@ enum KyraResources {
kLoLCharDefsKieran,
kLoLCharDefsAkshel,
kLoLExpRequirements,
- kLoLMonsterModifiers,
+ kLoLMonsterModifiers1,
+ kLoLMonsterModifiers2,
+ kLoLMonsterModifiers3,
+ kLoLMonsterModifiers4,
kLoLMonsterShiftOffsets,
kLoLMonsterDirFlags,
kLoLMonsterScaleY,
@@ -742,6 +745,8 @@ enum KyraResources {
struct Shape;
struct Room;
struct AmigaSfxTable;
+struct HoFSeqData;
+struct HoFSeqItemAnimData;
class StaticResource {
public:
@@ -755,13 +760,13 @@ public:
bool init();
void deinit();
- const char * const *loadStrings(int id, int &strings);
+ const char *const *loadStrings(int id, int &strings);
const uint8 *loadRawData(int id, int &size);
const Shape *loadShapeTable(int id, int &entries);
const AmigaSfxTable *loadAmigaSfxTable(int id, int &entries);
const Room *loadRoomTable(int id, int &entries);
- const HofSeqData *loadHofSequenceData(int id, int &entries);
- const ItemAnimData_v1 *loadShapeAnimData_v1(int id, int &entries);
+ const HoFSeqData *loadHoFSequenceData(int id, int &entries);
+ const HoFSeqItemAnimData *loadHoFSeqItemAnimData(int id, int &entries);
const ItemAnimDefinition *loadItemAnimDefinition(int id, int &entries);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
const uint16 *loadRawDataBe16(int id, int &entries);
@@ -803,8 +808,8 @@ private:
bool loadShapeTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadAmigaSfxTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadRoomTable(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadHofSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadShapeAnimData_v1(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadHoFSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadHoFSeqItemAnimData(Common::SeekableReadStream &stream, void *&ptr, int &size);
bool loadItemAnimDefinition(Common::SeekableReadStream &stream, void *&ptr, int &size);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
bool loadRawDataBe16(Common::SeekableReadStream &stream, void *&ptr, int &size);
@@ -829,8 +834,8 @@ private:
void freeShapeTable(void *&ptr, int &size);
void freeAmigaSfxTable(void *&ptr, int &size);
void freeRoomTable(void *&ptr, int &size);
- void freeHofSequenceData(void *&ptr, int &size);
- void freeHofShapeAnimDataV1(void *&ptr, int &size);
+ void freeHoFSequenceData(void *&ptr, int &size);
+ void freeHoFSeqItemAnimData(void *&ptr, int &size);
void freeItemAnimDefinition(void *&ptr, int &size);
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
void freeRawDataBe16(void *&ptr, int &size);
@@ -857,7 +862,7 @@ private:
kAmigaSfxTable = 4,
k2SeqData = 5,
- k2ShpAnimDataV1 = 6,
+ k2SeqItemAnimData = 6,
k2ItemAnimDefinition = 7,
kLoLCharData = 8,
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/resource_intern.h b/engines/kyra/resource_intern.h
index 9d9574d823..e63eab7d6a 100644
--- a/engines/kyra/resource_intern.h
+++ b/engines/kyra/resource_intern.h
@@ -75,7 +75,7 @@ private:
const uint32 *findFile(const Common::String &name) const;
const uint16 _entryCount;
- const uint32 * const _fileEntries;
+ const uint32 *const _fileEntries;
};
class CachedArchive : public Common::Archive {
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 41ba1e5e50..bacfb62c16 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -37,7 +37,7 @@
namespace Kyra {
-KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
+KyraEngine_v1::ReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
uint32 type = in->readUint32BE();
header.originalSave = false;
header.oldHeader = false;
@@ -140,7 +140,7 @@ Common::SeekableReadStream *KyraEngine_v1::openSaveForReading(const char *filena
if (!(in = _saveFileMan->openForLoading(filename)))
return 0;
- kReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, false, header);
+ ReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, false, header);
if (errorCode != kRSHENoError) {
if (errorCode == kRSHEInvalidType)
warning("No ScummVM Kyra engine savefile header");
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index f7d7d95b57..aa223414bc 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -298,7 +298,7 @@ Common::Error EoBCoreEngine::loadGameState(int slot) {
useMagicBookOrSymbol(_openBookChar, _openBookType);
}
- _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, _useHiResDithering ? 1 : 12, Screen::CR_NO_P_CHECK);
+ _screen->copyRegion(0, 120, 0, 0, 176, 24, 0, 12, Screen::CR_NO_P_CHECK);
gui_toggleButtons();
setHandItem(_itemInHand);
@@ -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;
@@ -680,7 +680,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
in.skip(4);
delete[] c->faceShape;
c->faceShape = 0;
- in.read(c->mageSpells, (_flags.gameID == GI_EOB1) ? 30 :80);
+ in.read(c->mageSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
in.read(c->clericSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
c->mageSpellsAvailableFlags = in.readUint32();
for (int ii = 0; ii < 27; ii++)
@@ -695,6 +695,8 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
in.read(c->effectsRemainder, 4);
c->effectFlags = in.readUint32();
if (c->effectFlags && _flags.gameID == GI_EOB1) {
+ // Spell effect flags are completely different in EOB I. We only use EOB II style flags in ScummVM.
+ // Doesn't matter much, since these are the temporary spell effects only anyway.
warning("EoBCoreEngine::readOriginalSaveFile(): Unhandled character effect flags encountered in original EOB1 save file '%s' ('%s')", file.c_str(), desc.c_str());
c->effectFlags = 0;
}
@@ -713,6 +715,8 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
_hasTempDataFlags = (_flags.gameID == GI_EOB1) ? in.readUint16() : in.readUint32();
_partyEffectFlags = (_flags.gameID == GI_EOB1) ? in.readUint16() : in.readUint32();
if (_partyEffectFlags && _flags.gameID == GI_EOB1) {
+ // Spell effect flags are completely different in EOB I. We only use EOB II style flags in ScummVM.
+ // Doesn't matter much, since these are the temporary spell effects only anyway.
warning("EoBCoreEngine::readOriginalSaveFile(): Unhandled party effect flags encountered in original EOB1 save file '%s' ('%s')", file.c_str(), desc.c_str());
_partyEffectFlags = 0;
}
@@ -737,7 +741,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
t->value = in.readSByte();
}
- int numParts = (_flags.gameID == GI_EOB1) ? 13 : 18;
+ int numParts = (_flags.gameID == GI_EOB1) ? 12 : 17;
int partSize = (_flags.gameID == GI_EOB1) ? 2040 : 2130;
uint32 nextPart = in.pos();
uint8 *cmpData = new uint8[1200];
@@ -764,6 +768,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
l->flags = new uint16[1024];
memset(l->flags, 0, 1024 * sizeof(uint16));
EoBMonsterInPlay *lm = new EoBMonsterInPlay[30];
+ memset(lm, 0, 30 * sizeof(EoBMonsterInPlay));
l->monsters = lm;
EoBFlyingObject *lf = new EoBFlyingObject[_numFlyingObjects];
memset(lf, 0, _numFlyingObjects * sizeof(EoBFlyingObject));
@@ -822,7 +827,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
m->sub = in.readByte();
}
- _levelBlockProperties[m->block].flags++;
+ l->flags[m->block]++;
}
if (_flags.gameID == GI_EOB1)
@@ -831,7 +836,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
for (int ii = 0; ii < 5; ii++) {
WallOfForce *w = &lw[ii];
w->block = in.readUint16();
- w->duration = in.readUint32();
+ w->duration = in.readUint32() * _tickLength;
}
}
@@ -845,10 +850,7 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
_itemTypes = new EoBItemType[65];
memset(_itemTypes, 0, sizeof(EoBItemType) * 65);
- if (_flags.gameID == GI_EOB1)
- return desc;
-
- for (int i = 51; i < 65; i++) {
+ for (int i = 51; i < 57; i++) {
EoBItemType *t = &_itemTypes[i];
t->invFlags = in.readUint16();
t->handFlags = in.readUint16();
@@ -868,6 +870,355 @@ Common::String EoBCoreEngine::readOriginalSaveFile(Common::String &file) {
return in.err() ? Common::String() : desc;
}
+static uint32 encodeFrame4(const uint8 *src, uint8 *dst, uint32 insize) {
+ const uint8 *end = src + insize;
+
+ bool updateCounter = true;
+ const uint8 *in = src;
+
+ uint8 *out = dst;
+ uint8 *cntPtr = dst;
+
+ *dst++ = 0x81;
+ *dst++ = *src++;
+
+ while (src < end) {
+ const uint8 *src2 = in;
+ const uint8 *src3 = 0;
+ uint16 len = 1;
+
+ for (bool loop = true; loop; ) {
+ uint16 count = 0;
+ uint16 scansize = end - src - 1;
+ if (scansize > 64) {
+ if (src[0] == src[64]) {
+ for (uint16 i = 0; i < scansize && src[0] == src[i]; ++i)
+ count++;
+ if (count > 64) {
+ updateCounter = false;
+ *dst++ = 0xFE;
+ WRITE_LE_UINT16(dst, count);
+ dst += 2;
+ *dst++ = src[0];
+ src += count;
+ loop = true;
+ continue;
+ }
+ }
+ }
+
+ const uint8 *tmp = src2;
+
+ do {
+ count = src - tmp;
+ loop = false;
+ if (count == 0)
+ break;
+
+ while (count--) {
+ if (*src == *tmp++) {
+ loop = true;
+ break;
+ }
+ }
+ if (!loop)
+ break;
+ } while (*(src + len - 1) != *(tmp + len - 2));
+
+ if (!loop)
+ break;
+
+ src2 = tmp--;
+ const uint8 *tsrc = src;
+ count = end - src;
+ bool nmatch = false;
+
+ while (count--) {
+ if (*tsrc++ != *tmp++) {
+ nmatch = true;
+ break;
+ }
+ }
+ if (!nmatch)
+ tmp++;
+
+ count = tmp - src2;
+ if (count >= len) {
+ len = count;
+ src3 = src2 - 1;
+ }
+ }
+
+ if (len <= 2) {
+ for (bool forceLoop = !updateCounter; forceLoop || *cntPtr == 0xBF; forceLoop = false) {
+ cntPtr = dst;
+ *dst++ = 0x80;
+ }
+ (*cntPtr)++;
+ *dst++ = *src++;
+ updateCounter = true;
+ continue;
+
+ } else if (len > 10 || (src - src3) > 4095) {
+ if (len <= 64) {
+ *dst++ = (len - 3) | 0xC0;
+ } else {
+ *dst++ = 0xFF;
+ WRITE_LE_UINT16(dst, len);
+ dst += 2;
+ }
+ WRITE_LE_UINT16(dst, src3 - in);
+ } else {
+ WRITE_BE_UINT16(dst, (src - src3) + ((len - 3) << 12));
+ }
+
+ dst += 2;
+ src += len;
+ updateCounter = false;
+ }
+
+ *dst++ = 0x80;
+
+ return dst - out;
+}
+
+bool EoBCoreEngine::saveAsOriginalSaveFile(int slot) {
+ if (_flags.gameID == GI_EOB2 && (slot < 0 || slot > 5))
+ return false;
+
+ Common::String dir = ConfMan.get("savepath");
+ if (dir == "None")
+ dir.clear();
+
+ Common::FSNode nd(dir);
+ if (!nd.isDirectory())
+ return false;
+
+ Common::FSNode nf = nd.getChild(_flags.gameID == GI_EOB1 ? "EOBDATA.SAV" : Common::String::format("EOBDATA%d.SAV", slot));
+ Common::WriteStream *out = nf.createWriteStream();
+
+ if (_flags.gameID == GI_EOB2) {
+ static const char tempStr[20] = "SCUMMVM EXPORT ";
+ out->write(tempStr, 20);
+ }
+
+ completeDoorOperations();
+ generateTempData();
+ advanceTimers(_restPartyElapsedTime);
+ _restPartyElapsedTime = 0;
+
+ for (int i = 0; i < 6; i++)
+ timerSpecialCharacterUpdate(0x30 + i);
+
+ for (int i = 0; i < 6; i++) {
+ EoBCharacter *c = &_characters[i];
+ out->writeByte(c->id);
+ out->writeByte(c->flags);
+ out->write(c->name, 11);
+ out->writeSByte(c->strengthCur);
+ out->writeSByte(c->strengthMax);
+ out->writeSByte(c->strengthExtCur);
+ out->writeSByte(c->strengthExtMax);
+ out->writeSByte(c->intelligenceCur);
+ out->writeSByte(c->intelligenceMax);
+ out->writeSByte(c->wisdomCur);
+ out->writeSByte(c->wisdomMax);
+ out->writeSByte(c->dexterityCur);
+ out->writeSByte(c->dexterityMax);
+ out->writeSByte(c->constitutionCur);
+ out->writeSByte(c->constitutionMax);
+ out->writeSByte(c->charismaCur);
+ out->writeSByte(c->charismaMax);
+ if (_flags.gameID == GI_EOB1) {
+ out->writeSByte(c->hitPointsCur);
+ out->writeSByte(c->hitPointsMax);
+ } else {
+ out->writeSint16LE(c->hitPointsCur);
+ out->writeSint16LE(c->hitPointsMax);
+ }
+ out->writeSByte(c->armorClass);
+ out->writeByte(c->disabledSlots);
+ out->writeByte(c->raceSex);
+ out->writeByte(c->cClass);
+ out->writeByte(c->alignment);
+ out->writeSByte(c->portrait);
+ out->writeByte(c->food);
+ out->write(c->level, 3);
+ for (int ii = 0; ii < 3; ii++)
+ out->writeUint32LE(c->experience[ii]);
+ out->writeUint32LE(0);
+ out->write(c->mageSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
+ out->write(c->clericSpells, (_flags.gameID == GI_EOB1) ? 30 : 80);
+ out->writeUint32LE(c->mageSpellsAvailableFlags);
+ for (int ii = 0; ii < 27; ii++)
+ out->writeSint16LE(c->inventory[ii]);
+ uint32 ct = _system->getMillis();
+ for (int ii = 0; ii < 10; ii++)
+ out->writeUint32LE((c->timers[ii] && c->timers[ii] > ct) ? (c->timers[ii] - ct) / _tickLength : 0);
+ out->write(c->events, 10);
+ out->write(c->effectsRemainder, 4);
+
+ if (c->effectFlags && _flags.gameID == GI_EOB1) {
+ // Spell effect flags are completely different in original EOB I. We only use EOB II style flags in ScummVM.
+ // This doesn't matter much here, since these flags only apply to the temporary spell effects (things like prayer, haste, etc.) anyway.
+ warning("EoBCoreEngine::saveAsOriginalFile(): Character effect flags lost while exporting original EOB1 save file");
+ out->writeUint32LE(0);
+ } else {
+ out->writeUint32LE(c->effectFlags);
+ }
+ out->writeByte(c->damageTaken);
+ out->write(c->slotStatus, 5);
+ for (int ii = 0; ii < 6; ii++)
+ out->writeByte(0);
+ }
+
+ out->writeUint16LE(_currentLevel);
+ if (_flags.gameID == GI_EOB2)
+ out->writeSint16LE(_currentSub);
+ out->writeUint16LE(_currentBlock);
+ out->writeUint16LE(_currentDirection);
+ out->writeSint16LE(_itemInHand);
+ if (_flags.gameID == GI_EOB1) {
+ out->writeUint16LE(_hasTempDataFlags);
+ out->writeUint16LE(0);
+ if (_partyEffectFlags)
+ // Spell effect flags are completely different in original EOB I. We only use EOB II style flags in ScummVM.
+ // This doesn't matter much here, since these flags only apply to the temporary spell effects (things like prayer, haste, etc.) anyway.
+ warning("EoBCoreEngine::saveAsOriginalFile(): Party effect flags lost while exporting original EOB1 save file");
+ } else {
+ out->writeUint32LE(_hasTempDataFlags);
+ out->writeUint32LE(_partyEffectFlags);
+ }
+ if (_flags.gameID == GI_EOB2)
+ out->writeByte(0);
+ _inf->saveState(out, true);
+
+ int numItems = (_flags.gameID == GI_EOB1) ? 500 : 600;
+ for (int i = 0; i < numItems; i++) {
+ EoBItem *t = &_items[i];
+ out->writeByte(t->nameUnid);
+ out->writeByte(t->nameId);
+ out->writeByte(t->flags);
+ out->writeSByte(t->icon);
+ out->writeSByte(t->type);
+ out->writeSByte(t->pos);
+ out->writeSint16LE(t->block);
+ out->writeSint16LE(t->next);
+ out->writeSint16LE(t->prev);
+ out->writeByte(t->level);
+ out->writeSByte(t->value);
+ }
+
+ int numParts = (_flags.gameID == GI_EOB1) ? 12 : 17;
+ int partSize = (_flags.gameID == GI_EOB1) ? 2040 : 2130;
+ uint8 *tempData = new uint8[4096];
+ uint8 *cmpData = new uint8[1200];
+
+ for (int i = 0; i < numParts; i++) {
+ LevelTempData *l = _lvlTempData[i];
+ memset(tempData, 0, 4096);
+ memset(cmpData, 0, 1200);
+
+ if (!l || !(_hasTempDataFlags & (1 << i))) {
+ out->write(tempData, partSize);
+ continue;
+ }
+
+ _curBlockFile = getBlockFileName(i + 1, 0);
+ const uint8 *p = getBlockFileData();
+ uint16 len = READ_LE_UINT16(p + 4);
+ p += 6;
+
+ uint8 *d = tempData;
+ for (int ii = 0; ii < 1024; ii++) {
+ for (int iii = 0; iii < 4; iii++)
+ *d++ = l->wallsXorData[ii * len + iii] ^ p[ii * len + iii];
+ }
+
+ uint32 outsize = encodeFrame4(tempData, cmpData, 4096);
+ if (outsize > 1200)
+ error("Map compression failure: size of map = %d", outsize);
+
+ out->write(cmpData, 1200);
+
+ for (int ii = 0; ii < 30; ii++) {
+ EoBMonsterInPlay *m = &((EoBMonsterInPlay*)l->monsters)[ii];
+ out->writeByte(m->type);
+ out->writeByte(m->unit);
+ out->writeUint16LE(m->block);
+ out->writeByte(m->pos);
+ out->writeSByte(m->dir);
+ out->writeByte(m->animStep);
+ out->writeByte(m->shpIndex);
+ out->writeSByte(m->mode);
+ out->writeSByte(m->f_9);
+ out->writeSByte(m->curAttackFrame);
+ out->writeSByte(m->spellStatusLeft);
+ out->writeSint16LE(m->hitPointsMax);
+ out->writeSint16LE(m->hitPointsCur);
+ out->writeUint16LE(m->dest);
+ out->writeUint16LE(m->randItem);
+ out->writeUint16LE(m->fixedItem);
+ out->writeByte(m->flags);
+ out->writeByte(m->idleAnimState);
+
+ if (_flags.gameID == GI_EOB1)
+ out->writeByte(m->stepsTillRemoteAttack);
+ else
+ out->writeByte(m->curRemoteWeapon);
+
+ out->writeByte(m->numRemoteAttacks);
+ out->writeSByte(m->palette);
+
+ if (_flags.gameID == GI_EOB1) {
+ out->writeByte(0);
+ } else {
+ out->writeByte(m->directionChanged);
+ out->writeByte(m->stepsTillRemoteAttack);
+ out->writeByte(m->sub);
+ }
+ }
+
+ if (_flags.gameID == GI_EOB1)
+ continue;
+
+ for (int ii = 0; ii < 5; ii++) {
+ WallOfForce *w= &((WallOfForce*)l->wallsOfForce)[ii];
+ out->writeUint16LE(w->block);
+ out->writeUint32LE(w->duration / _tickLength);
+ }
+ }
+
+ delete[] cmpData;
+ delete[] tempData;
+
+ out->writeByte(_configMusic ? 1 : 0);
+ out->writeByte(_configMusic ? 1 : 0);
+ out->writeByte(_configHpBarGraphs ? 1 : 0);
+
+ for (int i = 51; i < 57; i++) {
+ EoBItemType *t = &_itemTypes[i];
+ out->writeUint16LE(t->invFlags);
+ out->writeUint16LE(t->handFlags);
+ out->writeSByte(t->armorClass);
+ out->writeSByte(t->allowedClasses);
+ out->writeSByte(t->requiredHands);
+ out->writeSByte(t->dmgNumDiceS);
+ out->writeSByte(t->dmgNumPipsS);
+ out->writeSByte(t->dmgIncS);
+ out->writeSByte(t->dmgNumDiceL);
+ out->writeSByte(t->dmgNumPipsL);
+ out->writeSByte(t->dmgIncL);
+ out->writeByte(t->unk1);
+ out->writeUint16LE(t->extraProperties);
+ }
+
+ out->finalize();
+ delete out;
+
+ return true;
+}
+
void *EoBCoreEngine::generateMonsterTempData(LevelTempData *tmp) {
EoBMonsterInPlay *m = new EoBMonsterInPlay[30];
memcpy(m, _monsters, sizeof(EoBMonsterInPlay) * 30);
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index b76d1da52a..f8cca1ab7b 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -150,7 +150,7 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
// it wasn't made sure that _curSfxFile was initialized
// so if it's out of bounds we just set it to 0.
if (_flags.platform == Common::kPlatformFMTowns) {
- if (_curSfxFile >= _soundData->fileListLen || _curSfxFile < 0)
+ if (!_sound->hasSoundFile(_curSfxFile))
_curSfxFile = 0;
_sound->loadSoundFile(_curSfxFile);
}
diff --git a/engines/kyra/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 3db055db90..cfac5db8b3 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -86,6 +86,10 @@ void EoBCoreEngine::loadLevel(int level, int sub) {
pos += 2;
}
+ // WORKAROUND for bug #3596547 (EOB1: Door Buttons Don't Work)
+ if (_flags.gameID == GI_EOB1 && level == 7 && _levelBlockProperties[0x035C].assignedObjects == 0x0E89)
+ _levelBlockProperties[0x035C].assignedObjects = 0x0E8D;
+
loadVcnData(gfxFile.c_str(), (_flags.gameID == GI_EOB1) ? _cgaMappingLevel[_cgaLevelMappingIndex[level - 1]] : 0);
_screen->loadEoBBitmap("INVENT", _cgaMappingInv, 5, 3, 2);
delayUntil(end);
@@ -100,7 +104,7 @@ void EoBCoreEngine::loadLevel(int level, int sub) {
void EoBCoreEngine::readLevelFileData(int level) {
Common::String file;
Common::SeekableReadStream *s = 0;
- static const char *suffix[] = { "INF", "DRO", "ELO", 0 };
+ static const char *const suffix[] = { "INF", "DRO", "ELO", 0 };
for (const char *const *sf = suffix; *sf && !s; sf++) {
file = Common::String::format("LEVEL%d.%s", level, *sf);
@@ -144,10 +148,10 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
const char *vmpPattern = (_flags.gameID == GI_EOB1 && (_configRenderMode == Common::kRenderEGA || _configRenderMode == Common::kRenderCGA)) ? "%s.EMP" : "%s.VMP";
Common::SeekableReadStream *s = _res->createReadStream(Common::String::format(vmpPattern, (const char *)pos));
- _vmpSize = s->readUint16LE();
+ uint16 size = s->readUint16LE();
delete[] _vmpPtr;
- _vmpPtr = new uint16[_vmpSize];
- for (int i = 0; i < _vmpSize; i++)
+ _vmpPtr = new uint16[size];
+ for (int i = 0; i < size; i++)
_vmpPtr[i] = s->readUint16LE();
delete s;
@@ -157,7 +161,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 +178,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
@@ -259,7 +263,7 @@ Common::String EoBCoreEngine::initLevelData(int sub) {
}
if (_flags.gameID == GI_EOB2)
- pos = initScriptTimers(pos);
+ initScriptTimers(pos);
return _curGfxFile;
}
@@ -271,7 +275,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);
}
}
@@ -283,7 +287,7 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
_screen->loadBitmap(Common::String::format(filePattern, _lastBlockDataFile).c_str(), 3, 3, 0);
const uint8 *pos = _screen->getCPagePtr(3);
- uint32 vcnSize = READ_LE_UINT16(pos) * _vcnBlockWidth * _vcnBlockHeight;
+ uint32 vcnSize = READ_LE_UINT16(pos) << 5;
pos += 2;
const uint8 *colMap = pos;
@@ -292,78 +296,28 @@ void EoBCoreEngine::loadVcnData(const char *file, const uint8 *cgaMapping) {
delete[] _vcnBlocks;
_vcnBlocks = new uint8[vcnSize];
- if (_flags.gameID == GI_EOB2 && _configRenderMode == Common::kRenderEGA) {
- const uint8 *egaTable = _screen->getEGADitheringTable();
- assert(_vmpPtr);
- assert(egaTable);
-
- delete[] _vcnTransitionMask;
- _vcnTransitionMask = new uint8[vcnSize];
-
- for (int i = 0; i < _vmpSize; i++) {
- uint16 vcnOffs = _vmpPtr[i] & 0x3FFF;
- const uint8 *src = &pos[vcnOffs << 5];
- uint8 *dst1 = &_vcnBlocks[vcnOffs << 7];
- uint8 *dst3 = &_vcnTransitionMask[vcnOffs << 7];
- int palOffset = (i < 330) ? 0 : _wllVcnOffset;
-
- for (int y = 0; y < 8; y++) {
- uint8 *dst2 = dst1 + 8;
- uint8 *dst4 = dst3 + 8;
-
- for (int x = 0; x < 4; x++) {
- uint8 in = *src++;
-
- dst1[0] = dst2[0] = egaTable[colMap[(in >> 4) + palOffset]];
- dst1[1] = dst2[1] = egaTable[colMap[(in & 0x0f) + palOffset]];
- dst3[0] = dst4[0] = (in & 0xf0) ? 0 : 0xff;
- dst3[1] = dst4[1] = (in & 0x0f) ? 0 : 0xff;
-
- dst1 += 2;
- dst2 += 2;
- dst3 += 2;
- dst4 += 2;
- }
-
- dst1 += 8;
- dst3 += 8;
- }
- }
- } else if (_configRenderMode == Common::kRenderCGA) {
+ if (_configRenderMode == Common::kRenderCGA) {
uint8 *tmp = _screen->encodeShape(0, 0, 1, 8, false, cgaMapping);
delete[] tmp;
delete[] _vcnTransitionMask;
_vcnTransitionMask = new uint8[vcnSize];
- uint8 tblSwitch = 0;
+ uint8 tblSwitch = 1;
uint8 *dst = _vcnBlocks;
uint8 *dst2 = _vcnTransitionMask;
while (dst < _vcnBlocks + vcnSize) {
const uint16 *table = _screen->getCGADitheringTable((tblSwitch++) & 1);
for (int ii = 0; ii < 2; ii++) {
- *dst++ = ((table[pos[0]] & 0x000f) << 4) | ((table[pos[0]] & 0x0f00) >> 8);
- *dst++= ((table[pos[1]] & 0x000f) << 4) | ((table[pos[1]] & 0x0f00) >> 8);
-
- uint8 msk = 0;
- if (pos[0] & 0xf0)
- msk |= 0x30;
- if (pos[0] & 0x0f)
- msk |= 0x03;
- *dst2++ = msk ^ 0x33;
-
- msk = 0;
- if (pos[1] & 0xf0)
- msk |= 0x30;
- if (pos[1] & 0x0f)
- msk |= 0x03;
- *dst2++ = msk ^ 0x33;
-
+ *dst++ = (table[pos[0]] & 0x000F) | ((table[pos[0]] & 0x0F00) >> 4);
+ *dst++ = (table[pos[1]] & 0x000F) | ((table[pos[1]] & 0x0F00) >> 4);
+ *dst2++ = ((pos[0] & 0xF0 ? 0x30 : 0) | (pos[0] & 0x0F ? 0x03 : 0)) ^ 0x33;
+ *dst2++ = ((pos[1] & 0xF0 ? 0x30 : 0) | (pos[1] & 0x0F ? 0x03 : 0)) ^ 0x33;
pos += 2;
}
}
} else {
- if (_configRenderMode != Common::kRenderEGA)
+ if (!(_flags.gameID == GI_EOB1 && _configRenderMode == Common::kRenderEGA))
memcpy(_vcnColTable, colMap, 32);
memcpy(_vcnBlocks, pos, vcnSize);
}
@@ -429,8 +383,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();
@@ -477,7 +431,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])
@@ -529,7 +483,7 @@ void EoBCoreEngine::toggleWallState(int wall, int toggle) {
if (toggle)
_wllWallFlags[wall + i] |= 2;
else
- _wllWallFlags[wall + i] &= 0xfd;
+ _wllWallFlags[wall + i] &= 0xFD;
}
}
@@ -643,7 +597,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;
}
@@ -758,7 +712,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;
@@ -781,7 +735,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;
@@ -826,7 +780,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_hof.cpp b/engines/kyra/scene_hof.cpp
index f6cd77ca89..62690c4766 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -437,7 +437,7 @@ void KyraEngine_HoF::startSceneScript(int unk1) {
strcpy(filename, _sceneList[sceneId].filename1);
strcat(filename, ".");
- strcat(filename, _scriptLangExt[(_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? 0 : _lang]);
+ strcat(filename, _scriptLangExt[(_flags.platform == Common::kPlatformDOS && !_flags.isTalkie) ? 0 : _lang]);
_res->exists(filename, true);
_emc->load(filename, &_sceneScriptData, &_opcodes);
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 628654f127..154606d46f 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(_lastBlockDataFile, "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,14 +1180,14 @@ 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->fadePaletteStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
+ while (_screen->timedPaletteFadeStep(_screen->getPalette(0).getData(), p2, _system->getMillis() - ctime, 10))
updateInput();
ctime = _system->getMillis();
- while (_screen->fadePaletteStep(p2, _screen->getPalette(0).getData(), _system->getMillis() - ctime, 50))
+ while (_screen->timedPaletteFadeStep(p2, _screen->getPalette(0).getData(), _system->getMillis() - ctime, 50))
updateInput();
}
@@ -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_mr.cpp b/engines/kyra/scene_mr.cpp
index d6df523f82..c9486d9c45 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -22,7 +22,7 @@
#include "kyra/kyra_mr.h"
#include "kyra/screen_mr.h"
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "kyra/resource.h"
#include "common/system.h"
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index 3a694e05fe..927d891a5f 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];
@@ -348,9 +348,6 @@ bool KyraRpgEngine::checkSceneUpdateNeed(int block) {
void KyraRpgEngine::drawVcnBlocks() {
uint8 *d = _sceneWindowBuffer;
uint16 *bdb = _blockDrawingBuffer;
- uint16 pitch = 22 * _vcnBlockWidth * 2;
- uint8 pxl[2];
- pxl[0] = pxl[1] = 0;
for (int y = 0; y < 15; y++) {
for (int x = 0; x < 22; x++) {
@@ -369,96 +366,95 @@ void KyraRpgEngine::drawVcnBlocks() {
if (vcnOffset & 0x4000) {
horizontalFlip = true;
- vcnOffset &= 0x3fff;
+ vcnOffset &= 0x3FFF;
}
uint8 *src = 0;
if (vcnOffset) {
- src = &_vcnBlocks[vcnOffset * _vcnBlockWidth * _vcnBlockHeight];
+ src = &_vcnBlocks[vcnOffset << 5];
wllVcnOffset = _wllVcnOffset;
} else {
// floor/ceiling blocks
vcnOffset = bdb[329];
if (vcnOffset & 0x4000) {
horizontalFlip = true;
- vcnOffset &= 0x3fff;
+ vcnOffset &= 0x3FFF;
}
- src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset * _vcnBlockWidth * _vcnBlockHeight);
+ src = (_vcfBlocks ? _vcfBlocks : _vcnBlocks) + (vcnOffset << 5);
}
uint8 shift = _vcnShift ? _vcnShift[vcnOffset] : _blockBrightness;
if (horizontalFlip) {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- src += (_vcnBlockWidth - 1);
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ src += 3;
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
- d[_vcnFlip0] = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
- d[_vcnFlip1] = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
- d += 2;
+ *d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
+ *d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
}
- src += (_vcnBlockWidth + 1);
- d += (pitch - 2 * _vcnBlockWidth);
+ src += 5;
+ d += 168;
}
} else {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src++;
*d++ = _vcnColTable[((bl >> 4) + wllVcnOffset) | shift];
- *d++ = _vcnColTable[((bl & 0x0f) + wllVcnOffset) | shift];
+ *d++ = _vcnColTable[((bl & 0x0F) + wllVcnOffset) | shift];
}
- d += (pitch - 2 * _vcnBlockWidth);
+ d += 168;
}
}
- d -= (pitch * _vcnBlockHeight - 2 * _vcnBlockWidth);
+ d -= 1400;
if (vcnExtraOffsetWll) {
- d -= (2 * _vcnBlockWidth);
+ d -= 8;
horizontalFlip = false;
if (vcnExtraOffsetWll & 0x4000) {
- vcnExtraOffsetWll &= 0x3fff;
+ vcnExtraOffsetWll &= 0x3FFF;
horizontalFlip = true;
}
shift = _vcnShift ? _vcnShift[vcnExtraOffsetWll] : _blockBrightness;
- src = &_vcnBlocks[vcnExtraOffsetWll * _vcnBlockWidth * _vcnBlockHeight];
- uint8 *maskTable = _vcnTransitionMask ? &_vcnTransitionMask[vcnExtraOffsetWll * _vcnBlockWidth * _vcnBlockHeight] : 0;
+ src = &_vcnBlocks[vcnExtraOffsetWll << 5];
+ uint8 *maskTable = _vcnTransitionMask ? &_vcnTransitionMask[vcnExtraOffsetWll << 5] : 0;
if (horizontalFlip) {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- src += (_vcnBlockWidth - 1);
- maskTable += (_vcnBlockWidth - 1);
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ src += 3;
+ maskTable += 3;
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src--;
uint8 mask = _vcnTransitionMask ? *maskTable-- : 0;
- pxl[_vcnFlip0] = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
- pxl[_vcnFlip1] = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
+ uint8 h = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
+ uint8 l = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
if (_vcnTransitionMask)
- *d = (*d & (mask & 0x0f)) | pxl[0];
- else if (pxl[0])
- *d = pxl[0];
+ *d = (*d & (mask & 0x0F)) | h;
+ else if (h)
+ *d = h;
d++;
if (_vcnTransitionMask)
- *d = (*d & (mask >> 4)) | pxl[1];
- else if (pxl[1])
- *d = pxl[1];
+ *d = (*d & (mask >> 4)) | l;
+ else if (l)
+ *d = l;
d++;
}
- src += (_vcnBlockWidth + 1);
- maskTable += (_vcnBlockWidth + 1);
- d += (pitch - 2 * _vcnBlockWidth);
+ src += 5;
+ maskTable += 5;
+ d += 168;
}
} else {
- for (int blockY = 0; blockY < _vcnBlockHeight; blockY++) {
- for (int blockX = 0; blockX < _vcnBlockWidth; blockX++) {
+ for (int blockY = 0; blockY < 8; blockY++) {
+ for (int blockX = 0; blockX < 4; blockX++) {
uint8 bl = *src++;
uint8 mask = _vcnTransitionMask ? *maskTable++ : 0;
uint8 h = _vcnColTable[((bl >> 4) + wllVcnRmdOffset) | shift];
- uint8 l = _vcnColTable[((bl & 0x0f) + wllVcnRmdOffset) | shift];
+ uint8 l = _vcnColTable[((bl & 0x0F) + wllVcnRmdOffset) | shift];
if (_vcnTransitionMask)
*d = (*d & (mask >> 4)) | h;
@@ -467,18 +463,18 @@ void KyraRpgEngine::drawVcnBlocks() {
d++;
if (_vcnTransitionMask)
- *d = (*d & (mask & 0x0f)) | l;
+ *d = (*d & (mask & 0x0F)) | l;
else if (l)
*d = l;
d++;
}
- d += (pitch - 2 * _vcnBlockWidth);
+ d += 168;
}
}
- d -= (pitch * _vcnBlockHeight - 2 * _vcnBlockWidth);
+ d -= 1400;
}
}
- d += (pitch * (_vcnBlockHeight - 1));
+ d += 1232;
}
screen()->copyBlockToPage(_sceneDrawPage1, _sceneXoffset, 0, 176, 120, _sceneWindowBuffer);
@@ -486,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) {
@@ -567,9 +563,9 @@ void KyraRpgEngine::openCloseDoor(int block, int openClose) {
int c = (_wllWallFlags[_levelBlockProperties[block].walls[0]] & 8) ? 0 : 1;
int v = _levelBlockProperties[block].walls[c];
- int flg = (openClose == 1) ? 0x10 : (openClose == -1 ? 0x20 : 0);
+ int flg = (_flags.gameID == GI_EOB1) ? 1 : ((openClose == 1) ? 0x10 : (openClose == -1 ? 0x20 : 0));
- if (_wllWallFlags[v] & flg)
+ if ((_flags.gameID == GI_EOB1 && openClose == -1 && !(_wllWallFlags[v] & flg)) || (!(_flags.gameID == GI_EOB1 && openClose == -1) && (_wllWallFlags[v] & flg)))
return;
for (int i = 0; i < 3; i++) {
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 04d805737f..419b630714 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -51,13 +51,12 @@ Screen::Screen(KyraEngine_v1 *vm, OSystem *system, const ScreenDim *dimTable, co
memset(_fonts, 0, sizeof(_fonts));
memset(_pagePtrs, 0, sizeof(_pagePtrs));
- // Set scale factor to 1 (no scaling) for all pages
- memset(_pageScaleFactor, 1, sizeof(_pageScaleFactor));
// In VGA mode the odd and even page pointers point to the same buffers.
for (int i = 0; i < SCREEN_PAGE_NUM; i++)
_pageMapping[i] = i & ~1;
_renderMode = Common::kRenderDefault;
+ _sjisMixedFontMode = false;
_currentFont = FID_8_FNT;
_paletteChanged = true;
@@ -114,7 +113,7 @@ bool Screen::init() {
}
// CGA and EGA modes use additional pages to do the CGA/EGA specific graphics conversions.
- if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
+ if (_vm->game() == GI_EOB1 && (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA)) {
for (int i = 0; i < 8; i++)
_pageMapping[i] = i;
}
@@ -126,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]) {
@@ -141,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);
}
}
@@ -154,9 +154,7 @@ bool Screen::init() {
}
int numPages = realPages.size();
- uint32 bufferSize = 0;
- for (int i = 0; i < numPages; i++)
- bufferSize += (SCREEN_PAGE_SIZE * _pageScaleFactor[realPages[i]] * _pageScaleFactor[realPages[i]]);
+ uint32 bufferSize = numPages * SCREEN_PAGE_SIZE;
uint8 *pagePtr = new uint8[bufferSize];
memset(pagePtr, 0, bufferSize);
@@ -167,7 +165,7 @@ bool Screen::init() {
_pagePtrs[i] = _pagePtrs[_pageMapping[i]];
} else {
_pagePtrs[i] = pagePtr;
- pagePtr += (SCREEN_PAGE_SIZE * _pageScaleFactor[i] * _pageScaleFactor[i]);
+ pagePtr += SCREEN_PAGE_SIZE;
}
}
@@ -292,7 +290,7 @@ void Screen::updateScreen() {
needRealUpdate = true;
if (!_useOverlays)
- _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W * _pageScaleFactor[2], SCREEN_H * _pageScaleFactor[2]);
+ _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W, SCREEN_H);
else
_system->copyRectToScreen(getPagePtr(2), SCREEN_W, 640, 0, SCREEN_W, SCREEN_H);
}
@@ -303,12 +301,12 @@ void Screen::updateScreen() {
void Screen::updateDirtyRects() {
if (_forceFullUpdate) {
- _system->copyRectToScreen(getCPagePtr(0), SCREEN_W * _pageScaleFactor[0], 0, 0, SCREEN_W * _pageScaleFactor[0], SCREEN_H * _pageScaleFactor[0]);
+ _system->copyRectToScreen(getCPagePtr(0), SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
} else {
const byte *page0 = getCPagePtr(0);
Common::List<Common::Rect>::iterator it;
for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
- _system->copyRectToScreen(page0 + it->top * SCREEN_W * _pageScaleFactor[0] + it->left, SCREEN_W * _pageScaleFactor[0], it->left, it->top, it->width(), it->height());
+ _system->copyRectToScreen(page0 + it->top * SCREEN_W + it->left, SCREEN_W, it->left, it->top, it->width(), it->height());
}
}
_forceFullUpdate = false;
@@ -493,7 +491,7 @@ void Screen::clearPage(int pageNum) {
assert(pageNum < SCREEN_PAGE_NUM);
if (pageNum == 0 || pageNum == 1)
_forceFullUpdate = true;
- memset(getPagePtr(pageNum), 0, SCREEN_PAGE_SIZE * _pageScaleFactor[_curPage] * _pageScaleFactor[_curPage]);
+ memset(getPagePtr(pageNum), 0, SCREEN_PAGE_SIZE);
clearOverlayPage(pageNum);
}
@@ -507,7 +505,7 @@ int Screen::setCurPage(int pageNum) {
void Screen::clearCurPage() {
if (_curPage == 0 || _curPage == 1)
_forceFullUpdate = true;
- memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE * _pageScaleFactor[_curPage] * _pageScaleFactor[_curPage]);
+ memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE);
clearOverlayPage(_curPage);
}
@@ -672,7 +670,7 @@ void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) {
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -881,26 +879,16 @@ void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) {
}
void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags) {
- // Since we don't (need to) do any actual scaling, we check for compatible pages here
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
- x1 *= _pageScaleFactor[srcPage];
- y1 *= _pageScaleFactor[srcPage];
- x2 *= _pageScaleFactor[dstPage];
- y2 *= _pageScaleFactor[dstPage];
- w *= _pageScaleFactor[srcPage];
- h *= _pageScaleFactor[srcPage];
-
if (x2 < 0) {
if (x2 <= -w)
return;
w += x2;
x1 -= x2;
x2 = 0;
- } else if (x2 + w >= SCREEN_W * _pageScaleFactor[dstPage]) {
- if (x2 > SCREEN_W * _pageScaleFactor[dstPage])
+ } else if (x2 + w >= SCREEN_W) {
+ if (x2 > SCREEN_W)
return;
- w = SCREEN_W * _pageScaleFactor[srcPage] - x2;
+ w = SCREEN_W - x2;
}
if (y2 < 0) {
@@ -909,14 +897,14 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
h += y2;
y1 -= y2;
y2 = 0;
- } else if (y2 + h >= SCREEN_H * _pageScaleFactor[dstPage]) {
- if (y2 > SCREEN_H * _pageScaleFactor[dstPage])
+ } else if (y2 + h >= SCREEN_H) {
+ if (y2 > SCREEN_H)
return;
- h = SCREEN_H * _pageScaleFactor[srcPage] - y2;
+ h = SCREEN_H - y2;
}
- const uint8 *src = getPagePtr(srcPage) + y1 * SCREEN_W * _pageScaleFactor[srcPage] + x1;
- uint8 *dst = getPagePtr(dstPage) + y2 * SCREEN_W * _pageScaleFactor[dstPage] + x2;
+ const uint8 *src = getPagePtr(srcPage) + y1 * SCREEN_W + x1;
+ uint8 *dst = getPagePtr(dstPage) + y2 * SCREEN_W + x2;
if (src == dst)
return;
@@ -929,8 +917,8 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (flags & CR_NO_P_CHECK) {
while (h--) {
memmove(dst, src, w);
- src += SCREEN_W * _pageScaleFactor[srcPage];
- dst += SCREEN_W * _pageScaleFactor[dstPage];
+ src += SCREEN_W;
+ dst += SCREEN_W;
}
} else {
while (h--) {
@@ -938,24 +926,19 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (src[i])
dst[i] = src[i];
}
- src += SCREEN_W * _pageScaleFactor[srcPage];
- dst += SCREEN_W * _pageScaleFactor[dstPage];
+ src += SCREEN_W;
+ dst += SCREEN_W;
}
}
}
void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *dest) {
- x *= _pageScaleFactor[pageNum];
- y *= _pageScaleFactor[pageNum];
- w *= _pageScaleFactor[pageNum];
- h *= _pageScaleFactor[pageNum];
-
if (y < 0) {
dest += (-y) * w;
h += y;
y = 0;
} else if (y + h > SCREEN_H) {
- h = SCREEN_H * _pageScaleFactor[pageNum] - y;
+ h = SCREEN_H - y;
}
if (x < 0) {
@@ -963,7 +946,7 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
w += x;
x = 0;
} else if (x + w > SCREEN_W) {
- w = SCREEN_W * _pageScaleFactor[pageNum] - x;
+ w = SCREEN_W - x;
}
if (w < 0 || h < 0)
@@ -972,17 +955,14 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
uint8 *pagePtr = getPagePtr(pageNum);
for (int i = y; i < y + h; ++i)
- memcpy(dest + (i - y) * w, pagePtr + i * SCREEN_W * _pageScaleFactor[pageNum] + x, w);
+ memcpy(dest + (i - y) * w, pagePtr + i * SCREEN_W + x, w);
}
void Screen::copyPage(uint8 srcPage, uint8 dstPage) {
- // Since we don't (need to) do any actual scaling, we check for compatible pages here
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
uint8 *src = getPagePtr(srcPage);
uint8 *dst = getPagePtr(dstPage);
if (src != dst)
- memcpy(dst, src, SCREEN_W * _pageScaleFactor[srcPage] * SCREEN_H * _pageScaleFactor[srcPage]);
+ memcpy(dst, src, SCREEN_W * SCREEN_H);
copyOverlayRegion(0, 0, 0, 0, SCREEN_W, SCREEN_H, srcPage, dstPage);
if (dstPage == 0 || dstPage == 1)
@@ -1009,12 +989,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
if (w < 0 || h < 0)
return;
- x *= _pageScaleFactor[pageNum];
- y *= _pageScaleFactor[pageNum];
- w *= _pageScaleFactor[pageNum];
- h *= _pageScaleFactor[pageNum];
-
- uint8 *dst = getPagePtr(pageNum) + y * SCREEN_W * _pageScaleFactor[pageNum] + x;
+ uint8 *dst = getPagePtr(pageNum) + y * SCREEN_W + x;
if (pageNum == 0 || pageNum == 1)
addDirtyRect(x, y, w, h);
@@ -1023,7 +998,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
while (h--) {
memcpy(dst, src, w);
- dst += SCREEN_W * _pageScaleFactor[pageNum];
+ dst += SCREEN_W;
src += w;
}
}
@@ -1101,7 +1076,7 @@ void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum,
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -1178,7 +1153,7 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
color |= (color << 4);
} else if (_renderMode == Common::kRenderCGA) {
color &= 0x03;
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
color &= 0x0F;
}
@@ -1187,7 +1162,7 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) {
int currLine = 0;
while (currLine < length) {
*ptr = color;
- ptr += SCREEN_W * _pageScaleFactor[_curPage];
+ ptr += SCREEN_W;
currLine++;
}
} else {
@@ -1233,7 +1208,8 @@ bool Screen::loadFont(FontId fontId, const char *filename) {
fnt = new AMIGAFont();
#ifdef ENABLE_EOB
else if (_vm->game() == GI_EOB1 || _vm->game() == GI_EOB2)
- fnt = new OldDOSFont(_renderMode, _vm->gameFlags().useHiRes);
+ // We use normal VGA rendering in EOB II, since we do the complete EGA dithering in updateScreen().
+ fnt = new OldDOSFont(_useHiResEGADithering ? Common::kRenderVGA : _renderMode);
#endif // ENABLE_EOB
else
fnt = new DOSFont();
@@ -1272,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) {
@@ -1300,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;
@@ -1314,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) {
@@ -1362,9 +1348,6 @@ void Screen::drawChar(uint16 c, int x, int y) {
if (x + charWidth > SCREEN_W || y + charHeight > SCREEN_H)
return;
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
-
if (useOverlay) {
uint8 *destPage = getOverlayPtr(_curPage);
if (!destPage) {
@@ -1376,11 +1359,11 @@ void Screen::drawChar(uint16 c, int x, int y) {
fnt->drawChar(c, destPage, 640);
} else {
- fnt->drawChar(c, getPagePtr(_curPage) + y * SCREEN_W * _pageScaleFactor[_curPage] + x, SCREEN_W * _pageScaleFactor[_curPage]);
+ fnt->drawChar(c, getPagePtr(_curPage) + y * SCREEN_W + x, SCREEN_W);
}
if (_curPage == 0 || _curPage == 1)
- addDirtyRect(x, y, charWidth * _pageScaleFactor[_curPage], charHeight * _pageScaleFactor[_curPage]);
+ addDirtyRect(x, y, charWidth, charHeight);
}
void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...) {
@@ -1519,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];
@@ -1776,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;
@@ -1802,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;
@@ -1891,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);
@@ -1919,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);
@@ -1967,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];
}
@@ -1980,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];
@@ -1989,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 {
@@ -2003,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];
@@ -2019,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 {
@@ -2031,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 {
@@ -2046,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];
}
@@ -2147,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;
@@ -2160,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) {
@@ -2188,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;
@@ -2209,7 +2192,7 @@ uint16 Screen::decodeEGAGetCode(const uint8 *&pos, uint8 &nib) {
res >>= 4;
} else {
pos++;
- res &= 0xfff;
+ res &= 0xFFF;
}
return res;
}
@@ -2891,8 +2874,6 @@ void Screen::setShapePages(int page1, int page2, int minY, int maxY) {
void Screen::setMouseCursor(int x, int y, const byte *shape) {
if (!shape)
return;
- // if mouseDisabled
- // return _mouseShape
if (_vm->gameFlags().useAltShapeHeader)
shape += 2;
@@ -3215,7 +3196,7 @@ void Screen::addDirtyRect(int x, int y, int w, int h) {
Common::Rect r(x, y, x + w, y + h);
// Clip rectangle
- r.clip(SCREEN_W * _pageScaleFactor[0], SCREEN_H * _pageScaleFactor[0]);
+ r.clip(SCREEN_W, SCREEN_H);
// If it is empty after clipping, we are done
if (r.isEmpty())
@@ -3322,8 +3303,6 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
if (srcPage > 13 || dstPage > 13)
error("Screen::crossFadeRegion(): attempting to use temp page as source or dest page.");
- assert(_pageScaleFactor[srcPage] == _pageScaleFactor[dstPage]);
-
hideMouse();
uint16 *wB = (uint16 *)_pagePtrs[14];
@@ -3341,6 +3320,9 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
for (int i = 0; i < h; i++)
SWAP(hB[_vm->_rnd.getRandomNumberRng(0, h - 1)], hB[i]);
+ uint8 *s = _pagePtrs[srcPage];
+ uint8 *d = _pagePtrs[dstPage];
+
for (int i = 0; i < h; i++) {
int iH = i;
uint32 end = _system->getMillis() + 3;
@@ -3353,7 +3335,8 @@ void Screen::crossFadeRegion(int x1, int y1, int x2, int y2, int w, int h, int s
if (++iH >= h)
iH = 0;
- setPagePixel(dstPage, dX, dY, getPagePixel(srcPage, sX, sY));
+ d[dY * 320 + dX] = s[sY * 320 + sX];
+ addDirtyRect(dX, dY, 1, 1);
}
// This tries to speed things up, to get similiar speeds as in DOSBox etc.
@@ -3595,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;
@@ -3616,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) {
@@ -3633,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);
}
}
@@ -3672,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 60bfeb3241..156b5b9a7c 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -146,7 +146,7 @@ private:
*/
class OldDOSFont : public Font {
public:
- OldDOSFont(Common::RenderMode mode, bool useHiResEGADithering);
+ OldDOSFont(Common::RenderMode mode);
~OldDOSFont();
bool load(Common::SeekableReadStream &file);
@@ -168,8 +168,6 @@ private:
int _numGlyphs;
Common::RenderMode _renderMode;
- bool _useHiResEGADithering;
- bool _useLoResEGA;
static uint16 *_cgaDitheringTable;
static int _numRef;
@@ -213,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; }
@@ -232,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;
@@ -426,12 +430,12 @@ public:
void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src);
void shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPage, int ticks, bool transparent);
- virtual void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
+ void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
void clearPage(int pageNum);
- virtual uint8 getPagePixel(int pageNum, int x, int y);
- virtual void setPagePixel(int pageNum, int x, int y, uint8 color);
+ uint8 getPagePixel(int pageNum, int x, int y);
+ void setPagePixel(int pageNum, int x, int y, uint8 color);
const uint8 *getCPagePtr(int pageNum) const;
uint8 *getPageRect(int pageNum, int x, int y, int w, int h);
@@ -457,7 +461,7 @@ public:
void copyPalette(const int dst, const int src);
// gui specific (processing on _curPage)
- virtual void drawLine(bool vertical, int x, int y, int length, int color);
+ void drawLine(bool vertical, int x, int y, int length, int color);
void drawClippedLine(int x1, int y1, int x2, int y2, int color);
virtual void drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2);
void drawBox(int x1, int y1, int x2, int y2, int color);
@@ -470,9 +474,9 @@ public:
int getFontWidth() const;
int getCharWidth(uint16 c) const;
- int getTextWidth(const char *str) const;
+ int getTextWidth(const char *str);
- virtual void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
+ void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
virtual void setTextColorMap(const uint8 *cmap) = 0;
void setTextColor(const uint8 *cmap, int a, int b);
@@ -549,7 +553,7 @@ public:
protected:
uint8 *getPagePtr(int pageNum);
- void updateDirtyRects();
+ virtual void updateDirtyRects();
void updateDirtyRectsAmiga();
void updateDirtyRectsOvl();
@@ -573,18 +577,17 @@ protected:
uint8 *_pagePtrs[16];
uint8 *_sjisOverlayPtrs[SCREEN_OVLS_NUM];
- uint8 _pageScaleFactor[SCREEN_PAGE_NUM];
uint8 _pageMapping[SCREEN_PAGE_NUM];
bool _useOverlays;
bool _useSJIS;
bool _use16ColorMode;
bool _useHiResEGADithering;
- bool _useLoResEGA;
bool _isAmiga;
Common::RenderMode _renderMode;
uint8 _sjisInvisibleColor;
+ bool _sjisMixedFontMode;
Palette *_screenPalette;
Common::Array<Palette *> _palettes;
@@ -600,7 +603,7 @@ protected:
int _animBlockSize;
// dimension handling
- const ScreenDim * const _dimTable;
+ const ScreenDim *const _dimTable;
ScreenDim **_customDimTable;
const int _dimTableCount;
int _curDimIndex;
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index ae75c111b4..ae62e522e7 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -52,10 +52,10 @@ Screen_EoB::Screen_EoB(EoBCoreEngine *vm, OSystem *system) : Screen(vm, system,
_cgaScaleTable = 0;
_gfxMaxY = 0;
_egaDitheringTable = 0;
- _egaPixelValueTable = 0;
+ _egaDitheringTempPage = 0;
_cgaMappingDefault = 0;
_cgaDitheringTables[0] = _cgaDitheringTables[1] = 0;
- _useLoResEGA = _useHiResEGADithering = false;
+ _useHiResEGADithering = false;
}
Screen_EoB::~Screen_EoB() {
@@ -63,18 +63,12 @@ Screen_EoB::~Screen_EoB() {
delete[] _dsTempPage;
delete[] _cgaScaleTable;
delete[] _egaDitheringTable;
- delete[] _egaPixelValueTable;
+ delete[] _egaDitheringTempPage;
delete[] _cgaDitheringTables[0];
delete[] _cgaDitheringTables[1];
}
bool Screen_EoB::init() {
- // Define hi-res pages for EGA mode in EOB II
- if (_vm->gameFlags().useHiRes) {
- for (int i = 0; i < 8; i++)
- _pageScaleFactor[i] = 2;
- }
-
if (Screen::init()) {
int temp;
_gfxMaxY = _vm->staticres()->loadRawData(kEoBBaseExpObjectY, temp);
@@ -98,13 +92,9 @@ bool Screen_EoB::init() {
if (_vm->gameFlags().useHiRes && _renderMode == Common::kRenderEGA) {
_useHiResEGADithering = true;
_egaDitheringTable = new uint8[256];
- _egaPixelValueTable = new uint8[256];
- for (int i = 0; i < 256; i++) {
- _egaDitheringTable[i] = i & 0x0f;
- _egaPixelValueTable[i] = i & 0x0f;
- }
- } else if (_renderMode == Common::kRenderEGA) {
- _useLoResEGA = true;
+ _egaDitheringTempPage = new uint8[SCREEN_W * 2 * SCREEN_H * 2];
+ for (int i = 0; i < 256; i++)
+ _egaDitheringTable[i] = i & 0x0F;
} else if (_renderMode == Common::kRenderCGA) {
_cgaMappingDefault = _vm->staticres()->loadRawData(kEoB1CgaMappingDefault, temp);
_cgaDitheringTables[0] = new uint16[256];
@@ -115,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;
@@ -144,14 +134,20 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov
int mouseH = (shape[3]);
int colorKey = (_renderMode == Common::kRenderCGA) ? 0 : _cursorColorKey;
- uint8 *cursor = new uint8[mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]];
+ int scaleFactor = _useHiResEGADithering ? 2 : 1;
+
+ uint8 *cursor = new uint8[mouseW * scaleFactor * mouseH * scaleFactor];
// We use memset and copyBlockToPage instead of fillRect to make sure that the
// color key 0xFF doesn't get converted into EGA color
- memset(cursor, colorKey, mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]);
- copyBlockToPage(6, 0, 0, mouseW, mouseH, cursor);
+ memset(cursor, colorKey, mouseW * scaleFactor * mouseH * scaleFactor);
+ copyBlockToPage(6, 0, 0, mouseW * scaleFactor, mouseH * scaleFactor, cursor);
drawShape(6, shape, 0, 0, 0, 2, ovl);
CursorMan.showMouse(false);
- copyRegionToBuffer(6, 0, 0, mouseW, mouseH, cursor);
+
+ if (_useHiResEGADithering)
+ ditherRect(getCPagePtr(6), cursor, mouseW * scaleFactor, mouseW, mouseH, colorKey);
+ else
+ copyRegionToBuffer(6, 0, 0, mouseW, mouseH, cursor);
// Mouse cursor post processing for CGA mode. Unlike the original (which uses drawShape for the mouse cursor)
// the cursor manager cannot know whether a pixel value of 0 is supposed to be black or transparent. Thus, we
@@ -176,7 +172,7 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov
}
}
- CursorMan.replaceCursor(cursor, mouseW * _pageScaleFactor[6], mouseH * _pageScaleFactor[6], x, y, colorKey);
+ CursorMan.replaceCursor(cursor, mouseW * scaleFactor, mouseH * scaleFactor, x, y, colorKey);
if (isMouseVisible())
CursorMan.showMouse(true);
delete[] cursor;
@@ -192,19 +188,6 @@ void Screen_EoB::loadFileDataToPage(Common::SeekableReadStream *s, int pageNum,
s->read(_pagePtrs[pageNum], size);
}
-void Screen_EoB::printText(const char *str, int x, int y, uint8 color1, uint8 color2) {
- if (_useHiResEGADithering) {
- // This is sort of an abuse of the text color map. But since EOB doesn't use it anyway
- // and the font drawing code needs access to both the original color values and the
- // EGA dithering colors we pass them on like this.
- uint8 cmap[2];
- cmap[0] = _egaDitheringTable[color2];
- cmap[1] = _egaDitheringTable[color1];
- setTextColor(cmap, 2, 3);
- }
- Screen::printText(str, x, y, color1, color2);
-}
-
void Screen_EoB::printShadedText(const char *string, int x, int y, int col1, int col2) {
printText(string, x - 1, y, 12, col2);
printText(string, x, y + 1, 12, 0);
@@ -272,32 +255,19 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
if (cgaMapping)
generateCGADitheringTables(cgaMapping);
- uint16 *d = (uint16*)dst;
+ uint16 *d = (uint16 *)dst;
uint8 tblSwitch = 0;
for (int height = SCREEN_H; height; height--) {
const uint16 *table = _cgaDitheringTables[(tblSwitch++) & 1];
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 (_useHiResEGADithering) {
- for (int height = SCREEN_H; height; height--) {
- uint8 *dst2 = dst + SCREEN_W * 2;
- for (int width = SCREEN_W; width; width--) {
- uint8 in = _egaDitheringTable[*src++];
- *dst++ = *dst2++ = in >> 4;
- *dst++ = *dst2++ = in & 0x0f;
- }
- dst += (SCREEN_W * 2);
- }
-
- } else if (_renderMode == Common::kRenderEGA) {
+ } else if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering) {
uint32 len = SCREEN_W * SCREEN_H;
while (len--)
- *dst++ = *src++ & 0x0f;
-
+ *dst++ = *src++ & 0x0F;
} else {
copyPage(srcPage, dstPage);
}
@@ -306,111 +276,6 @@ void Screen_EoB::convertPage(int srcPage, int dstPage, const uint8 *cgaMapping)
_forceFullUpdate = true;
}
-void Screen_EoB::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum, bool xored) {
- if (!_useHiResEGADithering) {
- Screen::fillRect(x1, y1, x2, y2, color, pageNum, xored);
- return;
- }
-
- assert(x2 < SCREEN_W && y2 < SCREEN_H);
- if (pageNum == -1)
- pageNum = _curPage;
-
- uint16 pitch = (SCREEN_W - (x2 - x1 + 1)) * _pageScaleFactor[pageNum];
- uint8 col1 = (_egaDitheringTable[color] >> 4);
- uint8 col2 = (_egaDitheringTable[color] & 0x0f);
-
- x1 *= _pageScaleFactor[pageNum];
- y1 *= _pageScaleFactor[pageNum];
- x2 *= _pageScaleFactor[pageNum];
- y2 *= _pageScaleFactor[pageNum];
- uint16 w = x2 - x1 + _pageScaleFactor[pageNum];
- uint16 h = y2 - y1 + _pageScaleFactor[pageNum];
-
- uint8 *dst = getPagePtr(pageNum) + y1 * SCREEN_W * _pageScaleFactor[pageNum] + x1;
- if (pageNum == 0 || pageNum == 1)
- addDirtyRect(x1, y1, w, h);
-
- while (h--) {
- for (uint16 w1 = w; w1; w1 -= 2) {
- *dst++ = col1;
- *dst++ = col2;
- }
- dst += pitch;
- }
-}
-
-void Screen_EoB::drawLine(bool vertical, int x, int y, int length, int color) {
- if (!_useHiResEGADithering) {
- Screen::drawLine(vertical, x, y, length, color);
- return;
- }
-
- uint16 pitch = (SCREEN_W - 1) * _pageScaleFactor[_curPage];
- uint8 col1 = (_egaDitheringTable[color] >> 4);
- uint8 col2 = (_egaDitheringTable[color] & 0x0f);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
- length *= _pageScaleFactor[_curPage];
- uint8 *ptr = getPagePtr(_curPage) + y * SCREEN_W * _pageScaleFactor[_curPage] + x;
- uint8 *ptr2 = ptr + SCREEN_W * _pageScaleFactor[_curPage];
-
- if (vertical) {
- assert((y + length) <= SCREEN_H * _pageScaleFactor[_curPage]);
- int currLine = 0;
- while (currLine < length) {
- *ptr++ = col1;
- *ptr++ = col2;
- ptr += pitch;
- currLine++;
- }
- } else {
- assert((x + length) <= SCREEN_W * _pageScaleFactor[_curPage]);
- int currLine = 0;
- while (currLine < length) {
- *ptr++ = *ptr2++ = col1;
- *ptr++ = *ptr2++ = col2;
- currLine += 2;
- }
- }
-
- if (_curPage == 0 || _curPage == 1)
- addDirtyRect(x, y, (vertical) ? _pageScaleFactor[_curPage] : length, (vertical) ? length : _pageScaleFactor[_curPage]);
-}
-
-uint8 Screen_EoB::getPagePixel(int pageNum, int x, int y) {
- if (!_useHiResEGADithering)
- return Screen::getPagePixel(pageNum, x, y);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
- uint8 *pos = &_pagePtrs[pageNum][y * SCREEN_W * _pageScaleFactor[_curPage] + x];
-
- return _egaPixelValueTable[(pos[0] << 4) | (pos[1] & 0x0f)];
-}
-
-void Screen_EoB::setPagePixel(int pageNum, int x, int y, uint8 color) {
- if (!_useHiResEGADithering) {
- Screen::setPagePixel(pageNum, x, y, color);
- return;
- }
-
- assert(pageNum < SCREEN_PAGE_NUM);
- assert(x >= 0 && x < SCREEN_W && y >= 0 && y < SCREEN_H);
-
- x *= _pageScaleFactor[_curPage];
- y *= _pageScaleFactor[_curPage];
-
- if (pageNum == 0 || pageNum == 1)
- addDirtyRect(x, y, _pageScaleFactor[pageNum], _pageScaleFactor[pageNum]);
-
- uint8 *pos = &_pagePtrs[pageNum][y * SCREEN_W * _pageScaleFactor[_curPage] + x];
- uint8 *pos2 = pos + SCREEN_W * _pageScaleFactor[_curPage];
- pos[0] = pos2[0] = _egaDitheringTable[color] >> 4;
- pos[1] = pos2[1] = _egaDitheringTable[color] & 0x0f;
-}
-
void Screen_EoB::setScreenPalette(const Palette &pal) {
if (_useHiResEGADithering && pal.getNumColors() != 16) {
generateEGADitheringTable(pal);
@@ -444,7 +309,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco
uint8 *srcLineStart = getPagePtr(_curPage | 1) + y * 320 + (x << 3);
uint8 *src = srcLineStart;
- if (_useLoResEGA)
+ if (_renderMode == Common::kRenderEGA && !_useHiResEGADithering)
encode8bit = false;
if (_renderMode == Common::kRenderCGA) {
@@ -456,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));
@@ -469,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);
@@ -515,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;
@@ -540,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);
@@ -555,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;
@@ -564,15 +429,15 @@ 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 (_useLoResEGA) {
+ if (_renderMode != Common::kRenderEGA || _useHiResEGADithering) {
+ memset(dst, 0xFF, 0x10);
+ } else {
for (int i = 0; i < 16; i++)
dst[i] = i;
- } else {
- memset(dst, 0xff, 0x10);
}
uint8 *pal = dst;
@@ -584,15 +449,13 @@ 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++;
- if (!col)
- c = 0;
} else {
c = 0;
}
@@ -632,7 +495,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
y += _dsY1;
}
- dst += (_dsX1 << 3) * _pageScaleFactor[pageNum];
+ dst += (_dsX1 << 3);
int16 dX = x - (_dsX1 << 3);
int16 dY = y;
int16 dW = _dsX2 - _dsX1;
@@ -704,11 +567,11 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
marginRight = w2 - marginLeft - width;
}
- dst += (dY * SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum] + dX * _pageScaleFactor[pageNum]);
+ dst += (dY * SCREEN_W + dX);
uint8 *dstL = dst;
if (pageNum == 0 || pageNum == 1)
- addDirtyRect(rX * _pageScaleFactor[pageNum], rY * _pageScaleFactor[pageNum], rW * _pageScaleFactor[pageNum], rH * _pageScaleFactor[pageNum]);
+ addDirtyRect(rX, rY, rW, rH);
while (dH--) {
int16 xpos = (int16) marginLeft;
@@ -743,7 +606,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
} while (xpos > 0);
}
- dst -= (xpos * _pageScaleFactor[pageNum]);
+ dst -= xpos;
xpos += width;
while (xpos > 0) {
@@ -752,12 +615,12 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
src += pixelStep;
if (m) {
- drawShapeSetPixel(dst, c, SCREEN_W * _pageScaleFactor[pageNum]);
- dst += _pageScaleFactor[pageNum];
+ drawShapeSetPixel(dst, c);
+ dst++;
xpos--;
} else {
uint8 len = (flags & 1) ? src[1] : src[0];
- dst += (len * _pageScaleFactor[pageNum]);
+ dst += len;
xpos -= len;
src += pixelStep;
}
@@ -783,7 +646,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
} while (xpos > 0);
}
- dstL += SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum];
+ dstL += SCREEN_W;
dst = dstL;
if (flags & 1)
src = src2 + 1;
@@ -797,7 +660,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;
@@ -851,12 +714,12 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
if (d < width)
width = d;
- dst += (dY * _pageScaleFactor[pageNum] * SCREEN_W * _pageScaleFactor[pageNum] + dX * _pageScaleFactor[pageNum]);
+ dst += (dY * SCREEN_W + dX);
if (pageNum == 0 || pageNum == 1)
- addDirtyRect(rX * _pageScaleFactor[pageNum], rY * _pageScaleFactor[pageNum], rW * _pageScaleFactor[pageNum], rH * _pageScaleFactor[pageNum]);
+ addDirtyRect(rX, rY, rW, rH);
- int pitch = SCREEN_W * _pageScaleFactor[pageNum] * _pageScaleFactor[pageNum] - width * _pageScaleFactor[pageNum];
+ int pitch = SCREEN_W - width;
int16 lineSrcStep = (w2 - width) / pixelsPerByte;
uint8 lineSrcStepRemainder = (w2 - width) % pixelsPerByte;
@@ -899,8 +762,8 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
}
uint8 col = (pixelsPerByte == 2) ? pal[(in >> shift) & pixelPackingMask] : (*dst & ((trans >> shift) & (pixelPackingMask))) | pal[(in >> shift) & pixelPackingMask];
if (col || pixelsPerByte == 4)
- drawShapeSetPixel(dst, col, SCREEN_W * _pageScaleFactor[pageNum]);
- dst += _pageScaleFactor[pageNum];
+ drawShapeSetPixel(dst, col);
+ dst++;
shift = ((shift - (pixelStep * pixelPacking)) & 7);
}
src += lineSrcStep;
@@ -922,7 +785,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
uint8 *dst = (shp != _dsTempPage) ? _dsTempPage : _dsTempPage + 6000;
uint8 *d = dst;
uint8 pixelsPerByte = *d++ = *shp++;
- assert (pixelsPerByte > 1);
+ assert(pixelsPerByte > 1);
uint16 h = shp[0] + 1;
d[0] = d[2] = (h << 1) / 3;
@@ -952,7 +815,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++;
}
@@ -976,7 +839,7 @@ const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
shp += w2;
}
- return (const uint8*)dst;
+ return (const uint8 *)dst;
}
const uint8 *Screen_EoB::generateShapeOverlay(const uint8 *shp, int paletteOverlayIndex) {
@@ -1328,14 +1191,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++) {
@@ -1367,15 +1230,55 @@ const uint8 *Screen_EoB::getEGADitheringTable() {
return _egaDitheringTable;
}
-void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch) {
+void Screen_EoB::updateDirtyRects() {
+ if (!_useHiResEGADithering) {
+ Screen::updateDirtyRects();
+ return;
+ }
+
+ if (_forceFullUpdate) {
+ ditherRect(getCPagePtr(0), _egaDitheringTempPage, SCREEN_W * 2, SCREEN_W, SCREEN_H);
+ _system->copyRectToScreen(_egaDitheringTempPage, SCREEN_W * 2, 0, 0, SCREEN_W * 2, SCREEN_H * 2);
+ } else {
+ const byte *page0 = getCPagePtr(0);
+ Common::List<Common::Rect>::iterator it;
+ for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) {
+ ditherRect(page0 + it->top * SCREEN_W + it->left, _egaDitheringTempPage, SCREEN_W * 2, it->width(), it->height());
+ _system->copyRectToScreen(_egaDitheringTempPage, SCREEN_W * 2, it->left * 2, it->top * 2, it->width() * 2, it->height() * 2);
+ }
+ }
+ _forceFullUpdate = false;
+ _dirtyRects.clear();
+}
+
+void Screen_EoB::ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW, int srcH, int colorKey) {
+ while (srcH--) {
+ uint8 *dst2 = dst + dstPitch;
+ for (int i = 0; i < srcW; i++) {
+ int in = *src++;
+ if (in != colorKey) {
+ in = _egaDitheringTable[in];
+ *dst++ = *dst2++ = in >> 4;
+ *dst++ = *dst2++ = in & 0x0F;
+ } else {
+ dst[0] = dst[1] = dst2[0] = dst2[1] = colorKey;
+ dst += 2;
+ dst2 += 2;
+ }
+ }
+ src += (SCREEN_W - srcW);
+ dst += ((dstPitch - srcW) * 2);
+ }
+}
+
+void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col) {
if ((_renderMode != Common::kRenderCGA && _renderMode != Common::kRenderEGA) || _useHiResEGADithering) {
if (_shapeFadeMode[0]) {
if (_shapeFadeMode[1]) {
- col = _useHiResEGADithering ? _egaPixelValueTable[(dst[0] << 4) | (dst[1] & 0x0f)] : *dst;
+ col = *dst;
} else {
_shapeFadeInternal &= 7;
- col = _useHiResEGADithering ? _egaPixelValueTable[(dst[_shapeFadeInternal] << 4) | (dst[_shapeFadeInternal + 1] & 0x0f)] : dst[_shapeFadeInternal];
- _shapeFadeInternal++;
+ col = *(dst + _shapeFadeInternal++);
}
}
@@ -1386,21 +1289,15 @@ void Screen_EoB::drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch) {
}
}
- if (_useHiResEGADithering) {
- col = _egaDitheringTable[col];
- dst[0] = dst[pitch] = col >> 4;
- dst[1] = dst[pitch + 1] = col & 0x0f;
- } else {
- *dst = col;
- }
+ *dst = col;
}
void Screen_EoB::scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc) {
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;
}
@@ -1409,15 +1306,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;
}
@@ -1426,7 +1323,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;
}
@@ -1434,7 +1331,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;
@@ -1463,7 +1360,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;
@@ -1479,16 +1376,12 @@ void Screen_EoB::generateEGADitheringTable(const Palette &pal) {
}
*dst++ = col;
}
-
- memset(_egaPixelValueTable, 0, 256);
- for (int i = 0; i < 256; i++)
- _egaPixelValueTable[_egaDitheringTable[i]] = i;
}
void Screen_EoB::generateCGADitheringTables(const uint8 *mappingData) {
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];
}
}
@@ -1546,11 +1439,10 @@ const uint8 Screen_EoB::_egaMatchTable[] = {
uint16 *OldDOSFont::_cgaDitheringTable = 0;
int OldDOSFont::_numRef = 0;
-OldDOSFont::OldDOSFont(Common::RenderMode mode, bool useHiResEGADithering) : _renderMode(mode), _useHiResEGADithering(useHiResEGADithering) {
+OldDOSFont::OldDOSFont(Common::RenderMode mode) : _renderMode(mode) {
_data = 0;
_width = _height = _numGlyphs = 0;
_bitmapOffsets = 0;
- _useLoResEGA = (_renderMode == Common::kRenderEGA && !_useHiResEGADithering);
_numRef++;
if (!_cgaDitheringTable && _numRef == 1) {
@@ -1615,42 +1507,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;
}
@@ -1662,24 +1554,16 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
int w = (_width - 1) >> 3;
pitch -= _width;
- if (_useHiResEGADithering)
- pitch *= 2;
-
uint8 color1 = _colorMap[1];
uint8 color2 = _colorMap[0];
- uint8 colEGA11 = _colorMap[3] >> 4;
- uint8 colEGA12 = _colorMap[3] & 0x0f;
- uint8 colEGA21 = _colorMap[2] >> 4;
- uint8 colEGA22 = _colorMap[2] & 0x0f;
-
static const uint16 cgaColorMask[] = { 0, 0x5555, 0xAAAA, 0xFFFF };
uint16 cgaMask1 = cgaColorMask[color1 & 3];
uint16 cgaMask2 = cgaColorMask[color2 & 3];
- if (_renderMode == Common::kRenderCGA || _useLoResEGA) {
- color1 &= 0x0f;
- color2 &= 0x0f;
+ if (_renderMode == Common::kRenderCGA || _renderMode == Common::kRenderEGA) {
+ color1 &= 0x0F;
+ color2 &= 0x0F;
}
int cH = _height;
@@ -1710,7 +1594,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);
@@ -1718,7 +1602,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;
@@ -1734,27 +1618,13 @@ void OldDOSFont::drawChar(uint16 c, byte *dst, int pitch) const {
break;
}
- if (_useHiResEGADithering) {
- if (s & i) {
- if (color1) {
- dst[0] = dst2[0] = colEGA11;
- dst[1] = dst2[1] = colEGA12;
- }
- } else if (color2) {
- dst[0] = dst2[0] = colEGA21;
- dst[1] = dst2[1] = colEGA22;
- }
- dst += 2;
- dst2 += 2;
- } else {
- if (s & i) {
- if (color1)
- *dst = color1;
- } else if (color2) {
- *dst = color2;
- }
- dst++;
+ if (s & i) {
+ if (color1)
+ *dst = color1;
+ } else if (color2) {
+ *dst = color2;
}
+ dst++;
}
if (cW)
diff --git a/engines/kyra/screen_eob.h b/engines/kyra/screen_eob.h
index fc40cfe903..934483d146 100644
--- a/engines/kyra/screen_eob.h
+++ b/engines/kyra/screen_eob.h
@@ -45,7 +45,6 @@ public:
void loadFileDataToPage(Common::SeekableReadStream *s, int pageNum, uint32 size);
- void printText(const char *str, int x, int y, uint8 color1, uint8 color2);
void printShadedText(const char *string, int x, int y, int col1, int col2);
void loadEoBBitmap(const char *file, const uint8 *cgaMapping, int tempPage, int destPage, int convertToPage);
@@ -53,11 +52,6 @@ public:
void convertPage(int srcPage, int dstPage, const uint8 *cgaMapping);
- void fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum = -1, bool xored = false);
- void drawLine(bool vertical, int x, int y, int length, int color);
- uint8 getPagePixel(int pageNum, int x, int y);
- void setPagePixel(int pageNum, int x, int y, uint8 color);
-
void setScreenPalette(const Palette &pal);
void getRealPalette(int num, uint8 *dst);
@@ -68,7 +62,7 @@ public:
const uint8 *generateShapeOverlay(const uint8 *shp, int paletteOverlayIndex);
void setShapeFrame(int x1, int y1, int x2, int y2);
- void setShapeFadeMode (uint8 i, bool b);
+ void setShapeFadeMode(uint8 i, bool b);
void setGfxParameters(int x, int y, int col);
void drawExplosion(int scale, int radius, int numElements, int stepSize, int aspectRatio, const uint8 *colorTable, int colorTableSize);
@@ -88,7 +82,10 @@ public:
const uint8 *getEGADitheringTable();
private:
- void drawShapeSetPixel(uint8 *dst, uint8 col, uint16 pitch);
+ void updateDirtyRects();
+ void ditherRect(const uint8 *src, uint8 *dst, int dstPitch, int srcW, int srcH, int colorKey = -1);
+
+ void drawShapeSetPixel(uint8 *dst, uint8 col);
void scaleShapeProcessLine2Bit(uint8 *&shpDst, const uint8 *&shpSrc, uint32 transOffsetDst, uint32 transOffsetSrc);
void scaleShapeProcessLine4Bit(uint8 *&dst, const uint8 *&src);
bool posWithinRect(int posX, int posY, int x1, int y1, int x2, int y2);
@@ -115,14 +112,14 @@ private:
const uint8 *_cgaMappingDefault;
uint8 *_egaDitheringTable;
- uint8 *_egaPixelValueTable;
+ uint8 *_egaDitheringTempPage;
static const uint8 _egaMatchTable[];
static const ScreenDim _screenDimTable[];
static const int _screenDimTableCount;
};
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index ac6ee5eb77..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;
}
}
@@ -93,46 +93,4 @@ void Screen_HoF::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int
}
}
-void Screen_HoF::copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes) {
- const uint8 *src = getPagePtr(srcPage) + srcPos;
- uint8 *dst = getPagePtr(dstPage) + dstPos;
- memcpy(dst, src, numBytes);
-}
-
-void Screen_HoF::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX, int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) {
- int x0 = dim->sx << 3;
- int y0 = dim->sy;
- int w0 = dim->w << 3;
- int h0 = dim->h;
-
- int x1 = dstX;
- int y1 = dstY;
- int w1 = dstW;
- int h1 = dstH;
-
- int x2, y2, w2;
-
- calcBounds(w0, h0, x1, y1, w1, h1, x2, y2, w2);
-
- const uint8 *src = getPagePtr(srcPage) + (320 * srcH) + srcW;
- uint8 *dst = getPagePtr(dstPage) + 320 * (y0 + y1);
-
- for (int y = 0; y < h1; y++) {
- const uint8 *s = src + x2;
- uint8 *d = dst + x0 + x1;
-
- if (flag)
- d += (h1 >> 1);
-
- for (int x = 0; x < w1; x++) {
- if (*s)
- *d = *s;
- s++;
- d++;
- }
- dst += 320;
- src += 320;
- }
-}
-
} // End of namespace Kyra
diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h
index 51c6a001fa..95f461677d 100644
--- a/engines/kyra/screen_hof.h
+++ b/engines/kyra/screen_hof.h
@@ -37,8 +37,7 @@ public:
// sequence player
void generateGrayOverlay(const Palette &pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag);
void cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage);
- void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes);
- void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false);
+
private:
KyraEngine_HoF *_vm;
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 3726b1f4b9..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;
@@ -233,8 +233,6 @@ void Screen_LoL::drawGridBox(int x, int y, int w, int h, int col) {
*(p + tmp) = col;
p += 2;
}
- } else {
- w = 1;
}
if (s == 1) {
@@ -270,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++)
@@ -280,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++) {
@@ -294,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;
@@ -302,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++) {
@@ -325,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++;
@@ -344,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;
@@ -365,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);
@@ -387,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;
@@ -408,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);
@@ -455,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++;
@@ -474,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++) {
@@ -492,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++) {
@@ -507,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++) {
@@ -529,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++) {
@@ -783,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)
@@ -796,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++;
@@ -810,34 +808,6 @@ bool Screen_LoL::fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedT
return res;
}
-bool Screen_LoL::fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime) {
- Palette &p1 = getPalette(1);
-
- bool res = false;
- for (int i = 0; i < p1.getNumColors() * 3; i++) {
- uint8 out = 0;
-
- if (elapsedTime < targetTime) {
- int32 d = ((pal2[i] & 0x3f) - (pal1[i] & 0x3f));
- if (d)
- res = true;
-
- int32 val = ((((d << 8) / (int32)targetTime) * (int32)elapsedTime) >> 8);
- out = ((pal1[i] & 0x3f) + (int8)val);
- } else {
- out = p1[i] = (pal2[i] & 0x3f);
- res = false;
- }
-
- (*_internFadePalette)[i] = out;
- }
-
- setScreenPalette(*_internFadePalette);
- updateScreen();
-
- return res;
-}
-
Palette **Screen_LoL::generateFadeTable(Palette **dst, Palette *src1, Palette *src2, int numTabs) {
int len = _use16ColorMode ? 48 : 768;
if (!src1)
diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h
index 09496705bb..8ceb8431bc 100644
--- a/engines/kyra/screen_lol.h
+++ b/engines/kyra/screen_lol.h
@@ -65,7 +65,6 @@ public:
void loadSpecialColors(Palette &dst);
void copyColor(int dstColorIndex, int srcColorIndex);
bool fadeColor(int dstColorIndex, int srcColorIndex, uint32 elapsedTicks, uint32 totalTicks);
- bool fadePaletteStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 targetTime);
Palette **generateFadeTable(Palette **dst, Palette *src1, Palette *src2, int numTabs);
void generateGrayOverlay(const Palette &Pal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool skipSpecialColors);
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 7d4b064e2a..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];
@@ -162,6 +162,34 @@ void Screen_v2::getFadeParams(const Palette &pal, int delay, int &delayInc, int
}
}
+bool Screen_v2::timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 totalTime) {
+ Palette &p1 = getPalette(1);
+
+ bool res = false;
+ for (int i = 0; i < p1.getNumColors() * 3; i++) {
+ uint8 out = 0;
+
+ if (elapsedTime < totalTime) {
+ int32 d = ((pal2[i] & 0x3F) - (pal1[i] & 0x3F));
+ if (d)
+ res = true;
+
+ int32 val = ((((d << 8) / (int32)totalTime) * (int32)elapsedTime) >> 8);
+ out = ((pal1[i] & 0x3F) + (int8)val);
+ } else {
+ out = p1[i] = (pal2[i] & 0x3F);
+ res = false;
+ }
+
+ (*_internFadePalette)[i] = out;
+ }
+
+ setScreenPalette(*_internFadePalette);
+ updateScreen();
+
+ return res;
+}
+
const uint8 *Screen_v2::getPtrToShape(const uint8 *shpFile, int shape) {
uint16 shapes = READ_LE_UINT16(shpFile);
@@ -283,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);
@@ -300,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);
@@ -322,6 +350,48 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
addDirtyRect(x2, y2, w2, h2);
}
+void Screen_v2::copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes) {
+ const uint8 *src = getPagePtr(srcPage) + srcPos;
+ uint8 *dst = getPagePtr(dstPage) + dstPos;
+ memcpy(dst, src, numBytes);
+}
+
+void Screen_v2::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX, int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) {
+ int x0 = dim->sx << 3;
+ int y0 = dim->sy;
+ int w0 = dim->w << 3;
+ int h0 = dim->h;
+
+ int x1 = dstX;
+ int y1 = dstY;
+ int w1 = dstW;
+ int h1 = dstH;
+
+ int x2, y2, w2;
+
+ calcBounds(w0, h0, x1, y1, w1, h1, x2, y2, w2);
+
+ const uint8 *src = getPagePtr(srcPage) + (320 * srcH) + srcW;
+ uint8 *dst = getPagePtr(dstPage) + 320 * (y0 + y1);
+
+ for (int y = 0; y < h1; y++) {
+ const uint8 *s = src + x2;
+ uint8 *d = dst + x0 + x1;
+
+ if (flag)
+ d += (h1 >> 1);
+
+ for (int x = 0; x < w1; x++) {
+ if (*s)
+ *d = *s;
+ s++;
+ d++;
+ }
+ dst += 320;
+ src += 320;
+ }
+}
+
bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2) {
x2 = 0;
y2 = 0;
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index f84c923128..6f4d67136a 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -43,6 +43,8 @@ public:
virtual void getFadeParams(const Palette &pal, int delay, int &delayInc, int &diff);
+ bool timedPaletteFadeStep(uint8 *pal1, uint8 *pal2, uint32 elapsedTime, uint32 totalTime);
+
// shape handling
uint8 *getPtrToShape(uint8 *shpFile, int shape);
const uint8 *getPtrToShape(const uint8 *shpFile, int shape);
@@ -66,6 +68,10 @@ public:
// special WSA handling
void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim);
+
+ // used in non-interactive HoF/LoL demos
+ void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes);
+ void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false);
protected:
uint8 *_wsaFrameAnimBuffer;
};
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c07c41f706..4a6a498173 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;
@@ -216,15 +216,25 @@ bool EoBInfProcessor::preventRest() const {
void EoBInfProcessor::loadState(Common::SeekableSubReadStreamEndian &in, bool origFile) {
_preventRest = (_vm->game() == GI_EOB1 && origFile) ? 0 : in.readByte();
- int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 13 : 18;
+ int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 12 : 18;
for (int i = 0; i < numFlags; i++)
_flagTable[i] = in.readUint32();
+ if (_vm->game() == GI_EOB1 && origFile)
+ setFlags(in.readUint32());
}
-void EoBInfProcessor::saveState(Common::OutSaveFile *out) {
- out->writeByte(_preventRest);
- for (int i = 0; i < 18; i++)
- out->writeUint32BE(_flagTable[i]);
+void EoBInfProcessor::saveState(Common::OutSaveFile *out, bool origFile) {
+ if (_vm->game() == GI_EOB2 || !origFile)
+ out->writeByte(_preventRest);
+ int numFlags = (_vm->game() == GI_EOB1 && origFile) ? 12 : 18;
+ for (int i = 0; i < numFlags; i++) {
+ if (origFile)
+ out->writeUint32LE(_flagTable[i]);
+ else
+ out->writeUint32BE(_flagTable[i]);
+ }
+ if (_vm->game() == GI_EOB1 && origFile)
+ out->writeUint32LE(_flagTable[17]);
}
void EoBInfProcessor::reset() {
@@ -233,7 +243,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 +358,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 +982,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 +1107,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 +1270,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 +1338,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 +1373,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 +1540,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_eob.h b/engines/kyra/script_eob.h
index fc8b4cfc31..8e2dbd8423 100644
--- a/engines/kyra/script_eob.h
+++ b/engines/kyra/script_eob.h
@@ -48,7 +48,7 @@ public:
bool preventRest() const;
void loadState(Common::SeekableSubReadStreamEndian &in, bool origFile = false);
- void saveState(Common::OutSaveFile *out);
+ void saveState(Common::OutSaveFile *out, bool origFile = false);
void reset();
private:
@@ -91,7 +91,7 @@ private:
EoBCoreEngine *_vm;
Screen_EoB *_screen;
- typedef Common::Functor1Mem<int8*, int, EoBInfProcessor> InfProc;
+ typedef Common::Functor1Mem<int8 *, int, EoBInfProcessor> InfProc;
struct InfOpcode : private Common::NonCopyable {
InfOpcode(InfProc *p, const char *d) : proc(p), desc(d) {}
~InfOpcode() { delete proc; }
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index fca83ae632..f6fde65109 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);
@@ -362,7 +362,7 @@ int KyraEngine_HoF::o2_addItemToCurScene(EMCState *script) {
int KyraEngine_HoF::o2_loadSoundFile(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
- if (_flags.platform == Common::kPlatformPC)
+ if (_flags.platform == Common::kPlatformDOS)
snd_loadSoundFile(stackPos(0));
return 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 177d7993a0..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);
+ _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]) {
@@ -736,7 +736,7 @@ int TIMInterpreter::cmd_playVocFile(const uint16 *param) {
const int volume = (param[1] * 255) / 100;
if (index < ARRAYSIZE(_vocFiles) && !_vocFiles[index].empty())
- _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, true);
+ _vm->sound()->voicePlay(_vocFiles[index].c_str(), 0, volume, 255, true);
else if (index == 7 && !_vm->gameFlags().isTalkie)
_vm->sound()->playTrack(index);
else
@@ -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..03b15d6950 100644
--- a/engines/kyra/sequences_darkmoon.cpp
+++ b/engines/kyra/sequences_darkmoon.cpp
@@ -142,7 +142,6 @@ int DarkMoonEngine::mainMenu() {
case 3:
// transfer party
- //seq_playFinale();
menuChoice = -3;
break;
@@ -867,7 +866,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 +892,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 +1070,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 +1186,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 4a9f7d8a65..0fec386485 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -706,7 +706,7 @@ void EoBIntroPlayer::waterdeepExit() {
_vm->delay(60 * _vm->_tickLength);
for (int i = 0; i < 56 && !_vm->shouldQuit() && !_vm->skipFlag(); i++) {
- uint32 end = _vm->_system->getMillis() +_vm->_tickLength;
+ uint32 end = _vm->_system->getMillis() + _vm->_tickLength;
_screen->copyRegion(0, 136 + i, 80, 16, 160, 56 - i, 2, 0, Screen::CR_NO_P_CHECK);
_screen->copyRegion(160, 0, 80, 72 - i, 160, 96 + i, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
@@ -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 f2abfb81dc..9fcce4eb55 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -21,94 +21,661 @@
*/
#include "kyra/kyra_hof.h"
-#include "kyra/timer.h"
+#include "kyra/screen_hof.h"
+#include "kyra/screen_lol.h"
#include "kyra/resource.h"
#include "kyra/sound.h"
+#include "kyra/sequences_hof.h"
+#include "kyra/timer.h"
#include "common/system.h"
namespace Kyra {
-void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
- seq_init();
+enum SequenceID {
+ kSequenceNoLooping = -1,
+ kSequenceVirgin = 0,
+ kSequenceWestwood,
+ kSequenceTitle,
+ kSequenceOverview,
+ kSequenceLibrary,
+ kSequenceHand,
+ kSequencePoint,
+ kSequenceZanfaun,
+
+ kSequenceFunters,
+ kSequenceFerb,
+ kSequenceFish,
+ kSequenceFheep,
+ kSequenceFarmer,
+ kSequenceFuards,
+ kSequenceFirates,
+ kSequenceFrash,
+
+ kSequenceHoFDemoVirgin,
+ kSequenceHoFDemoWestwood,
+ kSequenceHoFDemoTitle,
+ kSequenceHoFDemoHill,
+ kSequenceHoFDemoOuthome,
+ kSequenceHoFDemoWharf,
+ kSequenceHoFDemoDinob,
+ kSequenceHoFDemoFisher,
+
+// The following enums remain active even if LoL is disabled
+ kSequenceLoLDemoScene1,
+ kSequenceLoLDemoText1,
+ kSequenceLoLDemoScene2,
+ kSequenceLoLDemoText2,
+ kSequenceLoLDemoScene3,
+ kSequenceLoLDemoText3,
+ kSequenceLoLDemoScene4,
+ kSequenceLoLDemoText4,
+ kSequenceLoLDemoScene5,
+ kSequenceLoLDemoText5,
+ kSequenceLoLDemoScene6,
+
+ kSequenceArraySize
+};
+
+enum NestedSequenceID {
+ kNestedSequenceFiggle = 0,
+
+ kNestedSequenceOver1,
+ kNestedSequenceOver2,
+ kNestedSequenceForest,
+ kNestedSequenceDragon,
+ kNestedSequenceDarm,
+ kNestedSequenceLibrary2,
+ kNestedSequenceLibrary3,
+ kNestedSequenceMarco,
+ kNestedSequenceHand1a,
+ kNestedSequenceHand1b,
+ kNestedSequenceHand1c,
+ kNestedSequenceHand2,
+ kNestedSequenceHand3,
+ kNestedSequenceHand4,
+
+ kNestedSequenceHoFDemoWharf2,
+ kNestedSequenceHoFDemoDinob2,
+ kNestedSequenceHoFDemoWater,
+ kNestedSequenceHoFDemoBail,
+ kNestedSequenceHoFDemoDig,
+
+ kNestedSequenceArraySize
+};
+
+typedef int (SeqPlayer_HOF::*SeqProc)(WSAMovie_v2 *, int, int, int);
+
+struct SeqPlayerConfig {
+ SeqPlayerConfig(const HoFSeqData *data, const SeqProc *callbacks, const SeqProc *nestedCallbacks) : seq(data->seq), seqProc(callbacks), numSeq(data->numSeq), nestedSeq(data->nestedSeq), nestedSeqProc(nestedCallbacks), numNestedSeq(data->numNestedSeq) {}
+ const HoFSequence *seq;
+ const SeqProc *seqProc;
+ int numSeq;
+ const HoFNestedSequence *nestedSeq;
+ const SeqProc *nestedSeqProc;
+ int numNestedSeq;
+};
+
+class SeqPlayer_HOF {
+public:
+ SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *system, bool startupSaveLoadable = false);
+ ~SeqPlayer_HOF();
+
+ int play(SequenceID firstScene, SequenceID loopStartScene);
+ void pause(bool toggle);
+
+ static SeqPlayer_HOF *instance() { return _instance; }
+
+private:
+ // Init
+ void setupCallbacks();
+
+ // Playback loop
+ void runLoop();
+ void playScenes();
+
+ bool checkAbortPlayback();
+ bool checkPlaybackStatus();
+
+ bool _abortRequested;
+ uint32 _pauseStart;
+
+ // Sequence transitions
+ void doTransition(int type);
+ void nestedFrameAnimTransition(int srcPage, int dstPage, int delaytime, int steps, int x, int y, int w, int h, int openClose, int directionFlags);
+ void nestedFrameFadeTransition(const char *cmpFile);
+
+ // Animations
+ void playAnimation(WSAMovie_v2 *wsaObj, int startFrame, int numFrames, int frameRate, int x, int y, const SeqProc callback, Palette *fadePal1, Palette *fadePal2, int fadeRate, bool restoreScreen);
+ void playDialogueAnimation(uint16 strID, uint16 soundID, int textColor, int textPosX, int textPosY, int textWidth, WSAMovie_v2 *wsaObj, int animStartFrame, int animLastFrame, int animPosX, int animPosY);
+
+ void startNestedAnimation(int animSlot, int sequenceID);
+ void closeNestedAnimation(int animSlot);
+ void unloadNestedAnimation(int animSlot);
+ void doNestedFrameTransition(int transitionType, int animSlot);
+ void updateAllNestedAnimations();
+ bool updateNestedAnimation(int animSlot);
+
+ struct AnimSlot {
+ SeqProc callback;
+ WSAMovie_v2 *movie;
+ const FrameControl *control;
+ int16 flags;
+ uint16 startFrame;
+ uint16 endFrame;
+ uint16 frameDelay;
+ uint32 nextFrame;
+ uint16 currentFrame;
+ uint16 lastFrame;
+ uint16 x;
+ uint16 y;
+ uint16 fadeInTransitionType;
+ uint16 fadeOutTransitionType;
+ };
+
+ AnimSlot _animSlots[8];
+
+ bool _updateAnimations;
+ uint32 _animDuration;
+ int _animCurrentFrame;
+ int _callbackCurrentFrame;
+
+ // The only reason to declare these here (instead of just locally) is being able to increase them after pausing the Engine
+ uint32 _specialAnimTimeOutTotal;
+ uint32 _specialAnimFrameTimeOut;
+
+ // Subtitles/Dialogue/Sound
+ void playSoundEffect(uint16 id, int16 vol);
+ void playSoundAndDisplaySubTitle(uint16 id);
+ void printFadingText(uint16 strID, int x, int y, const uint8 *colorMap, uint8 textcolor);
+
+ int displaySubTitle(uint16 strID, uint16 posX, uint16 posY, int duration, uint16 width);
+ void updateSubTitles();
+ char *preprocessString(const char *str, int width);
+ void waitForSubTitlesTimeout();
+ uint32 ticksTillSubTitlesTimeout();
+ void resetAllTextSlots();
+
+ void fadeOutMusic();
+
+ struct TextSlot {
+ uint16 strIndex;
+ uint16 x;
+ uint16 y;
+ uint16 width;
+ int32 duration;
+ uint32 startTime;
+ int16 textcolor;
+ };
- bool allowSkip = (_flags.isDemo && !_flags.isTalkie) || startSeq != kSequenceTitle;
+ TextSlot _textSlots[10];
- if (endSeq == -1)
- endSeq = startSeq;
+ char *_tempString;
- assert(startSeq >= 0 && endSeq < kSequenceArraySize && startSeq <= endSeq);
+ uint8 _textColor[2];
+ uint8 _textColorMap[16];
+ int _textDuration[33];
- _sound->setSoundList(&_soundData[(startSeq > kSequenceZanfaun) ? kMusicFinale : kMusicIntro]);
- _sound->loadSoundFile(0);
+ const char *const *_sequenceStrings;
+ const char *const *_sequenceSoundList;
+ int _sequenceSoundListSize;
- _screen->_charWidth = (_flags.gameID == GI_LOL) ? 0 : -2;
+ static const uint8 _textColorPresets[];
- memset(_activeWSA, 0, sizeof(ActiveWSA) * 8);
- for (int i = 0; i < 8; ++i)
- _activeWSA[i].flags = -1;
+ // HOF credits
+ void playHoFTalkieCredits();
+ void displayHoFTalkieScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0);
+
+ bool _talkieFinaleExtraFlag;
+
+ // HOF+LOL demo specific
+ void updateDemoAdText(int bottom, int top);
+
+ ActiveItemAnim _hofDemoActiveItemAnim[5];
+ const HoFSeqItemAnimData *_hofDemoAnimData;
+
+ uint32 _fisherAnimCurTime;
+ int _scrollProgressCounter;
+
+ uint8 *_hofDemoShapeData;
+ uint8 *_hofDemoItemShapes[20];
+
+ // Misc
+ void delayTicks(uint32 ticks);
+ void delayUntil(uint32 dest);
+ void setCountDown(uint32 ticks);
+ bool countDownRunning();
+
+ uint32 _countDownRemainder;
+ uint32 _countDownLastUpdate;
+
+ enum SeqPlayerTargetInfo {
+ kHoF = 0,
+ kHoFDemo,
+ kLoLDemo
+ };
+
+ SeqPlayerTargetInfo _target;
+ int _firstScene, _loopStartScene, _curScene, _preventSkipBeforeScene, _lastScene;
+ bool _startupSaveLoadable, _isFinale, _preventLooping;
+
+ SeqPlayerConfig *_config;
+
+ MainMenu *_menu;
+ int _result;
+
+ bool _abortPlayback;
+
+ KyraEngine_v1 *_vm;
+ Screen_v2 *_screen;
+ // We might consider getting rid of Screen_HoF, since there are only 2 methods left in that class anyway
+ Screen_HoF *_screenHoF;
+ OSystem *_system;
+
+ static SeqPlayer_HOF *_instance;
+
+private:
+ // Sequence specific callback functions
+ int cbHOF_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_title(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_over1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_over2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_forest(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_dragon(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_darm(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_library2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_marco(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_hand3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOF_figgle(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOFDEMO_virgin(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_title(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_hill(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_outhome(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_wharf(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dinob(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+ int cbHOFDEMO_wharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_water(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_bail(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbHOFDEMO_dig(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+
+#ifdef ENABLE_LOL
+ int cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene2(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene3(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene4(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_text5(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+ int cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm);
+#endif // ENABLE_LOL
+};
+
+SeqPlayer_HOF *SeqPlayer_HOF::_instance = 0;
+
+SeqPlayer_HOF::SeqPlayer_HOF(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *system, bool startupSaveLoadable) : _vm(vm), _screen(screen), _system(system), _startupSaveLoadable(startupSaveLoadable) {
+ // We use a static pointer for pauseEngine functionality. Since we don't
+ // ever need more than one SeqPlayer_HOF object at the same time we keep
+ // this simple and just add an assert to detect typos, regressions, etc.
+ assert(_instance == 0);
+
+ memset(_animSlots, 0, sizeof(_animSlots));
+ memset(_textSlots, 0, sizeof(_textSlots));
+ memset(_hofDemoActiveItemAnim, 0, sizeof(_hofDemoActiveItemAnim));
+
+ _screenHoF = _vm->game() == GI_KYRA2 ? (Screen_HoF*)screen : 0;
+ _config = 0;
+ _result = 0;
+ _sequenceSoundList = 0;
+ _hofDemoAnimData = 0;
+ _hofDemoShapeData = 0;
+ _isFinale = false;
+ _preventLooping = false;
+ _menu = 0;
+ _abortRequested = false;
+ _pauseStart = 0;
+
+ _updateAnimations = false;
+ _animDuration = 0;
+ _animCurrentFrame = 0;
+ _callbackCurrentFrame = 0;
+
+ _abortPlayback = false;
+ _curScene = 0;
+ _preventSkipBeforeScene = -1;
+ _lastScene = 0;
+
+ _scrollProgressCounter = 0;
+ _fisherAnimCurTime = 0;
+
+ _tempString = new char[200];
+
+ _countDownRemainder = 0;
+ _countDownLastUpdate = 0;
+
+ int tempSize = 0;
+ _vm->resource()->unloadAllPakFiles();
+ _vm->resource()->loadPakFile(StaticResource::staticDataFilename());
+ const char *const *files = _vm->staticres()->loadStrings(k2SeqplayPakFiles, tempSize);
+ _vm->resource()->loadFileList(files, tempSize);
+
+ _sequenceStrings = _vm->staticres()->loadStrings(k2SeqplayStrings, tempSize);
+ uint8 multiplier = (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) ? 12 : 8;
+ for (int i = 0; i < MIN(33, tempSize); i++)
+ _textDuration[i] = (int) strlen(_sequenceStrings[i]) * multiplier;
+
+ if (_sequenceSoundList) {
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ if (_sequenceSoundList[i])
+ delete[] _sequenceSoundList[i];
+ }
+ delete[] _sequenceSoundList;
+ _sequenceSoundList = 0;
+ }
- memset(_activeText, 0, sizeof(ActiveText) * 10);
- seq_resetAllTextEntries();
+ const char *const *seqSoundList = _vm->staticres()->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);
+ // replace sequence talkie files with localized versions
+ const char *const *tlkfiles = _vm->staticres()->loadStrings(k2SeqplayTlkFiles, tempSize);
+ char **tmpSndLst = new char *[_sequenceSoundListSize];
+
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ const int len = strlen(seqSoundList[i]);
+
+ tmpSndLst[i] = new char[len + 1];
+ tmpSndLst[i][0] = 0;
+
+ if (tlkfiles && len > 1) {
+ for (int ii = 0; ii < tempSize; ii++) {
+ if (strlen(tlkfiles[ii]) > 1 && !scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1]))
+ strcpy(tmpSndLst[i], tlkfiles[ii]);
+ }
+ }
+
+ if (tmpSndLst[i][0] == 0)
+ strcpy(tmpSndLst[i], seqSoundList[i]);
+ }
+
+ tlkfiles = seqSoundList = 0;
+ _vm->staticres()->unloadId(k2SeqplayTlkFiles);
+ _vm->staticres()->unloadId(k2SeqplaySfxFiles);
+ _sequenceSoundList = tmpSndLst;
+
+ if (_vm->gameFlags().platform == Common::kPlatformPC98)
+ _vm->sound()->loadSoundFile("SOUND.DAT");
+
+ _screen->loadFont(_screen->FID_GOLDFONT_FNT, "GOLDFONT.FNT");
+ _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
+
+ if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) {
+ if (_vm->game() == GI_KYRA2) {
+ _hofDemoAnimData = _vm->staticres()->loadHoFSeqItemAnimData(k2SeqplayShapeAnimData, tempSize);
+ uint8 *shp = _vm->resource()->fileData("ICONS.SHP", 0);
+ uint32 outsize = READ_LE_UINT16(shp + 4);
+ _hofDemoShapeData = new uint8[outsize];
+ Screen::decodeFrame4(shp + 10, _hofDemoShapeData, outsize);
+ for (int i = 0; i < 20; i++)
+ _hofDemoItemShapes[i] = _screen->getPtrToShape(_hofDemoShapeData, i);
+ delete[] shp;
+ }
+ } else {
+ const MainMenu::StaticData data = {
+ { _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
+ { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xD7, 0xD6 },
+ { 0xD8, 0xDA, 0xD9, 0xD8 },
+ (_vm->gameFlags().lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
+ };
+
+ _menu = new MainMenu(_vm);
+ _menu->init(data, MainMenu::Animation());
+ }
+
+ _instance = this;
+}
+
+SeqPlayer_HOF::~SeqPlayer_HOF() {
+ _instance = 0;
+
+ if (_sequenceSoundList) {
+ for (int i = 0; i < _sequenceSoundListSize; i++) {
+ if (_sequenceSoundList[i])
+ delete[] _sequenceSoundList[i];
+ }
+ delete[] _sequenceSoundList;
+ _sequenceSoundList = NULL;
+ }
+
+ delete[] _tempString;
+ delete[] _hofDemoShapeData;
+ delete _menu;
+
+ if (_vm->game() != GI_LOL)
+ _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+}
+
+int SeqPlayer_HOF::play(SequenceID firstScene, SequenceID loopStartScene) {
+ bool incompatibleData = false;
+ AudioResourceSet soundSet = kMusicIntro;
+ _firstScene = firstScene;
+ _loopStartScene = loopStartScene;
+ _preventLooping = false;
+ _result = 0;
+
+ if (firstScene >= kSequenceArraySize || firstScene < kSequenceVirgin || loopStartScene >= kSequenceArraySize || loopStartScene < kSequenceNoLooping) {
+ return 0;
+ } else if (firstScene >= kSequenceLoLDemoScene1) {
+#ifndef ENABLE_LOL
+ error("SeqPlayer_HOF::play(): The Lands of Lore sub engine (including this non-interactive demo) has been disabled in this build");
+#endif
+ incompatibleData = (_vm->game() != GI_LOL);
+ _firstScene -= kSequenceLoLDemoScene1;
+ if (loopStartScene != kSequenceNoLooping)
+ _loopStartScene -= kSequenceLoLDemoScene1;
+ _lastScene = kSequenceLoLDemoScene6 - kSequenceLoLDemoScene1;
+ _target = kLoLDemo;
+ _screen->_charWidth = 0;
+ } else if (firstScene >= kSequenceHoFDemoVirgin) {
+ incompatibleData = (_vm->game() != GI_KYRA2 || !_vm->gameFlags().isDemo || _vm->gameFlags().isTalkie);
+ _firstScene -= kSequenceHoFDemoVirgin;
+ if (loopStartScene != kSequenceNoLooping)
+ _loopStartScene -= kSequenceHoFDemoVirgin;
+ _lastScene = kSequenceHoFDemoFisher - kSequenceHoFDemoVirgin;
+ _target = kHoFDemo;
+ _screen->_charWidth = -2;
+ } else {
+ _isFinale = _preventLooping = firstScene > kSequenceZanfaun;
+ incompatibleData = (_vm->game() != GI_KYRA2 || (_vm->gameFlags().isDemo && (!_vm->gameFlags().isTalkie || _isFinale)));
+ _target = kHoF;
+ _screen->_charWidth = -2;
+ if (_isFinale) {
+ soundSet = kMusicFinale;
+ _lastScene = kSequenceFrash;
+ } else {
+ _lastScene = kSequenceZanfaun;
+ }
+ }
+
+ if (incompatibleData)
+ error("SeqPlayer_HOF::play(): Specified sequences do not match the available sequence data for this target");
+
+ _vm->sound()->selectAudioResourceSet(soundSet);
+ _vm->sound()->loadSoundFile(0);
+
+ setupCallbacks();
+ runLoop();
+
+ return _result;
+}
+
+void SeqPlayer_HOF::pause(bool toggle) {
+ if (toggle) {
+ _pauseStart = _system->getMillis();
+ } else {
+ uint32 pausedTime = _system->getMillis() - _pauseStart;
+ _pauseStart = 0;
+
+ _countDownLastUpdate += pausedTime;
+ _fisherAnimCurTime += pausedTime;
+ _specialAnimTimeOutTotal += pausedTime;
+ _specialAnimFrameTimeOut += pausedTime;
+
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].duration != -1)
+ _textSlots[i].startTime += pausedTime;
+ }
+
+ for (int i = 0; i < 8; i++) {
+ if (_animSlots[i].flags != -1)
+ _animSlots[i].nextFrame += pausedTime;
+ }
+ }
+}
+
+void SeqPlayer_HOF::setupCallbacks() {
+#define SCB(x) &SeqPlayer_HOF::cbHOF_##x
+ static const SeqProc seqCallbacksHoF[] = { 0, SCB(westwood), SCB(title), SCB(overview), SCB(library), SCB(hand), SCB(point), SCB(zanfaun), SCB(funters), SCB(ferb), SCB(fish), SCB(fheep), SCB(farmer), SCB(fuards), SCB(firates), SCB(frash) };
+ static const SeqProc nestedSeqCallbacksHoF[] = { SCB(figgle), SCB(over1), SCB(over2), SCB(forest), SCB(dragon), SCB(darm), SCB(library2), SCB(library2), SCB(marco), SCB(hand1a), SCB(hand1b), SCB(hand1c), SCB(hand2), SCB(hand3), 0 };
+#undef SCB
+#define SCB(x) &SeqPlayer_HOF::cbHOFDEMO_##x
+ static const SeqProc seqCallbacksHoFDemo[] = { SCB(virgin), SCB(westwood), SCB(title), SCB(hill), SCB(outhome), SCB(wharf), SCB(dinob), SCB(fisher) };
+ static const SeqProc nestedSeqCallbacksHoFDemo[] = { SCB(wharf2), SCB(dinob2), SCB(water), SCB(bail), SCB(dig), 0 };
+#undef SCB
+#ifdef ENABLE_LOL
+#define SCB(x) &SeqPlayer_HOF::cbLOLDEMO_##x
+ static const SeqProc seqCallbacksLoLDemo[] = { SCB(scene1), 0, SCB(scene2), 0, SCB(scene3), 0, SCB(scene4), 0, SCB(scene5), SCB(text5), SCB(scene6), 0 };
+#undef SCB
+#else
+ static const SeqProc seqCallbacksLoLDemo[] = { 0 };
+#endif
+ static const SeqProc nestedSeqCallbacksLoLDemo[] = { 0 };
+
+ static const SeqProc *const seqCallbacks[] = { seqCallbacksHoF, seqCallbacksHoFDemo, seqCallbacksLoLDemo};
+ static const SeqProc *const nestedSeqCallbacks[] = { nestedSeqCallbacksHoF, nestedSeqCallbacksHoFDemo, nestedSeqCallbacksLoLDemo};
+
+ int tmpSize = 0;
+ delete _config;
+ _config = new SeqPlayerConfig(_vm->staticres()->loadHoFSequenceData(k2SeqplaySeqData, tmpSize), seqCallbacks[_target], nestedSeqCallbacks[_target]);
+}
+
+void SeqPlayer_HOF::runLoop() {
+ memset(_animSlots, 0, sizeof(_animSlots));
+ memset(_textSlots, 0, sizeof(_textSlots));
+ memset(_hofDemoActiveItemAnim, 0, sizeof(_hofDemoActiveItemAnim));
+ for (int i = 0; i < 8; ++i)
+ _animSlots[i].flags = -1;
+
+ _screen->clearPage(10);
+ _screen->clearPage(12);
_screen->hideMouse();
int oldPage = _screen->setCurPage(2);
for (int i = 0; i < 4; ++i)
_screen->getPalette(i).clear();
- _screen->clearPage(10);
- _screen->clearPage(12);
+ _updateAnimations = false;
+ _animCurrentFrame = 0;
+ _textColor[0] = _textColor[1] = 0;
+ _curScene = _firstScene;
- _seqSubframePlaying = false;
+ do {
+ playScenes();
+ doTransition(0);
+ resetAllTextSlots();
+ fadeOutMusic();
+ _firstScene = ((!_startupSaveLoadable || _preventLooping) && _curScene >= _loopStartScene) ? kSequenceNoLooping : _loopStartScene;
+ } while (!_vm->shouldQuit() && _firstScene != kSequenceNoLooping);
- _seqWsaCurrentFrame = 0;
- _seqTextColor[0] = _seqTextColor[1] = 0;
- _seqEndTime = 0;
- _menuChoice = 0;
+ checkPlaybackStatus();
- for (int seqNum = startSeq; seqNum <= endSeq && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice); seqNum++) {
- _screen->clearPage(0);
- _screen->clearPage(8);
- _screen->copyPalette(1, 0);
- _seqFrameCounter = 0;
- _seqStartTime = _system->getMillis();
+ for (int i = 0; i < 8; i++)
+ unloadNestedAnimation(i);
+
+ if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie)
+ _screen->fadeToBlack();
+ else if (!_isFinale && !_startupSaveLoadable)
+ _result = 1;
- allowSkip = (_flags.isDemo && !_flags.isTalkie) || seqNum != kSequenceTitle;
+ if (!_result)
+ delayTicks(75);
- Sequence cseq = _sequences->seq[seqNum];
- SeqProc cb = _callbackS[seqNum];
+ _screen->setCurPage(oldPage);
+ _screen->_charWidth = 0;
+ _screen->showMouse();
+}
- if (cseq.flags & 2) {
- _screen->loadBitmap(cseq.cpsFile, 2, 2, &_screen->getPalette(0));
+void SeqPlayer_HOF::playScenes() {
+ _vm->sound()->stopAllSoundEffects();
+ _curScene = _firstScene;
+
+ _screen->copyPalette(1, 0);
+ WSAMovie_v2 anim(_vm);
+ _abortRequested = false;
+
+ _scrollProgressCounter = 0;
+
+ while (!_vm->shouldQuit()) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ _callbackCurrentFrame = 0;
+
+ if (_curScene > _lastScene)
+ break;
+
+ const Kyra::HoFSequence &sq = _config->seq[_curScene];
+
+ if (sq.flags & 2) {
+ _screen->loadBitmap(sq.cpsFile, 2, 2, &_screen->getPalette(0));
_screen->setScreenPalette(_screen->getPalette(0));
} else {
_screen->setCurPage(2);
_screen->clearPage(2);
- _screen->loadPalette("goldfont.col", _screen->getPalette(0));
+ _screen->loadPalette("GOLDFONT.COL", _screen->getPalette(0));
}
- if (cb && !(_flags.isDemo && !_flags.isTalkie))
- (this->*cb)(0, 0, 0, -1);
+ if (_config->seqProc[_curScene] && !(_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie))
+ (this->*_config->seqProc[_curScene])(0, 0, 0, -1);
- if (cseq.flags & 1) {
- _seqWsa->close();
- _seqWsa->open(cseq.wsaFile, 0, &_screen->getPalette(0));
- _screen->setScreenPalette(_screen->getPalette(0));
- _seqWsa->displayFrame(0, 2, cseq.xPos, cseq.yPos, 0, 0, 0);
+ if (sq.flags & 1) {
+ anim.open(sq.wsaFile, 0, &_screen->getPalette(0));
+ if (!(sq.flags & 2))
+ anim.displayFrame(0, 2, sq.xPos, sq.yPos, 0x4000, 0, 0);
}
- if (cseq.flags & 4) {
+ if (sq.flags & 4) {
int cp = _screen->setCurPage(2);
- Screen::FontId cf = _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
- if (cseq.stringIndex1 != -1) {
- int sX = (320 - _screen->getTextWidth(_sequenceStrings[cseq.stringIndex1])) / 2;
- _screen->printText(_sequenceStrings[cseq.stringIndex1], sX, 100 - _screen->getFontHeight(), 1, 0);
- }
- if (cseq.stringIndex2 != -1) {
- int sX = (320 - _screen->getTextWidth(_sequenceStrings[cseq.stringIndex2])) / 2;
- _screen->printText(_sequenceStrings[cseq.stringIndex2], sX, 100, 1, 0);
- }
+ Screen::FontId cf = _screen->setFont(_vm->gameFlags().lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
+
+ if (sq.stringIndex1 != -1)
+ _screen->printText(_sequenceStrings[sq.stringIndex1], (320 - _screen->getTextWidth(_sequenceStrings[sq.stringIndex1])) / 2, 100 - _screen->getFontHeight(), 1, 0);
+
+ if (sq.stringIndex2 != -1)
+ _screen->printText(_sequenceStrings[sq.stringIndex2], (320 - _screen->getTextWidth(_sequenceStrings[sq.stringIndex2])) / 2, 100, 1, 0);
+
_screen->setFont(cf);
_screen->setCurPage(cp);
}
@@ -118,268 +685,1139 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_screen->copyPage(2, 10);
_screen->copyPage(12, 2);
- seq_sequenceCommand(cseq.startupCommand);
+ doTransition(sq.fadeInTransitionType);
- if (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
+ if (!(checkAbortPlayback() || _vm->shouldQuit() || _result)) {
_screen->copyPage(2, 0);
_screen->updateScreen();
}
- if (cseq.flags & 1) {
- int x = cseq.xPos;
- int y = cseq.yPos;
+ if (sq.flags & 1) {
+ playAnimation(&anim, sq.startFrame, sq.numFrames, sq.duration, sq.xPos, sq.yPos, _config->seqProc[_curScene], &_screen->getPalette(1), &_screen->getPalette(0), 30, 0);
+ anim.close();
+ } else {
+ _animDuration = sq.duration;
+ setCountDown(_animDuration);
- _seqFrameDelay = cseq.frameDelay;
+ while (!checkAbortPlayback() && !_vm->shouldQuit() && (countDownRunning() || _updateAnimations)) {
+ uint32 endFrame = (_system->getMillis() + _vm->tickLength()) & ~(_vm->tickLength() - 1);
+ updateAllNestedAnimations();
- if (_seqWsa) {
- if (x < 0) {
- _seqWsa->setWidth(_seqWsa->width() + x);
- x = 0;
- }
+ if (_config->seqProc[_curScene])
+ (this->*_config->seqProc[_curScene])(0, 0, 0, 0);
- if (y < 0) {
- _seqWsa->setHeight(_seqWsa->height() + y);
- y = 0;
- }
+ updateSubTitles();
- if (cseq.xPos + _seqWsa->width() > 319)
- _seqWsa->setWidth(320 - cseq.xPos);
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->copyPage(12, 2);
- if (cseq.yPos + _seqWsa->height() > 199)
- _seqWsa->setHeight(199 - cseq.yPos);
+ do {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+ } while (_system->getMillis() < endFrame);
}
- uint8 dir = (cseq.startFrame > cseq.numFrames) ? 0 : 1;
- _seqWsaCurrentFrame = cseq.startFrame;
+ }
- bool loop = true;
- while (loop && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
+ if (_config->seqProc[_curScene] && !(_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie))
+ (this->*_config->seqProc[_curScene])(0, 0, 0, -2);
- if (_seqWsa || !cb)
- _screen->copyPage(12, 2);
+ uint32 textTimeOut = ticksTillSubTitlesTimeout();
+ setCountDown(sq.timeout < textTimeOut ? textTimeOut : sq.timeout);
- if (cb) {
- int f = _seqWsaCurrentFrame % _seqWsa->frames();
- (this->*cb)(_seqWsa, cseq.xPos, cseq.yPos, f);
- }
+ while (!checkAbortPlayback() && !_vm->shouldQuit() && (countDownRunning() || _updateAnimations)) {
+ updateAllNestedAnimations();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->copyPage(12, 2);
+ }
- if (_seqWsa) {
- int f = _seqWsaCurrentFrame % _seqWsa->frames();
- _seqWsa->displayFrame(f, 2, cseq.xPos, cseq.yPos, 0, 0, 0);
- }
+ doTransition(sq.fadeOutTransitionType);
+ _curScene++;
+ }
- _screen->copyPage(2, 12);
+ resetAllTextSlots();
+ _vm->sound()->haltTrack();
+ _vm->sound()->voiceStop();
- seq_processWSAs();
- seq_processText();
+ if ((!checkAbortPlayback() || _vm->shouldQuit()) && _vm->gameFlags().isDemo)
+ _curScene = -1;
+}
- if ((_seqWsa || !cb) && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- }
+bool SeqPlayer_HOF::checkAbortPlayback() {
+ Common::Event event;
- bool loop2 = true;
- while (loop2 && !((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- if (_seqWsa) {
- seq_processText();
- if (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- }
-
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime) {
- loop2 = false;
- } else {
- uint32 tdiff = _seqEndTime - now;
- uint32 dly = tdiff < _tickLength ? tdiff : _tickLength;
- delay(dly);
- }
- } else {
- loop = loop2 = false;
- }
- }
+ if (_vm->skipFlag()) {
+ _abortRequested = true;
+ _vm->resetSkipFlag();
+ }
- if (loop) {
- if (dir == 1) {
- if (++_seqWsaCurrentFrame >= cseq.numFrames)
- loop = false;
- } else {
- if (--_seqWsaCurrentFrame < cseq.numFrames)
- loop = false;
- }
- }
+ if (_abortRequested)
+ return true;
+
+ while (_system->getEventManager()->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.hasFlags(Common::KBD_CTRL)) {
+ _abortRequested = true;
+ _vm->quitGame();
+ return true;
+ } else if (event.kbd.keycode != Common::KEYCODE_ESCAPE && event.kbd.keycode != Common::KEYCODE_RETURN && event.kbd.keycode != Common::KEYCODE_SPACE) {
+ continue;
}
- _seqWsa->close();
- } else {
- _seqFrameDelay = cseq.frameDelay;
- _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- while (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqSubFrameStartTime = _system->getMillis();
- seq_processWSAs();
- if (cb)
- (this->*cb)(0, 0, 0, 0);
+ // fall through
+ case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ _abortRequested = true;
+ return true;
+ default:
+ break;
+ }
+ }
- seq_processText();
+ return false;
+}
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->copyPage(12, 2);
+bool SeqPlayer_HOF::checkPlaybackStatus() {
+ _updateAnimations = false;
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime && !_seqSubframePlaying)
- break;
+ if (_curScene <= _preventSkipBeforeScene || (_curScene == _loopStartScene && !_isFinale)) {
+ _abortRequested = false;
+ return false;
+ }
- uint32 tdiff = _seqEndTime - _seqSubFrameStartTime;
- int32 dly = _tickLength - (now - _seqSubFrameStartTime);
- if (dly > 0)
- delay(MIN<uint32>(dly, tdiff));
- else
- updateInput();
- }
+ if (_loopStartScene == kSequenceNoLooping) {
+ doTransition(0);
+ fadeOutMusic();
+ _abortPlayback = true;
+ }
+
+ return true;
+}
+
+void SeqPlayer_HOF::doTransition(int type) {
+ for (int i = 0; i < 8; i++)
+ closeNestedAnimation(i);
+
+ switch (type) {
+ case 0:
+ _screen->fadeToBlack(36);
+ _screen->getPalette(0).clear();
+ _screen->getPalette(1).clear();
+ break;
+
+ case 1:
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
+
+ _screen->getPalette(0).fill(0, 256, 0x3F);
+ _screen->fadePalette(_screen->getPalette(0), 16);
+
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 3:
+ _screen->copyPage(2, 0);
+ _screen->fadePalette(_screen->getPalette(0), 16);
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 4:
+ _screen->copyPage(2, 0);
+ _screen->fadePalette(_screen->getPalette(0), 36);
+ _screen->copyPalette(1, 0);
+ break;
+
+ case 5:
+ _screen->copyPage(2, 0);
+ break;
+
+ case 6:
+ // UNUSED
+ // seq_loadBLD("library.bld");
+ break;
+
+ case 7:
+ // UNUSED
+ // seq_loadBLD("marco.bld");
+ break;
+
+ case 8:
+ _screen->fadeToBlack(16);
+ _screen->getPalette(0).clear();
+ _screen->getPalette(1).clear();
+
+ delayTicks(120);
+ break;
+
+ case 9: {
+ Palette &pal = _screen->getPalette(0);
+ for (int i = 0; i < 255; i++)
+ pal.fill(i, 1, (pal[3 * i] + pal[3 * i + 1] + pal[3 * i + 2]) / 3);
+ pal.fill(255, 1, 0x3F);
+
+ _screen->fadePalette(pal, 64);
+ _screen->copyPalette(1, 0);
+ } break;
+
+ default:
+ break;
+ }
+}
+
+void SeqPlayer_HOF::nestedFrameAnimTransition(int srcPage, int dstPage, int delaytime, int steps, int x, int y, int w, int h, int openClose, int directionFlags) {
+ if (openClose) {
+ for (int i = 1; i < steps; i++) {
+ uint32 endtime = _system->getMillis() + delaytime * _vm->tickLength();
+
+ int w2 = (((w * 256) / steps) * i) / 256;
+ int h2 = (((h * 256) / steps) * i) / 256;
+
+ int ym = (directionFlags & 2) ? (h - h2) : 0;
+ int xm = (directionFlags & 1) ? (w - w2) : 0;
+
+ _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
+
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+
+ _screen->copyPage(12, dstPage);
+ delayUntil(endtime);
+ }
+
+ _screen->wsaFrameAnimationStep(0, 0, x, y, w, h, w, h, srcPage, dstPage, 0);
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+ } else {
+ _screen->copyPage(12, dstPage);
+ for (int i = steps; i; i--) {
+ uint32 endtime = _system->getMillis() + delaytime * _vm->tickLength();
+
+ int w2 = (((w * 256) / steps) * i) / 256;
+ int h2 = (((h * 256) / steps) * i) / 256;
+
+ int ym = (directionFlags & 2) ? (h - h2) : 0;
+ int xm = (directionFlags & 1) ? (w - w2) : 0;
+
+ _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
+
+ _screen->copyPage(dstPage, 6);
+ _screen->copyPage(dstPage, 0);
+ _screen->updateScreen();
+
+ _screen->copyPage(12, dstPage);
+ delayUntil(endtime);
+ }
+ }
+}
+
+void SeqPlayer_HOF::nestedFrameFadeTransition(const char *cmpFile) {
+ _screen->copyPage(10, 2);
+ _screen->copyPage(4, 10);
+ _screen->clearPage(6);
+ _screen->loadBitmap(cmpFile, 6, 6, 0);
+ _screen->copyPage(12, 4);
+
+ for (int i = 0; i < 3; i++) {
+ uint32 endtime = _system->getMillis() + 4 * _vm->tickLength();
+ assert(_screenHoF);
+ _screenHoF->cmpFadeFrameStep(4, 320, 200, 0, 0, 2, 320, 200, 0, 0, 320, 200, 6);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
+ _screen->updateScreen();
+ delayUntil(endtime);
+ }
+
+ _screen->copyPage(4, 0);
+ _screen->updateScreen();
+ _screen->copyPage(4, 2);
+ _screen->copyPage(4, 6);
+ _screen->copyPage(10, 4);
+}
+
+void SeqPlayer_HOF::playAnimation(WSAMovie_v2 *wsaObj, int startFrame, int lastFrame, int frameRate, int x, int y, const SeqProc callback, Palette *fadePal1, Palette *fadePal2, int fadeRate, bool restoreScreen) {
+ bool finished = false;
+ uint32 startTime = _system->getMillis();
+
+ int origW = wsaObj ? wsaObj->width() : 0;
+ int origH = wsaObj ? wsaObj->height() : 0;
+ int drwX = x;
+ int drwY = y;
+ int drwW = origW;
+ int drwH = origH;
+
+ _animDuration = frameRate;
+
+ if (wsaObj) {
+ if (x < 0) {
+ drwW += x;
+ drwX = 0;
}
- if (cb && !(_flags.isDemo && !_flags.isTalkie))
- (this->*cb)(0, 0, 0, -2);
+ if (y < 0) {
+ drwH += y;
+ drwY = 0;
+ }
+
+ if (x + origW > 319)
+ origW = 320 - x;
+
+ if (y + origH > 199)
+ origW = 200 - y;
+ }
+
+ int8 frameStep = (startFrame > lastFrame) ? -1 : 1;
+ _animCurrentFrame = startFrame;
+
+ while (!_vm->shouldQuit() && !finished) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ setCountDown(_animDuration);
- uint32 ct = seq_activeTextsTimeLeft();
- uint32 dl = cseq.duration * _tickLength;
- if (dl < ct)
- dl = ct;
- _seqEndTime = _system->getMillis() + dl;
+ if (wsaObj || callback)
+ _screen->copyPage(12, 2);
+
+ int frameIndex = _animCurrentFrame;
+ if (wsaObj)
+ frameIndex %= wsaObj->frames();
+
+ if (callback)
+ (this->*callback)(wsaObj, x, y, frameIndex);
+
+ if (wsaObj)
+ wsaObj->displayFrame(frameIndex, 2, x, y, 0, 0, 0);
+
+ _screen->copyPage(2, 12);
- while (!((skipFlag() && allowSkip) || shouldQuit() || (_abortIntroFlag && allowSkip) || _menuChoice)) {
- _seqSubFrameStartTime = _system->getMillis();
- seq_processWSAs();
+ updateAllNestedAnimations();
+ updateSubTitles();
+ if ((wsaObj || callback) && (!(checkAbortPlayback() || _vm->shouldQuit() || _result))) {
_screen->copyPage(2, 0);
_screen->updateScreen();
+ }
+
+ while (!_vm->shouldQuit()) {
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ break;
+
+ if (fadePal1 && fadePal2) {
+ if (!_screen->timedPaletteFadeStep(fadePal1->getData(), fadePal2->getData(), _system->getMillis() - startTime, fadeRate * _vm->tickLength()) && !wsaObj)
+ break;
+ }
+
+ if ((wsaObj || callback) && (!(checkAbortPlayback() || _vm->shouldQuit() || _result))) {
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ }
+
+ updateSubTitles();
+
+ if (!countDownRunning())
+ break;
+ }
+
+ if (wsaObj) {
+ _animCurrentFrame += frameStep;
+ if ((frameStep > 0 && _animCurrentFrame >= lastFrame) || (frameStep < 0 && _animCurrentFrame < lastFrame))
+ finished = true;
+ }
+
+ if (restoreScreen && (wsaObj || callback)) {
_screen->copyPage(12, 2);
+ _screen->copyRegion(drwX, drwY, drwX, drwY, drwW, drwH, 2, 0, Screen::CR_NO_P_CHECK);
+ _screen->updateScreen();
+ }
+ }
+}
+
+void SeqPlayer_HOF::playDialogueAnimation(uint16 strID, uint16 soundID, int textColor, int textPosX, int textPosY, int textWidth, WSAMovie_v2 *wsaObj, int animStartFrame, int animLastFrame, int animPosX, int animPosY) {
+ int dur = int(strlen(_sequenceStrings[strID])) * (_vm->gameFlags().isTalkie ? 7 : 15);
+ if (_vm->textEnabled()) {
+ int slot = displaySubTitle(strID, textPosX, textPosY, dur, textWidth);
+ if (slot >= 0)
+ _textSlots[slot].textcolor = textColor;
+ }
+ _specialAnimTimeOutTotal = _system->getMillis() + dur * _vm->tickLength();
+ int curframe = animStartFrame;
+
+ if (soundID && _vm->speechEnabled()) {
+ while (_vm->sound()->voiceIsPlaying() && !_abortPlayback)
+ delayTicks(1);
+ playSoundAndDisplaySubTitle(soundID);
+ }
+
+ while (_system->getMillis() < _specialAnimTimeOutTotal && !_abortPlayback) {
+ if (animLastFrame < 0) {
+ int t = ABS(animLastFrame);
+ if (t < curframe)
+ curframe = t;
+ }
+
+ if (ABS(animLastFrame) < curframe)
+ curframe = animStartFrame;
+
+ _specialAnimFrameTimeOut = _system->getMillis() + _animDuration * _vm->tickLength();
+ setCountDown(_animDuration);
- uint32 now = _system->getMillis();
- if (now >= _seqEndTime && !_seqSubframePlaying) {
+ if (wsaObj)
+ wsaObj->displayFrame(curframe % wsaObj->frames(), 2, animPosX, animPosY, 0, 0, 0);
+
+ _screen->copyPage(2, 12);
+ updateSubTitles();
+ delayUntil(MIN(_specialAnimFrameTimeOut, _specialAnimTimeOutTotal));
+
+ if (_vm->speechEnabled() && !_vm->textEnabled() && !_vm->snd_voiceIsPlaying())
+ break;
+
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
break;
- }
- uint32 tdiff = _seqEndTime - _seqSubFrameStartTime;
- int32 dly = _tickLength - (now - _seqSubFrameStartTime);
- if (dly > 0)
- delay(MIN<uint32>(dly, tdiff));
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ curframe++;
+ }
+
+ if (_abortPlayback)
+ _vm->sound()->voiceStop();
+
+ if (ABS(animLastFrame) < curframe)
+ curframe = ABS(animLastFrame);
+
+ if (curframe == animStartFrame)
+ curframe++;
+
+ _animCurrentFrame = curframe;
+}
+
+void SeqPlayer_HOF::startNestedAnimation(int animSlot, int sequenceID) {
+ if (_animSlots[animSlot].flags != -1)
+ return;
+
+ if (_target == kLoLDemo) {
+ return;
+ } else if (_target == kHoFDemo) {
+ assert(sequenceID >= kNestedSequenceHoFDemoWharf2);
+ sequenceID -= kNestedSequenceHoFDemoWharf2;
+ }
+
+ HoFNestedSequence s = _config->nestedSeq[sequenceID];
+
+ if (!_animSlots[animSlot].movie) {
+ _animSlots[animSlot].movie = new WSAMovie_v2(_vm);
+ assert(_animSlots[animSlot].movie);
+ }
+
+ _animSlots[animSlot].movie->close();
+
+ _animSlots[animSlot].movie->open(s.wsaFile, 0, 0);
+
+ if (!_animSlots[animSlot].movie->opened()) {
+ delete _animSlots[animSlot].movie;
+ _animSlots[animSlot].movie = 0;
+ return;
+ }
+
+ _animSlots[animSlot].endFrame = s.endFrame;
+ _animSlots[animSlot].startFrame = _animSlots[animSlot].currentFrame = s.startframe;
+ _animSlots[animSlot].frameDelay = s.frameDelay;
+ _animSlots[animSlot].callback = _config->nestedSeqProc[sequenceID];
+ _animSlots[animSlot].control = s.wsaControl;
+
+ _animSlots[animSlot].flags = s.flags | 1;
+ _animSlots[animSlot].x = s.x;
+ _animSlots[animSlot].y = s.y;
+ _animSlots[animSlot].fadeInTransitionType = s.fadeInTransitionType;
+ _animSlots[animSlot].fadeOutTransitionType = s.fadeOutTransitionType;
+ _animSlots[animSlot].lastFrame = 0xFFFF;
+
+ doNestedFrameTransition(s.fadeInTransitionType, animSlot);
+
+ if (!s.fadeInTransitionType)
+ updateNestedAnimation(animSlot);
+
+ _animSlots[animSlot].nextFrame = _system->getMillis() & ~(_vm->tickLength() - 1);
+}
+
+void SeqPlayer_HOF::closeNestedAnimation(int animSlot) {
+ if (_animSlots[animSlot].flags == -1)
+ return;
+
+ _animSlots[animSlot].flags = -1;
+ doNestedFrameTransition(_animSlots[animSlot].fadeOutTransitionType, animSlot);
+ _animSlots[animSlot].movie->close();
+}
+
+void SeqPlayer_HOF::unloadNestedAnimation(int animSlot) {
+ if (_animSlots[animSlot].movie) {
+ _animSlots[animSlot].movie->close();
+ delete _animSlots[animSlot].movie;
+ _animSlots[animSlot].movie = 0;
+ }
+}
+
+void SeqPlayer_HOF::doNestedFrameTransition(int transitionType, int animSlot) {
+ int xa = 0, ya = 0;
+ transitionType--;
+ if (!_animSlots[animSlot].movie || _abortPlayback || _vm->shouldQuit())
+ return;
+
+ switch (transitionType) {
+ case 0:
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 1, 2);
+ break;
+
+ case 1:
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 1, 1);
+ break;
+
+ case 2:
+ waitForSubTitlesTimeout();
+ xa = -_animSlots[animSlot].movie->xAdd();
+ ya = -_animSlots[animSlot].movie->yAdd();
+ _animSlots[animSlot].movie->displayFrame(21, 8, xa, ya, 0, 0, 0);
+ nestedFrameAnimTransition(8, 2, 7, 8, _animSlots[animSlot].movie->xAdd(), _animSlots[animSlot].movie->yAdd(),
+ _animSlots[animSlot].movie->width(), _animSlots[animSlot].movie->height(), 0, 2);
+ break;
+
+ case 3:
+ _screen->copyPage(2, 10);
+ _animSlots[animSlot].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
+ _screen->copyPage(2, 12);
+ nestedFrameFadeTransition("scene2.cmp");
+ break;
+
+ case 4:
+ _screen->copyPage(2, 10);
+ _animSlots[animSlot].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
+ _screen->copyPage(2, 12);
+ nestedFrameFadeTransition("scene3.cmp");
+ break;
+
+ default:
+ break;
+ }
+}
+
+void SeqPlayer_HOF::updateAllNestedAnimations() {
+ for (int i = 0; i < 8; i++) {
+ if (_animSlots[i].flags != -1) {
+ if (updateNestedAnimation(i))
+ closeNestedAnimation(i);
+ }
+ }
+}
+
+bool SeqPlayer_HOF::updateNestedAnimation(int animSlot) {
+ uint16 currentFrame = _animSlots[animSlot].currentFrame;
+ uint32 curTick = _system->getMillis() & ~(_vm->tickLength() - 1);
+
+ if (_animSlots[animSlot].callback && currentFrame != _animSlots[animSlot].lastFrame) {
+ _animSlots[animSlot].lastFrame = currentFrame;
+ currentFrame = (this->*_animSlots[animSlot].callback)(_animSlots[animSlot].movie, _animSlots[animSlot].x, _animSlots[animSlot].y, currentFrame);
+ }
+
+ if (_animSlots[animSlot].movie) {
+ if (_animSlots[animSlot].flags & 0x20) {
+ _animSlots[animSlot].movie->displayFrame(_animSlots[animSlot].control[currentFrame].index, 2, _animSlots[animSlot].x, _animSlots[animSlot].y, 0x4000, 0, 0);
+ _animSlots[animSlot].frameDelay = _animSlots[animSlot].control[currentFrame].delay;
+ } else {
+ _animSlots[animSlot].movie->displayFrame(currentFrame % _animSlots[animSlot].movie->frames(), 2, _animSlots[animSlot].x, _animSlots[animSlot].y, 0x4000, 0, 0);
+ }
+ }
+
+ if (_animSlots[animSlot].flags & 0x10) {
+ currentFrame = (curTick - _animSlots[animSlot].nextFrame) / (_animSlots[animSlot].frameDelay * _vm->tickLength());
+ } else {
+ int diff = (curTick - _animSlots[animSlot].nextFrame) / (_animSlots[animSlot].frameDelay * _vm->tickLength());
+ if (diff > 0) {
+ currentFrame++;
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ _animSlots[animSlot].nextFrame += ((curTick - _animSlots[animSlot].nextFrame) * 2 / 3);
else
- updateInput();
+ _animSlots[animSlot].nextFrame = curTick;
}
+ }
+
+ bool res = false;
- seq_sequenceCommand(cseq.finalCommand);
- seq_resetAllTextEntries();
+ if (currentFrame >= _animSlots[animSlot].endFrame) {
+ int sw = ((_animSlots[animSlot].flags & 0x1E) - 2);
+ switch (sw) {
+ case 0:
+ res = true;
+ currentFrame = _animSlots[animSlot].endFrame;
+ _screen->copyPage(2, 12);
+ break;
- if (_abortIntroFlag || skipFlag()) {
- _sound->haltTrack();
- _sound->voiceStop();
+ case 6:
+ case 8:
+ currentFrame = _animSlots[animSlot].endFrame - 1;
+ break;
+
+ case 2:
+ case 10:
+ currentFrame = _animSlots[animSlot].startFrame;
+ break;
+
+ default:
+ currentFrame = _animSlots[animSlot].endFrame - 1;
+ res = true;
}
+ }
- if (!_flags.isDemo || _flags.isTalkie) {
- if ((seqNum != kSequenceTitle && seqNum < kSequenceZanfaun &&
- (_abortIntroFlag || skipFlag())) || seqNum == kSequenceZanfaun) {
- _abortIntroFlag = false;
- _eventList.clear();
- seqNum = kSequenceWestwood;
- } else if (seqNum < kSequenceFrash && (_abortIntroFlag || skipFlag())) {
- _abortIntroFlag = false;
- _eventList.clear();
- seqNum = kSequenceFirates;
+ _animSlots[animSlot].currentFrame = currentFrame;
+ return res;
+}
+
+void SeqPlayer_HOF::playSoundEffect(uint16 id, int16 vol) {
+ assert(id < _sequenceSoundListSize);
+ _vm->sound()->voicePlay(_sequenceSoundList[id], 0, vol);
+}
+
+void SeqPlayer_HOF::playSoundAndDisplaySubTitle(uint16 id) {
+ assert(id < _sequenceSoundListSize);
+
+ if (id < 12 && !_vm->gameFlags().isDemo && _vm->textEnabled())
+ displaySubTitle(id, 160, 168, _textDuration[id], 160);
+
+ _vm->sound()->voicePlay(_sequenceSoundList[id], 0);
+}
+
+void SeqPlayer_HOF::printFadingText(uint16 strID, int x, int y, const uint8 *colorMap, uint8 textcolor) {
+ uint8 cmap[16];
+
+ if (checkAbortPlayback())
+ checkPlaybackStatus();
+
+ if (_abortPlayback || _abortRequested || _vm->shouldQuit() || _result)
+ return;
+
+ Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
+ _screen->getPalette(0).fill(254, 2, 63);
+ _screen->setPaletteIndex(252, 63, 32, 48);
+ cmap[0] = colorMap[0];
+ cmap[1] = 253;
+ memcpy(&cmap[2], &colorMap[2], 14);
+ uint8 col0 = _textColor[0];
+
+ _textColor[0] = 253;
+ _screen->setTextColorMap(cmap);
+ resetAllTextSlots();
+ displaySubTitle(strID, x, y, 128, 120);
+ updateSubTitles();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->getPalette(0).copy(_screen->getPalette(0), textcolor, 1, 253);
+ _screen->fadePalette(_screen->getPalette(0), 24);
+
+ _textColor[0] = textcolor;
+ _screen->setTextColorMap(colorMap);
+ resetAllTextSlots();
+ displaySubTitle(strID, x, y, 128, 120);
+ updateSubTitles();
+ _screen->copyPage(2, 0);
+ _screen->updateScreen();
+ _screen->getPalette(0).fill(253, 1, 0);
+ _screen->fadePalette(_screen->getPalette(0), 1);
+
+ _screen->copyPage(2, 12);
+ resetAllTextSlots();
+
+ _textColor[0] = col0;
+
+ _screen->setFont(of);
+}
+
+int SeqPlayer_HOF::displaySubTitle(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width) {
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].duration != -1) {
+ if (i < 9)
+ continue;
+ else
+ return -1;
+ }
+
+ _textSlots[i].strIndex = strIndex;
+ _textSlots[i].x = posX;
+ _textSlots[i].y = posY;
+ _textSlots[i].duration = duration * _vm->tickLength();
+ _textSlots[i].width = width;
+ _textSlots[i].startTime = _system->getMillis();
+ _textSlots[i].textcolor = -1;
+
+ return i;
+ }
+ return -1;
+}
+
+void SeqPlayer_HOF::updateSubTitles() {
+ int curPage = _screen->setCurPage(2);
+ char outputStr[70];
+
+ for (int i = 0; i < 10; i++) {
+ if (_textSlots[i].startTime + _textSlots[i].duration > _system->getMillis() && _textSlots[i].duration != -1) {
+
+ char *srcStr = preprocessString(_sequenceStrings[_textSlots[i].strIndex], _textSlots[i].width);
+ int yPos = _textSlots[i].y;
+
+ while (*srcStr) {
+ uint32 linePos = 0;
+ for (; *srcStr; linePos++) {
+ if (*srcStr == '\r')
+ break;
+ outputStr[linePos] = *srcStr;
+ srcStr++;
+ }
+ outputStr[linePos] = 0;
+ if (*srcStr == '\r')
+ srcStr++;
+
+ uint8 textColor = (_textSlots[i].textcolor >= 0) ? _textSlots[i].textcolor : _textColor[0];
+ _screen->printText(outputStr, _textSlots[i].x - (_screen->getTextWidth(outputStr) / 2), yPos, textColor, 0);
+ yPos += 10;
}
- } else if (seqNum == endSeq && !(_abortIntroFlag || skipFlag())) {
- seqNum = 0;
+ } else {
+ _textSlots[i].duration = -1;
+ }
+ }
+
+ _screen->setCurPage(curPage);
+}
+
+char *SeqPlayer_HOF::preprocessString(const char *srcStr, int width) {
+ char *dstStr = _tempString;
+ int lineStart = 0;
+ int linePos = 0;
+
+ while (*srcStr) {
+ while (*srcStr && *srcStr != ' ')
+ dstStr[lineStart + linePos++] = *srcStr++;
+ dstStr[lineStart + linePos] = 0;
+
+ int len = _screen->getTextWidth(&dstStr[lineStart]);
+ if (width >= len && *srcStr) {
+ dstStr[lineStart + linePos++] = *srcStr++;
+ } else {
+ dstStr[lineStart + linePos] = '\r';
+ lineStart += linePos + 1;
+ linePos = 0;
+ if (*srcStr)
+ srcStr++;
}
+ }
+ dstStr[lineStart + linePos] = 0;
+
+ return strlen(_tempString) ? dstStr : 0;
+}
+
+void SeqPlayer_HOF::waitForSubTitlesTimeout() {
+ uint32 timeOut = _system->getMillis() + ticksTillSubTitlesTimeout() * _vm->tickLength();
- if (_menuChoice) {
- _abortIntroFlag = false;
- _eventList.clear();
+ if (_vm->textEnabled()) {
+ delayUntil(timeOut);
+ } else if (_vm->speechEnabled()) {
+ while (_vm->snd_voiceIsPlaying())
+ delayTicks(1);
+ }
+
+ resetAllTextSlots();
+}
- if (_menuChoice == 2) {
- seqNum = kSequenceTitle;
- _menuChoice = 0;
+uint32 SeqPlayer_HOF::ticksTillSubTitlesTimeout() {
+ uint32 longest = 0;
+
+ for (int i = 0; i < 10; i++) {
+ uint32 timeOut = (_textSlots[i].duration + _textSlots[i].startTime);
+ uint32 curtime = _system->getMillis();
+ if (_textSlots[i].duration != -1 && timeOut > curtime) {
+ timeOut -= curtime;
+ if (longest < timeOut)
+ longest = timeOut;
+ }
+ }
+
+ uint32 tl = _vm->tickLength();
+ return (longest + (tl - 1)) / tl;
+}
+
+void SeqPlayer_HOF::resetAllTextSlots() {
+ for (int i = 0; i < 10; i++)
+ _textSlots[i].duration = -1;
+}
+
+void SeqPlayer_HOF::fadeOutMusic() {
+ _vm->sound()->beginFadeOut();
+ delayTicks(80);
+}
+
+void SeqPlayer_HOF::playHoFTalkieCredits() {
+ static const uint8 colormap[] = {0, 0, 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ static const ScreenDim d = { 0x00, 0x0C, 0x28, 0xB4, 0xFF, 0x00, 0x00, 0x00 };
+
+ _screen->loadBitmap("finale.cps", 3, 3, &_screen->getPalette(0));
+ _screen->setFont(Screen::FID_GOLDFONT_FNT);
+
+ int talkieCreditsSize, talkieCreditsSpecialSize;
+ const uint8 *talkieCredits = _vm->staticres()->loadRawData(k2SeqplayCredits, talkieCreditsSize);
+ const char *const *talkieCreditsSpecial = _vm->staticres()->loadStrings(k2SeqplayCreditsSpecial, talkieCreditsSpecialSize);
+
+ _vm->sound()->selectAudioResourceSet(kMusicIngame);
+ _vm->sound()->loadSoundFile(3);
+ _vm->sound()->playTrack(3);
+
+ _screen->setTextColorMap(colormap);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
+ _screen->updateScreen();
+ _screen->fadeFromBlack();
+
+ _screen->_charWidth = -2;
+ uint8 *dataPtr = new uint8[0xAFD];
+ memcpy(dataPtr, talkieCredits, talkieCreditsSize);
+ _vm->staticres()->unloadId(k2SeqplayCredits);
+
+ displayHoFTalkieScrollText(dataPtr, &d, 2, 6, 5, 1, Screen::FID_GOLDFONT_FNT, Screen::FID_GOLDFONT_FNT, 0, talkieCreditsSpecial);
+ delayTicks(8);
+
+ delete[] dataPtr;
+ _vm->staticres()->unloadId(k2SeqplayCreditsSpecial);
+ _vm->sound()->selectAudioResourceSet(kMusicFinale);
+ _vm->sound()->loadSoundFile(0);
+}
+
+void SeqPlayer_HOF::displayHoFTalkieScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed,
+ int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData, const char *const *specialData) {
+ if (!data)
+ return;
+
+ static const char mark[] = { 5, 13, 0 };
+
+ _screen->clearPage(tempPage1);
+ _screen->clearPage(tempPage2);
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
+
+ struct ScrollTextData {
+ int16 x;
+ int16 y;
+ uint8 *text;
+ byte unk1;
+ byte height;
+ byte adjust;
+
+ ScrollTextData() {
+ x = 0; // 0 11
+ y = 0; // 2 13
+ text = 0; // 4 15
+ unk1 = 0; // 8 19
+ height = 0; // 9 20
+ adjust = 0; // 10 21
+ }
+ };
+
+ ScrollTextData *textData = new ScrollTextData[36];
+ uint8 *ptr = data;
+
+ bool loop = true;
+ int cnt = 0;
+
+ while (loop) {
+ uint32 loopEnd = _system->getMillis() + speed * _vm->tickLength();
+
+ while (cnt < 35 && *ptr) {
+ uint16 cH;
+
+ if (cnt)
+ cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3);
+ else
+ cH = d->h;
+
+ char *str = (char *)ptr;
+
+ ptr = (uint8 *)strpbrk(str, mark);
+ if (!ptr)
+ ptr = (uint8 *)strchr(str, 0);
+
+ textData[cnt + 1].unk1 = *ptr;
+ *ptr = 0;
+ if (textData[cnt + 1].unk1)
+ ptr++;
+
+ if (*str == 3 || *str == 4)
+ textData[cnt + 1].adjust = *str++;
+ else
+ textData[cnt + 1].adjust = 0;
+
+ _screen->setFont(fid1);
+
+ if (*str == 1) {
+ _screen->setFont(fid2);
+ str++;
+ } else if (*str == 2) {
+ str++;
+ }
+
+ textData[cnt + 1].height = _screen->getFontHeight();
+
+ switch (textData[cnt + 1].adjust) {
+ case 3:
+ textData[cnt + 1].x = 157 - _screen->getTextWidth(str);
+ break;
+ case 4:
+ textData[cnt + 1].x = 161;
+ break;
+ default:
+ textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1;
+ }
+
+ if (textData[cnt].unk1 == 5)
+ cH -= (textData[cnt].height + (textData[cnt].height >> 3));
+
+ textData[cnt + 1].y = cH;
+ textData[cnt + 1].text = (uint8 *)str;
+ cnt++;
+ }
+
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage1, tempPage2);
+
+ int cnt2 = 0;
+ bool palCycle = 0;
+
+ while (cnt2 < cnt) {
+ const char *str = (const char *)textData[cnt2 + 1].text;
+ const char *str2 = str;
+ int16 cW = textData[cnt2 + 1].x - 10;
+ int16 cH = textData[cnt2 + 1].y;
+ int x = (d->sx << 3) + cW;
+ int y = d->sy + cH;
+ int col1 = 255;
+
+ if (cH < d->h) {
+ _screen->setCurPage(tempPage2);
+ _screen->setFont(fid1);
+ if (textData[cnt2 + 1].height != _screen->getFontHeight())
+ _screen->setFont(fid2);
+
+ if (specialData) {
+ if (!strcmp(str, specialData[0])) {
+ col1 = 112;
+ char cChar[2] = " ";
+ while (*str2) {
+ cChar[0] = *str2;
+ _screen->printText(cChar, x, y, col1++, 0);
+ x += _screen->getCharWidth((uint8)*str2++);
+ }
+ palCycle = true;
+ } else if (!strcmp(str, specialData[1])) {
+ col1 = 133;
+ char cChar[2] = " ";
+ while (*str2) {
+ cChar[0] = *str2;
+ _screen->printText(cChar, x, y, col1--, 0);
+ x += _screen->getCharWidth((uint8)*str2++);
+ }
+ palCycle = true;
+ } else {
+ _screen->printText(str, x, y, col1, 0);
+ }
+ } else {
+ _screen->printText(str, x, y, col1, 0);
+ }
+ _screen->setCurPage(0);
}
+
+ textData[cnt2 + 1].y -= step;
+ cnt2++;
+ }
+
+ _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0);
+ _screen->updateScreen();
+
+ if (textData[1].y < -10) {
+ textData[1].text += strlen((char *)textData[1].text);
+ textData[1].text[0] = textData[1].unk1;
+ cnt--;
+ memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
+ }
+
+ if (palCycle) {
+ for (int col = 133; col > 112; col--)
+ _screen->getPalette(0).copy(_screen->getPalette(0), col - 1, 1, col);
+ _screen->getPalette(0).copy(_screen->getPalette(0), 133, 1, 112);
+ _screen->setScreenPalette(_screen->getPalette(0));
}
+
+ delayUntil(loopEnd);
+
+ if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !_abortPlayback) {
+ delayTicks(500);
+ cnt = 0;
+ }
+
+ if (checkAbortPlayback())
+ if (checkPlaybackStatus())
+ loop = false;
+
+ if (!cnt || _abortPlayback)
+ loop = false;
}
- if (_flags.isDemo && !_flags.isTalkie) {
- _eventList.clear();
- _screen->fadeToBlack();
+ _vm->sound()->beginFadeOut();
+ _screen->fadeToBlack();
+
+ _abortPlayback = _abortRequested = false;
+
+ delete[] textData;
+}
+
+void SeqPlayer_HOF::updateDemoAdText(int bottom, int top) {
+ int dstY, dstH, srcH;
+
+ static const ScreenDim d = { 0x00, 0x00, 0x28, 0x320, 0xFF, 0xFE, 0x00, 0x00 };
+
+ if (_scrollProgressCounter - (top - 1) < 0) {
+ dstY = top - _scrollProgressCounter;
+ dstH = _scrollProgressCounter;
+ srcH = 0;
+ } else {
+ dstY = 0;
+ srcH = _scrollProgressCounter - top;
+ dstH = (400 - srcH <= top) ? 400 - srcH : top;
}
- if (!_menuChoice)
- delay(1200);
+ if (dstH > 0) {
+ if (_hofDemoAnimData) {
+ for (int i = 0; i < 4; i++) {
+ const HoFSeqItemAnimData *def = &_hofDemoAnimData[i];
+ ActiveItemAnim *a = &_hofDemoActiveItemAnim[i];
- _screen->setCurPage(oldPage);
- _screen->showMouse();
+ _screen->fillRect(12, def->y - 8, 28, def->y + 8, 0, 4);
+ _screen->drawShape(4, _hofDemoItemShapes[def->itemIndex + def->frames[a->currentFrame]], 12, def->y - 8, 0, 0);
+ if (_callbackCurrentFrame % 2 == 0)
+ a->currentFrame = (a->currentFrame + 1) % 20;
+ }
+ }
+ _screen->copyRegionEx(4, 0, srcH, 2, 2, dstY + bottom, 320, dstH, &d);
+ }
+}
- for (int i = 0; i < 8; i++)
- seq_unloadWSA(i);
+void SeqPlayer_HOF::delayTicks(uint32 ticks) {
+ uint32 len = ticks * _vm->tickLength();
+ while (len && !_vm->shouldQuit() && !checkAbortPlayback()) {
+ uint32 step = (len >= 10) ? 10 : len;
+ _system->delayMillis(step);
+ len -= step;
+ }
+}
- _seqWsa->close();
+void SeqPlayer_HOF::delayUntil(uint32 dest) {
+ for (uint32 ct = _system->getMillis(); ct < dest && !_vm->shouldQuit() && !checkAbortPlayback(); ) {
+ uint32 step = (dest - ct >= 10) ? 10 : (dest - ct);
+ _system->delayMillis(step);
+ ct = _system->getMillis();
+ }
+}
- _screen->_charWidth = 0;
+void SeqPlayer_HOF::setCountDown(uint32 ticks) {
+ _countDownRemainder = ticks * _vm->tickLength();
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ _countDownRemainder = _countDownRemainder * 2 / 3;
+ _countDownLastUpdate = _system->getMillis() & ~(_vm->tickLength() - 1);
+}
- seq_uninit();
+bool SeqPlayer_HOF::countDownRunning() {
+ uint32 cur = _system->getMillis();
+ uint32 step = cur - _countDownLastUpdate;
+ _countDownLastUpdate = cur;
+ _countDownRemainder = (step <= _countDownRemainder) ? _countDownRemainder - step : 0;
+ return _countDownRemainder;
}
-int KyraEngine_HoF::seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+#define CASE_ALT(dosCase, towns98Case)\
+ case dosCase:\
+ case towns98Case:\
+ if (!((_callbackCurrentFrame == towns98Case && (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)) || (_callbackCurrentFrame == dosCase && _vm->gameFlags().platform == Common::kPlatformDOS)))\
+ break;
+
+int SeqPlayer_HOF::cbHOF_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- delay(300 * _tickLength);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ delayTicks(300);
} else if (!frm) {
- _sound->playTrack(2);
+ _vm->sound()->playTrack(2);
}
return 0;
}
-int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_title(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1) {
- _sound->playTrack(3);
- } else if (frm == 25) {
+ _vm->sound()->playTrack(3);
+ } else if (frm == 25 && _startupSaveLoadable) {
int cp = _screen->setCurPage(0);
_screen->showMouse();
_system->updateScreen();
- _menuChoice = _menu->handle(11) + 1;
- _seqEndTime = 0;
- _seqSubframePlaying = false;
- if (_menuChoice == 4)
- quitGame();
+ _result = _menu->handle(11) + 1;
+ _updateAnimations = false;
+
+ if (_result == 1 || _result == 3) {
+ _curScene = _lastScene;
+ _preventLooping = true;
+ }
+
+ if (_result == 2) {
+ _result = 0;
+ } else if (_result == 4) {
+ setCountDown(200);
+ _vm->quitGame();
+ }
_screen->hideMouse();
_screen->setCurPage(cp);
+ } else if (frm == 25) {
+ setCountDown(200);
}
return 0;
}
-int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_overview(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
uint8 *tmpPal = _screen->getPalette(3).getData() + 0x101;
memset(tmpPal, 0, 256);
- _seqSubFrameEndTimeInternal = 0;
- uint32 now = 0;
+ uint32 frameEnd = 0;
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(4);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 60 * _tickLength;
+ _updateAnimations = true;
+ fadeOutMusic();
+ _vm->sound()->playTrack(4);
+ frameEnd = _system->getMillis() + 60 * _vm->tickLength();
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
+ _screen->setTextColorMap(_textColorMap);
- _screen->setTextColorMap(_seqTextColorMap);
-
- now = _system->getMillis();
- if (_seqSubFrameEndTimeInternal > now)
- delay(_seqSubFrameEndTimeInternal - now);
+ delayUntil(frameEnd);
break;
case 1:
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x40, 0, 0, 0, 0x100, true);
for (int i = 0; i < 256; i++)
tmpPal[_screen->getPalette(3)[i]] = 1;
@@ -393,19 +1831,19 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
break;
case 40:
- seq_loadNestedSequence(0, kSequenceOver1);
+ startNestedAnimation(0, kNestedSequenceOver1);
break;
case 60:
- seq_loadNestedSequence(1, kSequenceOver2);
+ startNestedAnimation(1, kNestedSequenceOver2);
break;
case 120:
- seq_playTalkText(0);
+ playSoundAndDisplaySubTitle(0);
break;
case 200:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->fadePalette(_screen->getPalette(2), 64);
break;
@@ -417,64 +1855,57 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->setScreenPalette(_screen->getPalette(0));
_screen->updateScreen();
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
break;
case 282:
- seq_loadNestedSequence(0, kSequenceForest);
- seq_playTalkText(1);
+ startNestedAnimation(0, kNestedSequenceForest);
+ playSoundAndDisplaySubTitle(1);
break;
- case 354:
- case 434:
- if (!((_seqFrameCounter == 354 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 434 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceDragon);
+ CASE_ALT(434, 354)
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceDragon);
break;
- case 400:
- case 540:
- if (!((_seqFrameCounter == 400 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 540 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ CASE_ALT(540, 400)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbHOF_library(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(5);
+ _updateAnimations = true;
+ _vm->sound()->playTrack(5);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- seq_loadNestedSequence(0, kSequenceLibrary3);
- seq_playTalkText(4);
+ startNestedAnimation(0, kNestedSequenceLibrary3);
+ playSoundAndDisplaySubTitle(4);
break;
case 100:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->copyPage(12, 2);
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
@@ -482,585 +1913,560 @@ int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->updateScreen();
_screen->copyPage(2, 12);
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceDarm);
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceDarm);
break;
case 104:
- seq_playTalkText(5);
+ playSoundAndDisplaySubTitle(5);
break;
case 240:
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(0, kSequenceLibrary2);
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ startNestedAnimation(0, kNestedSequenceLibrary2);
break;
case 340:
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
_screen->copyPage(2, 12);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->updateScreen();
- seq_loadNestedSequence(0, kSequenceMarco);
- seq_playTalkText(6);
+ startNestedAnimation(0, kNestedSequenceMarco);
+ playSoundAndDisplaySubTitle(6);
break;
- case 480:
- case 660:
- if (!((_seqFrameCounter == 480 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 660 && _flags.platform == Common::kPlatformPC)))
- break;
-
+ CASE_ALT(660, 480)
_screen->copyPage(2, 12);
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-
-int KyraEngine_HoF::seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbHOF_hand(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame) {
case 0:
- _seqSubframePlaying = true;
- _sound->playTrack(6);
+ _updateAnimations = true;
+ _vm->sound()->playTrack(6);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- seq_loadNestedSequence(0, kSequenceHand1a);
- seq_loadNestedSequence(1, kSequenceHand1b);
- seq_loadNestedSequence(2, kSequenceHand1c);
- seq_playTalkText(7);
+ startNestedAnimation(0, kNestedSequenceHand1a);
+ startNestedAnimation(1, kNestedSequenceHand1b);
+ startNestedAnimation(2, kNestedSequenceHand1c);
+ playSoundAndDisplaySubTitle(7);
break;
case 201:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
_screen->applyOverlay(0, 0, 320, 200, 2, _screen->getPalette(3).getData());
_screen->copyPage(2, 12);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
_screen->updateScreen();
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
- seq_resetActiveWSA(2);
- seq_loadNestedSequence(0, kSequenceHand2);
- seq_playTalkText(8);
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
+ closeNestedAnimation(2);
+ startNestedAnimation(0, kNestedSequenceHand2);
+ playSoundAndDisplaySubTitle(8);
break;
- case 260:
- case 395:
- if (!((_seqFrameCounter == 260 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 395 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- seq_loadNestedSequence(1, kSequenceHand3);
- seq_playTalkText(9);
+ CASE_ALT(395, 260)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ startNestedAnimation(1, kNestedSequenceHand3);
+ playSoundAndDisplaySubTitle(9);
break;
- case 365:
- case 500:
- if (!((_seqFrameCounter == 365 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 500 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(1);
- seq_loadNestedSequence(0, kSequenceHand4);
+ CASE_ALT(500, 365)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(1);
+ startNestedAnimation(0, kNestedSequenceHand4);
break;
- case 405:
- case 540:
- if (!((_seqFrameCounter == 405 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 540 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_playTalkText(10);
+ CASE_ALT(540, 405)
+ playSoundAndDisplaySubTitle(10);
break;
- case 484:
- case 630:
- if (!((_seqFrameCounter == 484 && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) || (_seqFrameCounter == 630 && _flags.platform == Common::kPlatformPC)))
- break;
-
- seq_waitForTextsTimeout();
- seq_resetActiveWSA(0);
- _seqEndTime = 0;
- _seqSubframePlaying = false;
+ CASE_ALT(630, 484)
+ waitForSubTitlesTimeout();
+ closeNestedAnimation(0);
+ setCountDown(0);
+ _updateAnimations = false;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_point(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
}
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case -2:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
break;
case 0:
- _sound->playTrack(7);
+ _vm->sound()->playTrack(7);
- _seqTextColor[1] = 0xf7;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
- _screen->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
+ _textColor[1] = 0xF7;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
+ _screen->setTextColorMap(_textColorMap);
+ assert(_screenHoF);
+ _screenHoF->generateGrayOverlay(_screen->getPalette(0), _screen->getPalette(3).getData(), 0x24, 0, 0, 0, 0x100, false);
break;
case 1:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_zanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == -2) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
return 0;
}
- switch (_seqFrameCounter) {
+ switch (_callbackCurrentFrame) {
case 0:
- _sound->playTrack(8);
+ _vm->sound()->playTrack(8);
- _seqTextColor[1] = 0xfd;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = _screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = 0xFD;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = _screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 255) & 0xFF;
+ _screen->setTextColorMap(_textColorMap);
break;
case 1:
- if (_flags.isTalkie) {
- seq_playWsaSyncDialogue(21, 13, -1, 140, 70, 160, wsaObj, 0, 8, x, y);
+ if (_vm->gameFlags().isTalkie) {
+ playDialogueAnimation(21, 13, -1, 140, 70, 160, wsaObj, 0, 8, x, y);
} else {
- seq_setTextEntry(21, 140, 70, 200, 160);
- _seqFrameDelay = 200;
+ displaySubTitle(21, 140, 70, 200, 160);
+ _animDuration = 200;
}
break;
case 2:
case 11:
case 21:
- if (!_flags.isTalkie)
- _seqFrameDelay = 12;
+ if (!_vm->gameFlags().isTalkie)
+ _animDuration = 12;
break;
case 9:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(13, 14, -1, 140, (_flags.lang == Common::FR_FRA
- || _flags.lang == Common::DE_DEU) ? 50 : 70, 160, wsaObj, 9, 15, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(13, 14, -1, 140, (_vm->gameFlags().lang == Common::FR_FRA
+ || _vm->gameFlags().lang == Common::DE_DEU) ? 50 : 70, 160, wsaObj, 9, 15, x, y);
break;
case 10:
- if (!_flags.isTalkie) {
- seq_waitForTextsTimeout();
- seq_setTextEntry(13, 140, 50, _sequenceStringsDuration[13], 160);
- _seqFrameDelay = 300;
+ if (!_vm->gameFlags().isTalkie) {
+ waitForSubTitlesTimeout();
+ displaySubTitle(13, 140, 50, _textDuration[13], 160);
+ _animDuration = 300;
}
break;
case 16:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(18, 15, -1, 140, (_flags.lang == Common::FR_FRA) ? 50 :
- (_flags.lang == Common::DE_DEU ? 40 : 70), 160, wsaObj, 10, 16, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(18, 15, -1, 140, (_vm->gameFlags().lang == Common::FR_FRA) ? 50 :
+ (_vm->gameFlags().lang == Common::DE_DEU ? 40 : 70), 160, wsaObj, 10, 16, x, y);
break;
case 17:
- if (_flags.isTalkie)
- _seqFrameDelay = 12;
+ if (_vm->gameFlags().isTalkie)
+ _animDuration = 12;
break;
case 20:
- if (!_flags.isTalkie) {
- seq_waitForTextsTimeout();
- seq_setTextEntry(18, 160, 50, _sequenceStringsDuration[18], 160);
- _seqFrameDelay = 200;
+ if (!_vm->gameFlags().isTalkie) {
+ waitForSubTitlesTimeout();
+ displaySubTitle(18, 160, 50, _textDuration[18], 160);
+ _animDuration = 200;
}
break;
case 26:
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
break;
case 46:
- if (_flags.isTalkie) {
- seq_playWsaSyncDialogue(16, 16, -1, 200, 50, 120, wsaObj, 46, 46, x, y);
+ if (_vm->gameFlags().isTalkie) {
+ playDialogueAnimation(16, 16, -1, 200, 50, 120, wsaObj, 46, 46, x, y);
} else {
- seq_waitForTextsTimeout();
- seq_setTextEntry(16, 200, 50, _sequenceStringsDuration[16], 120);
+ waitForSubTitlesTimeout();
+ displaySubTitle(16, 200, 50, _textDuration[16], 120);
}
- _seqEndTime = _system->getMillis() + 120 * _tickLength;
+ setCountDown(120);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_over1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 2)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 3)
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
return frm;
}
-
-int KyraEngine_HoF::seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_over2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1)
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
return frm;
}
-int KyraEngine_HoF::seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_forest(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 11)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 12)
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
return frm;
}
-int KyraEngine_HoF::seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_dragon(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 11)
- seq_waitForTextsTimeout();
+ waitForSubTitlesTimeout();
else if (frm == 3)
- seq_playTalkText(3);
+ playSoundAndDisplaySubTitle(3);
return frm;
}
-int KyraEngine_HoF::seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_darm(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_library2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_marco(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 36) {
- seq_waitForTextsTimeout();
- _seqEndTime = 0;
+ waitForSubTitlesTimeout();
+ setCountDown(0);
}
return frm;
}
-int KyraEngine_HoF::seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_hand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 15)
frm = 12;
return frm;
}
-int KyraEngine_HoF::seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_hand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 8)
frm = 4;
return frm;
}
-int KyraEngine_HoF::seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- //NULLSUB (at least in FM-TOWNS version)
+int SeqPlayer_HOF::cbHOF_hand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_funters(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
+ doTransition(9);
break;
case 0:
- _sound->playTrack(3);
+ _vm->sound()->playTrack(3);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFF;
+ _screen->setTextColorMap(_textColorMap);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(81, 240, 70, _seqTextColorMap, 252);
- seq_printCreditsString(82, 240, 90, _seqTextColorMap, _seqTextColor[0]);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(81, 240, 70, _textColorMap, 252);
+ printFadingText(82, 240, 90, _textColorMap, _textColor[0]);
_screen->copyPage(2, 12);
- seq_playTalkText(_flags.isTalkie ? 28 : 24);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqTextColor[0] = 1;
-
- if (_flags.isTalkie) {
- chatY = (_flags.lang == Common::FR_FRA) ? 70 : 78;
- chatFirstFrame = 9;
- chatLastFrame = 15;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 28 : 24);
+ delayUntil(frameEnd);
+ _textColor[0] = 1;
+
+ if (_vm->gameFlags().isTalkie) {
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 70 : 78;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 15;
voiceIndex = 34;
} else {
- chatY = (_flags.lang == Common::FR_FRA) ? 78 : 70;
- chatFirstFrame = 0;
- chatLastFrame = 8;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 78 : 70;
+ subTitleFirstFrame = 0;
+ subTitleLastFrame = 8;
}
- chatX = (_flags.lang == Common::FR_FRA) ? 84 : 88;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::FR_FRA) ? 84 : 88;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(22, voiceIndex, 187, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
+ playDialogueAnimation(22, voiceIndex, 187, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
break;
case 9:
case 16:
- if (!((frm == 9 && !_flags.isTalkie) || (frm == 16 && _flags.isTalkie)))
+ if (!((frm == 9 && !_vm->gameFlags().isTalkie) || (frm == 16 && _vm->gameFlags().isTalkie)))
break;
- _seqFrameDelay = 12;
+ _animDuration = 12;
- if (_flags.lang == Common::FR_FRA) {
- chatX = 80;
- chatW = 112;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleX = 80;
+ subTitleW = 112;
} else {
- chatX = (_flags.lang == Common::DE_DEU) ? 84 : 96;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 84 : 96;
+ subTitleW = 100;
}
- if (_flags.isTalkie) {
- chatFirstFrame = 0;
- chatLastFrame = 8;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 0;
+ subTitleLastFrame = 8;
voiceIndex = 35;
} else {
- chatFirstFrame = 9;
- chatLastFrame = 15;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 15;
}
- chatY = 70;
+ subTitleY = 70;
- seq_playWsaSyncDialogue(23, voiceIndex, 137, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 17;
+ playDialogueAnimation(23, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 17;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_ferb(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(34, 240, _flags.isTalkie ? 60 : 40, _seqTextColorMap, 252);
- seq_printCreditsString(35, 240, _flags.isTalkie ? 70 : 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(36, 240, _flags.isTalkie ? 90 : 70, _seqTextColorMap, 252);
- seq_printCreditsString(37, 240, _flags.isTalkie ? 100 : 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(38, 240, _flags.isTalkie ? 120 : 110, _seqTextColorMap, 252);
- seq_printCreditsString(39, 240, _flags.isTalkie ? 130 : 120, _seqTextColorMap, _seqTextColor[0]);
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- seq_printCreditsString(103, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(34, 240, _vm->gameFlags().isTalkie ? 60 : 40, _textColorMap, 252);
+ printFadingText(35, 240, _vm->gameFlags().isTalkie ? 70 : 50, _textColorMap, _textColor[0]);
+ printFadingText(36, 240, _vm->gameFlags().isTalkie ? 90 : 70, _textColorMap, 252);
+ printFadingText(37, 240, _vm->gameFlags().isTalkie ? 100 : 90, _textColorMap, _textColor[0]);
+ printFadingText(38, 240, _vm->gameFlags().isTalkie ? 120 : 110, _textColorMap, 252);
+ printFadingText(39, 240, _vm->gameFlags().isTalkie ? 130 : 120, _textColorMap, _textColor[0]);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ printFadingText(103, 240, 130, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 255;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 255;
+ _screen->setTextColorMap(_textColorMap);
break;
case 5:
- if (!_flags.isTalkie)
- seq_playTalkText(18);
- _seqFrameDelay = 16;
+ if (!_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(18);
+ _animDuration = 16;
- if (_flags.isTalkie) {
- chatFirstFrame = 5;
- chatLastFrame = 8;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 5;
+ subTitleLastFrame = 8;
voiceIndex = 22;
} else {
- chatLastFrame = 14;
+ subTitleLastFrame = 14;
}
- chatX = 116;
- chatY = 90;
- chatW = 60;
+ subTitleX = 116;
+ subTitleY = 90;
+ subTitleW = 60;
- seq_playWsaSyncDialogue(24, voiceIndex, 149, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
+ playDialogueAnimation(24, voiceIndex, 149, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
break;
case 11:
- if (_flags.isTalkie)
- seq_playWsaSyncDialogue(24, 22, 149, 116, 90, 60, wsaObj, 11, 14, x, y);
+ if (_vm->gameFlags().isTalkie)
+ playDialogueAnimation(24, 22, 149, 116, 90, 60, wsaObj, 11, 14, x, y);
break;
case 16:
- seq_playTalkText(_flags.isTalkie ? 23 : 19);
- _seqFrameDelay = _flags.isTalkie ? 20 : 16;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 23 : 19);
+ _animDuration = _vm->gameFlags().isTalkie ? 20 : 16;
- if (_flags.lang == Common::FR_FRA) {
- chatY = 48;
- chatW = 88;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleY = 48;
+ subTitleW = 88;
} else {
- chatY = 60;
- chatW = 100;
+ subTitleY = 60;
+ subTitleW = 100;
}
- chatX = 60;
+ subTitleX = 60;
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 36;
- seq_playWsaSyncDialogue(25, voiceIndex, 143, chatX, chatY, chatW, wsaObj, 16, 25, x, y);
- _seqFrameDelay = 16;
+ playDialogueAnimation(25, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, 16, 25, x, y);
+ _animDuration = 16;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_fish(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
- seq_printCreditsString(40, 240, _flags.isTalkie ? 55 : 40, _seqTextColorMap, 252);
- seq_printCreditsString(41, 240, _flags.isTalkie ? 65 : 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(42, 240, _flags.isTalkie ? 75 : 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(43, 240, _flags.isTalkie ? 95 : 80, _seqTextColorMap, 252);
- seq_printCreditsString(44, 240, _flags.isTalkie ? 105 : 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(93, 240, _flags.isTalkie ? 125 : 110, _seqTextColorMap, 252);
- seq_printCreditsString(94, 240, _flags.isTalkie ? 135 : 120, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ printFadingText(40, 240, _vm->gameFlags().isTalkie ? 55 : 40, _textColorMap, 252);
+ printFadingText(41, 240, _vm->gameFlags().isTalkie ? 65 : 50, _textColorMap, _textColor[0]);
+ printFadingText(42, 240, _vm->gameFlags().isTalkie ? 75 : 60, _textColorMap, _textColor[0]);
+ printFadingText(43, 240, _vm->gameFlags().isTalkie ? 95 : 80, _textColorMap, 252);
+ printFadingText(44, 240, _vm->gameFlags().isTalkie ? 105 : 90, _textColorMap, _textColor[0]);
+ printFadingText(93, 240, _vm->gameFlags().isTalkie ? 125 : 110, _textColorMap, 252);
+ printFadingText(94, 240, _vm->gameFlags().isTalkie ? 135 : 120, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFF;
+ _screen->setTextColorMap(_textColorMap);
break;
case 4:
- chatX = 94;
- chatY = 42;
- chatW = 100;
- if (_flags.isTalkie)
+ subTitleX = 94;
+ subTitleY = 42;
+ subTitleW = 100;
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 37;
- seq_playWsaSyncDialogue(26, voiceIndex, 149, chatX, chatY, chatW, wsaObj, 3, 12, x, y);
+ playDialogueAnimation(26, voiceIndex, 149, subTitleX, subTitleY, subTitleW, wsaObj, 3, 12, x, y);
break;
case 14:
- seq_playTalkText(_flags.isTalkie ? 19 : 15);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 19 : 15);
break;
case 23:
- seq_playTalkText(_flags.isTalkie ? 20 : 16);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 20 : 16);
break;
case 29:
- chatX = (_flags.lang == Common::DE_DEU) ? 82 : ((_flags.lang == Common::FR_FRA) ? 92 : 88);
- chatY = 40;
- chatW = 100;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 82 : ((_vm->gameFlags().lang == Common::FR_FRA) ? 92 : 88);
+ subTitleY = 40;
+ subTitleW = 100;
- if (_flags.isTalkie) {
- if (_flags.lang == Common::DE_DEU)
- chatY = 35;
+ if (_vm->gameFlags().isTalkie) {
+ if (_vm->gameFlags().lang == Common::DE_DEU)
+ subTitleY = 35;
voiceIndex = 38;
}
- seq_playWsaSyncDialogue(27, voiceIndex, 187, chatX, chatY, chatW, wsaObj, 28, 34, x, y);
+ playDialogueAnimation(27, voiceIndex, 187, subTitleX, subTitleY, subTitleW, wsaObj, 28, 34, x, y);
break;
case 45:
- seq_playTalkText(_flags.isTalkie ? 21 : 17);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 21 : 17);
break;
case 50:
- seq_playTalkText(_flags.isTalkie ? 29 : 25);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 29 : 25);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
+int SeqPlayer_HOF::cbHOF_fheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1068,79 +2474,79 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(49, 240, 20, _seqTextColorMap, 252);
- seq_printCreditsString(50, 240, 30, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(51, 240, 40, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(52, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(53, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(54, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(55, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(56, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(57, 240, 100, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(58, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(60, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(61, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(62, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(63, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(64, 240, 160, _seqTextColorMap, _seqTextColor[0]);
-
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(49, 240, 20, _textColorMap, 252);
+ printFadingText(50, 240, 30, _textColorMap, _textColor[0]);
+ printFadingText(51, 240, 40, _textColorMap, _textColor[0]);
+ printFadingText(52, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(53, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(54, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(55, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(56, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(57, 240, 100, _textColorMap, _textColor[0]);
+ printFadingText(58, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(60, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(61, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(62, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(63, 240, 150, _textColorMap, _textColor[0]);
+ printFadingText(64, 240, 160, _textColorMap, _textColor[0]);
+
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFF;
+ _screen->setTextColorMap(_textColorMap);
break;
case 2:
- seq_playTalkText(_flags.isTalkie ? 25 : 21);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 25 : 21);
- if (_flags.lang == Common::FR_FRA) {
- chatX = 92;
- chatY = 72;
+ if (_vm->gameFlags().lang == Common::FR_FRA) {
+ subTitleX = 92;
+ subTitleY = 72;
} else {
- chatX = (_flags.lang == Common::DE_DEU) ? 90 : 98;
- chatY = 84;
+ subTitleX = (_vm->gameFlags().lang == Common::DE_DEU) ? 90 : 98;
+ subTitleY = 84;
}
- if (_flags.isTalkie) {
- chatFirstFrame = 8;
- chatLastFrame = 9;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleFirstFrame = 8;
+ subTitleLastFrame = 9;
voiceIndex = 39;
} else {
- chatFirstFrame = 2;
- chatLastFrame = -8;
+ subTitleFirstFrame = 2;
+ subTitleLastFrame = -8;
}
- chatW = 100;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(28, voiceIndex, -1, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 4;
+ playDialogueAnimation(28, voiceIndex, -1, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 4;
break;
case 9:
- seq_playTalkText(_flags.isTalkie ? 24 : 20);
- _seqFrameDelay = 100;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 24 : 20);
+ _animDuration = 100;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_farmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1148,169 +2554,164 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(45, 240, 40, _seqTextColorMap, 252);
- seq_printCreditsString(46, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(47, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(83, 240, 80, _seqTextColorMap, 252);
- seq_printCreditsString(48, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(65, 240, 110, _seqTextColorMap, 252);
- seq_printCreditsString(66, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(67, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(68, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(69, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
- seq_printCreditsString(104, 240, 160, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(45, 240, 40, _textColorMap, 252);
+ printFadingText(46, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(47, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(83, 240, 80, _textColorMap, 252);
+ printFadingText(48, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(65, 240, 110, _textColorMap, 252);
+ printFadingText(66, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(67, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(68, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(69, 240, 150, _textColorMap, _textColor[0]);
+ if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98)
+ printFadingText(104, 240, 160, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = 1 + (_screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 254) & 0xff);
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColorMap[1] = _seqTextColor[0] = 1 + (_screen->findLeastDifferentColor(_seqTextColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xff);
- _screen->setTextColorMap(_seqTextColorMap);
- seq_playTalkText(_flags.isTalkie ? 30 : 26);
+ _textColor[1] = 1 + (_screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 254) & 0xFF);
+ memset(_textColorMap, _textColor[1], 16);
+ _textColorMap[1] = _textColor[0] = 1 + (_screen->findLeastDifferentColor(_textColorPresets + 3, _screen->getPalette(0), 1, 254) & 0xFF);
+ _screen->setTextColorMap(_textColorMap);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 30 : 26);
break;
case 6:
- if (_flags.isTalkie)
- seq_playTalkText(18);
+ if (_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(18);
break;
case 12:
- if (!_flags.isTalkie)
- seq_playTalkText(14);
+ if (!_vm->gameFlags().isTalkie)
+ playSoundAndDisplaySubTitle(14);
- chatX = 90;
- chatY = 30;
- chatW = 100;
+ subTitleX = 90;
+ subTitleY = 30;
+ subTitleW = 100;
- if (_flags.isTalkie) {
- if (_flags.lang == Common::FR_FRA || _flags.lang == Common::DE_DEU) {
- chatX = 75;
- chatY = 25;
+ if (_vm->gameFlags().isTalkie) {
+ if (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::DE_DEU) {
+ subTitleX = 75;
+ subTitleY = 25;
}
voiceIndex = 40;
}
- seq_playWsaSyncDialogue(29, voiceIndex, 150, chatX, chatY, chatW, wsaObj, 12, -21, x, y);
+ playDialogueAnimation(29, voiceIndex, 150, subTitleX, subTitleY, subTitleW, wsaObj, 12, -21, x, y);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
- int chatFirstFrame = 0;
- int chatLastFrame = 0;
- //int textCol = 0;
+int SeqPlayer_HOF::cbHOF_fuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
+ int subTitleFirstFrame = 0;
+ int subTitleLastFrame = 0;
uint16 voiceIndex = 0;
switch (frm) {
case -2:
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(70, 240, 20, _seqTextColorMap, 252);
- seq_printCreditsString(71, 240, 30, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(72, 240, 40, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(73, 240, 50, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(74, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(75, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(101, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(102, 240, 90, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(87, 240, 100, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(88, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(89, 240, 120, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(90, 240, 130, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(91, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(92, 240, 150, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(70, 240, 20, _textColorMap, 252);
+ printFadingText(71, 240, 30, _textColorMap, _textColor[0]);
+ printFadingText(72, 240, 40, _textColorMap, _textColor[0]);
+ printFadingText(73, 240, 50, _textColorMap, _textColor[0]);
+ printFadingText(74, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(75, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(101, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(102, 240, 90, _textColorMap, _textColor[0]);
+ printFadingText(87, 240, 100, _textColorMap, _textColor[0]);
+ printFadingText(88, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(89, 240, 120, _textColorMap, _textColor[0]);
+ printFadingText(90, 240, 130, _textColorMap, _textColor[0]);
+ printFadingText(91, 240, 140, _textColorMap, _textColor[0]);
+ printFadingText(92, 240, 150, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
for (int i = 0; i < 0x300; i++)
- _screen->getPalette(0)[i] &= 0x3f;
- _seqTextColor[1] = 0xCf;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xfe;
+ _screen->getPalette(0)[i] &= 0x3F;
+ _textColor[1] = 0xCf;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFE;
- _screen->setTextColorMap(_seqTextColorMap);
+ _screen->setTextColorMap(_textColorMap);
break;
case 6:
- _seqFrameDelay = 20;
+ _animDuration = 20;
- if (_flags.isTalkie) {
- chatX = 82;
- //textCol = 143;
- chatFirstFrame = 16;
- chatLastFrame = 21;
+ if (_vm->gameFlags().isTalkie) {
+ subTitleX = 82;
+ subTitleFirstFrame = 16;
+ subTitleLastFrame = 21;
voiceIndex = 41;
} else {
- chatX = 62;
- //textCol = 137;
- chatFirstFrame = 9;
- chatLastFrame = 13;
+ subTitleX = 62;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 13;
}
- chatY = (_flags.lang == Common::FR_FRA || _flags.lang == Common::DE_DEU) ? 88 :100;
- chatW = 80;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::DE_DEU) ? 88 :100;
+ subTitleW = 80;
- seq_playWsaSyncDialogue(30, voiceIndex, 137, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 8;
+ playDialogueAnimation(30, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 8;
break;
case 9:
case 16:
- if (_flags.isTalkie) {
+ if (_vm->gameFlags().isTalkie) {
if (frm == 16)
break;
- chatX = 64;
- //textCol = 137;
- chatFirstFrame = 9;
- chatLastFrame = 13;
+ subTitleX = 64;
+ subTitleFirstFrame = 9;
+ subTitleLastFrame = 13;
voiceIndex = 42;
} else {
if (frm == 9)
break;
- chatX = 80;
- //textCol = 143;
- chatFirstFrame = 16;
- chatLastFrame = 21;
+ subTitleX = 80;
+ subTitleFirstFrame = 16;
+ subTitleLastFrame = 21;
}
- chatY = 100;
- chatW = 100;
+ subTitleY = 100;
+ subTitleW = 100;
- seq_playWsaSyncDialogue(31, voiceIndex, 143, chatX, chatY, chatW, wsaObj, chatFirstFrame, chatLastFrame, x, y);
- if (_flags.isTalkie)
- _seqWsaCurrentFrame = 21;
+ playDialogueAnimation(31, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, subTitleFirstFrame, subTitleLastFrame, x, y);
+ if (_vm->gameFlags().isTalkie)
+ _animCurrentFrame = 21;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- _seqSubFrameEndTimeInternal = 0;
- int chatX = 0;
- int chatY = 0;
- int chatW = 0;
+int SeqPlayer_HOF::cbHOF_firates(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ uint32 frameEnd = 0;
+ int subTitleX = 0;
+ int subTitleY = 0;
+ int subTitleW = 0;
uint16 voiceIndex = 0;
switch (frm) {
@@ -1318,87 +2719,87 @@ int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm
_screen->copyPage(12, 2);
_screen->copyPage(2, 0);
_screen->updateScreen();
- seq_sequenceCommand(9);
- _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength;
- seq_printCreditsString(76, 240, 40, _seqTextColorMap, 252);
- seq_printCreditsString(77, 240, 50, _seqTextColorMap, 252);
- seq_printCreditsString(78, 240, 60, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(79, 240, 70, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(80, 240, 80, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(84, 240, 100, _seqTextColorMap, 252);
- seq_printCreditsString(85, 240, 110, _seqTextColorMap, _seqTextColor[0]);
- seq_printCreditsString(99, 240, 130, _seqTextColorMap, 252);
- seq_printCreditsString(100, 240, 140, _seqTextColorMap, _seqTextColor[0]);
- delay(_seqSubFrameEndTimeInternal - _system->getMillis());
- _seqEndTime = 0;
+ doTransition(9);
+ frameEnd = _system->getMillis() + 480 * _vm->tickLength();
+ printFadingText(76, 240, 40, _textColorMap, 252);
+ printFadingText(77, 240, 50, _textColorMap, 252);
+ printFadingText(78, 240, 60, _textColorMap, _textColor[0]);
+ printFadingText(79, 240, 70, _textColorMap, _textColor[0]);
+ printFadingText(80, 240, 80, _textColorMap, _textColor[0]);
+ printFadingText(84, 240, 100, _textColorMap, 252);
+ printFadingText(85, 240, 110, _textColorMap, _textColor[0]);
+ printFadingText(99, 240, 130, _textColorMap, 252);
+ printFadingText(100, 240, 140, _textColorMap, _textColor[0]);
+ delayUntil(frameEnd);
+ setCountDown(0);
break;
case 0:
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFF;
+ _screen->setTextColorMap(_textColorMap);
break;
case 6:
- seq_playTalkText(_flags.isTalkie ? 31 : 27);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 31 : 27);
break;
case 14:
case 15:
- if (!((frm == 15 && !_flags.isTalkie) || (frm == 14 && _flags.isTalkie)))
+ if (!((frm == 15 && !_vm->gameFlags().isTalkie) || (frm == 14 && _vm->gameFlags().isTalkie)))
break;
- seq_playTalkText(_flags.isTalkie ? 31 : 27);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 31 : 27);
- if (_flags.lang == Common::DE_DEU) {
- chatX = 82;
- chatY = 84;
- chatW = 140;
+ if (_vm->gameFlags().lang == Common::DE_DEU) {
+ subTitleX = 82;
+ subTitleY = 84;
+ subTitleW = 140;
} else {
- chatX = 74;
- chatY = (_flags.lang == Common::FR_FRA) ? 96: 108;
- chatW = 80;
+ subTitleX = 74;
+ subTitleY = (_vm->gameFlags().lang == Common::FR_FRA) ? 96: 108;
+ subTitleW = 80;
}
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 43;
- seq_playWsaSyncDialogue(32, voiceIndex, 137, chatX, chatY, chatW, wsaObj, 14, 16, x, y);
+ playDialogueAnimation(32, voiceIndex, 137, subTitleX, subTitleY, subTitleW, wsaObj, 14, 16, x, y);
break;
case 28:
- seq_playTalkText(_flags.isTalkie ? 32 : 28);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 32 : 28);
break;
case 29:
- seq_playTalkText(_flags.isTalkie ? 33 : 29);
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 33 : 29);
break;
case 31:
- if (_flags.isTalkie)
+ if (_vm->gameFlags().isTalkie)
voiceIndex = 44;
- chatX = 90;
- chatY = (_flags.lang == Common::DE_DEU) ? 60 : 76;
- chatW = 80;
+ subTitleX = 90;
+ subTitleY = (_vm->gameFlags().lang == Common::DE_DEU) ? 60 : 76;
+ subTitleW = 80;
- seq_playWsaSyncDialogue(33, voiceIndex, 143, chatX, chatY, chatW, wsaObj, 31, 34, x, y);
+ playDialogueAnimation(33, voiceIndex, 143, subTitleX, subTitleY, subTitleW, wsaObj, 31, 34, x, y);
break;
case 35:
- _seqFrameDelay = 300;
+ _animDuration = 300;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOF_frash(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
int tmp = 0;
switch (frm) {
@@ -1408,473 +2809,440 @@ int KyraEngine_HoF::seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm)
_screen->copyPage(2, 12);
_screen->copyPage(2, 0);
_screen->updateScreen();
- _seqFrameCounter = 0;
- seq_loadNestedSequence(0, kSequenceFiggle);
+ _callbackCurrentFrame = 0;
+ startNestedAnimation(0, kNestedSequenceFiggle);
break;
case -1:
- if (_flags.isTalkie)
- seq_finaleActorScreen();
- _seqSpecialFlag = _flags.isTalkie;
+ if (_vm->gameFlags().isTalkie)
+ playHoFTalkieCredits();
+ _talkieFinaleExtraFlag = _vm->gameFlags().isTalkie;
break;
case 0:
- if (_seqFrameCounter == 1) {
- _sound->playTrack(4);
- _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0), 1, 255) & 0xff;
- memset(_seqTextColorMap, _seqTextColor[1], 16);
- _seqTextColor[0] = _seqTextColorMap[1] = 0xff;
- _screen->setTextColorMap(_seqTextColorMap);
+ if (_callbackCurrentFrame == 1) {
+ _vm->sound()->playTrack(4);
+ _textColor[1] = _screen->findLeastDifferentColor(_textColorPresets, _screen->getPalette(0), 1, 255) & 0xFF;
+ memset(_textColorMap, _textColor[1], 16);
+ _textColor[0] = _textColorMap[1] = 0xFF;
+ _screen->setTextColorMap(_textColorMap);
}
- _seqFrameDelay = 10;
+ _animDuration = 10;
break;
case 1:
- if (_seqFrameCounter < 20 && _seqSpecialFlag) {
- _seqWsaCurrentFrame = 0;
+ if (_callbackCurrentFrame < 20 && _talkieFinaleExtraFlag) {
+ _animCurrentFrame = 0;
} else {
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
- seq_playTalkText(_flags.isTalkie ? 26 : 22);
- if (_seqSpecialFlag) {
- _seqFrameCounter = 3;
- _seqSpecialFlag = false;
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 26 : 22);
+ if (_talkieFinaleExtraFlag) {
+ _callbackCurrentFrame = 3;
+ _talkieFinaleExtraFlag = false;
}
}
break;
case 2:
- _seqFrameDelay = 20;
+ _animDuration = 20;
break;
case 3:
- seq_playTalkText(_flags.isTalkie ? 27 : 23);
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 27 : 23);
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
break;
case 4:
- _seqFrameDelay = 10;
+ _animDuration = 10;
break;
case 5:
- seq_playTalkText(_flags.isTalkie ? 27 : 23);
- tmp = _seqFrameCounter / 6;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 27 : 23);
+ tmp = _callbackCurrentFrame / 6;
if (tmp == 2)
- _seqFrameDelay = _flags.isTalkie ? 7 : (1 + _rnd.getRandomNumberRng(1, 10));
+ _animDuration = _vm->gameFlags().isTalkie ? 7 : (1 + _vm->_rnd.getRandomNumberRng(1, 10));
else if (tmp < 2)
- _seqFrameDelay = _flags.isTalkie ? 500 : (300 + _rnd.getRandomNumberRng(1, 300));
+ _animDuration = _vm->gameFlags().isTalkie ? 500 : (300 + _vm->_rnd.getRandomNumberRng(1, 300));
break;
case 6:
- _seqFrameDelay = 10;
- tmp = _seqFrameCounter / 6;
+ _animDuration = 10;
+ tmp = _callbackCurrentFrame / 6;
if (tmp == 2)
- _seqWsaCurrentFrame = 4;
+ _animCurrentFrame = 4;
else if (tmp < 2)
- _seqWsaCurrentFrame = 0;
+ _animCurrentFrame = 0;
break;
case 7:
- _seqFrameCounter = 0;
- _seqFrameDelay = 5;
- seq_playTalkText(_flags.isTalkie ? 26 : 22);
+ _callbackCurrentFrame = 0;
+ _animDuration = 5;
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 26 : 22);
break;
case 11:
- if (_seqFrameCounter < 8)
- _seqWsaCurrentFrame = 8;
+ if (_callbackCurrentFrame < 8)
+ _animCurrentFrame = 8;
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-void KyraEngine_HoF::seq_finaleActorScreen() {
- static const uint8 colormap[] = {0, 0, 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- static const ScreenDim d = { 0x00, 0x0C, 0x28, 0xB4, 0xFF, 0x00, 0x00, 0x00 };
-
- _screen->loadBitmap("finale.cps", 3, 3, &_screen->getPalette(0));
- _screen->setFont(Screen::FID_GOLDFONT_FNT);
-
- int talkieCreditsSize, talkieCreditsSpecialSize;
- const uint8 *talkieCredits = _staticres->loadRawData(k2SeqplayCredits, talkieCreditsSize);
- const char * const *talkieCreditsSpecial = _staticres->loadStrings(k2SeqplayCreditsSpecial, talkieCreditsSpecialSize);
-
- _sound->setSoundList(&_soundData[kMusicIngame]);
- _sound->loadSoundFile(3);
- _sound->playTrack(3);
-
- _screen->setTextColorMap(colormap);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
- _screen->updateScreen();
- _screen->fadeFromBlack();
-
- _screen->_charWidth = -2;
- uint8 *dataPtr = new uint8[0xafd];
- memcpy(dataPtr, talkieCredits, talkieCreditsSize);
- _staticres->unloadId(k2SeqplayCredits);
-
- seq_displayScrollText(dataPtr, &d, 2, 6, 5, 1, Screen::FID_GOLDFONT_FNT, Screen::FID_GOLDFONT_FNT, 0, talkieCreditsSpecial);
- delay(120);
-
- delete[] dataPtr;
- _staticres->unloadId(k2SeqplayCreditsSpecial);
- _sound->setSoundList(&_soundData[kMusicFinale]);
- _sound->loadSoundFile(0);
-}
-
-int KyraEngine_HoF::seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter == 10)
- _seqEndTime = 0;
- if (_seqFrameCounter == 10 || _seqFrameCounter == 5 || _seqFrameCounter == 7)
- seq_playTalkText(_flags.isTalkie ? 45 : 30);
+int SeqPlayer_HOF::cbHOF_figgle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (_callbackCurrentFrame == 10)
+ setCountDown(0);
+ if (_callbackCurrentFrame == 10 || _callbackCurrentFrame == 5 || _callbackCurrentFrame == 7)
+ playSoundAndDisplaySubTitle(_vm->gameFlags().isTalkie ? 45 : 30);
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_virgin(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm)
- delay(50 * _tickLength);
+ delayTicks(50);
return 0;
}
-int KyraEngine_HoF::seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_westwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm)
- _sound->playTrack(2);
+ _vm->sound()->playTrack(2);
return 0;
}
-int KyraEngine_HoF::seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+
+int SeqPlayer_HOF::cbHOFDEMO_title(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm) {
- _sound->playTrack(3);
+ _vm->sound()->playTrack(3);
} else if (frm == 25) {
- delay(60 * _tickLength);
- _seqEndTime = 0;
- seq_sequenceCommand(0);
+ delayTicks(60);
+ setCountDown(0);
+ doTransition(0);
}
return 0;
}
-int KyraEngine_HoF::seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_hill(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (!frm) {
- _sound->playTrack(4);
+ _vm->sound()->playTrack(4);
} else if (frm == 25) {
- seq_loadNestedSequence(0, kSequenceDemoWater);
- _seqFrameDelay--;
+ startNestedAnimation(0, kNestedSequenceHoFDemoWater);
+ _animDuration--;
} else if (frm > 25 && frm < 50) {
- if (_seqFrameDelay > 3)
- _seqFrameDelay--;
+ if (_animDuration > 3)
+ _animDuration--;
} else if (frm == 95) {
- _seqFrameDelay = 70;
+ _animDuration = 70;
} else if (frm == 96) {
- _seqFrameDelay = 7;
+ _animDuration = 7;
} else if (frm == 129) {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
}
return 0;
}
-int KyraEngine_HoF::seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_outhome(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
switch (frm) {
case 12:
- seq_playTalkText(4);
+ playSoundAndDisplaySubTitle(4);
break;
case 32:
- seq_playTalkText(7);
+ playSoundAndDisplaySubTitle(7);
break;
case 36:
- seq_playTalkText(10);
+ playSoundAndDisplaySubTitle(10);
break;
case 57:
- seq_playTalkText(9);
+ playSoundAndDisplaySubTitle(9);
break;
case 80:
case 96:
case 149:
- _seqFrameDelay = 70;
+ _animDuration = 70;
break;
case 81:
case 97:
- _seqFrameDelay = 5;
+ _animDuration = 5;
break;
case 110:
- seq_playTalkText(5);
+ playSoundAndDisplaySubTitle(5);
break;
case 137:
- seq_playTalkText(6);
+ playSoundAndDisplaySubTitle(6);
break;
}
return 0;
}
-int KyraEngine_HoF::seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (!_seqFrameCounter)
- seq_loadNestedSequence(0, kSequenceDemoWharf2);
+int SeqPlayer_HOF::cbHOFDEMO_wharf(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (!_callbackCurrentFrame)
+ startNestedAnimation(0, kNestedSequenceHoFDemoWharf2);
switch (frm) {
case 0:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
case 5:
- if ((_seqFrameCounter / 8) <= 2 || _activeWSA[0].flags != -1)
- _seqWsaCurrentFrame = 0;
+ if ((_callbackCurrentFrame / 8) <= 2 || _animSlots[0].flags != -1)
+ _animCurrentFrame = 0;
else
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
break;
case 6:
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
break;
case 8:
case 10:
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
break;
case 13:
- seq_playTalkText(7);
+ playSoundAndDisplaySubTitle(7);
break;
case 16:
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dinob(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 0) {
- if (!(_seqFrameCounter/8)) {
- seq_loadNestedSequence(0, kSequenceDemoDinob2);
- _seqWsaCurrentFrame = 0;
+ if (!(_callbackCurrentFrame/8)) {
+ startNestedAnimation(0, kNestedSequenceHoFDemoDinob2);
+ _animCurrentFrame = 0;
}
} else if (frm == 3) {
- if (_activeWSA[0].flags != -1) {
- _seqWsaCurrentFrame = 0;
+ if (_animSlots[0].flags != -1) {
+ _animCurrentFrame = 0;
} else {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
_screen->copyPage(2, 12);
}
} else if (frm == 4) {
- seq_resetActiveWSA(0);
+ closeNestedAnimation(0);
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return 0;
}
-int KyraEngine_HoF::seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (((_system->getMillis() - _seqStartTime) / (5 * _tickLength)) > 0) {
- _seqStartTime = _system->getMillis();
- if (!_seqFrameCounter) {
- seq_loadNestedSequence(0, kSequenceDemoBail);
- seq_loadNestedSequence(1, kSequenceDemoDig);
+int SeqPlayer_HOF::cbHOFDEMO_fisher(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (((_system->getMillis() - _fisherAnimCurTime) / (5 * _vm->tickLength())) > 0) {
+ _fisherAnimCurTime = _system->getMillis();
+ if (!_callbackCurrentFrame) {
+ startNestedAnimation(0, kNestedSequenceHoFDemoBail);
+ startNestedAnimation(1, kNestedSequenceHoFDemoDig);
}
- if (_seqScrollTextCounter >= 0x18f && !_seqFrameCounter)
+ if (_scrollProgressCounter >= 0x18F && !_callbackCurrentFrame)
return 0;
- if (!_seqFrameCounter) {
+ if (!_callbackCurrentFrame) {
_screen->loadBitmap("adtext.cps", 4, 4, 0);
_screen->loadBitmap("adtext2.cps", 6, 6, 0);
_screen->copyPageMemory(6, 0, 4, 64000, 1024);
_screen->copyPageMemory(6, 1023, 6, 0, 64000);
- _seqScrollTextCounter = 0;
+ _scrollProgressCounter = 0;
}
- seq_scrollPage(24, 144);
- _seqFrameCounter++;
- if (_seqFrameCounter < 0x256 || _seqFrameCounter > 0x31c) {
- if (_seqFrameCounter < 0x174 || _seqFrameCounter > 0x1d7) {
- if (_seqFrameCounter < 0x84 || _seqFrameCounter > 0xe7) {
- _seqScrollTextCounter++;
+ updateDemoAdText(24, 144);
+ _callbackCurrentFrame++;
+ if (_callbackCurrentFrame < 0x256 || _callbackCurrentFrame > 0x31C) {
+ if (_callbackCurrentFrame < 0x174 || _callbackCurrentFrame > 0x1D7) {
+ if (_callbackCurrentFrame < 0x84 || _callbackCurrentFrame > 0xE7) {
+ _scrollProgressCounter++;
}
}
}
- if (_seqFrameCounter > 0x31e) {
- seq_resetActiveWSA(0);
- seq_resetActiveWSA(1);
- _seqEndTime = 0;
+ if (_callbackCurrentFrame > 0x31E) {
+ closeNestedAnimation(0);
+ closeNestedAnimation(1);
+ setCountDown(0);
_screen->copyPage(2, 12);
}
} else {
- seq_scrollPage(24, 144);
+ updateDemoAdText(24, 144);
}
return 0;
}
-int KyraEngine_HoF::seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_wharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 69)
- _seqWsaCurrentFrame = 8;
+ _animCurrentFrame = 8;
return frm;
}
-int KyraEngine_HoF::seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
switch (frm) {
case 19:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 54:
- seq_playTalkText(15);
+ playSoundAndDisplaySubTitle(15);
break;
case 61:
- seq_playTalkText(16);
+ playSoundAndDisplaySubTitle(16);
break;
case 69:
- seq_playTalkText(14);
+ playSoundAndDisplaySubTitle(14);
break;
case 77:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 79:
- _seqWsaCurrentFrame = 4;
+ _animCurrentFrame = 4;
break;
}
return frm;
}
-int KyraEngine_HoF::seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_water(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
if (frm == 1)
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
return frm;
}
-int KyraEngine_HoF::seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_bail(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
-int KyraEngine_HoF::seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbHOFDEMO_dig(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
return frm;
}
#ifdef ENABLE_LOL
-int KyraEngine_HoF::seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+int SeqPlayer_HOF::cbLOLDEMO_scene1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
Palette &tmpPal = _screen->getPalette(2);
- if (!(_seqFrameCounter % 100)) {
- if (_seqFrameCounter == 0) {
- _sound->haltTrack();
- _sound->playTrack(6);
+ if (!(_callbackCurrentFrame % 100)) {
+ if (_callbackCurrentFrame == 0) {
+ _vm->sound()->haltTrack();
+ _vm->sound()->playTrack(6);
}
tmpPal.copy(_screen->getPalette(0));
- for (int i = 3; i < 0x300; i++) {
+ for (int i = 3; i < 768; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
- if (tmpPal[i] > 0x3f)
- tmpPal[i] = 0x3f;
+ if (tmpPal[i] > 0x3F)
+ tmpPal[i] = 0x3F;
}
- seq_playTalkText(_rnd.getRandomBit());
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
- delay(8);
+ _vm->delay(8);
} else {
_screen->setScreenPalette(_screen->getPalette(0));
_screen->updateScreen();
- if (_seqFrameCounter == 40)
- seq_playTalkText(3);
+ if (_callbackCurrentFrame == 40)
+ playSoundAndDisplaySubTitle(3);
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter - 17) {
+int SeqPlayer_HOF::cbLOLDEMO_scene2(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (frm - 17) {
case 0:
- _seqFrameDelay = 8;
+ _animDuration = 8;
break;
case 3:
case 6:
case 9:
- seq_playTalkText(8);
+ playSoundEffect(8, 255 - ((26 - frm) << 3));
break;
case 15:
- seq_playTalkText(9);
+ playSoundAndDisplaySubTitle(9);
break;
case 18:
- seq_playTalkText(2);
+ playSoundAndDisplaySubTitle(2);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter == 1)
- seq_playTalkText(6);
- else if (frm == 26)
- seq_playTalkText(7);
+int SeqPlayer_HOF::cbLOLDEMO_scene3(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (frm == 1)
+ playSoundAndDisplaySubTitle(6);
+ else if (frm == 24)
+ playSoundAndDisplaySubTitle(7);
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene4(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter) {
+int SeqPlayer_HOF::cbLOLDEMO_scene4(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (frm) {
case 11:
case 14:
case 17:
case 20:
- seq_playTalkText(8);
+ playSoundEffect(8, 255 - ((22 - frm) << 3));
break;
case 22:
- seq_playTalkText(11);
+ playSoundAndDisplaySubTitle(11);
break;
case 24:
- seq_playTalkText(8);
+ playSoundAndDisplaySubTitle(8);
break;
case 30:
- seq_playTalkText(15);
+ playSoundAndDisplaySubTitle(15);
break;
case 34:
- seq_playTalkText(14);
+ playSoundAndDisplaySubTitle(14);
break;
case 38:
- seq_playTalkText(13);
+ playSoundAndDisplaySubTitle(13);
break;
case 42:
- seq_playTalkText(12);
+ playSoundAndDisplaySubTitle(12);
break;
default:
break;
}
- _seqFrameCounter++;
+ _callbackCurrentFrame++;
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- switch (_seqFrameCounter++) {
+int SeqPlayer_HOF::cbLOLDEMO_scene5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ switch (_callbackCurrentFrame++) {
case 0:
case 4:
case 6:
@@ -1889,13 +3257,13 @@ int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm
case 26:
case 28:
case 30:
- seq_playTalkText(15);
+ playSoundEffect(15, 255 - ((31 - frm) << 3));
break;
case 32:
- seq_playTalkText(16);
+ playSoundAndDisplaySubTitle(16);
break;
case 42:
- seq_playTalkText(6);
+ playSoundAndDisplaySubTitle(6);
break;
default:
break;
@@ -1903,24 +3271,24 @@ int KyraEngine_HoF::seq_lolDemoScene5(WSAMovie_v2 *wsaObj, int x, int y, int frm
return frm;
}
-int KyraEngine_HoF::seq_lolDemoText5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- if (_seqFrameCounter++ == 100)
- seq_playTalkText(5);
+int SeqPlayer_HOF::cbLOLDEMO_text5(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ if (_callbackCurrentFrame++ == 100)
+ playSoundAndDisplaySubTitle(5);
return frm;
}
-int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- while (_seqScrollTextCounter < 0x122) {
- _seqEndTime = _system->getMillis() + 6 * _tickLength;
- if (!_seqFrameCounter) {
+int SeqPlayer_HOF::cbLOLDEMO_scene6(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
+ while (_scrollProgressCounter < 290) {
+ setCountDown(6);
+ if (!_callbackCurrentFrame) {
_screen->loadBitmap("adtext.cps", 4, 4, 0);
_screen->loadBitmap("adtext2.cps", 6, 6, 0);
_screen->copyPageMemory(6, 0, 4, 64000, 1024);
_screen->copyPageMemory(6, 1023, 6, 0, 64000);
- _seqScrollTextCounter = 0;
+ _scrollProgressCounter = 0;
}
- if (_seqFrameCounter % 175) {
+ if (_callbackCurrentFrame % 175) {
_screen->setScreenPalette(_screen->getPalette(0));
} else {
Palette &tmpPal = _screen->getPalette(2);
@@ -1928,27 +3296,29 @@ int KyraEngine_HoF::seq_lolDemoScene6(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;
}
- seq_playTalkText(_rnd.getRandomBit());
+ playSoundAndDisplaySubTitle(_vm->_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
- delay(8);
+ _vm->delay(8);
}
- if (_seqFrameCounter == 40 || _seqFrameCounter == 80 || _seqFrameCounter == 150 || _seqFrameCounter == 300)
- seq_playTalkText(3);
+ if (_callbackCurrentFrame == 40 || _callbackCurrentFrame == 80 || _callbackCurrentFrame == 150 || _callbackCurrentFrame == 300)
+ playSoundAndDisplaySubTitle(3);
_screen->copyPage(12, 2);
- seq_scrollPage(70, 130);
+ updateDemoAdText(70, 130);
_screen->copyPage(2, 0);
_screen->updateScreen();
- _seqFrameCounter++;
- if (_seqFrameCounter < 128 || _seqFrameCounter > 207)
- _seqScrollTextCounter++;
- delayUntil(_seqEndTime);
+ _callbackCurrentFrame++;
+ if (_callbackCurrentFrame < 128 || _callbackCurrentFrame > 207)
+ _scrollProgressCounter++;
+
+ while (countDownRunning())
+ delayTicks(1);
}
_screen->copyPage(2, 12);
@@ -1956,776 +3326,16 @@ int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm
}
#endif // ENABLE_LOL
-uint32 KyraEngine_HoF::seq_activeTextsTimeLeft() {
- uint32 res = 0;
-
- for (int i = 0; i < 10; i++) {
- uint32 chatend = (_activeText[i].duration + _activeText[i].startTime);
- uint32 curtime = _system->getMillis();
- if (_activeText[i].duration != -1 && chatend > curtime) {
- chatend -= curtime;
- if (res < chatend)
- res = chatend;
- }
- }
-
- return res;
-}
-
-void KyraEngine_HoF::seq_processWSAs() {
- for (int i = 0; i < 8; i++) {
- if (_activeWSA[i].flags != -1) {
- if (seq_processNextSubFrame(i))
- seq_resetActiveWSA(i);
- }
- }
-}
-
-void KyraEngine_HoF::seq_processText() {
- int curPage = _screen->setCurPage(2);
- char outputStr[70];
-
- for (int i = 0; i < 10; i++) {
- if (_activeText[i].startTime + _activeText[i].duration > _system->getMillis() && _activeText[i].duration != -1) {
-
- char *srcStr = seq_preprocessString(_sequenceStrings[_activeText[i].strIndex], _activeText[i].width);
- int yPos = _activeText[i].y;
-
- while (*srcStr) {
- uint32 linePos = 0;
- for (; *srcStr; linePos++) {
- if (*srcStr == 0x0d) // Carriage return
- break;
- outputStr[linePos] = *srcStr;
- srcStr++;
- }
- outputStr[linePos] = 0;
- if (*srcStr == 0x0d)
- srcStr++;
-
- uint8 textColor = (_activeText[i].textcolor >= 0) ? _activeText[i].textcolor : _seqTextColor[0];
- _screen->printText(outputStr, _activeText[i].x - (_screen->getTextWidth(outputStr) / 2), yPos, textColor, 0);
- yPos += 10;
- }
- } else {
- _activeText[i].duration = -1;
- }
- }
-
- _screen->setCurPage(curPage);
-}
-
-char *KyraEngine_HoF::seq_preprocessString(const char *srcStr, int width) {
- char *dstStr = _seqProcessedString;
- int lineStart = 0;
- int linePos = 0;
-
- while (*srcStr) {
- while (*srcStr && *srcStr != 0x20) // Space
- dstStr[lineStart + linePos++] = *srcStr++;
- dstStr[lineStart + linePos] = 0;
-
- int len = _screen->getTextWidth(&dstStr[lineStart]);
- if (width >= len && *srcStr) {
- dstStr[lineStart + linePos++] = *srcStr++;
- } else {
- dstStr[lineStart + linePos] = 0x0d; // Carriage return
- lineStart += linePos + 1;
- linePos = 0;
- if (*srcStr)
- srcStr++;
- }
- }
- dstStr[lineStart + linePos] = 0;
-
- return strlen(_seqProcessedString) ? dstStr : 0;
-}
-
-void KyraEngine_HoF::seq_sequenceCommand(int command) {
- for (int i = 0; i < 8; i++)
- seq_resetActiveWSA(i);
-
- switch (command) {
- case 0:
- _screen->fadeToBlack(36);
- _screen->getPalette(0).clear();
- _screen->getPalette(1).clear();
- break;
-
- case 1:
- seq_playTalkText(_rnd.getRandomBit());
-
- _screen->getPalette(0).fill(0, 256, 0x3F);
- _screen->fadePalette(_screen->getPalette(0), 16);
-
- _screen->copyPalette(1, 0);
- break;
-
- case 3:
- _screen->copyPage(2, 0);
- _screen->fadePalette(_screen->getPalette(0), 16);
- _screen->copyPalette(1, 0);
- break;
-
- case 4:
- _screen->copyPage(2, 0);
- _screen->fadePalette(_screen->getPalette(0), 36);
- _screen->copyPalette(1, 0);
- break;
-
- case 5:
- _screen->copyPage(2, 0);
- break;
-
- case 6:
- // UNUSED
- // seq_loadBLD("library.bld");
- break;
-
- case 7:
- // UNUSED
- // seq_loadBLD("marco.bld");
- break;
-
- case 8:
- _screen->fadeToBlack(16);
- _screen->getPalette(0).clear();
- _screen->getPalette(1).clear();
-
- delay(120 * _tickLength);
- break;
-
- case 9: {
- Palette &pal = _screen->getPalette(0);
- for (int i = 0; i < 256; i++) {
- int pv = (pal[3 * i] + pal[3 * i + 1] + pal[3 * i + 2]) / 3;
- pal[3 * i] = pal[3 * i + 1] = pal[3 * i + 2] = pv & 0xff;
- }
-
- //int a = 0x100;
- //int d = (0x800 << 5) - 0x100;
- //pal[3 * i] = pal[3 * i + 1] = pal[3 * i + 2] = 0x3f;
-
- _screen->fadePalette(pal, 64);
- _screen->copyPalette(1, 0);
- } break;
-
- default:
- break;
- }
-}
-
-void KyraEngine_HoF::seq_cmpFadeFrame(const char *cmpFile) {
- _screen->copyPage(10, 2);
- _screen->copyPage(4, 10);
- _screen->clearPage(6);
- _screen->loadBitmap(cmpFile, 6, 6, 0);
- _screen->copyPage(12, 4);
-
- for (int i = 0; i < 3; i++) {
- uint32 endtime = _system->getMillis() + 4 * _tickLength;
- _screen->cmpFadeFrameStep(4, 320, 200, 0, 0, 2, 320, 200, 0, 0, 320, 200, 6);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
- _screen->updateScreen();
- delayUntil(endtime);
- }
-
- _screen->copyPage(4, 0);
- _screen->updateScreen();
- _screen->copyPage(4, 2);
- _screen->copyPage(4, 6);
- _screen->copyPage(10, 4);
-}
-
-void KyraEngine_HoF::seq_playTalkText(uint8 chatNum) {
- assert(chatNum < _sequenceSoundListSize);
-
- if (chatNum < 12 && !_flags.isDemo && textEnabled())
- seq_setTextEntry(chatNum, 160, 168, _sequenceStringsDuration[chatNum], 160);
-
- _sound->voicePlay(_sequenceSoundList[chatNum], &_speechHandle);
-}
-
-void KyraEngine_HoF::seq_waitForTextsTimeout() {
- uint32 longest = seq_activeTextsTimeLeft() + _system->getMillis();
- uint32 now = _system->getMillis();
-
- if (textEnabled()) {
- if (longest > now)
- delay(longest - now);
- } else if (speechEnabled()) {
- while (snd_voiceIsPlaying())
- delay(_tickLength);
- }
-
- seq_resetAllTextEntries();
-}
-
-void KyraEngine_HoF::seq_resetAllTextEntries() {
- for (int i = 0; i < 10; i++)
- _activeText[i].duration = -1;
-}
-
-int KyraEngine_HoF::seq_setTextEntry(uint16 strIndex, uint16 posX, uint16 posY, int duration, uint16 width) {
- for (int i = 0; i < 10; i++) {
- if (_activeText[i].duration != -1) {
- if (i < 9)
- continue;
- else
- return -1;
- }
-
- _activeText[i].strIndex = strIndex;
- _activeText[i].x = posX;
- _activeText[i].y = posY;
- _activeText[i].duration = duration * _tickLength;
- _activeText[i].width = width;
- _activeText[i].startTime = _system->getMillis();
- _activeText[i].textcolor = -1;
-
- return i;
- }
- return -1;
-}
-
-void KyraEngine_HoF::seq_loadNestedSequence(int wsaNum, int seqNum) {
- if (_activeWSA[wsaNum].flags != -1)
- return;
-
- NestedSequence s = _sequences->seqn[seqNum];
-
- if (!_activeWSA[wsaNum].movie) {
- _activeWSA[wsaNum].movie = new WSAMovie_v2(this);
- assert(_activeWSA[wsaNum].movie);
- }
-
- _activeWSA[wsaNum].movie->close();
-
- _activeWSA[wsaNum].movie->open(s.wsaFile, 0, 0);
-
- if (!_activeWSA[wsaNum].movie->opened()) {
- delete _activeWSA[wsaNum].movie;
- _activeWSA[wsaNum].movie = 0;
- return;
- }
-
- _activeWSA[wsaNum].endFrame = s.endFrame;
- _activeWSA[wsaNum].startFrame = _activeWSA[wsaNum].currentFrame = s.startframe;
- _activeWSA[wsaNum].frameDelay = s.frameDelay;
- _activeWSA[wsaNum].callback = _callbackN[seqNum];
- _activeWSA[wsaNum].control = s.wsaControl;
-
- _activeWSA[wsaNum].flags = s.flags | 1;
- _activeWSA[wsaNum].x = s.x;
- _activeWSA[wsaNum].y = s.y;
- _activeWSA[wsaNum].startupCommand = s.startupCommand;
- _activeWSA[wsaNum].finalCommand = s.finalCommand;
- _activeWSA[wsaNum].lastFrame = 0xffff;
-
- seq_nestedSequenceFrame(s.startupCommand, wsaNum);
-
- if (!s.startupCommand)
- seq_processNextSubFrame(wsaNum);
-
- _activeWSA[wsaNum].nextFrame = _system->getMillis();
-}
-
-void KyraEngine_HoF::seq_nestedSequenceFrame(int command, int wsaNum) {
- int xa = 0, ya = 0;
- command--;
- if (!_activeWSA[wsaNum].movie || skipFlag() || shouldQuit() || _abortIntroFlag)
- return;
-
- switch (command) {
- case 0:
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 1, 2);
- break;
-
- case 1:
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 1, 1);
- break;
-
- case 2:
- seq_waitForTextsTimeout();
- xa = -_activeWSA[wsaNum].movie->xAdd();
- ya = -_activeWSA[wsaNum].movie->yAdd();
- _activeWSA[wsaNum].movie->displayFrame(0x15, 8, xa, ya, 0, 0, 0);
- seq_animatedSubFrame(8, 2, 7, 8, _activeWSA[wsaNum].movie->xAdd(), _activeWSA[wsaNum].movie->yAdd(),
- _activeWSA[wsaNum].movie->width(), _activeWSA[wsaNum].movie->height(), 0, 2);
- break;
-
- case 3:
- _screen->copyPage(2, 10);
- _activeWSA[wsaNum].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
- _screen->copyPage(2, 12);
- seq_cmpFadeFrame("scene2.cmp");
- break;
-
- case 4:
- _screen->copyPage(2, 10);
- _activeWSA[wsaNum].movie->displayFrame(0, 2, 0, 0, 0, 0, 0);
- _screen->copyPage(2, 12);
- seq_cmpFadeFrame("scene3.cmp");
- break;
-
- default:
- break;
- }
-}
-
-void KyraEngine_HoF::seq_animatedSubFrame(int srcPage, int dstPage, int delaytime, int steps,
- int x, int y, int w, int h, int openClose, int directionFlags) {
- if (openClose) {
- for (int i = 1; i < steps; i++) {
- uint32 endtime = _system->getMillis() + delaytime * _tickLength;
-
- int w2 = (((w * 256) / steps) * i) / 256;
- int h2 = (((h * 256) / steps) * i) / 256;
-
- int ym = (directionFlags & 2) ? (h - h2) : 0;
- int xm = (directionFlags & 1) ? (w - w2) : 0;
-
- _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
-
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
-
- _screen->copyPage(12, dstPage);
- delayUntil(endtime);
- }
-
- _screen->wsaFrameAnimationStep(0, 0, x, y, w, h, w, h, srcPage, dstPage, 0);
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
- } else {
- _screen->copyPage(12, dstPage);
- for (int i = steps; i; i--) {
- uint32 endtime = _system->getMillis() + delaytime * _tickLength;
-
- int w2 = (((w * 256) / steps) * i) / 256;
- int h2 = (((h * 256) / steps) * i) / 256;
+#undef CASE_ALT
- int ym = (directionFlags & 2) ? (h - h2) : 0;
- int xm = (directionFlags & 1) ? (w - w2) : 0;
-
- _screen->wsaFrameAnimationStep(0, 0, x + xm, y + ym, w, h, w2, h2, srcPage, dstPage, 0);
-
- _screen->copyPage(dstPage, 6);
- _screen->copyPage(dstPage, 0);
- _screen->updateScreen();
-
- _screen->copyPage(12, dstPage);
- delayUntil(endtime);
- }
- }
-}
-
-void KyraEngine_HoF::seq_resetActiveWSA(int wsaNum) {
- if (_activeWSA[wsaNum].flags == -1)
- return;
-
- _activeWSA[wsaNum].flags = -1;
- seq_nestedSequenceFrame(_activeWSA[wsaNum].finalCommand, wsaNum);
- _activeWSA[wsaNum].movie->close();
-}
-
-void KyraEngine_HoF::seq_unloadWSA(int wsaNum) {
- if (_activeWSA[wsaNum].movie) {
- _activeWSA[wsaNum].movie->close();
- delete _activeWSA[wsaNum].movie;
- _activeWSA[wsaNum].movie = 0;
- }
-}
-
-bool KyraEngine_HoF::seq_processNextSubFrame(int wsaNum) {
- uint32 currentFrame = _activeWSA[wsaNum].currentFrame;
- uint32 currentTime = _system->getMillis();
-
- if (_activeWSA[wsaNum].callback && currentFrame != _activeWSA[wsaNum].lastFrame) {
- _activeWSA[wsaNum].lastFrame = currentFrame;
- currentFrame = (this->*_activeWSA[wsaNum].callback)(_activeWSA[wsaNum].movie, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, currentFrame);
- }
-
- if (_activeWSA[wsaNum].movie) {
- if (_activeWSA[wsaNum].flags & 0x20) {
- _activeWSA[wsaNum].movie->displayFrame(_activeWSA[wsaNum].control[currentFrame].index, 2, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, 0x4000, 0, 0);
- _activeWSA[wsaNum].frameDelay = _activeWSA[wsaNum].control[currentFrame].delay;
- } else {
- _activeWSA[wsaNum].movie->displayFrame(currentFrame % _activeWSA[wsaNum].movie->frames(), 2, _activeWSA[wsaNum].x, _activeWSA[wsaNum].y, 0x4000, 0, 0);
- }
- }
-
- if (_activeWSA[wsaNum].flags & 0x10) {
- currentFrame = (currentTime - _activeWSA[wsaNum].nextFrame) / (_activeWSA[wsaNum].frameDelay * _tickLength);
- } else {
- if (((int32)(currentTime - _activeWSA[wsaNum].nextFrame) / (int32)(_activeWSA[wsaNum].frameDelay * _tickLength)) > 0) {
- currentFrame++;
- _activeWSA[wsaNum].nextFrame = currentTime;
- }
- }
-
- bool res = false;
-
- if (currentFrame >= _activeWSA[wsaNum].endFrame) {
- int sw = ((_activeWSA[wsaNum].flags & 0x1e) - 2);
- switch (sw) {
- case 0:
- res = true;
- currentFrame = _activeWSA[wsaNum].endFrame;
- _screen->copyPage(2, 12);
- break;
-
- case 6:
- case 8:
- currentFrame = _activeWSA[wsaNum].endFrame - 1;
- break;
-
- case 2:
- case 10:
- currentFrame = _activeWSA[wsaNum].startFrame;
- break;
-
- default:
- currentFrame = _activeWSA[wsaNum].endFrame - 1;
- res = true;
- }
- }
-
- _activeWSA[wsaNum].currentFrame = currentFrame & 0xffff;
- return res;
-}
-
-void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor) {
- uint8 colormap[16];
- if (skipFlag() || shouldQuit() || _abortIntroFlag || _menuChoice)
- return;
-
- Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
-
- memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
- _screen->getPalette(0)[0x2f6] = 0x3f;
- _screen->getPalette(0)[0x2f5] = 0x20;
- _screen->getPalette(0)[0x2f4] = 0x30;
- colormap[0] = colorMap[0];
- colormap[1] = 0xfd;
- memcpy(&colormap[2], &colorMap[2], 14);
- uint8 seqTextColor0 = _seqTextColor[0];
-
- _seqTextColor[0] = 0xfd;
- _screen->setTextColorMap(colormap);
- seq_resetAllTextEntries();
- seq_setTextEntry(strIndex, x, y, 0x80, 0x78);
- seq_processText();
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->getPalette(0)[0x2f7] = _screen->getPalette(0)[textcolor * 3];
- _screen->getPalette(0)[0x2f8] = _screen->getPalette(0)[textcolor * 3 + 1];
- _screen->getPalette(0)[0x2f9] = _screen->getPalette(0)[textcolor * 3 + 2];
- _screen->fadePalette(_screen->getPalette(0), 0x18);
-
- _seqTextColor[0] = textcolor;
- _screen->setTextColorMap(colorMap);
- seq_resetAllTextEntries();
- seq_setTextEntry(strIndex, x, y, 0x80, 0x78);
- seq_processText();
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- _screen->getPalette(0)[0x2f7] = _screen->getPalette(0)[0x2f8] = _screen->getPalette(0)[0x2f9] = 0;
- _screen->fadePalette(_screen->getPalette(0), 1);
- _screen->copyPage(2, 12);
- seq_resetAllTextEntries();
-
- _seqTextColor[0] = seqTextColor0;
-
- _screen->setFont(of);
-}
-
-void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, WSAMovie_v2 *wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos) {
- int dur = int(strlen(_sequenceStrings[strIndex])) * (_flags.isTalkie ? 7 : 15);
- if (textEnabled()) {
- int entry = seq_setTextEntry(strIndex, x, y, dur, width);
- _activeText[entry].textcolor = textColor;
- }
- _seqWsaChatTimeout = _system->getMillis() + dur * _tickLength;
- int curframe = firstframe;
-
- if (vocIndex && speechEnabled()) {
- while (_sound->voiceIsPlaying() && !skipFlag())
- delay(4);
- seq_playTalkText(vocIndex);
- }
-
- while (_system->getMillis() < _seqWsaChatTimeout && !(_abortIntroFlag || skipFlag())) {
- if (lastframe < 0) {
- int t = ABS(lastframe);
- if (t < curframe)
- curframe = t;
- }
-
- if (ABS(lastframe) < curframe)
- curframe = firstframe;
-
- _seqWsaChatFrameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength;
- if (wsa)
- wsa->displayFrame(curframe % wsa->frames(), 2, wsaXpos, wsaYpos, 0, 0, 0);
-
- _screen->copyPage(2, 12);
-
- seq_processText();
-
- uint32 tm = _system->getMillis();
- if (_seqWsaChatFrameTimeout > tm && _seqWsaChatTimeout > tm)
- delay(MIN(_seqWsaChatFrameTimeout - tm, _seqWsaChatTimeout - tm));
-
- if (speechEnabled() && !textEnabled() && !snd_voiceIsPlaying())
- break;
-
- _screen->copyPage(2, 0);
- _screen->updateScreen();
- curframe++;
- }
-
- if (_abortIntroFlag || skipFlag())
- _sound->voiceStop();
-
- if (ABS(lastframe) < curframe)
- curframe = ABS(lastframe);
-
- if (curframe == firstframe)
- curframe++;
-
- _seqWsaCurrentFrame = curframe;
-}
-
-void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed,
- int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData, const char *const *specialData) {
- if (!data)
- return;
-
- static const char mark[] = { 5, 13, 0 };
-
- _screen->clearPage(tempPage1);
- _screen->clearPage(tempPage2);
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
-
- struct ScrollTextData {
- int16 x;
- int16 y;
- uint8 *text;
- byte unk1;
- byte height;
- byte adjust;
-
- ScrollTextData() {
- x = 0; // 0 11
- y = 0; // 2 13
- text = 0; // 4 15
- unk1 = 0; // 8 19
- height = 0; // 9 20
- adjust = 0; // 10 21
- }
- };
-
- ScrollTextData *textData = new ScrollTextData[36];
- uint8 *ptr = data;
-
- bool loop = true;
- int cnt = 0;
-
- while (loop) {
- _seqSubFrameEndTimeInternal = _system->getMillis() + speed * _tickLength;
-
- while (cnt < 35 && *ptr) {
- uint16 cH;
-
- if (cnt)
- cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3);
- else
- cH = d->h;
-
- char *str = (char *)ptr;
-
- ptr = (uint8 *)strpbrk(str, mark);
- if (!ptr)
- ptr = (uint8 *)strchr(str, 0);
-
- textData[cnt + 1].unk1 = *ptr;
- *ptr = 0;
- if (textData[cnt + 1].unk1)
- ptr++;
-
- if (*str == 3 || *str == 4)
- textData[cnt + 1].adjust = *str++;
- else
- textData[cnt + 1].adjust = 0;
-
- _screen->setFont(fid1);
-
- if (*str == 1) {
- _screen->setFont(fid2);
- str++;
- } else if (*str == 2) {
- str++;
- }
-
- textData[cnt + 1].height = _screen->getFontHeight();
-
- switch (textData[cnt + 1].adjust) {
- case 3:
- textData[cnt + 1].x = 157 - _screen->getTextWidth(str);
- break;
- case 4:
- textData[cnt + 1].x = 161;
- break;
- default:
- textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1;
- }
-
- if (textData[cnt].unk1 == 5)
- cH -= (textData[cnt].height + (textData[cnt].height >> 3));
-
- textData[cnt + 1].y = cH;
- textData[cnt + 1].text = (uint8 *)str;
- cnt++;
- }
-
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage1, tempPage2);
-
- int cnt2 = 0;
- bool palCycle = 0;
-
- while (cnt2 < cnt) {
- const char *str = (const char *)textData[cnt2 + 1].text;
- const char *str2 = str;
- int16 cW = textData[cnt2 + 1].x - 10;
- int16 cH = textData[cnt2 + 1].y;
- int x = (d->sx << 3) + cW;
- int y = d->sy + cH;
- int col1 = 255;
-
- if (cH < d->h) {
- _screen->setCurPage(tempPage2);
- _screen->setFont(fid1);
- if (textData[cnt2 + 1].height != _screen->getFontHeight())
- _screen->setFont(fid2);
-
- if (specialData) {
- if (!strcmp(str, specialData[0])) {
- col1 = 112;
- char cChar[2] = " ";
- while (*str2) {
- cChar[0] = *str2;
- _screen->printText(cChar, x, y, col1++, 0);
- x += _screen->getCharWidth((uint8)*str2++);
- }
- palCycle = true;
- } else if (!strcmp(str, specialData[1])) {
- col1 = 133;
- char cChar[2] = " ";
- while (*str2) {
- cChar[0] = *str2;
- _screen->printText(cChar, x, y, col1--, 0);
- x += _screen->getCharWidth((uint8)*str2++);
- }
- palCycle = true;
- } else {
- _screen->printText(str, x, y, col1, 0);
- }
- } else {
- _screen->printText(str, x, y, col1, 0);
- }
- _screen->setCurPage(0);
- }
-
- textData[cnt2 + 1].y -= step;
- cnt2++;
- }
-
- _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0);
- _screen->updateScreen();
-
- if (textData[1].y < -10) {
- textData[1].text += strlen((char *)textData[1].text);
- textData[1].text[0] = textData[1].unk1;
- cnt--;
- memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
- }
-
- if (palCycle) {
- for (int col = 133; col > 112; col--)
- _screen->getPalette(0).copy(_screen->getPalette(0), col - 1, 1, col);
- _screen->getPalette(0).copy(_screen->getPalette(0), 133, 1, 112);
- _screen->setScreenPalette(_screen->getPalette(0));
- }
-
- delayUntil(_seqSubFrameEndTimeInternal);
-
- if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !skipFlag()) {
- resetSkipFlag();
- delay(_tickLength * 500);
- cnt = 0;
- }
-
- if (!cnt || skipFlag())
- loop = false;
- }
-
- _sound->beginFadeOut();
- _screen->fadeToBlack();
-
- _abortIntroFlag= false;
- resetSkipFlag();
-
- delete[] textData;
-}
-
-void KyraEngine_HoF::seq_scrollPage(int bottom, int top) {
- int dstY, dstH, srcH;
-
- static const ScreenDim d = { 0x00, 0x00, 0x28, 0x320, 0xFF, 0xFE, 0x00, 0x00 };
-
- if (_seqScrollTextCounter - (top - 1) < 0) {
- dstY = top - _seqScrollTextCounter;
- dstH = _seqScrollTextCounter;
- srcH = 0;
- } else {
- dstY = 0;
- srcH = _seqScrollTextCounter - top;
- dstH = (400 - srcH <= top) ? 400 - srcH : top;
- }
-
- if (dstH > 0) {
- if (_demoAnimData) {
- for (int i = 0; i < 4; i++) {
- const ItemAnimData_v1 *def = &_demoAnimData[i];
- ActiveItemAnim *a = &_activeItemAnim[i];
-
- _screen->fillRect(12, def->y - 8, 28, def->y + 8, 0, 4);
- _screen->drawShape(4, getShapePtr(def->itemIndex + def->frames[a->currentFrame]), 12, def->y - 8, 0, 0);
- if (_seqFrameCounter % 2 == 0)
- a->currentFrame = (a->currentFrame + 1) % 20;
- }
- }
- _screen->copyRegionEx(4, 0, srcH, 2, 2, dstY + bottom, 320, dstH, &d);
- }
-}
+const uint8 SeqPlayer_HOF::_textColorPresets[] = { 0x01, 0x01, 0x00, 0x3F, 0x3F, 0x3F };
void KyraEngine_HoF::seq_showStarcraftLogo() {
WSAMovie_v2 *ci = new WSAMovie_v2(this);
assert(ci);
_screen->clearPage(2);
_res->loadPakFile("INTROGEN.PAK");
- int endframe = ci->open("ci.wsa", 0, &_screen->getPalette(0));
+ int endframe = ci->open("CI.WSA", 0, &_screen->getPalette(0));
_res->unloadPakFile("INTROGEN.PAK");
if (!ci->opened()) {
delete ci;
@@ -2736,20 +3346,28 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
_screen->copyPage(2, 0);
_screen->fadeFromBlack();
for (int i = 1; i < endframe; i++) {
- _seqEndTime = _system->getMillis() + 50;
+ uint32 end = _system->getMillis() + 50;
if (skipFlag())
break;
ci->displayFrame(i, 2, 0, 0, 0, 0, 0);
_screen->copyPage(2, 0);
_screen->updateScreen();
- delay(_seqEndTime - _system->getMillis());
+ uint32 cur = _system->getMillis();
+ if (end > cur)
+ delay(end - cur);
+ else
+ updateInput();
}
if (!skipFlag()) {
- _seqEndTime = _system->getMillis() + 50;
+ uint32 end = _system->getMillis() + 50;
ci->displayFrame(0, 2, 0, 0, 0, 0, 0);
_screen->copyPage(2, 0);
_screen->updateScreen();
- delay(_seqEndTime - _system->getMillis());
+ uint32 cur = _system->getMillis();
+ if (end > cur)
+ delay(end - cur);
+ else
+ updateInput();
}
_screen->fadeToBlack();
_screen->showMouse();
@@ -2758,67 +3376,38 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
delete ci;
}
-void KyraEngine_HoF::seq_init() {
- _seqProcessedString = new char[200];
- _seqWsa = new WSAMovie_v2(this);
- _activeWSA = new ActiveWSA[8];
- _activeText = new ActiveText[10];
-
- _res->unloadAllPakFiles();
- _res->loadPakFile(StaticResource::staticDataFilename());
- _res->loadFileList(_sequencePakList, _sequencePakListSize);
-
- if (_flags.platform == Common::kPlatformPC98)
- _sound->loadSoundFile("SOUND.DAT");
-
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_GOLDFONT_FNT);
-
- if (_flags.gameID == GI_LOL)
- return;
-
- if (_flags.isDemo && !_flags.isTalkie) {
- _demoAnimData = _staticres->loadShapeAnimData_v1(k2SeqplayShapeAnimData, _itemAnimDefinitionSize);
- uint8 *shp = _res->fileData("icons.shp", 0);
- uint32 outsize = READ_LE_UINT16(shp + 4);
- _animShapeFiledata = new uint8[outsize];
- Screen::decodeFrame4(shp + 10, _animShapeFiledata, outsize);
- delete[] shp;
-
- for (int i = 0; i < 20; i++)
- addShapeToPool(_screen->getPtrToShape(_animShapeFiledata, i), i);
- } else {
- const MainMenu::StaticData data = {
- { _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
- { 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
- { 0xd8, 0xda, 0xd9, 0xd8 },
- (_flags.lang == Common::JA_JPN) ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT, 240
- };
-
- _menu = new MainMenu(this);
- _menu->init(data, MainMenu::Animation());
- }
+int KyraEngine_HoF::seq_playIntro() {
+ bool startupSaveLoadable = saveFileLoadable(0);
+ return SeqPlayer_HOF(this, _screen, _system, startupSaveLoadable).play(kSequenceVirgin, startupSaveLoadable? kSequenceTitle : kSequenceNoLooping);
}
-void KyraEngine_HoF::seq_uninit() {
- delete[] _seqProcessedString;
- _seqProcessedString = NULL;
-
- delete[] _activeWSA;
- _activeWSA = NULL;
+int KyraEngine_HoF::seq_playOutro() {
+ return SeqPlayer_HOF(this, _screen, _system).play(kSequenceFunters, kSequenceFrash);
+}
- delete[] _activeText;
- _activeText = NULL;
+int KyraEngine_HoF::seq_playDemo() {
+ SeqPlayer_HOF(this, _screen, _system).play(kSequenceHoFDemoVirgin, kSequenceHoFDemoVirgin);
+ return 4;
+}
- delete _seqWsa;
- _seqWsa = NULL;
+void KyraEngine_HoF::seq_pausePlayer(bool toggle) {
+ SeqPlayer_HOF *activePlayer = SeqPlayer_HOF::instance();
+ if (activePlayer)
+ activePlayer->pause(toggle);
+}
- delete[] _animShapeFiledata;
- _animShapeFiledata = 0;
+#ifdef ENABLE_LOL
+int LoLEngine::playDemo() {
+ SeqPlayer_HOF(this, _screen, _system).play(kSequenceLoLDemoScene1, kSequenceLoLDemoScene1);
+ return -1;
+}
- delete _menu;
- _menu = 0;
- _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_8_FNT);
+void LoLEngine::pauseDemoPlayer(bool toggle) {
+ SeqPlayer_HOF *activePlayer = SeqPlayer_HOF::instance();
+ if (activePlayer)
+ activePlayer->pause(toggle);
}
+#endif // ENABLE_LOL
#pragma mark -
#pragma mark - Ingame sequences
diff --git a/engines/kyra/sequences_hof.h b/engines/kyra/sequences_hof.h
new file mode 100644
index 0000000000..2558a68a6a
--- /dev/null
+++ b/engines/kyra/sequences_hof.h
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef KYRA_SEQUENCES_HOF_H
+#define KYRA_SEQUENCES_HOF_H
+
+#include "kyra/kyra_v2.h"
+
+namespace Kyra {
+
+struct HoFSequence {
+ const char *wsaFile;
+ const char *cpsFile;
+ uint16 flags;
+ uint8 fadeInTransitionType;
+ uint8 fadeOutTransitionType;
+ int16 stringIndex1;
+ int16 stringIndex2;
+ uint16 startFrame;
+ uint16 numFrames;
+ uint16 duration;
+ uint16 xPos;
+ uint16 yPos;
+ uint16 timeout;
+};
+
+struct HoFNestedSequence {
+ const char *wsaFile;
+ const FrameControl *wsaControl;
+ uint16 flags;
+ uint16 startframe;
+ uint16 endFrame;
+ uint16 frameDelay;
+ uint16 x;
+ uint16 y;
+ uint16 fadeInTransitionType;
+ uint16 fadeOutTransitionType;
+};
+
+struct HoFSeqData {
+ const HoFSequence *seq;
+ int numSeq;
+ const HoFNestedSequence *nestedSeq;
+ int numNestedSeq;
+};
+
+struct HoFSeqItemAnimData {
+ int16 itemIndex;
+ uint16 y;
+ const uint16 *frames;
+};
+
+} // End of namespace Kyra
+
+#endif
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index e63d0a7d8f..2a2f9a5493 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -250,7 +250,7 @@ bool KyraEngine_LoK::seq_introStory() {
if (!textEnabled() && speechEnabled() && _flags.lang != Common::IT_ITA)
return false;
- if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformPC) || _flags.platform == Common::kPlatformAmiga)
+ if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformDOS) || _flags.platform == Common::kPlatformAmiga)
_screen->loadBitmap("TEXT.CPS", 3, 3, &_screen->getPalette(0));
else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN)
_screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
@@ -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 a06f2077ba..c8f97eb770 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -36,10 +36,16 @@ namespace Kyra {
#pragma mark - Intro
int LoLEngine::processPrologue() {
- setupPrologueData(true);
-
- if (!saveFileLoadable(0) || _flags.isDemo)
- showIntro();
+ // There are two non-interactive demos (one which plays the intro and another one) which plays a number of specific scenes.
+ // We try to identify the latter one by looking for a specific file.
+ _res->loadPakFile("GENERAL.PAK");
+ if (_flags.isDemo && _res->exists("scene1.cps")) {
+ return playDemo();
+ } else {
+ setupPrologueData(true);
+ if (!saveFileLoadable(0) || _flags.isDemo)
+ showIntro();
+ }
if (_flags.isDemo) {
_screen->fadePalette(_screen->getPalette(1), 30, 0);
@@ -66,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();
@@ -139,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) {
@@ -176,7 +187,7 @@ void LoLEngine::setupPrologueData(bool load) {
memset(_selectionAnimTimers, 0, sizeof(_selectionAnimTimers));
_screen->getPalette(1).clear();
- _sound->setSoundList(&_soundData[kMusicIntro]);
+ _sound->selectAudioResourceSet(kMusicIntro);
// We have three sound.dat files, one for the intro, one for the
// end sequence and one for ingame, each contained in a different
@@ -197,7 +208,7 @@ void LoLEngine::setupPrologueData(bool load) {
return;
_eventList.clear();
- _sound->setSoundList(0);
+ _sound->selectAudioResourceSet(kMusicIntro);
}
}
@@ -219,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");
@@ -289,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);
@@ -304,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) {
@@ -318,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]);
@@ -710,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);
@@ -722,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);
}
}
@@ -1009,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];
@@ -1035,7 +1050,7 @@ void LoLEngine::setupEpilogueData(bool load) {
_screen->clearPage(3);
if (load) {
- _sound->setSoundList(&_soundData[kMusicFinale]);
+ _sound->selectAudioResourceSet(kMusicFinale);
// We have three sound.dat files, one for the intro, one for the
// end sequence and one for ingame, each contained in a different
@@ -1051,7 +1066,7 @@ void LoLEngine::setupEpilogueData(bool load) {
return;
_eventList.clear();
- _sound->setSoundList(0);
+ _sound->selectAudioResourceSet(kMusicIntro);
}
}
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 73c20ee6df..cb6faf2580 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -37,7 +37,7 @@ namespace Kyra {
Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: _vm(vm), _mixer(mixer), _soundChannels(), _musicEnabled(1),
- _sfxEnabled(true), _soundDataList(0) {
+ _sfxEnabled(true) {
}
Sound::~Sound() {
@@ -47,14 +47,6 @@ Sound::kType Sound::getSfxType() const {
return getMusicType();
}
-void Sound::setSoundList(const AudioDataStruct *list) {
- _soundDataList = list;
-}
-
-bool Sound::hasSoundFile(uint file) const {
- return (fileListEntry(file) != 0);
-}
-
bool Sound::isPlaying() const {
return false;
}
@@ -73,7 +65,7 @@ bool Sound::isVoicePresent(const char *file) const {
return false;
}
-int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
+int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) {
Audio::SeekableAudioStream *audioStream = getVoiceStream(file);
if (!audioStream) {
@@ -81,7 +73,7 @@ int32 Sound::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volum
}
int playTime = audioStream->getLength().msecs();
- playVoiceStream(audioStream, handle, volume, isSfx);
+ playVoiceStream(audioStream, handle, volume, priority, isSfx);
return playTime;
}
@@ -109,12 +101,20 @@ Audio::SeekableAudioStream *Sound::getVoiceStream(const char *file) const {
}
}
-bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle, uint8 volume, bool isSfx) {
+bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool isSfx) {
int h = 0;
- while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h]))
+ while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h].handle))
++h;
if (h >= kNumChannelHandles) {
+ h = 0;
+ while (h < kNumChannelHandles && _soundChannels[h].priority > priority)
+ ++h;
+ if (h < kNumChannelHandles)
+ voiceStop(&_soundChannels[h].handle);
+ }
+
+ if (h >= kNumChannelHandles) {
// When we run out of handles we need to destroy the stream object,
// this is to avoid memory leaks in some scenes where too many sfx
// are started.
@@ -123,9 +123,10 @@ bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *hand
return false;
}
- _mixer->playStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h], stream, -1, volume);
+ _mixer->playStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].handle, stream, -1, volume);
+ _soundChannels[h].priority = priority;
if (handle)
- *handle = _soundChannels[h];
+ *handle = _soundChannels[h].handle;
return true;
}
@@ -133,8 +134,8 @@ bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *hand
void Sound::voiceStop(const Audio::SoundHandle *handle) {
if (!handle) {
for (int h = 0; h < kNumChannelHandles; ++h) {
- if (_mixer->isSoundHandleActive(_soundChannels[h]))
- _mixer->stopHandle(_soundChannels[h]);
+ if (_mixer->isSoundHandleActive(_soundChannels[h].handle))
+ _mixer->stopHandle(_soundChannels[h].handle);
}
} else {
_mixer->stopHandle(*handle);
@@ -144,7 +145,7 @@ void Sound::voiceStop(const Audio::SoundHandle *handle) {
bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) const {
if (!handle) {
for (int h = 0; h < kNumChannelHandles; ++h) {
- if (_mixer->isSoundHandleActive(_soundChannels[h]))
+ if (_mixer->isSoundHandleActive(_soundChannels[h].handle))
return true;
}
} else {
@@ -156,7 +157,7 @@ bool Sound::voiceIsPlaying(const Audio::SoundHandle *handle) const {
bool Sound::allVoiceChannelsPlaying() const {
for (int i = 0; i < kNumChannelHandles; ++i)
- if (!_mixer->isSoundHandleActive(_soundChannels[i]))
+ if (!_mixer->isSoundHandleActive(_soundChannels[i].handle))
return false;
return true;
}
@@ -194,9 +195,14 @@ void MixedSoundDriver::updateVolumeSettings() {
_sfx->updateVolumeSettings();
}
-void MixedSoundDriver::setSoundList(const AudioDataStruct *list) {
- _music->setSoundList(list);
- _sfx->setSoundList(list);
+void MixedSoundDriver::initAudioResourceInfo(int set, void *info) {
+ _music->initAudioResourceInfo(set, info);
+ _sfx->initAudioResourceInfo(set, info);
+}
+
+void MixedSoundDriver::selectAudioResourceSet(int set) {
+ _music->selectAudioResourceSet(set);
+ _sfx->selectAudioResourceSet(set);
}
bool MixedSoundDriver::hasSoundFile(uint file) const {
@@ -282,7 +288,7 @@ void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) {
// XXX
//}
- if (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformMacintosh) {
+ if (_flags.platform == Common::kPlatformDOS || _flags.platform == Common::kPlatformMacintosh) {
assert(command*2+1 < _trackMapSize);
if (_curMusicTheme != _trackMap[command*2]) {
if (_trackMap[command*2] != -1 && _trackMap[command*2] != -2)
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 63cec48d00..2f5a0b6121 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -37,6 +37,35 @@ class SeekableAudioStream;
namespace Kyra {
+// Helper structs to format the data passed to the various initAudioResourceInfo() implementations
+struct SoundResourceInfo_PC {
+ SoundResourceInfo_PC(const char *const *files, int numFiles) : fileList(files), fileListSize(numFiles) {}
+ const char *const *fileList;
+ uint fileListSize;
+};
+
+struct SoundResourceInfo_Towns {
+ SoundResourceInfo_Towns(const char *const *files, int numFiles, const int32 *cdaTbl, int cdaTblSize) : fileList(files), fileListSize(numFiles), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
+ const char *const *fileList;
+ uint fileListSize;
+ const int32 *cdaTable;
+ uint cdaTableSize;
+};
+
+struct SoundResourceInfo_PC98 {
+ SoundResourceInfo_PC98(const char *fileNamePattern) : pattern(fileNamePattern) {}
+ const char *pattern;
+};
+
+struct SoundResourceInfo_TownsPC98V2 {
+ SoundResourceInfo_TownsPC98V2(const char *const *files, int numFiles, const char *fileNamePattern, const uint16 *cdaTbl, int cdaTblSize) : fileList(files), fileListSize(numFiles), pattern(fileNamePattern), cdaTable(cdaTbl), cdaTableSize(cdaTblSize) {}
+ const char *const *fileList;
+ uint fileListSize;
+ const char *pattern;
+ const uint16 *cdaTable;
+ uint cdaTableSize;
+};
+
/**
* Analog audio output device API for Kyrandia games.
* It contains functionality to play music tracks,
@@ -78,12 +107,20 @@ public:
virtual void updateVolumeSettings() {}
/**
- * Sets the soundfiles the output device will use
- * when playing a track and/or sound effect.
+ * Assigns static resource data with information on how to load
+ * audio resources to
*
- * @param list soundfile list
+ * @param set value defined in AudioResourceSet enum
+ * info various types of resource info data (file list, file name pattern, struct, etc. - depending on the inheriting driver type)
*/
- virtual void setSoundList(const AudioDataStruct *list);
+ virtual void initAudioResourceInfo(int set, void *info) = 0;
+
+ /**
+ * Select audio resource set.
+ *
+ * @param set value defined in AudioResourceSet enum
+ */
+ virtual void selectAudioResourceSet(int set) = 0;
/**
* Checks if a given sound file is present.
@@ -91,7 +128,7 @@ public:
* @param track track number
* @return true if available, false otherwise
*/
- virtual bool hasSoundFile(uint file) const;
+ virtual bool hasSoundFile(uint file) const = 0;
/**
* Load a specifc sound file for use of
@@ -128,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.
@@ -184,11 +221,11 @@ public:
* @param handle store a copy of the sound handle
* @return playtime of the voice file (-1 marks unknown playtime)
*/
- virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
+ virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false);
Audio::SeekableAudioStream *getVoiceStream(const char *file) const;
- bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false);
+ bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false);
/**
* Checks if a voice is being played.
@@ -228,17 +265,17 @@ public:
*/
virtual void resetTrigger() {}
protected:
- const char *fileListEntry(int file) const { return (_soundDataList != 0 && file >= 0 && file < _soundDataList->fileListLen) ? _soundDataList->fileList[file] : ""; }
- int fileListLen() const { return _soundDataList->fileListLen; }
- const void *cdaData() const { return _soundDataList != 0 ? _soundDataList->cdaTracks : 0; }
- int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->cdaNumTracks : 0; }
- int extraOffset() const { return _soundDataList != 0 ? _soundDataList->extraOffset : 0; }
-
enum {
kNumChannelHandles = 4
};
- Audio::SoundHandle _soundChannels[kNumChannelHandles];
+ struct SoundChannel {
+ SoundChannel() : handle(), priority(0) {}
+ Audio::SoundHandle handle;
+ int priority;
+ };
+
+ SoundChannel _soundChannels[kNumChannelHandles];
int _musicEnabled;
bool _sfxEnabled;
@@ -247,8 +284,6 @@ protected:
Audio::Mixer *_mixer;
private:
- const AudioDataStruct *_soundDataList;
-
struct SpeechCodecs {
const char *fileext;
Audio::SeekableAudioStream *(*streamFunc)(
@@ -272,7 +307,8 @@ public:
virtual void updateVolumeSettings();
- virtual void setSoundList(const AudioDataStruct *list);
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
@@ -283,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();
@@ -293,88 +329,6 @@ private:
Sound *_music, *_sfx;
};
-// Digital Audio
-class AUDStream;
-class KyraAudioStream;
-class KyraEngine_MR;
-
-/**
- * Digital audio output device.
- *
- * This is just used for Kyrandia 3.
- */
-class SoundDigital {
-public:
- SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer);
- ~SoundDigital();
-
- bool init() { return true; }
-
- /**
- * Plays a sound.
- *
- * @param filename file to be played
- * @param priority priority of the sound
- * @param type type
- * @param volume channel volume
- * @param loop true if the sound should loop (endlessly)
- * @param channel tell the sound player to use a specific channel for playback
- *
- * @return channel playing the sound
- */
- int playSound(const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume = 255, bool loop = false, int channel = -1);
-
- /**
- * Checks if a given channel is playing a sound.
- *
- * @param channel channel number to check
- * @return true if playing, else false
- */
- bool isPlaying(int channel);
-
- /**
- * Stop the playback of a sound in the given
- * channel.
- *
- * @param channel channel number
- */
- void stopSound(int channel);
-
- /**
- * Stops playback of all sounds.
- */
- void stopAllSounds();
-
- /**
- * Makes the sound in a given channel
- * fading out.
- *
- * @param channel channel number
- * @param ticks fadeout time
- */
- void beginFadeOut(int channel, int ticks);
-private:
- KyraEngine_MR *_vm;
- Audio::Mixer *_mixer;
-
- struct Sound {
- Audio::SoundHandle handle;
-
- char filename[16];
- uint8 priority;
- KyraAudioStream *stream;
- } _sounds[4];
-
- struct AudioCodecs {
- const char *fileext;
- Audio::SeekableAudioStream *(*streamFunc)(
- Common::SeekableReadStream *stream,
- DisposeAfterUse::Flag disposeAfterUse);
- };
-
- static const AudioCodecs _supportedCodecs[];
-};
-
} // End of namespace Kyra
#endif
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 668e662413..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;
}
}
@@ -2292,6 +2292,8 @@ SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
_numSoundTriggers = 0;
_sfxPlayingSound = -1;
_soundFileLoaded.clear();
+ _currentResourceSet = 0;
+ memset(&_resInfo, 0, sizeof(_resInfo));
switch (vm->game()) {
case GI_LOL:
@@ -2322,6 +2324,8 @@ SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
SoundAdLibPC::~SoundAdLibPC() {
delete _driver;
delete[] _soundDataPtr;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundAdLibPC::init() {
@@ -2371,7 +2375,7 @@ void SoundAdLibPC::playTrack(uint8 track) {
_driver->setSyncJumpMask(0x000F);
else
_driver->setSyncJumpMask(0);
- play(track, 0xff);
+ play(track, 0xFF);
}
}
@@ -2405,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() {
@@ -2416,8 +2420,29 @@ void SoundAdLibPC::resetTrigger() {
_driver->resetSoundTrigger();
}
+void SoundAdLibPC::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_PC(*(SoundResourceInfo_PC*)info) : 0;
+ }
+}
+
+void SoundAdLibPC::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundAdLibPC::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundAdLibPC::loadSoundFile(uint file) {
- internalLoadFile(fileListEntry(file));
+ if (file < res()->fileListSize)
+ internalLoadFile(res()->fileList[file]);
}
void SoundAdLibPC::loadSoundFile(Common::String file) {
diff --git a/engines/kyra/sound_adlib.h b/engines/kyra/sound_adlib.h
index 8492f3b99a..f8486499ab 100644
--- a/engines/kyra/sound_adlib.h
+++ b/engines/kyra/sound_adlib.h
@@ -69,6 +69,9 @@ public:
virtual void updateVolumeSettings();
+ virtual void initAudioResourceInfo(int set, void *info);
+ virtual void selectAudioResourceSet(int set);
+ virtual bool hasSoundFile(uint file) const;
virtual void loadSoundFile(uint file);
virtual void loadSoundFile(Common::String file);
@@ -76,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();
@@ -87,6 +90,10 @@ private:
void play(uint8 track, uint8 volume);
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_PC *_resInfo[3];
+ int _currentResourceSet;
+
AdLibDriver *_driver;
int _version;
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index ec2748dd38..7292541594 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -53,10 +53,26 @@ bool SoundAmiga::init() {
return _driver != 0 && _tableSfxIntro && _tableSfxGame;
}
+void SoundAmiga::initAudioResourceInfo(int set, void *info) {
+ // See comment below
+}
+
+void SoundAmiga::selectAudioResourceSet(int set) {
+ // It seems that loadSoundFile() is doing what would normally be done in here.
+ // As long as this driver is only required for one single target (Kyra 1 Amiga)
+ // this doesn't matter much.
+}
+
+bool SoundAmiga::hasSoundFile(uint file) const {
+ if (file < 3)
+ return true;
+ return false;
+}
+
void SoundAmiga::loadSoundFile(uint file) {
debugC(5, kDebugLevelSound, "SoundAmiga::loadSoundFile(%d)", file);
- static const char * const tableFilenames[3][2] = {
+ static const char *const tableFilenames[3][2] = {
{ "introscr.mx", "introinst.mx" },
{ "kyramusic.mx", 0 },
{ "finalescr.mx", "introinst.mx" }
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index fe0f1fb9bc..518805c43e 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "kyra/sound.h"
+#include "kyra/sound_digital.h"
#include "kyra/resource.h"
#include "kyra/kyra_mr.h"
@@ -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_digital.h b/engines/kyra/sound_digital.h
new file mode 100644
index 0000000000..271dde6a21
--- /dev/null
+++ b/engines/kyra/sound_digital.h
@@ -0,0 +1,119 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef KYRA_SOUND_DIGITAL_H
+#define KYRA_SOUND_DIGITAL_H
+
+#include "audio/mixer.h"
+
+namespace Common {
+class SeekableReadStream;
+} // End of namespace Common
+
+namespace Audio {
+class SeekableAudioStream;
+} // End of namespace Audio
+
+namespace Kyra {
+
+// Digital Audio
+class KyraAudioStream;
+class KyraEngine_MR;
+
+/**
+ * Digital audio output device.
+ *
+ * This is just used for Kyrandia 3.
+ */
+class SoundDigital {
+public:
+ SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer);
+ ~SoundDigital();
+
+ /**
+ * Plays a sound.
+ *
+ * @param filename file to be played
+ * @param priority priority of the sound
+ * @param type type
+ * @param volume channel volume
+ * @param loop true if the sound should loop (endlessly)
+ * @param channel tell the sound player to use a specific channel for playback
+ *
+ * @return channel playing the sound
+ */
+ int playSound(const char *filename, uint8 priority, Audio::Mixer::SoundType type, int volume = 255, bool loop = false, int channel = -1);
+
+ /**
+ * Checks if a given channel is playing a sound.
+ *
+ * @param channel channel number to check
+ * @return true if playing, else false
+ */
+ bool isPlaying(int channel);
+
+ /**
+ * Stop the playback of a sound in the given
+ * channel.
+ *
+ * @param channel channel number
+ */
+ void stopSound(int channel);
+
+ /**
+ * Stops playback of all sounds.
+ */
+ void stopAllSounds();
+
+ /**
+ * Makes the sound in a given channel
+ * fading out.
+ *
+ * @param channel channel number
+ * @param ticks fadeout time
+ */
+ void beginFadeOut(int channel, int ticks);
+private:
+ KyraEngine_MR *_vm;
+ Audio::Mixer *_mixer;
+
+ struct Sound {
+ Audio::SoundHandle handle;
+
+ char filename[16];
+ uint8 priority;
+ KyraAudioStream *stream;
+ } _sounds[4];
+
+ struct AudioCodecs {
+ const char *fileext;
+ Audio::SeekableAudioStream *(*streamFunc)(
+ Common::SeekableReadStream *stream,
+ DisposeAfterUse::Flag disposeAfterUse);
+ };
+
+ static const AudioCodecs _supportedCodecs[];
+};
+
+} // End of namespace Kyra
+
+#endif
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 827a487685..007ca3d3f5 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -23,6 +23,8 @@
#ifndef KYRA_SOUND_INTERN_H
#define KYRA_SOUND_INTERN_H
+
+
#include "kyra/sound.h"
#include "kyra/sound_adlib.h"
@@ -40,6 +42,7 @@ class MaxTrax;
} // End of namespace Audio
namespace Kyra {
+
class MidiOutput;
/**
@@ -51,28 +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 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);
@@ -89,6 +95,10 @@ private:
MidiParser *_music;
MidiParser *_sfx[3];
+ const SoundResourceInfo_PC *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_PC *_resInfo[3];
+ int _currentResourceSet;
+
// misc
kType _type;
Common::String getFileName(const Common::String &str);
@@ -103,25 +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 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();
@@ -142,6 +155,10 @@ private:
bool _cdaPlaying;
+ const SoundResourceInfo_Towns *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_Towns *_resInfo[3];
+ int _currentResourceSet;
+
const uint8 *_musicFadeTable;
const uint8 *_sfxBTTable;
const uint8 *_sfxWDTable;
@@ -150,55 +167,64 @@ 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 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();
-protected:
+private:
int _lastTrack;
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
TownsPC98_AudioDriver *_driver;
+
+ const char *resPattern() {return _resInfo[_currentResourceSet]->c_str(); }
+ Common::String *_resInfo[3];
+ int _currentResourceSet;
};
class SoundTownsPC98_v2 : public Sound {
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 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);
- 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();
-protected:
+private:
Audio::AudioStream *_currentSFX;
int _lastTrack;
bool _useFmSfx;
@@ -206,6 +232,10 @@ protected:
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
TownsPC98_AudioDriver *_driver;
+
+ const SoundResourceInfo_TownsPC98V2 *res() const {return _resInfo[_currentResourceSet]; }
+ SoundResourceInfo_TownsPC98V2 *_resInfo[3];
+ int _currentResourceSet;
};
// PC Speaker MIDI driver
@@ -288,22 +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() {}
- 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();
- 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);
protected:
Audio::MaxTrax *_driver;
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index cb9be43b07..7ac33967dd 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,11 +164,19 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (track == -1 || track >= _ingameSoundListSize)
return;
- volume &= 0xff;
- int16 volIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
+ volume &= 0xFF;
+ int16 prIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]);
+ uint16 priority = (prIndex > 0) ? (prIndex * volume) >> 8 : -prIndex;
- uint16 vocLevel = (volIndex > 0) ? (volIndex * volume) >> 8 : -volIndex;
- vocLevel = CLIP(volume >> 4, 2, 13) * 7 + 164;
+ static const uint8 volTable1[] = { 223, 159, 95, 47, 15, 0 };
+ static const uint8 volTable2[] = { 255, 191, 127, 63, 30, 0 };
+
+ for (int i = 0; i < 6; i++) {
+ if (volTable1[i] < volume) {
+ volume = volTable2[i];
+ break;
+ }
+ }
int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
@@ -180,8 +188,8 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) {
if (hasVocFile) {
if (_sound->isVoicePresent(_ingameSoundList[vocIndex]))
- _sound->voicePlay(_ingameSoundList[vocIndex], 0, vocLevel & 0xff, true);
- } else if (_flags.platform == Common::kPlatformPC) {
+ _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume, priority, true);
+ } else if (_flags.platform == Common::kPlatformDOS) {
if (_sound->getSfxType() == Sound::kMidiMT32)
track = (track < _ingameMT32SoundIndexSize) ? (_ingameMT32SoundIndex[track] - 1) : -1;
else if (_sound->getSfxType() == Sound::kMidiGM)
@@ -206,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;
@@ -239,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::kPlatformDOS) {
int t = (track - 250) * 3;
if (_curMusicFileIndex != _musicTrackMap[t] || _curMusicFileExt != (char)_musicTrackMap[t + 1]) {
snd_stopMusic();
@@ -261,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::kPlatformDOS) {
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 70cc304192..fc6e92abd9 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -323,7 +323,7 @@ void MidiOutput::setSourceVolume(int source, int volume, bool apply) {
for (int i = 0; i < 16; ++i) {
// Controller 0 in the state table should always be '7' aka
// volume control
- byte realVol = (_channels[i].controllers[0].value * volume) >> 8;
+ byte realVol = (_sources[source].controllers[i][0].value * volume) >> 8;
sendIntern(0xB0, i, 0x07, realVol);
}
}
@@ -442,6 +442,8 @@ SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *dri
_output = 0;
_musicFile = _sfxFile = 0;
+ _currentResourceSet = 0;
+ memset(&_resInfo, 0, sizeof(_resInfo));
_music = MidiParser::createParser_XMIDI();
assert(_music);
@@ -495,6 +497,9 @@ SoundMidiPC::~SoundMidiPC() {
delete[] _sfxFile;
delete[] _musicFile;
+
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundMidiPC::init() {
@@ -586,8 +591,29 @@ void SoundMidiPC::updateVolumeSettings() {
_output->setSourceVolume(i, _sfxVolume, false);
}
+void SoundMidiPC::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_PC(*(SoundResourceInfo_PC*)info) : 0;
+ }
+}
+
+void SoundMidiPC::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundMidiPC::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundMidiPC::loadSoundFile(uint file) {
- loadSoundFile(fileListEntry(file));
+ if (file < res()->fileListSize)
+ loadSoundFile(res()->fileList[file]);
}
void SoundMidiPC::loadSoundFile(Common::String file) {
@@ -757,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 4b25db33f2..af741a1ebe 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -35,8 +35,8 @@ namespace Kyra {
SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _lastTrack(-1), _musicTrackData(0), _sfxFileData(0), _cdaPlaying(0),
- _sfxFileIndex((uint)-1), _musicFadeTable(0), _sfxWDTable(0), _sfxBTTable(0), _sfxChannel(0x46) {
-
+ _sfxFileIndex((uint)-1), _musicFadeTable(0), _sfxWDTable(0), _sfxBTTable(0), _sfxChannel(0x46), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
_driver = new TownsEuphonyDriver(_mixer);
}
@@ -46,6 +46,8 @@ SoundTowns::~SoundTowns() {
delete _driver;
delete[] _musicTrackData;
delete[] _sfxFileData;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundTowns::init() {
@@ -78,11 +80,12 @@ void SoundTowns::playTrack(uint8 track) {
return;
track -= 2;
- const int32 *const tTable = (const int32 *)cdaData();
- int tTableIndex = 3 * track;
+ uint tTableIndex = 3 * track;
+
+ assert(tTableIndex + 2 < res()->cdaTableSize);
- int trackNum = (int)READ_LE_UINT32(&tTable[tTableIndex + 2]);
- int32 loop = (int32)READ_LE_UINT32(&tTable[tTableIndex + 1]);
+ int trackNum = (int)READ_LE_UINT32(&res()->cdaTable[tTableIndex + 2]);
+ int32 loop = (int32)READ_LE_UINT32(&res()->cdaTable[tTableIndex + 1]);
if (track == _lastTrack && _musicEnabled)
return;
@@ -95,7 +98,7 @@ void SoundTowns::playTrack(uint8 track) {
g_system->getAudioCDManager()->updateCD();
_cdaPlaying = true;
} else if (_musicEnabled) {
- playEuphonyTrack(READ_LE_UINT32(&tTable[tTableIndex]), loop);
+ playEuphonyTrack(READ_LE_UINT32(&res()->cdaTable[tTableIndex]), loop);
_cdaPlaying = false;
}
@@ -117,12 +120,32 @@ void SoundTowns::haltTrack() {
_driver->stopParser();
}
+void SoundTowns::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_Towns(*(SoundResourceInfo_Towns*)info) : 0;
+ }
+}
+
+void SoundTowns::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundTowns::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundTowns::loadSoundFile(uint file) {
- if (_sfxFileIndex == file)
+ if (_sfxFileIndex == file || file >= res()->fileListSize)
return;
_sfxFileIndex = file;
delete[] _sfxFileData;
- _sfxFileData = _vm->resource()->fileData(fileListEntry(file), 0);
+ _sfxFileData = _vm->resource()->fileData(res()->fileList[file], 0);
}
void SoundTowns::playSoundEffect(uint8 track, uint8) {
@@ -151,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;
@@ -191,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)];
}
}
@@ -270,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];
@@ -367,13 +390,16 @@ void SoundTowns::fadeOutSoundEffects() {
}
SoundPC98::SoundPC98(KyraEngine_v1 *vm, Audio::Mixer *mixer) :
- Sound(vm, mixer), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0) {
+ Sound(vm, mixer), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
}
SoundPC98::~SoundPC98() {
delete[] _musicTrackData;
delete[] _sfxTrackData;
delete _driver;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundPC98::init() {
@@ -383,8 +409,26 @@ bool SoundPC98::init() {
return reslt;
}
-void SoundPC98::loadSoundFile(uint file) {
- if (!scumm_strnicmp(fileListEntry(0), "INTRO", 5)) {
+void SoundPC98::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new Common::String(((SoundResourceInfo_PC98*)info)->pattern) : 0;
+ }
+}
+
+void SoundPC98::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundPC98::hasSoundFile(uint file) const {
+ return true;
+}
+
+void SoundPC98::loadSoundFile(uint) {
+ if (_currentResourceSet == kMusicIntro) {
delete[] _sfxTrackData;
_sfxTrackData = 0;
@@ -407,14 +451,14 @@ void SoundPC98::loadSoundFile(Common::String file) {
}
void SoundPC98::playTrack(uint8 track) {
- track += extraOffset();
+ track -= 1;
if (track == _lastTrack && _musicEnabled)
return;
beginFadeOut();
- Common::String musicFile = fileListLen() == 1 ? Common::String::format(fileListEntry(0), track) : fileListEntry(track);
+ Common::String musicFile = Common::String::format(resPattern(), track);
delete[] _musicTrackData;
_musicTrackData = _vm->resource()->fileData(musicFile.c_str(), 0);
if (_musicEnabled)
@@ -464,13 +508,16 @@ void SoundPC98::updateVolumeSettings() {
// KYRA 2
SoundTownsPC98_v2::SoundTownsPC98_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer) :
- Sound(vm, mixer), _currentSFX(0), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _useFmSfx(false) {
+ Sound(vm, mixer), _currentSFX(0), _musicTrackData(0), _sfxTrackData(0), _lastTrack(-1), _driver(0), _useFmSfx(false), _currentResourceSet(0) {
+ memset(&_resInfo, 0, sizeof(_resInfo));
}
SoundTownsPC98_v2::~SoundTownsPC98_v2() {
delete[] _musicTrackData;
delete[] _sfxTrackData;
delete _driver;
+ for (int i = 0; i < 3; i++)
+ initAudioResourceInfo(i, 0);
}
bool SoundTownsPC98_v2::init() {
@@ -478,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
@@ -486,9 +535,9 @@ bool SoundTownsPC98_v2::init() {
// this misses the possibility that we play the tracks
// right off CD. So we should find another way to
// check if we have access to CD audio.
- Resource *res = _vm->resource();
+ Resource *r = _vm->resource();
if (_musicEnabled &&
- (res->exists("track1.mp3") || res->exists("track1.ogg") || res->exists("track1.flac") || res->exists("track1.fla")))
+ (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")))
_musicEnabled = 2;
else
_musicEnabled = 1;
@@ -503,6 +552,26 @@ bool SoundTownsPC98_v2::init() {
return reslt;
}
+void SoundTownsPC98_v2::initAudioResourceInfo(int set, void *info) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ delete _resInfo[set];
+ _resInfo[set] = info ? new SoundResourceInfo_TownsPC98V2(*(SoundResourceInfo_TownsPC98V2*)info) : 0;
+ }
+}
+
+void SoundTownsPC98_v2::selectAudioResourceSet(int set) {
+ if (set >= kMusicIntro && set <= kMusicFinale) {
+ if (_resInfo[set])
+ _currentResourceSet = set;
+ }
+}
+
+bool SoundTownsPC98_v2::hasSoundFile(uint file) const {
+ if (file < res()->fileListSize)
+ return (res()->fileList[file] != 0);
+ return false;
+}
+
void SoundTownsPC98_v2::loadSoundFile(Common::String file) {
delete[] _sfxTrackData;
_sfxTrackData = _vm->resource()->fileData(file.c_str(), 0);
@@ -513,18 +582,14 @@ void SoundTownsPC98_v2::process() {
}
void SoundTownsPC98_v2::playTrack(uint8 track) {
- track += extraOffset();
-
if (track == _lastTrack && _musicEnabled)
return;
- const uint16 *const cdaTracks = (const uint16 *)cdaData();
-
int trackNum = -1;
if (_vm->gameFlags().platform == Common::kPlatformFMTowns) {
- for (int i = 0; i < cdaTrackNum(); i++) {
- if (track == (uint8) READ_LE_UINT16(&cdaTracks[i * 2])) {
- trackNum = (int) READ_LE_UINT16(&cdaTracks[i * 2 + 1]) - 1;
+ for (uint i = 0; i < res()->cdaTableSize; i++) {
+ if (track == (uint8) READ_LE_UINT16(&res()->cdaTable[i * 2])) {
+ trackNum = (int) READ_LE_UINT16(&res()->cdaTable[i * 2 + 1]) - 1;
break;
}
}
@@ -532,9 +597,10 @@ void SoundTownsPC98_v2::playTrack(uint8 track) {
beginFadeOut();
- Common::String musicFile = fileListLen() == 1 ? Common::String::format(fileListEntry(0), track) : fileListEntry(track);
+ Common::String musicFile = res()->pattern ? Common::String::format(res()->pattern, track) : (res()->fileList ? res()->fileList[track] : 0);
if (musicFile.empty())
return;
+
delete[] _musicTrackData;
_musicTrackData = _vm->resource()->fileData(musicFile.c_str(), 0);
@@ -569,15 +635,24 @@ void SoundTownsPC98_v2::beginFadeOut() {
haltTrack();
}
-int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, uint8, bool) {
+int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, uint8 priority, bool) {
static const uint16 rates[] = { 0x10E1, 0x0CA9, 0x0870, 0x0654, 0x0438, 0x032A, 0x021C, 0x0194 };
static const char patternHOF[] = "%s.PCM";
static const char patternLOL[] = "%s.VOC";
int h = 0;
if (_currentSFX) {
- while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h]))
+ while (h < kNumChannelHandles && _mixer->isSoundHandleActive(_soundChannels[h].handle))
h++;
+
+ if (h >= kNumChannelHandles) {
+ h = 0;
+ while (h < kNumChannelHandles && _soundChannels[h].priority > priority)
+ ++h;
+ if (h < kNumChannelHandles)
+ voiceStop(&_soundChannels[h].handle);
+ }
+
if (h >= kNumChannelHandles)
return 0;
}
@@ -621,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)
@@ -630,9 +705,10 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle,
}
_currentSFX = Audio::makeRawStream(sfx, outsize, sfxRate * 10, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h], _currentSFX);
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h].handle, _currentSFX, -1, volume);
+ _soundChannels[h].priority = priority;
if (handle)
- *handle = _soundChannels[h];
+ *handle = _soundChannels[h].handle;
delete[] data;
return 1;
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 5c679f5cb4..b96f2eca08 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);
@@ -213,20 +213,11 @@ void EoBCoreEngine::killMonster(EoBMonsterInPlay *m, bool giveExperience) {
if (killMonsterExtra(m)) {
placeMonster(m, 0, -1);
- if ((_flags.gameID == GI_EOB1) && (m->type == 21)) {
- _playFinale = true;
- _runFlag = false;
- }
-
if (m->mode == 8)
updateAttackingMonsterFlags();
}
}
-bool EoBCoreEngine::killMonsterExtra(EoBMonsterInPlay *) {
- return true;
-}
-
int EoBCoreEngine::countSpecificMonsters(int type) {
int res = 0;
for (int i = 0; i < 30; i++) {
@@ -247,6 +238,9 @@ void EoBCoreEngine::updateAttackingMonsterFlags() {
m2 = m;
}
+ if (!m2)
+ return;
+
if (m2->type == 7)
setScriptFlags(4);
@@ -357,7 +351,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 +530,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);
@@ -551,8 +545,6 @@ void EoBCoreEngine::drawMonsters(int index) {
SpriteDecoration *dcr = &_monsterDecorations[(p->decorations[ii] - 1) * 6 + subFrame + shpIndex - 1];
- if (!dcr)
- continue;
if (!dcr->shp)
continue;
@@ -652,6 +644,8 @@ void EoBCoreEngine::drawFlyingObjects(int index) {
}
}
+ assert(shp);
+
shp = _screen->scaleShape(shp, sclValue);
if (rstFade) {
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index f4bae113c5..4d4d596bac 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));
@@ -514,7 +503,6 @@ int LoLEngine::checkBlockOccupiedByParty(int x, int y, int testFlag) {
void LoLEngine::drawBlockObjects(int blockArrayIndex) {
LevelBlockProperty *l = _visibleBlocks[blockArrayIndex];
uint16 s = l->assignedObjects;
- LoLObject *obj = findObject(s);
if (l->direction != _currentDirection) {
l->drawObjects = 0;
@@ -522,15 +510,14 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
while (s) {
reassignDrawObjects(_currentDirection, s, l, true);
- obj = findObject(s);
- s = obj->nextAssignedObject;
+ s = findObject(s)->nextAssignedObject;
}
}
s = l->drawObjects;
while (s) {
if (s & 0x8000) {
- s &= 0x7fff;
+ s &= 0x7FFF;
if (blockArrayIndex < 15)
drawMonster(s);
s = _monsters[s].nextDrawObject;
@@ -578,6 +565,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
case 2:
case 6:
flg |= 0x10;
+ // fall through
case 0:
case 4:
shpIndex = _flyingItemShapes[shpIndex].shapeLeft;
@@ -607,7 +595,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 +610,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 +632,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 +696,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 +786,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 +924,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 +959,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 +1049,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 +1117,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 +1127,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) {
chasePartyWithCloseAttacks(monster);
} else {
setMonsterMode(monster, 7);
- monster->flags &= 0xfff7;
+ monster->flags &= 0xFFF7;
}
break;
@@ -1164,13 +1154,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 +1229,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 +1264,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 +1284,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 +1386,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 +1428,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 +1437,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 +1448,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 +1456,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 00dc4f9e13..c52b0a04ad 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -31,6 +31,7 @@
#include "kyra/gui_lok.h"
#include "kyra/gui_hof.h"
#include "kyra/gui_mr.h"
+#include "kyra/sequences_hof.h"
#include "kyra/sound_intern.h"
#include "common/endian.h"
@@ -38,7 +39,7 @@
namespace Kyra {
-#define RESFILE_VERSION 83
+#define RESFILE_VERSION 84
namespace {
bool checkKyraDat(Common::SeekableReadStream *file) {
@@ -101,7 +102,7 @@ byte getLanguageID(const GameFlags &flags) {
}
const IndexTable iPlatformTable[] = {
- { Common::kPlatformPC, 0 },
+ { Common::kPlatformDOS, 0 },
{ Common::kPlatformAmiga, 1 },
{ Common::kPlatformFMTowns, 2 },
{ Common::kPlatformPC98, 3 },
@@ -245,8 +246,8 @@ bool StaticResource::init() {
{ kAmigaSfxTable, proc(loadAmigaSfxTable), proc(freeAmigaSfxTable) },
{ kRawData, proc(loadRawData), proc(freeRawData) },
- { k2SeqData, proc(loadHofSequenceData), proc(freeHofSequenceData) },
- { k2ShpAnimDataV1, proc(loadShapeAnimData_v1), proc(freeHofShapeAnimDataV1) },
+ { k2SeqData, proc(loadHoFSequenceData), proc(freeHoFSequenceData) },
+ { k2SeqItemAnimData, proc(loadHoFSeqItemAnimData), proc(freeHoFSeqItemAnimData) },
{ k2ItemAnimDefinition, proc(loadItemAnimDefinition), proc(freeItemAnimDefinition) },
#ifdef ENABLE_LOL
@@ -289,7 +290,7 @@ void StaticResource::deinit() {
}
const char *const *StaticResource::loadStrings(int id, int &strings) {
- return (const char * const *)getData(id, kStringList, strings);
+ return (const char *const *)getData(id, kStringList, strings);
}
const uint8 *StaticResource::loadRawData(int id, int &size) {
@@ -308,12 +309,12 @@ const Room *StaticResource::loadRoomTable(int id, int &entries) {
return (const Room *)getData(id, StaticResource::kRoomList, entries);
}
-const HofSeqData *StaticResource::loadHofSequenceData(int id, int &entries) {
- return (const HofSeqData *)getData(id, k2SeqData, entries);
+const HoFSeqData *StaticResource::loadHoFSequenceData(int id, int &entries) {
+ return (const HoFSeqData *)getData(id, k2SeqData, entries);
}
-const ItemAnimData_v1 *StaticResource::loadShapeAnimData_v1(int id, int &entries) {
- return (const ItemAnimData_v1 *)getData(id, k2ShpAnimDataV1, entries);
+const HoFSeqItemAnimData *StaticResource::loadHoFSeqItemAnimData(int id, int &entries) {
+ return (const HoFSeqItemAnimData *)getData(id, k2SeqItemAnimData, entries);
}
const ItemAnimDefinition *StaticResource::loadItemAnimDefinition(int id, int &entries) {
@@ -513,12 +514,12 @@ bool StaticResource::loadRoomTable(Common::SeekableReadStream &stream, void *&pt
return true;
}
-bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadHoFSequenceData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
int numSeq = stream.readUint16BE();
uint32 offset = 2;
- Sequence *tmp_s = new Sequence[numSeq];
+ HoFSequence *tmp_s = new HoFSequence[numSeq];
- size = sizeof(HofSeqData) + numSeq * (sizeof(Sequence) + 28);
+ size = sizeof(HoFSeqData) + numSeq * (sizeof(HoFSequence) + 28);
for (int i = 0; i < numSeq; i++) {
stream.seek(offset, SEEK_SET); offset += 2;
@@ -529,22 +530,22 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
stream.read(const_cast<char *>(tmp_s[i].wsaFile), 14);
tmp_s[i].cpsFile = new char[14];
stream.read(const_cast<char *>(tmp_s[i].cpsFile), 14);
- tmp_s[i].startupCommand = stream.readByte();
- tmp_s[i].finalCommand = stream.readByte();
+ tmp_s[i].fadeInTransitionType = stream.readByte();
+ tmp_s[i].fadeOutTransitionType = stream.readByte();
tmp_s[i].stringIndex1 = stream.readUint16BE();
tmp_s[i].stringIndex2 = stream.readUint16BE();
tmp_s[i].startFrame = stream.readUint16BE();
tmp_s[i].numFrames = stream.readUint16BE();
- tmp_s[i].frameDelay = stream.readUint16BE();
+ tmp_s[i].duration = stream.readUint16BE();
tmp_s[i].xPos = stream.readUint16BE();
tmp_s[i].yPos = stream.readUint16BE();
- tmp_s[i].duration = stream.readUint16BE();
+ tmp_s[i].timeout = stream.readUint16BE();
}
stream.seek(offset, SEEK_SET); offset += 2;
int numSeqN = stream.readUint16BE();
- NestedSequence *tmp_n = new NestedSequence[numSeqN];
- size += (numSeqN * (sizeof(NestedSequence) + 14));
+ HoFNestedSequence *tmp_n = new HoFNestedSequence[numSeqN];
+ size += (numSeqN * (sizeof(HoFNestedSequence) + 14));
for (int i = 0; i < numSeqN; i++) {
stream.seek(offset, SEEK_SET); offset += 2;
@@ -559,8 +560,8 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
tmp_n[i].x = stream.readUint16BE();
tmp_n[i].y = stream.readUint16BE();
uint16 ctrlOffs = stream.readUint16BE();
- tmp_n[i].startupCommand = stream.readUint16BE();
- tmp_n[i].finalCommand = stream.readUint16BE();
+ tmp_n[i].fadeInTransitionType = stream.readUint16BE();
+ tmp_n[i].fadeOutTransitionType = stream.readUint16BE();
if (ctrlOffs) {
stream.seek(ctrlOffs, SEEK_SET);
@@ -580,21 +581,21 @@ bool StaticResource::loadHofSequenceData(Common::SeekableReadStream &stream, voi
}
}
- HofSeqData *loadTo = new HofSeqData;
+ HoFSeqData *loadTo = new HoFSeqData;
assert(loadTo);
loadTo->seq = tmp_s;
- loadTo->seqn = tmp_n;
+ loadTo->nestedSeq = tmp_n;
loadTo->numSeq = numSeq;
- loadTo->numSeqn = numSeqN;
+ loadTo->numNestedSeq = numSeqN;
ptr = loadTo;
return true;
}
-bool StaticResource::loadShapeAnimData_v1(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadHoFSeqItemAnimData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
size = stream.readByte();
- ItemAnimData_v1 *loadTo = new ItemAnimData_v1[size];
+ HoFSeqItemAnimData *loadTo = new HoFSeqItemAnimData[size];
assert(loadTo);
for (int i = 0; i < size; i++) {
@@ -670,8 +671,8 @@ void StaticResource::freeRoomTable(void *&ptr, int &size) {
size = 0;
}
-void StaticResource::freeHofSequenceData(void *&ptr, int &size) {
- HofSeqData *h = (HofSeqData *)ptr;
+void StaticResource::freeHoFSequenceData(void *&ptr, int &size) {
+ HoFSeqData *h = (HoFSeqData *)ptr;
for (int i = 0; i < h->numSeq; i++) {
delete[] h->seq[i].wsaFile;
@@ -679,19 +680,19 @@ void StaticResource::freeHofSequenceData(void *&ptr, int &size) {
}
delete[] h->seq;
- for (int i = 0; i < h->numSeqn; i++) {
- delete[] h->seqn[i].wsaFile;
- delete[] h->seqn[i].wsaControl;
+ for (int i = 0; i < h->numNestedSeq; i++) {
+ delete[] h->nestedSeq[i].wsaFile;
+ delete[] h->nestedSeq[i].wsaControl;
}
- delete[] h->seqn;
+ delete[] h->nestedSeq;
delete h;
ptr = 0;
size = 0;
}
-void StaticResource::freeHofShapeAnimDataV1(void *&ptr, int &size) {
- ItemAnimData_v1 *d = (ItemAnimData_v1 *)ptr;
+void StaticResource::freeHoFSeqItemAnimData(void *&ptr, int &size) {
+ HoFSeqItemAnimData *d = (HoFSeqItemAnimData *)ptr;
for (int i = 0; i < size; i++)
delete[] d[i].frames;
delete[] d;
@@ -777,22 +778,6 @@ void KyraEngine_LoK::initStaticResource() {
_storyStrings = _staticres->loadStrings(k1PC98StoryStrings, _storyStringsSize);
- int size1, size2;
- const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1);
- const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2);
- _soundFilesSize = size1 + size2;
- if (_soundFilesSize) {
- delete[] _soundFiles;
- const char **soundfiles = new const char*[_soundFilesSize];
- for (int i = 0; i < _soundFilesSize; i++)
- soundfiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1];
- _soundFiles = soundfiles;
- }
- _soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, _soundFilesIntroSize);
- _cdaTrackTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, _cdaTrackTableSize);
-
- // copied static res
-
// room list
const Room *tempRoomList = _staticres->loadRoomTable(k1RoomList, _roomTableSize);
@@ -819,34 +804,40 @@ void KyraEngine_LoK::initStaticResource() {
_staticres->unloadId(k1DefaultShapes);
}
- // audio data tables
- static const char *const tIntro98[] = { "INTRO%d.DAT" };
- static const char *const tIngame98[] = { "KYRAM%d.DAT" };
+ // audio resource assignment
+ int size1, size2;
+ const char *const *soundfiles1 = _staticres->loadStrings(k1AudioTracks, size1);
+ const char *const *soundfiles2 = _staticres->loadStrings(k1AudioTracks2, size2);
+ int soundFilesSize = size1 + size2;
+ int soundFilesIntroSize = 0;
+ int cdaTableSize = 0;
+ const char **soundFiles = 0;
+
+ if (soundFilesSize) {
+ soundFiles = new const char*[soundFilesSize];
+ for (int i = 0; i < soundFilesSize; i++)
+ soundFiles[i] = (i < size1) ? soundfiles1[i] : soundfiles2[i - size1];
+ }
+ const char *const *soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, soundFilesIntroSize);
+ const int32 *cdaTable = (const int32 *)_staticres->loadRawData(k1TownsCDATable, cdaTableSize);
// FIXME: It seems Kyra1 MAC CD includes AdLib and MIDI music and sfx, thus we enable
// support for those for now. (Based on patch #2767489 "Support for Mac Kyrandia 1 CD" by satz).
- memset(_soundData, 0, sizeof(_soundData));
- if (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformMacintosh) {
- _soundData[0].fileList = _soundFilesIntro;
- _soundData[0].fileListLen = _soundFilesIntroSize;
- _soundData[1].fileList = _soundFiles;
- _soundData[1].fileListLen = _soundFilesSize;
+ if (_flags.platform == Common::kPlatformDOS || _flags.platform == Common::kPlatformMacintosh) {
+ SoundResourceInfo_PC resInfoIntro(soundFilesIntro, soundFilesIntroSize);
+ SoundResourceInfo_PC resInfoIngame(soundFiles, soundFilesSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
} else if (_flags.platform == Common::kPlatformFMTowns) {
- _soundData[0].fileList = _soundFiles;
- _soundData[0].fileListLen = _soundFilesSize;
- _soundData[0].cdaTracks = _cdaTrackTable;
- _soundData[0].cdaNumTracks = _cdaTrackTableSize;
- _soundData[1].fileList = _soundFiles;
- _soundData[1].fileListLen = _soundFilesSize;
- _soundData[1].cdaTracks = _cdaTrackTable;
- _soundData[1].cdaNumTracks = _cdaTrackTableSize;
+ SoundResourceInfo_Towns resInfoIntro(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
+ SoundResourceInfo_Towns resInfoIngame(soundFiles, soundFilesSize, cdaTable, cdaTableSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = tIntro98;
- _soundData[0].fileListLen = 1;
- _soundData[0].extraOffset = -1;
- _soundData[1].fileList = tIngame98;
- _soundData[1].fileListLen = 1;
- _soundData[1].extraOffset = -1;
+ SoundResourceInfo_PC98 resInfoIntro("INTRO%d.DAT");
+ SoundResourceInfo_PC98 resInfoIngame("KYRAM%d.DAT");
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
}
}
@@ -965,7 +956,7 @@ void KyraEngine_LoK::loadButtonShapes() {
void KyraEngine_LoK::loadMainScreen(int page) {
_screen->clearPage(page);
- if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformPC) || _flags.platform == Common::kPlatformAmiga)
+ if (((_flags.lang == Common::EN_ANY || _flags.lang == Common::RU_RUS) && !_flags.isTalkie && _flags.platform == Common::kPlatformDOS) || _flags.platform == Common::kPlatformAmiga)
_screen->loadBitmap("MAIN15.CPS", page, page, &_screen->getPalette(0));
else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN || (_flags.isTalkie && _flags.lang == Common::IT_ITA))
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
@@ -992,11 +983,7 @@ void KyraEngine_LoK::loadMainScreen(int page) {
}
void KyraEngine_HoF::initStaticResource() {
- int tmpSize = 0;
-
- _sequencePakList = _staticres->loadStrings(k2SeqplayPakFiles, _sequencePakListSize);
_ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize);
- _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize);
_ingameSoundList = _staticres->loadStrings(k2IngameSfxFiles, _ingameSoundListSize);
_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize);
_musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize);
@@ -1009,131 +996,29 @@ void KyraEngine_HoF::initStaticResource() {
_ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize);
_itemAnimDefinition = _staticres->loadItemAnimDefinition(k2IngameShapeAnimData, _itemAnimDefinitionSize);
- // replace sequence talkie files with localized versions
- const char *const *seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize);
- const char *const *tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize);
- char **tmpSndLst = new char *[_sequenceSoundListSize];
-
- for (int i = 0; i < _sequenceSoundListSize; i++) {
- const int len = strlen(seqSoundList[i]);
-
- tmpSndLst[i] = new char[len + 1];
- tmpSndLst[i][0] = 0;
-
- if (tlkfiles && len > 1) {
- for (int ii = 0; ii < tmpSize; ii++) {
- if (strlen(tlkfiles[ii]) > 1 && !scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1]))
- strcpy(tmpSndLst[i], tlkfiles[ii]);
- }
- }
-
- if (tmpSndLst[i][0] == 0)
- strcpy(tmpSndLst[i], seqSoundList[i]);
- }
-
- tlkfiles = seqSoundList = 0;
- _staticres->unloadId(k2SeqplayTlkFiles);
- _staticres->unloadId(k2SeqplaySfxFiles);
- _sequenceSoundList = tmpSndLst;
-
// assign music data
- static const char *const fmtMusicFileListIntro[] = { "intro%d.twn" };
- static const char *const fmtMusicFileListFinale[] = { "finale%d.twn" };
- static const char *const fmtMusicFileListIngame[] = { "km%02d.twn" };
-
- static const char *const pc98MusicFileListIntro[] = { "intro%d.86" };
- static const char *const pc98MusicFileListFinale[] = { "finale%d.86" };
- static const char *const pc98MusicFileListIngame[] = { "km%02d.86" };
-
- memset(_soundData, 0, sizeof(_soundData));
- if (_flags.platform == Common::kPlatformPC) {
- _soundData[0].fileList = _musicFileListIntro;
- _soundData[0].fileListLen = _musicFileListIntroSize;
- _soundData[1].fileList = _musicFileListIngame;
- _soundData[1].fileListLen = _musicFileListIngameSize;
- _soundData[2].fileList = _musicFileListFinale;
- _soundData[2].fileListLen = _musicFileListIntroSize;
+ if (_flags.platform == Common::kPlatformDOS) {
+ SoundResourceInfo_PC resInfoIntro(_musicFileListIntro, _musicFileListIntroSize);
+ SoundResourceInfo_PC resInfoIngame(_musicFileListIngame, _musicFileListIngameSize);
+ SoundResourceInfo_PC resInfoFinale(_musicFileListFinale, _musicFileListFinaleSize);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
} else if (_flags.platform == Common::kPlatformFMTowns) {
- _soundData[0].fileList = fmtMusicFileListIntro;
- _soundData[0].fileListLen = 1;
- _soundData[0].cdaTracks = _cdaTrackTableIntro;
- _soundData[0].cdaNumTracks = _cdaTrackTableIntroSize >> 1;
- _soundData[1].fileList = fmtMusicFileListIngame;
- _soundData[1].fileListLen = 1;
- _soundData[1].cdaTracks = _cdaTrackTableIngame;
- _soundData[1].cdaNumTracks = _cdaTrackTableIngameSize >> 1;
- _soundData[2].fileList = fmtMusicFileListFinale;
- _soundData[2].fileListLen = 1;
- _soundData[2].cdaTracks = _cdaTrackTableFinale;
- _soundData[2].cdaNumTracks = _cdaTrackTableFinaleSize >> 1;
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.twn", (const uint16*)_cdaTrackTableIntro, _cdaTrackTableIntroSize >> 1);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.twn", (const uint16*)_cdaTrackTableIngame, _cdaTrackTableIngameSize >> 1);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.twn", (const uint16*)_cdaTrackTableFinale, _cdaTrackTableFinaleSize >> 1);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = pc98MusicFileListIntro;
- _soundData[0].fileListLen = 1;
- _soundData[1].fileList = pc98MusicFileListIngame;
- _soundData[1].fileListLen = 1;
- _soundData[2].fileList = pc98MusicFileListFinale;
- _soundData[2].fileListLen = 1;
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(0, 0, "intro%d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "km%02d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(0, 0, "finale%d.86", 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
}
-
- // setup sequence data
- _sequences = _staticres->loadHofSequenceData(k2SeqplaySeqData, tmpSize);
-
- static const SeqProc hofSequenceCallbacks[] = {
- 0, &KyraEngine_HoF::seq_introWestwood,
- &KyraEngine_HoF::seq_introTitle, &KyraEngine_HoF::seq_introOverview,
- &KyraEngine_HoF::seq_introLibrary, &KyraEngine_HoF::seq_introHand,
- &KyraEngine_HoF::seq_introPoint, &KyraEngine_HoF::seq_introZanfaun,
- &KyraEngine_HoF::seq_finaleFunters, &KyraEngine_HoF::seq_finaleFerb,
- &KyraEngine_HoF::seq_finaleFish, &KyraEngine_HoF::seq_finaleFheep,
- &KyraEngine_HoF::seq_finaleFarmer, &KyraEngine_HoF::seq_finaleFuards,
- &KyraEngine_HoF::seq_finaleFirates, &KyraEngine_HoF::seq_finaleFrash
- };
-
- static const SeqProc hofNestedSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_finaleFiggle, &KyraEngine_HoF::seq_introOver1,
- &KyraEngine_HoF::seq_introOver2, &KyraEngine_HoF::seq_introForest,
- &KyraEngine_HoF::seq_introDragon, &KyraEngine_HoF::seq_introDarm,
- &KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introLibrary2,
- &KyraEngine_HoF::seq_introMarco, &KyraEngine_HoF::seq_introHand1a,
- &KyraEngine_HoF::seq_introHand1b, &KyraEngine_HoF::seq_introHand1c,
- &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0
- };
-
- static const SeqProc hofDemoSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_demoVirgin, &KyraEngine_HoF::seq_demoWestwood,
- &KyraEngine_HoF::seq_demoTitle, &KyraEngine_HoF::seq_demoHill,
- &KyraEngine_HoF::seq_demoOuthome, &KyraEngine_HoF::seq_demoWharf,
- &KyraEngine_HoF::seq_demoDinob, &KyraEngine_HoF::seq_demoFisher, 0
- };
-
- static const SeqProc hofDemoNestedSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_demoWharf2, &KyraEngine_HoF::seq_demoDinob2,
- &KyraEngine_HoF::seq_demoWater, &KyraEngine_HoF::seq_demoBail,
- &KyraEngine_HoF::seq_demoDig, 0
- };
-
-#ifdef ENABLE_LOL
- static const SeqProc kLoLDemoSequenceCallbacks[] = {
- &KyraEngine_HoF::seq_lolDemoScene1, 0, &KyraEngine_HoF::seq_lolDemoScene2, 0,
- &KyraEngine_HoF::seq_lolDemoScene3, 0, &KyraEngine_HoF::seq_lolDemoScene4, 0,
- &KyraEngine_HoF::seq_lolDemoScene5, &KyraEngine_HoF::seq_lolDemoText5,
- &KyraEngine_HoF::seq_lolDemoScene6, 0
- };
-
- static const SeqProc kLoLDemoNestedSequenceCallbacks[] = { 0 };
-#endif // ENABLE_LOL
-
- _callbackS =
-#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLoLDemoSequenceCallbacks :
-#endif // ENABLE_LOL
- ((_flags.isDemo && !_flags.isTalkie) ? hofDemoSequenceCallbacks : hofSequenceCallbacks);
-
- _callbackN =
-#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLoLDemoNestedSequenceCallbacks :
-#endif // ENABLE_LOL
- ((_flags.isDemo && !_flags.isTalkie) ? hofDemoNestedSequenceCallbacks : hofNestedSequenceCallbacks);
}
void KyraEngine_MR::initStaticResource() {
@@ -1224,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);
@@ -1412,8 +1297,6 @@ const int GUI_v2::_sliderBarsPosition[] = {
// kyra 2 static res
-const uint8 KyraEngine_HoF::_seqTextColorPresets[] = { 0x01, 0x01, 0x00, 0x3f, 0x3f, 0x3f };
-
const char *const KyraEngine_HoF::_languageExtension[] = {
"ENG",
"FRE",
@@ -1631,7 +1514,7 @@ void KyraEngine_HoF::initInventoryButtonList() {
_inventoryButtons[i].buttonCallback = inventoryCallback;
_buttonList = &_inventoryButtons[0];
- for (size_t i = 1; i < 15; ++i)
+ for (int i = 1; i < 15; ++i)
_buttonList = _gui->addButtonToList(_buttonList, &_inventoryButtons[i]);
}
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 7a5012f117..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[] = {
@@ -465,13 +465,13 @@ void EoBCoreEngine::initStaticResource() {
// EOB I doesn't have load and save menus, because there is only one single
// save slot. Instead of emulating this we provide a menu similiar to EOB II.
- static const char *saveLoadStrings[3][4] = {
+ static const char *const saveLoadStrings[3][4] = {
{ "Cancel", "Empty Slot", "Save Game", "Load Game" },
{ "Abbr.", "Leerer Slot", "Speichern", " Laden" },
{ 0, 0, 0, 0 }
};
- static const char *errorSlotEmptyString[3] = {
+ static const char *const errorSlotEmptyString[3] = {
"There is no game\rsaved in that slot!",
"Hier ist noch kein\rSpiel gespeichert!",
0
@@ -1096,7 +1096,7 @@ void EoBEngine::initStaticResource() {
p->dmgModifierEvade = *ps++;
}
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielstaende mues-\r sen einen Namen\r haben!",
0
@@ -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
@@ -1187,7 +1187,7 @@ void EoBEngine::initSpells() {
const KyraRpgGUISettings EoBEngine::_guiSettingsVGA = {
{ 9, 15, 95, 9, 7, { 285, 139 }, { 189, 162 }, { 31, 31 } },
- { 135, 130, 132, 133, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180 }
+ { 135, 130, 132, 133, 133, 17, 23, 20, 184, 177, 180, 184, 177, 180 }
};
const KyraRpgGUISettings EoBEngine::_guiSettingsEGA = {
@@ -1210,7 +1210,7 @@ void DarkMoonEngine::initStaticResource() {
_animIntro[i] = _staticres->loadEoB2SeqData(kEob2IntroAnimData00 + i, temp);
_shapesIntro = new const DarkMoonShapeDef*[13];
- memset(_shapesIntro, 0, sizeof(DarkMoonShapeDef*) * 13);
+ memset(_shapesIntro, 0, sizeof(DarkMoonShapeDef *) * 13);
_shapesIntro[0] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes00, temp);
_shapesIntro[1] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes01, temp);
_shapesIntro[4] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes04, temp);
@@ -1225,7 +1225,7 @@ void DarkMoonEngine::initStaticResource() {
_animFinale[i] = _staticres->loadEoB2SeqData(kEob2FinaleAnimData00 + i, temp);
_shapesFinale = new const DarkMoonShapeDef*[13];
- memset(_shapesFinale, 0, sizeof(DarkMoonShapeDef*) * 13);
+ memset(_shapesFinale, 0, sizeof(DarkMoonShapeDef *) * 13);
_shapesFinale[0] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes00, temp);
_shapesFinale[3] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes03, temp);
_shapesFinale[7] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes07, temp);
@@ -1249,7 +1249,7 @@ void DarkMoonEngine::initStaticResource() {
_wallOfForceDsNumH = _staticres->loadRawData(kEoB2WallOfForceNumH, temp);
_wallOfForceShpId = _staticres->loadRawData(kEoB2WallOfForceShpId, temp);
- static const char *errorSlotNoNameString[3] = {
+ static const char *const errorSlotNoNameString[3] = {
" You must specify\r a name for your\r save game!",
" Spielst[nde m]ssen\r einen Namen haben!",
0
@@ -1258,7 +1258,7 @@ void DarkMoonEngine::initStaticResource() {
_errorSlotNoNameString = errorSlotNoNameString[(_flags.lang == Common::EN_ANY) ? 0 : ((_flags.lang == Common::DE_DEU) ? 1 : 2)];
// ScummVM specific
- static const char *transferStringsScummVM[3][5] = {
+ static const char *const transferStringsScummVM[3][5] = {
{
"\r We cannot find any EOB save game\r file. Please make sure that the\r save game file with the party\r you wish to transfer is located\r in your ScummVM save game\r directory. If you have set up\r multiple save directories you\r have to copy the EOB save file\r into your EOB II save directory.\r Do you wish to try again?",
"Game ID",
@@ -1300,7 +1300,7 @@ void DarkMoonEngine::initSpells() {
}
}
-const char *DarkMoonEngine::_palFilesIntroVGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroVGA[] = {
"PALETTE1.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1308,7 +1308,7 @@ const char *DarkMoonEngine::_palFilesIntroVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesIntroEGA[] = {
+const char *const DarkMoonEngine::_palFilesIntroEGA[] = {
"PALETTE0.PAL",
"PALETTE3.PAL",
"PALETTE2.PAL",
@@ -1316,7 +1316,7 @@ const char *DarkMoonEngine::_palFilesIntroEGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleVGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",
@@ -1329,7 +1329,7 @@ const char *DarkMoonEngine::_palFilesFinaleVGA[] = {
0
};
-const char *DarkMoonEngine::_palFilesFinaleEGA[] = {
+const char *const DarkMoonEngine::_palFilesFinaleEGA[] = {
"FINALE_0.PAL",
"FINALE_0.PAL",
"FINALE_1.PAL",
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 63bc7fa99b..c2cdcf9f51 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -24,6 +24,7 @@
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/gui_lol.h"
+#include "kyra/sound_intern.h"
#ifdef ENABLE_LOL
@@ -213,30 +214,39 @@ void StaticResource::freeButtonDefs(void *&ptr, int &size) {
}
void LoLEngine::initStaticResource() {
- // assign music data
- static const char *const pcMusicFileListIntro[] = { "LOREINTR" };
- static const char *const pcMusicFileListFinale[] = { "LOREFINL" };
- static const char *const pcMusicFileListIngame[] = { "LORE%02d%c" };
-
- static const char *const pc98MusicFileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
- static const char *const pc98MusicFileListFinale[] = { 0, 0, "lore85.86", "lore86.86", "lore87.86" };
- static const char *const pc98MusicFileListIngame[] = { "lore%02d.86" };
-
- memset(_soundData, 0, sizeof(_soundData));
- if (_flags.platform == Common::kPlatformPC) {
- _soundData[0].fileList = pcMusicFileListIntro;
- _soundData[0].fileListLen = ARRAYSIZE(pcMusicFileListIntro);
- _soundData[1].fileList = pcMusicFileListIngame;
- _soundData[1].fileListLen = ARRAYSIZE(pcMusicFileListIngame);
- _soundData[2].fileList = pcMusicFileListFinale;
- _soundData[2].fileListLen = ARRAYSIZE(pcMusicFileListFinale);
+ // assign music resource data.
+ if (_flags.platform == Common::kPlatformDOS) {
+ if (_flags.isDemo) {
+ static const char *const file[] = { "LOREDEMO" };
+ SoundResourceInfo_PC resInfoDemo(file, ARRAYSIZE(file));
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoDemo);
+ } else {
+ static const char *const intro[] = { "LOREINTR" };
+ static const char *const finale[] = { "LOREFINL" };
+ SoundResourceInfo_PC resInfoIntro(intro, ARRAYSIZE(intro));
+ SoundResourceInfo_PC resInfoFinale(finale, ARRAYSIZE(finale));
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ // In game music file handling is different, thus does not need a file list.
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
+ }
} else if (_flags.platform == Common::kPlatformPC98) {
- _soundData[0].fileList = pc98MusicFileListIntro;
- _soundData[0].fileListLen = ARRAYSIZE(pc98MusicFileListIntro);
- _soundData[1].fileList = pc98MusicFileListIngame;
- _soundData[1].fileListLen = ARRAYSIZE(pc98MusicFileListIngame);
- _soundData[2].fileList = pc98MusicFileListFinale;
- _soundData[2].fileListLen = ARRAYSIZE(pc98MusicFileListFinale);
+ static const char *const fileListIntro[] = { 0, "lore84.86", "lore82.86", 0, 0, 0, "lore83.86", "lore81.86" };
+ static const char *const fileListFinale[] = { 0, 0, "lore85.86", "lore86.86", "lore87.86" };
+ SoundResourceInfo_TownsPC98V2 resInfoIntro(fileListIntro, ARRAYSIZE(fileListIntro), 0, 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoIngame(0, 0, "lore%02d.86", 0, 0);
+ SoundResourceInfo_TownsPC98V2 resInfoFinale(fileListFinale, ARRAYSIZE(fileListFinale), 0, 0, 0);
+ _sound->initAudioResourceInfo(kMusicIntro, &resInfoIntro);
+ _sound->initAudioResourceInfo(kMusicIngame, &resInfoIngame);
+ _sound->initAudioResourceInfo(kMusicFinale, &resInfoFinale);
+ } 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)
@@ -260,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);
@@ -303,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);
@@ -457,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);
@@ -486,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;
@@ -658,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..f1933e9623 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -430,7 +430,7 @@ void KyraEngine_HoF::updateDlgBuffer() {
Common::String filename = Common::String::format("CH%.02d-S%.02d.DL", _currentChapter, _npcTalkDlgIndex);
const char *suffix = _flags.isTalkie ? suffixTalkie : suffixTowns;
- if (_flags.platform != Common::kPlatformPC || _flags.isTalkie)
+ if (_flags.platform != Common::kPlatformDOS || _flags.isTalkie)
filename += suffix[_lang];
else
filename += 'G';
@@ -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..f7a4e23006 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();
@@ -249,6 +249,7 @@ void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
case 2:
case 3:
setCharEventTimer(charIndex, (c->effectFlags & 0x10000) ? 9 : 36, evt + 2, 1);
+ // fall through
case 0:
case 1:
case 4:
@@ -309,13 +310,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/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index dbae7bad20..b0bc0732d4 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -3248,8 +3248,9 @@ IMPLEMENT_FUNCTION(63, August, function63)
break;
case kAction1:
- if (getEntities()->isInSalon(kEntityAlexei))
+ if (getEntities()->isInSalon(kEntityAlexei)) {
RESET_ENTITY_STATE(kEntityAlexei, Alexei, setup_function44);
+ }
getData()->inventoryItem = kItemNone;
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index 7860836a26..467c8d8b3c 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -723,8 +723,9 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition)
break;
case kActionNone:
- if (getEvent(kEventAnnaBaggageArgument))
+ if (getEvent(kEventAnnaBaggageArgument)) {
RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function22);
+ }
if (getEntities()->updateEntity(kEntityKahina, (CarIndex)params->param1, (EntityPosition)params->param2))
callbackAction();
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 3fbbf84469..92f07a566e 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -337,11 +337,11 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
} else if (strcmp(argv[2], "activate") == 0) {
// Activate the hotspot
res.activateHotspot(hs->hotspotId);
- hs->flags &= !HOTSPOTFLAG_MENU_EXCLUSION;
+ hs->flags &= ~HOTSPOTFLAG_MENU_EXCLUSION;
DebugPrintf("Activated\n");
} else if (strcmp(argv[2], "deactivate") == 0) {
- // Activate the hotspot
+ // Deactivate the hotspot
res.deactivateHotspot(hs->hotspotId);
hs->flags |= HOTSPOTFLAG_MENU_EXCLUSION;
DebugPrintf("Deactivated\n");
diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index ab7615c265..64d26c4c04 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -70,7 +70,7 @@ static const LureGameDescription gameDescriptions[] = {
"VGA",
AD_ENTRY1("disk1.vga", "b2a8aa6d7865813a17a3c636e063572e"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -83,7 +83,7 @@ static const LureGameDescription gameDescriptions[] = {
"EGA",
AD_ENTRY1("disk1.ega", "e9c9fdd8a19f7910d68e53cb84651273"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -96,7 +96,7 @@ static const LureGameDescription gameDescriptions[] = {
"VGA",
AD_ENTRY1("disk1.vga", "cf69d5ada228dd74f89046691c16aafb"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -109,7 +109,7 @@ static const LureGameDescription gameDescriptions[] = {
"EGA",
AD_ENTRY1("disk1.ega", "b80aced0321f64c58df2c7d3d74dfe79"),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -122,7 +122,7 @@ static const LureGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("disk1.vga", "7aa19e444dab1ac7194d9f7a40ffe54a"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -135,7 +135,7 @@ static const LureGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("disk1.vga", "894a2c2caeccbad2fc2f4a79a8ee47b0"),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -148,7 +148,7 @@ static const LureGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("disk1.vga", "1c94475c1bb7e0e88c1757d3b5377e94"),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -161,7 +161,7 @@ static const LureGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("disk1.vga", "1751145b653959f7a64fe1618d6b97ac"),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
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..7564ce91a0 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
@@ -47,6 +47,7 @@ MenuRecord::MenuRecord(const MenuRecordBounds *bounds, int numParams, ...) {
va_start(params, numParams);
for (int index = 0; index < _numEntries; ++index)
_entries[index] = va_arg(params, const char *);
+ va_end(params);
// Store position data
_hsxstart = bounds->left; _hsxend = bounds->right;
@@ -458,7 +459,7 @@ Action PopupMenu::Show(int numEntries, Action *actions) {
strList[index] = stringList.getString(*actionPtr++);
uint16 result = Show(numEntries, strList);
- delete strList;
+ Memory::dealloc(strList);
if (result == 0xffff) return NONE;
else return actions[result];
}
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index aee4f11215..15e7c1302d 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -1262,7 +1262,7 @@ bool ValueTableData::isKnownField(uint16 fieldIndex) {
}
uint16 ValueTableData::getField(uint16 fieldIndex) {
- if (fieldIndex > NUM_VALUE_FIELDS)
+ if (fieldIndex >= NUM_VALUE_FIELDS)
error("Invalid field index specified %d", fieldIndex);
// if (!isKnownField(fieldIndex))
// warning("Unknown field index %d in GET_FIELD opcode", fieldIndex);
@@ -1274,7 +1274,7 @@ uint16 ValueTableData::getField(FieldName fieldName) {
}
void ValueTableData::setField(uint16 fieldIndex, uint16 value) {
- if (fieldIndex > NUM_VALUE_FIELDS)
+ if (fieldIndex >= NUM_VALUE_FIELDS)
error("Invalid field index specified %d", fieldIndex);
_fieldList[fieldIndex] = value;
// if (!isKnownField(fieldIndex))
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/lure/scripts.cpp b/engines/lure/scripts.cpp
index df2f06df96..8afdaa5ad1 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -673,7 +673,7 @@ void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) {
// Stores the current number of groats in the general field
void Script::getNumGroats(uint16 v1, uint16 v2, uint16 v3) {
- ValueTableData fields = Resources::getReference().fieldList();
+ ValueTableData &fields = Resources::getReference().fieldList();
fields.setField(GENERAL, fields.numGroats());
}
diff --git a/engines/made/console.cpp b/engines/made/console.cpp
index c835988788..0076b6a4f9 100644
--- a/engines/made/console.cpp
+++ b/engines/made/console.cpp
@@ -26,6 +26,7 @@
namespace Made {
MadeConsole::MadeConsole(MadeEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
MadeConsole::~MadeConsole() {
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 2b87f97392..7c8f9bdd0c 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -665,15 +665,16 @@ bool GameDatabaseV3::getSavegameDescription(const char *filename, Common::String
}
int32 size = in->readUint32LE();
- if (size != in->size() - 64) {
- warning("Unexpected save game size. Expected %d, size is %d (file size - 64)", size, in->size() - 64);
+ int16 saveVersion = in->readUint16LE();
+
+ if (saveVersion != version) {
+ warning("Save game %s was saved with a different version of the game. Game version is %d, save version is %d", filename, version, saveVersion);
delete in;
return false;
}
- int16 saveVersion = in->readUint16LE();
- if (saveVersion != version) {
- warning("Save game %s was saved with a different version of the game. Game version is %d, save version is %d", filename, version, saveVersion);
+ if (size != in->size() - 64) {
+ warning("Unexpected save game size. Expected %d, size is %d (file size - 64)", size, in->size() - 64);
delete in;
return false;
}
@@ -694,7 +695,7 @@ int16 GameDatabaseV3::savegame(const char *filename, const char *description, in
warning("Can't create file '%s', game not saved", filename);
return 6;
}
- strncpy(desc, description, 64);
+ Common::strlcpy(desc, description, 64);
out->writeUint32BE(MKTAG('S','G','A','M'));
out->writeUint32LE(size);
out->writeUint16LE(version);
@@ -722,15 +723,16 @@ int16 GameDatabaseV3::loadgame(const char *filename, int16 version) {
}
uint32 size = in->readUint32LE();
- if (size != expectedSize) {
- warning("Unexpected save game size. Expected %d, size is %d", expectedSize, size);
+ int16 saveVersion = in->readUint16LE();
+
+ if (saveVersion != version) {
+ warning("Save game %s was saved with a different version of the game. Game version is %d, save version is %d", filename, version, saveVersion);
delete in;
return 1;
}
- int16 saveVersion = in->readUint16LE();
- if (saveVersion != version) {
- warning("Save game %s was saved with a different version of the game. Game version is %d, save version is %d", filename, version, saveVersion);
+ if (size != expectedSize) {
+ warning("Unexpected save game size. Expected %d, size is %d", expectedSize, size);
delete in;
return 1;
}
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index 2591e92af3..e8b755cb40 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -78,7 +78,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.0, 9/15/93, installed, CD",
AD_ENTRY1("rtzcd.dat", "e95c38ded389e39cfbf87a8cb250b12e"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -96,7 +96,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.0, 9/15/93, CD",
AD_ENTRY1("rtzcd.red", "cd8b62ece4677c438688c1de3f5379b9"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -113,7 +113,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.1, 12/7/93, installed, CD",
AD_ENTRY1s("rtzcd.dat", "a1db8c97a78dae10f91d356f16ad07b8", 536064),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -130,7 +130,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.1, 12/7/93, CD",
AD_ENTRY1s("rtzcd.red", "c4e2430e6b6c6ff1562a80fb4a9df24c", 276177),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -148,7 +148,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 9/29/94, installed, CD",
AD_ENTRY1("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -165,7 +165,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 9/29/94, CD",
AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 276584),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -183,7 +183,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 9/29/94, installed, CD",
AD_ENTRY1s("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a", 525824),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -201,7 +201,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 4/18/95, CD",
AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 355442),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -219,7 +219,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 3/31/95, installed, CD",
AD_ENTRY1s("rtzcd.dat", "5b86035aed0277f96e3d173542b5364a", 523776),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -237,7 +237,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 3/31/95, CD",
AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354971),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -255,7 +255,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 5/13/95, installed, CD",
AD_ENTRY1s("rtzcd.dat", "bde8251a8e34e87c54e3f93147d56c9e", 523776),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -273,7 +273,7 @@ static const MadeGameDescription gameDescriptions[] = {
"V1.2, 3/31/95, CD",
AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354614),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -290,7 +290,7 @@ static const MadeGameDescription gameDescriptions[] = {
"Floppy",
AD_ENTRY1("rtz.prj", "764d02f52ce1c219f2c0066677fba4ce"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -307,7 +307,7 @@ static const MadeGameDescription gameDescriptions[] = {
"Demo",
AD_ENTRY1("demo.dat", "2a6a1354bd5346fad4aee08e5b56caaa"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO0()
},
@@ -325,7 +325,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("rtzcd.dat", "c4fccf67ad247f09b94c3c808b138576"),
Common::JA_JPN,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -378,7 +378,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("manhole.dat", "cb21e31ed35c963208343bc995225b73"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOSPEECH)
},
@@ -395,7 +395,7 @@ static const MadeGameDescription gameDescriptions[] = {
"EGA",
AD_ENTRY1("manhole.dat", "2b1658292599a861c4cd3cf6cdb3c581"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -412,7 +412,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("lgop2.dat", "8137996db200ff67e8f172ff106f2e48"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -430,7 +430,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("lgop2.dat", "a0ffea6a3b7e39bd861edd00c397641c", 299466),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -448,7 +448,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("lgop2.dat", "f9e974087af7cf4b7ec2d8dc45d01e0c", 295366),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -466,7 +466,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("lgop2.dat", "96eb95b4d75b9a3da0b0d67e3b4a787d", 288984),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -483,7 +483,7 @@ static const MadeGameDescription gameDescriptions[] = {
"",
AD_ENTRY1("rodneys.dat", "a79887dbaa47689facd7c6f09258ba5a"),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -506,7 +506,7 @@ static MadeGameDescription g_fallbackDesc = {
"",
AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -560,7 +560,7 @@ bool MadeMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
const ADGameDescription *MadeMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const {
// Set the default values for the fallback descriptor's ADGameDescription part.
Made::g_fallbackDesc.desc.language = Common::UNK_LANG;
- Made::g_fallbackDesc.desc.platform = Common::kPlatformPC;
+ Made::g_fallbackDesc.desc.platform = Common::kPlatformDOS;
Made::g_fallbackDesc.desc.flags = ADGF_NO_FLAGS;
// Set default values for the fallback descriptor's MadeGameDescription part.
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index a7a650d8ed..ce22132cee 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -75,7 +75,7 @@ bool MystConsole::Cmd_ChangeCard(int argc, const char **argv) {
}
_vm->_sound->stopSound();
- _vm->changeToCard((uint16)atoi(argv[1]), true);
+ _vm->changeToCard((uint16)atoi(argv[1]), kTransitionCopy);
return false;
}
@@ -531,6 +531,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
varNames.push_back(name);
}
delete nameStream;
+ delete[] stringOffsets;
// Load in External Command Names
nameStream = _vm->getResource(ID_NAME, ExternalCommandNames);
@@ -552,6 +553,7 @@ bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
xNames.push_back(name);
}
delete nameStream;
+ delete[] stringOffsets;
// Get CARD/HSPT data and dump their scripts
if (!scumm_stricmp(argv[2], "CARD")) {
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index e73d4ed6a3..c7bd03678f 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -106,8 +106,8 @@ void MystCursorManager::hideCursor() {
void MystCursorManager::setCursor(uint16 id) {
// Zero means empty cursor
if (id == 0) {
- static const byte emptyCursor = 0;
- CursorMan.replaceCursor(&emptyCursor, 1, 1, 0, 0, 0);
+ static const byte emptyCursor[4] = { 0, 0, 0, 0 };
+ CursorMan.replaceCursor(&emptyCursor, 2, 2, 0, 0, 0);
return;
}
@@ -160,6 +160,7 @@ void NECursorManager::setCursor(uint16 id) {
Graphics::Cursor *cursor = cursorGroup->cursors[0].cursor;
CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor());
CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256);
+ delete cursorGroup;
return;
}
}
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 5664929948..ef07de0180 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -143,6 +143,7 @@ static const PlainGameDescriptor mohawkGames[] = {
{"harryhh","Harry and the Haunted House"},
{"stellaluna", "Stellaluna"},
{"sheila", "Sheila Rae, the Brave"},
+ {"rugratsps", "Rugrats Print Shop" },
{0, 0}
};
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 55814af1c3..3b925af5a9 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
{
@@ -1325,6 +1361,23 @@ static const MohawkGameDescription gameDescriptions[] = {
"GRANDMA.EXE"
},
+ // Just Grandma and Me 1.1 Mac
+ // From eisnerguy1 in bug#3610725
+ {
+ {
+ "grandma",
+ "v1.1",
+ AD_ENTRY1("BookOutline", "76eb265ec5fe42bc5b07f2bb418bd871"),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_LIVINGBOOKSV1,
+ GF_LB_10,
+ 0
+ },
+
// from jjnryan in bug #3389857
{
{
@@ -2096,6 +2149,24 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // Rugrats Adventure Game
+ // English Windows Demo
+ // From GeorgeQGreg (Rugrats Movie Soundtrack)
+ {
+ {
+ "rugrats",
+ "Demo",
+ AD_ENTRY1("outline", "adbd7ff6c5e1bdb7062c89879a4e39e6"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_LIVINGBOOKSV4,
+ 0,
+ 0
+ },
+
{
{
"lbsampler",
@@ -2507,6 +2578,24 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // Rugrats Print Shop
+ // English Windows Demo
+ // From GeorgeQGreg (Rugrats Movie Soundtrack)
+ {
+ {
+ "rugratsps",
+ "Demo",
+ AD_ENTRY1("outline", "808d5ee8427180ddebdd5dd4199b47cb"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO | ADGF_UNSTABLE,
+ GUIO1(GUIO_NOASPECT)
+ },
+ GType_LIVINGBOOKSV4,
+ 0,
+ 0
+ },
+
{ AD_TABLE_END_MARKER, 0, 0, 0 }
};
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 4461a30ad4..5f5a3b3800 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -137,12 +137,6 @@ void MystOptionsDialog::open() {
void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
- case kZipCmd:
- _vm->_gameState->_globals.zipMode = _zipModeCheckbox->getState();
- break;
- case kTransCmd:
- _vm->_gameState->_globals.transitions = _transitionsCheckbox->getState();
- break;
case kDropCmd:
_vm->_needsPageDrop = true;
close();
@@ -155,8 +149,10 @@ void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, ui
_vm->_needsShowDemoMenu = true;
close();
break;
- case GUI::kCloseCmd:
- close();
+ case GUI::kOKCmd:
+ _vm->_gameState->_globals.zipMode = _zipModeCheckbox->getState();
+ _vm->_gameState->_globals.transitions = _transitionsCheckbox->getState();
+ GUI::OptionsDialog::handleCommand(sender, cmd, data);
break;
default:
GUI::OptionsDialog::handleCommand(sender, cmd, data);
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..efa0dd3fd3 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
@@ -146,16 +148,10 @@ MohawkEngine_LivingBooks::MohawkEngine_LivingBooks(OSystem *syst, const MohawkGa
const Common::FSNode gameDataDir(ConfMan.get("path"));
// Rugrats
- const Common::FSNode ProgPath = gameDataDir.getChild("program");
- if (ProgPath.exists())
- SearchMan.addDirectory(ProgPath.getPath(), ProgPath, 0, 2);
- const Common::FSNode RugPath = gameDataDir.getChild("Rugrats Adventure Game");
- if (RugPath.exists())
- SearchMan.addDirectory(RugPath.getPath(), RugPath, 0, 2);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "program", 0, 2);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Rugrats Adventure Game", 0, 2);
// CarmenTQ
- const Common::FSNode CTQPath = gameDataDir.getChild("95instal");
- if (CTQPath.exists())
- SearchMan.addDirectory(CTQPath.getPath(), CTQPath, 0, 4);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "95instal", 0, 4);
}
MohawkEngine_LivingBooks::~MohawkEngine_LivingBooks() {
@@ -223,7 +219,7 @@ Common::Error MohawkEngine_LivingBooks::run() {
}
}
- if (found)
+ if (found && CursorMan.isVisible())
found->handleMouseDown(event.mouse);
break;
@@ -243,6 +239,8 @@ Common::Error MohawkEngine_LivingBooks::run() {
case Common::KEYCODE_ESCAPE:
if (_curMode == kLBIntroMode)
tryLoadPageStart(kLBControlMode, 1);
+ else
+ _video->stopVideos();
break;
case Common::KEYCODE_LEFT:
@@ -585,8 +583,8 @@ void MohawkEngine_LivingBooks::updatePage() {
_items.remove_at(i);
i--;
_orderedItems.remove(delayedEvent.item);
- delete delayedEvent.item;
_page->itemDestroyed(delayedEvent.item);
+ delete delayedEvent.item;
if (_focus == delayedEvent.item)
_focus = NULL;
break;
@@ -1354,8 +1352,9 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) {
if (!loadPage((LBMode)event.newMode, event.newPage, event.newSubpage)) {
if (event.newPage != 0 || !loadPage((LBMode)event.newMode, _curPage, event.newSubpage))
if (event.newSubpage != 0 || !loadPage((LBMode)event.newMode, event.newPage, 1))
- error("kLBNotifyChangeMode failed to move to mode %d, page %d.%d",
- event.newMode, event.newPage, event.newSubpage);
+ if (event.newSubpage != 1 || !loadPage((LBMode)event.newMode, event.newPage, 0))
+ error("kLBNotifyChangeMode failed to move to mode %d, page %d.%d",
+ event.newMode, event.newPage, event.newSubpage);
}
break;
case 3:
@@ -3773,7 +3772,7 @@ LBMovieItem::~LBMovieItem() {
void LBMovieItem::update() {
if (_playing) {
VideoHandle videoHandle = _vm->_video->findVideoHandle(_resourceId);
- if (_vm->_video->endOfVideo(videoHandle))
+ if (videoHandle == NULL_VID_HANDLE || _vm->_video->endOfVideo(videoHandle))
done(true);
}
@@ -3783,6 +3782,7 @@ void LBMovieItem::update() {
bool LBMovieItem::togglePlaying(bool playing, bool restart) {
if (playing) {
if ((_loaded && _enabled && _globalEnabled) || _phase == kLBPhaseNone) {
+ debug("toggled video for phase %d", _phase);
_vm->_video->playMovie(_resourceId, _rect.left, _rect.top);
return true;
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index bb8f7a0d05..c45efb2c39 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -519,9 +519,17 @@ void LBCode::parseMain() {
*val = _stack.pop();
_stack.push(*val);
} else
- _stack.push(LBValue());
- } else if (_currToken == kTokenAndEquals) {
- debugN(" &= ");
+ error("assignment failed, no dest");
+// _stack.push(LBValue());
+ } else if (_currToken == kTokenPlusEquals || _currToken == kTokenMinusEquals || _currToken == kTokenAndEquals) {
+ // FIXME: do +=/-= belong here?
+ byte token = _currToken;
+ if (_currToken == kTokenPlusEquals)
+ debugN(" += ");
+ else if (_currToken == kTokenMinusEquals)
+ debugN(" -= ");
+ else if (_currToken == kTokenAndEquals)
+ debugN(" &= ");
nextToken();
parseStatement();
if (!_stack.size())
@@ -532,9 +540,19 @@ void LBCode::parseMain() {
else
val = &_vm->_variables[varname];
if (val) {
- if (val->type != kLBValueString)
- error("operator &= used on non-string");
- val->string = val->string + _stack.pop().toString();
+ if (token == kTokenAndEquals) {
+ if (val->type != kLBValueString)
+ error("operator &= used on non-string");
+ val->string = val->string + _stack.pop().toString();
+ } else {
+ // FIXME: non-integers
+ if (val->type != kLBValueInteger)
+ error("operator used on non-integer");
+ if (token == kTokenPlusEquals)
+ val->integer = val->integer + _stack.pop().toInt();
+ else
+ val->integer = val->integer - _stack.pop().toInt();
+ }
_stack.push(*val);
} else
_stack.push(LBValue());
@@ -581,6 +599,7 @@ void LBCode::parseMain() {
debugN("--");
nextToken();
+ // FIXME: do we need to handle indexing?
if (_currToken != kTokenIdentifier)
error("expected identifier");
assert(_currValue.type == kLBValueString);
@@ -669,6 +688,24 @@ void LBCode::parseMain() {
_stack.push(_stack.pop().isZero() ? 1 : 0);
break;
+ case kTokenEval:
+ // FIXME: original token?
+ debugN("..");
+ nextToken();
+ parseStatement();
+ if (!_stack.size())
+ error("eval op failed");
+ {
+ // FIXME: XXX
+ LBValue in = _stack.pop();
+ if (in.type != kLBValueString)
+ error("eval op on non-string");
+ Common::String varname = in.string;
+ LBValue &val = _vm->_variables[varname];
+ _stack.push(val);
+ }
+ break;
+
case kTokenGeneralCommand:
runGeneralCommand();
break;
@@ -692,9 +729,7 @@ void LBCode::parseMain() {
assert(val.isNumeric());
// FIXME
if (prefix == kTokenMinus)
- val.integer--;
- else
- val.integer++;
+ val.integer = -val.integer;
_stack.push(val);
}
}
@@ -1554,12 +1589,32 @@ uint LBCode::nextFreeString() {
error("nextFreeString couldn't find a space");
}
+static const char *const functionNameAliases[][2] = {
+ { "makerect", "getRect" },
+ { "makepair", "makePt" },
+ { "getframerect", "getFrameBounds" },
+ { "dragbegin", "dragBeginFrom" },
+ { "x", "xpos" },
+ { "y", "ypos" }
+};
+
/*
* Helper function for parseCode:
* Given a name, appends the appropriate data to the provided code array and
* returns true if it's a function, or false otherwise.
*/
-bool LBCode::parseCodeSymbol(const Common::String &name, uint &pos, Common::Array<byte> &code) {
+bool LBCode::parseCodeSymbol(Common::String name, uint &pos, Common::Array<byte> &code, bool useAllAliases) {
+ // Check to see if we have one of the older function names
+ // and remap it to the newer function names
+ for (uint i = 0; i < ARRAYSIZE(functionNameAliases); i++) {
+ if (name.equalsIgnoreCase(functionNameAliases[i][0])) {
+ if (name.size() == 1 && !useAllAliases)
+ continue;
+ name = functionNameAliases[i][1];
+ break;
+ }
+ }
+
// first, check whether the name matches a known function
for (uint i = 0; i < 2; i++) {
byte cmdToken;
@@ -1770,7 +1825,7 @@ uint LBCode::parseCode(const Common::String &source) {
break;
tempString += source[pos++];
}
- wasFunction = parseCodeSymbol(tempString, pos, code);
+ wasFunction = parseCodeSymbol(tempString, pos, code, true);
if (!wasFunction)
error("while parsing script '%s', encountered explicit function call to unknown function '%s'",
source.c_str(), tempString.c_str());
@@ -1805,7 +1860,7 @@ uint LBCode::parseCode(const Common::String &source) {
} else if (tempString.equalsIgnoreCase("false")) {
code.push_back(kTokenFalse);
} else {
- wasFunction = parseCodeSymbol(tempString, pos, code);
+ wasFunction = parseCodeSymbol(tempString, pos, code, false);
}
} else {
error("while parsing script '%s', couldn't parse '%c'", source.c_str(), token);
diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h
index 47dd90f814..c9d9ae06e6 100644
--- a/engines/mohawk/livingbooks_code.h
+++ b/engines/mohawk/livingbooks_code.h
@@ -188,6 +188,7 @@ enum {
kTokenConstEventId = 0x42,
kTokenConstScriptOpcode = 0x43, // ??
kTokenConstScriptParam = 0x44, // ??
+ kTokenEval = 0x4b,
kTokenGeneralCommand = 0x4d,
kTokenItemCommand = 0x4e,
kTokenNotifyCommand = 0x4f,
@@ -242,7 +243,7 @@ protected:
void runNotifyCommand();
uint nextFreeString();
- bool parseCodeSymbol(const Common::String &name, uint &pos, Common::Array<byte> &code);
+ bool parseCodeSymbol(Common::String name, uint &pos, Common::Array<byte> &code, bool useAllAliases);
public:
void cmdUnimplemented(const Common::Array<LBValue> &params);
diff --git a/engines/mohawk/livingbooks_lbx.cpp b/engines/mohawk/livingbooks_lbx.cpp
index 9628e06294..2b8b22ec81 100644
--- a/engines/mohawk/livingbooks_lbx.cpp
+++ b/engines/mohawk/livingbooks_lbx.cpp
@@ -48,8 +48,10 @@ LBXDataFile::~LBXDataFile() {
enum {
kLBXDataFileOpen = 1,
+ kLBXDataFileAddSection = 3,
kLBXDataFileGetSectionList = 4,
kLBXDataFileSetCurSection = 5,
+ kLBXDataFileSetKey = 7,
kLBXDataFileLoadCurSectionVars = 8,
kLBXDataFileDeleteCurSection = 10,
kLBXDataFileSectionExists = 14
@@ -64,6 +66,14 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> &params, LBValu
open(params[0].toString());
return false;
+ case kLBXDataFileAddSection:
+ if (params.size() != 1)
+ error("incorrect number of parameters (%d) to LBXDataFile::addSection", params.size());
+
+ _dataFile.addSection(params[0].toString());
+ _curSection = params[0].toString();
+ return false;
+
case kLBXDataFileGetSectionList:
{
Common::SharedPtr<LBList> list = Common::SharedPtr<LBList>(new LBList);
@@ -81,6 +91,13 @@ bool LBXDataFile::call(uint callId, const Common::Array<LBValue> &params, LBValu
_curSection = params[0].toString();
return false;
+ case kLBXDataFileSetKey:
+ if (params.size() != 2)
+ error("incorrect number of parameters (%d) to LBXDataFile::setKey", params.size());
+
+ _dataFile.setKey(params[0].toString(), _curSection, params[1].toString());
+ return false;
+
case kLBXDataFileLoadCurSectionVars:
if (params.size() != 0)
error("incorrect number of parameters (%d) to LBXDataFile::loadCurSectionVars", params.size());
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 9c0e642203..8140817eb3 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -523,7 +523,7 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
_video->playMovieBlockingCentered(wrapMovieFilename(flyby, kMasterpieceOnly));
}
- changeToCard(card, true);
+ changeToCard(card, kTransitionCopy);
if (linkDstSound)
_sound->playSoundBlocking(linkDstSound);
@@ -549,7 +549,7 @@ void MohawkEngine_Myst::drawCardBackground() {
_gfx->copyImageToBackBuffer(getCardBackgroundId(), Common::Rect(0, 0, 544, 332));
}
-void MohawkEngine_Myst::changeToCard(uint16 card, bool updateScreen) {
+void MohawkEngine_Myst::changeToCard(uint16 card, TransitionType transition) {
debug(2, "changeToCard(%d)", card);
_scriptParser->disablePersistentScripts();
@@ -629,9 +629,11 @@ void MohawkEngine_Myst::changeToCard(uint16 card, bool updateScreen) {
}
// Make sure the screen is updated
- if (updateScreen) {
- _gfx->copyBackBufferToScreen(Common::Rect(544, 333));
- _system->updateScreen();
+ if (transition != kNoTransition) {
+ if (!_gameState->_globals.transitions)
+ transition = kTransitionCopy;
+
+ _gfx->runTransition(transition, Common::Rect(544, 333), 10, 0);
}
// Make sure we have the right cursor showing
@@ -1179,41 +1181,41 @@ bool MohawkEngine_Myst::canSaveGameStateCurrently() {
}
void MohawkEngine_Myst::dropPage() {
- uint16 page = _gameState->_globals.heldPage;
+ uint16 page = _gameState->_globals.heldPage;
bool whitePage = page == 13;
bool bluePage = page - 1 < 6;
- bool redPage = page - 7 < 6;
-
- // Play drop page sound
- _sound->replaceSoundMyst(800);
-
- // Drop page
- _gameState->_globals.heldPage = 0;
-
- // Redraw page area
- if (whitePage && _gameState->_globals.currentAge == 2) {
- redrawArea(41);
- } else if (bluePage) {
- if (page == 6) {
- if (_gameState->_globals.currentAge == 2)
- redrawArea(24);
- } else {
- redrawArea(103);
- }
- } else if (redPage) {
- if (page == 12) {
- if (_gameState->_globals.currentAge == 2)
- redrawArea(25);
- } else if (page == 10) {
- if (_gameState->_globals.currentAge == 1)
- redrawArea(35);
- } else {
- redrawArea(102);
- }
- }
-
- setMainCursor(kDefaultMystCursor);
- checkCursorHints();
+ bool redPage = page - 7 < 6;
+
+ // Play drop page sound
+ _sound->replaceSoundMyst(800);
+
+ // Drop page
+ _gameState->_globals.heldPage = 0;
+
+ // Redraw page area
+ if (whitePage && _gameState->_globals.currentAge == 2) {
+ redrawArea(41);
+ } else if (bluePage) {
+ if (page == 6) {
+ if (_gameState->_globals.currentAge == 2)
+ redrawArea(24);
+ } else {
+ redrawArea(103);
+ }
+ } else if (redPage) {
+ if (page == 12) {
+ if (_gameState->_globals.currentAge == 2)
+ redrawArea(25);
+ } else if (page == 10) {
+ if (_gameState->_globals.currentAge == 1)
+ redrawArea(35);
+ } else {
+ redrawArea(102);
+ }
+ }
+
+ setMainCursor(kDefaultMystCursor);
+ checkCursorHints();
}
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst.h b/engines/mohawk/myst.h
index 30770f7ec9..a268c19737 100644
--- a/engines/mohawk/myst.h
+++ b/engines/mohawk/myst.h
@@ -75,6 +75,23 @@ enum {
kStoneshipStack // Stoneship Age
};
+// Transitions
+enum TransitionType {
+ kTransitionLeftToRight = 0,
+ kTransitionRightToLeft = 1,
+ kTransitionSlideToLeft = 2,
+ kTransitionSlideToRight = 3,
+ kTransitionDissolve = 4,
+ kTransitionTopToBottom = 5,
+ kTransitionBottomToTop = 6,
+ kTransitionSlideToTop = 7,
+ kTransitionSlideToBottom= 8,
+ kTransitionPartToRight = 9,
+ kTransitionPartToLeft = 10,
+ kTransitionCopy = 11,
+ kNoTransition = 999
+};
+
const uint16 kMasterpieceOnly = 0xFFFF;
struct MystCondition {
@@ -154,7 +171,7 @@ public:
void reloadSaveList();
void changeToStack(uint16 stack, uint16 card, uint16 linkSrcSound, uint16 linkDstSound);
- void changeToCard(uint16 card, bool updateScreen);
+ void changeToCard(uint16 card, TransitionType transition);
uint16 getCurCard() { return _curCard; }
uint16 getCurStack() { return _curStack; }
void setMainCursor(uint16 cursor);
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index a54b67bef4..12a2c7f44c 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -70,10 +70,30 @@ MystResource::~MystResource() {
}
void MystResource::handleMouseUp() {
- if (_dest != 0)
- _vm->changeToCard(_dest, true);
- else
+ if (_dest == 0) {
warning("Movement type resource with null destination at position (%d, %d), (%d, %d)", _rect.left, _rect.top, _rect.right, _rect.bottom);
+ return;
+ }
+
+ uint16 opcode;
+
+ switch (type) {
+ case kMystForwardArea:
+ opcode = 6;
+ break;
+ case kMystLeftArea:
+ opcode = 8;
+ break;
+ case kMystRightArea:
+ opcode = 7;
+ break;
+ default:
+ opcode = 48;
+ break;
+ }
+
+ _vm->_scriptParser->setInvokingResource(this);
+ _vm->_scriptParser->runOpcode(opcode, 0);
}
bool MystResource::canBecomeActive() {
@@ -202,22 +222,23 @@ VideoHandle MystResourceType6::playMovie() {
// Check if the video is already running
VideoHandle handle = _vm->_video->findVideoHandle(_videoFile);
- if (_direction != 1)
- warning("Playing QT movies backwards is not implemented");
-
// If the video is not running, play it
if (handle == NULL_VID_HANDLE || _vm->_video->endOfVideo(handle)) {
- if (_playBlocking) {
- _vm->_video->playMovieBlocking(_videoFile, _left, _top);
- handle = NULL_VID_HANDLE;
- } else {
- handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
+ handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
+ if (_direction == -1) {
+ _vm->_video->seekToTime(handle, _vm->_video->getDuration(handle));
+ _vm->_video->setVideoRate(handle, -1);
}
} else {
// Resume the video
_vm->_video->pauseMovie(handle, false);
}
+ if (_playBlocking) {
+ _vm->_video->waitUntilMovieEnds(handle);
+ handle = NULL_VID_HANDLE;
+ }
+
return handle;
}
diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp
index 2df0f7e6ba..6a292c66e2 100644
--- a/engines/mohawk/myst_graphics.cpp
+++ b/engines/mohawk/myst_graphics.cpp
@@ -209,15 +209,15 @@ void MystGraphics::copyBackBufferToScreen(Common::Rect r) {
_vm->_system->copyRectToScreen(_backBuffer->getBasePtr(r.left, r.top), _backBuffer->pitch, r.left, r.top, r.width(), r.height());
}
-void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay) {
+void MystGraphics::runTransition(TransitionType type, Common::Rect rect, uint16 steps, uint16 delay) {
// Do not artificially delay during transitions
int oldEnableDrawingTimeSimulation = _enableDrawingTimeSimulation;
_enableDrawingTimeSimulation = 0;
switch (type) {
- case 0: {
- debugC(kDebugScript, "Left to Right");
+ case kTransitionLeftToRight: {
+ debugC(kDebugView, "Left to Right");
uint16 step = (rect.right - rect.left) / steps;
Common::Rect area = rect;
@@ -239,8 +239,8 @@ void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, u
}
}
break;
- case 1: {
- debugC(kDebugScript, "Right to Left");
+ case kTransitionRightToLeft: {
+ debugC(kDebugView, "Right to Left");
uint16 step = (rect.right - rect.left) / steps;
Common::Rect area = rect;
@@ -262,8 +262,25 @@ void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, u
}
}
break;
- case 5: {
- debugC(kDebugScript, "Top to Bottom");
+ case kTransitionSlideToLeft:
+ debugC(kDebugView, "Slide to left");
+ transitionSlideToLeft(rect, steps, delay);
+ break;
+ case kTransitionSlideToRight:
+ debugC(kDebugView, "Slide to right");
+ transitionSlideToRight(rect, steps, delay);
+ break;
+ case kTransitionDissolve: {
+ debugC(kDebugView, "Dissolve");
+
+ for (int16 step = 0; step < 8; step++) {
+ simulatePreviousDrawDelay(rect);
+ transitionDissolve(rect, step);
+ }
+ }
+ break;
+ case kTransitionTopToBottom: {
+ debugC(kDebugView, "Top to Bottom");
uint16 step = (rect.bottom - rect.top) / steps;
Common::Rect area = rect;
@@ -285,8 +302,8 @@ void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, u
}
}
break;
- case 6: {
- debugC(kDebugScript, "Bottom to Top");
+ case kTransitionBottomToTop: {
+ debugC(kDebugView, "Bottom to Top");
uint16 step = (rect.bottom - rect.top) / steps;
Common::Rect area = rect;
@@ -308,18 +325,260 @@ void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, u
}
}
break;
- default:
- warning("Unknown Update Direction");
+ case kTransitionSlideToTop:
+ debugC(kDebugView, "Slide to top");
+ transitionSlideToTop(rect, steps, delay);
+ break;
+ case kTransitionSlideToBottom:
+ debugC(kDebugView, "Slide to bottom");
+ transitionSlideToBottom(rect, steps, delay);
+ break;
+ case kTransitionPartToRight: {
+ debugC(kDebugView, "Partial left to right");
+
+ transitionPartialToRight(rect, 75, 3);
+ }
+ break;
+ case kTransitionPartToLeft: {
+ debugC(kDebugView, "Partial right to left");
- //TODO: Replace minimal implementation
+ transitionPartialToLeft(rect, 75, 3);
+ }
+ break;
+ case kTransitionCopy:
copyBackBufferToScreen(rect);
_vm->_system->updateScreen();
break;
+ default:
+ error("Unknown transition %d", type);
}
_enableDrawingTimeSimulation = oldEnableDrawingTimeSimulation;
}
+void MystGraphics::transitionDissolve(Common::Rect rect, uint step) {
+ static const bool pattern[][4][4] = {
+ {
+ { true, false, false, false },
+ { false, false, false, false },
+ { false, false, true, false },
+ { false, false, false, false }
+ },
+ {
+ { false, false, true, false },
+ { false, false, false, false },
+ { true, false, false, false },
+ { false, false, false, false }
+ },
+ {
+ { false, false, false, false },
+ { false, true, false, false },
+ { false, false, false, false },
+ { false, false, false, true }
+ },
+ {
+ { false, false, false, false },
+ { false, false, false, true },
+ { false, false, false, false },
+ { false, true, false, false }
+ },
+ {
+ { false, false, false, false },
+ { false, false, true, false },
+ { false, true, false, false },
+ { false, false, false, false }
+ },
+ {
+ { false, true, false, false },
+ { false, false, false, false },
+ { false, false, false, false },
+ { false, false, true, false }
+ },
+ {
+ { false, false, false, false },
+ { true, false, false, false },
+ { false, false, false, true },
+ { false, false, false, false }
+ },
+ {
+ { false, false, false, true },
+ { false, false, false, false },
+ { false, false, false, false },
+ { true, false, false, false }
+ }
+ };
+
+ rect.clip(_viewport);
+
+ Graphics::Surface *screen = _vm->_system->lockScreen();
+
+ for (uint16 y = rect.top; y < rect.bottom; y++) {
+ const bool *linePattern = pattern[step][y % 4];
+
+ if (!linePattern[0] && !linePattern[1] && !linePattern[2] && !linePattern[3])
+ continue;
+
+ for (uint16 x = rect.left; x < rect.right; x++) {
+ if (linePattern[x % 4]) {
+ if (_pixelFormat.bytesPerPixel == 2) {
+ uint16 *dst = (uint16 *)screen->getBasePtr(x, y);
+ *dst = *(const uint16 *)_backBuffer->getBasePtr(x, y);
+ } else {
+ uint32 *dst = (uint32 *)screen->getBasePtr(x, y);
+ *dst = *(const uint32 *)_backBuffer->getBasePtr(x, y);
+ }
+ }
+ }
+ }
+
+ _vm->_system->unlockScreen();
+ _vm->_system->updateScreen();
+}
+
+void MystGraphics::transitionSlideToLeft(Common::Rect rect, uint16 steps, uint16 delay) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = (rect.right - rect.left) / steps;
+ Common::Rect srcRect = Common::Rect(rect.right, rect.top, rect.right, rect.bottom);
+ Common::Rect dstRect = Common::Rect(rect.left, rect.top, rect.left, rect.bottom);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.right = dstRect.left + step * stepWidth;
+ srcRect.left = srcRect.right - step * stepWidth;
+
+ _vm->_system->delayMillis(delay);
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+ if (dstRect.right != rect.right) {
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+ }
+}
+
+void MystGraphics::transitionSlideToRight(Common::Rect rect, uint16 steps, uint16 delay) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = (rect.right - rect.left) / steps;
+ Common::Rect srcRect = Common::Rect(rect.left, rect.top, rect.left, rect.bottom);
+ Common::Rect dstRect = Common::Rect(rect.right, rect.top, rect.right, rect.bottom);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.left = dstRect.right - step * stepWidth;
+ srcRect.right = srcRect.left + step * stepWidth;
+
+ _vm->_system->delayMillis(delay);
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+ if (dstRect.left != rect.left) {
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+ }
+}
+
+void MystGraphics::transitionSlideToTop(Common::Rect rect, uint16 steps, uint16 delay) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = (rect.bottom - rect.top) / steps;
+ Common::Rect srcRect = Common::Rect(rect.left, rect.bottom, rect.right, rect.bottom);
+ Common::Rect dstRect = Common::Rect(rect.left, rect.top, rect.right, rect.top);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.bottom = dstRect.top + step * stepWidth;
+ srcRect.top = srcRect.bottom - step * stepWidth;
+
+ _vm->_system->delayMillis(delay);
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+
+ if (dstRect.bottom < rect.bottom) {
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+ }
+}
+
+void MystGraphics::transitionSlideToBottom(Common::Rect rect, uint16 steps, uint16 delay) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = (rect.bottom - rect.top) / steps;
+ Common::Rect srcRect = Common::Rect(rect.left, rect.top, rect.right, rect.top);
+ Common::Rect dstRect = Common::Rect(rect.left, rect.bottom, rect.right, rect.bottom);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.top = dstRect.bottom - step * stepWidth;
+ srcRect.bottom = srcRect.top + step * stepWidth;
+
+ _vm->_system->delayMillis(delay);
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+
+ if (dstRect.top > rect.top) {
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+ }
+}
+
+void MystGraphics::transitionPartialToRight(Common::Rect rect, uint32 width, uint32 steps) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = width / steps;
+ Common::Rect srcRect = Common::Rect(rect.right, rect.top, rect.right, rect.bottom);
+ Common::Rect dstRect = Common::Rect(rect.left, rect.top, rect.left, rect.bottom);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.right = dstRect.left + step * stepWidth;
+ srcRect.left = srcRect.right - step * stepWidth;
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+}
+
+void MystGraphics::transitionPartialToLeft(Common::Rect rect, uint32 width, uint32 steps) {
+ rect.clip(_viewport);
+
+ uint32 stepWidth = width / steps;
+ Common::Rect srcRect = Common::Rect(rect.left, rect.top, rect.left, rect.bottom);
+ Common::Rect dstRect = Common::Rect(rect.right, rect.top, rect.right, rect.bottom);
+
+ for (uint step = 1; step <= steps; step++) {
+ dstRect.left = dstRect.right - step * stepWidth;
+ srcRect.right = srcRect.left + step * stepWidth;
+
+ simulatePreviousDrawDelay(dstRect);
+ _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(dstRect.left, dstRect.top),
+ _backBuffer->pitch, srcRect.left, srcRect.top, srcRect.width(), srcRect.height());
+ _vm->_system->updateScreen();
+ }
+
+ copyBackBufferToScreen(rect);
+ _vm->_system->updateScreen();
+}
+
void MystGraphics::drawRect(Common::Rect rect, RectState state) {
rect.clip(_viewport);
diff --git a/engines/mohawk/myst_graphics.h b/engines/mohawk/myst_graphics.h
index de8fe521e6..4bbc8d5b8c 100644
--- a/engines/mohawk/myst_graphics.h
+++ b/engines/mohawk/myst_graphics.h
@@ -48,7 +48,7 @@ public:
void copyImageToScreen(uint16 image, Common::Rect dest);
void copyImageToBackBuffer(uint16 image, Common::Rect dest);
void copyBackBufferToScreen(Common::Rect r);
- void runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay);
+ void runTransition(TransitionType type, Common::Rect rect, uint16 steps, uint16 delay);
void drawRect(Common::Rect rect, RectState state);
void drawLine(const Common::Point &p1, const Common::Point &p2, uint32 color);
void enableDrawingTimeSimulation(bool enable);
@@ -60,7 +60,13 @@ protected:
MohawkEngine *getVM() { return (MohawkEngine *)_vm; }
void simulatePreviousDrawDelay(const Common::Rect &dest);
void copyBackBufferToScreenWithSaturation(int16 saturation);
-
+ void transitionDissolve(Common::Rect rect, uint step);
+ void transitionSlideToLeft(Common::Rect rect, uint16 steps, uint16 delay);
+ void transitionSlideToRight(Common::Rect rect, uint16 steps, uint16 delay);
+ void transitionSlideToTop(Common::Rect rect, uint16 steps, uint16 delay);
+ void transitionSlideToBottom(Common::Rect rect, uint16 steps, uint16 delay);
+ void transitionPartialToRight(Common::Rect rect, uint32 width, uint32 steps);
+ void transitionPartialToLeft(Common::Rect rect, uint32 width, uint32 steps);
private:
MohawkEngine_Myst *_vm;
MystBitmap *_bmpDecoder;
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 107a8b03e9..c1b75df4cf 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -100,18 +100,18 @@ void MystScriptParser::setupCommonOpcodes() {
// "Standard" Opcodes
OPCODE(0, o_toggleVar);
OPCODE(1, o_setVar);
- OPCODE(2, o_changeCardSwitch);
+ OPCODE(2, o_changeCardSwitch4);
OPCODE(3, o_takePage);
OPCODE(4, o_redrawCard);
// Opcode 5 Not Present
- OPCODE(6, o_goToDest);
- OPCODE(7, o_goToDest);
- OPCODE(8, o_goToDest);
+ OPCODE(6, o_goToDestForward);
+ OPCODE(7, o_goToDestLeft);
+ OPCODE(8, o_goToDestRight);
OPCODE(9, o_triggerMovie);
OPCODE(10, o_toggleVarNoRedraw);
// Opcode 11 Not Present
- OPCODE(12, o_changeCardSwitch);
- OPCODE(13, o_changeCardSwitch);
+ OPCODE(12, o_changeCardSwitchLtR);
+ OPCODE(13, o_changeCardSwitchRtL);
OPCODE(14, o_drawAreaState);
OPCODE(15, o_redrawAreaForVar);
OPCODE(16, o_changeCardDirectional);
@@ -120,7 +120,7 @@ void MystScriptParser::setupCommonOpcodes() {
OPCODE(19, o_enableAreas);
OPCODE(20, o_disableAreas);
OPCODE(21, o_directionalUpdate);
- OPCODE(22, o_goToDest);
+ OPCODE(22, o_goToDestUp);
OPCODE(23, o_toggleAreasActivation);
OPCODE(24, o_playSound);
// Opcode 25 is unused; original calls replaceSoundMyst
@@ -145,6 +145,7 @@ void MystScriptParser::setupCommonOpcodes() {
OPCODE(44, o_restoreMainCursor);
// Opcode 45 Not Present
OPCODE(46, o_soundWaitStop);
+ OPCODE(48, o_goToDest);
OPCODE(51, o_exitMap);
// Opcodes 47 to 99 Not Present
@@ -273,7 +274,7 @@ void MystScriptParser::animatedUpdate(uint16 argc, uint16 *argv, uint16 delay) {
while (argsRead < argc) {
Common::Rect rect = Common::Rect(argv[argsRead], argv[argsRead + 1], argv[argsRead + 2], argv[argsRead + 3]);
- uint16 kind = argv[argsRead + 4];
+ TransitionType kind = static_cast<TransitionType>(argv[argsRead + 4]);
uint16 steps = argv[argsRead + 5];
debugC(kDebugScript, "\trect.left: %d", rect.left);
@@ -323,16 +324,41 @@ void MystScriptParser::o_setVar(uint16 op, uint16 var, uint16 argc, uint16 *argv
_vm->redrawArea(var);
}
-void MystScriptParser::o_changeCardSwitch(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- // Opcodes 2, 12, and 13 are the same
+void MystScriptParser::o_changeCardSwitch4(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
uint16 value = getVar(var);
debugC(kDebugScript, "Opcode %d: changeCardSwitch var %d: %d", op, var, value);
if (value)
- _vm->changeToCard(argv[value -1 ], true);
+ _vm->changeToCard(argv[value -1 ], kTransitionDissolve);
else if (_invokingResource != NULL)
- _vm->changeToCard(_invokingResource->getDest(), true);
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionDissolve);
+ else
+ warning("Missing invokingResource in altDest call");
+}
+
+void MystScriptParser::o_changeCardSwitchLtR(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ uint16 value = getVar(var);
+
+ debugC(kDebugScript, "Opcode %d: changeCardSwitch var %d: %d", op, var, value);
+
+ if (value)
+ _vm->changeToCard(argv[value -1 ], kTransitionLeftToRight);
+ else if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionLeftToRight);
+ else
+ warning("Missing invokingResource in altDest call");
+}
+
+void MystScriptParser::o_changeCardSwitchRtL(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ uint16 value = getVar(var);
+
+ debugC(kDebugScript, "Opcode %d: changeCardSwitch var %d: %d", op, var, value);
+
+ if (value)
+ _vm->changeToCard(argv[value -1 ], kTransitionRightToLeft);
+ else if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionRightToLeft);
else
warning("Missing invokingResource in altDest call");
}
@@ -373,10 +399,47 @@ void MystScriptParser::o_goToDest(uint16 op, uint16 var, uint16 argc, uint16 *ar
debugC(kDebugScript, "Opcode %d: Change To Dest of Invoking Resource", op);
if (_invokingResource != NULL)
- _vm->changeToCard(_invokingResource->getDest(), true);
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionCopy);
+ else
+ warning("Opcode %d: Missing invokingResource", op);
+}
+
+void MystScriptParser::o_goToDestForward(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Change To Dest of Invoking Resource", op);
+
+ if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionDissolve);
+ else
+ warning("Opcode %d: Missing invokingResource", op);
+}
+
+void MystScriptParser::o_goToDestLeft(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Change To Dest of Invoking Resource", op);
+
+ if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionPartToRight);
+ else
+ warning("Opcode %d: Missing invokingResource", op);
+}
+
+void MystScriptParser::o_goToDestRight(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Change To Dest of Invoking Resource", op);
+
+ if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionPartToLeft);
else
warning("Opcode %d: Missing invokingResource", op);
}
+
+void MystScriptParser::o_goToDestUp(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Change To Dest of Invoking Resource", op);
+
+ if (_invokingResource != NULL)
+ _vm->changeToCard(_invokingResource->getDest(), kTransitionTopToBottom);
+ else
+ warning("Opcode %d: Missing invokingResource", op);
+}
+
void MystScriptParser::o_triggerMovie(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Trigger Type 6 Resource Movie..", op);
// TODO: If movie has sound, pause background music
@@ -427,7 +490,7 @@ void MystScriptParser::o_changeCardDirectional(uint16 op, uint16 var, uint16 arg
debugC(kDebugScript, "\tcardId: %d", cardId);
debugC(kDebugScript, "\tdirectonal update data size: %d", directionalUpdateDataSize);
- _vm->changeToCard(cardId, false);
+ _vm->changeToCard(cardId, kNoTransition);
animatedUpdate(directionalUpdateDataSize, &argv[2], 0);
}
@@ -440,23 +503,23 @@ void MystScriptParser::o_changeCardPush(uint16 op, uint16 var, uint16 argc, uint
debugC(kDebugScript, "Opcode %d: Jump to Card Id, Storing Current Card Id", op);
_savedCardId = _vm->getCurCard();
- uint16 cardId = argv[0];
- // argv[1] is not used in the original engine
+ uint16 cardId = argv[0];
+ TransitionType transition = static_cast<TransitionType>(argv[1]);
debugC(kDebugScript, "\tCurrent CardId: %d", _savedCardId);
debugC(kDebugScript, "\tJump to CardId: %d", cardId);
- _vm->changeToCard(cardId, true);
+ _vm->changeToCard(cardId, transition);
}
void MystScriptParser::o_changeCardPop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Return To Stored Card Id", op);
debugC(kDebugScript, "\tCardId: %d", _savedCardId);
- // argv[0] is not used in the original engine
+ TransitionType transition = static_cast<TransitionType>(argv[0]);
- _vm->changeToCard(_savedCardId, true);
+ _vm->changeToCard(_savedCardId, transition);
}
void MystScriptParser::o_enableAreas(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -752,14 +815,11 @@ void MystScriptParser::o_changeCard(uint16 op, uint16 var, uint16 argc, uint16 *
debugC(kDebugScript, "Opcode %d: Change Card", op);
uint16 cardId = argv[0];
-
- // Argument 1 if present is not used
- // uint16 u0 = argv[1];
+ TransitionType transition = static_cast<TransitionType>(argv[1]);
debugC(kDebugScript, "\tTarget Card: %d", cardId);
- //debugC(kDebugScript, "\tu0: %d", u0); // Unused data
- _vm->changeToCard(cardId, true);
+ _vm->changeToCard(cardId, transition);
}
void MystScriptParser::o_drawImageChangeCard(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -767,7 +827,7 @@ void MystScriptParser::o_drawImageChangeCard(uint16 op, uint16 var, uint16 argc,
uint16 imageId = argv[0];
uint16 cardId = argv[1];
- // argv[2] is not used in the original engine
+ TransitionType transition = static_cast<TransitionType>(argv[2]);
debugC(kDebugScript, "\timageId: %d", imageId);
debugC(kDebugScript, "\tcardId: %d", cardId);
@@ -775,7 +835,7 @@ void MystScriptParser::o_drawImageChangeCard(uint16 op, uint16 var, uint16 argc,
_vm->_gfx->copyImageToScreen(imageId, Common::Rect(0, 0, 544, 333));
_vm->_system->updateScreen();
- _vm->changeToCard(cardId, true);
+ _vm->changeToCard(cardId, transition);
}
void MystScriptParser::o_changeMainCursor(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -850,7 +910,7 @@ void MystScriptParser::o_changeCardPlaySoundDirectional(uint16 op, uint16 var, u
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
- _vm->changeToCard(cardId, false);
+ _vm->changeToCard(cardId, kNoTransition);
animatedUpdate(dataSize, &argv[4], delayBetweenSteps);
}
@@ -901,12 +961,12 @@ void MystScriptParser::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv)
void MystScriptParser::showMap() {
if (_vm->getCurCard() != getMap()) {
_savedMapCardId = _vm->getCurCard();
- _vm->changeToCard(getMap(), true);
+ _vm->changeToCard(getMap(), kTransitionCopy);
}
}
void MystScriptParser::o_exitMap(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- _vm->changeToCard(_savedMapCardId, true);
+ _vm->changeToCard(_savedMapCardId, kTransitionCopy);
}
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_scripts.h b/engines/mohawk/myst_scripts.h
index ccb76e0dc8..b75da0801a 100644
--- a/engines/mohawk/myst_scripts.h
+++ b/engines/mohawk/myst_scripts.h
@@ -86,10 +86,16 @@ public:
// Common opcodes
DECLARE_OPCODE(o_toggleVar);
DECLARE_OPCODE(o_setVar);
- DECLARE_OPCODE(o_changeCardSwitch);
+ DECLARE_OPCODE(o_changeCardSwitch4);
+ DECLARE_OPCODE(o_changeCardSwitchLtR);
+ DECLARE_OPCODE(o_changeCardSwitchRtL);
DECLARE_OPCODE(o_takePage);
DECLARE_OPCODE(o_redrawCard);
DECLARE_OPCODE(o_goToDest);
+ DECLARE_OPCODE(o_goToDestForward);
+ DECLARE_OPCODE(o_goToDestLeft);
+ DECLARE_OPCODE(o_goToDestRight);
+ DECLARE_OPCODE(o_goToDestUp);
DECLARE_OPCODE(o_triggerMovie);
DECLARE_OPCODE(o_toggleVarNoRedraw);
DECLARE_OPCODE(o_drawAreaState);
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 069281f5dc..63ba5f7c85 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -341,7 +341,7 @@ void Channelwood::o_drawImageChangeCardAndVolume(uint16 op, uint16 var, uint16 a
_vm->_gfx->copyImageToScreen(imageId, Common::Rect(0, 0, 544, 333));
_vm->_system->updateScreen();
- _vm->changeToCard(cardId, true);
+ _vm->changeToCard(cardId, kTransitionPartToLeft);
if (argc == 3) {
uint16 volume = argv[2];
@@ -476,9 +476,12 @@ void Channelwood::o_stairsDoorToggle(uint16 op, uint16 var, uint16 argc, uint16
MystResourceType6 *movie = static_cast<MystResourceType6 *>(_invokingResource);
if (_state.stairsUpperDoorState) {
- // TODO: Play backwards
+ // Close door, play the open movie backwards
+ movie->setDirection(-1);
movie->playMovie();
} else {
+ // Open door
+ movie->setDirection(1);
movie->playMovie();
}
}
diff --git a/engines/mohawk/myst_stacks/demo.cpp b/engines/mohawk/myst_stacks/demo.cpp
index 29a12571fd..9f393ea401 100644
--- a/engines/mohawk/myst_stacks/demo.cpp
+++ b/engines/mohawk/myst_stacks/demo.cpp
@@ -104,14 +104,14 @@ void Demo::returnToMenu_run() {
switch (_returnToMenuStep){
case 0:
_vm->_gfx->fadeToBlack();
- _vm->changeToCard(2003, false);
+ _vm->changeToCard(2003, kNoTransition);
_vm->_gfx->fadeFromBlack();
_returnToMenuStep++;
break;
case 1:
_vm->_gfx->fadeToBlack();
- _vm->changeToCard(2001, false);
+ _vm->changeToCard(2001, kNoTransition);
_vm->_gfx->fadeFromBlack();
_vm->_cursor->showCursor();
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index 545b97d956..71733227ac 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -127,9 +127,9 @@ void Intro::introMovies_run() {
break;
default:
if (_vm->getFeatures() & GF_DEMO)
- _vm->changeToCard(2001, true);
+ _vm->changeToCard(2001, kTransitionRightToLeft);
else
- _vm->changeToCard(2, true);
+ _vm->changeToCard(2, kTransitionRightToLeft);
}
}
@@ -148,7 +148,7 @@ void Intro::mystLinkBook_run() {
_vm->_gfx->copyBackBufferToScreen(Common::Rect(544, 333));
}
} else if (!_linkBookMovie->isPlaying()) {
- _vm->changeToCard(5, true);
+ _vm->changeToCard(5, kTransitionRightToLeft);
}
}
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index 79de03308c..43e9bcfed5 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -39,8 +39,17 @@ Mechanical::Mechanical(MohawkEngine_Myst *vm) :
MystScriptParser(vm), _state(vm->_gameState->_mechanical) {
setupOpcodes();
+ _elevatorGoingMiddle = false;
+
_mystStaircaseState = false;
_fortressPosition = 0;
+ _fortressRotationSpeed = 0;
+ _fortressSimulationSpeed = 0;
+ _gearsWereRunning = false;
+
+ _fortressRotationShortMovieWorkaround = false;
+ _fortressRotationShortMovieCount = 0;
+ _fortressRotationShortMovieLast = 0;
}
Mechanical::~Mechanical() {
@@ -74,9 +83,9 @@ void Mechanical::setupOpcodes() {
OPCODE(121, o_elevatorWindowMovie);
OPCODE(122, o_elevatorGoMiddle);
OPCODE(123, o_elevatorTopMovie);
- OPCODE(124, opcode_124);
+ OPCODE(124, o_fortressRotationSetPosition);
OPCODE(125, o_mystStaircaseMovie);
- OPCODE(126, opcode_126);
+ OPCODE(126, o_elevatorWaitTimeout);
OPCODE(127, o_crystalEnterYellow);
OPCODE(128, o_crystalLeaveYellow);
OPCODE(129, o_crystalEnterGreen);
@@ -103,7 +112,6 @@ void Mechanical::setupOpcodes() {
void Mechanical::disablePersistentScripts() {
_fortressSimulationRunning = false;
_elevatorRotationLeverMoving = false;
- _elevatorGoingMiddle = false;
_birdSinging = false;
_fortressRotationRunning = false;
}
@@ -599,30 +607,33 @@ void Mechanical::elevatorGoMiddle_run() {
_vm->_gfx->copyBackBufferToScreen(Common::Rect(10, 137, 61, 165));
_vm->_system->updateScreen();
}
- } else if (_elevatorInCabin) {
+ } else {
_elevatorTooLate = true;
-
- // Elevator going to middle animation
- _vm->_cursor->hideCursor();
- _vm->_sound->playSoundBlocking(11120);
- _vm->_gfx->copyImageToBackBuffer(6118, Common::Rect(544, 333));
- _vm->_sound->replaceSoundMyst(12120);
- _vm->_gfx->runTransition(2, Common::Rect(177, 0, 370, 333), 25, 0);
- _vm->_sound->playSoundBlocking(13120);
- _vm->_sound->replaceSoundMyst(8120);
- _vm->_gfx->copyImageToBackBuffer(6327, Common::Rect(544, 333));
- _vm->_system->delayMillis(500);
- _vm->_sound->replaceSoundMyst(9120);
- static uint16 moviePos[2] = { 3540, 5380 };
- o_elevatorWindowMovie(121, 0, 2, moviePos);
- _vm->_gfx->copyBackBufferToScreen(Common::Rect(544, 333));
- _vm->_sound->replaceSoundMyst(10120);
- _vm->_cursor->showCursor();
-
_elevatorGoingMiddle = false;
- _elevatorPosition = 1;
- _vm->changeToCard(6327, true);
+ if (_elevatorInCabin) {
+
+ // Elevator going to middle animation
+ _vm->_cursor->hideCursor();
+ _vm->_sound->playSoundBlocking(11120);
+ _vm->_gfx->copyImageToBackBuffer(6118, Common::Rect(544, 333));
+ _vm->_sound->replaceSoundMyst(12120);
+ _vm->_gfx->runTransition(kTransitionSlideToLeft, Common::Rect(177, 0, 370, 333), 25, 0);
+ _vm->_sound->playSoundBlocking(13120);
+ _vm->_sound->replaceSoundMyst(8120);
+ _vm->_gfx->copyImageToBackBuffer(6327, Common::Rect(544, 333));
+ _vm->_system->delayMillis(500);
+ _vm->_sound->replaceSoundMyst(9120);
+ static uint16 moviePos[2] = { 3540, 5380 };
+ o_elevatorWindowMovie(121, 0, 2, moviePos);
+ _vm->_gfx->copyBackBufferToScreen(Common::Rect(544, 333));
+ _vm->_sound->replaceSoundMyst(10120);
+ _vm->_cursor->showCursor();
+
+ _elevatorPosition = 1;
+
+ _vm->changeToCard(6327, kTransitionRightToLeft);
+ }
}
}
}
@@ -638,16 +649,18 @@ void Mechanical::o_elevatorTopMovie(uint16 op, uint16 var, uint16 argc, uint16 *
_vm->_video->waitUntilMovieEnds(window);
}
-void Mechanical::opcode_124(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
+void Mechanical::o_fortressRotationSetPosition(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Set fortress position", op);
- if (argc == 0) {
- // Used by Card 6156 (Fortress Rotation Controls)
- // Called when Red Exit Button Pressed to raise Elevator
+ VideoHandle gears = _fortressRotationGears->playMovie();
+ uint32 moviePosition = Audio::Timestamp(_vm->_video->getTime(gears), 600).totalNumberOfFrames();
+
+ // Myst ME short movie workaround, explained in o_fortressRotation_init
+ if (_fortressRotationShortMovieWorkaround) {
+ moviePosition += 3600 * _fortressRotationShortMovieCount;
+ }
- // TODO: Fill in Code...
- } else
- unknown(op, var, argc, argv);
+ _fortressPosition = (moviePosition + 900) / 1800 % 4;
}
void Mechanical::o_mystStaircaseMovie(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -656,17 +669,14 @@ void Mechanical::o_mystStaircaseMovie(uint16 op, uint16 var, uint16 argc, uint16
_vm->_video->playMovieBlocking(_vm->wrapMovieFilename("sstairs", kMechanicalStack), 199, 108);
}
-void Mechanical::opcode_126(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
+void Mechanical::o_elevatorWaitTimeout(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Wait for the elevator to go middle", op);
- if (argc == 0) {
- // Used by Card 6120 (Fortress Elevator)
- // Called when Red Exit Button Pressed to raise Elevator and
- // exit is clicked...
-
- // TODO: Fill in Code...
- } else
- unknown(op, var, argc, argv);
+ // Wait while the elevator times out
+ while (_elevatorGoingMiddle) {
+ runPersistentScripts();
+ _vm->skippableWait(10);
+ }
}
void Mechanical::o_crystalEnterYellow(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -776,8 +786,76 @@ void Mechanical::o_elevatorRotation_init(uint16 op, uint16 var, uint16 argc, uin
}
void Mechanical::fortressRotation_run() {
- // Used for Card 6156 (Fortress Rotation Controls)
- // TODO: Fill in function...
+ VideoHandle gears = _fortressRotationGears->playMovie();
+
+ double oldRate = _vm->_video->getVideoRate(gears).toDouble();
+
+ uint32 moviePosition = Audio::Timestamp(_vm->_video->getTime(gears), 600).totalNumberOfFrames();
+
+ // Myst ME short movie workaround, explained in o_fortressRotation_init
+ if (_fortressRotationShortMovieWorkaround) {
+ // Detect if we just looped
+ if (ABS<int32>(_fortressRotationShortMovieLast - 3680) < 50
+ && ABS<int32>(moviePosition) < 50) {
+ _fortressRotationShortMovieCount++;
+ }
+
+ _fortressRotationShortMovieLast = moviePosition;
+
+ // Simulate longer movie
+ moviePosition += 3600 * _fortressRotationShortMovieCount;
+ }
+
+ int32 positionInQuarter = 900 - (moviePosition + 900) % 1800;
+
+ // Are the gears moving?
+ if (oldRate >= 0.1 || ABS<int32>(positionInQuarter) >= 30 || _fortressRotationBrake) {
+
+ double newRate = oldRate;
+ if (_fortressRotationBrake && (double)_fortressRotationBrake * 0.2 > oldRate) {
+ newRate += 0.1;
+ }
+
+ // Don't let the gears get stuck between two fortress positions
+ if (ABS<double>(oldRate) <= 0.05) {
+ if (oldRate <= 0.0) {
+ newRate += oldRate;
+ } else {
+ newRate -= oldRate;
+ }
+ } else {
+ if (oldRate <= 0.0) {
+ newRate += 0.05;
+ } else {
+ newRate -= 0.05;
+ }
+ }
+
+ // Adjust speed accordingly to acceleration lever
+ newRate += (double) (positionInQuarter / 1500.0)
+ * (double) (9 - _fortressRotationSpeed) / 9.0;
+
+ newRate = CLIP<double>(newRate, -2.5, 2.5);
+
+ _vm->_video->setVideoRate(gears, Common::Rational((int)(newRate * 1000.0), 1000));
+
+ _gearsWereRunning = true;
+ } else if (_gearsWereRunning) {
+ // The fortress has stopped. Set its new position
+ _fortressPosition = (moviePosition + 900) / 1800 % 4;
+
+ _vm->_video->setVideoRate(gears, 0);
+
+ if (!_fortressRotationShortMovieWorkaround) {
+ _vm->_video->seekToTime(gears, Audio::Timestamp(0, 1800 * _fortressPosition, 600));
+ } else {
+ _vm->_video->seekToTime(gears, Audio::Timestamp(0, 1800 * (_fortressPosition % 2), 600));
+ }
+
+ _vm->_sound->playSoundBlocking(_fortressRotationSounds[_fortressPosition]);
+
+ _gearsWereRunning = false;
+ }
}
void Mechanical::o_fortressRotation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -785,6 +863,11 @@ void Mechanical::o_fortressRotation_init(uint16 op, uint16 var, uint16 argc, uin
_fortressRotationGears = static_cast<MystResourceType6 *>(_invokingResource);
+ VideoHandle gears = _fortressRotationGears->playMovie();
+ _vm->_video->setVideoLooping(gears, true);
+ _vm->_video->seekToTime(gears, Audio::Timestamp(0, 1800 * _fortressPosition, 600));
+ _vm->_video->setVideoRate(gears, 0);
+
_fortressRotationSounds[0] = argv[0];
_fortressRotationSounds[1] = argv[1];
_fortressRotationSounds[2] = argv[2];
@@ -792,12 +875,113 @@ void Mechanical::o_fortressRotation_init(uint16 op, uint16 var, uint16 argc, uin
_fortressRotationBrake = 0;
+ // WORKAROUND for the tower rotation bug in Myst ME.
+ // The original engine only allowed to visit two out of the three small islands,
+ // preventing the game from being fully completable.
+ // The fortress rotation is computed from the current position in the movie
+ // hcgears.mov. The version of this movie that shipped with the ME edition is
+ // too short to allow to visit all the islands.
+ // ScummVM simulates a longer movie by counting the number of times the movie
+ // looped and adding that time to the current movie position.
+ // Hence allowing the fortress position to be properly computed.
+ uint32 movieDuration = _vm->_video->getDuration(gears).convertToFramerate(600).totalNumberOfFrames();
+ if (movieDuration == 3680) {
+ _fortressRotationShortMovieWorkaround = true;
+ _fortressRotationShortMovieCount = 0;
+ _fortressRotationShortMovieLast = 0;
+ }
+
_fortressRotationRunning = true;
+ _gearsWereRunning = false;
}
void Mechanical::fortressSimulation_run() {
- // Used for Card 6044 (Fortress Rotation Simulator)
- // TODO: Fill in function...
+ if (_fortressSimulationInit) {
+ // Init sequence
+ _vm->_sound->replaceBackgroundMyst(_fortressSimulationStartSound1, 65535);
+ _vm->skippableWait(5000);
+ _vm->_sound->replaceSoundMyst(_fortressSimulationStartSound2);
+
+ // Update movie while the sound is playing
+ VideoHandle startup = _fortressSimulationStartup->playMovie();
+ while (_vm->_sound->isPlaying(_fortressSimulationStartSound2)) {
+ if (_vm->_video->updateMovies())
+ _vm->_system->updateScreen();
+
+ _vm->_system->delayMillis(10);
+ }
+ _vm->_sound->replaceBackgroundMyst(_fortressSimulationStartSound1, 65535);
+ _vm->_video->waitUntilMovieEnds(startup);
+ _vm->_sound->stopBackgroundMyst();
+ _vm->_sound->replaceSoundMyst(_fortressSimulationStartSound2);
+
+
+ Common::Rect src = Common::Rect(0, 0, 176, 176);
+ Common::Rect dst = Common::Rect(187, 3, 363, 179);
+ _vm->_gfx->copyImageSectionToBackBuffer(6046, src, dst);
+ _vm->_gfx->copyBackBufferToScreen(dst);
+ _vm->_system->updateScreen();
+
+ _fortressSimulationStartup->pauseMovie(true);
+ VideoHandle holo = _fortressSimulationHolo->playMovie();
+ _vm->_video->setVideoLooping(holo, true);
+ _vm->_video->setVideoRate(holo, 0);
+
+ _vm->_cursor->showCursor();
+
+ _fortressSimulationInit = false;
+ } else {
+ VideoHandle holo = _fortressSimulationHolo->playMovie();
+
+ double oldRate = _vm->_video->getVideoRate(holo).toDouble();
+
+ uint32 moviePosition = Audio::Timestamp(_vm->_video->getTime(holo), 600).totalNumberOfFrames();
+
+ int32 positionInQuarter = 900 - (moviePosition + 900) % 1800;
+
+ // Are the gears moving?
+ if (oldRate >= 0.1 || ABS<int32>(positionInQuarter) >= 30 || _fortressSimulationBrake) {
+
+ double newRate = oldRate;
+ if (_fortressSimulationBrake && (double)_fortressSimulationBrake * 0.2 > oldRate) {
+ newRate += 0.1;
+ }
+
+ // Don't let the gears get stuck between two fortress positions
+ if (ABS<double>(oldRate) <= 0.05) {
+ if (oldRate <= 0.0) {
+ newRate += oldRate;
+ } else {
+ newRate -= oldRate;
+ }
+ } else {
+ if (oldRate <= 0.0) {
+ newRate += 0.05;
+ } else {
+ newRate -= 0.05;
+ }
+ }
+
+ // Adjust speed accordingly to acceleration lever
+ newRate += (double) (positionInQuarter / 1500.0)
+ * (double) (9 - _fortressSimulationSpeed) / 9.0;
+
+ newRate = CLIP<double>(newRate, -2.5, 2.5);
+
+ _vm->_video->setVideoRate(holo, Common::Rational((int)(newRate * 1000.0), 1000));
+
+ _gearsWereRunning = true;
+ } else if (_gearsWereRunning) {
+ // The fortress has stopped. Set its new position
+ uint16 simulationPosition = (moviePosition + 900) / 1800 % 4;
+
+ _vm->_video->setVideoRate(holo, 0);
+ _vm->_video->seekToTime(holo, Audio::Timestamp(0, 1800 * simulationPosition, 600));
+ _vm->_sound->playSoundBlocking( _fortressRotationSounds[simulationPosition]);
+
+ _gearsWereRunning = false;
+ }
+ }
}
void Mechanical::o_fortressSimulation_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -816,6 +1000,10 @@ void Mechanical::o_fortressSimulation_init(uint16 op, uint16 var, uint16 argc, u
_fortressSimulationBrake = 0;
_fortressSimulationRunning = true;
+ _gearsWereRunning = false;
+ _fortressSimulationInit = true;
+
+ _vm->_cursor->hideCursor();
}
void Mechanical::o_fortressSimulationStartup_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
diff --git a/engines/mohawk/myst_stacks/mechanical.h b/engines/mohawk/myst_stacks/mechanical.h
index 3bd7f2d71b..7f3d5143e4 100644
--- a/engines/mohawk/myst_stacks/mechanical.h
+++ b/engines/mohawk/myst_stacks/mechanical.h
@@ -80,9 +80,9 @@ private:
DECLARE_OPCODE(o_elevatorWindowMovie);
DECLARE_OPCODE(o_elevatorGoMiddle);
DECLARE_OPCODE(o_elevatorTopMovie);
- DECLARE_OPCODE(opcode_124);
+ DECLARE_OPCODE(o_fortressRotationSetPosition);
DECLARE_OPCODE(o_mystStaircaseMovie);
- DECLARE_OPCODE(opcode_126);
+ DECLARE_OPCODE(o_elevatorWaitTimeout);
DECLARE_OPCODE(o_crystalEnterYellow);
DECLARE_OPCODE(o_crystalEnterGreen);
DECLARE_OPCODE(o_crystalEnterRed);
@@ -104,13 +104,19 @@ private:
bool _mystStaircaseState; // 76
bool _fortressRotationRunning;
+ bool _gearsWereRunning;
uint16 _fortressRotationSpeed; // 78
uint16 _fortressRotationBrake; // 80
uint16 _fortressPosition; // 82
uint16 _fortressRotationSounds[4]; // 86 to 92
MystResourceType6 *_fortressRotationGears; // 172
+ bool _fortressRotationShortMovieWorkaround;
+ uint32 _fortressRotationShortMovieCount;
+ uint32 _fortressRotationShortMovieLast;
+
bool _fortressSimulationRunning;
+ bool _fortressSimulationInit; // 94
uint16 _fortressSimulationSpeed; // 96
uint16 _fortressSimulationBrake; // 98
uint16 _fortressSimulationStartSound1; // 102
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index c1ddc74c82..f17d765c99 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -51,6 +51,8 @@ Myst::Myst(MohawkEngine_Myst *vm) :
_dockVaultState = 0;
_cabinDoorOpened = 0;
_cabinMatchState = 2;
+ _cabinGaugeMovie = NULL_VID_HANDLE;
+ _cabinFireMovie = NULL_VID_HANDLE;
_matchBurning = false;
_tree = 0;
_treeAlcove = 0;
@@ -189,7 +191,7 @@ void Myst::setupOpcodes() {
OPCODE(215, o_gulls2_init);
OPCODE(216, o_treeCard_init);
OPCODE(217, o_treeEntry_init);
- OPCODE(218, opcode_218);
+ OPCODE(218, o_boilerMovies_init);
OPCODE(219, o_rocketSliders_init);
OPCODE(220, o_rocketLinkVideo_init);
OPCODE(221, o_greenBook_init);
@@ -202,7 +204,7 @@ void Myst::setupOpcodes() {
OPCODE(303, NOP);
OPCODE(304, o_treeCard_exit);
OPCODE(305, o_treeEntry_exit);
- OPCODE(306, NOP);
+ OPCODE(306, o_boiler_exit);
OPCODE(307, o_generatorControlRoom_exit);
OPCODE(308, NOP);
OPCODE(309, NOP);
@@ -608,6 +610,8 @@ uint16 Myst::getVar(uint16 var) {
return 1;
case 302: // Green Book Opened Before Flag
return _state.greenBookOpenedBefore;
+ case 303: // Library Bookcase status changed
+ return _libraryBookcaseChanged;
case 304: // Tower Rotation Map Initialized
return _towerRotationMapInitialized;
case 305: // Cabin Boiler Lit
@@ -1041,7 +1045,7 @@ void Myst::o_bookGivePage(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
// No page or white page
if (!_globals.heldPage || _globals.heldPage == 13) {
- _vm->changeToCard(cardIdBookCover, true);
+ _vm->changeToCard(cardIdBookCover, kTransitionDissolve);
return;
}
@@ -1083,7 +1087,7 @@ void Myst::o_bookGivePage(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
// Wrong book
if (bookVar != var) {
- _vm->changeToCard(cardIdBookCover, true);
+ _vm->changeToCard(cardIdBookCover, kTransitionDissolve);
return;
}
@@ -1109,9 +1113,9 @@ void Myst::o_bookGivePage(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
else
_globals.currentAge = 10;
- _vm->changeToCard(cardIdLose, true);
+ _vm->changeToCard(cardIdLose, kTransitionDissolve);
} else {
- _vm->changeToCard(cardIdBookCover, true);
+ _vm->changeToCard(cardIdBookCover, kTransitionDissolve);
}
}
@@ -1298,7 +1302,7 @@ void Myst::imagerValidation_run() {
if (_imagerValidationStep == 11) {
_imagerValidationStep = 0;
- _vm->changeToCard(_imagerValidationCard, true);
+ _vm->changeToCard(_imagerValidationCard, kTransitionBottomToTop);
} else {
_startTime = time + 100;
}
@@ -1473,10 +1477,10 @@ void Myst::o_cabinSafeHandleMove(uint16 op, uint16 var, uint16 argc, uint16 *arg
if (soundId)
_vm->_sound->replaceSoundMyst(soundId);
- _vm->changeToCard(4103, false);
+ _vm->changeToCard(4103, kNoTransition);
Common::Rect screenRect = Common::Rect(544, 333);
- _vm->_gfx->runTransition(0, screenRect, 2, 5);
+ _vm->_gfx->runTransition(kTransitionLeftToRight, screenRect, 2, 5);
}
_tempVar = 1;
} else {
@@ -1869,17 +1873,50 @@ void Myst::o_boilerLightPilot(uint16 op, uint16 var, uint16 argc, uint16 *argv)
_state.cabinPilotLightLit = 1;
_vm->redrawArea(98);
+ boilerFireUpdate(false);
+
// Put out match
_matchGoOutTime = _vm->_system->getMillis();
if (_state.cabinValvePosition > 0)
_vm->_sound->replaceBackgroundMyst(8098, 49152);
- if (_state.cabinValvePosition > 12)
+ if (_state.cabinValvePosition > 12) {
+ // Compute the speed of the gauge to synchronize it with the next tree move
+ uint32 delay = treeNextMoveDelay(_state.cabinValvePosition);
+ Common::Rational rate = boilerComputeGaugeRate(_state.cabinValvePosition, delay);
+ boilerResetGauge(rate);
+
_state.treeLastMoveTime = _vm->_system->getMillis();
+ }
+ }
+}
- // TODO: Complete. Play movies
+Common::Rational Myst::boilerComputeGaugeRate(uint16 pressure, uint32 delay) {
+ Common::Rational rate = Common::Rational(2088, delay);
+ if (pressure < 12)
+ return -rate;
+ else
+ return rate;
+}
+
+void Myst::boilerResetGauge(const Common::Rational &rate) {
+ if (_vm->_video->endOfVideo(_cabinGaugeMovie)) {
+ if (_vm->getCurCard() == 4098) {
+ _cabinGaugeMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabingau", kMystStack), 243, 96);
+ } else {
+ _cabinGaugeMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabcgfar", kMystStack), 254, 136);
+ }
}
+
+ Audio::Timestamp goTo;
+ if (rate > 0)
+ goTo = Audio::Timestamp(0, 0, 600);
+ else
+ goTo = _vm->_video->getDuration(_cabinGaugeMovie);
+
+ _vm->_video->seekToTime(_cabinGaugeMovie, goTo);
+ _vm->_video->setVideoRate(_cabinGaugeMovie, rate);
}
void Myst::o_boilerIncreasePressureStop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -1893,7 +1930,12 @@ void Myst::o_boilerIncreasePressureStop(uint16 op, uint16 var, uint16 argc, uint
if (_state.cabinValvePosition > 0)
_vm->_sound->replaceBackgroundMyst(8098, 49152);
- // TODO: Play movies
+ if (!_vm->_video->endOfVideo(_cabinGaugeMovie)) {
+ uint16 delay = treeNextMoveDelay(_state.cabinValvePosition);
+ Common::Rational rate = boilerComputeGaugeRate(_state.cabinValvePosition, delay);
+ _vm->_video->setVideoRate(_cabinGaugeMovie, rate);
+ }
+
} else if (_state.cabinValvePosition > 0)
_vm->_sound->replaceBackgroundMyst(4098, _state.cabinValvePosition << 10);
}
@@ -1903,7 +1945,8 @@ void Myst::boilerPressureIncrease_run() {
if (!_vm->_sound->isPlaying(5098) && _state.cabinValvePosition < 25) {
_state.cabinValvePosition++;
if (_state.cabinValvePosition == 1) {
- // TODO: Play fire movie
+ // Set fire to high
+ boilerFireUpdate(false);
// Draw fire
_vm->redrawArea(305);
@@ -1927,7 +1970,8 @@ void Myst::boilerPressureDecrease_run() {
if (!_vm->_sound->isPlaying(5098) && _state.cabinValvePosition > 0) {
_state.cabinValvePosition--;
if (_state.cabinValvePosition == 0) {
- // TODO: Play fire movie
+ // Set fire to low
+ boilerFireUpdate(false);
// Draw fire
_vm->redrawArea(305);
@@ -1961,7 +2005,12 @@ void Myst::o_boilerDecreasePressureStop(uint16 op, uint16 var, uint16 argc, uint
if (_state.cabinValvePosition > 0)
_vm->_sound->replaceBackgroundMyst(8098, 49152);
- // TODO: Play movies
+ if (!_vm->_video->endOfVideo(_cabinGaugeMovie)) {
+ uint16 delay = treeNextMoveDelay(_state.cabinValvePosition);
+ Common::Rational rate = boilerComputeGaugeRate(_state.cabinValvePosition, delay);
+ _vm->_video->setVideoRate(_cabinGaugeMovie, rate);
+ }
+
} else {
if (_state.cabinValvePosition > 0)
_vm->_sound->replaceBackgroundMyst(4098, _state.cabinValvePosition << 10);
@@ -2067,6 +2116,11 @@ void Myst::tree_run() {
// Check if alcove is accessible
treeSetAlcoveAccessible();
+ if (_cabinGaugeMovie != NULL_VID_HANDLE) {
+ Common::Rational rate = boilerComputeGaugeRate(pressure, delay);
+ boilerResetGauge(rate);
+ }
+
_state.treeLastMoveTime = time;
}
}
@@ -2968,7 +3022,12 @@ void Myst::clockReset() {
_vm->_system->delayMillis(1000);
_vm->_sound->replaceSoundMyst(7113);
- // TODO: Play cl1wggat backwards
+ // Gear closing movie
+ VideoHandle handle = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wggat", kMystStack) , 195, 225);
+ _vm->_video->seekToTime(handle, _vm->_video->getDuration(handle));
+ _vm->_video->setVideoRate(handle, -1);
+ _vm->_video->waitUntilMovieEnds(handle);
+
// Redraw gear
_state.gearsOpen = 0;
_vm->redrawArea(40);
@@ -2980,16 +3039,9 @@ void Myst::clockReset() {
void Myst::clockResetWeight() {
_clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
- if (!(_vm->getFeatures() & GF_ME)) {
- // Set video bounds, weight going up
- _vm->_video->setVideoBounds(_clockWeightVideo,
- Audio::Timestamp(0, 2214 * 2 - _clockWeightPosition, 600),
- Audio::Timestamp(0, 2214 * 2, 600));
- } else {
- //FIXME: Needs QT backwards playing, for now just display the weight up
- warning("Weight going back up not implemented");
- _vm->_video->drawVideoFrame(_clockWeightVideo, Audio::Timestamp(0, 0, 600));
- }
+ // Play the movie backwards, weight going up
+ _vm->_video->seekToTime(_clockWeightVideo, Audio::Timestamp(0, _clockWeightPosition, 600));
+ _vm->_video->setVideoRate(_clockWeightVideo, -1);
// Reset position
_clockWeightPosition = 0;
@@ -3246,7 +3298,7 @@ void Myst::libraryBookcaseTransform_run(void) {
if (_state.libraryBookcaseDoor) {
_vm->_gfx->copyImageSectionToBackBuffer(11179, Common::Rect(0, 0, 106, 81), Common::Rect(0, 72, 106, 153));
- _vm->_gfx->runTransition(6, Common::Rect(0, 72, 106, 153), 5, 10);
+ _vm->_gfx->runTransition(kTransitionBottomToTop, Common::Rect(0, 72, 106, 153), 5, 10);
_vm->_sound->playSoundBlocking(7348);
_vm->_sound->replaceBackgroundMyst(4348, 16384);
} else {
@@ -3510,22 +3562,60 @@ void Myst::o_treeEntry_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
treeSetAlcoveAccessible();
}
-void Myst::opcode_218(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
+void Myst::o_boilerMovies_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Boiler movies init", op);
- // Used for Card 4097 (Cabin Boiler)
- // TODO: Fill in logic
- if (false) {
- _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabfirfr", kMystStack), 254, 244);
- _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabcgfar", kMystStack), 254, 138);
+ boilerFireInit();
+ boilerGaugeInit();
+}
+
+void Myst::boilerFireInit() {
+ if (_vm->getCurCard() == 4098) {
+ _cabinFireMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabfire", kMystStack), 240, 279, true);
+ _vm->_video->pauseMovie(_cabinFireMovie, true);
+
+ _vm->redrawArea(305);
+ boilerFireUpdate(true);
+ } else {
+ if (_state.cabinPilotLightLit == 1 && _state.cabinValvePosition >= 1) {
+ _cabinFireMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabfirfr", kMystStack), 254, 244, true);
+ }
+ }
+}
+
+void Myst::boilerFireUpdate(bool init) {
+ uint position = _vm->_video->getTime(_cabinFireMovie);
+
+ if (_state.cabinPilotLightLit == 1) {
+ if (_state.cabinValvePosition == 0) {
+ if (position > (uint)Audio::Timestamp(0, 200, 600).msecs() || init) {
+ _vm->_video->setVideoBounds(_cabinFireMovie, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 100, 600));
+ _vm->_video->pauseMovie(_cabinFireMovie, false);
+ }
+ } else {
+ if (position < (uint)Audio::Timestamp(0, 200, 600).msecs() || init) {
+ _vm->_video->setVideoBounds(_cabinFireMovie, Audio::Timestamp(0, 201, 600), Audio::Timestamp(0, 1900, 600));
+ _vm->_video->pauseMovie(_cabinFireMovie, false);
+ }
+ }
}
+}
- // Used for Card 4098 (Cabin Boiler)
- // TODO: Fill in logic
- if (false) {
- _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabfire", kMystStack), 240, 279);
- _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabingau", kMystStack), 243, 97);
+void Myst::boilerGaugeInit() {
+ if (_vm->getCurCard() == 4098) {
+ _cabinGaugeMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabingau", kMystStack), 243, 96);
+ } else {
+ _cabinGaugeMovie = _vm->_video->playMovie(_vm->wrapMovieFilename("cabcgfar", kMystStack), 254, 136);
}
+
+ Audio::Timestamp frame;
+
+ if (_state.cabinPilotLightLit == 1 && _state.cabinValvePosition > 12)
+ frame = _vm->_video->getDuration(_cabinGaugeMovie);
+ else
+ frame = Audio::Timestamp(0, 0, 600);
+
+ _vm->_video->drawVideoFrame(_cabinGaugeMovie, frame);
}
void Myst::o_rocketSliders_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -3648,6 +3738,13 @@ void Myst::o_treeEntry_exit(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_treeAlcove = 0;
}
+void Myst::o_boiler_exit(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ debugC(kDebugScript, "Opcode %d: Exit boiler card", op);
+
+ _cabinGaugeMovie = NULL_VID_HANDLE;
+ _cabinFireMovie = NULL_VID_HANDLE;
+}
+
void Myst::o_generatorControlRoom_exit(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
debugC(kDebugScript, "Opcode %d: Generator room exit", op);
diff --git a/engines/mohawk/myst_stacks/myst.h b/engines/mohawk/myst_stacks/myst.h
index e9bff08cb4..de88843d59 100644
--- a/engines/mohawk/myst_stacks/myst.h
+++ b/engines/mohawk/myst_stacks/myst.h
@@ -43,7 +43,7 @@ public:
virtual void disablePersistentScripts();
virtual void runPersistentScripts();
-private:
+protected:
void setupOpcodes();
uint16 getVar(uint16 var);
void toggleVar(uint16 var);
@@ -52,7 +52,7 @@ private:
virtual uint16 getMap() { return 9934; }
void towerRotationMap_run();
- void libraryBookcaseTransform_run();
+ virtual void libraryBookcaseTransform_run();
void generatorControlRoom_run();
void opcode_212_run();
void libraryCombinationBook_run();
@@ -174,7 +174,7 @@ private:
DECLARE_OPCODE(o_gulls2_init);
DECLARE_OPCODE(o_treeCard_init);
DECLARE_OPCODE(o_treeEntry_init);
- DECLARE_OPCODE(opcode_218);
+ DECLARE_OPCODE(o_boilerMovies_init);
DECLARE_OPCODE(o_rocketSliders_init);
DECLARE_OPCODE(o_rocketLinkVideo_init);
DECLARE_OPCODE(o_greenBook_init);
@@ -183,6 +183,7 @@ private:
DECLARE_OPCODE(o_bookAddSpecialPage_exit);
DECLARE_OPCODE(o_treeCard_exit);
DECLARE_OPCODE(o_treeEntry_exit);
+ DECLARE_OPCODE(o_boiler_exit);
DECLARE_OPCODE(o_generatorControlRoom_exit);
@@ -259,6 +260,9 @@ private:
uint16 _cabinMatchState; // 60
uint32 _matchGoOutTime; // 144
+ VideoHandle _cabinFireMovie; // 240
+ VideoHandle _cabinGaugeMovie; // 244
+
bool _boilerPressureIncreasing;
bool _boilerPressureDecreasing;
bool _basementPressureIncreasing;
@@ -317,6 +321,12 @@ private:
Common::Point towerRotationMapComputeCoords(const Common::Point &center, uint16 angle);
void towerRotationMapDrawLine(const Common::Point &center, const Common::Point &end);
+ void boilerFireInit();
+ void boilerFireUpdate(bool init);
+ void boilerGaugeInit();
+ Common::Rational boilerComputeGaugeRate(uint16 pressure, uint32 delay);
+ void boilerResetGauge(const Common::Rational &rate);
+
void treeSetAlcoveAccessible();
uint32 treeNextMoveDelay(uint16 pressure);
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index 0b8dcf897a..75e870281e 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -60,6 +60,7 @@ void Preview::setupOpcodes() {
OVERRIDE_OPCODE(199, o_speechStop);
// "Init" Opcodes
+ OVERRIDE_OPCODE(209, o_libraryBookcaseTransformDemo_init);
OPCODE(298, o_speech_init);
OPCODE(299, o_library_init);
}
@@ -139,7 +140,7 @@ void Preview::speech_run() {
break;
case 1: // Open book
if (_currentCue >= 1) {
- _vm->changeToCard(3001, true);
+ _vm->changeToCard(3001, kTransitionDissolve);
_speechStep++;
}
@@ -147,7 +148,7 @@ void Preview::speech_run() {
case 2: // Go to Myst
if (_currentCue >= 2) {
_vm->_gfx->fadeToBlack();
- _vm->changeToCard(3002, false);
+ _vm->changeToCard(3002, kNoTransition);
_vm->_gfx->fadeFromBlack();
_speechStep++;
@@ -164,7 +165,7 @@ void Preview::speech_run() {
if (_currentCue >= 4) {
_library->drawConditionalDataToScreen(0);
- _vm->changeToCard(3003, true);
+ _vm->changeToCard(3003, kTransitionDissolve);
_speechNextTime = time + 2000;
_speechStep++;
@@ -181,7 +182,7 @@ void Preview::speech_run() {
if (time < _speechNextTime)
break;
- _vm->changeToCard(3004, true);
+ _vm->changeToCard(3004, kTransitionDissolve);
_speechNextTime = time + 2000;
_speechStep++;
break;
@@ -190,7 +191,7 @@ void Preview::speech_run() {
break;
_vm->_gfx->fadeToBlack();
- _vm->changeToCard(3005, false);
+ _vm->changeToCard(3005, kNoTransition);
_vm->_gfx->fadeFromBlack();
_speechNextTime = time + 1000;
_speechStep++;
@@ -205,7 +206,7 @@ void Preview::speech_run() {
if (time < _speechNextTime)
break;
- _vm->changeToCard(3006 + _speechStep - 7, true);
+ _vm->changeToCard(3006 + _speechStep - 7, kTransitionDissolve);
_speechNextTime = time + 2000;
_speechStep++;
break;
@@ -213,7 +214,7 @@ void Preview::speech_run() {
if (time < _speechNextTime)
break;
- _vm->changeToCard(4329, true);
+ _vm->changeToCard(4329, kTransitionDissolve);
_speechRunning = false;
_globals.currentAge = 2;
@@ -241,5 +242,22 @@ void Preview::o_library_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
_library = static_cast<MystResourceType8 *>(_invokingResource);
}
+void Preview::o_libraryBookcaseTransformDemo_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
+ if (_libraryBookcaseChanged) {
+ MystResourceType7 *resource = static_cast<MystResourceType7 *>(_invokingResource);
+ _libraryBookcaseMovie = static_cast<MystResourceType6 *>(resource->getSubResource(getVar(303)));
+ _libraryBookcaseSoundId = argv[0];
+ _libraryBookcaseMoving = true;
+ }
+}
+
+void Preview::libraryBookcaseTransform_run() {
+ if (_libraryBookcaseChanged)
+ _state.libraryBookcaseDoor = !_state.libraryBookcaseDoor;
+
+ Myst::libraryBookcaseTransform_run();
+}
+
+
} // End of namespace MystStacks
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst_stacks/preview.h b/engines/mohawk/myst_stacks/preview.h
index 1e4ff3efb4..706220e8ed 100644
--- a/engines/mohawk/myst_stacks/preview.h
+++ b/engines/mohawk/myst_stacks/preview.h
@@ -51,6 +51,7 @@ private:
DECLARE_OPCODE(o_stayHere);
DECLARE_OPCODE(o_speechStop);
+ DECLARE_OPCODE(o_libraryBookcaseTransformDemo_init);
DECLARE_OPCODE(o_speech_init);
DECLARE_OPCODE(o_library_init);
@@ -65,6 +66,8 @@ private:
void speech_run();
void speechUpdateCue();
+
+ void libraryBookcaseTransform_run();
};
} // End of namespace MystStacks
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index 1473742259..a941b14eaa 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -729,11 +729,11 @@ void Selenitic::o_mazeRunnerDoorButton(uint16 op, uint16 var, uint16 argc, uint1
uint16 cardIdEntry = argv[1];
if (_mazeRunnerPosition == 288) {
- _vm->changeToCard(cardIdEntry, false);
+ _vm->changeToCard(cardIdEntry, kNoTransition);
_vm->_sound->replaceSoundMyst(cardIdEntry);
animatedUpdate(argv[2], &argv[3], 10);
} else if (_mazeRunnerPosition == 289) {
- _vm->changeToCard(cardIdExit, false);
+ _vm->changeToCard(cardIdExit, kNoTransition);
_vm->_sound->replaceSoundMyst(cardIdExit);
animatedUpdate(argv[2], &argv[3], 10);
}
@@ -895,9 +895,9 @@ void Selenitic::o_soundLockButton(uint16 op, uint16 var, uint16 argc, uint16 *ar
uint16 cardIdClosed = argv[0];
uint16 cardIdOpen = argv[1];
- _vm->changeToCard(cardIdClosed, true);
+ _vm->changeToCard(cardIdClosed, kTransitionDissolve);
- _vm->changeToCard(cardIdOpen, false);
+ _vm->changeToCard(cardIdOpen, kNoTransition);
_vm->_sound->replaceSoundMyst(argv[2]);
animatedUpdate(argv[4], &argv[5], argv[3]);
diff --git a/engines/mohawk/myst_stacks/slides.cpp b/engines/mohawk/myst_stacks/slides.cpp
index c0bb400db1..720926904a 100644
--- a/engines/mohawk/myst_stacks/slides.cpp
+++ b/engines/mohawk/myst_stacks/slides.cpp
@@ -63,7 +63,7 @@ void Slides::runPersistentScripts() {
// Used on Cards...
if (_vm->_system->getMillis() > _nextCardTime) {
_vm->_gfx->fadeToBlack();
- _vm->changeToCard(_nextCardID, false);
+ _vm->changeToCard(_nextCardID, kNoTransition);
_vm->_gfx->fadeFromBlack();
}
}
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index ef228e62f3..1359685302 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -440,9 +440,9 @@ void Stoneship::o_drawerOpenSirius(uint16 op, uint16 var, uint16 argc, uint16 *a
drawer->drawConditionalDataToScreen(0, 0);
}
- uint16 transition = 5;
+ TransitionType transition = kTransitionTopToBottom;
if (argc == 2 && argv[1])
- transition = 11;
+ transition = kTransitionCopy;
_vm->_gfx->runTransition(transition, drawer->getRect(), 25, 5);
}
@@ -579,7 +579,7 @@ void Stoneship::o_drawerOpenAchenar(uint16 op, uint16 var, uint16 argc, uint16 *
MystResourceType8 *drawer = static_cast<MystResourceType8 *>(_vm->_resources[argv[0]]);
drawer->drawConditionalDataToScreen(0, 0);
- _vm->_gfx->runTransition(5, drawer->getRect(), 25, 5);
+ _vm->_gfx->runTransition(kTransitionTopToBottom, drawer->getRect(), 25, 5);
}
void Stoneship::o_hologramPlayback(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -692,9 +692,9 @@ void Stoneship::o_chestValveVideos(uint16 op, uint16 var, uint16 argc, uint16 *a
_vm->_sound->resumeBackgroundMyst();
} else {
// Valve opening
- // TODO: Play backwards
VideoHandle valve = _vm->_video->playMovie(movie, 97, 267);
- _vm->_video->setVideoBounds(valve, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 350, 600));
+ _vm->_video->seekToTime(valve, Audio::Timestamp(0, 350, 600));
+ _vm->_video->setVideoRate(valve, -1);
_vm->_video->waitUntilMovieEnds(valve);
}
}
@@ -777,7 +777,7 @@ void Stoneship::o_cloudOrbLeave(uint16 op, uint16 var, uint16 argc, uint16 *argv
_cloudOrbMovie->pauseMovie(true);
_vm->_sound->replaceSoundMyst(_cloudOrbStopSound);
- _vm->_gfx->runTransition(5, _invokingResource->getRect(), 4, 0);
+ _vm->_gfx->runTransition(kTransitionTopToBottom, _invokingResource->getRect(), 4, 0);
}
void Stoneship::o_drawerCloseOpened(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -794,7 +794,7 @@ void Stoneship::drawerClose(uint16 drawer) {
_vm->drawResourceImages();
MystResource *res = _vm->_resources[drawer];
- _vm->_gfx->runTransition(6, res->getRect(), 25, 5);
+ _vm->_gfx->runTransition(kTransitionBottomToTop, res->getRect(), 25, 5);
}
void Stoneship::o_hologramDisplay_init(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
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/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 32613c6185..71aa371073 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -177,7 +177,7 @@ Common::Error MohawkEngine_Riven::run() {
}
} else {
// Otherwise, start us off at aspit's card 1 (the main menu)
- changeToStack(aspit);
+ changeToStack(aspit);
changeToCard(1);
}
@@ -830,7 +830,7 @@ static void sunnersTopStairsTimer(MohawkEngine_Riven *vm) {
} else if (sunnerTime < vm->getTotalPlayTime()) {
VideoHandle handle = vm->_video->playMovieRiven(vm->_rnd->getRandomNumberRng(1, 3));
- timerTime = vm->_video->getDuration(handle) + vm->_rnd->getRandomNumberRng(2, 15) * 1000;
+ timerTime = vm->_video->getDuration(handle).msecs() + vm->_rnd->getRandomNumberRng(2, 15) * 1000;
}
sunnerTime = timerTime + vm->getTotalPlayTime();
@@ -868,7 +868,7 @@ static void sunnersMidStairsTimer(MohawkEngine_Riven *vm) {
VideoHandle handle = vm->_video->playMovieRiven(movie);
- timerTime = vm->_video->getDuration(handle) + vm->_rnd->getRandomNumberRng(1, 10) * 1000;
+ timerTime = vm->_video->getDuration(handle).msecs() + vm->_rnd->getRandomNumberRng(1, 10) * 1000;
}
sunnerTime = timerTime + vm->getTotalPlayTime();
@@ -898,7 +898,7 @@ static void sunnersLowerStairsTimer(MohawkEngine_Riven *vm) {
} else if (sunnerTime < vm->getTotalPlayTime()) {
VideoHandle handle = vm->_video->playMovieRiven(vm->_rnd->getRandomNumberRng(3, 5));
- timerTime = vm->_video->getDuration(handle) + vm->_rnd->getRandomNumberRng(1, 30) * 1000;
+ timerTime = vm->_video->getDuration(handle).msecs() + vm->_rnd->getRandomNumberRng(1, 30) * 1000;
}
sunnerTime = timerTime + vm->getTotalPlayTime();
@@ -932,7 +932,7 @@ static void sunnersBeachTimer(MohawkEngine_Riven *vm) {
vm->_video->activateMLST(mlstID, vm->getCurCard());
VideoHandle handle = vm->_video->playMovieRiven(mlstID);
- timerTime = vm->_video->getDuration(handle) + vm->_rnd->getRandomNumberRng(1, 30) * 1000;
+ timerTime = vm->_video->getDuration(handle).msecs() + vm->_rnd->getRandomNumberRng(1, 30) * 1000;
}
sunnerTime = timerTime + vm->getTotalPlayTime();
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 337a57e3e1..384e89a4cf 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -1467,7 +1467,7 @@ static void catherineViewerIdleTimer(MohawkEngine_Riven *vm) {
VideoHandle videoHandle = vm->_video->playMovieRiven(30);
// Reset the timer
- vm->installTimer(&catherineViewerIdleTimer, vm->_video->getDuration(videoHandle) + vm->_rnd->getRandomNumber(60) * 1000);
+ vm->installTimer(&catherineViewerIdleTimer, vm->_video->getDuration(videoHandle).msecs() + vm->_rnd->getRandomNumber(60) * 1000);
}
void RivenExternal::xglview_prisonon(uint16 argc, uint16 *argv) {
@@ -1507,7 +1507,7 @@ void RivenExternal::xglview_prisonon(uint16 argc, uint16 *argv) {
_vm->_video->activateMLST(cathMovie, _vm->getCurCard());
VideoHandle videoHandle = _vm->_video->playMovieRiven(30);
- timeUntilNextMovie = _vm->_video->getDuration(videoHandle) + _vm->_rnd->getRandomNumber(60) * 1000;
+ timeUntilNextMovie = _vm->_video->getDuration(videoHandle).msecs() + _vm->_rnd->getRandomNumber(60) * 1000;
} else {
// Otherwise, just redraw the imager
timeUntilNextMovie = _vm->_rnd->getRandomNumberRng(10, 20) * 1000;
@@ -2335,7 +2335,7 @@ static void rebelPrisonWindowTimer(MohawkEngine_Riven *vm) {
VideoHandle handle = vm->_video->playMovieRiven(movie);
// Ensure the next video starts after this one ends
- uint32 timeUntilNextVideo = vm->_video->getDuration(handle) + vm->_rnd->getRandomNumberRng(38, 58) * 1000;
+ uint32 timeUntilNextVideo = vm->_video->getDuration(handle).msecs() + vm->_rnd->getRandomNumberRng(38, 58) * 1000;
// Save the time in case we leave the card and return
vm->_vars["rvillagetime"] = timeUntilNextVideo + vm->getTotalPlayTime();
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index b1b99722d5..8b0130d711 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -493,9 +493,9 @@ uint32 VideoManager::getTime(VideoHandle handle) {
return _videoStreams[handle]->getTime();
}
-uint32 VideoManager::getDuration(VideoHandle handle) {
+Audio::Timestamp VideoManager::getDuration(VideoHandle handle) {
assert(handle != NULL_VID_HANDLE);
- return _videoStreams[handle]->getDuration().msecs();
+ return _videoStreams[handle]->getDuration();
}
bool VideoManager::endOfVideo(VideoHandle handle) {
@@ -536,6 +536,16 @@ void VideoManager::setVideoLooping(VideoHandle handle, bool loop) {
_videoStreams[handle].loop = loop;
}
+Common::Rational VideoManager::getVideoRate(VideoHandle handle) const {
+ assert(handle != NULL_VID_HANDLE);
+ return _videoStreams[handle]->getRate();
+}
+
+void VideoManager::setVideoRate(VideoHandle handle, const Common::Rational &rate) {
+ assert(handle != NULL_VID_HANDLE);
+ _videoStreams[handle]->setRate(rate);
+}
+
void VideoManager::pauseMovie(VideoHandle handle, bool pause) {
assert(handle != NULL_VID_HANDLE);
_videoStreams[handle]->pauseVideo(pause);
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index 6d2783936d..2c4c827aa8 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -101,12 +101,14 @@ public:
int getCurFrame(VideoHandle handle);
uint32 getFrameCount(VideoHandle handle);
uint32 getTime(VideoHandle handle);
- uint32 getDuration(VideoHandle videoHandle);
+ Audio::Timestamp getDuration(VideoHandle videoHandle);
bool endOfVideo(VideoHandle handle);
void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end);
void drawVideoFrame(VideoHandle handle, Audio::Timestamp time);
void seekToTime(VideoHandle handle, Audio::Timestamp time);
void setVideoLooping(VideoHandle handle, bool loop);
+ Common::Rational getVideoRate(VideoHandle handle) const;
+ void setVideoRate(VideoHandle handle, const Common::Rational &rate);
void waitUntilMovieEnds(VideoHandle videoHandle);
void delayUntilMovieEnds(VideoHandle videoHandle);
void pauseMovie(VideoHandle videoHandle, bool pause);
diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp
index 36e8f8466e..719c288af5 100644
--- a/engines/mohawk/view.cpp
+++ b/engines/mohawk/view.cpp
@@ -361,8 +361,8 @@ void View::idleView() {
void View::setModule(Module *module) {
if (_currentModule) {
- module->shutdown();
- delete module;
+ _currentModule->shutdown();
+ delete _currentModule;
}
_currentModule = NULL;
diff --git a/engines/neverhood/background.cpp b/engines/neverhood/background.cpp
new file mode 100644
index 0000000000..e9e5325e77
--- /dev/null
+++ b/engines/neverhood/background.cpp
@@ -0,0 +1,60 @@
+/* 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 "neverhood/background.h"
+
+namespace Neverhood {
+
+// Background
+
+Background::Background(NeverhoodEngine *vm, int objectPriority)
+ : Entity(vm, objectPriority), _surface(NULL), _spriteResource(vm) {
+ // Empty
+}
+
+Background::Background(NeverhoodEngine *vm, uint32 fileHash, int objectPriority, int surfacePriority)
+ : Entity(vm, objectPriority), _surface(NULL), _spriteResource(vm) {
+
+ _spriteResource.load(fileHash);
+ createSurface(surfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ _surface->drawSpriteResource(_spriteResource);
+
+}
+
+Background::~Background() {
+ delete _surface;
+}
+
+void Background::createSurface(int surfacePriority, int16 width, int16 height) {
+ _surface = new BaseSurface(_vm, surfacePriority, width, height, "background");
+ _surface->setTransparent(false);
+ _spriteResource.getPosition().x = width;
+ _spriteResource.getPosition().y = height;
+}
+
+void Background::load(uint32 fileHash) {
+ _spriteResource.load(fileHash);
+ if (_surface)
+ _surface->drawSpriteResource(_spriteResource);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/background.h b/engines/neverhood/background.h
new file mode 100644
index 0000000000..ef88be21c0
--- /dev/null
+++ b/engines/neverhood/background.h
@@ -0,0 +1,49 @@
+/* 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 NEVERHOOD_BACKGROUND_H
+#define NEVERHOOD_BACKGROUND_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/entity.h"
+#include "neverhood/graphics.h"
+#include "neverhood/resource.h"
+
+namespace Neverhood {
+
+class Background : public Entity {
+public:
+ Background(NeverhoodEngine *vm, int objectPriority);
+ Background(NeverhoodEngine *vm, uint32 fileHash, int objectPriority, int surfacePriority);
+ virtual ~Background();
+ BaseSurface *getSurface() { return _surface; }
+ void createSurface(int surfacePriority, int16 width, int16 height);
+ void load(uint32 fileHash);
+ SpriteResource& getSpriteResource() { return _spriteResource; }
+protected:
+ BaseSurface *_surface;
+ SpriteResource _spriteResource;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_BACKGROUND_H */
diff --git a/engines/neverhood/blbarchive.cpp b/engines/neverhood/blbarchive.cpp
new file mode 100644
index 0000000000..9f5f46487c
--- /dev/null
+++ b/engines/neverhood/blbarchive.cpp
@@ -0,0 +1,159 @@
+/* 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/dcl.h"
+#include "neverhood/blbarchive.h"
+
+namespace Neverhood {
+
+/**
+ * A special variant of SafeSeekableSubReadStream which locks a mutex during each read.
+ * This is neccessary because the music is streamed from disk and it could happen
+ * that a sound effect or another music track is played from the same read stream
+ * while the first music track is updated/read.
+ */
+
+class SafeMutexedSeekableSubReadStream : public Common::SafeSeekableSubReadStream {
+public:
+ SafeMutexedSeekableSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, DisposeAfterUse::Flag disposeParentStream,
+ Common::Mutex &mutex)
+ : SafeSeekableSubReadStream(parentStream, begin, end, disposeParentStream), _mutex(mutex) {
+ }
+ virtual uint32 read(void *dataPtr, uint32 dataSize);
+protected:
+ Common::Mutex &_mutex;
+};
+
+uint32 SafeMutexedSeekableSubReadStream::read(void *dataPtr, uint32 dataSize) {
+ Common::StackLock lock(_mutex);
+ return Common::SafeSeekableSubReadStream::read(dataPtr, dataSize);
+}
+
+BlbArchive::BlbArchive() : _extData(NULL) {
+}
+
+BlbArchive::~BlbArchive() {
+ delete[] _extData;
+}
+
+void BlbArchive::open(const Common::String &filename) {
+ BlbHeader header;
+ uint16 *extDataOffsets;
+
+ _entries.clear();
+
+ if (!_fd.open(filename))
+ error("BlbArchive::open() Could not open %s", filename.c_str());
+
+ header.id1 = _fd.readUint32LE();
+ header.id2 = _fd.readUint16LE();
+ header.extDataSize = _fd.readUint16LE();
+ header.fileSize = _fd.readUint32LE();
+ header.fileCount = _fd.readUint32LE();
+
+ if (header.id1 != 0x2004940 || header.id2 != 7 || header.fileSize != _fd.size())
+ error("BlbArchive::open() %s seems to be corrupt", filename.c_str());
+
+ debug(4, "%s: fileCount = %d", filename.c_str(), header.fileCount);
+
+ _entries.reserve(header.fileCount);
+
+ // Load file hashes
+ for (uint i = 0; i < header.fileCount; i++) {
+ BlbArchiveEntry entry;
+ entry.fileHash = _fd.readUint32LE();
+ _entries.push_back(entry);
+ }
+
+ extDataOffsets = new uint16[header.fileCount];
+
+ // Load file records
+ for (uint i = 0; i < header.fileCount; i++) {
+ BlbArchiveEntry &entry = _entries[i];
+ entry.type = _fd.readByte();
+ entry.comprType = _fd.readByte();
+ entry.extData = NULL;
+ extDataOffsets[i] = _fd.readUint16LE();
+ entry.timeStamp = _fd.readUint32LE();
+ entry.offset = _fd.readUint32LE();
+ entry.diskSize = _fd.readUint32LE();
+ entry.size = _fd.readUint32LE();
+ debug(4, "%08X: %03d, %02X, %04X, %08X, %08X, %08X, %08X",
+ entry.fileHash, entry.type, entry.comprType, extDataOffsets[i], entry.timeStamp,
+ entry.offset, entry.diskSize, entry.size);
+ }
+
+ // Load ext data
+ if (header.extDataSize > 0) {
+ _extData = new byte[header.extDataSize];
+ _fd.read(_extData, header.extDataSize);
+ for (uint i = 0; i < header.fileCount; i++)
+ _entries[i].extData = extDataOffsets[i] > 0 ? _extData + extDataOffsets[i] - 1 : NULL;
+ }
+
+ delete[] extDataOffsets;
+
+}
+
+void BlbArchive::load(uint index, byte *buffer, uint32 size) {
+ load(&_entries[index], buffer, size);
+}
+
+void BlbArchive::load(BlbArchiveEntry *entry, byte *buffer, uint32 size) {
+ Common::StackLock lock(_mutex);
+
+ _fd.seek(entry->offset);
+
+ switch (entry->comprType) {
+ case 1: // Uncompressed
+ if (size == 0)
+ size = entry->diskSize;
+ _fd.read(buffer, size);
+ break;
+ case 3: // DCL-compressed
+ if (!Common::decompressDCL(&_fd, buffer, entry->diskSize, entry->size))
+ error("BlbArchive::load() Error during decompression of %08X", entry->fileHash);
+ break;
+ default:
+ error("BlbArchive::load() Unknown compression type %d", entry->comprType);
+ }
+
+}
+
+byte *BlbArchive::getEntryExtData(uint index) {
+ return getEntryExtData(&_entries[index]);
+}
+
+byte *BlbArchive::getEntryExtData(BlbArchiveEntry *entry) {
+ return entry->extData;
+}
+
+Common::SeekableReadStream *BlbArchive::createStream(uint index) {
+ return createStream(&_entries[index]);
+}
+
+Common::SeekableReadStream *BlbArchive::createStream(BlbArchiveEntry *entry) {
+ return new SafeMutexedSeekableSubReadStream(&_fd, entry->offset, entry->offset + entry->diskSize,
+ DisposeAfterUse::NO, _mutex);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/blbarchive.h b/engines/neverhood/blbarchive.h
new file mode 100644
index 0000000000..620b12b8ac
--- /dev/null
+++ b/engines/neverhood/blbarchive.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 NEVERHOOD_BLBARCHIVE_H
+#define NEVERHOOD_BLBARCHIVE_H
+
+#include "common/array.h"
+#include "common/file.h"
+#include "common/mutex.h"
+#include "common/stream.h"
+#include "common/substream.h"
+#include "neverhood/neverhood.h"
+
+namespace Neverhood {
+
+struct BlbHeader {
+ uint32 id1;
+ uint16 id2;
+ uint16 extDataSize;
+ int32 fileSize;
+ uint32 fileCount;
+};
+
+struct BlbArchiveEntry {
+ uint32 fileHash;
+ byte type;
+ byte comprType;
+ byte *extData;
+ uint32 timeStamp;
+ uint32 offset;
+ uint32 diskSize;
+ uint32 size;
+};
+
+class BlbArchive {
+public:
+ BlbArchive();
+ ~BlbArchive();
+ void open(const Common::String &filename);
+ void load(uint index, byte *buffer, uint32 size);
+ void load(BlbArchiveEntry *entry, byte *buffer, uint32 size);
+ byte *getEntryExtData(uint index);
+ byte *getEntryExtData(BlbArchiveEntry *entry);
+ uint32 getSize(uint index) { return _entries[index].size; }
+ BlbArchiveEntry *getEntry(uint index) { return &_entries[index]; }
+ uint getCount() { return _entries.size(); }
+ Common::SeekableReadStream *createStream(uint index);
+ Common::SeekableReadStream *createStream(BlbArchiveEntry *entry);
+private:
+ Common::File _fd;
+ Common::Mutex _mutex;
+ Common::Array<BlbArchiveEntry> _entries;
+ byte *_extData;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_BLBARCHIVE_H */
diff --git a/engines/neverhood/console.cpp b/engines/neverhood/console.cpp
new file mode 100644
index 0000000000..7b5add65c7
--- /dev/null
+++ b/engines/neverhood/console.cpp
@@ -0,0 +1,172 @@
+/* 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 "neverhood/console.h"
+#include "gui/debugger.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1600.h"
+
+namespace Neverhood {
+
+Console::Console(NeverhoodEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("cheat", WRAP_METHOD(Console, Cmd_Cheat));
+ DCmd_Register("dumpvars", WRAP_METHOD(Console, Cmd_Dumpvars));
+ DCmd_Register("room", WRAP_METHOD(Console, Cmd_Room));
+ DCmd_Register("surfaces", WRAP_METHOD(Console, Cmd_Surfaces));
+}
+
+Console::~Console() {
+}
+
+bool Console::Cmd_Room(int argc, const char **argv) {
+ int currentModule = _vm->_gameModule->getCurrentModuleNum();
+ int previousModule = _vm->_gameModule->getPreviousModuleNum();
+ int scene = _vm->gameState().sceneNum;
+
+ DebugPrintf("Current module: %d, previous module: %d, scene %d\n", currentModule, previousModule, scene);
+
+ if (argc != 3) {
+ DebugPrintf("Use room <module> <scene> to change rooms\n");
+ DebugPrintf("Modules are incremental by 100, from 1000 to 3000\n");
+ } else {
+ int newModule = atoi(argv[1]);
+ int newScene = atoi(argv[2]);
+
+ _vm->gameState().sceneNum = newScene;
+ _vm->_gameModule->createModule(newModule, -1);
+ }
+
+ return true;
+}
+
+bool Console::Cmd_Surfaces(int argc, const char **argv) {
+ if (_vm->_gameModule->_childObject) {
+ ((Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject)->printSurfaces(this);
+ }
+ return true;
+}
+
+bool Console::Cmd_Cheat(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Cheats for various puzzles in the game\n");
+ DebugPrintf("Use %s <cheatname> to use a cheat.\n", argv[0]);
+ DebugPrintf("Cheats:\n-------\n");
+ DebugPrintf(" buttons - enables all 3 buttons on the door in the purple building, module 3000, scene 9\n");
+ DebugPrintf(" cannon - sets the correct cannon combination in module 3000, scene 8\n");
+ DebugPrintf(" dice - shows the correct dice combination in the teddy bear puzzle, module 1100, scene 6\n");
+ DebugPrintf(" memory - solves the memory puzzle, module 1400, scene 4\n");
+ DebugPrintf(" music - shows the correct index in the radio music puzzle, module 2800, scene 1\n");
+ DebugPrintf(" radio - enables the radio, module 3000, scene 9 - same as pulling the rightmost cord in the flytrap room\n");
+ DebugPrintf(" symbols - solves the symbols puzzle, module 1600, scene 8. Only available in that room\n");
+ DebugPrintf(" tubes - shows the correct test tube combination in module 2800, scenes 7 and 10, can be used anywhere\n");
+ return true;
+ }
+
+ Common::String cheatName = argv[1];
+ int moduleNum = _vm->_gameModule->getCurrentModuleNum();
+ int sceneNum = _vm->gameState().sceneNum;
+
+ if (cheatName == "buttons") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+
+ scene->setSubVar(VA_LOCKS_DISABLED, 0x304008D2, 1); // kScene3010ButtonNameHashes[0]
+ scene->setSubVar(VA_LOCKS_DISABLED, 0x40119852, 1); // kScene3010ButtonNameHashes[1]
+ scene->setSubVar(VA_LOCKS_DISABLED, 0x01180951, 1); // kScene3010ButtonNameHashes[2]
+
+ DebugPrintf("All 3 door buttons have been enabled\n");
+ } else if (cheatName == "cannon") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+
+ for (int i = 0; i < 3; i++)
+ scene->setSubVar(VA_CURR_CANNON_SYMBOLS, i, scene->getSubVar(VA_GOOD_CANNON_SYMBOLS_1, i));
+
+ for (int i = 3; i < 6; i++)
+ scene->setSubVar(VA_CURR_CANNON_SYMBOLS, i, scene->getSubVar(VA_GOOD_CANNON_SYMBOLS_2, i - 3));
+
+ DebugPrintf("Puzzle solved\n");
+ } else if (cheatName == "dice") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+ DebugPrintf("Good: (%d %d %d), current: (%d %d %d)\n",
+ scene->getSubVar(VA_GOOD_DICE_NUMBERS, 0), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 1), scene->getSubVar(VA_GOOD_DICE_NUMBERS, 2),
+ scene->getSubVar(VA_CURR_DICE_NUMBERS, 0), scene->getSubVar(VA_CURR_DICE_NUMBERS, 1), scene->getSubVar(VA_CURR_DICE_NUMBERS, 2)
+ );
+ } else if (cheatName == "memory") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+
+ // Autosolve all tiles and leave only two matching tiles closed
+ for (int i = 0; i < 48; i++)
+ scene->setSubVar(VA_IS_TILE_MATCH, i, 1);
+
+ // Close the top left tile
+ scene->setSubVar(VA_IS_TILE_MATCH, 0, 0);
+
+ // Find and close the pair of the top left tile
+ for (int i = 0; i < 48; i++) {
+ if (i != 0 && scene->getSubVar(VA_TILE_SYMBOLS, i) == scene->getSubVar(VA_TILE_SYMBOLS, 0)) {
+ scene->setSubVar(VA_IS_TILE_MATCH, i, 0);
+ break;
+ }
+ }
+
+ DebugPrintf("Puzzle solved\n");
+ } else if (cheatName == "music") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+ DebugPrintf("Good music index: %d, current radio music index: %d\n", scene->getGlobalVar(V_CURR_RADIO_MUSIC_INDEX), scene->getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX));
+ } else if (cheatName == "radio") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+ scene->setGlobalVar(V_RADIO_ENABLED, 1);
+
+ DebugPrintf("The radio has been enabled\n");
+ } else if (cheatName == "symbols") {
+ if (moduleNum == 1600 && sceneNum == 8) {
+ Scene1609 *scene = ((Scene1609 *)((Module1600 *)_vm->_gameModule->_childObject)->_childObject);
+
+ for (int index = 0; index < 12; index++) {
+ scene->_asSymbols[index]->change((int)scene->getSubVar(VA_CODE_SYMBOLS, index) + 12, index == (int)scene->getSubVar(VA_CODE_SYMBOLS, scene->_noisySymbolIndex));
+ }
+
+ scene->_changeCurrentSymbol = false;
+ scene->_symbolPosition = 11;
+ scene->_countdown1 = 36;
+
+ DebugPrintf("Puzzle solved\n");
+ } else {
+ DebugPrintf("Only available in module 1600, scene 8\n");
+ }
+ } else if (cheatName == "tubes") {
+ Scene *scene = (Scene *)((GameModule *)_vm->_gameModule->_childObject)->_childObject;
+ DebugPrintf("Tube set 1: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2));
+ DebugPrintf("Tube set 2: %d %d %d\n", scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1), scene->getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2));
+ }
+
+ return true;
+}
+
+bool Console::Cmd_Dumpvars(int argc, const char **argv) {
+ _vm->_gameVars->dumpVars(this);
+
+ return true;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/console.h b/engines/neverhood/console.h
new file mode 100644
index 0000000000..40c11b50e3
--- /dev/null
+++ b/engines/neverhood/console.h
@@ -0,0 +1,47 @@
+/* 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 NEVERHOOD_CONSOLE_H
+#define NEVERHOOD_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace Neverhood {
+
+class NeverhoodEngine;
+
+class Console : public GUI::Debugger {
+public:
+ Console(NeverhoodEngine *vm);
+ virtual ~Console(void);
+
+private:
+ NeverhoodEngine *_vm;
+
+ bool Cmd_Room(int argc, const char **argv);
+ bool Cmd_Surfaces(int argc, const char **argv);
+ bool Cmd_Cheat(int argc, const char **argv);
+ bool Cmd_Dumpvars(int argc, const char **argv);
+};
+
+} // End of namespace Neverhood
+#endif
diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp
new file mode 100644
index 0000000000..5f860f8519
--- /dev/null
+++ b/engines/neverhood/detection.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 "base/plugins.h"
+
+#include "engines/advancedDetector.h"
+#include "common/file.h"
+
+#include "neverhood/neverhood.h"
+
+
+namespace Neverhood {
+
+struct NeverhoodGameDescription {
+ ADGameDescription desc;
+
+ int gameID;
+ int gameType;
+ uint32 features;
+ uint16 version;
+};
+
+const char *NeverhoodEngine::getGameId() const {
+ return _gameDescription->desc.gameid;
+}
+
+uint32 NeverhoodEngine::getFeatures() const {
+ return _gameDescription->features;
+}
+
+Common::Platform NeverhoodEngine::getPlatform() const {
+ return _gameDescription->desc.platform;
+}
+
+uint16 NeverhoodEngine::getVersion() const {
+ return _gameDescription->version;
+}
+
+bool NeverhoodEngine::isDemo() const {
+ return _gameDescription->desc.flags & ADGF_DEMO;
+}
+
+}
+
+static const PlainGameDescriptor neverhoodGames[] = {
+ {"neverhood", "The Neverhood Chronicles"},
+ {0, 0}
+};
+
+namespace Neverhood {
+
+static const NeverhoodGameDescription gameDescriptions[] = {
+
+ {
+ // Neverhood English version
+ {
+ "neverhood",
+ 0,
+ AD_ENTRY1s("hd.blb", "22958d968458c9ff221aee38577bb2b2", 4279716),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ {
+ // Neverhood English demo version
+ {
+ "neverhood",
+ "Demo",
+ AD_ENTRY1s("nevdemo.blb", "05b735cfb1086892bec79b54dca5545b", 22564568),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ {
+ // Neverhood Russian version. Dyadyushka Risech
+ {
+ "neverhood",
+ "DR",
+ AD_ENTRY1s("hd.blb", "787951bf094aad9962291e69a707bdde", 4248635),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ {
+ // Neverhood Russian version. Fargus
+ {
+ "neverhood",
+ "Fargus",
+ AD_ENTRY1s("hd.blb", "c87c69db423f560d3708e9de78751a7f", 4425816),
+ Common::RU_RUS,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ 0,
+ 0,
+ 0,
+ 0,
+ },
+
+ { AD_TABLE_END_MARKER, 0, 0, 0, 0 }
+};
+
+} // End of namespace Neverhood
+
+class NeverhoodMetaEngine : public AdvancedMetaEngine {
+public:
+ NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(Neverhood::NeverhoodGameDescription), neverhoodGames) {
+ _singleid = "neverhood";
+ _guioptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOMIDI);
+ }
+
+ virtual const char *getName() const {
+ return "Neverhood Engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "Neverhood (C) The Neverhood, Inc.";
+ }
+
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+
+ SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
+ void removeSaveState(const char *target, int slot) const;
+ SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+
+};
+
+bool NeverhoodMetaEngine::hasFeature(MetaEngineFeature f) const {
+ return
+ (f == kSupportsListSaves) ||
+ (f == kSupportsLoadingDuringStartup) ||
+ (f == kSupportsDeleteSave) ||
+ (f == kSavesSupportMetaInfo) ||
+ (f == kSavesSupportThumbnail) ||
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
+}
+
+bool Neverhood::NeverhoodEngine::hasFeature(EngineFeature f) const {
+ return
+ (f == kSupportsRTL) ||
+ (f == kSupportsLoadingDuringRuntime) ||
+ (f == kSupportsSavingDuringRuntime);
+}
+
+bool NeverhoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const Neverhood::NeverhoodGameDescription *gd = (const Neverhood::NeverhoodGameDescription *)desc;
+ if (gd) {
+ *engine = new Neverhood::NeverhoodEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+SaveStateList NeverhoodMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Neverhood::NeverhoodEngine::SaveHeader header;
+ Common::String pattern = target;
+ pattern += ".???";
+
+ Common::StringArray filenames;
+ filenames = saveFileMan->listSavefiles(pattern.c_str());
+ Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
+
+ SaveStateList saveList;
+ 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
+ int slotNum = atoi(file->c_str() + file->size() - 3);
+ if (slotNum >= 0 && slotNum <= 999) {
+ Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
+ if (in) {
+ if (Neverhood::NeverhoodEngine::readSaveHeader(in, false, header) == Neverhood::NeverhoodEngine::kRSHENoError) {
+ saveList.push_back(SaveStateDescriptor(slotNum, header.description));
+ }
+ delete in;
+ }
+ }
+ }
+
+ return saveList;
+}
+
+int NeverhoodMetaEngine::getMaximumSaveSlot() const {
+ return 999;
+}
+
+void NeverhoodMetaEngine::removeSaveState(const char *target, int slot) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
+ saveFileMan->removeSavefile(filename.c_str());
+}
+
+SaveStateDescriptor NeverhoodMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
+ Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(target, slot);
+ Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(filename.c_str());
+
+ if (in) {
+ Neverhood::NeverhoodEngine::SaveHeader header;
+ Neverhood::NeverhoodEngine::kReadSaveHeaderError error;
+
+ error = Neverhood::NeverhoodEngine::readSaveHeader(in, true, header);
+ delete in;
+
+ if (error == Neverhood::NeverhoodEngine::kRSHENoError) {
+ SaveStateDescriptor desc(slot, header.description);
+
+ desc.setDeletableFlag(false);
+ desc.setWriteProtectedFlag(false);
+ desc.setThumbnail(header.thumbnail);
+ int day = (header.saveDate >> 24) & 0xFF;
+ int month = (header.saveDate >> 16) & 0xFF;
+ int year = header.saveDate & 0xFFFF;
+ desc.setSaveDate(year, month, day);
+ int hour = (header.saveTime >> 16) & 0xFF;
+ int minutes = (header.saveTime >> 8) & 0xFF;
+ desc.setSaveTime(hour, minutes);
+ desc.setPlayTime(header.playTime * 1000);
+ return desc;
+ }
+ }
+
+ return SaveStateDescriptor();
+}
+
+#if PLUGIN_ENABLED_DYNAMIC(NEVERHOOD)
+ REGISTER_PLUGIN_DYNAMIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(NEVERHOOD, PLUGIN_TYPE_ENGINE, NeverhoodMetaEngine);
+#endif
diff --git a/engines/neverhood/diskplayerscene.cpp b/engines/neverhood/diskplayerscene.cpp
new file mode 100644
index 0000000000..94a68a7526
--- /dev/null
+++ b/engines/neverhood/diskplayerscene.cpp
@@ -0,0 +1,507 @@
+/* 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 "neverhood/diskplayerscene.h"
+#include "neverhood/mouse.h"
+
+namespace Neverhood {
+
+static const uint32 kDiskplayerPaletteFileHashes[] = {
+ 0x03B78240,
+ 0x34B32B08,
+ 0x4F2569D4,
+ 0x07620590,
+ 0x38422401
+};
+
+static const byte kDiskplayerInitArray[] = {
+ 2, 1, 4, 5, 3, 11, 8, 6, 7, 9, 10, 17, 16, 18, 19, 20, 15, 14, 13, 12
+};
+
+static const uint32 kDiskplayerSmackerFileHashes[] = {
+ 0x010A2810,
+ 0x020A2810,
+ 0x040A2810,
+ 0x080A2810,
+ 0x100A2810,
+ 0x200A2810,
+ 0x400A2810,
+ 0x800A2810,
+ 0x000A2811,
+ 0x010C2810,
+ 0x020C2810,
+ 0x040C2810,
+ 0x080C2810,
+ 0x100C2810,
+ 0x200C2810,
+ 0x400C2810,
+ 0x800C2810,
+ 0x000C2811,
+ 0x000C2812,
+ 0x02002810,
+ 0x04002810
+};
+
+static const uint32 kDiskplayerSlotFileHashes1[] = {
+ 0x81312280,
+ 0x01312281,
+ 0x01312282,
+ 0x01312284,
+ 0x01312288,
+ 0x01312290,
+ 0x013122A0,
+ 0x013122C0,
+ 0x01312200,
+ 0x82312280,
+ 0x02312281,
+ 0x02312282,
+ 0x02312284,
+ 0x02312288,
+ 0x02312290,
+ 0x023122A0,
+ 0x023122C0,
+ 0x02312200,
+ 0x02312380,
+ 0x04312281
+};
+
+static const uint32 kDiskplayerSlotFileHashes2[] = {
+ 0x90443A00,
+ 0x90443A18,
+ 0x90443A28,
+ 0x90443A48,
+ 0x90443A88,
+ 0x90443B08,
+ 0x90443808,
+ 0x90443E08,
+ 0x90443208,
+ 0xA0443A00,
+ 0xA0443A18,
+ 0xA0443A28,
+ 0xA0443A48,
+ 0xA0443A88,
+ 0xA0443B08,
+ 0xA0443808,
+ 0xA0443E08,
+ 0xA0443208,
+ 0xA0442A08,
+ 0xC0443A18
+};
+
+static const uint32 kDiskplayerSlotFileHashes3[] = {
+ 0x10357320,
+ 0x10557320,
+ 0x10957320,
+ 0x11157320,
+ 0x12157320,
+ 0x14157320,
+ 0x18157320,
+ 0x00157320,
+ 0x30157320,
+ 0x1035B320,
+ 0x1055B320,
+ 0x1095B320,
+ 0x1115B320,
+ 0x1215B320,
+ 0x1415B320,
+ 0x1815B320,
+ 0x0015B320,
+ 0x3015B320,
+ 0x5015B320,
+ 0x10543320
+};
+
+static const uint32 kDiskplayerSlotFileHashes4[] = {
+ 0xDC8020E4,
+ 0xDC802164,
+ 0xDC802264,
+ 0xDC802464,
+ 0xDC802864,
+ 0xDC803064,
+ 0xDC800064,
+ 0xDC806064,
+ 0xDC80A064,
+ 0xDC8020E7,
+ 0xDC802167,
+ 0xDC802267,
+ 0xDC802467,
+ 0xDC802867,
+ 0xDC803067,
+ 0xDC800067,
+ 0xDC806067,
+ 0xDC80A067,
+ 0xDC812067,
+ 0xDC802161
+};
+
+AsDiskplayerSceneKey::AsDiskplayerSceneKey(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface1(0x100B90B4, 1200);
+ _x = 211;
+ _y = 195;
+ startAnimation(0x100B90B4, 0, -1);
+ _newStickFrameIndex = 0;
+ _needRefresh = true;
+ updatePosition();
+ setVisible(false);
+}
+
+uint32 AsDiskplayerSceneKey::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsDiskplayerSceneKey::stDropKey() {
+ startAnimation(0x100B90B4, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsDiskplayerSceneKey::handleMessage);
+ NextState(&AsDiskplayerSceneKey::stDropKeyDone);
+ setVisible(true);
+}
+
+void AsDiskplayerSceneKey::stDropKeyDone() {
+ stopAnimation();
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&Sprite::handleMessage);
+ setVisible(false);
+}
+
+DiskplayerPlayButton::DiskplayerPlayButton(NeverhoodEngine *vm, DiskplayerScene *diskplayerScene)
+ : StaticSprite(vm, 1400), _diskplayerScene(diskplayerScene), _isPlaying(false) {
+
+ loadSprite(0x24A4A664, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ loadSound(0, 0x44043000);
+ loadSound(1, 0x44045000);
+ SetMessageHandler(&DiskplayerPlayButton::handleMessage);
+}
+
+uint32 DiskplayerPlayButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_diskplayerScene->getDropKey()) {
+ if (_isPlaying) {
+ sendMessage(_diskplayerScene, 0x2001, 0);
+ release();
+ } else {
+ sendMessage(_diskplayerScene, 0x2000, 0);
+ press();
+ }
+ }
+ updatePosition();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void DiskplayerPlayButton::press() {
+ if (!_isPlaying) {
+ setVisible(true);
+ updatePosition();
+ playSound(0);
+ _isPlaying = true;
+ }
+}
+
+void DiskplayerPlayButton::release() {
+ if (_isPlaying) {
+ setVisible(false);
+ updatePosition();
+ playSound(1);
+ _isPlaying = false;
+ }
+}
+
+DiskplayerSlot::DiskplayerSlot(NeverhoodEngine *vm, DiskplayerScene *diskplayerScene, int slotIndex, bool isAvailable)
+ : Entity(vm, 0), _diskplayerScene(diskplayerScene), _isLocked(false), _isBlinking(false),
+ _blinkCountdown(0), _initialBlinkCountdown(2), _inactiveSlot(NULL), _appearSlot(NULL), _activeSlot(NULL) {
+
+ if (isAvailable && slotIndex < 20) {
+ _inactiveSlot = _diskplayerScene->addSprite(new StaticSprite(_vm, kDiskplayerSlotFileHashes1[slotIndex], 1100));
+ _appearSlot = _diskplayerScene->addSprite(new StaticSprite(_vm, kDiskplayerSlotFileHashes2[slotIndex], 1000));
+ _activeSlot = _diskplayerScene->addSprite(new StaticSprite(_vm, kDiskplayerSlotFileHashes3[slotIndex], 1100));
+ _inactiveSlot->setVisible(false);
+ _appearSlot->setVisible(false);
+ _activeSlot->setVisible(false);
+ loadSound(0, 0x46210074);
+ setSoundPan(0, slotIndex * 100 / 19);
+ } else if (slotIndex != 20) {
+ _activeSlot = _diskplayerScene->addSprite(new StaticSprite(_vm, kDiskplayerSlotFileHashes4[slotIndex], 1100));
+ _activeSlot->setVisible(false);
+ }
+ SetUpdateHandler(&DiskplayerSlot::update);
+}
+
+void DiskplayerSlot::update() {
+ if (_blinkCountdown != 0 && (--_blinkCountdown == 0)) {
+ if (_isBlinking) {
+ if (_inactiveSlot)
+ _inactiveSlot->setVisible(true);
+ if (_activeSlot)
+ _activeSlot->setVisible(false);
+ _blinkCountdown = _initialBlinkCountdown / 2;
+ } else {
+ if (_inactiveSlot)
+ _inactiveSlot->setVisible(false);
+ if (_activeSlot)
+ _activeSlot->setVisible(true);
+ _blinkCountdown = _initialBlinkCountdown;
+ }
+ _isBlinking = !_isBlinking;
+ }
+}
+
+void DiskplayerSlot::appear() {
+ if (_inactiveSlot)
+ _inactiveSlot->setVisible(true);
+ if (_appearSlot)
+ _appearSlot->setVisible(true);
+ if (_inactiveSlot)
+ playSound(0);
+}
+
+void DiskplayerSlot::play() {
+ if (!_isLocked) {
+ if (_inactiveSlot)
+ _inactiveSlot->setVisible(false);
+ if (_activeSlot)
+ _activeSlot->setVisible(true);
+ _isBlinking = true;
+ _blinkCountdown = 0;
+ }
+}
+
+void DiskplayerSlot::activate() {
+ if (!_isLocked)
+ _blinkCountdown = _initialBlinkCountdown;
+}
+
+void DiskplayerSlot::stop() {
+ if (!_isLocked) {
+ if (_inactiveSlot)
+ _inactiveSlot->setVisible(true);
+ if (_activeSlot)
+ _activeSlot->setVisible(false);
+ _isBlinking = false;
+ _blinkCountdown = 0;
+ }
+}
+
+DiskplayerScene::DiskplayerScene(NeverhoodEngine *vm, Module *parentModule, int paletteIndex)
+ : Scene(vm, parentModule), _diskIndex(0), _appearCountdown(0), _tuneInCountdown(0),
+ _hasAllDisks(false), _dropKey(false), _inputDisabled(true), _updateStatus(kUSStopped) {
+
+ int availableDisksCount = 0;
+
+ setBackground(0x8A000044);
+ setPalette(kDiskplayerPaletteFileHashes[paletteIndex]);
+
+ _ssPlayButton = insertSprite<DiskplayerPlayButton>(this);
+ addCollisionSprite(_ssPlayButton);
+
+ _asKey = insertSprite<AsDiskplayerSceneKey>();
+
+ for (int i = 0; i < 20; i++) {
+ _diskAvailable[i] = false;
+ if (getSubVar(VA_IS_TAPE_INSERTED, i))
+ availableDisksCount++;
+ }
+
+ for (int i = 0; i < availableDisksCount; i++)
+ _diskAvailable[kDiskplayerInitArray[i] - 1] = true;
+
+ for (int slotIndex = 0; slotIndex < 20; slotIndex++) {
+ _diskSlots[slotIndex] = new DiskplayerSlot(_vm, this, slotIndex, _diskAvailable[slotIndex]);
+ addEntity(_diskSlots[slotIndex]);
+ }
+
+ _hasAllDisks = availableDisksCount == 20;
+
+ if (_hasAllDisks && !getGlobalVar(V_HAS_FINAL_KEY))
+ _dropKey = true;
+
+ _finalDiskSlot = new DiskplayerSlot(_vm, this, 20, false);
+ addEntity(_finalDiskSlot);
+
+ insertPuzzleMouse(0x000408A8, 20, 620);
+ showMouse(false);
+
+ _diskSmackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, 0x08288103, false, true));
+ _diskSmackerPlayer->setDrawPos(154, 86);
+ _vm->_screen->setSmackerDecoder(_diskSmackerPlayer->getSmackerDecoder());
+
+ _palette->usePalette();
+
+ SetMessageHandler(&DiskplayerScene::handleMessage);
+ SetUpdateHandler(&DiskplayerScene::update);
+ _appearCountdown = 6;
+
+}
+
+void DiskplayerScene::update() {
+ Scene::update();
+
+ if (_updateStatus == kUSTuningIn && _diskSmackerPlayer->isDone()) {
+ if (_diskAvailable[_diskIndex])
+ playDisk();
+ else
+ playStatic();
+ } else if (_updateStatus == kUSPlaying && _diskSmackerPlayer->isDone()) {
+ _diskSlots[_diskIndex]->stop();
+ _diskIndex++;
+ if (_hasAllDisks) {
+ if (_diskIndex != 20) {
+ playDisk();
+ } else if (_dropKey) {
+ playDisk();
+ _updateStatus = kUSPlayingFinal;
+ } else {
+ _diskIndex = 0;
+ stop();
+ }
+ } else if (_diskIndex != 20) {
+ tuneIn();
+ } else {
+ _diskIndex = 0;
+ stop();
+ }
+ } else if (_updateStatus == kUSPlayingFinal) {
+ if (_diskSmackerPlayer->getFrameNumber() == 133) {
+ _asKey->stDropKey();
+ setGlobalVar(V_HAS_FINAL_KEY, 1);
+ } else if (_diskSmackerPlayer->isDone()) {
+ for (int i = 0; i < 20; i++) {
+ _diskSlots[i]->setLocked(false);
+ _diskSlots[i]->stop();
+ }
+ _diskIndex = 0;
+ stop();
+ showMouse(true);
+ _dropKey = false;
+ }
+ }
+
+ if (_appearCountdown != 0 && (--_appearCountdown == 0)) {
+ _diskSlots[_diskIndex]->appear();
+ if (_dropKey) {
+ _diskSlots[_diskIndex]->activate();
+ _diskSlots[_diskIndex]->setLocked(true);
+ }
+ _diskIndex++;
+ while (!_diskAvailable[_diskIndex] && _diskIndex < 19)
+ _diskIndex++;
+ if (_diskIndex < 20) {
+ _appearCountdown = 1;
+ } else {
+ _diskIndex = 0;
+ _inputDisabled = false;
+ if (_dropKey) {
+ _ssPlayButton->press();
+ _tuneInCountdown = 2;
+ } else {
+ showMouse(true);
+ _diskSlots[_diskIndex]->activate();
+ }
+ }
+ }
+
+ if (_tuneInCountdown != 0 && (--_tuneInCountdown == 0))
+ playDisk();
+
+}
+
+uint32 DiskplayerScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ if (!_inputDisabled) {
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ sendMessage(_parentModule, 0x1009, 0);
+ } else if (!_dropKey &&
+ param.asPoint().x > 38 && param.asPoint().x < 598 &&
+ param.asPoint().y > 400 && param.asPoint().y < 460) {
+
+ _diskSlots[_diskIndex]->stop();
+ _diskIndex = (param.asPoint().x - 38) / 28;
+ _diskSlots[_diskIndex]->activate();
+ if (_updateStatus == kUSPlaying) {
+ if (_diskAvailable[_diskIndex])
+ playDisk();
+ else
+ playStatic();
+ }
+ }
+ break;
+ case 0x2000:
+ tuneIn();
+ break;
+ case 0x2001:
+ stop();
+ break;
+ }
+ }
+ return 0;
+}
+
+void DiskplayerScene::openSmacker(uint32 fileHash, bool keepLastFrame) {
+ _diskSmackerPlayer->open(fileHash, keepLastFrame);
+ _vm->_screen->setSmackerDecoder(_diskSmackerPlayer->getSmackerDecoder());
+ _palette->usePalette();
+}
+
+void DiskplayerScene::stop() {
+ openSmacker(0x08288103, true);
+ _ssPlayButton->release();
+ _updateStatus = kUSStopped;
+ _diskSlots[_diskIndex]->activate();
+}
+
+void DiskplayerScene::tuneIn() {
+ openSmacker(0x900001C1, false);
+ _ssPlayButton->release();
+ _updateStatus = kUSTuningIn;
+ _diskSlots[_diskIndex]->activate();
+}
+
+void DiskplayerScene::playDisk() {
+ openSmacker(kDiskplayerSmackerFileHashes[_diskIndex], false);
+ _updateStatus = kUSPlaying;
+ _diskSlots[_diskIndex]->play();
+}
+
+void DiskplayerScene::playStatic() {
+ openSmacker(0x90000101, false);
+ _ssPlayButton->release();
+ _updateStatus = kUSPlaying;
+ _diskSlots[_diskIndex]->activate();
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/diskplayerscene.h b/engines/neverhood/diskplayerscene.h
new file mode 100644
index 0000000000..4afaf8af9f
--- /dev/null
+++ b/engines/neverhood/diskplayerscene.h
@@ -0,0 +1,111 @@
+/* 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 NEVERHOOD_DISKPLAYERSCENE_H
+#define NEVERHOOD_DISKPLAYERSCENE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/scene.h"
+#include "neverhood/smackerplayer.h"
+
+namespace Neverhood {
+
+class DiskplayerScene;
+
+class AsDiskplayerSceneKey : public AnimatedSprite {
+public:
+ AsDiskplayerSceneKey(NeverhoodEngine *vm);
+ void stDropKey();
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stDropKeyDone();
+};
+
+class DiskplayerPlayButton : public StaticSprite {
+public:
+ DiskplayerPlayButton(NeverhoodEngine *vm, DiskplayerScene *diskplayerScene);
+ void press();
+ void release();
+protected:
+ DiskplayerScene *_diskplayerScene;
+ bool _isPlaying;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class DiskplayerSlot : public Entity {
+public:
+ DiskplayerSlot(NeverhoodEngine *vm, DiskplayerScene *diskplayerScene, int slotIndex, bool isAvailable);
+ void activate();
+ void stop();
+ void appear();
+ void play();
+ void setLocked(bool isLocked) { _isLocked = isLocked; }
+protected:
+ DiskplayerScene *_diskplayerScene;
+ Sprite *_inactiveSlot;
+ Sprite *_appearSlot;
+ Sprite *_activeSlot;
+ int _initialBlinkCountdown;
+ int _blinkCountdown;
+ bool _isLocked;
+ bool _isBlinking;
+ void update();
+};
+
+enum {
+ kUSStopped = 0,
+ kUSTuningIn = 1,
+ kUSPlaying = 2,
+ kUSPlayingFinal = 3
+};
+
+class DiskplayerScene : public Scene {
+public:
+ DiskplayerScene(NeverhoodEngine *vm, Module *parentModule, int paletteIndex);
+ bool getDropKey() const { return _dropKey; }
+protected:
+ SmackerPlayer *_diskSmackerPlayer;
+ DiskplayerPlayButton *_ssPlayButton;
+ AsDiskplayerSceneKey *_asKey;
+ DiskplayerSlot *_diskSlots[20];
+ DiskplayerSlot *_finalDiskSlot;
+ int _updateStatus;
+ bool _diskAvailable[20];
+ int _diskIndex;
+ int _appearCountdown;
+ int _tuneInCountdown;
+ bool _hasAllDisks;
+ bool _inputDisabled;
+ bool _dropKey;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void openSmacker(uint32 fileHash, bool keepLastFrame);
+ void stop();
+ void tuneIn();
+ void playDisk();
+ void playStatic();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_DISKPLAYERSCENE_H */
diff --git a/engines/neverhood/entity.cpp b/engines/neverhood/entity.cpp
new file mode 100644
index 0000000000..8b1298916c
--- /dev/null
+++ b/engines/neverhood/entity.cpp
@@ -0,0 +1,159 @@
+/* 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 "neverhood/entity.h"
+#include "neverhood/sound.h"
+
+namespace Neverhood {
+
+uint32 MessageParam::asInteger() const {
+ assert(_type == mptInteger);
+ return _integer;
+}
+
+NPoint MessageParam::asPoint() const {
+ assert(_type == mptInteger || _type == mptPoint);
+ if (_type == mptInteger) {
+ NPoint pt;
+ pt.x = _integer & 0xFFFF;
+ pt.y = (_integer >> 16) & 0xFFFF;
+ return pt;
+ }
+ return _point;
+}
+
+Entity *MessageParam::asEntity() const {
+ assert(_type == mptEntity);
+ return _entity;
+}
+
+Entity::Entity(NeverhoodEngine *vm, int priority)
+ : _vm(vm), _updateHandlerCb(NULL), _messageHandlerCb(NULL), _priority(priority), _soundResources(NULL) {
+}
+
+Entity::~Entity() {
+ deleteSoundResources();
+}
+
+void Entity::draw() {
+ // Empty
+}
+
+void Entity::handleUpdate() {
+ debug(5, "handleUpdate() -> [%s]", _updateHandlerCbName.c_str());
+ if (_updateHandlerCb)
+ (this->*_updateHandlerCb)();
+}
+
+uint32 Entity::receiveMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ debug(5, "receiveMessage(%04X) -> [%s]", messageNum, _messageHandlerCbName.c_str());
+ return _messageHandlerCb ? (this->*_messageHandlerCb)(messageNum, param, sender) : 0;
+}
+
+uint32 Entity::sendMessage(Entity *receiver, int messageNum, const MessageParam &param) {
+ return receiver ? receiver->receiveMessage(messageNum, param, this) : 0;
+}
+
+uint32 Entity::sendMessage(Entity *receiver, int messageNum, uint32 param) {
+ return sendMessage(receiver, messageNum, MessageParam(param));
+}
+
+uint32 Entity::sendPointMessage(Entity *receiver, int messageNum, const NPoint &param) {
+ return sendMessage(receiver, messageNum, MessageParam(param));
+}
+
+uint32 Entity::sendEntityMessage(Entity *receiver, int messageNum, Entity *param) {
+ return sendMessage(receiver, messageNum, MessageParam((Entity*)param));
+}
+
+uint32 Entity::getGlobalVar(uint32 nameHash) {
+ return _vm->_gameVars->getGlobalVar(nameHash);
+}
+
+void Entity::setGlobalVar(uint32 nameHash, uint32 value) {
+ _vm->_gameVars->setGlobalVar(nameHash, value);
+}
+
+uint32 Entity::getSubVar(uint32 nameHash, uint32 subNameHash) {
+ return _vm->_gameVars->getSubVar(nameHash, subNameHash);
+}
+
+void Entity::setSubVar(uint32 nameHash, uint32 subNameHash, uint32 value) {
+ _vm->_gameVars->setSubVar(nameHash, subNameHash, value);
+}
+
+void Entity::incGlobalVar(uint32 nameHash, int incrValue) {
+ setGlobalVar(nameHash, getGlobalVar(nameHash) + incrValue);
+}
+
+void Entity::incSubVar(uint32 nameHash, uint32 subNameHash, int incrValue) {
+ setSubVar(nameHash, subNameHash, getSubVar(nameHash, subNameHash) + incrValue);
+}
+
+SoundResource *Entity::getSoundResource(uint index) {
+ assert(index < kMaxSoundResources);
+ if (!_soundResources) {
+ _soundResources = new SoundResource*[kMaxSoundResources];
+ for (uint i = 0; i < kMaxSoundResources; ++i)
+ _soundResources[i] = NULL;
+ }
+ if (!_soundResources[index])
+ _soundResources[index] = new SoundResource(_vm);
+ return _soundResources[index];
+}
+
+void Entity::loadSound(uint index, uint32 fileHash) {
+ getSoundResource(index)->load(fileHash);
+}
+
+void Entity::playSound(uint index, uint32 fileHash) {
+ if (fileHash)
+ getSoundResource(index)->play(fileHash);
+ else
+ getSoundResource(index)->play();
+}
+
+void Entity::stopSound(uint index) {
+ getSoundResource(index)->stop();
+}
+
+bool Entity::isSoundPlaying(uint index) {
+ return getSoundResource(index)->isPlaying();
+}
+
+void Entity::setSoundVolume(uint index, int volume) {
+ getSoundResource(index)->setVolume(volume);
+}
+
+void Entity::setSoundPan(uint index, int pan) {
+ getSoundResource(index)->setPan(pan);
+}
+
+void Entity::deleteSoundResources() {
+ if (_soundResources) {
+ for (uint i = 0; i < kMaxSoundResources; ++i)
+ delete _soundResources[i];
+ delete[] _soundResources;
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/entity.h b/engines/neverhood/entity.h
new file mode 100644
index 0000000000..cba1bb9a7f
--- /dev/null
+++ b/engines/neverhood/entity.h
@@ -0,0 +1,120 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_ENTITY_H
+#define NEVERHOOD_ENTITY_H
+
+#include "common/str.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/gamevars.h"
+#include "neverhood/graphics.h"
+#include "neverhood/sound.h"
+
+namespace Neverhood {
+
+class Entity;
+class SoundResource;
+
+enum MessageParamType {
+ mptInteger,
+ mptPoint,
+ mptEntity
+};
+
+struct MessageParam {
+public:
+ MessageParam(uint32 value) : _type(mptInteger), _integer(value) {}
+ MessageParam(NPoint value) : _type(mptPoint), _point(value) {}
+ MessageParam(Entity *entity) : _type(mptEntity), _entity(entity) {}
+ uint32 asInteger() const;
+ NPoint asPoint() const;
+ Entity *asEntity() const;
+protected:
+ union {
+ uint32 _integer;
+ NPoint _point;
+ Entity *_entity;
+ };
+ MessageParamType _type;
+};
+
+// TODO: Disable heavy debug stuff in release mode
+
+#define SetUpdateHandler(handler) \
+ do { \
+ _updateHandlerCb = static_cast <void (Entity::*)(void)> (handler); \
+ debug(5, "SetUpdateHandler(" #handler ")"); \
+ _updateHandlerCbName = #handler; \
+ } while (0)
+
+#define SetMessageHandler(handler) \
+ do { \
+ _messageHandlerCb = static_cast <uint32 (Entity::*)(int messageNum, const MessageParam &param, Entity *sender)> (handler); \
+ debug(5, "SetMessageHandler(" #handler ")"); \
+ _messageHandlerCbName = #handler; \
+ } while (0)
+
+const uint kMaxSoundResources = 16;
+
+class Entity {
+public:
+ Common::String _updateHandlerCbName;
+ Common::String _messageHandlerCbName;
+ Entity(NeverhoodEngine *vm, int priority);
+ virtual ~Entity();
+ virtual void draw();
+ void handleUpdate();
+ uint32 receiveMessage(int messageNum, const MessageParam &param, Entity *sender);
+ // NOTE: These were overloaded before for the various message parameter types
+ // it caused some problems so each type gets its own sendMessage variant now
+ uint32 sendMessage(Entity *receiver, int messageNum, const MessageParam &param);
+ uint32 sendMessage(Entity *receiver, int messageNum, uint32 param);
+ uint32 sendPointMessage(Entity *receiver, int messageNum, const NPoint &param);
+ uint32 sendEntityMessage(Entity *receiver, int messageNum, Entity *param);
+ // Shortcuts for game variable access
+ uint32 getGlobalVar(uint32 nameHash);
+ void setGlobalVar(uint32 nameHash, uint32 value);
+ uint32 getSubVar(uint32 nameHash, uint32 subNameHash);
+ void setSubVar(uint32 nameHash, uint32 subNameHash, uint32 value);
+ void incGlobalVar(uint32 nameHash, int incrValue);
+ void incSubVar(uint32 nameHash, uint32 subNameHash, int incrValue);
+ int getPriority() const { return _priority; }
+ bool hasMessageHandler() const { return _messageHandlerCb != NULL; }
+protected:
+ void (Entity::*_updateHandlerCb)();
+ uint32 (Entity::*_messageHandlerCb)(int messageNum, const MessageParam &param, Entity *sender);
+ NeverhoodEngine *_vm;
+ int _priority;
+ SoundResource **_soundResources;
+ SoundResource *getSoundResource(uint index);
+ void loadSound(uint index, uint32 fileHash);
+ void playSound(uint index, uint32 fileHash = 0);
+ void stopSound(uint index);
+ bool isSoundPlaying(uint index);
+ void setSoundVolume(uint index, int volume);
+ void setSoundPan(uint index, int pan);
+ void deleteSoundResources();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_ENTITY_H */
diff --git a/engines/neverhood/gamemodule.cpp b/engines/neverhood/gamemodule.cpp
new file mode 100644
index 0000000000..96e8cc13a6
--- /dev/null
+++ b/engines/neverhood/gamemodule.cpp
@@ -0,0 +1,839 @@
+/* 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 "neverhood/gamemodule.h"
+
+#include "neverhood/graphics.h"
+#include "neverhood/menumodule.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/modules/module1300.h"
+#include "neverhood/modules/module1400.h"
+#include "neverhood/modules/module1500.h"
+#include "neverhood/modules/module1600.h"
+#include "neverhood/modules/module1700.h"
+#include "neverhood/modules/module1800.h"
+#include "neverhood/modules/module1900.h"
+#include "neverhood/modules/module2000.h"
+#include "neverhood/modules/module2100.h"
+#include "neverhood/modules/module2200.h"
+#include "neverhood/modules/module2300.h"
+#include "neverhood/modules/module2400.h"
+#include "neverhood/modules/module2500.h"
+#include "neverhood/modules/module2600.h"
+#include "neverhood/modules/module2700.h"
+#include "neverhood/modules/module2800.h"
+#include "neverhood/modules/module2900.h"
+#include "neverhood/modules/module3000.h"
+
+namespace Neverhood {
+
+static const uint32 kRadioMusicFileHashes[] = {
+ 0x82B22000,
+ 0x02B22004,
+ 0x42B22000,
+ 0x03322008,
+ 0x02B22001,
+ 0x02B22008,
+ 0x02B22020,
+ 0x03322001,
+ 0x03322002,
+ 0x03322004,
+ 0x03322040,
+ 0x02B22002,
+ 0x02B22010,
+ 0x03322010,
+ 0x02B22040,
+ 0x43322000,
+ 0x83322000,
+ 0x03322020
+};
+
+enum {
+ MENU_MODULE = 9999
+};
+
+GameModule::GameModule(NeverhoodEngine *vm)
+ : Module(vm, NULL), _moduleNum(-1), _prevChildObject(NULL), _prevModuleNum(-1),
+ _restoreGameRequested(false), _restartGameRequested(false), _canRequestMainMenu(true),
+ _mainMenuRequested(false) {
+
+ // Other initializations moved to actual engine class
+ _vm->_soundMan->playSoundThree(0x002D0031, 0x8861079);
+ SetMessageHandler(&GameModule::handleMessage);
+}
+
+GameModule::~GameModule() {
+ _vm->_soundMan->deleteSoundGroup(0x002D0031);
+ delete _childObject;
+ _childObject = NULL;
+}
+
+void GameModule::handleMouseMove(int16 x, int16 y) {
+ if (_childObject) {
+ NPoint mousePos;
+ mousePos.x = x;
+ mousePos.y = y;
+ debug(2, "GameModule::handleMouseMove(%d, %d)", x, y);
+ sendPointMessage(_childObject, 0, mousePos);
+ }
+}
+
+void GameModule::handleMouseDown(int16 x, int16 y) {
+ if (_childObject) {
+ NPoint mousePos;
+ mousePos.x = x;
+ mousePos.y = y;
+ debug(2, "GameModule::handleMouseDown(%d, %d)", x, y);
+ sendPointMessage(_childObject, 0x0001, mousePos);
+ }
+}
+
+void GameModule::handleMouseUp(int16 x, int16 y) {
+ if (_childObject) {
+ NPoint mousePos;
+ mousePos.x = x;
+ mousePos.y = y;
+ debug(2, "GameModule::handleMouseUp(%d, %d)", x, y);
+ sendPointMessage(_childObject, 0x0002, mousePos);
+ }
+}
+
+void GameModule::handleSpaceKey() {
+ if (_childObject) {
+ debug(2, "GameModule::handleSpaceKey()");
+ sendMessage(_childObject, 0x0009, 0);
+ }
+}
+
+void GameModule::handleAsciiKey(char key) {
+ if (_childObject) {
+ debug(2, "GameModule::handleAsciiKey()");
+ sendMessage(_childObject, 0x000A, (uint32)key);
+ }
+}
+
+void GameModule::handleKeyDown(Common::KeyCode keyCode) {
+ if (_childObject) {
+ if (keyCode == Common::KEYCODE_ESCAPE)
+ handleEscapeKey();
+ else if (keyCode == Common::KEYCODE_SPACE)
+ handleSpaceKey();
+ debug(2, "GameModule::handleKeyDown()");
+ sendMessage(_childObject, 0x000B, keyCode);
+ }
+}
+
+void GameModule::handleEscapeKey() {
+ if (_vm->isDemo())
+ _vm->quitGame();
+ else if (!_prevChildObject && _canRequestMainMenu)
+ _mainMenuRequested = true;
+ else if (_childObject)
+ sendMessage(_childObject, 0x000C, 0);
+}
+
+void GameModule::initKeySlotsPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x25400B10)) {
+ NonRepeatingRandomNumbers keySlots(_vm->_rnd, 16);
+ for (uint i = 0; i < 3; i++) {
+ setSubVar(VA_GOOD_KEY_SLOT_NUMBERS, i, keySlots.getNumber());
+ setSubVar(VA_CURR_KEY_SLOT_NUMBERS, i, keySlots.getNumber());
+ }
+ setSubVar(VA_IS_PUZZLE_INIT, 0x25400B10, 1);
+ }
+}
+
+void GameModule::initMemoryPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0xC8606803)) {
+ NonRepeatingRandomNumbers diceIndices(_vm->_rnd, 3);
+ NonRepeatingRandomNumbers availableTiles(_vm->_rnd, 48);
+ NonRepeatingRandomNumbers tileSymbols(_vm->_rnd, 10);
+ for (uint32 i = 0; i < 3; i++)
+ setSubVar(VA_CURR_DICE_NUMBERS, i, 1);
+ // Set special symbols
+ // Symbol 5 is always one of the three special symbols
+ setSubVar(VA_DICE_MEMORY_SYMBOLS, diceIndices.getNumber(), 5);
+ tileSymbols.removeNumber(5);
+ for (int i = 0; i < 2; i++)
+ setSubVar(VA_DICE_MEMORY_SYMBOLS, diceIndices.getNumber(), tileSymbols.getNumber());
+ // Insert special symbols tiles
+ for (uint32 i = 0; i < 3; ++i) {
+ int tileSymbolOccurence = _vm->_rnd->getRandomNumber(4 - 1) * 2 + 2;
+ setSubVar(VA_GOOD_DICE_NUMBERS, i, tileSymbolOccurence);
+ while (tileSymbolOccurence--)
+ setSubVar(VA_TILE_SYMBOLS, availableTiles.getNumber(), getSubVar(VA_DICE_MEMORY_SYMBOLS, i));
+ }
+ // Fill the remaining tiles
+ uint32 tileSymbolIndex = 0;
+ while (!availableTiles.empty()) {
+ setSubVar(VA_TILE_SYMBOLS, availableTiles.getNumber(), tileSymbols[tileSymbolIndex]);
+ setSubVar(VA_TILE_SYMBOLS, availableTiles.getNumber(), tileSymbols[tileSymbolIndex]);
+ tileSymbolIndex++;
+ if (tileSymbolIndex >= tileSymbols.size())
+ tileSymbolIndex = 0;
+ }
+ setSubVar(VA_IS_PUZZLE_INIT, 0xC8606803, 1);
+ }
+}
+
+void GameModule::initWaterPipesPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x40520234)) {
+ setSubVar(VA_GOOD_WATER_PIPES_LEVEL, 0, 3);
+ setSubVar(VA_GOOD_WATER_PIPES_LEVEL, 1, 1);
+ setSubVar(VA_GOOD_WATER_PIPES_LEVEL, 2, 2);
+ setSubVar(VA_GOOD_WATER_PIPES_LEVEL, 3, 0);
+ setSubVar(VA_GOOD_WATER_PIPES_LEVEL, 4, 4);
+ setSubVar(VA_IS_PUZZLE_INIT, 0x40520234, 1);
+ }
+}
+
+void GameModule::initRadioPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x08C80800)) {
+ int currMusicIndex = _vm->_rnd->getRandomNumber(5 - 1) + 3;
+ setGlobalVar(V_GOOD_RADIO_MUSIC_INDEX, 5 * currMusicIndex);
+ setGlobalVar(V_GOOD_RADIO_MUSIC_NAME, kRadioMusicFileHashes[currMusicIndex]);
+ setGlobalVar(V_RADIO_ROOM_LEFT_DOOR, 1);
+ setGlobalVar(V_RADIO_ROOM_RIGHT_DOOR, 0);
+ setSubVar(VA_IS_PUZZLE_INIT, 0x08C80800, 1);
+ }
+}
+
+void GameModule::initTestTubes1Puzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x20479010)) {
+ for (uint i = 0; i < 3; i++)
+ setSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, i, _vm->_rnd->getRandomNumber(3 - 1) + 1);
+ setSubVar(VA_IS_PUZZLE_INIT, 0x20479010, 1);
+ }
+}
+
+void GameModule::initTestTubes2Puzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x66059818)) {
+ for (uint i = 0; i < 3; i++)
+ setSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, i, _vm->_rnd->getRandomNumber(6 - 1) + 1);
+ setSubVar(VA_IS_PUZZLE_INIT, 0x66059818, 1);
+ }
+}
+
+void GameModule::initCannonSymbolsPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x8C9819C2)) {
+ for (int i = 0; i < 3; i++) {
+ setSubVar(VA_GOOD_CANNON_SYMBOLS_1, i, _vm->_rnd->getRandomNumber(12 - 1));
+ setSubVar(VA_GOOD_CANNON_SYMBOLS_2, i, _vm->_rnd->getRandomNumber(12 - 1));
+ }
+ setSubVar(VA_IS_PUZZLE_INIT, 0x8C9819C2, 1);
+ }
+}
+
+void GameModule::initCodeSymbolsPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x0CD09B50)) {
+ for (int i = 0; i < 12; ++i)
+ setSubVar(VA_CODE_SYMBOLS, i, i);
+ for (int i = 0; i < 12; ++i) {
+ uint32 index1 = _vm->_rnd->getRandomNumber(12 - 1);
+ uint32 index2 = _vm->_rnd->getRandomNumber(12 - 1);
+ uint32 temp = getSubVar(VA_CODE_SYMBOLS, index1);
+ setSubVar(VA_CODE_SYMBOLS, index1, getSubVar(VA_CODE_SYMBOLS, index2));
+ setSubVar(VA_CODE_SYMBOLS, index2, temp);
+ }
+ setGlobalVar(V_NOISY_SYMBOL_INDEX, _vm->_rnd->getRandomNumber(11 - 1) + 1);
+ setSubVar(VA_IS_PUZZLE_INIT, 0x0CD09B50, 1);
+ }
+}
+
+void GameModule::initCubeSymbolsPuzzle() {
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x60400854)) {
+ NonRepeatingRandomNumbers cubeSymbols(_vm->_rnd, 9);
+ for (uint32 cubePosition = 0; cubePosition < 9; ++cubePosition)
+ setSubVar(VA_CUBE_POSITIONS, cubePosition, (uint32)(cubeSymbols.getNumber() - 1));
+ setSubVar(VA_IS_PUZZLE_INIT, 0x60400854, 1);
+ }
+}
+
+void GameModule::initCrystalColorsPuzzle() {
+ if (!getGlobalVar(V_CRYSTAL_COLORS_INIT)) {
+ TextResource textResource(_vm);
+ const char *textStart, *textEnd;
+ textResource.load(0x46691611);
+ textStart = textResource.getString(0, textEnd);
+ for (uint index = 0; index < 5; index++) {
+ char colorLetter = (byte)textStart[index];
+ byte correctColorNum = 0, misalignedColorNum;
+ switch (colorLetter) {
+ case 'B':
+ correctColorNum = 4;
+ break;
+ case 'G':
+ correctColorNum = 3;
+ break;
+ case 'O':
+ correctColorNum = 1;
+ break;
+ case 'R':
+ correctColorNum = 0;
+ break;
+ case 'V':
+ correctColorNum = 5;
+ break;
+ case 'Y':
+ correctColorNum = 2;
+ break;
+ }
+ do {
+ misalignedColorNum = _vm->_rnd->getRandomNumber(6 - 1);
+ } while (misalignedColorNum == correctColorNum);
+ setSubVar(VA_GOOD_CRYSTAL_COLORS, index, correctColorNum);
+ setSubVar(VA_CURR_CRYSTAL_COLORS, index, misalignedColorNum);
+ }
+ setGlobalVar(V_CRYSTAL_COLORS_INIT, 1);
+ }
+}
+
+uint32 GameModule::getCurrRadioMusicFileHash() {
+ uint musicIndex = getGlobalVar(V_CURR_RADIO_MUSIC_INDEX);
+ return (musicIndex % 5 != 0) ? 0 : kRadioMusicFileHashes[CLIP<uint>(musicIndex / 5, 0, 17)];
+}
+
+
+uint32 GameModule::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Module::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0800:
+ _canRequestMainMenu = true;
+ break;
+ case 0x1009:
+ _moduleResult = param.asInteger();
+ _done = true;
+ break;
+ }
+ return messageResult;
+}
+
+void GameModule::startup() {
+#if 1
+ // Logos and intro video // Real game start
+ createModule(1500, 0);
+#else
+ // DEBUG>>>
+ /*
+ setGlobalVar(V_SEEN_MUSIC_BOX, 1);
+ setGlobalVar(V_CREATURE_EXPLODED, 0);
+ setGlobalVar(V_MATCH_STATUS, 0);
+ setGlobalVar(V_PROJECTOR_LOCATION, 2);
+ */
+ //setGlobalVar(V_ENTRANCE_OPEN, 0);
+ //setGlobalVar(V_DOOR_SPIKES_OPEN, 1);
+ //setGlobalVar(V_CREATURE_ANGRY, 1);
+ setGlobalVar(V_RADIO_ENABLED, 1);
+ //setGlobalVar(V_TNT_DUMMY_BUILT, 1);
+ setGlobalVar(V_FLYTRAP_RING_DOOR, 1);
+ setGlobalVar(V_TV_JOKE_TOLD, 1);
+ /*
+ // Give all disks
+ for (int i = 0; i < 20; i++)
+ setSubVar(VA_IS_TAPE_INSERTED, i, 1);
+ */
+ setSubVar(VA_IS_KEY_INSERTED, 0, 1);
+ setSubVar(VA_IS_KEY_INSERTED, 1, 1);
+ setSubVar(VA_IS_KEY_INSERTED, 2, 1);
+ for (uint32 index = 0; index < 9; index++)
+ setSubVar(VA_CUBE_POSITIONS, index, 7 - index);
+ setGlobalVar(V_WALL_BROKEN, 0);
+ setGlobalVar(V_WORLDS_JOINED, 1);
+ setGlobalVar(V_RADIO_MOVE_DISH_VIDEO, 0);
+ // Enable all locations
+ for (int i = 0; i < 6; i++)
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, i, 1);
+ //setGlobalVar(V_PROJECTOR_LOCATION, 4);
+ setGlobalVar(V_KEYDOOR_UNLOCKED, 1);
+ setGlobalVar(V_LIGHTS_ON, 1);
+ setGlobalVar(V_WATER_RUNNING, 1);
+ setGlobalVar(V_HAS_TEST_TUBE, 1);
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, 0, 3);
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, 1, 1);
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, 2, 2);
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, 3, 0);
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, 4, 4);
+ setGlobalVar(V_KLAYMEN_SMALL, 1);
+ setGlobalVar(V_SHRINK_LIGHTS_ON, 0);
+ // <<<DEBUG
+
+#if 1
+ _vm->gameState().which = 0;
+ _vm->gameState().sceneNum = 0;
+ createModule(2400, 0);
+#endif
+
+#endif
+}
+
+void GameModule::requestRestoreGame() {
+ _restoreGameRequested = true;
+}
+
+void GameModule::requestRestartGame(bool requestMainMenu) {
+ _restartGameRequested = true;
+ _mainMenuRequested = requestMainMenu;
+}
+
+void GameModule::redrawPrevChildObject() {
+ if (_prevChildObject) {
+ _prevChildObject->draw();
+ _vm->_screen->update();
+ }
+}
+
+void GameModule::checkRequests() {
+ if (_restartGameRequested) {
+ _restartGameRequested = false;
+ _vm->_gameVars->clear();
+ requestRestoreGame();
+ }
+ if (_restoreGameRequested) {
+ _restoreGameRequested = false;
+ _vm->_audioResourceMan->stopAllSounds();
+ _vm->_soundMan->stopAllSounds();
+ delete _childObject;
+ delete _prevChildObject;
+ _childObject = NULL;
+ _prevChildObject = NULL;
+ _prevModuleNum = 0;
+ createModuleByHash(getGlobalVar(V_MODULE_NAME));
+ }
+ if (_mainMenuRequested)
+ openMainMenu();
+}
+
+void GameModule::createModule(int moduleNum, int which) {
+ debug(1, "GameModule::createModule(%d, %d)", moduleNum, which);
+ _moduleNum = moduleNum;
+
+ delete _childObject;
+
+ switch (_moduleNum) {
+ case 1000:
+ setGlobalVar(V_MODULE_NAME, 0x03294419);
+ _childObject = new Module1000(_vm, this, which);
+ break;
+ case 1100:
+ setGlobalVar(V_MODULE_NAME, 0x0002C818);
+ _childObject = new Module1100(_vm, this, which);
+ break;
+ case 1200:
+ setGlobalVar(V_MODULE_NAME, 0x00478311);
+ _childObject = new Module1200(_vm, this, which);
+ break;
+ case 1300:
+ setGlobalVar(V_MODULE_NAME, 0x0061C090);
+ _childObject = new Module1300(_vm, this, which);
+ break;
+ case 1400:
+ setGlobalVar(V_MODULE_NAME, 0x00AD0012);
+ _childObject = new Module1400(_vm, this, which);
+ break;
+ case 1500:
+ _canRequestMainMenu = false;
+ setGlobalVar(V_MODULE_NAME, 0x00F10114);
+ _childObject = new Module1500(_vm, this, which);
+ break;
+ case 1600:
+ setGlobalVar(V_MODULE_NAME, 0x01A008D8);
+ _childObject = new Module1600(_vm, this, which);
+ break;
+ case 1700:
+ setGlobalVar(V_MODULE_NAME, 0x04212331);
+ _childObject = new Module1700(_vm, this, which);
+ break;
+ case 1800:
+ setGlobalVar(V_MODULE_NAME, 0x04A14718);
+ _childObject = new Module1800(_vm, this, which);
+ break;
+ case 1900:
+ setGlobalVar(V_MODULE_NAME, 0x04E1C09C);
+ _childObject = new Module1900(_vm, this, which);
+ break;
+ case 2000:
+ setGlobalVar(V_MODULE_NAME, 0x08250000);
+ _childObject = new Module2000(_vm, this, which);
+ break;
+ case 2100:
+ setGlobalVar(V_MODULE_NAME, 0x10A10C14);
+ _childObject = new Module2100(_vm, this, which);
+ break;
+ case 2200:
+ setGlobalVar(V_MODULE_NAME, 0x11391412);
+ _childObject = new Module2200(_vm, this, which);
+ break;
+ case 2300:
+ setGlobalVar(V_MODULE_NAME, 0x1A214010);
+ _childObject = new Module2300(_vm, this, which);
+ break;
+ case 2400:
+ setGlobalVar(V_MODULE_NAME, 0x202D1010);
+ _childObject = new Module2400(_vm, this, which);
+ break;
+ case 2500:
+ setGlobalVar(V_MODULE_NAME, 0x29220120);
+ _childObject = new Module2500(_vm, this, which);
+ break;
+ case 2600:
+ setGlobalVar(V_MODULE_NAME, 0x40271018);
+ _childObject = new Module2600(_vm, this, which);
+ break;
+ case 2700:
+ setGlobalVar(V_MODULE_NAME, 0x42212411);
+ _childObject = new Module2700(_vm, this, which);
+ break;
+ case 2800:
+ setGlobalVar(V_MODULE_NAME, 0x64210814);
+ _childObject = new Module2800(_vm, this, which);
+ break;
+ case 2900:
+ setGlobalVar(V_MODULE_NAME, 0x81100020);
+ if (which >= 0)
+ setGlobalVar(V_TELEPORTER_CURR_LOCATION, which);
+ _childObject = new Module2900(_vm, this, which);
+ break;
+ case 3000:
+ setGlobalVar(V_MODULE_NAME, 0x81293110);
+ _childObject = new Module3000(_vm, this, which);
+ break;
+ case 9999:
+ createDemoScene();
+ break;
+ default:
+ error("GameModule::createModule() Could not create module %d", moduleNum);
+ }
+ SetUpdateHandler(&GameModule::updateModule);
+ _childObject->handleUpdate();
+}
+
+void GameModule::createModuleByHash(uint32 nameHash) {
+ debug(1, "GameModule::createModuleByHash(%08X)", nameHash);
+ switch (nameHash) {
+ case 0x03294419:
+ createModule(1000, -1);
+ break;
+ case 0x0002C818:
+ createModule(1100, -1);
+ break;
+ case 0x00478311:
+ createModule(1200, -1);
+ break;
+ case 0x0061C090:
+ createModule(1300, -1);
+ break;
+ case 0x00AD0012:
+ createModule(1400, -1);
+ break;
+ case 0x00F10114:
+ createModule(1500, -1);
+ break;
+ case 0x01A008D8:
+ createModule(1600, -1);
+ break;
+ case 0x04212331:
+ createModule(1700, -1);
+ break;
+ case 0x04A14718:
+ createModule(1800, -1);
+ break;
+ case 0x04E1C09C:
+ createModule(1900, -1);
+ break;
+ case 0x08250000:
+ createModule(2000, -1);
+ break;
+ case 0x10A10C14:
+ createModule(2100, -1);
+ break;
+ case 0x11391412:
+ createModule(2200, -1);
+ break;
+ case 0x1A214010:
+ createModule(2300, -1);
+ break;
+ case 0x202D1010:
+ createModule(2400, -1);
+ break;
+ case 0x29220120:
+ createModule(2500, -1);
+ break;
+ case 0x40271018:
+ createModule(2600, -1);
+ break;
+ case 0x42212411:
+ createModule(2700, -1);
+ break;
+ case 0x64210814:
+ createModule(2800, -1);
+ break;
+ case 0x81100020:
+ createModule(2900, -1);
+ break;
+ case 0x81293110:
+ createModule(3000, -1);
+ break;
+ default:
+ createModule(1000, 0);
+ break;
+ }
+}
+
+void GameModule::updateModule() {
+ if (!updateChild()) {
+ switch (_moduleNum) {
+ case 1000:
+ createModule(2300, 0);
+ break;
+ case 1200:
+ if (_moduleResult == 1)
+ createModule(2600, 0);
+ else
+ createModule(2300, 2);
+ break;
+ case 1100:
+ if (_moduleResult == 0)
+ createModule(2900, 2);
+ else {
+ setGlobalVar(V_ENTRANCE_OPEN, 1);
+ createModule(1300, 0);
+ }
+ break;
+ case 1300:
+ if (_moduleResult == 1) {
+ // The game was successfully finished
+ requestRestartGame(true);
+ } else
+ createModule(2900, 0);
+ break;
+ case 1400:
+ createModule(1600, 1);
+ break;
+ case 1500:
+ createModule(1000, 0);
+ break;
+ case 1600:
+ if (_moduleResult == 1)
+ createModule(1400, 0);
+ else if (_moduleResult == 2)
+ createModule(1700, 0);
+ else
+ createModule(2100, 0);
+ break;
+ case 1700:
+ if (_moduleResult == 1)
+ createModule(2900, 3);
+ else
+ createModule(1600, 2);
+ break;
+ case 1800:
+ if (_moduleResult == 1) {
+ // Game over, Klaymen jumped into the hole
+ requestRestartGame(true);
+ } else if (_moduleResult == 2)
+ createModule(2700, 0);
+ else if (_moduleResult == 3)
+ createModule(3000, 3);
+ else
+ createModule(2800, 0);
+ break;
+ case 1900:
+ createModule(3000, 1);
+ break;
+ case 2000:
+ createModule(2900, 4);
+ break;
+ case 2100:
+ if (_moduleResult == 1)
+ createModule(2900, 1);
+ else
+ createModule(1600, 0);
+ break;
+ case 2200:
+ createModule(2300, 1);
+ break;
+ case 2300:
+ debug(1, "module 23000 _moduleResult : %d", _moduleResult);
+ if (_moduleResult == 2)
+ createModule(1200, 0);
+ else if (_moduleResult == 0)
+ createModule(1000, 1);
+ else if (_vm->isDemo())
+ createModule(9999, -1);
+ else if (_moduleResult == 1)
+ createModule(2200, 0);
+ else if (_moduleResult == 3)
+ createModule(2400, 0);
+ else if (_moduleResult == 4)
+ createModule(3000, 0);
+ break;
+ case 2400:
+ createModule(2300, 3);
+ break;
+ case 2500:
+ createModule(2600, 1);
+ break;
+ case 2600:
+ if (_moduleResult == 1)
+ createModule(2500, 0);
+ else
+ createModule(1200, 1);
+ break;
+ case 2700:
+ createModule(1800, 2);
+ break;
+ case 2800:
+ if (_moduleResult == 1)
+ createModule(2900, 5);
+ else
+ createModule(1800, 0);
+ break;
+ case 2900:
+ if (_moduleResult != (uint32)-1) {
+ switch (_moduleResult) {
+ case 0:
+ createModule(1300, 5);
+ break;
+ case 1:
+ createModule(2100, 1);
+ break;
+ case 2:
+ createModule(1100, 1);
+ break;
+ case 3:
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, 2, 1);
+ createModule(1700, 1);
+ break;
+ case 4:
+ createModule(2000, 0);
+ break;
+ case 5:
+ default:
+ createModule(2800, 1);
+ break;
+ }
+ } else {
+ switch (getGlobalVar(V_TELEPORTER_CURR_LOCATION)) {
+ case 0:
+ createModule(1300, 6);
+ break;
+ case 1:
+ createModule(2100, 2);
+ break;
+ case 2:
+ createModule(1100, 2);
+ break;
+ case 3:
+ createModule(1700, 2);
+ break;
+ case 4:
+ createModule(2000, 1);
+ break;
+ case 5:
+ default:
+ createModule(2800, 2);
+ break;
+ }
+ }
+ setGlobalVar(V_TELEPORTER_CURR_LOCATION, 0);
+ break;
+ case 3000:
+ // NOTE _moduleResult 2 never used
+ // NOTE Check if _moduleResult 4 is used
+ if (_moduleResult == 1)
+ createModule(1900, 0);
+ else if (_moduleResult == 3)
+ createModule(1800, 3);
+ else if (_moduleResult == 4)
+ createModule(3000, 0);
+ else
+ createModule(2300, 4);
+ break;
+ case 9999:
+ createModuleByHash(getGlobalVar(V_MODULE_NAME));
+ break;
+ }
+ }
+}
+
+void GameModule::openMainMenu() {
+ if (_childObject) {
+ sendMessage(_childObject, 0x101D, 0);
+ _childObject->draw();
+ } else {
+ // If there's no module, create one so there's something to return to
+ createModule(1000, 0);
+ }
+ _vm->_screen->saveParams();
+ _mainMenuRequested = false;
+ createMenuModule();
+}
+
+void GameModule::createMenuModule() {
+ if (!_prevChildObject) {
+ _prevChildObject = _childObject;
+ _prevModuleNum = _moduleNum;
+ _childObject = new MenuModule(_vm, this, 0);
+ _childObject->handleUpdate();
+ SetUpdateHandler(&GameModule::updateMenuModule);
+ }
+}
+
+void GameModule::updateMenuModule() {
+ if (!updateChild()) {
+ _vm->_screen->restoreParams();
+ _childObject = _prevChildObject;
+ sendMessage(_childObject, 0x101E, 0);
+ _prevChildObject = NULL;
+ _moduleNum = _prevModuleNum;
+ SetUpdateHandler(&GameModule::updateModule);
+ }
+}
+
+NonRepeatingRandomNumbers::NonRepeatingRandomNumbers(Common::RandomSource *rnd, int count)
+ : _rnd(rnd) {
+ for (int i = 0; i < count; i++)
+ push_back(i);
+}
+
+int NonRepeatingRandomNumbers::getNumber() {
+ int number;
+ if (!empty()) {
+ uint index = _rnd->getRandomNumber(size() - 1);
+ number = (*this)[index];
+ remove_at(index);
+ } else
+ number = 0;
+ return number;
+}
+
+void NonRepeatingRandomNumbers::removeNumber(int number) {
+ for (uint i = 0; i < size(); ++i)
+ if ((*this)[i] == number) {
+ remove_at(i);
+ break;
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/gamemodule.h b/engines/neverhood/gamemodule.h
new file mode 100644
index 0000000000..1fb3557b81
--- /dev/null
+++ b/engines/neverhood/gamemodule.h
@@ -0,0 +1,89 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_GAMEMODULE_H
+#define NEVERHOOD_GAMEMODULE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+
+namespace Neverhood {
+
+class GameModule : public Module {
+public:
+ GameModule(NeverhoodEngine *vm);
+ virtual ~GameModule();
+ void startup();
+ void requestRestoreGame();
+ void requestRestartGame(bool requestMainMenu);
+ void redrawPrevChildObject();
+ void checkRequests();
+ void handleMouseMove(int16 x, int16 y);
+ void handleMouseDown(int16 x, int16 y);
+ void handleMouseUp(int16 x, int16 y);
+ void handleSpaceKey();
+ void handleAsciiKey(char key);
+ void handleKeyDown(Common::KeyCode keyCode);
+ void handleEscapeKey();
+ void initKeySlotsPuzzle();
+ void initMemoryPuzzle();
+ void initWaterPipesPuzzle();
+ void initRadioPuzzle();
+ void initTestTubes1Puzzle();
+ void initTestTubes2Puzzle();
+ void initCannonSymbolsPuzzle();
+ void initCodeSymbolsPuzzle();
+ void initCubeSymbolsPuzzle();
+ void initCrystalColorsPuzzle();
+ uint32 getCurrRadioMusicFileHash();
+ int getCurrentModuleNum() { return _moduleNum; }
+ int getPreviousModuleNum() { return _moduleNum; }
+
+ void createModule(int moduleNum, int which);
+protected:
+ int _moduleNum;
+ Entity *_prevChildObject;
+ int _prevModuleNum;
+ bool _restoreGameRequested;
+ bool _restartGameRequested;
+ bool _canRequestMainMenu;
+ bool _mainMenuRequested;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createModuleByHash(uint32 nameHash);
+ void updateModule();
+ void openMainMenu();
+ void createMenuModule();
+ void updateMenuModule();
+};
+
+class NonRepeatingRandomNumbers : public Common::Array<int> {
+public:
+ NonRepeatingRandomNumbers(Common::RandomSource *rnd, int count);
+ int getNumber();
+ void removeNumber(int number);
+protected:
+ Common::RandomSource *_rnd;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULE_H */
diff --git a/engines/neverhood/gamevars.cpp b/engines/neverhood/gamevars.cpp
new file mode 100644
index 0000000000..dc25f74e56
--- /dev/null
+++ b/engines/neverhood/gamevars.cpp
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/console.h"
+#include "neverhood/gamevars.h"
+
+namespace Neverhood {
+
+GameVars::GameVars() {
+ addVar(0, 0);
+}
+
+void GameVars::clear() {
+ _vars.clear();
+ addVar(0, 0);
+}
+
+void GameVars::loadState(Common::InSaveFile *in) {
+ uint varCount;
+ _vars.clear();
+ varCount = in->readUint32LE();
+ for (uint i = 0; i < varCount; ++i) {
+ GameVar var;
+ var.nameHash = in->readUint32LE();
+ var.value = in->readUint32LE();
+ var.firstIndex = in->readUint16LE();
+ var.nextIndex = in->readUint16LE();
+ _vars.push_back(var);
+ }
+}
+
+void GameVars::saveState(Common::OutSaveFile *out) {
+ out->writeUint32LE(_vars.size());
+ for (uint i = 0; i < _vars.size(); ++i) {
+ GameVar &var = _vars[i];
+ out->writeUint32LE(var.nameHash);
+ out->writeUint32LE(var.value);
+ out->writeUint16LE(var.firstIndex);
+ out->writeUint16LE(var.nextIndex);
+ }
+}
+
+uint32 GameVars::getGlobalVar(uint32 nameHash) {
+ int16 varIndex = findSubVarIndex(0, nameHash);
+ return varIndex != -1 ? _vars[varIndex].value : 0;
+}
+
+void GameVars::setGlobalVar(uint32 nameHash, uint32 value) {
+ _vars[getSubVarIndex(0, nameHash)].value = value;
+}
+
+uint32 GameVars::getSubVar(uint32 nameHash, uint32 subNameHash) {
+ uint32 value = 0;
+ int16 varIndex = findSubVarIndex(0, nameHash);
+ if (varIndex != -1) {
+ int16 subVarIndex = findSubVarIndex(varIndex, subNameHash);
+ if (subVarIndex != -1)
+ value = _vars[subVarIndex].value;
+ }
+ return value;
+}
+
+void GameVars::setSubVar(uint32 nameHash, uint32 subNameHash, uint32 value) {
+ int16 varIndex = getSubVarIndex(0, nameHash);
+ int16 subVarIndex = getSubVarIndex(varIndex, subNameHash);
+ _vars[subVarIndex].value = value;
+}
+
+int16 GameVars::addVar(uint32 nameHash, uint32 value) {
+ GameVar gameVar;
+ gameVar.nameHash = nameHash;
+ gameVar.value = value;
+ gameVar.firstIndex = -1;
+ gameVar.nextIndex = -1;
+ _vars.push_back(gameVar);
+ return _vars.size() - 1;
+}
+
+int16 GameVars::findSubVarIndex(int16 varIndex, uint32 subNameHash) {
+ for (int16 nextIndex = _vars[varIndex].firstIndex; nextIndex != -1; nextIndex = _vars[nextIndex].nextIndex)
+ if (_vars[nextIndex].nameHash == subNameHash)
+ return nextIndex;
+ return -1;
+}
+
+int16 GameVars::addSubVar(int16 varIndex, uint32 subNameHash, uint32 value) {
+ int16 nextIndex = _vars[varIndex].firstIndex;
+ int16 subVarIndex;
+ if (nextIndex == -1) {
+ subVarIndex = addVar(subNameHash, value);
+ _vars[varIndex].firstIndex = subVarIndex;
+ } else {
+ while (_vars[nextIndex].nextIndex != -1)
+ nextIndex = _vars[nextIndex].nextIndex;
+ subVarIndex = addVar(subNameHash, value);
+ _vars[nextIndex].nextIndex = subVarIndex;
+ }
+ return subVarIndex;
+}
+
+int16 GameVars::getSubVarIndex(int16 varIndex, uint32 subNameHash) {
+ int16 subVarIndex = findSubVarIndex(varIndex, subNameHash);
+ if (subVarIndex == -1)
+ subVarIndex = addSubVar(varIndex, subNameHash, 0);
+ return subVarIndex;
+}
+
+void GameVars::dumpVars(Console *con) {
+ for (Common::Array<GameVar>::iterator it = _vars.begin(); it != _vars.end(); ++it) {
+ GameVar gameVar = *it;
+ con->DebugPrintf("hash: %08X, var: %08X, first index: %3d, next index: %3d\n", gameVar.nameHash, gameVar.value, gameVar.firstIndex, gameVar.nextIndex);
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/gamevars.h b/engines/neverhood/gamevars.h
new file mode 100644
index 0000000000..de9ffb8ec5
--- /dev/null
+++ b/engines/neverhood/gamevars.h
@@ -0,0 +1,195 @@
+/* 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 NEVERHOOD_GAMEVARS_H
+#define NEVERHOOD_GAMEVARS_H
+
+#include "common/array.h"
+#include "common/savefile.h"
+#include "neverhood/neverhood.h"
+
+namespace Neverhood {
+
+enum {
+ // Misc
+ V_MODULE_NAME = 0x91080831, // Currently active module name hash
+ V_CURRENT_SCENE = 0x108A4870, // Current scene in the current module
+ V_CURRENT_SCENE_WHICH = 0x82C80875,
+ V_DEBUG = 0xA4014072, // Original debug-flag, can probably be removed
+ V_SMACKER_CAN_ABORT = 0x06C02850, // Not set anywhere (yet), seems like a debug flag
+ V_KEY3_LOCATION = 0x13382860, // Location of the third key
+ V_TEXT_FLAG1 = 0x8440001F,
+ V_TEXT_INDEX = 0x01830201,
+ V_TEXT_COUNTING_INDEX1 = 0x29408F00,
+ V_TEXT_COUNTING_INDEX2 = 0x8A140C21,
+ V_TALK_COUNTING_INDEX = 0xA0808898,
+ V_FRUIT_COUNTING_INDEX = 0x40040831,
+ V_NOISY_SYMBOL_INDEX = 0x2414C2F2,
+ V_COLUMN_BACK_NAME = 0x4CE79018,
+ V_COLUMN_TEXT_NAME = 0xC8C28808,
+ V_CLICKED_COLUMN_INDEX = 0x48A68852,
+ V_CLICKED_COLUMN_ROW = 0x49C40058,
+ // Klaymen
+ V_KLAYMEN_SMALL = 0x1860C990, // Is Klaymen small?
+ V_KLAYMEN_FRAMEINDEX = 0x18288913,
+ V_KLAYMEN_IS_DELTA_X = 0xC0418A02,
+ V_KLAYMEN_SAVED_X = 0x00D30138,
+ V_CAR_DELTA_X = 0x21E60190,
+ // Flags
+ V_CRYSTAL_COLORS_INIT = 0xDE2EC914,
+ V_TV_JOKE_TOLD = 0x92603A79,
+ V_NOTES_DOOR_UNLOCKED = 0x0045D021,
+ V_WATER_RUNNING = 0x4E0BE910,
+ V_CREATURE_ANGRY = 0x0A310817, // After having played with the music box
+ V_BEEN_SHRINKING_ROOM = 0x1C1B8A9A,
+ V_BEEN_STATUE_ROOM = 0xCB45DE03,
+ V_MOUSE_PUZZLE_SOLVED = 0x70A1189C,
+ V_NOTES_PUZZLE_SOLVED = 0x86615030,
+ V_TILE_PUZZLE_SOLVED = 0x404290D5,
+ V_STAIRS_PUZZLE_SOLVED = 0xA9035F60,
+ V_CODE_SYMBOLS_SOLVED = 0x2C531AF8,
+ V_SPIKES_RETRACTED = 0x18890C91,
+ V_LARGE_DOOR_NUMBER = 0x9A500914, // Number of the currently "large" door
+ V_LIGHTS_ON = 0x4D080E54,
+ V_SHRINK_LIGHTS_ON = 0x190A1D18, // Lights on in the room with the shrinking device
+ V_STAIRS_DOWN_ONCE = 0x2050861A, // Stairs have been down once before
+ V_STAIRS_DOWN = 0x09221A62,
+ V_LADDER_DOWN = 0x0018CA22, // Is the ladder in the statue room down?
+ V_LADDER_DOWN_ACTION = 0x00188211,
+ V_WALL_BROKEN = 0x10938830,
+ V_BOLT_DOOR_OPEN = 0x01BA1A52,
+ V_BOLT_DOOR_UNLOCKED = 0x00040153,
+ V_SEEN_SYMBOLS_NO_LIGHT = 0x81890D14,
+ V_FELL_DOWN_HOLE = 0xE7498218,
+ V_DOOR_PASSED = 0x2090590C, // Auto-closing door was passed
+ V_ENTRANCE_OPEN = 0xD0A14D10, // Is the entrance to Module1300 open (after the robot got his teddy)
+ V_WINDOW_OPEN = 0x03C698DA,
+ V_DOOR_STATUS = 0x52371C95,
+ V_DOOR_BUSTED = 0xD217189D,
+ V_WORLDS_JOINED = 0x98109F12, // Are the worlds joined?
+ V_KEYDOOR_UNLOCKED = 0x80455A41, // Is the keyboard-door unlocked?
+ V_MOUSE_SUCKED_IN = 0x01023818, // Are mouse/cheese in Scene1308?
+ V_BALLOON_POPPED = 0xAC00C0D0, // Has the balloon with the key been popped?
+ V_TNT_DUMMY_BUILT = 0x000CF819, // Are all TNT parts on the dummy?
+ V_TNT_DUMMY_FUSE_LIT = 0x20A0C516,
+ V_RADIO_ENABLED = 0x4DE80AC0,
+ V_SEEN_CREATURE_EXPLODE_VID = 0x2A02C07B,
+ V_CREATURE_EXPLODED = 0x0A18CA33,
+ V_UNUSED = 0x89C669AA, // Seems to be unused, confirmed by checking the exe for this constant value (still left in atm)
+ // Radio
+ V_RADIO_ROOM_LEFT_DOOR = 0x09880D40,
+ V_RADIO_ROOM_RIGHT_DOOR = 0x08180ABC,
+ V_CURR_RADIO_MUSIC_INDEX = 0x08CC0828,
+ V_GOOD_RADIO_MUSIC_INDEX = 0x88880915,
+ V_GOOD_RADIO_MUSIC_NAME = 0x89A82A15,
+ V_RADIO_MOVE_DISH_VIDEO = 0x28D8C940,
+ // Match
+ V_MATCH_STATUS = 0x0112090A,
+ // Venus fly trap
+ V_FLYTRAP_RING_EATEN = 0x2B514304,
+ V_FLYTRAP_RING_DOOR = 0x8306F218,
+ V_FLYTRAP_RING_FENCE = 0x80101B1E,
+ V_FLYTRAP_RING_BRIDGE = 0x13206309,
+ V_FLYTRAP_POSITION_1 = 0x1B144052,
+ V_FLYTRAP_POSITION_2 = 0x86341E88,
+ // Navigation
+ V_NAVIGATION_INDEX = 0x4200189E, // Navigation scene: Current navigation index
+ // Cannon
+ V_CANNON_RAISED = 0x000809C2, // Is the cannon raised?
+ V_CANNON_TURNED = 0x9040018A, // Is the cannon turned?
+ V_ROBOT_HIT = 0x0C0288F4, // Was the robot hit by the cannon?
+ V_ROBOT_TARGET = 0x610210B7, // Is the robot at the cannon target position? (teddy)
+ V_CANNON_SMACKER_NAME = 0xF0402B0A,
+ V_CANNON_TARGET_STATUS = 0x20580A86,
+ // Projector
+ V_PROJECTOR_SLOT = 0x04A10F33, // Projector x slot index
+ V_PROJECTOR_LOCATION = 0x04A105B3, // Projector scene location
+ V_PROJECTOR_ACTIVE = 0x12A10DB3, // Is the projecor projecting?
+ // Teleporter
+ V_TELEPORTER_CURR_LOCATION = 0x0152899A,
+ V_TELEPORTER_WHICH = 0x60826830,
+ V_TELEPORTER_DEST_AVAILABLE = 0x2C145A98,
+ // Inventory
+ V_HAS_NEEDLE = 0x31C63C51, // Has Klaymen the needle?
+ V_HAS_FINAL_KEY = 0xC0780812, // Has Klaymen the key from the diskplayer?
+ V_HAS_TEST_TUBE = 0x45080C38,
+ // Arrays
+ // NOTE "GOOD" means the solution, "CURR" is the current setup of the puzzle variables
+ VA_IS_PUZZLE_INIT = 0x40050052,
+ VA_SMACKER_PLAYED = 0x00800410,
+ VA_CURR_CRYSTAL_COLORS = 0xE11A1929,
+ VA_GOOD_CRYSTAL_COLORS = 0xD4B2089C,
+ VA_GOOD_TEST_TUBES_LEVEL_1 = 0x0C601058,
+ VA_GOOD_TEST_TUBES_LEVEL_2 = 0x40005834,
+ VA_CURR_CANNON_SYMBOLS = 0x00000914,
+ VA_GOOD_CANNON_SYMBOLS_1 = 0x00504B86,
+ VA_GOOD_CANNON_SYMBOLS_2 = 0x0A4C0A9A,
+ VA_CURR_WATER_PIPES_LEVEL = 0x0800547C,
+ VA_GOOD_WATER_PIPES_LEVEL = 0x90405038,
+ VA_CURR_DICE_NUMBERS = 0x61084036,
+ VA_GOOD_DICE_NUMBERS = 0x7500993A,
+ VA_CURR_KEY_SLOT_NUMBERS = 0xA010B810,
+ VA_GOOD_KEY_SLOT_NUMBERS = 0x0C10A000,
+ VA_CUBE_POSITIONS = 0x484498D0,
+ VA_CODE_SYMBOLS = 0x04909A50,
+ VA_TILE_SYMBOLS = 0x0C65F80B,
+ VA_IS_TILE_MATCH = 0xCCE0280F,
+ VA_TNT_POSITIONS = 0x10055D14,
+ VA_DICE_MEMORY_SYMBOLS = 0x13100631,
+ VA_HAS_TAPE = 0x02038314,
+ VA_IS_TAPE_INSERTED = 0x02720344,
+ VA_HAS_KEY = 0x0090EA95,
+ VA_IS_KEY_INSERTED = 0x08D0AB11,
+ VA_LOCKS_DISABLED = 0x14800353,
+ V_END_
+};
+
+struct GameVar {
+ uint32 nameHash;
+ uint32 value;
+ int16 firstIndex, nextIndex;
+};
+
+class Console;
+
+class GameVars {
+public:
+ GameVars();
+ void clear();
+ void loadState(Common::InSaveFile *in);
+ void saveState(Common::OutSaveFile *out);
+ uint32 getGlobalVar(uint32 nameHash);
+ void setGlobalVar(uint32 nameHash, uint32 value);
+ uint32 getSubVar(uint32 nameHash, uint32 subNameHash);
+ void setSubVar(uint32 nameHash, uint32 subNameHash, uint32 value);
+ void dumpVars(Console *con);
+protected:
+ Common::Array<GameVar> _vars;
+ int16 addVar(uint32 nameHash, uint32 value);
+ int16 findSubVarIndex(int16 varIndex, uint32 subNameHash);
+ int16 addSubVar(int16 varIndex, uint32 subNameHash, uint32 value);
+ int16 getSubVarIndex(int16 varIndex, uint32 subNameHash);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_GAMEVARS_H */
diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp
new file mode 100644
index 0000000000..66a7999e59
--- /dev/null
+++ b/engines/neverhood/graphics.cpp
@@ -0,0 +1,349 @@
+/* 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 "neverhood/graphics.h"
+#include "neverhood/resource.h"
+#include "neverhood/screen.h"
+
+namespace Neverhood {
+
+BaseSurface::BaseSurface(NeverhoodEngine *vm, int priority, int16 width, int16 height, Common::String name)
+ : _vm(vm), _priority(priority), _visible(true), _transparent(true),
+ _clipRects(NULL), _clipRectsCount(0), _version(0), _name(name) {
+
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = width;
+ _drawRect.height = height;
+ _sysRect.x = 0;
+ _sysRect.y = 0;
+ _sysRect.width = (width + 3) & 0xFFFC; // align by 4 bytes
+ _sysRect.height = height;
+ _clipRect.x1 = 0;
+ _clipRect.y1 = 0;
+ _clipRect.x2 = 640;
+ _clipRect.y2 = 480;
+ _surface = new Graphics::Surface();
+ _surface->create(_sysRect.width, _sysRect.height, Graphics::PixelFormat::createFormatCLUT8());
+}
+
+BaseSurface::~BaseSurface() {
+ delete _surface;
+}
+
+void BaseSurface::draw() {
+ if (_surface && _visible && _drawRect.width > 0 && _drawRect.height > 0) {
+ if (_clipRects && _clipRectsCount) {
+ _vm->_screen->drawSurfaceClipRects(_surface, _drawRect, _clipRects, _clipRectsCount, _transparent, _version);
+ } else if (_sysRect.x == 0 && _sysRect.y == 0) {
+ _vm->_screen->drawSurface2(_surface, _drawRect, _clipRect, _transparent, _version);
+ } else {
+ _vm->_screen->drawUnk(_surface, _drawRect, _sysRect, _clipRect, _transparent, _version);
+ }
+ }
+}
+
+void BaseSurface::clear() {
+ _surface->fillRect(Common::Rect(0, 0, _surface->w, _surface->h), 0);
+ ++_version;
+}
+
+void BaseSurface::drawSpriteResource(SpriteResource &spriteResource) {
+ if (spriteResource.getDimensions().width <= _drawRect.width &&
+ spriteResource.getDimensions().height <= _drawRect.height) {
+ clear();
+ spriteResource.draw(_surface, false, false);
+ ++_version;
+ }
+}
+
+void BaseSurface::drawSpriteResourceEx(SpriteResource &spriteResource, bool flipX, bool flipY, int16 width, int16 height) {
+ if (spriteResource.getDimensions().width <= _sysRect.width &&
+ spriteResource.getDimensions().height <= _sysRect.height) {
+ if (width > 0 && width <= _sysRect.width)
+ _drawRect.width = width;
+ if (height > 0 && height <= _sysRect.height)
+ _drawRect.height = height;
+ if (_surface) {
+ clear();
+ spriteResource.draw(_surface, flipX, flipY);
+ ++_version;
+ }
+ }
+}
+
+void BaseSurface::drawAnimResource(AnimResource &animResource, uint frameIndex, bool flipX, bool flipY, int16 width, int16 height) {
+ if (width > 0 && width <= _sysRect.width)
+ _drawRect.width = width;
+ if (height > 0 && height <= _sysRect.height)
+ _drawRect.height = height;
+ if (_surface) {
+ clear();
+ if (frameIndex < animResource.getFrameCount()) {
+ animResource.draw(frameIndex, _surface, flipX, flipY);
+ ++_version;
+ }
+ }
+}
+
+void BaseSurface::drawMouseCursorResource(MouseCursorResource &mouseCursorResource, int frameNum) {
+ if (frameNum < 3) {
+ mouseCursorResource.draw(frameNum, _surface);
+ ++_version;
+ }
+}
+
+void BaseSurface::copyFrom(Graphics::Surface *sourceSurface, int16 x, int16 y, NDrawRect &sourceRect) {
+ // Copy a rectangle from sourceSurface, no clipping is performed, 0 is the transparent color
+ byte *source = (byte*)sourceSurface->getBasePtr(sourceRect.x, sourceRect.y);
+ byte *dest = (byte*)_surface->getBasePtr(x, y);
+ int height = sourceRect.height;
+ while (height--) {
+ for (int xc = 0; xc < sourceRect.width; xc++)
+ if (source[xc] != 0)
+ dest[xc] = source[xc];
+ source += sourceSurface->pitch;
+ dest += _surface->pitch;
+ }
+ ++_version;
+}
+
+// ShadowSurface
+
+ShadowSurface::ShadowSurface(NeverhoodEngine *vm, int priority, int16 width, int16 height, BaseSurface *shadowSurface)
+ : BaseSurface(vm, priority, width, height, "shadow"), _shadowSurface(shadowSurface) {
+ // Empty
+}
+
+void ShadowSurface::draw() {
+ if (_surface && _visible && _drawRect.width > 0 && _drawRect.height > 0) {
+ _vm->_screen->drawSurface2(_surface, _drawRect, _clipRect, _transparent, _version, _shadowSurface->getSurface());
+ }
+}
+
+// FontSurface
+
+FontSurface::FontSurface(NeverhoodEngine *vm, NPointArray *tracking, uint charsPerRow, uint16 numRows, byte firstChar, uint16 charWidth, uint16 charHeight)
+ : BaseSurface(vm, 0, charWidth * charsPerRow, charHeight * numRows, "font"), _charsPerRow(charsPerRow), _numRows(numRows),
+ _firstChar(firstChar), _charWidth(charWidth), _charHeight(charHeight), _tracking(NULL) {
+
+ _tracking = new NPointArray();
+ *_tracking = *tracking;
+
+}
+
+FontSurface::FontSurface(NeverhoodEngine *vm, uint32 fileHash, uint charsPerRow, uint16 numRows, byte firstChar, uint16 charWidth, uint16 charHeight)
+ : BaseSurface(vm, 0, charWidth * charsPerRow, charHeight * numRows, "font"), _charsPerRow(charsPerRow), _numRows(numRows),
+ _firstChar(firstChar), _charWidth(charWidth), _charHeight(charHeight), _tracking(NULL) {
+
+ SpriteResource fontSpriteResource(_vm);
+ fontSpriteResource.load(fileHash, true);
+ drawSpriteResourceEx(fontSpriteResource, false, false, 0, 0);
+}
+
+FontSurface::~FontSurface() {
+ delete _tracking;
+}
+
+void FontSurface::drawChar(BaseSurface *destSurface, int16 x, int16 y, byte chr) {
+ NDrawRect sourceRect;
+ chr -= _firstChar;
+ sourceRect.x = (chr % _charsPerRow) * _charWidth;
+ sourceRect.y = (chr / _charsPerRow) * _charHeight;
+ sourceRect.width = _charWidth;
+ sourceRect.height = _charHeight;
+ destSurface->copyFrom(_surface, x, y, sourceRect);
+}
+
+void FontSurface::drawString(BaseSurface *destSurface, int16 x, int16 y, const byte *string, int stringLen) {
+
+ if (stringLen < 0)
+ stringLen = strlen((const char*)string);
+
+ for (; stringLen > 0; --stringLen, ++string) {
+ drawChar(destSurface, x, y, *string);
+ x += _tracking ? (*_tracking)[*string - _firstChar].x : _charWidth;
+ }
+
+}
+
+int16 FontSurface::getStringWidth(const byte *string, int stringLen) {
+ return string ? stringLen * _charWidth : 0;
+}
+
+FontSurface *FontSurface::createFontSurface(NeverhoodEngine *vm, uint32 fileHash) {
+ FontSurface *fontSurface;
+ DataResource fontData(vm);
+ SpriteResource fontSprite(vm);
+ fontData.load(calcHash("asRecFont"));
+ uint16 numRows = fontData.getPoint(calcHash("meNumRows")).x;
+ uint16 firstChar = fontData.getPoint(calcHash("meFirstChar")).x;
+ uint16 charWidth = fontData.getPoint(calcHash("meCharWidth")).x;
+ uint16 charHeight = fontData.getPoint(calcHash("meCharHeight")).x;
+ NPointArray *tracking = fontData.getPointArray(calcHash("meTracking"));
+ fontSprite.load(fileHash, true);
+ fontSurface = new FontSurface(vm, tracking, 16, numRows, firstChar, charWidth, charHeight);
+ fontSurface->drawSpriteResourceEx(fontSprite, false, false, 0, 0);
+ return fontSurface;
+}
+
+// Misc
+
+enum BitmapFlags {
+ BF_RLE = 1,
+ BF_HAS_DIMENSIONS = 2,
+ BF_HAS_POSITION = 4,
+ BF_HAS_PALETTE = 8,
+ BF_HAS_IMAGE = 16
+};
+
+void parseBitmapResource(const byte *sprite, bool *rle, NDimensions *dimensions, NPoint *position, const byte **palette, const byte **pixels) {
+
+ uint16 flags;
+
+ flags = READ_LE_UINT16(sprite);
+ sprite += 2;
+
+ if (rle)
+ *rle = flags & BF_RLE;
+
+ if (flags & BF_HAS_DIMENSIONS) {
+ if (dimensions) {
+ dimensions->width = READ_LE_UINT16(sprite);
+ dimensions->height = READ_LE_UINT16(sprite + 2);
+ }
+ sprite += 4;
+ } else if (dimensions) {
+ dimensions->width = 1;
+ dimensions->height = 1;
+ }
+
+ if (flags & BF_HAS_POSITION) {
+ if (position) {
+ position->x = READ_LE_UINT16(sprite);
+ position->y = READ_LE_UINT16(sprite + 2);
+ }
+ sprite += 4;
+ } else if (position) {
+ position->x = 0;
+ position->y = 0;
+ }
+
+ if (flags & BF_HAS_PALETTE) {
+ if (palette)
+ *palette = sprite;
+ sprite += 1024;
+ } else if (palette)
+ *palette = NULL;
+
+ if (flags & BF_HAS_IMAGE) {
+ if (pixels)
+ *pixels = sprite;
+ } else if (pixels)
+ *pixels = NULL;
+
+}
+
+void unpackSpriteRle(const byte *source, int width, int height, byte *dest, int destPitch, bool flipX, bool flipY, byte oldColor, byte newColor) {
+
+ const bool replaceColors = oldColor != newColor;
+
+ int16 rows, chunks;
+ int16 skip, copy;
+
+ if (flipY) {
+ dest += destPitch * (height - 1);
+ destPitch = -destPitch;
+ }
+
+ rows = READ_LE_UINT16(source);
+ chunks = READ_LE_UINT16(source + 2);
+ source += 4;
+
+ do {
+ if (chunks == 0) {
+ dest += rows * destPitch;
+ } else {
+ while (rows-- > 0) {
+ uint16 rowChunks = chunks;
+ while (rowChunks-- > 0) {
+ skip = READ_LE_UINT16(source);
+ copy = READ_LE_UINT16(source + 2);
+ source += 4;
+ if (!flipX) {
+ memcpy(dest + skip, source, copy);
+ } else {
+ byte *flipDest = dest + width - skip - 1;
+ for (int xc = 0; xc < copy; xc++) {
+ *flipDest-- = source[xc];
+ }
+ }
+ source += copy;
+ }
+ dest += destPitch;
+ if (replaceColors)
+ for (int xc = 0; xc < width; xc++)
+ if (dest[xc] == oldColor)
+ dest[xc] = newColor;
+ }
+ }
+ rows = READ_LE_UINT16(source);
+ chunks = READ_LE_UINT16(source + 2);
+ source += 4;
+ } while (rows > 0);
+
+}
+
+void unpackSpriteNormal(const byte *source, int width, int height, byte *dest, int destPitch, bool flipX, bool flipY) {
+
+ const int sourcePitch = (width + 3) & 0xFFFC;
+
+ if (flipY) {
+ dest += destPitch * (height - 1);
+ destPitch = -destPitch;
+ }
+
+ if (!flipX) {
+ while (height-- > 0) {
+ memcpy(dest, source, width);
+ source += sourcePitch;
+ dest += destPitch;
+ }
+ } else {
+ while (height-- > 0) {
+ dest += width - 1;
+ for (int xc = 0; xc < width; xc++)
+ *dest-- = source[xc];
+ source += sourcePitch;
+ dest += destPitch;
+ }
+ }
+
+}
+
+int calcDistance(int16 x1, int16 y1, int16 x2, int16 y2) {
+ const int16 deltaX = ABS(x1 - x2);
+ const int16 deltaY = ABS(y1 - y2);
+ return (int)sqrt((double)(deltaX * deltaX + deltaY * deltaY));
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/graphics.h b/engines/neverhood/graphics.h
new file mode 100644
index 0000000000..9ab0d87ab9
--- /dev/null
+++ b/engines/neverhood/graphics.h
@@ -0,0 +1,161 @@
+/* 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 NEVERHOOD_GRAPHICS_H
+#define NEVERHOOD_GRAPHICS_H
+
+#include "common/array.h"
+#include "common/file.h"
+#include "graphics/surface.h"
+#include "neverhood/neverhood.h"
+
+namespace Neverhood {
+
+struct NPoint {
+ int16 x, y;
+};
+
+typedef Common::Array<NPoint> NPointArray;
+
+struct NDimensions {
+ int16 width, height;
+};
+
+struct NRect {
+ int16 x1, y1, x2, y2;
+
+ NRect() : x1(0), y1(0), x2(0), y2(0) {}
+
+ NRect(int16 x01, int16 y01, int16 x02, int16 y02) : x1(x01), y1(y01), x2(x02), y2(y02) {}
+
+ void set(int16 x01, int16 y01, int16 x02, int16 y02) {
+ x1 = x01;
+ y1 = y01;
+ x2 = x02;
+ y2 = y02;
+ }
+
+ bool contains(int16 x, int16 y) const {
+ return x >= x1 && x <= x2 && y >= y1 && y <= y2;
+ }
+
+};
+
+typedef Common::Array<NRect> NRectArray;
+
+// TODO: Use Common::Rect
+struct NDrawRect {
+ int16 x, y, width, height;
+ NDrawRect() : x(0), y(0), width(0), height(0) {}
+ NDrawRect(int16 x0, int16 y0, int16 width0, int16 height0) : x(x0), y(y0), width(width0), height(height0) {}
+ int16 x2() { return x + width; }
+ int16 y2() { return y + height; }
+ void set(int16 x0, int16 y0, int16 width0, int16 height0) {
+ x = x0;
+ y = y0;
+ width = width0;
+ height = height0;
+ }
+};
+
+class AnimResource;
+class SpriteResource;
+class MouseCursorResource;
+
+class BaseSurface {
+public:
+ BaseSurface(NeverhoodEngine *vm, int priority, int16 width, int16 height, Common::String name);
+ virtual ~BaseSurface();
+ virtual void draw();
+ void clear();
+ void drawSpriteResource(SpriteResource &spriteResource);
+ void drawSpriteResourceEx(SpriteResource &spriteResource, bool flipX, bool flipY, int16 width, int16 height);
+ void drawAnimResource(AnimResource &animResource, uint frameIndex, bool flipX, bool flipY, int16 width, int16 height);
+ void drawMouseCursorResource(MouseCursorResource &mouseCursorResource, int frameNum);
+ void copyFrom(Graphics::Surface *sourceSurface, int16 x, int16 y, NDrawRect &sourceRect);
+ int getPriority() const { return _priority; }
+ void setPriority(int priority) { _priority = priority; }
+ NDrawRect& getDrawRect() { return _drawRect; }
+ NDrawRect& getSysRect() { return _sysRect; }
+ NRect& getClipRect() { return _clipRect; }
+ void setClipRect(NRect clipRect) { _clipRect = clipRect; }
+ void setClipRects(NRect *clipRects, uint clipRectsCount) { _clipRects = clipRects; _clipRectsCount = clipRectsCount; }
+ void clearClipRects() { _clipRects = NULL; _clipRectsCount = 0; }
+ bool getVisible() const { return _visible; }
+ void setVisible(bool value) { _visible = value; }
+ void setTransparent(bool value) { _transparent = value; }
+ Graphics::Surface *getSurface() { return _surface; }
+ const Common::String getName() const { return _name; }
+protected:
+ NeverhoodEngine *_vm;
+ int _priority;
+ bool _visible;
+ Common::String _name;
+ Graphics::Surface *_surface;
+ NDrawRect _drawRect;
+ NDrawRect _sysRect;
+ NRect _clipRect;
+ NRect *_clipRects;
+ uint _clipRectsCount;
+ bool _transparent;
+ // Version changes each time the pixels are touched in any way
+ byte _version;
+};
+
+class ShadowSurface : public BaseSurface {
+public:
+ ShadowSurface(NeverhoodEngine *vm, int priority, int16 width, int16 height, BaseSurface *shadowSurface);
+ virtual void draw();
+protected:
+ BaseSurface *_shadowSurface;
+};
+
+class FontSurface : public BaseSurface {
+public:
+ FontSurface(NeverhoodEngine *vm, NPointArray *tracking, uint charsPerRow, uint16 numRows, byte firstChar, uint16 charWidth, uint16 charHeight);
+ FontSurface(NeverhoodEngine *vm, uint32 fileHash, uint charsPerRow, uint16 numRows, byte firstChar, uint16 charWidth, uint16 charHeight);
+ virtual ~FontSurface();
+ void drawChar(BaseSurface *destSurface, int16 x, int16 y, byte chr);
+ void drawString(BaseSurface *destSurface, int16 x, int16 y, const byte *string, int stringLen = -1);
+ int16 getStringWidth(const byte *string, int stringLen);
+ uint16 getCharWidth() const { return _charWidth; }
+ uint16 getCharHeight() const { return _charHeight; }
+ static FontSurface *createFontSurface(NeverhoodEngine *vm, uint32 fileHash);
+protected:
+ uint _charsPerRow;
+ uint16 _numRows;
+ byte _firstChar;
+ uint16 _charWidth;
+ uint16 _charHeight;
+ NPointArray *_tracking;
+};
+
+// Misc
+
+void parseBitmapResource(const byte *sprite, bool *rle, NDimensions *dimensions, NPoint *position, const byte **palette, const byte **pixels);
+void unpackSpriteRle(const byte *source, int width, int height, byte *dest, int destPitch, bool flipX, bool flipY, byte oldColor = 0, byte newColor = 0);
+void unpackSpriteNormal(const byte *source, int width, int height, byte *dest, int destPitch, bool flipX, bool flipY);
+int calcDistance(int16 x1, int16 y1, int16 x2, int16 y2);
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_GRAPHICS_H */
diff --git a/engines/neverhood/klaymen.cpp b/engines/neverhood/klaymen.cpp
new file mode 100644
index 0000000000..70567806fa
--- /dev/null
+++ b/engines/neverhood/klaymen.cpp
@@ -0,0 +1,6141 @@
+/* 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 "neverhood/klaymen.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/scene.h"
+#include "neverhood/staticdata.h"
+
+namespace Neverhood {
+
+static const KlaymenIdleTableItem klaymenIdleTable1[] = {
+ {1, kIdlePickEar},
+ {1, kIdleSpinHead},
+ {1, kIdleArms},
+ {1, kIdleChest},
+ {1, kIdleHeadOff}
+};
+
+static const KlaymenIdleTableItem klaymenIdleTable2[] = {
+ {1, kIdlePickEar},
+ {1, kIdleSpinHead},
+ {1, kIdleChest},
+ {1, kIdleHeadOff}
+};
+
+static const KlaymenIdleTableItem klaymenIdleTable3[] = {
+ {1, kIdleTeleporterHands},
+ {1, kIdleTeleporterHands2}
+};
+
+static const KlaymenIdleTableItem klaymenIdleTable4[] = {
+ {1, kIdleSpinHead},
+ {1, kIdleChest},
+ {1, kIdleHeadOff},
+};
+
+static const KlaymenIdleTableItem klaymenIdleTable1002[] = {
+ {1, kIdlePickEar},
+ {2, kIdleWonderAbout}
+};
+
+// Klaymen
+
+Klaymen::Klaymen(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRectArray *clipRects)
+ : AnimatedSprite(vm, 1000), _idleCounterMax(0), _idleCounter(0), _isMoveObjectRequested(false), _blinkCounterMax(0),
+ _isWalkingOpenDoorNotified(false), _spitOutCountdown(0), _tapesToInsert(0), _keysToInsert(0), _busyStatus(0), _acceptInput(true),
+ _attachedSprite(NULL), _isWalking(false), _actionStatus(1), _parentScene(parentScene), _isSneaking(false), _isLargeStep(false),
+ _doYHitIncr(false), _isLeverDown(false), _isSittingInTeleporter(false), _actionStatusChanged(false), _ladderStatus(0), _pathPoints(NULL), _soundFlag(false),
+ _idleTableNum(0), _otherSprite(NULL), _moveObjectCountdown(0), _readyToSpit(false), _walkResumeFrameIncr(0) {
+
+ createSurface(1000, 320, 200);
+ _x = x;
+ _y = y;
+ _destX = x;
+ _destY = y;
+ _flags = 2;
+ setKlaymenIdleTable1();
+ stTryStandIdle();
+ SetUpdateHandler(&Klaymen::update);
+}
+
+void Klaymen::xUpdate() {
+ // Empty
+}
+
+uint32 Klaymen::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ }
+ return 0;
+}
+
+void Klaymen::update() {
+ AnimatedSprite::update();
+ xUpdate();
+}
+
+void Klaymen::setKlaymenIdleTable(const KlaymenIdleTableItem *table, uint tableCount) {
+ _idleTable = table;
+ _idleTableCount = tableCount;
+ _idleTableTotalWeight = 0;
+ for (uint i = 0; i < tableCount; i++)
+ _idleTableTotalWeight += table[i].weight;
+}
+
+void Klaymen::setKlaymenIdleTable1() {
+ setKlaymenIdleTable(klaymenIdleTable1, ARRAYSIZE(klaymenIdleTable1));
+}
+
+void Klaymen::setKlaymenIdleTable2() {
+ setKlaymenIdleTable(klaymenIdleTable2, ARRAYSIZE(klaymenIdleTable2));
+}
+
+void Klaymen::setKlaymenIdleTable3() {
+ setKlaymenIdleTable(klaymenIdleTable3, ARRAYSIZE(klaymenIdleTable3));
+}
+
+void Klaymen::stIdlePickEar() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5B20C814, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmIdlePickEar);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+ FinalizeState(&Klaymen::evIdlePickEarDone);
+}
+
+uint32 Klaymen::hmIdlePickEar(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x04DBC02C) {
+ playSound(0, 0x44528AA1);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::evIdlePickEarDone() {
+ stopSound(0);
+}
+
+void Klaymen::stIdleSpinHead() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0xD122C137, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmIdleSpinHead);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+}
+
+uint32 Klaymen::hmIdleSpinHead(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x808A0008) {
+ playSound(0, 0xD948A340);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleArms() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x543CD054, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmIdleArms);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+ FinalizeState(&Klaymen::evIdleArmsDone);
+}
+
+void Klaymen::evIdleArmsDone() {
+ stopSound(0);
+}
+
+uint32 Klaymen::hmIdleArms(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x5A0F0104) {
+ playSound(0, 0x7970A100);
+ } else if (param.asInteger() == 0x9A9A0109) {
+ playSound(0, 0xD170CF04);
+ } else if (param.asInteger() == 0x989A2169) {
+ playSound(0, 0xD073CF14);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleChest() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x40A0C034, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmIdleChest);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+}
+
+uint32 Klaymen::hmIdleChest(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0D2A0288) {
+ playSound(0, 0xD192A368);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleHeadOff() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5120E137, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmIdleHeadOff);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+}
+
+uint32 Klaymen::hmIdleHeadOff(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xC006000C) {
+ playSound(0, 0x9D406340);
+ } else if (param.asInteger() == 0x2E4A2940) {
+ playSound(0, 0x53A4A1D4);
+ } else if (param.asInteger() == 0xAA0A0860) {
+ playSound(0, 0x5BE0A3C6);
+ } else if (param.asInteger() == 0xC0180260) {
+ playSound(0, 0x5D418366);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleWonderAbout() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0xD820A114, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+}
+
+void Klaymen::stSitIdleTeleporter() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x582EC138, 0, -1);
+ SetUpdateHandler(&Klaymen::upSitIdleTeleporter);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ _idleCounter = 0;
+ _blinkCounter = 0;
+ _idleCounterMax = 8;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+}
+
+void Klaymen::upSitIdleTeleporter() {
+ update();
+ if (++_idleCounter >= _idleCounterMax) {
+ _idleCounter = 0;
+ if (_idleTable) {
+ int idleWeight = _vm->_rnd->getRandomNumber(_idleTableTotalWeight - 1);
+ for (uint i = 0; i < _idleTableCount; i++) {
+ if (idleWeight < _idleTable[i].weight) {
+ enterIdleAnimation(_idleTable[i].idleAnimation);
+ _idleCounterMax = _vm->_rnd->getRandomNumber(128 - 1) + 24;
+ break;
+ }
+ idleWeight -= _idleTable[i].weight;
+ }
+ }
+ } else if (++_blinkCounter >= _blinkCounterMax) {
+ _blinkCounter = 0;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+ stSitIdleTeleporterBlink();
+ }
+}
+
+void Klaymen::stSitIdleTeleporterBlink() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x5C24C018, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stSitIdleTeleporterBlinkSecond);
+}
+
+void Klaymen::stSitIdleTeleporterBlinkSecond() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x5C24C018, 0, -1);
+ SetUpdateHandler(&Klaymen::upSitIdleTeleporter);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stPickUpNeedle() {
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ if (!stStartAction(AnimationCallback(&Klaymen::stPickUpNeedle))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x1449C169, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPickUpObject);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void Klaymen::stPickUpTube() {
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ if (!stStartAction(AnimationCallback(&Klaymen::stPickUpTube))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x0018C032, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPickUpTube);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+uint32 Klaymen::hmPickUpTube(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xC1380080) {
+ sendMessage(_attachedSprite, 0x4806, 0);
+ playSound(0, 0xC8004340);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x03020231) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0x67221A03) {
+ playSound(0, 0x44051000);
+ } else if (param.asInteger() == 0x925A0C1E) {
+ playSound(0, 0x40E5884D);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTurnToUseInTeleporter() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0xD229823D, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stReturnFromUseInTeleporter() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x9A2801E0, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stStepOver() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stStepOver))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x004AA310, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartWalking);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stSitInTeleporter() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stSitInTeleporter))) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x392A0330, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSitInTeleporter);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+uint32 Klaymen::hmSitInTeleporter(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x001A2832) {
+ playSound(0, 0xC0E4884C);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stGetUpFromTeleporter() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x913AB120, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+/////////////////////////////////////////////////////////////////
+
+void Klaymen::stopWalking() {
+ _destX = _x;
+ if (!_isWalking && !_isSneaking && !_isLargeStep) {
+ gotoState(NULL);
+ gotoNextStateExt();
+ }
+}
+
+void Klaymen::startIdleAnimation(uint32 fileHash, AnimationCb callback) {
+ debug(1, "startIdleAnimation(%08X)", fileHash);
+ NextState(callback);
+ SetUpdateHandler(&Klaymen::upIdleAnimation);
+}
+
+void Klaymen::upIdleAnimation() {
+ gotoNextStateExt();
+ update();
+}
+
+bool Klaymen::stStartActionFromIdle(AnimationCb callback) {
+ if (_busyStatus == 2) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x9A7020B8, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartAction);
+ SetSpriteUpdate(NULL);
+ NextState(callback);
+ return true;
+ }
+ return false;
+}
+
+void Klaymen::gotoNextStateExt() {
+ if (_finalizeStateCb) {
+ AnimationCb cb = _finalizeStateCb;
+ _finalizeStateCb = NULL;
+ (this->*cb)();
+ }
+ if (_nextStateCb) {
+ AnimationCb cb = _nextStateCb;
+ _nextStateCb = NULL;
+ (this->*cb)();
+ } else {
+ // Inform the scene that the current Klaymen animation sequence has finished
+ sendMessage(_parentScene, 0x1006, 0);
+ }
+}
+
+void Klaymen::beginAction() {
+ _actionStatusChanged = false;
+ _actionStatus = 1;
+}
+
+void Klaymen::endAction() {
+ if (_actionStatusChanged)
+ _actionStatus = 0;
+}
+
+void Klaymen::stTryStandIdle() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stTryStandIdle))) {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::upStandIdle);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ _idleCounter = 0;
+ _blinkCounter = 0;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64) + 24;
+ }
+}
+
+void Klaymen::upStandIdle() {
+ update();
+ if (++_idleCounter >= 720) {
+ _idleCounter = 0;
+ if (_idleTable) {
+ int idleWeight = _vm->_rnd->getRandomNumber(_idleTableTotalWeight - 1);
+ for (uint i = 0; i < _idleTableCount; i++) {
+ if (idleWeight < _idleTable[i].weight) {
+ enterIdleAnimation(_idleTable[i].idleAnimation);
+ break;
+ }
+ idleWeight -= _idleTable[i].weight;
+ }
+ }
+ } else if (++_blinkCounter >= _blinkCounterMax) {
+ _blinkCounter = 0;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+ stIdleBlink();
+ }
+}
+
+uint32 Klaymen::hmLowLevel(int messageNum, const MessageParam &param, Entity *sender) {
+ Sprite::handleMessage(messageNum, param, sender);
+ uint32 messageResult = xHandleMessage(messageNum, param);
+ switch (messageNum) {
+ case 0x1008:
+ messageResult = _acceptInput;
+ break;
+ case 0x1014:
+ _attachedSprite = (Sprite*)(param.asEntity());
+ break;
+ case 0x1019:
+ gotoNextStateExt();
+ break;
+ case 0x101C:
+ beginAction();
+ break;
+ case 0x1021:
+ endAction();
+ break;
+ case 0x481C:
+ _actionStatus = param.asInteger();
+ _actionStatusChanged = true;
+ messageResult = 1;
+ break;
+ case 0x482C:
+ if (param.asInteger() != 0) {
+ _pathPoints = _dataResource.getPointArray(param.asInteger());
+ } else {
+ _pathPoints = NULL;
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleBlink() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5900C41E, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stStandAround);
+}
+
+uint32 Klaymen::hmLowLevelAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextStateExt();
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stStandAround() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::upStandIdle);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmStartAction(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x271AA210) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x2B22AA81) {
+ playSound(0, 0x0A2AA8E0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+
+void Klaymen::startWalkToX(int16 x, bool walkExt) {
+ int16 xdiff = ABS(x - _x);
+ if (x == _x) {
+ _destX = x;
+ if (!_isWalking && !_isSneaking && !_isLargeStep) {
+ gotoState(NULL);
+ gotoNextStateExt();
+ }
+ } else if (xdiff <= 36 && !_isWalking && !_isSneaking && !_isLargeStep) {
+ _destX = x;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (xdiff <= 42 && _actionStatus != 3) {
+ if (_isSneaking && ((!_doDeltaX && x - _x > 0) || (_doDeltaX && x - _x < 0)) && ABS(_destX - _x) > xdiff) {
+ _destX = x;
+ } else {
+ _destX = x;
+ GotoState(&Klaymen::stSneak);
+ }
+ } else if (_isWalking && ((!_doDeltaX && x - _x > 0) || (_doDeltaX && x - _x < 0))) {
+ _destX = x;
+ } else if (walkExt) {
+ _destX = x;
+ GotoState(&Klaymen::stStartWalkingExt);
+ } else {
+ _destX = x;
+ GotoState(&Klaymen::stStartWalking);
+ }
+}
+
+void Klaymen::stWakeUp() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x527AC970, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stSleeping() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x5A38C110, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSleeping);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmSleeping(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x03060012) {
+ playSound(0, 0xC0238244);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+bool Klaymen::stStartAction(AnimationCb callback3) {
+ if (_busyStatus == 1) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x5C7080D4, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartAction);
+ SetSpriteUpdate(&Klaymen::suAction);
+ NextState(callback3);
+ return true;
+ } else {
+ _x = _destX;
+ return false;
+ }
+}
+
+void Klaymen::suAction() {
+
+ int16 xdiff = _destX - _x;
+
+ if (_doDeltaX) {
+ _x -= _deltaX;
+ } else {
+ _x += _deltaX;
+ }
+ _deltaX = 0;
+
+ if (_doDeltaY) {
+ _y -= _deltaY;
+ } else {
+ _y += _deltaY;
+ }
+ _deltaY = 0;
+
+ if (_frameChanged) {
+ if (xdiff > 6)
+ _x += 6;
+ else if (xdiff < -6)
+ _x -= 6;
+ else
+ _x = _destX;
+ }
+
+ updateBounds();
+
+}
+
+void Klaymen::suSneaking() {
+
+ int16 xdiff = _destX - _x;
+
+ if (_currFrameIndex == 9) {
+ if (xdiff > 26)
+ _deltaX += xdiff - 26;
+ else if (xdiff < -26)
+ _deltaX -= xdiff + 26;
+ }
+
+ if (xdiff > _deltaX)
+ xdiff = _deltaX;
+ else if (xdiff < -_deltaX)
+ xdiff = -_deltaX;
+ _deltaX = 0;
+
+ if (_destX != _x) {
+ HitRect *hitRectPrev = _parentScene->findHitRectAtPos(_x, _y);
+ _x += xdiff;
+ if (_pathPoints) {
+ walkAlongPathPoints();
+ } else {
+ HitRect *hitRectNext = _parentScene->findHitRectAtPos(_x, _y);
+ if (hitRectNext->type == 0x5002) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (hitRectNext->rect.x2 - _x) / 2);
+ } else if (hitRectNext->type == 0x5003) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (_x - hitRectNext->rect.x1) / 2);
+ } else if (hitRectPrev->type == 0x5002) {
+ if (xdiff > 0) {
+ _y = hitRectPrev->rect.y2;
+ } else {
+ _y = hitRectPrev->rect.y1;
+ }
+ } else if (hitRectPrev->type == 0x5003) {
+ if (xdiff < 0) {
+ _y = hitRectPrev->rect.y2;
+ } else {
+ _y = hitRectPrev->rect.y1;
+ }
+ }
+ }
+ updateBounds();
+ }
+
+}
+
+void Klaymen::stSneak() {
+ _busyStatus = 1;
+ _isSneaking = true;
+ _acceptInput = true;
+ setDoDeltaX(_destX < _x ? 1 : 0);
+ startAnimation(0x5C48C506, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSneaking);
+ SetSpriteUpdate(&Klaymen::suSneaking);
+ FinalizeState(&Klaymen::evSneakingDone);
+}
+
+void Klaymen::evSneakingDone() {
+ _isSneaking = false;
+}
+
+uint32 Klaymen::hmSneaking(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0A2AA8E0);
+ } else if (param.asInteger() == 0x32188010) {
+ playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8);
+ } else if (param.asInteger() == 0x02A2909C) {
+ playSound(0, _soundFlag ? 0x50399F64 : 0x0460E2FA);
+ }
+ break;
+ case 0x3002:
+ _x = _destX;
+ gotoNextStateExt();
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stStartWalking() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stStartWalking))) {
+ _busyStatus = 0;
+ _isWalking = true;
+ _acceptInput = true;
+ setDoDeltaX(_destX < _x ? 1 : 0);
+ startAnimation(0x242C0198, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingTestExit);
+ NextState(&Klaymen::stWalkingFirst);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+ }
+}
+
+void Klaymen::evStartWalkingDone() {
+ _isWalking = false;
+}
+
+uint32 Klaymen::hmStartWalking(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, _soundFlag ? 0x50399F64 : 0x0460E2FA);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stWalkingFirst() {
+ _busyStatus = 0;
+ _isWalking = true;
+ _acceptInput = true;
+ startAnimation(0x1A249001, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingFirst);
+ NextState(&Klaymen::stUpdateWalkingFirst);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+}
+
+void Klaymen::suWalkingFirst() {
+ SetSpriteUpdate(&Klaymen::suWalkingTestExit);
+ _deltaX = 0;
+}
+
+uint32 Klaymen::hmWalking(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, _soundFlag ? 0x50399F64 : 0x0460E2FA);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stUpdateWalkingFirst() {
+ if (_actionStatus == 2) {
+ gotoNextStateExt();
+ } else if (_actionStatus == 3) {
+ stWalkingOpenDoor();
+ } else {
+ _isSneaking = true;
+ _acceptInput = true;
+ if (ABS(_destX - _x) <= 42 && _currFrameIndex >= 5 && _currFrameIndex <= 11) {
+ if (_actionStatus == 0) {
+ _busyStatus = 1;
+ startAnimation(0xF234EE31, 0, -1);
+ } else {
+ _busyStatus = 2;
+ startAnimation(0xF135CC21, 0, -1);
+ }
+ } else if (ABS(_destX - _x) <= 10 && (_currFrameIndex >= 12 || _currFrameIndex <= 4)) {
+ if (_actionStatus == 0) {
+ _busyStatus = 1;
+ startAnimation(0x8604A152, 0, -1);
+ } else {
+ _busyStatus = 2;
+ startAnimation(0xA246A132, 0, -1);
+ }
+ }
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSneaking);
+ SetSpriteUpdate(&Klaymen::suSneaking);
+ FinalizeState(&Klaymen::evSneakingDone);
+ }
+}
+
+void Klaymen::suWalkingTestExit() {
+ int16 xdiff = ABS(_destX - _x);
+ int16 xdelta = _destX - _x;
+
+ if (xdelta > _deltaX)
+ xdelta = _deltaX;
+ else if (xdelta < -_deltaX)
+ xdelta = -_deltaX;
+
+ _deltaX = 0;
+
+ if (xdiff == 0 ||
+ (_actionStatus != 2 && _actionStatus != 3 && xdiff <= 42 && _currFrameIndex >= 5 && _currFrameIndex <= 11) ||
+ (_actionStatus != 2 && _actionStatus != 3 && xdiff <= 10 && (_currFrameIndex >= 12 || _currFrameIndex <= 4)) ||
+ (_actionStatus == 3 && xdiff < 30) ||
+ (_actionStatus == 3 && xdiff < 150 && _currFrameIndex >= 6)) {
+ sendMessage(this, 0x1019, 0);
+ } else {
+ HitRect *hitRectPrev = _parentScene->findHitRectAtPos(_x, _y);
+ _x += xdelta;
+ if (_pathPoints) {
+ walkAlongPathPoints();
+ } else {
+ HitRect *hitRectNext = _parentScene->findHitRectAtPos(_x, _y);
+ if (hitRectNext->type == 0x5002) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (hitRectNext->rect.x2 - _x) / 2);
+ } else if (hitRectNext->type == 0x5003) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (_x - hitRectNext->rect.x1) / 2);
+ } else if (hitRectPrev->type == 0x5002) {
+ _y = xdelta > 0 ? hitRectPrev->rect.y2 : hitRectPrev->rect.y1;
+ } else if (hitRectPrev->type == 0x5003) {
+ _y = xdelta < 0 ? hitRectPrev->rect.y2 : hitRectPrev->rect.y1;
+ } else if (_doYHitIncr && xdelta != 0) {
+ if (hitRectNext->type == 0x5000) {
+ _y++;
+ } else if (hitRectNext->type == 0x5001 && _y > hitRectNext->rect.y1) {
+ _y--;
+ }
+ }
+ }
+ updateBounds();
+ }
+
+}
+
+uint32 Klaymen::hmLever(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stPickUpGeneric() {
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ if (!stStartAction(AnimationCallback(&Klaymen::stPickUpGeneric))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x1C28C178, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPickUpObject);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+uint32 Klaymen::hmPickUpObject(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xC1380080) {
+ sendMessage(_attachedSprite, 0x4806, 0);
+ playSound(0, 0x40208200);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x03020231) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0x67221A03) {
+ playSound(0, 0x44051000);
+ } else if (param.asInteger() == 0x2EAE0303) {
+ playSound(0, 0x03630300);
+ } else if (param.asInteger() == 0x61CE4467) {
+ playSound(0, 0x03630300);
+ }
+ break;
+ }
+ return messageResult;
+
+}
+
+void Klaymen::stPressButton() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stPressButton))) {
+ _busyStatus = 2;
+ _acceptInput = true;
+ startAnimation(0x1C02B03D, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPressButton);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+uint32 Klaymen::hmPressButton(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0D01B294) {
+ sendMessage(_attachedSprite, 0x480B, 0);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0A2AA8E0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stPressFloorButton() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stPressFloorButton))) {
+ _busyStatus = 2;
+ _acceptInput = true;
+ startAnimation(0x1C16B033, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPressButton);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void Klaymen::stPressButtonSide() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stPressButtonSide))) {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x1CD89029, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPressButton);
+ SetSpriteUpdate(&Klaymen::suAction);
+ }
+}
+
+void Klaymen::startSpecialWalkRight(int16 x) {
+ if (_x == x) {
+ _destX = x;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (_x < x) {
+ startWalkToX(x, false);
+ } else if (_x - x <= 105) {
+ startWalkToXExt(x);
+ } else {
+ startWalkToX(x, false);
+ }
+}
+
+void Klaymen::startSpecialWalkLeft(int16 x) {
+ if (x == _x) {
+ _destX = x;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (x < _x) {
+ startWalkToX(x, false);
+ } else if (x - _x <= 105) {
+ startWalkToXExt(x);
+ } else {
+ startWalkToX(x, false);
+ }
+}
+
+void Klaymen::startWalkToXSmall(int16 x) {
+ _actionStatus = 2;
+ if (_x == x) {
+ _destX = x;
+ if (_isWalking) {
+ GotoState(NULL);
+ gotoNextStateExt();
+ }
+ } else if (_isWalking && ((!_doDeltaX && x - _x > 0) || (_doDeltaX && x - _x < 0))) {
+ _destX = x;
+ } else {
+ _destX = x;
+ GotoState(&Klaymen::stStartWalkingSmall);
+ }
+}
+
+void Klaymen::stStartWalkingSmall() {
+ _isWalking = true;
+ _acceptInput = true;
+ _actionStatus = 2;
+ setDoDeltaX(_destX < _x ? 1 : 0);
+ startAnimation(0x3A4CD934, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkingSmall);
+ SetSpriteUpdate(&Klaymen::suWalkingTestExit);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+}
+
+uint32 Klaymen::hmWalkingSmall(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101)
+ playSound(0, 0x4924AAC4);
+ else if (param.asInteger() == 0x0A2A9098)
+ playSound(0, 0x0A2AA8E0);
+ }
+ return messageResult;
+}
+
+void Klaymen::stStandIdleSmall() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x90D0D1D0, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWonderAboutAfterSmall() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x11C8D156, 30, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWonderAboutHalfSmall() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x11C8D156, 0, 10);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWonderAboutSmall() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x11C8D156, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWalkToFrontNoStepSmall() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0x3F9CC394, 0x14884392, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+uint32 Klaymen::hmWalkFrontBackSmall(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x80C110B5)
+ sendMessage(_parentScene, 0x482A, 0);
+ else if (param.asInteger() == 0x110010D1)
+ sendMessage(_parentScene, 0x482B, 0);
+ else if (param.asInteger() == 0x32180101)
+ playSound(0, 0x4924AAC4);
+ else if (param.asInteger() == 0x0A2A9098)
+ playSound(0, 0x0A2AA8E0);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stWalkToFront2Small() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x2F1C4694, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stWalkToFrontSmall() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x3F9CC394, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stTurnToBackHalfSmall() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0x37ECD436, 0, 0x8520108C);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stTurnToBackWalkSmall() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x16EDDE36, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stTurnToBackSmall() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x37ECD436, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkFrontBackSmall);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stPullCord() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stPullCord))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x3F28E094, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPullReleaseCord);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stReleaseCord);
+ }
+}
+
+void Klaymen::stReleaseCord() {
+ _acceptInput = false;
+ startAnimation(0x3A28C094, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPullReleaseCord);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmPullReleaseCord(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ sendMessage(_attachedSprite, 0x480F, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stUseTube() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stUseTube))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x1A38A814, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmUseTube);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+uint32 Klaymen::hmUseTube(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02B20220)
+ playSound(0, 0xC5408620);
+ else if (param.asInteger() == 0x0A720138)
+ playSound(0, 0xD4C08010);
+ else if (param.asInteger() == 0x03020231)
+ playSound(0, 0xD4C08010);
+ else if (param.asInteger() == 0xB613A180)
+ playSound(0, 0x44051000);
+ else if (param.asInteger() == 0x67221A03)
+ playSound(0, 0x44051000);
+ else if (param.asInteger() == 0x038A010B)
+ playSound(0, 0x00018040);
+ else if (param.asInteger() == 0x422B0280)
+ playSound(0, 0x166FC6E0);
+ else if (param.asInteger() == 0x925A0C1E)
+ playSound(0, 0x40E5884D);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stWalkingFirstExt() {
+ _busyStatus = 0;
+ _isWalking = true;
+ _acceptInput = true;
+ startAnimation(0x5A2CBC00, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingFirst);
+ NextState(&Klaymen::stUpdateWalkingFirst);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+}
+
+void Klaymen::stStartWalkingExt() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stStartWalkingExt))) {
+ _busyStatus = 0;
+ _isWalking = true;
+ _acceptInput = true;
+ setDoDeltaX(_destX < _x ? 1 : 0);
+ startAnimation(0x272C1199, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingTestExit);
+ NextState(&Klaymen::stWalkingFirstExt);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+ }
+}
+
+void Klaymen::startWalkToXDistance(int16 destX, int16 distance) {
+ if (_x > destX) {
+ if (_x == destX + distance) {
+ _destX = destX + distance;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (_x < destX + distance) {
+ startWalkToXExt(destX + distance);
+ } else {
+ startWalkToX(destX + distance, false);
+ }
+ } else {
+ if (_x == destX - distance) {
+ _destX = destX - distance;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (_x > destX - distance) {
+ startWalkToXExt(destX - distance);
+ } else {
+ startWalkToX(destX - distance, false);
+ }
+ }
+}
+
+void Klaymen::startWalkToXExt(int16 x) {
+ int16 xdiff = ABS(x - _x);
+ if (x == _x) {
+ _destX = x;
+ if (!_isWalking && !_isSneaking && !_isLargeStep) {
+ gotoState(NULL);
+ gotoNextStateExt();
+ }
+ } else if (xdiff <= 36 && !_isWalking && !_isSneaking && !_isLargeStep) {
+ _destX = x;
+ gotoState(NULL);
+ gotoNextStateExt();
+ } else if (xdiff <= 42 && _actionStatus != 3) {
+ if (_isSneaking && ((!_doDeltaX && x - _x > 0) || (_doDeltaX && x - _x < 0)) && ABS(_destX - _x) > xdiff) {
+ _destX = x;
+ } else {
+ _destX = x;
+ GotoState(&Klaymen::stSneak);
+ }
+ } else if (_isLargeStep && ((!_doDeltaX && x - _x > 0) || (_doDeltaX && x - _x < 0))) {
+ _destX = x;
+ } else {
+ _destX = x;
+ GotoState(&Klaymen::stLargeStep);
+ }
+}
+
+void Klaymen::stLargeStep() {
+ _busyStatus = 2;
+ _isLargeStep = true;
+ _acceptInput = true;
+ setDoDeltaX(_destX >= _x ? 1 : 0);
+ startAnimation(0x08B28116, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLargeStep);
+ SetSpriteUpdate(&Klaymen::suLargeStep);
+ FinalizeState(&Klaymen::evLargeStepDone);
+}
+
+void Klaymen::evLargeStepDone() {
+ _isLargeStep = false;
+}
+
+void Klaymen::suLargeStep() {
+ int16 xdiff = _destX - _x;
+
+ if (_doDeltaX) {
+ _deltaX = -_deltaX;
+ }
+
+ if (_currFrameIndex == 7) {
+ _deltaX = xdiff;
+ }
+
+ if ((xdiff > 0 && xdiff > _deltaX) || (xdiff < 0 && xdiff < _deltaX))
+ xdiff = _deltaX;
+
+ _deltaX = 0;
+
+ if (_x != _destX) {
+ HitRect *hitRectPrev = _parentScene->findHitRectAtPos(_x, _y);
+ _x += xdiff;
+ if (_pathPoints) {
+ walkAlongPathPoints();
+ } else {
+ HitRect *hitRectNext = _parentScene->findHitRectAtPos(_x, _y);
+ if (hitRectNext->type == 0x5002) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (hitRectNext->rect.x2 - _x) / 2);
+ } else if (hitRectNext->type == 0x5003) {
+ _y = MAX<int16>(hitRectNext->rect.y1, hitRectNext->rect.y2 - (_x - hitRectNext->rect.x1) / 2);
+ } else if (hitRectPrev->type == 0x5002) {
+ _y = xdiff > 0 ? hitRectPrev->rect.y2 : hitRectPrev->rect.y1;
+ } else if (hitRectPrev->type == 0x5003) {
+ _y = xdiff < 0 ? hitRectPrev->rect.y2 : hitRectPrev->rect.y1;
+ }
+ }
+ updateBounds();
+ }
+}
+
+uint32 Klaymen::hmLargeStep(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0A2AA8E0);
+ }
+ break;
+ case 0x3002:
+ _x = _destX;
+ gotoNextStateExt();
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stWonderAboutHalf() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0xD820A114, 0, 10);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWonderAboutAfter() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0xD820A114, 30, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stTurnToUseHalf() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x9B250AD2, 0, 7);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToUse);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmTurnToUse(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0A2AA8E0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTurnAwayFromUse() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x98F88391, 4, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToUse);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stWonderAbout() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0xD820A114, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stPeekWall() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0xAC20C012, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPeekWall);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmPeekWall(int messageNum, const MessageParam &param, Entity *sender) {
+ int16 speedUpFrameIndex;
+ switch (messageNum) {
+ case 0x1008:
+ speedUpFrameIndex = getFrameIndex(kKlaymenSpeedUpHash);
+ if (_currFrameIndex < speedUpFrameIndex)
+ startAnimation(0xAC20C012, speedUpFrameIndex, -1);
+ return 0;
+ case 0x100D:
+ if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0460E2FA);
+ }
+ break;
+ }
+ return hmLowLevelAnimation(messageNum, param, sender);
+}
+
+void Klaymen::stJumpToRing1() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToRing1))) {
+ _busyStatus = 0;
+ startAnimation(0xD82890BA, 0, -1);
+ setupJumpToRing();
+ }
+}
+
+void Klaymen::setupJumpToRing() {
+ _acceptInput = false;
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmJumpToRing);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ NextState(&Klaymen::stHangOnRing);
+ sendMessage(_attachedSprite, 0x482B, 0);
+}
+
+uint32 Klaymen::hmJumpToRing(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x168050A0) {
+ sendMessage(_attachedSprite, 0x4806, 0);
+ _acceptInput = true;
+ } else if (param.asInteger() == 0x320AC306) {
+ playSound(0, 0x5860C640);
+ } else if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::suUpdateDestX() {
+ AnimatedSprite::updateDeltaXY();
+ _destX = _x;
+}
+
+void Klaymen::stHangOnRing() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x4829E0B8, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stJumpToRing2() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToRing2))) {
+ _busyStatus = 0;
+ startAnimation(0x900980B2, 0, -1);
+ setupJumpToRing();
+ }
+}
+
+void Klaymen::stJumpToRing3() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToRing3))) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0xBA1910B2, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ SetMessageHandler(&Klaymen::hmJumpToRing3);
+ NextState(&Klaymen::stHoldRing3);
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+}
+
+uint32 Klaymen::hmJumpToRing3(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x168050A0) {
+ sendMessage(_attachedSprite, 0x4806, 0);
+ } else if (param.asInteger() == 0x320AC306) {
+ playSound(0, 0x5860C640);
+ } else if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stHoldRing3() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x4A293FB0, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmHoldRing3);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmHoldRing3(int messageNum, const MessageParam &param, Entity *sender) {
+ if (messageNum == 0x1008) {
+ stReleaseRing();
+ return 0;
+ }
+ return hmLowLevel(messageNum, param, sender);
+}
+
+void Klaymen::stReleaseRing() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ sendMessage(_attachedSprite, 0x4807, 0);
+ _attachedSprite = NULL;
+ startAnimation(0xB869A4B9, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stJumpToRing4() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToRing4))) {
+ _busyStatus = 0;
+ startAnimation(0xB8699832, 0, -1);
+ setupJumpToRing();
+ }
+}
+
+void Klaymen::startWalkToAttachedSpriteXDistance(int16 distance) {
+ startWalkToXDistance(_attachedSprite->getX(), distance);
+}
+
+void Klaymen::stContinueClimbLadderUp() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ _ladderStatus = 3;
+ startAnimationByHash(0x3A292504, 0x01084280, 0);
+ _newStickFrameHash = 0x01084280;
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ gotoNextStateExt();
+}
+
+void Klaymen::stStartClimbLadderDown() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stStartClimbLadderDown))) {
+ _busyStatus = 0;
+ if (_destY < _y) {
+ if (_ladderStatus == 1) {
+ _ladderStatus = 2;
+ stClimbLadderHalf();
+ } else {
+ gotoNextStateExt();
+ }
+ } else if (_ladderStatus == 0) {
+ _ladderStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x122D1505, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderUpDown);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else if (_ladderStatus == 3) {
+ _ladderStatus = 2;
+ _acceptInput = true;
+ startAnimationByHash(0x122D1505, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderUpDown);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else if (_ladderStatus == 1) {
+ _ladderStatus = 2;
+ _acceptInput = true;
+ startAnimation(0x122D1505, 29 - _currFrameIndex, -1);
+ }
+ }
+}
+
+void Klaymen::stClimbLadderHalf() {
+ _busyStatus = 2;
+ if (_ladderStatus == 1) {
+ _ladderStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0x3A292504, 0x02421405, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderHalf);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else if (_ladderStatus == 2) {
+ _ladderStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0x122D1505, 0x02421405, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderHalf);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else {
+ gotoNextStateExt();
+ }
+}
+
+uint32 Klaymen::hmClimbLadderHalf(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x489B025C) {
+ playSound(0, 0x52C4C2D7);
+ } else if (param.asInteger() == 0x400A0E64) {
+ playSound(0, 0x50E081D9);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0460E2FA);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmClimbLadderUpDown(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x01084280) {
+ _acceptInput = true;
+ } else if (param.asInteger() == 0x489B025C) {
+ playSound(0, 0x52C4C2D7);
+ } else if (param.asInteger() == 0x400A0E64) {
+ playSound(0, 0x50E081D9);
+ } else if (param.asInteger() == 0x02421405) {
+ if (_ladderStatus == 1) {
+ startAnimationByHash(0x3A292504, 0x01084280, 0);
+ if (_destY >= _y - 30)
+ sendMessage(this, 0x1019, 0);
+ } else {
+ startAnimationByHash(0x122D1505, 0x01084280, 0);
+ if (_destY <= _y)
+ sendMessage(this, 0x1019, 0);
+ }
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stStartClimbLadderUp() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stStartClimbLadderUp))) {
+ _busyStatus = 0;
+ if (_destY >= _y - 30) {
+ gotoNextStateExt();
+ } else if (_ladderStatus == 0) {
+ _ladderStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x3A292504, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderUpDown);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else if (_ladderStatus == 3) {
+ _ladderStatus = 1;
+ _acceptInput = true;
+ startAnimationByHash(0x3A292504, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClimbLadderUpDown);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ } else if (_ladderStatus == 2) {
+ _ladderStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x3A292504, 29 - _currFrameIndex, -1);
+ }
+ }
+}
+
+void Klaymen::stWalkToFrontNoStep() {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimationByHash(0xF229C003, 0x14884392, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkToFront);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+uint32 Klaymen::hmWalkToFront(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x80C110B5) {
+ sendMessage(_parentScene, 0x482A, 0);
+ } else if (param.asInteger() == 0x110010D1) {
+ sendMessage(_parentScene, 0x482B, 0);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, _soundFlag ? 0x48498E46 : 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, _soundFlag ? 0x50399F64 : 0x0460E2FA);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stWalkToFront() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stWalkToFront))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0xF229C003, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkToFront);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stTurnToFront() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stTurnToFront))) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0xCA221107, 0, 0x8520108C);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkToFront);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stTurnToBack() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stTurnToBack))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0xCA221107, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalkToFront);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stLandOnFeet() {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x18118554, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLandOnFeet);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmLandOnFeet(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x320AC306) {
+ playSound(0, 0x5860C640);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTurnToBackToUse() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stTurnToBackToUse))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x91540140, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToBackToUse);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+uint32 Klaymen::hmTurnToBackToUse(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xC61A0119) {
+ playSound(0, 0x402338C2);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x4924AAC4);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0A2AA8E0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stClayDoorOpen() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stClayDoorOpen))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x5CCCB330, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmClayDoorOpen);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+uint32 Klaymen::hmClayDoorOpen(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x040D4186) {
+ sendMessage(_attachedSprite, 0x4808, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTurnToUse() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stTurnToUse))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x9B250AD2, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToUse);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stReturnFromUse() {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x98F88391, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToUse);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stWalkingOpenDoor() {
+ _isWalkingOpenDoorNotified = false;
+ _acceptInput = false;
+ startAnimation(0x11A8E012, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStartWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingOpenDoor);
+}
+
+void Klaymen::suWalkingOpenDoor() {
+ if (!_isWalkingOpenDoorNotified && ABS(_destX - _x) < 80) {
+ sendMessage(_parentScene, 0x4829, 0);
+ _isWalkingOpenDoorNotified = true;
+ }
+ AnimatedSprite::updateDeltaXY();
+}
+
+void Klaymen::stMoveObjectSkipTurnFaceObject() {
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ _isMoveObjectRequested = false;
+ _acceptInput = true;
+ startAnimationByHash(0x0C1CA072, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ SetMessageHandler(&Klaymen::hmMoveObjectTurn);
+}
+
+void Klaymen::evMoveObjectTurnDone() {
+ sendMessage(_attachedSprite, 0x4807, 0);
+}
+
+uint32 Klaymen::hmMoveObjectTurn(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x01084280) {
+ sendMessage(_attachedSprite, 0x480B, _doDeltaX ? 1 : 0);
+ } else if (param.asInteger() == 0x02421405) {
+ if (_isMoveObjectRequested && sendMessage(_attachedSprite, 0x480C, _doDeltaX ? 1 : 0) != 0) {
+ stMoveObjectSkipTurn();
+ } else {
+ FinalizeState(&Klaymen::evMoveObjectTurnDone);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ }
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0460E2FA);
+ }
+ break;
+ case 0x480A:
+ _isMoveObjectRequested = true;
+ return 0;
+ }
+ return hmLowLevelAnimation(messageNum, param, sender);
+}
+
+void Klaymen::stMoveObjectSkipTurn() {
+ _isMoveObjectRequested = false;
+ _acceptInput = true;
+ startAnimationByHash(0x0C1CA072, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ SetMessageHandler(&Klaymen::hmMoveObjectTurn);
+}
+
+void Klaymen::stMoveObjectFaceObject() {
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ if (!stStartAction(AnimationCallback(&Klaymen::stMoveObjectFaceObject))) {
+ _busyStatus = 2;
+ _isMoveObjectRequested = false;
+ _acceptInput = true;
+ startAnimation(0x0C1CA072, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmMoveObjectTurn);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stUseLever() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stUseLever))) {
+ _busyStatus = 0;
+ if (_isLeverDown) {
+ stUseLeverRelease();
+ } else {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ startAnimation(0x0C303040, 0, -1);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ SetMessageHandler(&Klaymen::hmLever);
+ SetUpdateHandler(&Klaymen::update);
+ NextState(&Klaymen::stPullLeverDown);
+ _acceptInput = false;
+ }
+ }
+}
+
+// Exactly the same code as sub420DA0 which was removed
+void Klaymen::stPullLeverDown() {
+ startAnimation(0x0D318140, 0, -1);
+ sendMessage(_attachedSprite, 0x480F, 0);
+ NextState(&Klaymen::stHoldLeverDown);
+}
+
+void Klaymen::stHoldLeverDown() {
+ startAnimation(0x4464A440, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ _isLeverDown = true;
+ _acceptInput = true;
+}
+
+void Klaymen::stUseLeverRelease() {
+ startAnimation(0x09018068, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLever);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ sendMessage(_attachedSprite, 0x4807, 0);
+ NextState(&Klaymen::stPullLeverDown);
+ _acceptInput = false;
+}
+
+void Klaymen::stReleaseLever() {
+ if (_isLeverDown) {
+ _busyStatus = 2;
+ startAnimation(0x09018068, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLever);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ sendMessage(_attachedSprite, 0x4807, 0);
+ NextState(&Klaymen::stLetGoOfLever);
+ _acceptInput = false;
+ _isLeverDown = false;
+ } else {
+ gotoNextStateExt();
+ }
+}
+
+void Klaymen::stLetGoOfLever() {
+ startAnimation(0x0928C048, 0, -1);
+ FinalizeState(&Klaymen::evLeverReleasedEvent);
+}
+
+void Klaymen::evLeverReleasedEvent() {
+ sendMessage(_attachedSprite, 0x482A, 0);
+}
+
+void Klaymen::stInsertDisk() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stInsertDisk))) {
+ _busyStatus = 2;
+ _tapesToInsert = 0;
+ for (uint32 i = 0; i < 20; i++) {
+ if (getSubVar(VA_HAS_TAPE, i)) {
+ setSubVar(VA_IS_TAPE_INSERTED, i, 1);
+ setSubVar(VA_HAS_TAPE, i, 0);
+ _tapesToInsert++;
+ }
+ }
+ if (_tapesToInsert == 0) {
+ GotoState(NULL);
+ gotoNextStateExt();
+ } else {
+ startAnimation(0xD8C8D100, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmInsertDisk);
+ SetSpriteUpdate(&Klaymen::suAction);
+ _acceptInput = false;
+ _tapesToInsert--;
+ }
+ }
+}
+
+uint32 Klaymen::hmInsertDisk(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (_tapesToInsert == 0 && param.asInteger() == 0x06040580) {
+ nextAnimationByHash(0xD8C8D100, calcHash("GoToStartLoop/Finish"), 0);
+ } else if (_tapesToInsert != 0 && param.asInteger() == calcHash("GoToStartLoop/Finish")) {
+ _tapesToInsert--;
+ startAnimationByHash(0xD8C8D100, 0x01084280, 0);
+ } else if (param.asInteger() == 0x062A1510) {
+ playSound(0, 0x41688704);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x0A720138) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0xB613A180) {
+ playSound(0, 0x44051000);
+ } else if (param.asInteger() == 0x0E040501) {
+ playSound(1, 0xC6A129C1);
+ }
+ }
+ return messageResult;
+}
+
+void Klaymen::walkAlongPathPoints() {
+ if (_x <= (*_pathPoints)[0].x)
+ _y = (*_pathPoints)[0].y;
+ else if (_x >= (*_pathPoints)[_pathPoints->size() - 1].x)
+ _y = (*_pathPoints)[_pathPoints->size() - 1].y;
+ else {
+ int16 deltaX = _x - (*_pathPoints)[0].x, deltaXIncr = 0;
+ uint index = 0;
+ while (deltaX > 0) {
+ NPoint pt2 = (*_pathPoints)[index];
+ NPoint pt1 = index + 1 >= _pathPoints->size() ? (*_pathPoints)[0] : (*_pathPoints)[index + 1];
+ int16 xd = ABS(pt1.x - pt2.x);
+ int16 yd = ABS(pt1.y - pt2.y);
+ if (deltaX + deltaXIncr >= xd) {
+ deltaX -= xd;
+ deltaX += deltaXIncr;
+ ++index;
+ if (index >= _pathPoints->size())
+ index = 0;
+ _y = (*_pathPoints)[index].y;
+ } else {
+ deltaXIncr += deltaX;
+ if (pt1.y >= pt2.y) {
+ _y = pt2.y + (yd * deltaXIncr) / xd;
+ } else {
+ _y = pt2.y - (yd * deltaXIncr) / xd;
+ }
+ deltaX = 0;
+ }
+ }
+ }
+}
+
+void Klaymen::enterIdleAnimation(uint idleAnimation) {
+ switch (idleAnimation) {
+ case kIdlePickEar:
+ startIdleAnimation(0x5B20C814, AnimationCallback(&Klaymen::stIdlePickEar));
+ break;
+ case kIdleSpinHead:
+ startIdleAnimation(0xD122C137, AnimationCallback(&Klaymen::stIdleSpinHead));
+ break;
+ case kIdleArms:
+ startIdleAnimation(0x543CD054, AnimationCallback(&Klaymen::stIdleArms));
+ break;
+ case kIdleChest:
+ startIdleAnimation(0x40A0C034, AnimationCallback(&Klaymen::stIdleChest));
+ break;
+ case kIdleHeadOff:
+ startIdleAnimation(0x5120E137, AnimationCallback(&Klaymen::stIdleHeadOff));
+ break;
+ case kIdleTeleporterHands:
+ startIdleAnimation(0x90EF8D38, AnimationCallback(&Klaymen::stIdleTeleporterHands));
+ break;
+ case kIdleTeleporterHands2:
+ startIdleAnimation(0x900F0930, AnimationCallback(&Klaymen::stIdleTeleporterHands2));
+ break;
+ case kIdleWonderAbout:
+ stIdleWonderAbout();
+ break;
+ }
+}
+
+void Klaymen::stJumpToGrab() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimationByHash(0x00AB8C10, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suJumpToGrab);
+ SetMessageHandler(&Klaymen::hmJumpToGrab);
+}
+
+void Klaymen::suJumpToGrab() {
+ updateDeltaXY();
+ if (_y >= _destY) {
+ _y = _destY;
+ updateBounds();
+ gotoNextStateExt();
+ }
+}
+
+uint32 Klaymen::hmJumpToGrab(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x168050A0)
+ sendMessage(_attachedSprite, 0x4806, 0);
+ else if (param.asInteger() == 0x320AC306)
+ startAnimationByHash(0x00AB8C10, 0x01084280, 0);
+ else if (param.asInteger() == 0x4AB28209)
+ sendMessage(_attachedSprite, 0x482A, 0);
+ else if (param.asInteger() == 0x88001184)
+ sendMessage(_attachedSprite, 0x482B, 0);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stFinishGrow() {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x38445000, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(NULL);
+ SetMessageHandler(&Klaymen::hmFinishGrow);
+}
+
+uint32 Klaymen::hmFinishGrow(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x040C4C01)
+ playSound(0, 0x01E11140);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTurnToUseExt() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stTurnToUseExt))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x1B3D8216, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTurnToUse);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ }
+}
+
+void Klaymen::stJumpToGrabFall() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToGrabFall))) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x00AB8C10, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmJumpToGrab);
+ SetSpriteUpdate(&Klaymen::suJumpToGrab);
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+}
+
+void Klaymen::stJumpToGrabRelease() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimationByHash(0x00AB8C10, 0x320AC306, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmJumpToGrabRelease);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stReleaseRing);
+}
+
+uint32 Klaymen::hmJumpToGrabRelease(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x320AC306)
+ playSound(0, 0x5860C640);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stIdleTeleporterHands() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x90EF8D38, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stSitIdleTeleporterBlinkSecond);
+}
+
+void Klaymen::stIdleTeleporterHands2() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0x900F0930, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stSitIdleTeleporterBlinkSecond);
+}
+
+void Klaymen::teleporterAppear(uint32 fileHash) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(fileHash, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTeleporterAppearDisappear);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::teleporterDisappear(uint32 fileHash) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(fileHash, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTeleporterAppearDisappear);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmTeleporterAppearDisappear(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4E0A2C24) {
+ playSound(0, 0x85B10BB8);
+ } else if (param.asInteger() == 0x4E6A0CA0) {
+ playSound(0, 0xC5B709B0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmShrink(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x80C110B5)
+ sendMessage(_parentScene, 0x482A, 0);
+ else if (param.asInteger() == 0x33288344)
+ playSound(2, 0x10688664);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stShrink() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ playSound(0, 0x4C69EA53);
+ startAnimation(0x1AE88904, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmShrink);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+void Klaymen::stStandWonderAbout() {
+ if (_x > 260)
+ setDoDeltaX(1);
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0xD820A114, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ _newStickFrameIndex = 10;
+}
+
+uint32 Klaymen::hmDrinkPotion(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1008:
+ if (_potionFlag1) {
+ startAnimationByHash(0x1C388C04, 0x004A2148, 0);
+ messageResult = 0;
+ } else
+ _potionFlag2 = true;
+ break;
+ case 0x100D:
+ if (param.asInteger() == 0x0002418E)
+ sendMessage(_parentScene, 0x2000, 0);
+ else if (param.asInteger() == 0x924090C2) {
+ _potionFlag1 = true;
+ if (_potionFlag2) {
+ startAnimationByHash(0x1C388C04, 0x004A2148, 0);
+ messageResult = 0;
+ }
+ } else if (param.asInteger() == 0x004A2148)
+ _potionFlag1 = false;
+ else if (param.asInteger() == 0x02B20220)
+ playSound(0, 0xC5408620);
+ else if (param.asInteger() == 0x0A720138)
+ playSound(0, 0xD4C08010);
+ else if (param.asInteger() == 0x03020231)
+ playSound(0, 0xD4C08010);
+ else if (param.asInteger() == 0xB613A180)
+ playSound(0, 0x44051000);
+ else if (param.asInteger() == 0x67221A03)
+ playSound(0, 0x44051000);
+ else if (param.asInteger() == 0x038A010B)
+ playSound(0, 0x00018040);
+ else if (param.asInteger() == 0x422B0280)
+ playSound(0, 0x166FC6E0);
+ else if (param.asInteger() == 0x925A0C1E)
+ playSound(0, 0x40E5884D);
+ else if (param.asInteger() == 0x000F0082)
+ playSound(0, 0x546CDCC1);
+ else if (param.asInteger() == 0x00020814)
+ playSound(0, 0x786CC6D0);
+ else if (param.asInteger() == 0x06020500)
+ playSound(0, 0x1069C0E1);
+ else if (param.asInteger() == 0x02128C00)
+ playSound(0, 0x5068C4C3);
+ else if (param.asInteger() == 0x82022030)
+ playSound(0, 0x5C48C0E8);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmGrow(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x32180101)
+ playSound(0, 0x405002D8);
+ else if (param.asInteger() == 0x0A2A9098)
+ playSound(0, 0x0460E2FA);
+ else if (param.asInteger() == 0xD00A0C0C)
+ playSound(3);
+ else if (param.asInteger() == 0x04121920)
+ playSound(4);
+ else if (param.asInteger() == 0x030B4480)
+ playSound(5);
+ else if (param.asInteger() == 0x422B0280)
+ playSound(6);
+ else if (param.asInteger() == 0x038A010B)
+ playSound(7);
+ else if (param.asInteger() == 0x67221A03)
+ playSound(0, 0x44051000);
+ else if (param.asInteger() == 0x02B20220)
+ playSound(0, 0xC5408620);
+ else if (param.asInteger() == 0x925A0C1E)
+ playSound(0, 0x40E5884D);
+ else if (param.asInteger() == 0x03020231)
+ playSound(0, 0xD4C08010);
+ else if (param.asInteger() == 0x08040840)
+ setDoDeltaX(2);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stGrow() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x2838C010, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmGrow);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+void Klaymen::stDrinkPotion() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ _potionFlag1 = false;
+ _potionFlag2 = false;
+ startAnimation(0x1C388C04, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmDrinkPotion);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+uint32 Klaymen::hmInsertKey(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (_keysToInsert == 0 && param.asInteger() == 0x06040580) {
+ nextAnimationByHash(0xDC409440, 0x46431401, 0);
+ } else if (_keysToInsert != 0 && param.asInteger() == 0x46431401) {
+ _keysToInsert--;
+ startAnimationByHash(0xDC409440, 0x01084280, 0);
+ } else if (param.asInteger() == 0x062A1510) {
+ playSound(0, 0x41688704);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x0A720138) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0xB613A180) {
+ playSound(0, 0x44051000);
+ } else if (param.asInteger() == 0x0E4C8141) {
+ playSound(0, 0xDC4A1280);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stInsertKey() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stInsertKey))) {
+ _busyStatus = 2;
+ _keysToInsert = 0;
+ for (uint32 i = 0; i < 3; i++) {
+ if (getSubVar(VA_HAS_KEY, i)) {
+ bool more;
+ setSubVar(VA_IS_KEY_INSERTED, i, 1);
+ setSubVar(VA_HAS_KEY, i, 0);
+ do {
+ more = false;
+ setSubVar(VA_CURR_KEY_SLOT_NUMBERS, i, _vm->_rnd->getRandomNumber(16 - 1));
+ for (uint j = 0; j < i && !more; j++) {
+ if (getSubVar(VA_IS_KEY_INSERTED, j) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, j) == getSubVar(VA_CURR_KEY_SLOT_NUMBERS, i))
+ more = true;
+ }
+ if (getSubVar(VA_CURR_KEY_SLOT_NUMBERS, i) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, i))
+ more = true;
+ } while (more);
+ _keysToInsert++;
+ }
+ }
+ if (_keysToInsert == 0) {
+ GotoState(NULL);
+ gotoNextStateExt();
+ } else {
+ _acceptInput = false;
+ startAnimation(0xDC409440, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmInsertKey);
+ SetSpriteUpdate(&Klaymen::suAction);
+ _keysToInsert--;
+ }
+ }
+}
+
+uint32 Klaymen::hmReadNote(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x04684052) {
+ _acceptInput = true;
+ sendMessage(_parentScene, 0x2002, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stReadNote() {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x123E9C9F, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmReadNote);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+uint32 Klaymen::hmHitByDoor(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ int16 speedUpFrameIndex;
+ switch (messageNum) {
+ case 0x1008:
+ speedUpFrameIndex = getFrameIndex(kKlaymenSpeedUpHash);
+ if (_currFrameIndex < speedUpFrameIndex) {
+ startAnimation(0x35AA8059, speedUpFrameIndex, -1);
+ _y = 438;
+ }
+ messageResult = 0;
+ break;
+ case 0x100D:
+ if (param.asInteger() == 0x1A1A0785) {
+ playSound(0, 0x40F0A342);
+ } else if (param.asInteger() == 0x60428026) {
+ playSound(0, 0x40608A59);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stHitByDoor() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x35AA8059, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmHitByDoor);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ playSound(0, 0x402E82D4);
+}
+
+uint32 Klaymen::hmPeekWallReturn(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == calcHash("PopBalloon")) {
+ sendMessage(_parentScene, 0x2000, 0);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x0A720138) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0xB613A180) {
+ playSound(0, 0x44051000);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::upPeekWallBlink() {
+ Klaymen::update();
+ _blinkCounter++;
+ if (_blinkCounter >= _blinkCounterMax)
+ stPeekWallBlink();
+}
+
+void Klaymen::stPeekWall1() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0xAC20C012, 8, 37);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stPeekWallBlink);
+}
+
+void Klaymen::stPeekWall2() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0xAC20C012, 43, 49);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(NULL);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+}
+
+void Klaymen::stPeekWallBlink() {
+ _blinkCounter = 0;
+ _busyStatus = 0;
+ _acceptInput = true;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64) + 24;
+ startAnimation(0xAC20C012, 38, 42);
+ SetUpdateHandler(&Klaymen::upPeekWallBlink);
+ SetSpriteUpdate(NULL);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ _newStickFrameIndex = 42;
+}
+
+void Klaymen::stPeekWallReturn() {
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x2426932E, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPeekWallReturn);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stPullHammerLever() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stPullHammerLever))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x00648953, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPullHammerLever);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ }
+}
+
+uint32 Klaymen::hmPullHammerLever(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLever(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4AB28209)
+ sendMessage(_attachedSprite, 0x480F, 0);
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::suRidePlatformDown() {
+ _platformDeltaY++;
+ _y += _platformDeltaY;
+ if (_y > 600)
+ sendMessage(this, 0x1019, 0);
+}
+
+void Klaymen::stRidePlatformDown() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stRidePlatformDown))) {
+ _busyStatus = 1;
+ sendMessage(_parentScene, 0x4803, 0);
+ _acceptInput = false;
+ _platformDeltaY = 0;
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suRidePlatformDown);
+ _vm->_soundMan->playSoundLooping(0xD3B02847);
+ }
+}
+
+void Klaymen::stCrashDown() {
+ playSound(0, 0x41648271);
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimationByHash(0x000BAB02, 0x88003000, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(NULL);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ NextState(&Klaymen::stCrashDownFinished);
+}
+
+void Klaymen::stCrashDownFinished() {
+ setDoDeltaX(2);
+ stTryStandIdle();
+}
+
+void Klaymen::upSpitOutFall() {
+ Klaymen::update();
+ if (_spitOutCountdown != 0 && (--_spitOutCountdown == 0)) {
+ _surface->setVisible(true);
+ SetUpdateHandler(&Klaymen::update);
+ }
+}
+
+uint32 Klaymen::hmJumpToRingVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x168050A0) {
+ sendMessage(_attachedSprite, 0x480F, 0);
+ } else if (param.asInteger() == 0x586B0300) {
+ sendMessage(_otherSprite, 0x480E, 1);
+ } else if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmStandIdleSpecial(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x4811:
+ playSound(0, 0x5252A0E4);
+ setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+ if (_doDeltaX) {
+ _x = ((Sprite*)sender)->getX() - 75;
+ } else {
+ _x = ((Sprite*)sender)->getX() + 75;
+ }
+ _y = ((Sprite*)sender)->getY() - 200;
+ if (param.asInteger() == 0) {
+ stSpitOutFall0();
+ } else if (param.asInteger() == 1) {
+ // NOTE This is never used and the code was removed
+ // Also the animations used here in the original don't exist...
+ } else if (param.asInteger() == 2) {
+ stSpitOutFall2();
+ }
+ break;
+ }
+ return 0;
+}
+
+uint32 Klaymen::hmPressDoorButton(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x942D2081) {
+ _acceptInput = false;
+ sendMessage(_attachedSprite, 0x2003, 0);
+ } else if (param.asInteger() == 0xDA600012) {
+ stHitByBoxingGlove();
+ } else if (param.asInteger() == 0x0D01B294) {
+ _acceptInput = false;
+ sendMessage(_attachedSprite, 0x480B, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmMoveVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x01084280) {
+ sendMessage(_attachedSprite, 0x480B, (uint32)_doDeltaX);
+ } else if (param.asInteger() == 0x02421405) {
+ if (_isMoveObjectRequested) {
+ if (sendMessage(_attachedSprite, 0x480C, (uint32)_doDeltaX) != 0)
+ stContinueMovingVenusFlyTrap();
+ } else {
+ SetMessageHandler(&Klaymen::hmFirstMoveVenusFlyTrap);
+ }
+ } else if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0460E2FA);
+ }
+ break;
+ case 0x480A:
+ _isMoveObjectRequested = true;
+ return 0;
+ }
+ return hmLowLevelAnimation(messageNum, param, sender);
+}
+
+uint32 Klaymen::hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_attachedSprite, 0x482A, 0);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_attachedSprite, 0x482B, 0);
+ } else if (param.asInteger() == 0x32180101) {
+ playSound(0, 0x405002D8);
+ } else if (param.asInteger() == 0x0A2A9098) {
+ playSound(0, 0x0460E2FA);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmHitByBoxingGlove(int messageNum, const MessageParam &param, Entity *sender) {
+ int16 speedUpFrameIndex;
+ uint32 messageResult = hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1008:
+ speedUpFrameIndex = getFrameIndex(kKlaymenSpeedUpHash);
+ if (_currFrameIndex < speedUpFrameIndex) {
+ startAnimation(0x35AA8059, speedUpFrameIndex, -1);
+ _y = 435;
+ }
+ messageResult = 0;
+ break;
+ case 0x100D:
+ if (param.asInteger() == 0x1A1A0785) {
+ playSound(0, 0x40F0A342);
+ } else if (param.asInteger() == 0x60428026) {
+ playSound(0, 0x40608A59);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Klaymen::hmJumpAndFall(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmLowLevel(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x1307050A) {
+ playSound(0, 0x40428A09);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::suFallDown() {
+ AnimatedSprite::updateDeltaXY();
+ HitRect *hitRect = _parentScene->findHitRectAtPos(_x, _y + 10);
+ if (hitRect->type == 0x5001) {
+ _y = hitRect->rect.y1;
+ updateBounds();
+ sendMessage(this, 0x1019, 0);
+ }
+ _parentScene->checkCollision(this, 0xFFFF, 0x4810, 0);
+}
+
+void Klaymen::stJumpToRingVenusFlyTrap() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpToRingVenusFlyTrap))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x584984B4, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmJumpToRingVenusFlyTrap);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ NextState(&Klaymen::stLandOnFeet);
+ sendMessage(_attachedSprite, 0x482B, 0);
+ }
+}
+
+void Klaymen::stStandIdleSpecial() {
+ playSound(0, 0x56548280);
+ _busyStatus = 0;
+ _acceptInput = false;
+ _surface->setVisible(false);
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmStandIdleSpecial);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stSpitOutFall0() {
+ _spitOutCountdown = 1;
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x000BAB02, 0, -1);
+ SetUpdateHandler(&Klaymen::upSpitOutFall);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suFallDown);
+ NextState(&Klaymen::stFalling);
+ sendMessage(_parentScene, 0x8000, 0);
+}
+
+void Klaymen::stSpitOutFall2() {
+ _spitOutCountdown = 1;
+ _busyStatus = 0;
+ _acceptInput = false;
+ startAnimation(0x9308C132, 0, -1);
+ SetUpdateHandler(&Klaymen::upSpitOutFall);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(&Klaymen::suFallDown);
+ NextState(&Klaymen::stFalling);
+ sendMessage(_parentScene, 0x8000, 0);
+}
+
+void Klaymen::stFalling() {
+ sendMessage(_parentScene, 0x1024, 1);
+ playSound(0, 0x41648271);
+ _busyStatus = 1;
+ _acceptInput = false;
+ _isWalking = false;
+ startAnimationByHash(0x000BAB02, 0x88003000, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(NULL);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ NextState(&Klaymen::stFallTouchdown);
+ sendMessage(_parentScene, 0x2002, 0);
+ _attachedSprite = NULL;
+ sendMessage(_parentScene, 0x8001, 0);
+}
+
+void Klaymen::stFallTouchdown() {
+ setDoDeltaX(2);
+ stTryStandIdle();
+}
+
+void Klaymen::stJumpAndFall() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stJumpAndFall))) {
+ sendMessage(_parentScene, 0x1024, 3);
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0xB93AB151, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmJumpAndFall);
+ SetSpriteUpdate(&Klaymen::suFallDown);
+ NextState(&Klaymen::stLandOnFeet);
+ }
+}
+
+void Klaymen::stDropFromRing() {
+ if (_attachedSprite) {
+ _x = _attachedSprite->getX();
+ sendMessage(_attachedSprite, 0x4807, 0);
+ _attachedSprite = NULL;
+ }
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimation(0x586984B1, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suFallDown);
+ NextState(&Klaymen::stLandOnFeet);
+}
+
+void Klaymen::stPressDoorButton() {
+ _busyStatus = 2;
+ _acceptInput = true;
+ setDoDeltaX(0);
+ startAnimation(0x1CD89029, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmPressDoorButton);
+ SetSpriteUpdate(&Klaymen::suAction);
+}
+
+void Klaymen::stHitByBoxingGlove() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x35AA8059, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmHitByBoxingGlove);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ FinalizeState(&Klaymen::evHitByBoxingGloveDone);
+}
+
+void Klaymen::evHitByBoxingGloveDone() {
+ sendMessage(_parentScene, 0x1024, 1);
+}
+
+void Klaymen::stMoveVenusFlyTrap() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stMoveVenusFlyTrap))) {
+ _busyStatus = 2;
+ _isMoveObjectRequested = false;
+ _acceptInput = true;
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ startAnimation(0x5C01A870, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmMoveVenusFlyTrap);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ FinalizeState(&Klaymen::evMoveVenusFlyTrapDone);
+ }
+}
+
+void Klaymen::stContinueMovingVenusFlyTrap() {
+ _isMoveObjectRequested = false;
+ _acceptInput = true;
+ startAnimationByHash(0x5C01A870, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmMoveVenusFlyTrap);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ FinalizeState(&Klaymen::evMoveVenusFlyTrapDone);
+}
+
+void Klaymen::evMoveVenusFlyTrapDone() {
+ sendMessage(_attachedSprite, 0x482A, 0);
+}
+
+void Klaymen::suFallSkipJump() {
+ updateDeltaXY();
+ HitRect *hitRect = _parentScene->findHitRectAtPos(_x, _y + 10);
+ if (hitRect->type == 0x5001) {
+ _y = hitRect->rect.y1;
+ updateBounds();
+ sendMessage(this, 0x1019, 0);
+ }
+}
+
+void Klaymen::stFallSkipJump() {
+ _busyStatus = 2;
+ _acceptInput = false;
+ startAnimationByHash(0xB93AB151, 0x40A100F8, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suFallSkipJump);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ NextState(&Klaymen::stLandOnFeet);
+}
+
+void Klaymen::upMoveObject() {
+ if (_x >= 380)
+ gotoNextStateExt();
+ Klaymen::update();
+}
+
+uint32 Klaymen::hmMatch(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x51281850) {
+ setGlobalVar(V_TNT_DUMMY_FUSE_LIT, 1);
+ } else if (param.asInteger() == 0x43000538) {
+ playSound(0, 0x21043059);
+ } else if (param.asInteger() == 0x02B20220) {
+ playSound(0, 0xC5408620);
+ } else if (param.asInteger() == 0x0A720138) {
+ playSound(0, 0xD4C08010);
+ } else if (param.asInteger() == 0xB613A180) {
+ playSound(0, 0x44051000);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stFetchMatch() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stFetchMatch))) {
+ _busyStatus = 0;
+ _acceptInput = false;
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ startAnimation(0x9CAA0218, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmMatch);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stLightMatch);
+ }
+}
+
+void Klaymen::stLightMatch() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ setDoDeltaX(_attachedSprite->getX() < _x ? 1 : 0);
+ startAnimation(0x1222A513, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmMatch);
+ SetSpriteUpdate(NULL);
+}
+
+uint32 Klaymen::hmMoveObject(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x01084280) {
+ playSound(0, 0x405002D8);
+ sendMessage(_attachedSprite, 0x480B, 0);
+ } else if (param.asInteger() == 0x02421405) {
+ if (_moveObjectCountdown != 0) {
+ _moveObjectCountdown--;
+ stContinueMoveObject();
+ } else {
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ }
+ }
+ break;
+ }
+ return Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+}
+
+uint32 Klaymen::hmTumbleHeadless(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x000F0082) {
+ playSound(0, 0x74E2810F);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stMoveObject() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stMoveObject))) {
+ _busyStatus = 2;
+ _acceptInput = false;
+ _moveObjectCountdown = 8;
+ setDoDeltaX(0);
+ startAnimation(0x0C1CA072, 0, -1);
+ SetUpdateHandler(&Klaymen::upMoveObject);
+ SetMessageHandler(&Klaymen::hmMoveObject);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ }
+}
+
+void Klaymen::stContinueMoveObject() {
+ _acceptInput = false;
+ startAnimationByHash(0x0C1CA072, 0x01084280, 0);
+ SetUpdateHandler(&Klaymen::upMoveObject);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ SetMessageHandler(&Klaymen::hmMoveObject);
+}
+
+void Klaymen::stTumbleHeadless() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stTumbleHeadless))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ setDoDeltaX(0);
+ startAnimation(0x2821C590, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmTumbleHeadless);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ NextState(&Klaymen::stTryStandIdle);
+ sendMessage(_parentScene, 0x8000, 0);
+ playSound(0, 0x62E0A356);
+ }
+}
+
+void Klaymen::stCloseEyes() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stCloseEyes))) {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+uint32 Klaymen::hmSpit(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Klaymen::hmLowLevelAnimation(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x16401CA6) {
+ _canSpitPipe = true;
+ if (_contSpitPipe)
+ spitIntoPipe();
+ } else if (param.asInteger() == 0xC11C0008) {
+ _canSpitPipe = false;
+ _acceptInput = false;
+ _readyToSpit = false;
+ } else if (param.asInteger() == 0x018A0001) {
+ sendMessage(_parentScene, 0x2001, _spitDestPipeIndex);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Klaymen::stTrySpitIntoPipe() {
+ if (_readyToSpit) {
+ _contSpitPipe = true;
+ _spitContDestPipeIndex = _spitPipeIndex;
+ if (_canSpitPipe)
+ spitIntoPipe();
+ } else if (!stStartAction(AnimationCallback(&Klaymen::stTrySpitIntoPipe))) {
+ _busyStatus = 2;
+ _acceptInput = true;
+ _spitDestPipeIndex = _spitPipeIndex;
+ _readyToSpit = true;
+ _canSpitPipe = false;
+ _contSpitPipe = false;
+ startAnimation(0x1808B150, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSpit);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void Klaymen::spitIntoPipe() {
+ _contSpitPipe = false;
+ _spitDestPipeIndex = _spitContDestPipeIndex;
+ _canSpitPipe = false;
+ _acceptInput = false;
+ startAnimation(0x1B08B553, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSpit);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stContSpitIntoPipe);
+}
+
+void Klaymen::stContSpitIntoPipe() {
+ _canSpitPipe = true;
+ _acceptInput = true;
+ startAnimationByHash(0x1808B150, 0x16401CA6, 0);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmSpit);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::suRidePlatform() {
+ _x = _attachedSprite->getX() - 20;
+ _y = _attachedSprite->getY() + 46;
+ updateBounds();
+}
+
+void Klaymen::stRidePlatform() {
+ if (!stStartActionFromIdle(AnimationCallback(&Klaymen::stRidePlatform))) {
+ _busyStatus = 1;
+ _acceptInput = true;
+ startAnimation(0x5420E254, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suRidePlatform);
+ }
+}
+
+void Klaymen::stInteractLever() {
+ if (!stStartAction(AnimationCallback(&Klaymen::stInteractLever))) {
+ _busyStatus = 0;
+ if (_isLeverDown) {
+ stUseLeverRelease();
+ } else {
+ _acceptInput = false;
+ startAnimation(0x0C303040, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLever);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ NextState(&Klaymen::stPullLever);
+ }
+ }
+}
+
+void Klaymen::stPullLever() {
+ startAnimation(0x0D318140, 0, -1);
+ NextState(&Klaymen::stLookLeverDown);
+ sendMessage(_attachedSprite, 0x480F, 0);
+}
+
+void Klaymen::stLookLeverDown() {
+ _acceptInput = true;
+ _isLeverDown = true;
+ startAnimation(0x1564A2C0, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+ NextState(&Klaymen::stWaitLeverDown);
+}
+
+void Klaymen::stWaitLeverDown() {
+ _acceptInput = true;
+ _isLeverDown = true;
+ startAnimation(0x4464A440, 0, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(&Klaymen::suUpdateDestX);
+}
+
+void Klaymen::stStartWalkingResume() {
+ int16 frameIndex = getGlobalVar(V_KLAYMEN_FRAMEINDEX) + _walkResumeFrameIncr;
+ if (frameIndex < 0 || frameIndex > 13)
+ frameIndex = 0;
+ _busyStatus = 0;
+ _isWalking = true;
+ _acceptInput = true;
+ startAnimation(0x1A249001, frameIndex, -1);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmWalking);
+ SetSpriteUpdate(&Klaymen::suWalkingFirst);
+ NextState(&Klaymen::stUpdateWalkingFirst);
+ FinalizeState(&Klaymen::evStartWalkingDone);
+}
+
+void Klaymen::upPeekInsideBlink() {
+ update();
+ ++_blinkCounter;
+ if (_blinkCounter >= _blinkCounterMax)
+ stPeekInsideBlink();
+}
+
+void Klaymen::stPeekInside() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0xAC20C012, 8, 37);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&Klaymen::stPeekInsideBlink);
+}
+
+void Klaymen::stPeekInsideReturn() {
+ _busyStatus = 1;
+ _acceptInput = false;
+ startAnimation(0xAC20C012, 43, 49);
+ SetUpdateHandler(&Klaymen::update);
+ SetMessageHandler(&Klaymen::hmLowLevelAnimation);
+ SetSpriteUpdate(NULL);
+}
+
+void Klaymen::stPeekInsideBlink() {
+ _busyStatus = 0;
+ _acceptInput = true;
+ startAnimation(0xAC20C012, 38, 42);
+ _newStickFrameIndex = 42;
+ SetUpdateHandler(&Klaymen::upPeekInsideBlink);
+ SetMessageHandler(&Klaymen::hmLowLevel);
+ SetSpriteUpdate(NULL);
+ _blinkCounter = 0;
+ _blinkCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+}
+
+// KmScene1001
+
+KmScene1001::KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+}
+
+uint32 KmScene1001::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stSleeping);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stPullHammerLever);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4836:
+ if (param.asInteger() == 1) {
+ sendMessage(_parentScene, 0x2002, 0);
+ GotoState(&Klaymen::stWakeUp);
+ }
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+// KmScene1002
+
+KmScene1002::KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ setKlaymenIdleTable1();
+}
+
+void KmScene1002::xUpdate() {
+ if (_x >= 250 && _x <= 435 && _y >= 420) {
+ if (_idleTableNum == 0) {
+ setKlaymenIdleTable(klaymenIdleTable1002, ARRAYSIZE(klaymenIdleTable1002));
+ _idleTableNum = 1;
+ }
+ } else if (_idleTableNum == 1) {
+ setKlaymenIdleTable1();
+ _idleTableNum = 0;
+ }
+}
+
+uint32 KmScene1002::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x2001:
+ GotoState(&Klaymen::stStandIdleSpecial);
+ break;
+ case 0x2007:
+ _otherSprite = (Sprite*)param.asEntity();
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4803:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stJumpAndFall);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stDropFromRing);
+ break;
+ case 0x4804:
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4805:
+ switch (param.asInteger()) {
+ case 1:
+ GotoState(&Klaymen::stJumpToRing1);
+ break;
+ case 2:
+ GotoState(&Klaymen::stJumpToRing2);
+ break;
+ case 3:
+ GotoState(&Klaymen::stJumpToRing3);
+ break;
+ case 4:
+ GotoState(&Klaymen::stJumpToRing4);
+ break;
+ }
+ break;
+ case 0x480A:
+ GotoState(&Klaymen::stMoveVenusFlyTrap);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stJumpToRingVenusFlyTrap);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressDoorButton);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ startWalkToAttachedSpriteXDistance(param.asInteger());
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2005, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2005, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2005, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2006, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+// KmScene1004
+
+KmScene1004::KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _dataResource.load(0x01900A04);
+}
+
+uint32 KmScene1004::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReadNote);
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2000, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2001, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x4824:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = _dataResource.getPoint(param.asInteger()).y;
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4825:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = _dataResource.getPoint(param.asInteger()).y;
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4828:
+ GotoState(&Klaymen::stTurnToBackToUse);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene1109::KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1109::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stWalkingFirst);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0x2C2A4A1C);
+ break;
+ case 0x483E:
+ teleporterDisappear(0x3C2E4245);
+ break;
+ }
+ return messageResult;
+}
+
+// KmScene1201
+
+KmScene1201::KmScene1201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ setKlaymenIdleTable(klaymenIdleTable4, ARRAYSIZE(klaymenIdleTable4));
+ _doYHitIncr = true;
+}
+
+uint32 KmScene1201::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ GotoState(&Klaymen::stMoveObject);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4813:
+ GotoState(&Klaymen::stFetchMatch);
+ break;
+ case 0x4814:
+ GotoState(&Klaymen::stTumbleHeadless);
+ break;
+ case 0x4815:
+ GotoState(&Klaymen::stCloseEyes);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene1303::KmScene1303(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1303::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4804:
+ GotoState(&Klaymen::stPeekWall1);
+ break;
+ case 0x483B:
+ GotoState(&Klaymen::stPeekWallReturn);
+ break;
+ case 0x483C:
+ GotoState(&Klaymen::stPeekWall2);
+ break;
+ }
+ return 0;
+}
+
+KmScene1304::KmScene1304(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1304::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene1305::KmScene1305(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1305::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ GotoState(&Klaymen::stCrashDown);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ }
+ return 0;
+}
+
+KmScene1306::KmScene1306(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1306::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481A:
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ else
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ else
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0xEE084A04);
+ break;
+ case 0x483E:
+ teleporterDisappear(0xB86A4274);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+KmScene1308::KmScene1308(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1308::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject);
+ else
+ GotoState(&Klaymen::stMoveObjectFaceObject);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stUseLever);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stInsertKey);
+ else
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x4827:
+ GotoState(&Klaymen::stReleaseLever);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+// KmScene1401
+
+KmScene1401::KmScene1401(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1401::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject);
+ else
+ GotoState(&Klaymen::stMoveObjectFaceObject);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ }
+ return 0;
+}
+
+// KmScene1402
+
+KmScene1402::KmScene1402(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ SetFilterY(&Sprite::defFilterY);
+}
+
+uint32 KmScene1402::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject);
+ else
+ GotoState(&Klaymen::stMoveObjectFaceObject);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ }
+ return 0;
+}
+
+// KmScene1403
+
+KmScene1403::KmScene1403(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ setKlaymenIdleTable(klaymenIdleTable4, ARRAYSIZE(klaymenIdleTable4));
+}
+
+uint32 KmScene1403::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject);
+ else
+ GotoState(&Klaymen::stMoveObjectFaceObject);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stUseLever);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x4827:
+ GotoState(&Klaymen::stReleaseLever);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+// KmScene1404
+
+KmScene1404::KmScene1404(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1404::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480A:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stMoveObjectSkipTurnFaceObject);
+ else
+ GotoState(&Klaymen::stMoveObjectFaceObject);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481A:
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene1608::KmScene1608(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1608::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2032:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2032, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2032, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+// KmScene1705
+
+KmScene1705::KmScene1705(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1705::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4803:
+ GotoState(&Klaymen::stFallSkipJump);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter) {
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ }
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0x5E0A4905);
+ break;
+ case 0x483E:
+ teleporterDisappear(0xD86E4477);
+ break;
+ }
+ return messageResult;
+}
+
+KmScene1901::KmScene1901(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene1901::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2001::KmScene2001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2001::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stWalkingFirst);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0xBE68CC54);
+ break;
+ case 0x483E:
+ teleporterDisappear(0x18AB4ED4);
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2101::KmScene2101(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2101::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4811:
+ GotoState(&Klaymen::stHitByDoor);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0xFF290E30);
+ break;
+ case 0x483E:
+ teleporterDisappear(0x9A28CA1C);
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2201::KmScene2201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _surface->setClipRects(clipRects, clipRectsCount);
+ _dataResource.load(0x04104242);
+}
+
+uint32 KmScene2201::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2203::KmScene2203(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2203::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x4819:
+ GotoState(&Klaymen::stClayDoorOpen);
+ break;
+ case 0x481A:
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2205::KmScene2205(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+void KmScene2205::xUpdate() {
+ setGlobalVar(V_KLAYMEN_FRAMEINDEX, _currFrameIndex);
+}
+
+uint32 KmScene2205::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stStartWalkingResume);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2206::KmScene2206(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _walkResumeFrameIncr = 1;
+ _vm->_soundMan->addSound(0x80101800, 0xD3B02847);
+}
+
+KmScene2206::~KmScene2206() {
+ _vm->_soundMan->deleteSoundGroup(0x80101800);
+}
+
+void KmScene2206::xUpdate() {
+ setGlobalVar(V_KLAYMEN_FRAMEINDEX, _currFrameIndex);
+}
+
+uint32 KmScene2206::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4803:
+ GotoState(&Klaymen::stRidePlatformDown);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stStartWalkingResume);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2207::KmScene2207(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2207::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x2001:
+ GotoState(&Klaymen::stRidePlatform);
+ break;
+ case 0x2005:
+ suRidePlatform();
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stInteractLever);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x4827:
+ GotoState(&Klaymen::stReleaseLever);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+KmScene2242::KmScene2242(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+void KmScene2242::xUpdate() {
+ setGlobalVar(V_KLAYMEN_FRAMEINDEX, _currFrameIndex);
+}
+
+uint32 KmScene2242::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stStartWalkingResume);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmHallOfRecords::KmHallOfRecords(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+ // Empty
+}
+
+void KmHallOfRecords::xUpdate() {
+ setGlobalVar(V_KLAYMEN_FRAMEINDEX, _currFrameIndex);
+}
+
+uint32 KmHallOfRecords::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stStartWalkingResume);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmScene2247::KmScene2247(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+void KmScene2247::xUpdate() {
+ setGlobalVar(V_KLAYMEN_FRAMEINDEX, _currFrameIndex);
+}
+
+uint32 KmScene2247::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stStartWalkingResume);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmScene2401::KmScene2401(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2401::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x4832:
+ GotoState(&Klaymen::stUseTube);
+ break;
+ case 0x4833:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAbout);
+ else {
+ _spitPipeIndex = sendMessage(_parentScene, 0x2000, 0);
+ GotoState(&Klaymen::stTrySpitIntoPipe);
+ }
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2402::KmScene2402(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2402::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (!getGlobalVar(V_TV_JOKE_TOLD))
+ GotoState(&Klaymen::stStandWonderAbout);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stWalkingFirst);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2403::KmScene2403(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2403::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stPullCord);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPressButton);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPressFloorButton);
+ else
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2000, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2001, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2406::KmScene2406(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _surface->setClipRects(clipRects, clipRectsCount);
+}
+
+uint32 KmScene2406::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ if (param.asInteger() != 0) {
+ _destX = param.asInteger();
+ GotoState(&Klaymen::stWalkingFirst);
+ } else
+ GotoState(&Klaymen::stPeekWall);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481A:
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2000, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2001, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2501::KmScene2501(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2501::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2732::KmScene2732(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2732::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4804:
+ GotoState(&Klaymen::stPeekInside);
+ break;
+ case 0x483C:
+ GotoState(&Klaymen::stPeekInsideReturn);
+ break;
+ }
+ return 0;
+}
+
+KmScene2801::KmScene2801(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2801::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmScene2803::KmScene2803(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _surface->setClipRects(clipRects, clipRectsCount);
+ _dataResource.load(0x00900849);
+}
+
+uint32 KmScene2803::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4803:
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stJumpToGrab);
+ break;
+ case 0x4804:
+ if (param.asInteger() == 3)
+ GotoState(&Klaymen::stFinishGrow);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stPullCord);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else
+ GotoState(&Klaymen::stWonderAboutHalf);
+ break;
+ case 0x482E:
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4838:
+ GotoState(&Klaymen::stJumpToGrabRelease);
+ break;
+ }
+ return 0;
+}
+
+KmScene2803Small::KmScene2803Small(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _dataResource.load(0x81120132);
+}
+
+uint32 KmScene2803Small::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToXSmall(param.asPoint().x);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stStandIdleSmall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToXSmall(_dataResource.getPoint(param.asInteger()).x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfterSmall);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalfSmall);
+ else
+ GotoState(&Klaymen::stWonderAboutSmall);
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStepSmall);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stWalkToFront2Small);
+ else
+ GotoState(&Klaymen::stWalkToFrontSmall);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToBackHalfSmall);
+ else if (param.asInteger() == 2)
+ GotoState(&Klaymen::stTurnToBackWalkSmall);
+ else
+ GotoState(&Klaymen::stTurnToBackSmall);
+ break;
+ case 0x4830:
+ GotoState(&Klaymen::stShrink);
+ break;
+ }
+ return 0;
+}
+
+KmScene2805::KmScene2805(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2805::xHandleMessage(int messageNum, const MessageParam &param) {
+ uint32 messageResult = 0;
+ switch (messageNum) {
+ case 0x2000:
+ _isSittingInTeleporter = param.asInteger() != 0;
+ messageResult = 1;
+ break;
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stSitIdleTeleporter);
+ else
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481D:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stTurnToUseInTeleporter);
+ break;
+ case 0x481E:
+ if (_isSittingInTeleporter)
+ GotoState(&Klaymen::stReturnFromUseInTeleporter);
+ break;
+ case 0x4834:
+ GotoState(&Klaymen::stStepOver);
+ break;
+ case 0x4835:
+ sendMessage(_parentScene, 0x2000, 1);
+ _isSittingInTeleporter = true;
+ GotoState(&Klaymen::stSitInTeleporter);
+ break;
+ case 0x4836:
+ sendMessage(_parentScene, 0x2000, 0);
+ _isSittingInTeleporter = false;
+ GotoState(&Klaymen::stGetUpFromTeleporter);
+ break;
+ case 0x483D:
+ teleporterAppear(0xDE284B74);
+ break;
+ case 0x483E:
+ teleporterDisappear(0xD82A4094);
+ break;
+ }
+ return messageResult;
+}
+
+KmScene2806::KmScene2806(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y,
+ bool needsLargeSurface, NRect *clipRects, uint clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ if (needsLargeSurface) {
+ NDimensions dimensions = _animResource.loadSpriteDimensions(0x2838C010);
+ delete _surface;
+ createSurface(1000, dimensions.width, dimensions.height);
+ loadSound(3, 0x58E0C341);
+ loadSound(4, 0x40A00342);
+ loadSound(5, 0xD0A1C348);
+ loadSound(6, 0x166FC6E0);
+ loadSound(7, 0x00018040);
+ }
+
+ _dataResource.load(0x98182003);
+ _surface->setClipRects(clipRects, clipRectsCount);
+}
+
+uint32 KmScene2806::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ startWalkToX(440, true);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stPullCord);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x4831:
+ GotoState(&Klaymen::stGrow);
+ break;
+ case 0x4832:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stDrinkPotion);
+ else
+ GotoState(&Klaymen::stUseTube);
+ break;
+ }
+ return 0;
+}
+
+KmScene2809::KmScene2809(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y,
+ bool needsLargeSurface, NRect *clipRects, uint clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ if (needsLargeSurface) {
+ NDimensions dimensions = _animResource.loadSpriteDimensions(0x2838C010);
+ delete _surface;
+ createSurface(1000, dimensions.width, dimensions.height);
+ loadSound(3, 0x58E0C341);
+ loadSound(4, 0x40A00342);
+ loadSound(5, 0xD0A1C348);
+ loadSound(6, 0x166FC6E0);
+ loadSound(7, 0x00018040);
+ }
+
+ _dataResource.load(0x1830009A);
+ _surface->setClipRects(clipRects, clipRectsCount);
+}
+
+uint32 KmScene2809::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4804:
+ startWalkToX(226, true);
+ break;
+ case 0x480D:
+ GotoState(&Klaymen::stPullCord);
+ break;
+ case 0x4816:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stPressButtonSide);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x4831:
+ GotoState(&Klaymen::stGrow);
+ break;
+ case 0x4832:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stDrinkPotion);
+ else
+ GotoState(&Klaymen::stUseTube);
+ break;
+ }
+ return 0;
+}
+
+KmScene2810Small::KmScene2810Small(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2810Small::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToXSmall(param.asPoint().x);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stStandIdleSmall);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToXSmall(_dataResource.getPoint(param.asInteger()).x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfterSmall);
+ else if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalfSmall);
+ else
+ GotoState(&Klaymen::stWonderAboutSmall);
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStepSmall);
+ else
+ GotoState(&Klaymen::stWalkToFrontSmall);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToBackHalfSmall);
+ else
+ GotoState(&Klaymen::stTurnToBackSmall);
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmScene2810::KmScene2810(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, uint clipRectsCount)
+ : Klaymen(vm, parentScene, x, y) {
+
+ _surface->setClipRects(clipRects, clipRectsCount);
+}
+
+uint32 KmScene2810::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4803:
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stJumpToGrab);
+ break;
+ case 0x4804:
+ if (param.asInteger() == 3)
+ GotoState(&Klaymen::stFinishGrow);
+ break;
+ case 0x4812:
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x4818:
+ startWalkToX(_dataResource.getPoint(param.asInteger()).x, false);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481F:
+ if (param.asInteger() == 0)
+ GotoState(&Klaymen::stWonderAboutHalf);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWonderAboutAfter);
+ else if (param.asInteger() == 3)
+ GotoState(&Klaymen::stTurnToUseHalf);
+ else if (param.asInteger() == 4)
+ GotoState(&Klaymen::stTurnAwayFromUse);
+ else if (param.asInteger() == 5)
+ GotoState(&Klaymen::stTurnToUseExt);
+ else
+ GotoState(&Klaymen::stWonderAbout);
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2000, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2001, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x4824:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = _dataResource.getPoint(param.asInteger()).y;
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4825:
+ sendMessage(_parentScene, 0x2000, 0);
+ _destY = _dataResource.getPoint(param.asInteger()).y;
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x4837:
+ stopWalking();
+ break;
+ }
+ return 0;
+}
+
+KmScene2812::KmScene2812(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : Klaymen(vm, parentScene, x, y) {
+
+ // Empty
+}
+
+uint32 KmScene2812::xHandleMessage(int messageNum, const MessageParam &param) {
+ switch (messageNum) {
+ case 0x4001:
+ case 0x4800:
+ startWalkToX(param.asPoint().x, false);
+ break;
+ case 0x4004:
+ GotoState(&Klaymen::stTryStandIdle);
+ break;
+ case 0x4805:
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stJumpToGrabFall);
+ break;
+ case 0x4812:
+ if (param.asInteger() == 2)
+ GotoState(&Klaymen::stPickUpNeedle);
+ else if (param.asInteger() == 1)
+ GotoState(&Klaymen::stPickUpTube);
+ else
+ GotoState(&Klaymen::stPickUpGeneric);
+ break;
+ case 0x4817:
+ setDoDeltaX(param.asInteger());
+ gotoNextStateExt();
+ break;
+ case 0x481A:
+ GotoState(&Klaymen::stInsertDisk);
+ break;
+ case 0x481B:
+ if (param.asPoint().y != 0)
+ startWalkToXDistance(param.asPoint().y, param.asPoint().x);
+ else
+ startWalkToAttachedSpriteXDistance(param.asPoint().x);
+ break;
+ case 0x481D:
+ GotoState(&Klaymen::stTurnToUse);
+ break;
+ case 0x481E:
+ GotoState(&Klaymen::stReturnFromUse);
+ break;
+ case 0x4820:
+ sendMessage(_parentScene, 0x2001, 0);
+ GotoState(&Klaymen::stContinueClimbLadderUp);
+ break;
+ case 0x4821:
+ sendMessage(_parentScene, 0x2001, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderDown);
+ break;
+ case 0x4822:
+ sendMessage(_parentScene, 0x2001, 0);
+ _destY = param.asInteger();
+ GotoState(&Klaymen::stStartClimbLadderUp);
+ break;
+ case 0x4823:
+ sendMessage(_parentScene, 0x2002, 0);
+ GotoState(&Klaymen::stClimbLadderHalf);
+ break;
+ case 0x482D:
+ setDoDeltaX(_x > (int16)param.asInteger() ? 1 : 0);
+ gotoNextStateExt();
+ break;
+ case 0x482E:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stWalkToFrontNoStep);
+ else
+ GotoState(&Klaymen::stWalkToFront);
+ break;
+ case 0x482F:
+ if (param.asInteger() == 1)
+ GotoState(&Klaymen::stTurnToFront);
+ else
+ GotoState(&Klaymen::stTurnToBack);
+ break;
+ case 0x483F:
+ startSpecialWalkRight(param.asInteger());
+ break;
+ case 0x4840:
+ startSpecialWalkLeft(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/klaymen.h b/engines/neverhood/klaymen.h
new file mode 100644
index 0000000000..25443b5a35
--- /dev/null
+++ b/engines/neverhood/klaymen.h
@@ -0,0 +1,771 @@
+/* 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 NEVERHOOD_KLAYMEN_H
+#define NEVERHOOD_KLAYMEN_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/sprite.h"
+#include "neverhood/graphics.h"
+#include "neverhood/resource.h"
+
+namespace Neverhood {
+
+// TODO This code is horrible and weird and a lot of stuff needs renaming once a better name is found
+// TODO Also the methods should probably rearranged and be grouped together more consistently
+
+class Klaymen;
+class Scene;
+
+const uint32 kKlaymenSpeedUpHash = 0x004A2148;
+
+#include "common/pack-start.h" // START STRUCT PACKING
+
+struct KlaymenIdleTableItem {
+ int weight;
+ uint idleAnimation;
+};
+
+#include "common/pack-end.h" // END STRUCT PACKING
+
+enum {
+ kIdlePickEar,
+ kIdleSpinHead,
+ kIdleArms,
+ kIdleChest,
+ kIdleHeadOff,
+ kIdleTeleporterHands,
+ kIdleTeleporterHands2,
+ kIdleWonderAbout
+};
+
+class Klaymen : public AnimatedSprite {
+public:
+ Klaymen(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRectArray *clipRects = NULL);
+
+ void update();
+
+ void startIdleAnimation(uint32 fileHash, AnimationCb callback);
+ void upIdleAnimation();
+
+ void stIdlePickEar();
+ void evIdlePickEarDone();
+ uint32 hmIdlePickEar(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stIdleSpinHead();
+ uint32 hmIdleSpinHead(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stIdleArms();
+ void evIdleArmsDone();
+ uint32 hmIdleArms(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stIdleChest();
+ uint32 hmIdleChest(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stIdleHeadOff();
+ uint32 hmIdleHeadOff(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stIdleWonderAbout();
+
+ void stIdleTeleporterHands();
+
+ void stIdleTeleporterHands2();
+
+ void stTryStandIdle();
+ void stStandAround();
+ void upStandIdle();
+ void stIdleBlink();
+
+ bool stStartAction(AnimationCb callback3);
+ bool stStartActionFromIdle(AnimationCb callback);
+ uint32 hmStartAction(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stSneak();
+ uint32 hmSneaking(int messageNum, const MessageParam &param, Entity *sender);
+ void suSneaking();
+ void evSneakingDone();
+
+ void stStartWalking();
+ void stStartWalkingExt();
+ void stWalkingOpenDoor();
+ void suWalkingOpenDoor();
+ void stStepOver();
+ uint32 hmStartWalking(int messageNum, const MessageParam &param, Entity *sender);
+ void evStartWalkingDone();
+
+ void stWalkingFirst();
+ void stWalkingFirstExt();
+ void stStartWalkingResume();
+ void stUpdateWalkingFirst();
+ uint32 hmWalking(int messageNum, const MessageParam &param, Entity *sender);
+ void suWalkingFirst();
+
+ void stWalkToFrontNoStep();
+ void stWalkToFront();
+ void stTurnToFront();
+ void stTurnToBack();
+ uint32 hmWalkToFront(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stTurnToBackToUse();
+ uint32 hmTurnToBackToUse(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPickUpGeneric();
+ void stPickUpNeedle();
+ uint32 hmPickUpObject(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPickUpTube();
+ uint32 hmPickUpTube(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stTurnToUse();
+ void stTurnToUseHalf();
+ void stTurnAwayFromUse();
+ void stReturnFromUse();
+ void stTurnToUseExt();
+ uint32 hmTurnToUse(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stLargeStep();
+ uint32 hmLargeStep(int messageNum, const MessageParam &param, Entity *sender);
+ void suLargeStep();
+ void evLargeStepDone();
+
+ void stInsertKey();
+ uint32 hmInsertKey(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stReadNote();
+ uint32 hmReadNote(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stHitByDoor();
+ uint32 hmHitByDoor(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPeekWall();
+ uint32 hmPeekWall(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPeekWallReturn();
+ uint32 hmPeekWallReturn(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPeekWallBlink();
+ void upPeekWallBlink();
+
+ void stPeekWall1();
+
+ void stPeekWall2();
+
+ void stPullHammerLever();
+ uint32 hmPullHammerLever(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stRidePlatformDown();
+ void suRidePlatformDown();
+
+ void stCrashDown();
+ void stCrashDownFinished();
+
+ void stShrink();
+ uint32 hmShrink(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stGrow();
+ uint32 hmGrow(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stDrinkPotion();
+ uint32 hmDrinkPotion(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPullCord();
+ void stReleaseCord();
+ uint32 hmPullReleaseCord(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stUseTube();
+ uint32 hmUseTube(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stUseLever();
+ void stUseLeverRelease();
+ void stReleaseLever();
+ void stInteractLever();
+ uint32 hmLever(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stLetGoOfLever();
+ void evLeverReleasedEvent();
+
+ void stWakeUp();
+
+ void stSleeping();
+ uint32 hmSleeping(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPressButton();
+ void stPressFloorButton();
+ void stPressButtonSide();
+ uint32 hmPressButton(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stWonderAbout();
+ void stWonderAboutHalf();
+ void stWonderAboutAfter();
+
+ void stStandWonderAbout();
+
+ void stStartClimbLadderUp();
+ void stStartClimbLadderDown();
+ uint32 hmClimbLadderUpDown(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stContinueClimbLadderUp();
+
+ void stClimbLadderHalf();
+ uint32 hmClimbLadderHalf(int messageNum, const MessageParam &param, Entity *sender);
+
+ void setupJumpToRing();
+ void stJumpToRing1();
+ void stJumpToRing2();
+ void stJumpToRing4();
+ uint32 hmJumpToRing(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stHangOnRing();
+
+ void stJumpToRing3();
+ uint32 hmJumpToRing3(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stHoldRing3();
+ uint32 hmHoldRing3(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stReleaseRing();
+
+ void stLandOnFeet();
+ uint32 hmLandOnFeet(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPullLeverDown();
+ void stHoldLeverDown();
+
+ void stInsertDisk();
+ uint32 hmInsertDisk(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stMoveObjectSkipTurnFaceObject();
+ void stMoveObjectSkipTurn();
+ void stMoveObjectFaceObject();
+ uint32 hmMoveObjectTurn(int messageNum, const MessageParam &param, Entity *sender);
+ void evMoveObjectTurnDone();
+
+ void stJumpToGrab();
+ void stJumpToGrabFall();
+ uint32 hmJumpToGrab(int messageNum, const MessageParam &param, Entity *sender);
+ void suJumpToGrab();
+
+ void stJumpToGrabRelease();
+ uint32 hmJumpToGrabRelease(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stSitInTeleporter();
+ uint32 hmSitInTeleporter(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stSitIdleTeleporter();
+ void upSitIdleTeleporter();
+
+ void stSitIdleTeleporterBlink();
+
+ void stSitIdleTeleporterBlinkSecond();
+
+ void stTurnToUseInTeleporter();
+
+ void stReturnFromUseInTeleporter();
+
+ void stGetUpFromTeleporter();
+
+ void teleporterAppear(uint32 fileHash);
+ void teleporterDisappear(uint32 fileHash);
+ uint32 hmTeleporterAppearDisappear(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stClayDoorOpen();
+ uint32 hmClayDoorOpen(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stFallSkipJump();
+ void suFallSkipJump();
+
+ void stMoveObject();
+ void stContinueMoveObject();
+ uint32 hmMoveObject(int messageNum, const MessageParam &param, Entity *sender);
+ void upMoveObject();
+
+ void stCloseEyes();
+
+ void stTumbleHeadless();
+ uint32 hmTumbleHeadless(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stFetchMatch();
+ void stLightMatch();
+ uint32 hmMatch(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stHitByBoxingGlove();
+ uint32 hmHitByBoxingGlove(int messageNum, const MessageParam &param, Entity *sender);
+ void evHitByBoxingGloveDone();
+
+ void stStandIdleSmall();
+ void stWonderAboutSmall();
+ void stWonderAboutHalfSmall();
+ void stWonderAboutAfterSmall();
+
+ void stWalkToFrontNoStepSmall();
+ void stWalkToFrontSmall();
+ void stWalkToFront2Small();
+ void stTurnToBackHalfSmall();
+ void stTurnToBackWalkSmall();
+ void stTurnToBackSmall();
+ uint32 hmWalkFrontBackSmall(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stFinishGrow();
+ uint32 hmFinishGrow(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stJumpToRingVenusFlyTrap();
+ uint32 hmJumpToRingVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stDropFromRing();
+
+ void stStandIdleSpecial();
+ uint32 hmStandIdleSpecial(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stPressDoorButton();
+ uint32 hmPressDoorButton(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stSpitOutFall0();
+ void stSpitOutFall2();
+ void suFallDown();
+ void upSpitOutFall();
+
+ void stJumpAndFall();
+ uint32 hmJumpAndFall(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stFalling();
+ void stFallTouchdown();
+
+ void stMoveVenusFlyTrap();
+ void stContinueMovingVenusFlyTrap();
+ uint32 hmMoveVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmFirstMoveVenusFlyTrap(int messageNum, const MessageParam &param, Entity *sender);
+ void evMoveVenusFlyTrapDone();
+
+ void stPeekInside();
+ void stPeekInsideReturn();
+ void stPeekInsideBlink();
+ void upPeekInsideBlink();
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ void stopWalking();
+
+ void suAction();
+ void suUpdateDestX();
+ void suWalkingTestExit();
+
+ uint32 hmLowLevel(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmLowLevelAnimation(int messageNum, const MessageParam &param, Entity *sender);
+
+ void setKlaymenIdleTable(const KlaymenIdleTableItem *table, uint tableCount);
+ void setKlaymenIdleTable1();
+ void setKlaymenIdleTable2();
+ void setKlaymenIdleTable3();
+
+ void setSoundFlag(bool value) { _soundFlag = value; }
+
+ void spitIntoPipe();
+ void stTrySpitIntoPipe();
+ void stContSpitIntoPipe();
+ uint32 hmSpit(int messageNum, const MessageParam &param, Entity *sender);
+
+ void stRidePlatform();
+ void suRidePlatform();
+ void stPullLever();
+ void stLookLeverDown();
+ void stWaitLeverDown();
+
+protected:
+ Scene *_parentScene;
+ Sprite *_attachedSprite;
+ int _ladderStatus;
+ bool _isWalking;
+ bool _isSneaking;
+ bool _isLargeStep;
+ bool _isMoveObjectRequested;
+ bool _acceptInput;
+ int16 _destX, _destY;
+ int16 _idleCounter, _idleCounterMax;
+ int16 _blinkCounter, _blinkCounterMax;
+ int16 _tapesToInsert, _keysToInsert;
+ bool _doYHitIncr;
+ bool _isLeverDown;
+ bool _isWalkingOpenDoorNotified;
+ int _busyStatus;
+ bool _actionStatusChanged;
+ int _actionStatus;
+
+ const KlaymenIdleTableItem *_idleTable;
+ uint _idleTableCount;
+ int _idleTableTotalWeight;
+ int _idleTableNum;
+
+ NPointArray *_pathPoints;
+ bool _soundFlag;
+
+ int16 _spitOutCountdown;
+
+ bool _isSittingInTeleporter;
+
+ bool _potionFlag1;
+ bool _potionFlag2;
+
+ int16 _platformDeltaY;
+
+ Sprite *_otherSprite;
+
+ int16 _walkResumeFrameIncr;
+
+ int _moveObjectCountdown;
+
+ bool _canSpitPipe;
+ bool _contSpitPipe;
+ bool _readyToSpit;
+ uint32 _spitPipeIndex;
+ uint32 _spitDestPipeIndex;
+ uint32 _spitContDestPipeIndex;
+
+ virtual void xUpdate();
+ virtual uint32 xHandleMessage(int messageNum, const MessageParam &param);
+
+ void startWalkToX(int16 x, bool walkExt);
+ void startWalkToXExt(int16 x);
+ void startWalkToXSmall(int16 x);
+ void startSpecialWalkLeft(int16 x);
+ void startSpecialWalkRight(int16 x);
+ void startWalkToXDistance(int16 destX, int16 distance);
+ void startWalkToAttachedSpriteXDistance(int16 distance);
+
+ void gotoNextStateExt();
+ void beginAction();
+ void endAction();
+
+ void stStartWalkingSmall();
+ uint32 hmWalkingSmall(int messageNum, const MessageParam &param, Entity *sender);
+
+ void enterIdleAnimation(uint idleAnimation);
+ void walkAlongPathPoints();
+
+};
+
+class KmScene1001 : public Klaymen {
+public:
+ KmScene1001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1002 : public Klaymen {
+public:
+ KmScene1002(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1004 : public Klaymen {
+public:
+ KmScene1004(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1109 : public Klaymen {
+public:
+ KmScene1109(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1201 : public Klaymen {
+public:
+ KmScene1201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1303 : public Klaymen {
+public:
+ KmScene1303(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1304 : public Klaymen {
+public:
+ KmScene1304(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1305 : public Klaymen {
+public:
+ KmScene1305(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1306 : public Klaymen {
+public:
+ KmScene1306(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1308 : public Klaymen {
+public:
+ KmScene1308(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1401 : public Klaymen {
+public:
+ KmScene1401(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1402 : public Klaymen {
+public:
+ KmScene1402(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1403 : public Klaymen {
+public:
+ KmScene1403(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1404 : public Klaymen {
+public:
+ KmScene1404(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1608 : public Klaymen {
+public:
+ KmScene1608(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1705 : public Klaymen {
+public:
+ KmScene1705(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene1901 : public Klaymen {
+public:
+ KmScene1901(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2001 : public Klaymen {
+public:
+ KmScene2001(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2101 : public Klaymen {
+public:
+ KmScene2101(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2201 : public Klaymen {
+public:
+ KmScene2201(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2203 : public Klaymen {
+public:
+ KmScene2203(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2205 : public Klaymen {
+public:
+ KmScene2205(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2206 : public Klaymen {
+public:
+ KmScene2206(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+ ~KmScene2206();
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2207 : public Klaymen {
+public:
+ KmScene2207(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2242 : public Klaymen {
+public:
+ KmScene2242(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmHallOfRecords : public Klaymen {
+public:
+ KmHallOfRecords(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2247 : public Klaymen {
+public:
+ KmScene2247(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ void xUpdate();
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2401 : public Klaymen {
+public:
+ KmScene2401(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2402 : public Klaymen {
+public:
+ KmScene2402(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2403 : public Klaymen {
+public:
+ KmScene2403(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2406 : public Klaymen {
+public:
+ KmScene2406(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2501 : public Klaymen {
+public:
+ KmScene2501(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2732 : public Klaymen {
+public:
+ KmScene2732(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2801 : public Klaymen {
+public:
+ KmScene2801(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2803 : public Klaymen {
+public:
+ KmScene2803(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, NRect *clipRects, int clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2803Small : public Klaymen {
+public:
+ KmScene2803Small(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2805 : public Klaymen {
+public:
+ KmScene2805(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2806 : public Klaymen {
+public:
+ KmScene2806(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y,
+ bool needsLargeSurface, NRect *clipRects, uint clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2809 : public Klaymen {
+public:
+ KmScene2809(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y,
+ bool needsLargeSurface, NRect *clipRects, uint clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2810Small : public Klaymen {
+public:
+ KmScene2810Small(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2810 : public Klaymen {
+public:
+ KmScene2810(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y,
+ NRect *clipRects, uint clipRectsCount);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+class KmScene2812 : public Klaymen {
+public:
+ KmScene2812(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+protected:
+ uint32 xHandleMessage(int messageNum, const MessageParam &param);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_KLAYMEN_H */
diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp
new file mode 100644
index 0000000000..accdaca63f
--- /dev/null
+++ b/engines/neverhood/menumodule.cpp
@@ -0,0 +1,1118 @@
+/* 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 "neverhood/menumodule.h"
+#include "neverhood/gamemodule.h"
+
+#include "engines/savestate.h"
+
+namespace Neverhood {
+
+enum {
+ MAIN_MENU = 0,
+ CREDITS_SCENE = 1,
+ MAKING_OF = 2,
+ LOAD_GAME_MENU = 3,
+ SAVE_GAME_MENU = 4,
+ DELETE_GAME_MENU = 5,
+ QUERY_OVR_MENU = 6
+};
+
+enum {
+ kMainMenuRestartGame = 0,
+ kMainMenuLoadGame = 1,
+ kMainMenuSaveGame = 2,
+ kMainMenuResumeGame = 3,
+ kMainMenuQuitGame = 4,
+ kMainMenuCredits = 5,
+ kMainMenuMakingOf = 6,
+ kMainMenuToggleMusic = 7,
+ kMainMenuDeleteGame = 8
+};
+
+static const uint32 kMakingOfSmackerFileHashList[] = {
+ 0x21082409,
+ 0x21082809,
+ 0x21083009,
+ 0x21080009,
+ 0x21086009,
+ 0x2108A009,
+ 0x21092009,
+ 0x210A2009,
+ 0x210C2009,
+ 0x21082411,
+ 0x21082811,
+ 0x21083011,
+ 0x21080011,
+ 0
+};
+
+MenuModule::MenuModule(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _savegameList(NULL) {
+
+ SetMessageHandler(&MenuModule::handleMessage);
+
+ _savedPaletteData = _vm->_screen->getPaletteData();
+ _vm->_mixer->pauseAll(true);
+ _vm->toggleSoundUpdate(false);
+
+ createScene(MAIN_MENU, -1);
+}
+
+MenuModule::~MenuModule() {
+ _vm->_mixer->pauseAll(false);
+ _vm->toggleSoundUpdate(true);
+ _vm->_screen->setPaletteData(_savedPaletteData);
+}
+
+void MenuModule::setLoadgameInfo(uint index) {
+ _savegameSlot = (*_savegameList)[index].slotNum;
+}
+
+void MenuModule::setSavegameInfo(const Common::String &description, uint index, bool newSavegame) {
+ _savegameDescription = description;
+ _savegameSlot = newSavegame ? -1 : (*_savegameList)[index].slotNum;
+}
+
+void MenuModule::setDeletegameInfo(uint index) {
+ _savegameSlot = (*_savegameList)[index].slotNum;
+}
+
+void MenuModule::createScene(int sceneNum, int which) {
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case MAIN_MENU:
+ _childObject = new MainMenu(_vm, this);
+ break;
+ case CREDITS_SCENE:
+ _childObject = new CreditsScene(_vm, this, true);
+ break;
+ case MAKING_OF:
+ createSmackerScene(kMakingOfSmackerFileHashList, false, true, true);
+ break;
+ case LOAD_GAME_MENU:
+ createLoadGameMenu();
+ break;
+ case SAVE_GAME_MENU:
+ createSaveGameMenu();
+ break;
+ case DELETE_GAME_MENU:
+ createDeleteGameMenu();
+ break;
+ case QUERY_OVR_MENU:
+ _childObject = new QueryOverwriteMenu(_vm, this, _savegameDescription);
+ break;
+ }
+ SetUpdateHandler(&MenuModule::updateScene);
+ _childObject->handleUpdate();
+}
+
+void MenuModule::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case MAIN_MENU:
+ switch (_moduleResult) {
+ case kMainMenuRestartGame:
+ _vm->_gameModule->requestRestartGame(false);
+ leaveModule(0);
+ break;
+ case kMainMenuLoadGame:
+ createScene(LOAD_GAME_MENU, -1);
+ break;
+ case kMainMenuSaveGame:
+ createScene(SAVE_GAME_MENU, -1);
+ break;
+ case kMainMenuResumeGame:
+ leaveModule(0);
+ break;
+ case kMainMenuQuitGame:
+ leaveModule(0);
+ _vm->quitGame();
+ break;
+ case kMainMenuCredits:
+ createScene(CREDITS_SCENE, -1);
+ break;
+ case kMainMenuMakingOf:
+ createScene(MAKING_OF, -1);
+ break;
+ case kMainMenuToggleMusic:
+ // TODO Toggle music 0048A367
+ createScene(MAIN_MENU, -1);
+ break;
+ case kMainMenuDeleteGame:
+ createScene(DELETE_GAME_MENU, -1);
+ break;
+ default:
+ createScene(MAIN_MENU, -1);
+ break;
+ }
+ break;
+ case CREDITS_SCENE:
+ case MAKING_OF:
+ createScene(MAIN_MENU, -1);
+ break;
+ case LOAD_GAME_MENU:
+ handleLoadGameMenuAction(_moduleResult != 1);
+ break;
+ case SAVE_GAME_MENU:
+ handleSaveGameMenuAction(_moduleResult != 1, true);
+ break;
+ case DELETE_GAME_MENU:
+ handleDeleteGameMenuAction(_moduleResult != 1);
+ break;
+ case QUERY_OVR_MENU:
+ handleSaveGameMenuAction(_moduleResult != 1, false);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+uint32 MenuModule::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ return Module::handleMessage(messageNum, param, sender);;
+}
+
+void MenuModule::createLoadGameMenu() {
+ _savegameSlot = -1;
+ _savegameList = new SavegameList();
+ loadSavegameList();
+ _childObject = new LoadGameMenu(_vm, this, _savegameList);
+}
+
+void MenuModule::createSaveGameMenu() {
+ _savegameSlot = -1;
+ _savegameList = new SavegameList();
+ loadSavegameList();
+ _childObject = new SaveGameMenu(_vm, this, _savegameList);
+}
+
+void MenuModule::createDeleteGameMenu() {
+ _savegameSlot = -1;
+ _savegameList = new SavegameList();
+ loadSavegameList();
+ _childObject = new DeleteGameMenu(_vm, this, _savegameList);
+}
+
+void MenuModule::handleLoadGameMenuAction(bool doLoad) {
+ createScene(MAIN_MENU, -1);
+ if (doLoad && _savegameSlot >= 0) {
+ _vm->loadGameState(_savegameSlot);
+ leaveModule(0);
+ }
+ delete _savegameList;
+ _savegameList = NULL;
+}
+
+void MenuModule::handleSaveGameMenuAction(bool doSave, bool doQuery) {
+ if (doSave && doQuery && _savegameSlot >= 0) {
+ createScene(QUERY_OVR_MENU, -1);
+ } else if (doSave) {
+ // Get a new slot number if it's a new savegame
+ if (_savegameSlot < 0)
+ _savegameSlot = _savegameList->size() > 0 ? _savegameList->back().slotNum + 1 : 0;
+ // Restore the scene palette and background so that the correct thumbnail is saved
+ byte *menuPaletteData = _vm->_screen->getPaletteData();
+ _vm->_screen->setPaletteData(_savedPaletteData);
+ _vm->_gameModule->redrawPrevChildObject();
+ _vm->saveGameState(_savegameSlot, _savegameDescription);
+ _vm->_screen->setPaletteData(menuPaletteData);
+ createScene(MAIN_MENU, -1);
+ } else {
+ createScene(MAIN_MENU, -1);
+ }
+ delete _savegameList;
+ _savegameList = NULL;
+}
+
+void MenuModule::handleDeleteGameMenuAction(bool doDelete) {
+ createScene(MAIN_MENU, -1);
+ if (doDelete && _savegameSlot >= 0) {
+ _vm->removeGameState(_savegameSlot);
+ }
+ delete _savegameList;
+ _savegameList = NULL;
+}
+
+void MenuModule::loadSavegameList() {
+
+ Common::SaveFileManager *saveFileMan = _vm->_system->getSavefileManager();
+ Neverhood::NeverhoodEngine::SaveHeader header;
+ Common::String pattern = _vm->getTargetName();
+ pattern += ".???";
+
+ Common::StringArray filenames;
+ filenames = saveFileMan->listSavefiles(pattern.c_str());
+ Common::sort(filenames.begin(), filenames.end());
+
+ SaveStateList saveList;
+ for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
+ int slotNum = atoi(file->c_str() + file->size() - 3);
+ if (slotNum >= 0 && slotNum <= 999) {
+ Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
+ if (in) {
+ if (Neverhood::NeverhoodEngine::readSaveHeader(in, false, header) == Neverhood::NeverhoodEngine::kRSHENoError) {
+ SavegameItem savegameItem;
+ savegameItem.slotNum = slotNum;
+ savegameItem.description = header.description;
+ _savegameList->push_back(savegameItem);
+ }
+ delete in;
+ }
+ }
+ }
+
+}
+
+MenuButton::MenuButton(NeverhoodEngine *vm, Scene *parentScene, uint buttonIndex, uint32 fileHash, const NRect &collisionBounds)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _buttonIndex(buttonIndex), _countdown(0) {
+
+ loadSprite(fileHash, kSLFDefDrawOffset | kSLFDefPosition, 100);
+ _collisionBounds = collisionBounds;
+ setVisible(false);
+ SetUpdateHandler(&MenuButton::update);
+ SetMessageHandler(&MenuButton::handleMessage);
+}
+
+void MenuButton::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ setVisible(false);
+ sendMessage(_parentScene, 0x2000, _buttonIndex);
+ }
+}
+
+uint32 MenuButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0) {
+ setVisible(true);
+ _countdown = 4;
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+MainMenu::MainMenu(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule) {
+
+ static const uint32 kMenuButtonFileHashes[] = {
+ 0x36C62120,
+ 0x56C62120,
+ 0x96C62120,
+ 0x16C62121,
+ 0x16C62122,
+ 0x16C62124,
+ 0x16C62128,
+ 0x16C62130,
+ 0x16C62100
+ };
+
+ static const NRect kMenuButtonCollisionBounds[] = {
+ NRect(52, 121, 110, 156),
+ NRect(52, 192, 109, 222),
+ NRect(60, 257, 119, 286),
+ NRect(67, 326, 120, 354),
+ NRect(70, 389, 128, 416),
+ NRect(523, 113, 580, 144),
+ NRect(525, 176, 577, 206),
+ NRect(527, 384, 580, 412),
+ NRect(522, 255, 580, 289)
+ };
+
+ setBackground(0x08C0020C);
+ setPalette(0x08C0020C);
+ insertScreenMouse(0x00208084);
+
+ insertStaticSprite(0x41137051, 100);
+ insertStaticSprite(0xC10B2015, 100);
+
+ // TODO Only if music is enabled
+ _musicOnButton = insertStaticSprite(0x0C24C0EE, 100);
+
+ for (uint buttonIndex = 0; buttonIndex < 9; ++buttonIndex) {
+ Sprite *menuButton = insertSprite<MenuButton>(this, buttonIndex,
+ kMenuButtonFileHashes[buttonIndex], kMenuButtonCollisionBounds[buttonIndex]);
+ addCollisionSprite(menuButton);
+ }
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&MainMenu::handleMessage);
+
+}
+
+uint32 MainMenu::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ leaveScene(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+static const uint32 kCreditsSceneFileHashes[] = {
+ 0x6081128C, 0x608112BC, 0x608112DC,
+ 0x6081121C, 0x6081139C, 0x6081109C,
+ 0x6081169C, 0x60811A9C, 0x6081029C,
+ 0x0081128C, 0x008112BC, 0x008012BC,
+ 0x008112DC, 0x0081121C, 0x0081139C,
+ 0x0081109C, 0x0081169C, 0x00811A9C,
+ 0x0081029C, 0x0081329C, 0xC08112BC,
+ 0xC08112DC, 0xC081121C, 0xC081139C,
+ 0
+};
+
+CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAbort)
+ : Scene(vm, parentModule), _canAbort(canAbort), _screenIndex(0), _ticksDuration(0),
+ _countdown(216) {
+
+ SetUpdateHandler(&CreditsScene::update);
+ SetMessageHandler(&CreditsScene::handleMessage);
+
+ setBackground(0x6081128C);
+ setPalette(0x6081128C);
+
+ _ticksTime = _vm->_system->getMillis() + 202100;
+
+ _musicResource = new MusicResource(_vm);
+ _musicResource->load(0x30812225);
+ _musicResource->play(0);
+
+}
+
+CreditsScene::~CreditsScene() {
+ _musicResource->unload();
+ delete _musicResource;
+}
+
+void CreditsScene::update() {
+ Scene::update();
+ if (_countdown != 0) {
+ if (_screenIndex == 23 && _vm->_system->getMillis() > _ticksTime)
+ leaveScene(0);
+ else if ((--_countdown) == 0) {
+ ++_screenIndex;
+ if (kCreditsSceneFileHashes[_screenIndex] == 0)
+ leaveScene(0);
+ else {
+ _background->load(kCreditsSceneFileHashes[_screenIndex]);
+ _palette->addPalette(kCreditsSceneFileHashes[_screenIndex], 0, 256, 0);
+ if (_screenIndex < 5)
+ _countdown = 192;
+ else if (_screenIndex < 15)
+ _countdown = 144;
+ else if (_screenIndex < 16)
+ _countdown = 216;
+ else if (_screenIndex < 23)
+ _countdown = 144;
+ else
+ _countdown = 1224;
+ }
+ }
+ }
+}
+
+uint32 CreditsScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0009:
+ leaveScene(0);
+ break;
+ case 0x000B:
+ if (param.asInteger() == Common::KEYCODE_ESCAPE && _canAbort)
+ leaveScene(0);
+ break;
+ case 0x101D:
+ _ticksDuration = _ticksTime - _vm->_system->getMillis();
+ break;
+ case 0x101E:
+ _ticksTime = _ticksDuration + _vm->_system->getMillis();
+ break;
+ }
+ return 0;
+}
+
+Widget::Widget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int baseObjectPriority, int baseSurfacePriority)
+ : StaticSprite(vm, baseObjectPriority), _parentScene(parentScene),
+ _baseObjectPriority(baseObjectPriority), _baseSurfacePriority(baseSurfacePriority) {
+
+ SetUpdateHandler(&Widget::update);
+ SetMessageHandler(&Widget::handleMessage);
+
+ setPosition(x, y);
+}
+
+void Widget::onClick() {
+ _parentScene->setCurrWidget(this);
+}
+
+void Widget::setPosition(int16 x, int16 y) {
+ _x = x;
+ _y = y;
+ updateBounds();
+}
+
+void Widget::refreshPosition() {
+ _needRefresh = true;
+ StaticSprite::updatePosition();
+ _collisionBoundsOffset.set(0, 0,
+ _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ updateBounds();
+}
+
+void Widget::initialize() {
+ // Empty
+}
+
+int16 Widget::getWidth() {
+ return _spriteResource.getDimensions().width;
+}
+
+int16 Widget::getHeight() {
+ return _spriteResource.getDimensions().height;
+}
+
+void Widget::enterWidget() {
+ // Empty
+}
+
+void Widget::exitWidget() {
+ // Empty
+}
+
+void Widget::update() {
+ handleSpriteUpdate();
+ StaticSprite::updatePosition();
+}
+
+uint32 Widget::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ onClick();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+TextLabelWidget::TextLabelWidget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int baseObjectPriority, int baseSurfacePriority,
+ const byte *string, int stringLen, BaseSurface *drawSurface, int16 tx, int16 ty, FontSurface *fontSurface)
+ : Widget(vm, x, y, parentScene, baseObjectPriority, baseSurfacePriority),
+ _string(string), _stringLen(stringLen), _drawSurface(drawSurface), _tx(tx), _ty(ty), _fontSurface(fontSurface) {
+
+}
+
+void TextLabelWidget::initialize() {
+ _parentScene->addSprite(this);
+ _parentScene->addCollisionSprite(this);
+}
+
+int16 TextLabelWidget::getWidth() {
+ return _fontSurface->getStringWidth(_string, _stringLen);
+}
+
+int16 TextLabelWidget::getHeight() {
+ return _fontSurface->getCharHeight();
+}
+
+void TextLabelWidget::drawString(int maxStringLength) {
+ _fontSurface->drawString(_drawSurface, _x, _y, _string, MIN(_stringLen, maxStringLength));
+ _collisionBoundsOffset.set(_tx, _ty, getWidth(), getHeight());
+ updateBounds();
+}
+
+void TextLabelWidget::clear() {
+ _collisionBoundsOffset.set(0, 0, 0, 0);
+ updateBounds();
+}
+
+void TextLabelWidget::setString(const byte *string, int stringLen) {
+ _string = string;
+ _stringLen = stringLen;
+}
+
+TextEditWidget::TextEditWidget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int maxStringLength, FontSurface *fontSurface, uint32 fileHash, const NRect &rect)
+ : Widget(vm, x, y, parentScene, 1000, 1000),
+ _maxStringLength(maxStringLength), _fontSurface(fontSurface), _fileHash(fileHash), _rect(rect),
+ _cursorSurface(NULL), _cursorTicks(0), _cursorPos(0), _cursorFileHash(0), _cursorWidth(0), _cursorHeight(0),
+ _modified(false), _readOnly(false) {
+
+ _maxVisibleChars = (_rect.x2 - _rect.x1) / _fontSurface->getCharWidth();
+ _cursorPos = 0;
+
+ SetUpdateHandler(&TextEditWidget::update);
+ SetMessageHandler(&TextEditWidget::handleMessage);
+}
+
+TextEditWidget::~TextEditWidget() {
+ delete _cursorSurface;
+}
+
+void TextEditWidget::onClick() {
+ NPoint mousePos = _parentScene->getMousePos();
+ mousePos.x -= _x + _rect.x1;
+ mousePos.y -= _y + _rect.y1;
+ if (mousePos.x >= 0 && mousePos.x <= _rect.x2 - _rect.x1 &&
+ mousePos.y >= 0 && mousePos.y <= _rect.y2 - _rect.y1) {
+ if (_entryString.size() == 1)
+ _cursorPos = 0;
+ else {
+ int newCursorPos = mousePos.x / _fontSurface->getCharWidth();
+ if (mousePos.x % _fontSurface->getCharWidth() > _fontSurface->getCharWidth() / 2 && newCursorPos <= (int)_entryString.size())
+ ++newCursorPos;
+ _cursorPos = MIN((int)_entryString.size(), newCursorPos);
+ }
+ _cursorSurface->setVisible(true);
+ refresh();
+ }
+ Widget::onClick();
+}
+
+void TextEditWidget::initialize() {
+ SpriteResource cursorSpriteResource(_vm);
+
+ _spriteResource.load(_fileHash, true);
+ createSurface(_baseSurfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ refreshPosition();
+ _parentScene->addSprite(this);
+ _parentScene->addCollisionSprite(this);
+ _surface->setVisible(true);
+ _textLabelWidget = new TextLabelWidget(_vm, _rect.x1, _rect.y1 + (_rect.y2 - _rect.y1 + 1 - _fontSurface->getCharHeight()) / 2,
+ _parentScene, _baseObjectPriority + 1, _baseSurfacePriority + 1,
+ (const byte*)_entryString.c_str(), _entryString.size(), _surface, _x, _y, _fontSurface);
+ _textLabelWidget->initialize();
+ if (_cursorFileHash != 0) {
+ cursorSpriteResource.load(_cursorFileHash, true);
+ _cursorSurface = new BaseSurface(_vm, 0, cursorSpriteResource.getDimensions().width, cursorSpriteResource.getDimensions().height, "cursor");
+ _cursorSurface->drawSpriteResourceEx(cursorSpriteResource, false, false, cursorSpriteResource.getDimensions().width, cursorSpriteResource.getDimensions().height);
+ _cursorSurface->setVisible(!_readOnly);
+ }
+ refresh();
+}
+
+void TextEditWidget::enterWidget() {
+ if (!_readOnly) {
+ _cursorSurface->setVisible(true);
+ _vm->_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
+ }
+ refresh();
+}
+
+void TextEditWidget::exitWidget() {
+ if (!_readOnly) {
+ _cursorSurface->setVisible(false);
+ _vm->_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
+ }
+ refresh();
+}
+
+void TextEditWidget::setCursor(uint32 cursorFileHash, int16 cursorWidth, int16 cursorHeight) {
+ _cursorFileHash = cursorFileHash;
+ _cursorWidth = cursorWidth;
+ _cursorHeight = cursorHeight;
+}
+
+void TextEditWidget::drawCursor() {
+ if (_cursorSurface->getVisible() && _cursorPos >= 0 && _cursorPos <= _maxVisibleChars) {
+ NDrawRect sourceRect(0, 0, _cursorWidth, _cursorHeight);
+ _surface->copyFrom(_cursorSurface->getSurface(), _rect.x1 + _cursorPos * _fontSurface->getCharWidth(),
+ _rect.y1 + (_rect.y2 - _cursorHeight - _rect.y1 + 1) / 2, sourceRect);
+ } else if (!_readOnly)
+ _cursorSurface->setVisible(false);
+}
+
+void TextEditWidget::updateString() {
+ _textLabelWidget->setString((const byte *)_entryString.c_str(), _entryString.size());
+ _textLabelWidget->drawString(_maxVisibleChars);
+}
+
+Common::String& TextEditWidget::getString() {
+ return _entryString;
+}
+
+void TextEditWidget::setString(const Common::String &string) {
+ _entryString = string;
+ _cursorPos = _entryString.size();
+ _modified = false;
+ refresh();
+}
+
+void TextEditWidget::handleAsciiKey(char ch) {
+ if ((int)_entryString.size() < _maxStringLength &&
+ ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == ' ')) {
+ _entryString.insertChar(ch, _cursorPos);
+ ++_cursorPos;
+ _modified = true;
+ refresh();
+ }
+}
+
+void TextEditWidget::handleKeyDown(Common::KeyCode keyCode) {
+ bool doRefresh = true;
+ switch (keyCode) {
+ case Common::KEYCODE_HOME:
+ _cursorPos = 0;
+ break;
+ case Common::KEYCODE_END:
+ _cursorPos = _entryString.size();
+ break;
+ case Common::KEYCODE_LEFT:
+ if (_entryString.size() > 0 && _cursorPos > 0)
+ --_cursorPos;
+ break;
+ case Common::KEYCODE_RIGHT:
+ if (_cursorPos < (int)_entryString.size())
+ ++_cursorPos;
+ break;
+ case Common::KEYCODE_DELETE:
+ if (_entryString.size() > 0 && _cursorPos < (int)_entryString.size()) {
+ _entryString.deleteChar(_cursorPos);
+ _modified = true;
+ }
+ break;
+ case Common::KEYCODE_BACKSPACE:
+ if (_entryString.size() > 0 && _cursorPos > 0) {
+ _entryString.deleteChar(--_cursorPos);
+ _modified = true;
+ }
+ break;
+ default:
+ doRefresh = false;
+ break;
+ }
+ if (doRefresh) {
+ _cursorSurface->setVisible(!_readOnly);
+ _cursorTicks = 0;
+ refresh();
+ }
+}
+
+void TextEditWidget::refresh() {
+ refreshPosition();
+ updateString();
+ if (_cursorFileHash != 0)
+ drawCursor();
+}
+
+void TextEditWidget::update() {
+ Widget::update();
+ if (!_readOnly && _parentScene->getCurrWidget() == this && _cursorTicks++ == 10) {
+ _cursorSurface->setVisible(!_cursorSurface->getVisible());
+ refresh();
+ _cursorTicks = 0;
+ }
+}
+
+uint32 TextEditWidget::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Widget::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x000A:
+ handleAsciiKey(param.asInteger());
+ break;
+ case 0x000B:
+ handleKeyDown((Common::KeyCode)param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+SavegameListBox::SavegameListBox(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ SavegameList *savegameList, FontSurface *fontSurface, uint32 bgFileHash, const NRect &rect)
+ : Widget(vm, x, y, parentScene, 1000, 1000),
+ _savegameList(savegameList), _fontSurface(fontSurface), _bgFileHash(bgFileHash), _rect(rect),
+ _maxStringLength(0), _firstVisibleItem(0), _lastVisibleItem(0), _currIndex(0) {
+
+ _maxVisibleItemsCount = (_rect.y2 - _rect.y1) / _fontSurface->getCharHeight();
+ _maxStringLength = (_rect.x2 - _rect.x1) / _fontSurface->getCharWidth();
+}
+
+void SavegameListBox::onClick() {
+ NPoint mousePos = _parentScene->getMousePos();
+ mousePos.x -= _x + _rect.x1;
+ mousePos.y -= _y + _rect.y1;
+ if (mousePos.x >= 0 && mousePos.x <= _rect.x2 - _rect.x1 &&
+ mousePos.y >= 0 && mousePos.y <= _rect.y2 - _rect.y1) {
+ // We add 1 to the char height to ensure that the correct entry is chosen if the
+ // user clicks at the bottom the text entry
+ int newIndex = _firstVisibleItem + mousePos.y / (_fontSurface->getCharHeight() + 1);
+ if (newIndex <= _lastVisibleItem) {
+ _currIndex = newIndex;
+ refresh();
+ _parentScene->setCurrWidget(this);
+ _parentScene->refreshDescriptionEdit();
+ }
+ }
+}
+
+void SavegameListBox::initialize() {
+ _spriteResource.load(_bgFileHash, true);
+ createSurface(_baseSurfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ refreshPosition();
+ _parentScene->addSprite(this);
+ _parentScene->addCollisionSprite(this);
+ _surface->setVisible(true);
+ buildItems();
+ _firstVisibleItem = 0;
+ _lastVisibleItem = MIN(_maxVisibleItemsCount, (int)_textLabelItems.size()) - 1;
+ refresh();
+}
+
+void SavegameListBox::buildItems() {
+ SavegameList &savegameList = *_savegameList;
+ int16 itemX = _rect.x1, itemY = 0;
+ for (uint i = 0; i < savegameList.size(); ++i) {
+ const byte *string = (const byte*)savegameList[i].description.c_str();
+ int stringLen = (int)savegameList[i].description.size();
+ TextLabelWidget *label = new TextLabelWidget(_vm, itemX, itemY, _parentScene, _baseObjectPriority + 1,
+ _baseSurfacePriority + 1, string, MIN(stringLen, _maxStringLength), _surface, _x, _y, _fontSurface);
+ label->initialize();
+ _textLabelItems.push_back(label);
+ }
+}
+
+void SavegameListBox::drawItems() {
+ for (int i = 0; i < (int)_textLabelItems.size(); ++i) {
+ TextLabelWidget *label = _textLabelItems[i];
+ if (i >= _firstVisibleItem && i <= _lastVisibleItem) {
+ label->setY(_rect.y1 + (i - _firstVisibleItem) * _fontSurface->getCharHeight());
+ label->updateBounds();
+ label->drawString(_maxStringLength);
+ } else
+ label->clear();
+ }
+}
+
+void SavegameListBox::refresh() {
+ refreshPosition();
+ drawItems();
+}
+
+void SavegameListBox::scrollUp() {
+ if (_firstVisibleItem > 0) {
+ --_firstVisibleItem;
+ --_lastVisibleItem;
+ refresh();
+ }
+}
+
+void SavegameListBox::scrollDown() {
+ if (_lastVisibleItem < (int)_textLabelItems.size() - 1) {
+ ++_firstVisibleItem;
+ ++_lastVisibleItem;
+ refresh();
+ }
+}
+
+void SavegameListBox::pageUp() {
+ int amount = MIN(_firstVisibleItem, _maxVisibleItemsCount);
+ if (amount > 0) {
+ _firstVisibleItem -= amount;
+ _lastVisibleItem -= amount;
+ refresh();
+ }
+}
+
+void SavegameListBox::pageDown() {
+ int amount = MIN((int)_textLabelItems.size() - _lastVisibleItem - 1, _maxVisibleItemsCount);
+ if (amount > 0) {
+ _firstVisibleItem += amount;
+ _lastVisibleItem += amount;
+ refresh();
+ }
+}
+
+GameStateMenu::GameStateMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList,
+ const uint32 *buttonFileHashes, const NRect *buttonCollisionBounds,
+ uint32 backgroundFileHash, uint32 fontFileHash,
+ uint32 mouseFileHash, const NRect *mouseRect,
+ uint32 listBoxBackgroundFileHash, int16 listBoxX, int16 listBoxY, const NRect &listBoxRect,
+ uint32 textEditBackgroundFileHash, uint32 textEditCursorFileHash, int16 textEditX, int16 textEditY, const NRect &textEditRect,
+ uint32 textFileHash1, uint32 textFileHash2)
+ : Scene(vm, parentModule), _currWidget(NULL), _savegameList(savegameList) {
+
+ _fontSurface = new FontSurface(_vm, fontFileHash, 32, 7, 32, 11, 17);
+
+ setBackground(backgroundFileHash);
+ setPalette(backgroundFileHash);
+ insertScreenMouse(mouseFileHash, mouseRect);
+ insertStaticSprite(textFileHash1, 200);
+ insertStaticSprite(textFileHash2, 200);
+
+ _listBox = new SavegameListBox(_vm, listBoxX, listBoxY, this,
+ _savegameList, _fontSurface, listBoxBackgroundFileHash, listBoxRect);
+ _listBox->initialize();
+
+ _textEditWidget = new TextEditWidget(_vm, textEditX, textEditY, this, 29,
+ _fontSurface, textEditBackgroundFileHash, textEditRect);
+ if (textEditCursorFileHash != 0)
+ _textEditWidget->setCursor(textEditCursorFileHash, 2, 13);
+ else
+ _textEditWidget->setReadOnly(true);
+ _textEditWidget->initialize();
+ setCurrWidget(_textEditWidget);
+
+ for (uint buttonIndex = 0; buttonIndex < 6; ++buttonIndex) {
+ Sprite *menuButton = insertSprite<MenuButton>(this, buttonIndex,
+ buttonFileHashes[buttonIndex], buttonCollisionBounds[buttonIndex]);
+ addCollisionSprite(menuButton);
+ }
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&GameStateMenu::handleMessage);
+
+}
+
+GameStateMenu::~GameStateMenu() {
+ delete _fontSurface;
+}
+
+NPoint GameStateMenu::getMousePos() {
+ NPoint pt;
+ pt.x = _mouseCursor->getX();
+ pt.y = _mouseCursor->getY();
+ return pt;
+}
+
+void GameStateMenu::setCurrWidget(Widget *newWidget) {
+ if (newWidget && newWidget != _currWidget) {
+ if (_currWidget)
+ _currWidget->exitWidget();
+ newWidget->enterWidget();
+ _currWidget = newWidget;
+ }
+}
+
+void GameStateMenu::refreshDescriptionEdit() {
+ uint currIndex = _listBox->getCurrIndex();
+ _textEditWidget->setString((*_savegameList)[currIndex].description);
+ setCurrWidget(_textEditWidget);
+}
+
+void GameStateMenu::performAction() {
+ // Empty
+}
+
+uint32 GameStateMenu::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x000A:
+ if (!_textEditWidget->isReadOnly()) {
+ sendMessage(_textEditWidget, 0x000A, param.asInteger());
+ setCurrWidget(_textEditWidget);
+ }
+ break;
+ case 0x000B:
+ if (param.asInteger() == Common::KEYCODE_RETURN)
+ performAction();
+ else if (param.asInteger() == Common::KEYCODE_ESCAPE)
+ leaveScene(1);
+ else if (!_textEditWidget->isReadOnly()) {
+ sendMessage(_textEditWidget, 0x000B, param.asInteger());
+ setCurrWidget(_textEditWidget);
+ }
+ break;
+ case 0x2000:
+ // Handle menu button click
+ switch (param.asInteger()) {
+ case 0:
+ performAction();
+ break;
+ case 1:
+ leaveScene(1);
+ break;
+ case 2:
+ _listBox->pageUp();
+ break;
+ case 3:
+ _listBox->scrollUp();
+ break;
+ case 4:
+ _listBox->scrollDown();
+ break;
+ case 5:
+ _listBox->pageDown();
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+
+static const uint32 kSaveGameMenuButtonFileHashes[] = {
+ 0x8359A824, 0x0690E260, 0x0352B050,
+ 0x1392A223, 0x13802260, 0x0B32B200
+};
+
+static const NRect kSaveGameMenuButtonCollisionBounds[] = {
+ NRect(518, 106, 602, 160),
+ NRect(516, 378, 596, 434),
+ NRect(394, 108, 458, 206),
+ NRect(400, 204, 458, 276),
+ NRect(398, 292, 456, 352),
+ NRect(396, 352, 460, 444)
+};
+
+static const NRect kSaveGameMenuListBoxRect(0, 0, 320, 272);
+static const NRect kSaveGameMenuTextEditRect(0, 0, 377, 17);
+static const NRect kSaveGameMenuMouseRect(50, 47, 427, 64);
+
+SaveGameMenu::SaveGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList)
+ : GameStateMenu(vm, parentModule, savegameList, kSaveGameMenuButtonFileHashes, kSaveGameMenuButtonCollisionBounds,
+ 0x30084E25, 0x2328121A,
+ 0x84E21308, &kSaveGameMenuMouseRect,
+ 0x1115A223, 60, 142, kSaveGameMenuListBoxRect,
+ 0x3510A868, 0x8290AC20, 50, 47, kSaveGameMenuTextEditRect,
+ 0x1340A5C2, 0x1301A7EA) {
+
+}
+
+void SaveGameMenu::performAction() {
+ ((MenuModule*)_parentModule)->setSavegameInfo(_textEditWidget->getString(),
+ _listBox->getCurrIndex(), _textEditWidget->isModified());
+ leaveScene(0);
+}
+
+static const uint32 kLoadGameMenuButtonFileHashes[] = {
+ 0x100B2091, 0x84822B03, 0x20E22087,
+ 0x04040107, 0x04820122, 0x24423047
+};
+
+static const NRect kLoadGameMenuButtonCollisionBounds[] = {
+ NRect( 44, 115, 108, 147),
+ NRect( 52, 396, 112, 426),
+ NRect(188, 116, 245, 196),
+ NRect(189, 209, 239, 269),
+ NRect(187, 301, 233, 349),
+ NRect(182, 358, 241, 433)
+};
+
+static const NRect kLoadGameMenuListBoxRect(0, 0, 320, 271);
+static const NRect kLoadGameMenuTextEditRect(0, 0, 320, 17);
+static const NRect kLoadGameMenuMouseRect(263, 48, 583, 65);
+
+LoadGameMenu::LoadGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList)
+ : GameStateMenu(vm, parentModule, savegameList, kLoadGameMenuButtonFileHashes, kLoadGameMenuButtonCollisionBounds,
+ 0x98620234, 0x201C2474,
+ 0x2023098E, &kLoadGameMenuMouseRect,
+ 0x04040409, 263, 142, kLoadGameMenuListBoxRect,
+ 0x10924C03, 0, 263, 48, kLoadGameMenuTextEditRect,
+ 0x0BC600A3, 0x0F960021) {
+
+}
+
+void LoadGameMenu::performAction() {
+ ((MenuModule*)_parentModule)->setLoadgameInfo(_listBox->getCurrIndex());
+ leaveScene(0);
+}
+
+static const uint32 kDeleteGameMenuButtonFileHashes[] = {
+ 0x8198E268, 0xDD0C4620, 0x81296520,
+ 0x8D284211, 0x8C004621, 0x07294020
+};
+
+static const NRect kDeleteGameMenuButtonCollisionBounds[] = {
+ NRect(518, 46, 595, 91),
+ NRect(524, 322, 599, 369),
+ NRect(395, 40, 462, 127),
+ NRect(405, 126, 460, 185),
+ NRect(397, 205, 456, 273),
+ NRect(395, 278, 452, 372)
+};
+
+static const NRect kDeleteGameMenuListBoxRect(0, 0, 320, 271);
+static const NRect kDeleteGameMenuTextEditRect(0, 0, 320, 17);
+
+DeleteGameMenu::DeleteGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList)
+ : GameStateMenu(vm, parentModule, savegameList, kDeleteGameMenuButtonFileHashes, kDeleteGameMenuButtonCollisionBounds,
+ 0x4080E01C, 0x728523ED,
+ 0x0E018400, NULL,
+ 0xA5584211, 61, 64, kDeleteGameMenuListBoxRect,
+ 0x250A3060, 0, 49, 414, kDeleteGameMenuTextEditRect,
+ 0x80083C01, 0x84181E81) {
+
+}
+
+void DeleteGameMenu::performAction() {
+ ((MenuModule*)_parentModule)->setDeletegameInfo(_listBox->getCurrIndex());
+ leaveScene(0);
+}
+
+QueryOverwriteMenu::QueryOverwriteMenu(NeverhoodEngine *vm, Module *parentModule, const Common::String &description)
+ : Scene(vm, parentModule) {
+
+ static const uint32 kQueryOverwriteMenuButtonFileHashes[] = {
+ 0x90312400,
+ 0x94C22A22
+ };
+
+ static const NRect kQueryOverwriteMenuCollisionBounds[] = {
+ NRect(145, 334, 260, 385),
+ NRect(365, 340, 477, 388)
+ };
+
+ setBackground(0x043692C4);
+ setPalette(0x043692C4);
+ insertScreenMouse(0x692C004B);
+ insertStaticSprite(0x08C0AC24, 200);
+
+ for (uint buttonIndex = 0; buttonIndex < 2; ++buttonIndex) {
+ Sprite *menuButton = insertSprite<MenuButton>(this, buttonIndex,
+ kQueryOverwriteMenuButtonFileHashes[buttonIndex], kQueryOverwriteMenuCollisionBounds[buttonIndex]);
+ addCollisionSprite(menuButton);
+ }
+
+ // Draw the query text to the background, each text line is centered
+ // NOTE The original had this text in its own class
+ FontSurface *fontSurface = new FontSurface(_vm, 0x94188D4D, 32, 7, 32, 11, 17);
+ Common::StringArray textLines;
+ textLines.push_back(description);
+ textLines.push_back("Game exists.");
+ textLines.push_back("Overwrite it?");
+ for (uint i = 0; i < textLines.size(); ++i)
+ fontSurface->drawString(_background->getSurface(), 106 + (423 - textLines[i].size() * 11) / 2,
+ 127 + 31 + i * 17, (const byte*)textLines[i].c_str());
+ delete fontSurface;
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&QueryOverwriteMenu::handleMessage);
+}
+
+uint32 QueryOverwriteMenu::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ // Handle menu button click
+ leaveScene(param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/menumodule.h b/engines/neverhood/menumodule.h
new file mode 100644
index 0000000000..08858ad204
--- /dev/null
+++ b/engines/neverhood/menumodule.h
@@ -0,0 +1,265 @@
+/* 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 NEVERHOOD_MENUMODULE_H
+#define NEVERHOOD_MENUMODULE_H
+
+#include "common/str.h"
+#include "common/str-array.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+struct SavegameItem {
+ int slotNum;
+ Common::String description;
+};
+
+typedef Common::Array<SavegameItem> SavegameList;
+
+class MenuModule : public Module {
+public:
+ MenuModule(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~MenuModule();
+ void setLoadgameInfo(uint index);
+ void setSavegameInfo(const Common::String &description, uint index, bool newSavegame);
+ void setDeletegameInfo(uint index);
+protected:
+ int _sceneNum;
+ byte *_savedPaletteData;
+ SavegameList *_savegameList;
+ Common::String _savegameDescription;
+ int _savegameSlot;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createLoadGameMenu();
+ void createSaveGameMenu();
+ void createDeleteGameMenu();
+ void handleLoadGameMenuAction(bool doLoad);
+ void handleSaveGameMenuAction(bool doSave, bool doQuery);
+ void handleDeleteGameMenuAction(bool doDelete);
+ void loadSavegameList();
+};
+
+class MenuButton : public StaticSprite {
+public:
+ MenuButton(NeverhoodEngine *vm, Scene *parentScene, uint buttonIndex, uint32 fileHash, const NRect &collisionBounds);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ uint _buttonIndex;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class MainMenu : public Scene {
+public:
+ MainMenu(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ Sprite *_musicOnButton;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class CreditsScene : public Scene {
+public:
+ CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAbort);
+ virtual ~CreditsScene();
+protected:
+ int _screenIndex;
+ int _countdown;
+ MusicResource *_musicResource;
+ uint32 _ticksTime;
+ uint32 _ticksDuration;
+ bool _canAbort;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Widget;
+class GameStateMenu;
+
+class Widget : public StaticSprite {
+public:
+ Widget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int baseObjectPriority, int baseSurfacePriority);
+ virtual void onClick();
+ virtual void setPosition(int16 x, int16 y);
+ virtual void refreshPosition();
+ virtual void initialize();
+ virtual int16 getWidth();
+ virtual int16 getHeight();
+ virtual void enterWidget();
+ virtual void exitWidget();
+protected:
+ GameStateMenu *_parentScene;
+ int _baseObjectPriority;
+ int _baseSurfacePriority;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class TextLabelWidget : public Widget {
+public:
+ TextLabelWidget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int baseObjectPriority, int baseSurfacePriority,
+ const byte *string, int stringLen, BaseSurface *drawSurface, int16 tx, int16 ty, FontSurface *fontSurface);
+ virtual void initialize();
+ virtual int16 getWidth();
+ virtual int16 getHeight();
+ void drawString(int maxStringLength);
+ void clear();
+ void setString(const byte *string, int stringLen);
+ FontSurface *getFontSurface() const { return _fontSurface; }
+protected:
+ BaseSurface *_drawSurface;
+ int16 _tx, _ty;
+ FontSurface *_fontSurface;
+ const byte *_string;
+ int _stringLen;
+};
+
+class TextEditWidget : public Widget {
+public:
+ TextEditWidget(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ int maxStringLength, FontSurface *fontSurface, uint32 fileHash, const NRect &rect);
+ ~TextEditWidget();
+ virtual void onClick();
+ virtual void initialize();
+ virtual void enterWidget();
+ virtual void exitWidget();
+ void setCursor(uint32 cursorFileHash, int16 cursorWidth, int16 cursorHeight);
+ void drawCursor();
+ void updateString();
+ Common::String& getString();
+ void setString(const Common::String &string);
+ void handleAsciiKey(char ch);
+ void handleKeyDown(Common::KeyCode keyCode);
+ void refresh();
+ void setReadOnly(bool value) { _readOnly = value; }
+ bool isReadOnly() const { return _readOnly; }
+ bool isModified() const { return _modified; }
+protected:
+ NRect _rect;
+ uint32 _fileHash;
+ int _maxVisibleChars;
+ int _maxStringLength;
+ int _cursorPos;
+ int _cursorTicks;
+ Common::String _entryString;
+ FontSurface *_fontSurface;
+ TextLabelWidget *_textLabelWidget;
+ BaseSurface *_cursorSurface;
+ uint32 _cursorFileHash;
+ int16 _cursorWidth, _cursorHeight;
+ bool _modified;
+ bool _readOnly;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SavegameListBox : public Widget {
+public:
+ SavegameListBox(NeverhoodEngine *vm, int16 x, int16 y, GameStateMenu *parentScene,
+ SavegameList *savegameList, FontSurface *fontSurface, uint32 bgFileHash, const NRect &rect);
+ virtual void onClick();
+ virtual void initialize();
+ void buildItems();
+ void drawItems();
+ void refresh();
+ void scrollUp();
+ void scrollDown();
+ void pageUp();
+ void pageDown();
+ uint getCurrIndex() const { return _currIndex; }
+protected:
+ const NRect _rect;
+ uint32 _bgFileHash;
+ int _maxStringLength;
+ Common::Array<TextLabelWidget*> _textLabelItems;
+ int _firstVisibleItem;
+ int _lastVisibleItem;
+ SavegameList *_savegameList;
+ FontSurface *_fontSurface;
+ uint _currIndex;
+ int _maxVisibleItemsCount;
+};
+
+class GameStateMenu : public Scene {
+public:
+ GameStateMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList,
+ const uint32 *buttonFileHashes, const NRect *buttonCollisionBounds,
+ uint32 backgroundFileHash, uint32 fontFileHash,
+ uint32 mouseFileHash, const NRect *mouseRect,
+ uint32 listBoxBackgroundFileHash, int16 listBoxX, int16 listBoxY, const NRect &listBoxRect,
+ uint32 textEditBackgroundFileHash, uint32 textEditCursorFileHash, int16 textEditX, int16 textEditY, const NRect &textEditRect,
+ uint32 textFileHash1, uint32 textFileHash2);
+ virtual ~GameStateMenu();
+ NPoint getMousePos();
+ virtual void setCurrWidget(Widget *newWidget);
+ virtual Widget *getCurrWidget() { return _currWidget; }
+ virtual void refreshDescriptionEdit();
+protected:
+ Widget *_currWidget;
+ SavegameList *_savegameList;
+ FontSurface *_fontSurface;
+ SavegameListBox *_listBox;
+ TextEditWidget *_textEditWidget;
+ Common::String _savegameDescription;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ virtual void performAction();
+};
+
+class SaveGameMenu : public GameStateMenu {
+public:
+ SaveGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList);
+protected:
+ virtual void performAction();
+};
+
+class LoadGameMenu : public GameStateMenu {
+public:
+ LoadGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList);
+protected:
+ virtual void performAction();
+};
+
+class DeleteGameMenu : public GameStateMenu {
+public:
+ DeleteGameMenu(NeverhoodEngine *vm, Module *parentModule, SavegameList *savegameList);
+protected:
+ virtual void performAction();
+};
+
+class QueryOverwriteMenu : public Scene {
+public:
+ QueryOverwriteMenu(NeverhoodEngine *vm, Module *parentModule, const Common::String &description);
+protected:
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MENUMODULE_H */
diff --git a/engines/neverhood/messages.h b/engines/neverhood/messages.h
new file mode 100644
index 0000000000..78c66868d5
--- /dev/null
+++ b/engines/neverhood/messages.h
@@ -0,0 +1,37 @@
+/* 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 NEVERHOOD_MESSAGES_H
+#define NEVERHOOD_MESSAGES_H
+
+namespace Neverhood {
+
+enum NeverhoodMessage {
+ NM_KLAYMEN_PICKUP = 0x4812,
+ NM_KLAYMEN_PRESS_BUTTON = 0x4816,
+ NM_KLAYMEN_INSERT_DISK = 0x481A,
+ NM_KLAYMEN_RELEASE_LEVER = 0x4827
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MESSAGES_H */
diff --git a/engines/neverhood/microtiles.cpp b/engines/neverhood/microtiles.cpp
new file mode 100644
index 0000000000..3dd6475046
--- /dev/null
+++ b/engines/neverhood/microtiles.cpp
@@ -0,0 +1,160 @@
+/* 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 "neverhood/microtiles.h"
+
+namespace Neverhood {
+
+MicroTileArray::MicroTileArray(int16 width, int16 height) {
+ _tilesW = (width / TileSize) + ((width % TileSize) > 0 ? 1 : 0);
+ _tilesH = (height / TileSize) + ((height % TileSize) > 0 ? 1 : 0);
+ _tiles = new BoundingBox[_tilesW * _tilesH];
+ clear();
+}
+
+MicroTileArray::~MicroTileArray() {
+ delete[] _tiles;
+}
+
+void MicroTileArray::addRect(Common::Rect r) {
+
+ int ux0, uy0, ux1, uy1;
+ int tx0, ty0, tx1, ty1;
+ int ix0, iy0, ix1, iy1;
+
+ r.clip(Common::Rect(0, 0, 639, 479));
+
+ ux0 = r.left / TileSize;
+ uy0 = r.top / TileSize;
+ ux1 = r.right / TileSize;
+ uy1 = r.bottom / TileSize;
+
+ tx0 = r.left % TileSize;
+ ty0 = r.top % TileSize;
+ tx1 = r.right % TileSize;
+ ty1 = r.bottom % TileSize;
+
+ for (int yc = uy0; yc <= uy1; yc++) {
+ for (int xc = ux0; xc <= ux1; xc++) {
+ ix0 = (xc == ux0) ? tx0 : 0;
+ ix1 = (xc == ux1) ? tx1 : TileSize - 1;
+ iy0 = (yc == uy0) ? ty0 : 0;
+ iy1 = (yc == uy1) ? ty1 : TileSize - 1;
+ updateBoundingBox(_tiles[xc + yc * _tilesW], ix0, iy0, ix1, iy1);
+ }
+ }
+
+}
+
+void MicroTileArray::clear() {
+ memset(_tiles, 0, _tilesW * _tilesH * sizeof(BoundingBox));
+}
+
+byte MicroTileArray::TileX0(const BoundingBox &boundingBox) {
+ return (boundingBox >> 24) & 0xFF;
+}
+
+byte MicroTileArray::TileY0(const BoundingBox &boundingBox) {
+ return (boundingBox >> 16) & 0xFF;
+}
+
+byte MicroTileArray::TileX1(const BoundingBox &boundingBox) {
+ return (boundingBox >> 8) & 0xFF;
+}
+
+byte MicroTileArray::TileY1(const BoundingBox &boundingBox) {
+ return boundingBox & 0xFF;
+}
+
+bool MicroTileArray::isBoundingBoxEmpty(const BoundingBox &boundingBox) {
+ return boundingBox == EmptyBoundingBox;
+}
+
+bool MicroTileArray::isBoundingBoxFull(const BoundingBox &boundingBox) {
+ return boundingBox == FullBoundingBox;
+}
+
+void MicroTileArray::setBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1) {
+ boundingBox = (x0 << 24) | (y0 << 16) | (x1 << 8) | y1;
+}
+
+void MicroTileArray::updateBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1) {
+ if (!isBoundingBoxEmpty(boundingBox)) {
+ x0 = MIN(TileX0(boundingBox), x0);
+ y0 = MIN(TileY0(boundingBox), y0);
+ x1 = MAX(TileX1(boundingBox), x1);
+ y1 = MAX(TileY1(boundingBox), y1);
+ }
+ setBoundingBox(boundingBox, x0, y0, x1, y1);
+}
+
+RectangleList *MicroTileArray::getRectangles() {
+
+ RectangleList *rects = new RectangleList();
+
+ int x, y;
+ int x0, y0, x1, y1;
+ int i = 0;
+
+ for (y = 0; y < _tilesH; ++y) {
+ for (x = 0; x < _tilesW; ++x) {
+ int finish = 0;
+ BoundingBox boundingBox = _tiles[i];
+
+ if (isBoundingBoxEmpty(boundingBox)) {
+ ++i;
+ continue;
+ }
+
+ x0 = (x * TileSize) + TileX0(boundingBox);
+ y0 = (y * TileSize) + TileY0(boundingBox);
+ y1 = (y * TileSize) + TileY1(boundingBox);
+
+ if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
+ while (!finish) {
+ ++x;
+ ++i;
+ if (x == _tilesW || i >= _tilesW * _tilesH ||
+ TileY0(_tiles[i]) != TileY0(boundingBox) ||
+ TileY1(_tiles[i]) != TileY1(boundingBox) ||
+ TileX0(_tiles[i]) != 0)
+ {
+ --x;
+ --i;
+ finish = 1;
+ }
+ }
+ }
+
+ x1 = (x * TileSize) + TileX1(_tiles[i]);
+
+ rects->push_back(Common::Rect(x0, y0, x1 + 1, y1 + 1));
+
+ ++i;
+ }
+ }
+
+ return rects;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/microtiles.h b/engines/neverhood/microtiles.h
new file mode 100644
index 0000000000..29af3d956a
--- /dev/null
+++ b/engines/neverhood/microtiles.h
@@ -0,0 +1,64 @@
+/* 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 NEVERHOOD_MICROTILES_H
+#define NEVERHOOD_MICROTILES_H
+
+#include "common/scummsys.h"
+#include "common/list.h"
+#include "common/util.h"
+#include "common/rect.h"
+
+namespace Neverhood {
+
+typedef uint32 BoundingBox;
+
+const BoundingBox FullBoundingBox = 0x00001F1F;
+const BoundingBox EmptyBoundingBox = 0x00000000;
+const int TileSize = 32;
+
+typedef Common::List<Common::Rect> RectangleList;
+
+class MicroTileArray {
+public:
+ MicroTileArray(int16 width, int16 height);
+ ~MicroTileArray();
+ void addRect(Common::Rect r);
+ void clear();
+ RectangleList *getRectangles();
+protected:
+ BoundingBox *_tiles;
+ int16 _tilesW, _tilesH;
+ byte TileX0(const BoundingBox &boundingBox);
+ byte TileY0(const BoundingBox &boundingBox);
+ byte TileX1(const BoundingBox &boundingBox);
+ byte TileY1(const BoundingBox &boundingBox);
+ bool isBoundingBoxEmpty(const BoundingBox &boundingBox);
+ bool isBoundingBoxFull(const BoundingBox &boundingBox);
+ void setBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1);
+ void updateBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1);
+};
+
+} // namespace Neverhood
+
+#endif // NEVERHOOD_MICROTILES_H
diff --git a/engines/neverhood/module.cpp b/engines/neverhood/module.cpp
new file mode 100644
index 0000000000..e384b5a4d2
--- /dev/null
+++ b/engines/neverhood/module.cpp
@@ -0,0 +1,123 @@
+/* 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 "neverhood/module.h"
+#include "neverhood/navigationscene.h"
+#include "neverhood/smackerscene.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1500.h"
+
+namespace Neverhood {
+
+Module::Module(NeverhoodEngine *vm, Module *parentModule)
+ : Entity(vm, 0), _parentModule(parentModule), _childObject(NULL),
+ _done(false), _sceneType(kSceneTypeNormal) {
+
+ SetMessageHandler(&Module::handleMessage);
+
+}
+
+Module::~Module() {
+ delete _childObject;
+}
+
+void Module::draw() {
+ if (_childObject)
+ _childObject->draw();
+}
+
+uint32 Module::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x0008:
+ sendMessage(_parentModule, 8, 0);
+ return 0;
+ case 0x1009:
+ _moduleResult = param.asInteger();
+ _done = true;
+ return 0;
+ case 0x100A:
+ case 0x1023:
+ case 0x1024:
+ // Unused resource preloading messages
+ return 0;
+ default:
+ if (_childObject && sender == _parentModule)
+ return sender->sendMessage(_childObject, messageNum, param);
+ }
+ return 0;
+}
+
+NavigationScene *Module::navigationScene() {
+ return (NavigationScene*)_childObject;
+}
+
+void Module::createNavigationScene(uint32 navigationListId, int navigationIndex, const byte *itemsTypes) {
+ _sceneType = kSceneTypeNavigation;
+ _childObject = new NavigationScene(_vm, this, navigationListId, navigationIndex, itemsTypes);
+}
+
+void Module::createSmackerScene(uint32 fileHash, bool doubleSurface, bool canSkip, bool canAbort) {
+ _sceneType = kSceneTypeSmacker;
+ SmackerScene *smackerScene = new SmackerScene(_vm, this, doubleSurface, canSkip, canAbort);
+ smackerScene->setFileHash(fileHash);
+ smackerScene->nextVideo();
+ _childObject = smackerScene;
+}
+
+void Module::createSmackerScene(const uint32 *fileHashList, bool doubleSurface, bool canSkip, bool canAbort) {
+ _sceneType = kSceneTypeSmacker;
+ SmackerScene *smackerScene = new SmackerScene(_vm, this, doubleSurface, canSkip, canAbort);
+ smackerScene->setFileHashList(fileHashList);
+ smackerScene->nextVideo();
+ _childObject = smackerScene;
+}
+
+void Module::createStaticScene(uint32 backgroundFileHash, uint32 cursorFileHash) {
+ _childObject = new StaticScene(_vm, this, backgroundFileHash, cursorFileHash);
+}
+
+void Module::createDemoScene() {
+ _childObject = new Scene1501(_vm, this, 0x0009B624, 0, 288, 0);
+}
+
+bool Module::updateChild() {
+ if (_childObject) {
+ _childObject->handleUpdate();
+ if (_done) {
+ _done = false;
+ // Save the last area type if it's a NavigationScene for further processing
+ if (_sceneType == kSceneTypeNavigation)
+ _navigationAreaType = navigationScene()->getNavigationAreaType();
+ delete _childObject;
+ _childObject = NULL;
+ _sceneType = kSceneTypeNormal;
+ return false;
+ }
+ }
+ return true;
+}
+
+void Module::leaveModule(uint32 result) {
+ sendMessage(_parentModule, 0x1009, result);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/module.h b/engines/neverhood/module.h
new file mode 100644
index 0000000000..ba1e1fa3db
--- /dev/null
+++ b/engines/neverhood/module.h
@@ -0,0 +1,72 @@
+/* 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.
+ *
+ */
+
+// TODO: I couldn't come up with a better name than 'Module' so far
+
+#ifndef NEVERHOOD_MODULE_H
+#define NEVERHOOD_MODULE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/background.h"
+#include "neverhood/entity.h"
+#include "neverhood/graphics.h"
+#include "neverhood/mouse.h"
+#include "neverhood/palette.h"
+#include "neverhood/screen.h"
+
+namespace Neverhood {
+
+class NavigationScene;
+
+enum SceneType {
+ kSceneTypeNormal,
+ kSceneTypeSmacker,
+ kSceneTypeNavigation
+};
+
+class Module : public Entity {
+public:
+ Module(NeverhoodEngine *vm, Module *parentModule);
+ virtual ~Module();
+ virtual void draw();
+
+ Entity *_childObject;
+protected:
+ Module *_parentModule;
+ bool _done;
+ uint32 _moduleResult;
+ SceneType _sceneType;
+ int _navigationAreaType;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ NavigationScene *navigationScene();
+ void createNavigationScene(uint32 navigationListId, int navigationIndex, const byte *itemsTypes = NULL);
+ void createSmackerScene(uint32 fileHash, bool doubleSurface, bool canSkip, bool canAbort);
+ void createSmackerScene(const uint32 *fileHashList, bool doubleSurface, bool canSkip, bool canAbort);
+ void createStaticScene(uint32 backgroundFileHash, uint32 cursorFileHash);
+ void createDemoScene();
+ bool updateChild();
+ void leaveModule(uint32 result);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULE_H */
diff --git a/engines/neverhood/module.mk b/engines/neverhood/module.mk
new file mode 100644
index 0000000000..030c78a407
--- /dev/null
+++ b/engines/neverhood/module.mk
@@ -0,0 +1,59 @@
+MODULE := engines/neverhood
+
+MODULE_OBJS = \
+ background.o \
+ blbarchive.o \
+ console.o \
+ detection.o \
+ diskplayerscene.o \
+ entity.o \
+ gamemodule.o \
+ gamevars.o \
+ graphics.o \
+ klaymen.o \
+ menumodule.o \
+ microtiles.o \
+ module.o \
+ modules/module1000.o \
+ modules/module1100.o \
+ modules/module1200.o \
+ modules/module1300.o \
+ modules/module1400.o \
+ modules/module1500.o \
+ modules/module1600.o \
+ modules/module1700.o \
+ modules/module1800.o \
+ modules/module1900.o \
+ modules/module2000.o \
+ modules/module2100.o \
+ modules/module2200.o \
+ modules/module2300.o \
+ modules/module2400.o \
+ modules/module2500.o \
+ modules/module2600.o \
+ modules/module2700.o \
+ modules/module2800.o \
+ modules/module2900.o \
+ modules/module3000.o \
+ mouse.o \
+ navigationscene.o \
+ neverhood.o \
+ palette.o \
+ resource.o \
+ resourceman.o \
+ saveload.o \
+ scene.o \
+ screen.o \
+ smackerscene.o \
+ smackerplayer.o \
+ sound.o \
+ sprite.o \
+ staticdata.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_NEVERHOOD), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
new file mode 100644
index 0000000000..a28d934cf6
--- /dev/null
+++ b/engines/neverhood/modules/module1000.cpp
@@ -0,0 +1,1697 @@
+/* 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 "neverhood/modules/module1000.h"
+
+namespace Neverhood {
+
+Module1000::Module1000(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _musicFileHash = getGlobalVar(V_ENTRANCE_OPEN) ? 0x81106480 : 0x00103144;
+
+ _vm->_soundMan->addMusic(0x03294419, 0x061880C6);
+ _vm->_soundMan->addMusic(0x03294419, _musicFileHash);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 0)
+ createScene(0, 0);
+ else if (which == 1)
+ createScene(1, 1);
+
+}
+
+Module1000::~Module1000() {
+ _vm->_soundMan->deleteMusicGroup(0x03294419);
+}
+
+void Module1000::createScene(int sceneNum, int which) {
+ debug(1, "Module1000::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->startMusic(0x061880C6, 0, 0);
+ _childObject = new Scene1001(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->startMusic(0x061880C6, 0, 0);
+ _childObject = new Scene1002(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->startMusic(0x061880C6, 0, 0);
+ createStaticScene(0xC084110C, 0x41108C00);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->_soundMan->stopMusic(0x061880C6, 0, 2);
+ _childObject = new Scene1004(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->stopMusic(0x061880C6, 0, 0);
+ _vm->_soundMan->startMusic(_musicFileHash, 0, 0);
+ _childObject = new Scene1005(_vm, this, which);
+ break;
+ }
+ SetUpdateHandler(&Module1000::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1000::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 2)
+ createScene(2, 0);
+ else
+ createScene(1, 0);
+ break;
+ case 1:
+ if (_moduleResult == 1)
+ leaveModule(0);
+ else if (_moduleResult == 2) {
+ if (_vm->isDemo())
+ // Demo version returns to the same scene
+ createScene(1, 2);
+ else
+ createScene(3, 0);
+ } else
+ createScene(0, 1);
+ break;
+ case 2:
+ createScene(0, 2);
+ break;
+ case 3:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else
+ createScene(1, 2);
+ break;
+ case 4:
+ _vm->_soundMan->stopMusic(_musicFileHash, 0, 1);
+ createScene(3, 1);
+ break;
+ }
+ }
+}
+
+// Scene1001
+
+AsScene1001Door::AsScene1001Door(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface(800, 137, 242);
+ _x = 726;
+ _y = 440;
+ stShowIdleDoor();
+ loadSound(1, 0xED403E03);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1001Door::handleMessage);
+}
+
+uint32 AsScene1001Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ hammerHitsDoor();
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return 0;
+}
+
+void AsScene1001Door::hammerHitsDoor() {
+ switch (getGlobalVar(V_DOOR_STATUS)) {
+ case 0:
+ case 1:
+ playSound(0, 0x65482F03);
+ startAnimation(0x624C0498, 1, 3);
+ NextState(&AsScene1001Door::stShowIdleDoor);
+ break;
+ case 2:
+ playSound(1);
+ startAnimation(0x624C0498, 6, 6);
+ NextState(&AsScene1001Door::stBustedDoorMove);
+ break;
+ default:
+ // Nothing
+ break;
+ }
+ incGlobalVar(V_DOOR_STATUS, 1);
+}
+
+void AsScene1001Door::stShowIdleDoor() {
+ switch (getGlobalVar(V_DOOR_STATUS)) {
+ case 1:
+ startAnimation(0x624C0498, 4, -1);
+ _newStickFrameIndex = 4;
+ break;
+ case 2:
+ startAnimation(0x624C0498, 1, -1);
+ _newStickFrameIndex = 1;
+ break;
+ case 3:
+ stopAnimation();
+ setVisible(false);
+ break;
+ default:
+ startAnimation(0x624C0498, 0, -1);
+ _newStickFrameIndex = 0;
+ break;
+ }
+}
+
+void AsScene1001Door::stBustedDoorMove() {
+ setGlobalVar(V_DOOR_BUSTED, 1);
+ startAnimation(0x624C0498, 6, 6);
+ NextState(&AsScene1001Door::stBustedDoorGone);
+ _x = 30;
+}
+
+void AsScene1001Door::stBustedDoorGone() {
+ playSound(0);
+ stopAnimation();
+ setVisible(false);
+}
+
+AsScene1001Hammer::AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor)
+ : AnimatedSprite(vm, 1100), _asDoor(asDoor) {
+
+ _x = 547;
+ _y = 206;
+ createSurface(900, 177, 192);
+ startAnimation(0x022C90D4, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1001Hammer::handleMessage);
+}
+
+uint32 AsScene1001Hammer::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x00352100)
+ sendMessage(_asDoor, 0x2000, 0);
+ else if (param.asInteger() == 0x0A1A0109)
+ playSound(0, 0x66410886);
+ break;
+ case 0x2000:
+ startAnimation(0x022C90D4, 1, -1);
+ playSound(0, 0xE741020A);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ break;
+ }
+ return 0;
+}
+
+AsScene1001Window::AsScene1001Window(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200) {
+
+ _x = 320;
+ _y = 240;
+ createSurface(100, 66, 129);
+ startAnimation(0xC68C2299, 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1001Window::handleMessage);
+}
+
+uint32 AsScene1001Window::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0E0A1410)
+ playSound(0, 0x60803F10);
+ break;
+ case 0x2001:
+ startAnimation(0xC68C2299, 0, -1);
+ break;
+ case 0x3002:
+ SetMessageHandler(NULL);
+ setGlobalVar(V_WINDOW_OPEN, 1);
+ setVisible(false);
+ break;
+ }
+ return 0;
+}
+
+AsScene1001Lever::AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(1010, 71, 73);
+ setDoDeltaX(deltaXType);
+ startAnimation(0x04A98C36, 0, -1);
+ _newStickFrameIndex = 0;
+ _x = x;
+ _y = y;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1001Lever::handleMessage);
+}
+
+uint32 AsScene1001Lever::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x00C0C444)
+ sendMessage(_parentScene, 0x480F, 0);
+ else if (param.asInteger() == 0xC41A02C0)
+ playSound(0, 0x40581882);
+ break;
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x3002:
+ startAnimation(0x04A98C36, 0, -1);
+ _newStickFrameIndex = 0;
+ break;
+ case 0x480F:
+ startAnimation(0x04A98C36, 0, -1);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+SsCommonButtonSprite::SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash)
+ : StaticSprite(vm, fileHash, surfacePriority), _parentScene(parentScene), _countdown(0) {
+
+ _priority = 1100;
+ _soundFileHash = soundFileHash ? soundFileHash : 0x44141000;
+ setVisible(false);
+ SetUpdateHandler(&SsCommonButtonSprite::update);
+ SetMessageHandler(&SsCommonButtonSprite::handleMessage);
+}
+
+void SsCommonButtonSprite::update() {
+ if (_countdown != 0 && (--_countdown) == 0)
+ setVisible(false);
+}
+
+uint32 SsCommonButtonSprite::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x480B:
+ sendMessage(_parentScene, 0x480B, 0);
+ setVisible(true);
+ _countdown = 8;
+ playSound(0, _soundFileHash);
+ break;
+ }
+ return messageResult;
+}
+
+Scene1001::Scene1001(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _asDoor(NULL), _asWindow(NULL) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene1001::handleMessage);
+
+ setHitRects(0x004B4860);
+ setBackground(0x4086520E);
+ setPalette(0x4086520E);
+ insertScreenMouse(0x6520A400);
+
+ if (which < 0) {
+ // Restoring game
+ setRectList(0x004B49F0);
+ insertKlaymen<KmScene1001>(200, 433);
+ setMessageList(0x004B4888);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ setRectList(0x004B49F0);
+ insertKlaymen<KmScene1001>(640, 433);
+ setMessageList(0x004B4898);
+ } else if (which == 2) {
+ // Klaymen returning from looking through the window
+ setRectList(0x004B49F0);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene1001>(390, 433);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene1001>(300, 433);
+ }
+ setMessageList(0x004B4970);
+ } else {
+ // Klaymen sleeping
+ setRectList(0x004B4A00);
+ insertKlaymen<KmScene1001>(200, 433);
+ setMessageList(0x004B4890);
+ }
+
+ tempSprite = insertStaticSprite(0x2080A3A8, 1300);
+
+ _klaymen->setClipRect(0, 0, tempSprite->getDrawRect().x2(), 480);
+
+ if (!getGlobalVar(V_DOOR_BUSTED)) {
+ _asDoor = insertSprite<AsScene1001Door>();
+ _asDoor->setClipRect(0, 0, tempSprite->getDrawRect().x2(), 480);
+ }
+
+ _asLever = insertSprite<AsScene1001Lever>(this, 150, 433, 1);
+
+ insertStaticSprite(0x809861A6, 950);
+ insertStaticSprite(0x89C03848, 1100);
+
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x15288120, 100, 0);
+
+ if (!getGlobalVar(V_WINDOW_OPEN)) {
+ tempSprite = insertStaticSprite(0x8C066150, 200);
+ _asWindow = insertSprite<AsScene1001Window>();
+ _asWindow->setClipRect(tempSprite->getDrawRect());
+ }
+
+ _asHammer = insertSprite<AsScene1001Hammer>(_asDoor);
+
+}
+
+Scene1001::~Scene1001() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX());
+}
+
+uint32 Scene1001::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x00342624) {
+ sendEntityMessage(_klaymen, 0x1014, _asLever);
+ setMessageList2(0x004B4910);
+ messageResult = 1;
+ } else if (param.asInteger() == 0x21E64A00) {
+ if (getGlobalVar(V_DOOR_BUSTED)) {
+ setMessageList(0x004B48A8);
+ } else {
+ setMessageList(0x004B48C8);
+ }
+ messageResult = 1;
+ } else if (param.asInteger() == 0x040424D0) {
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ } else if (param.asInteger() == 0x80006358) {
+ if (getGlobalVar(V_WINDOW_OPEN)) {
+ setMessageList(0x004B4938);
+ } else {
+ setMessageList(0x004B4960);
+ }
+ }
+ break;
+ case 0x2002:
+ setRectList(0x004B49F0);
+ break;
+ case 0x480B:
+ sendMessage(_asWindow, 0x2001, 0);
+ break;
+ case 0x480F:
+ sendMessage(_asHammer, 0x2000, 0);
+ break;
+ }
+ return messageResult;
+}
+
+// Scene1002
+
+AsScene1002Ring::AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _isSpecial(isSpecial) {
+
+ SetUpdateHandler(&AsScene1002Ring::update);
+
+ if (_isSpecial) {
+ createSurface(990, 68, 314);
+ if (isRingLow) {
+ startAnimation(0x04103090, 0, -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+ } else {
+ startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingIdle);
+ }
+ } else {
+ createSurface(990, 68, 138);
+ startAnimation(0xA85C4011, _vm->_rnd->getRandomNumber(15), -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingIdle);
+ }
+
+ setClipRect(0, clipY1, 640, 480);
+
+ _x = x;
+ _y = y;
+
+ setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+
+}
+
+void AsScene1002Ring::update() {
+ updateAnim();
+ updatePosition();
+}
+
+uint32 AsScene1002Ring::hmRingIdle(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4806:
+ setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+ sendMessage(_parentScene, 0x4806, 0);
+ SetMessageHandler(&AsScene1002Ring::hmRingPulled1);
+ startAnimation(_isSpecial ? 0x87502558 : 0x80DD4010, 0, -1);
+ break;
+ case 0x480F:
+ setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+ sendMessage(_parentScene, 0x480F, 0);
+ SetMessageHandler(&AsScene1002Ring::hmRingPulled2);
+ startAnimation(0x861A2020, 0, -1);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ startAnimation(_isSpecial ? 0x78D0A812 : 0xB85D2A10, 0, -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+ break;
+ case 0x4807:
+ sendMessage(_parentScene, 0x4807, 0);
+ setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+ startAnimation(0x8258A030, 0, -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingReleased);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ startAnimation(0x04103090, 0, -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingHangingLow);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4807:
+ sendMessage(_parentScene, 0x4807, 0);
+ setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+ startAnimation(0x8258A030, 0, -1);
+ SetMessageHandler(&AsScene1002Ring::hmRingReleased);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002Ring::hmRingReleased(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmRingIdle(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x05410F72)
+ playSound(0, 0x21EE40A9);
+ break;
+ case 0x3002:
+ startAnimation(0xA85C4011, 0, -1);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1002Door::AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect)
+ : StaticSprite(vm, 1200) {
+
+ loadSprite(0x1052370F, kSLFDefDrawOffset | kSLFSetPosition, 800, 526, getGlobalVar(V_FLYTRAP_RING_DOOR) ? 49 : 239);
+ setClipRect(clipRect);
+ SetUpdateHandler(&AsScene1002Door::update);
+ SetMessageHandler(&AsScene1002Door::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsScene1002Door::update() {
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 AsScene1002Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4808:
+ setGlobalVar(V_FLYTRAP_RING_DOOR, 1);
+ SetSpriteUpdate(&AsScene1002Door::suOpenDoor);
+ break;
+ case 0x4809:
+ setGlobalVar(V_FLYTRAP_RING_DOOR, 0);
+ SetSpriteUpdate(&AsScene1002Door::suCloseDoor);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1002Door::suOpenDoor() {
+ if (_y > 49) {
+ _y -= 8;
+ if (_y < 49) {
+ SetSpriteUpdate(NULL);
+ _y = 49;
+ }
+ _needRefresh = true;
+ }
+}
+
+void AsScene1002Door::suCloseDoor() {
+ if (_y < 239) {
+ _y += 8;
+ if (_y > 239) {
+ SetSpriteUpdate(NULL);
+ _y = 239;
+ }
+ _needRefresh = true;
+ }
+}
+
+AsScene1002BoxingGloveHitEffect::AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1400) {
+
+ createSurface(1025, 88, 165);
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1002BoxingGloveHitEffect::handleMessage);
+}
+
+uint32 AsScene1002BoxingGloveHitEffect::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2004:
+ _x = ((Sprite*)sender)->getX() - 98;
+ _y = ((Sprite*)sender)->getY() - 111;
+ startAnimation(0x0422255A, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1002DoorSpy::AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect)
+ : AnimatedSprite(vm, 1300), _clipRect(clipRect), _parentScene(parentScene), _asDoor(asDoor), _asBoxingGloveHitEffect(asScene1002BoxingGloveHitEffect) {
+
+ createSurface(800, 136, 147);
+ setClipRect(clipRect);
+ suDoorSpy();
+ loadSound(0, 0xC0C40298);
+ startAnimation(0x586C1D48, 0, 0);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
+ SetSpriteUpdate(&AsScene1002DoorSpy::suDoorSpy);
+}
+
+uint32 AsScene1002DoorSpy::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xA61CA1C2)
+ sendMessage(_asBoxingGloveHitEffect, 0x2004, 0);
+ else if (param.asInteger() == 0x14CE0620)
+ playSound(0);
+ break;
+ case 0x2003:
+ stDoorSpyBoxingGlove();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002DoorSpy::hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1002DoorSpy::suDoorSpy() {
+ _x = _asDoor->getX() + 34;
+ _y = _asDoor->getY() + 175;
+}
+
+void AsScene1002DoorSpy::stDoorSpyIdle() {
+ setClipRect(_clipRect);
+ _parentScene->setSurfacePriority(getSurface(), 800);
+ startAnimation(0x586C1D48, 0, 0);
+ SetMessageHandler(&AsScene1002DoorSpy::handleMessage);
+}
+
+void AsScene1002DoorSpy::stDoorSpyBoxingGlove() {
+ setClipRect(0, 0, 640, 480);
+ _parentScene->setSurfacePriority(getSurface(), 1200);
+ startAnimation(0x586C1D48, 1, -1);
+ SetMessageHandler(&AsScene1002DoorSpy::hmDoorSpyAnimation);
+ NextState(&AsScene1002DoorSpy::stDoorSpyIdle);
+}
+
+SsCommonPressButton::SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash)
+ : StaticSprite(vm, 1100), _parentScene(parentScene), _status(0), _countdown(0) {
+
+ _soundFileHash = soundFileHash != 0 ? soundFileHash : 0x44141000;
+ _fileHashes[0] = fileHash1;
+ _fileHashes[1] = fileHash2;
+ createSurface(surfacePriority, 40, 40);
+ loadSprite(fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+ setVisible(false);
+ SetUpdateHandler(&SsCommonPressButton::update);
+ SetMessageHandler(&SsCommonPressButton::handleMessage);
+}
+
+void SsCommonPressButton::setFileHashes(uint32 fileHash1, uint32 fileHash2) {
+ _fileHashes[0] = fileHash1;
+ _fileHashes[1] = fileHash2;
+ loadSprite(_status == 2 ? fileHash2 : fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+}
+
+void SsCommonPressButton::update() {
+ if (_countdown != 0 && (--_countdown) == 0) {
+ if (_status == 1) {
+ _status = 2;
+ loadSprite(_fileHashes[1], kSLFDefDrawOffset | kSLFDefPosition);
+ _countdown = 4;
+ } else if (_status == 2) {
+ _status = 3;
+ loadSprite(_fileHashes[0], kSLFDefDrawOffset | kSLFDefPosition);
+ _countdown = 4;
+ } else if (_status == 3) {
+ _status = 0;
+ setVisible(false);
+ }
+ }
+}
+
+uint32 SsCommonPressButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x480B:
+ sendMessage(_parentScene, 0x480B, 0);
+ _status = 1;
+ _countdown = 4;
+ setVisible(true);
+ playSound(0, _soundFileHash);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1002VenusFlyTrap::AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _klaymen(klaymen), _isSecond(isSecond), _countdown(0) {
+
+ createSurface(995, 175, 195);
+ if (!_isSecond) {
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+ setDoDeltaX(1);
+ _x = 366;
+ _y = 435;
+ stRingGrabbed();
+ } else {
+ _x = 174 + getGlobalVar(V_FLYTRAP_POSITION_1) * 32;
+ _y = 435;
+ stIdle();
+ }
+ } else {
+ _x = 186 + getGlobalVar(V_FLYTRAP_POSITION_2) * 32;
+ _y = 364;
+ if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE)) {
+ stRingGrabbed();
+ } else {
+ stIdle();
+ }
+ }
+ _flags = 4;
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+void AsScene1002VenusFlyTrap::update() {
+ if (_countdown != 0 && (--_countdown == 0))
+ gotoNextState();
+ AnimatedSprite::update();
+}
+
+void AsScene1002VenusFlyTrap::upIdle() {
+ if (_countdown == 0 && _klaymen->getX() - 20 > _x)
+ setDoDeltaX(1);
+ else if (_klaymen->getX() + 20 < _x)
+ setDoDeltaX(0);
+ update();
+}
+
+uint32 AsScene1002VenusFlyTrap::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x000890C4)
+ playSound(0, 0xC21190D8);
+ else if (param.asInteger() == 0x522200A0)
+ playSound(0, 0x931080C8);
+ break;
+ case 0x1011:
+ if (_isSecond) {
+ if (_x >= 154 && _x <= 346) {
+ sendMessage(_parentScene, 0x2000, 0);
+ messageResult = 1;
+ }
+ } else {
+ if (_x >= 174 && _x <= 430) {
+ sendMessage(_parentScene, 0x2000, 0);
+ messageResult = 1;
+ }
+ }
+ break;
+ case 0x480B:
+ setDoDeltaX(param.asInteger() != 0 ? 1 : 0);
+ if (!_isSecond) {
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR))
+ stRelease();
+ else
+ stWalk();
+ } else {
+ if (getGlobalVar(V_FLYTRAP_RING_BRIDGE) || getGlobalVar(V_FLYTRAP_RING_FENCE))
+ stRelease();
+ else
+ stWalk();
+ }
+ break;
+ case 0x480C:
+ if (_isSecond) {
+ if (_x >= 154 && _x <= 346)
+ messageResult = 1;
+ else
+ messageResult = 0;
+ } else {
+ if (_x >= 174 && _x <= 430)
+ messageResult = 1;
+ else
+ messageResult = 0;
+ }
+ break;
+ case 0x480E:
+ if (param.asInteger() == 1)
+ stGrabRing();
+ break;
+ case 0x4810:
+ swallowKlaymen();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 995);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1015);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002VenusFlyTrap::hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002VenusFlyTrap::hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x000890C4)
+ playSound(0, 0xC21190D8);
+ else if (param.asInteger() == 0x41881801) {
+ if (_isSecond) {
+ if (_x > 330)
+ sendMessage(_klaymen, 0x4811, 2);
+ else
+ sendMessage(_klaymen, 0x4811, 0);
+ } else {
+ sendMessage(_klaymen, 0x4811, 0);
+ }
+ } else if (param.asInteger() == 0x522200A0)
+ playSound(0, 0x931080C8);
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 995);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1015);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1002VenusFlyTrap::stWalkBack() {
+ setDoDeltaX(2);
+ startAnimation(0xC4080034, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+ NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stWalk() {
+ startAnimation(0xC4080034, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+ NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stRelease() {
+ sendMessage(_parentScene, 0x4807, 0);
+ startAnimation(0x82292851, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+ NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::stGrabRing() {
+ setDoDeltaX(1);
+ startAnimation(0x86A82A11, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationSimple);
+ NextState(&AsScene1002VenusFlyTrap::stRingGrabbed);
+}
+
+void AsScene1002VenusFlyTrap::stRingGrabbed() {
+ startAnimation(0xB5A86034, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+}
+
+void AsScene1002VenusFlyTrap::stKlaymenInside() {
+ startAnimation(0x31303094, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(NULL);
+ NextState(&AsScene1002VenusFlyTrap::stKlaymenInsideMoving);
+ _countdown = 24;
+}
+
+void AsScene1002VenusFlyTrap::stIdle() {
+ startAnimation(0xC8204250, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::upIdle);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::handleMessage);
+ if (_isSecond) {
+ if (_x >= 154 && _x <= 346)
+ setGlobalVar(V_FLYTRAP_POSITION_2, (_x - 186) / 32);
+ else {
+ NextState(&AsScene1002VenusFlyTrap::stWalkBack);
+ _countdown = 12;
+ }
+ } else {
+ if (_x >= 174 && _x <= 430)
+ setGlobalVar(V_FLYTRAP_POSITION_1, (_x - 174) / 32);
+ else {
+ NextState(&AsScene1002VenusFlyTrap::stWalkBack);
+ _countdown = 12;
+ }
+ }
+}
+
+void AsScene1002VenusFlyTrap::stKlaymenInsideMoving() {
+ startAnimation(0x152920C4, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+ NextState(&AsScene1002VenusFlyTrap::stSpitOutKlaymen);
+}
+
+void AsScene1002VenusFlyTrap::stSpitOutKlaymen() {
+ startAnimation(0x84001117, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+ NextState(&AsScene1002VenusFlyTrap::stIdle);
+}
+
+void AsScene1002VenusFlyTrap::swallowKlaymen() {
+ if (_x - 15 < _klaymen->getX() && _x + 15 > _klaymen->getX()) {
+ if (_isSecond)
+ setDoDeltaX(_x > 265 && _x < 330 ? 1 : 0);
+ else
+ setDoDeltaX(_x > 320 ? 1 : 0);
+ sendMessage(_klaymen, 0x2001, 0);
+ startAnimation(0x8C2C80D4, 0, -1);
+ SetUpdateHandler(&AsScene1002VenusFlyTrap::update);
+ SetMessageHandler(&AsScene1002VenusFlyTrap::hmAnimationExt);
+ NextState(&AsScene1002VenusFlyTrap::stKlaymenInside);
+ }
+}
+
+AsScene1002OutsideDoorBackground::AsScene1002OutsideDoorBackground(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200), _countdown(0) {
+
+ createSurface(850, 186, 212);
+ _x = 320;
+ _y = 240;
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+ startAnimation(0x004A4495, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else
+ setVisible(false);
+ SetUpdateHandler(&AsScene1002OutsideDoorBackground::update);
+ SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
+}
+
+void AsScene1002OutsideDoorBackground::update() {
+ if (_countdown != 0 && (--_countdown == 0)) {
+ if (_isDoorClosed)
+ stCloseDoor();
+ else
+ stOpenDoor();
+ }
+ AnimatedSprite::update();
+}
+
+uint32 AsScene1002OutsideDoorBackground::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageResult) {
+ case 0x4808:
+ _isDoorClosed = false;
+ _countdown = 2;
+ break;
+ case 0x4809:
+ _isDoorClosed = true;
+ _countdown = 2;
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1002OutsideDoorBackground::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageResult) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1002OutsideDoorBackground::stOpenDoor() {
+ startAnimation(0x004A4495, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ setVisible(true);
+ SetMessageHandler(&AsScene1002OutsideDoorBackground::handleMessage);
+}
+
+void AsScene1002OutsideDoorBackground::stCloseDoor() {
+ startAnimation(0x004A4495, -1, -1);
+ _playBackwards = true;
+ setVisible(true);
+ SetMessageHandler(&AsScene1002OutsideDoorBackground::hmAnimation);
+ NextState(&AsScene1002OutsideDoorBackground::stDoorClosed);
+}
+
+void AsScene1002OutsideDoorBackground::stDoorClosed() {
+ setVisible(false);
+ stopAnimation();
+}
+
+AsScene1002KlaymenLadderHands::AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen)
+ : AnimatedSprite(vm, 1200), _klaymen(klaymen) {
+
+ createSurface(1200, 40, 163);
+ setVisible(false);
+ SetUpdateHandler(&AsScene1002KlaymenLadderHands::update);
+ SetMessageHandler(&Sprite::handleMessage);
+}
+
+void AsScene1002KlaymenLadderHands::update() {
+ if (_klaymen->getCurrAnimFileHash() == 0x3A292504) {
+ startAnimation(0xBA280522, _klaymen->getFrameIndex(), -1);
+ _newStickFrameIndex = _klaymen->getFrameIndex();
+ setVisible(true);
+ _x = _klaymen->getX();
+ _y = _klaymen->getY();
+ setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+ } else if (_klaymen->getCurrAnimFileHash() == 0x122D1505) {
+ startAnimation(0x1319150C, _klaymen->getFrameIndex(), -1);
+ _newStickFrameIndex = _klaymen->getFrameIndex();
+ setVisible(true);
+ _x = _klaymen->getX();
+ _y = _klaymen->getY();
+ setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+ } else
+ setVisible(false);
+ AnimatedSprite::update();
+}
+
+AsScene1002KlaymenPeekHand::AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen)
+ : AnimatedSprite(vm, 1200), _parentScene(parentScene), _klaymen(klaymen),
+ _isClipRectSaved(false) {
+
+ createSurface(1000, 33, 41);
+ setVisible(false);
+ SetUpdateHandler(&AsScene1002KlaymenPeekHand::update);
+ SetMessageHandler(&AsScene1002KlaymenPeekHand::handleMessage);
+}
+
+void AsScene1002KlaymenPeekHand::update() {
+ if (_klaymen->getCurrAnimFileHash() == 0xAC20C012 && _klaymen->getFrameIndex() < 50) {
+ startAnimation(0x9820C913, _klaymen->getFrameIndex(), -1);
+ _newStickFrameIndex = _klaymen->getFrameIndex();
+ setVisible(true);
+ _x = _klaymen->getX();
+ _y = _klaymen->getY();
+ setDoDeltaX(_klaymen->isDoDeltaX() ? 1 : 0);
+ } else
+ setVisible(false);
+ AnimatedSprite::update();
+}
+
+uint32 AsScene1002KlaymenPeekHand::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4AB28209) {
+ sendMessage(_parentScene, 0x1022, 1200);
+ _isClipRectSaved = true;
+ _savedClipRect = _surface->getClipRect();
+ setClipRect(0, 0, 640, 480);
+ } else if (param.asInteger() == 0x88001184) {
+ sendMessage(_parentScene, 0x1022, 1000);
+ if (_isClipRectSaved)
+ setClipRect(_savedClipRect);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+Scene1002::Scene1002(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isKlaymenFloor(false), _isClimbingLadder(false) {
+
+ NRect tempClipRect;
+ Sprite *tempSprite;
+
+ SetUpdateHandler(&Scene1002::update);
+ SetMessageHandler(&Scene1002::handleMessage);
+
+ setHitRects(0x004B4138);
+ setBackground(0x12C23307);
+ setPalette(0x12C23307);
+
+ insertStaticSprite(0x06149428, 1100);
+ insertStaticSprite(0x312C8774, 1100);
+
+ _ssLadderArch = insertStaticSprite(0x152C1313, 1015);
+ _ssLadderArchPart1 = insertStaticSprite(0x060000A0, 1200);
+ _ssLadderArchPart2 = insertStaticSprite(0xB2A423B0, 1100);
+ _ssLadderArchPart3 = insertStaticSprite(0x316E0772, 1100);
+
+ _ssCeiling = insertStaticSprite(0x316C4BB4, 1015);
+
+ if (which < 0) {
+ // Restoring game
+ if (_vm->_gameState.which == 0) {
+ // Klaymen on top
+ insertKlaymen<KmScene1002>(90, 226);
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ setMessageList(0x004B4270);
+ _klaymen->setClipRect(31, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart3->getDrawRect().y2());
+ _asKlaymenLadderHands->getSurface()->getClipRect() = _klaymen->getSurface()->getClipRect();
+ _klaymen->setRepl(64, 0);
+ } else {
+ // Klaymen on the floor
+ insertKlaymen<KmScene1002>(379, 435);
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ setMessageList(0x004B4270);
+ _klaymen->setClipRect(_ssLadderArch->getDrawRect().x, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart1->getDrawRect().y2());
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+ }
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene1002>(650, 435);
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ setMessageList(0x004B4478);
+ _klaymen->setClipRect(_ssLadderArch->getDrawRect().x, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart1->getDrawRect().y2());
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+ _vm->_gameState.which = 1;
+ } else if (which == 2) {
+ // Klaymen coming up the ladder
+ insertKlaymen<KmScene1002>(68, 645);
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ setMessageList(0x004B4298);
+ _klaymen->setClipRect(_ssLadderArch->getDrawRect().x, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart1->getDrawRect().y2());
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+ _vm->_gameState.which = 1;
+ sendMessage(_klaymen, 0x4820, 0);
+ } else {
+ // Klaymen entering from the left, peeking
+ insertKlaymen<KmScene1002>(90, 226);
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ setMessageList(0x004B4470);
+ _klaymen->setClipRect(31, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart3->getDrawRect().y2());
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+ _asKlaymenPeekHand = insertSprite<AsScene1002KlaymenPeekHand>(this, _klaymen);
+ _asKlaymenPeekHand->setClipRect(_klaymen->getClipRect());
+ _klaymen->setRepl(64, 0);
+ _vm->_gameState.which = 0;
+ }
+
+ insertScreenMouse(0x23303124);
+
+ tempSprite = insertStaticSprite(0xB3242310, 825);
+ tempClipRect.set(tempSprite->getDrawRect().x, tempSprite->getDrawRect().y,
+ _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart2->getDrawRect().y2());
+
+ _asRing1 = insertSprite<AsScene1002Ring>(this, false, 258, 191, _ssCeiling->getDrawRect().y, false);
+ _asRing2 = insertSprite<AsScene1002Ring>(this, false, 297, 189, _ssCeiling->getDrawRect().y, false);
+ _asRing3 = insertSprite<AsScene1002Ring>(this, true, 370, 201, _ssCeiling->getDrawRect().y, getGlobalVar(V_FLYTRAP_RING_DOOR));
+ _asRing4 = insertSprite<AsScene1002Ring>(this, false, 334, 191, _ssCeiling->getDrawRect().y, false);
+ _asRing5 = insertSprite<AsScene1002Ring>(this, false, 425, 184, _ssCeiling->getDrawRect().y, false);
+
+ _asDoor = insertSprite<AsScene1002Door>(tempClipRect);
+ tempSprite = insertSprite<AsScene1002BoxingGloveHitEffect>();
+ _asDoorSpy = insertSprite<AsScene1002DoorSpy>(tempClipRect, this, _asDoor, tempSprite);
+ _ssPressButton = insertSprite<SsCommonPressButton>(this, 0x00412692, 0x140B60BE, 800, 0);
+ _asVenusFlyTrap = insertSprite<AsScene1002VenusFlyTrap>(this, _klaymen, false);
+ addCollisionSprite(_asVenusFlyTrap);
+
+ sendEntityMessage(_klaymen, 0x2007, _asVenusFlyTrap);
+
+ _asOutsideDoorBackground = insertSprite<AsScene1002OutsideDoorBackground>();
+
+ setRectList(0x004B43A0);
+
+ loadSound(1, 0x60755842);
+ loadSound(2, 0x616D5821);
+
+}
+
+Scene1002::~Scene1002() {
+}
+
+void Scene1002::update() {
+ Scene::update();
+ if (!_isKlaymenFloor && _klaymen->getY() > 230) {
+ _klaymen->setClipRect(_ssLadderArch->getDrawRect().x, 0, _ssLadderArchPart2->getDrawRect().x2(), _ssLadderArchPart1->getDrawRect().y2());
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+ deleteSprite(&_ssLadderArchPart3);
+ _klaymen->clearRepl();
+ _isKlaymenFloor = true;
+ _vm->_gameState.which = 1;
+ }
+}
+
+uint32 Scene1002::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xE6EE60E1) {
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR))
+ setMessageList(0x004B4428);
+ else
+ setMessageList(0x004B4448);
+ messageResult = 1;
+ } else if (param.asInteger() == 0x4A845A00)
+ sendEntityMessage(_klaymen, 0x1014, _asRing1);
+ else if (param.asInteger() == 0x43807801)
+ sendEntityMessage(_klaymen, 0x1014, _asRing2);
+ else if (param.asInteger() == 0x46C26A01) {
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+ setMessageList(0x004B44B8);
+ } else {
+ sendEntityMessage(_klaymen, 0x1014, _asRing3);
+ if (_asVenusFlyTrap->getX() - 10 < 366 && _asVenusFlyTrap->getX() + 10 > 366) {
+ setGlobalVar(V_FLYTRAP_RING_EATEN, 1);
+ setMessageList(0x004B44A8);
+ } else {
+ setMessageList(0x004B44A0);
+ }
+ }
+ messageResult = 1;
+ } else if (param.asInteger() == 0x468C7B11)
+ sendEntityMessage(_klaymen, 0x1014, _asRing4);
+ else if (param.asInteger() == 0x42845B19)
+ sendEntityMessage(_klaymen, 0x1014, _asRing5);
+ else if (param.asInteger() == 0xC0A07458)
+ sendEntityMessage(_klaymen, 0x1014, _ssPressButton);
+ break;
+ case 0x1024:
+ sendMessage(_parentModule, 0x1024, param.asInteger());
+ break;
+ case 0x2000:
+ if (_isClimbingLadder) {
+ setMessageList2(0x004B43D0);
+ } else {
+ if (_klaymen->getY() > 420) {
+ sendEntityMessage(_klaymen, 0x1014, _asVenusFlyTrap);
+ setMessageList2(0x004B4480);
+ } else if (_klaymen->getY() > 227) {
+ setMessageList2(0x004B41E0);
+ } else {
+ setMessageList2(0x004B4148);
+ }
+ }
+ break;
+ case 0x2002:
+ _messageList = NULL;
+ break;
+ case 0x2005:
+ _isClimbingLadder = true;
+ setRectList(0x004B4418);
+ break;
+ case 0x2006:
+ _isClimbingLadder = false;
+ setRectList(0x004B43A0);
+ break;
+ case 0x4806:
+ if (sender == _asRing1) {
+ setGlobalVar(V_RADIO_ENABLED, 0);
+ playSound(0, 0x665198C0);
+ } else if (sender == _asRing2) {
+ setGlobalVar(V_RADIO_ENABLED, 0);
+ playSound(0, 0xE2D389C0);
+ } else if (sender == _asRing3) {
+ setGlobalVar(V_RADIO_ENABLED, 0);
+ playSound(1);
+ sendMessage(_asDoor, 0x4808, 0);
+ sendMessage(_asOutsideDoorBackground, 0x4808, 0);
+ } else if (sender == _asRing4) {
+ setGlobalVar(V_RADIO_ENABLED, 0);
+ playSound(0, 0xE0558848);
+ } else if (sender == _asRing5) {
+ setGlobalVar(V_RADIO_ENABLED, 1);
+ playSound(0, 0x44014282);
+ }
+ break;
+ case 0x4807:
+ if (sender == _asRing3) {
+ playSound(2);
+ sendMessage(_asDoor, 0x4809, 0);
+ sendMessage(_asOutsideDoorBackground, 0x4809, 0);
+ } else if (sender == _asVenusFlyTrap) {
+ if (getGlobalVar(V_FLYTRAP_RING_DOOR)) {
+ sendMessage(_asRing3, 0x4807, 0);
+ }
+ }
+ break;
+ case 0x480B:
+ sendEntityMessage(_klaymen, 0x1014, _asDoorSpy);
+ break;
+ case 0x480F:
+ setGlobalVar(V_RADIO_ENABLED, 0);
+ playSound(1);
+ sendMessage(_asDoor, 0x4808, 0);
+ sendMessage(_asOutsideDoorBackground, 0x4808, 0);
+ break;
+ case 0x8000:
+ setSpriteSurfacePriority(_ssCeiling, 995);
+ setSpriteSurfacePriority(_ssLadderArch, 995);
+ break;
+ case 0x8001:
+ setSpriteSurfacePriority(_ssCeiling, 1015);
+ setSpriteSurfacePriority(_ssLadderArch, 1015);
+ break;
+ }
+ return messageResult;
+}
+
+// StaticScene
+
+StaticScene::StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&StaticScene::handleMessage);
+
+ setBackground(backgroundFileHash);
+ setPalette(backgroundFileHash);
+ insertPuzzleMouse(cursorFileHash, 20, 620);
+}
+
+uint32 StaticScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ }
+ return 0;
+}
+
+// Scene1004
+
+AsScene1004TrashCan::AsScene1004TrashCan(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ _x = 330;
+ _y = 327;
+ createSurface(800, 56, 50);
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1004TrashCan::handleMessage);
+}
+
+uint32 AsScene1004TrashCan::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x225A8587)
+ playSound(0, 0x109AFC4C);
+ break;
+ case 0x2002:
+ startAnimation(0xEB312C11, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return 0;
+}
+
+Scene1004::Scene1004(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _paletteAreaStatus(-1) {
+
+ Sprite *tempSprite;
+
+ SetUpdateHandler(&Scene1004::update);
+ SetMessageHandler(&Scene1004::handleMessage);
+
+ setBackground(0x50C03005);
+
+ if (getGlobalVar(V_ENTRANCE_OPEN)) {
+ setPalette(0xA30BA329);
+ _palette->addBasePalette(0xA30BA329, 0, 256, 0);
+ } else {
+ setPalette(0x50C03005);
+ _palette->addBasePalette(0x50C03005, 0, 256, 0);
+ }
+ addEntity(_palette);
+
+ insertScreenMouse(0x03001504);
+
+ if (which < 0) {
+ // Restoring game
+ setRectList(0x004B7C70);
+ insertKlaymen<KmScene1004>(330, 327);
+ setMessageList(0x004B7C18);
+ } else if (which == 1) {
+ // Klaymen returning from reading a note
+ setRectList(0x004B7C70);
+ insertKlaymen<KmScene1004>(330, 327);
+ setMessageList(0x004B7C08);
+ } else {
+ // Klaymen coming down the ladder
+ loadDataResource(0x01900A04);
+ insertKlaymen<KmScene1004>(_dataResource.getPoint(0x80052A29).x, 27);
+ setMessageList(0x004B7BF0);
+ }
+
+ updatePaletteArea();
+
+ _asKlaymenLadderHands = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+
+ insertStaticSprite(0x800034A0, 1100);
+ insertStaticSprite(0x64402020, 1100);
+ insertStaticSprite(0x3060222E, 1300);
+ tempSprite = insertStaticSprite(0x0E002004, 1300);
+
+ _klaymen->setClipRect(0, tempSprite->getDrawRect().y, 640, 480);
+ _asKlaymenLadderHands->setClipRect(_klaymen->getClipRect());
+
+ _asTrashCan = insertSprite<AsScene1004TrashCan>();
+
+}
+
+void Scene1004::update() {
+ Scene::update();
+ updatePaletteArea();
+}
+
+uint32 Scene1004::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x926500A1) {
+ setMessageList(0x004B7C20);
+ messageResult = 1;
+ }
+ break;
+ case 0x2000:
+ loadDataResource(0x01900A04);
+ break;
+ case 0x2001:
+ setRectList(0x004B7C70);
+ break;
+ case 0x2002:
+ sendMessage(_asTrashCan, 0x2002, 0);
+ break;
+ }
+ return messageResult;
+}
+
+void Scene1004::updatePaletteArea() {
+ if (_klaymen->getY() < 150) {
+ if (_paletteAreaStatus != 0) {
+ _paletteAreaStatus = 0;
+ _palette->addBasePalette(0x406B0D10, 0, 64, 0);
+ _palette->startFadeToPalette(12);
+ }
+ } else {
+ if (_paletteAreaStatus != 1) {
+ _paletteAreaStatus = 1;
+ _palette->addBasePalette(0x24332243, 0, 64, 0);
+ _palette->startFadeToPalette(12);
+ }
+ }
+}
+
+// Scene1005
+
+Scene1005::Scene1005(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1005::handleMessage);
+
+ if (getGlobalVar(V_ENTRANCE_OPEN)) {
+ setBackground(0x2800E011);
+ setPalette(0x2800E011);
+ insertStaticSprite(0x492D5AD7, 100);
+ insertPuzzleMouse(0x0E015288, 20, 620);
+ } else {
+ setBackground(0x8870A546);
+ setPalette(0x8870A546);
+ insertStaticSprite(0x40D1E0A9, 100);
+ insertStaticSprite(0x149C00A6, 100);
+ insertPuzzleMouse(0x0A54288F, 20, 620);
+ }
+
+ drawTextToBackground();
+
+}
+
+uint32 Scene1005::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ }
+ return 0;
+}
+
+void Scene1005::drawTextToBackground() {
+ TextResource textResource(_vm);
+ const char *textStart, *textEnd;
+ int16 y = 36;
+ uint32 textIndex = getTextIndex();
+ FontSurface *fontSurface = FontSurface::createFontSurface(_vm, getGlobalVar(V_ENTRANCE_OPEN) ? 0x283CE401 : 0xC6604282);
+ textResource.load(0x80283101);
+ textStart = textResource.getString(textIndex, textEnd);
+ while (textStart < textEnd) {
+ fontSurface->drawString(_background->getSurface(), 188, y, (const byte*)textStart);
+ y += 36;
+ textStart += strlen(textStart) + 1;
+ }
+ delete fontSurface;
+}
+
+uint32 Scene1005::getTextIndex() {
+ uint32 textIndex;
+ textIndex = getTextIndex1();
+ if (getGlobalVar(V_ENTRANCE_OPEN)) {
+ textIndex = getTextIndex2();
+ }
+ if (getGlobalVar(V_TEXT_FLAG1) && getGlobalVar(V_TEXT_INDEX) == textIndex) {
+ textIndex = getTextIndex3();
+ } else {
+ setGlobalVar(V_TEXT_FLAG1, 1);
+ setGlobalVar(V_TEXT_INDEX, textIndex);
+ }
+ return textIndex;
+}
+
+uint32 Scene1005::getTextIndex1() {
+ uint32 textIndex;
+ if (getGlobalVar(V_WORLDS_JOINED)) {
+ if (!getGlobalVar(V_DOOR_PASSED))
+ textIndex = 18;
+ else if (!getGlobalVar(V_ROBOT_TARGET))
+ textIndex = 19;
+ else if (getGlobalVar(V_ROBOT_HIT)) {
+ if (!getGlobalVar(V_ENTRANCE_OPEN))
+ textIndex = 23;
+ else if (!getSubVar(VA_HAS_KEY, 0) && !getSubVar(VA_IS_KEY_INSERTED, 0))
+ textIndex = 24;
+ else if (!getGlobalVar(V_HAS_FINAL_KEY))
+ textIndex = 26;
+ else if (!getSubVar(VA_HAS_KEY, 1) && !getSubVar(VA_IS_KEY_INSERTED, 1))
+ textIndex = 27;
+ else if (!getGlobalVar(V_HAS_FINAL_KEY))
+ textIndex = 28;
+ else
+ textIndex = 29;
+ } else if (!getGlobalVar(V_FELL_DOWN_HOLE))
+ textIndex = 20;
+ else if (!getGlobalVar(V_SEEN_SYMBOLS_NO_LIGHT))
+ textIndex = 21;
+ else
+ textIndex = 22;
+ } else if (getGlobalVar(V_BOLT_DOOR_UNLOCKED)) {
+ if (!getGlobalVar(V_WALL_BROKEN))
+ textIndex = 12;
+ else if (!getGlobalVar(V_STAIRS_DOWN_ONCE))
+ textIndex = 13;
+ else if (!getGlobalVar(V_RADIO_ENABLED))
+ textIndex = 50;
+ else if (!getGlobalVar(V_UNUSED))
+ textIndex = 14;
+ else if (!getGlobalVar(V_BEEN_SHRINKING_ROOM))
+ textIndex = 15;
+ else if (!getGlobalVar(V_BEEN_STATUE_ROOM))
+ textIndex = 16;
+ else
+ textIndex = 17;
+ } else if (!getGlobalVar(V_FLYTRAP_RING_EATEN)) {
+ textIndex = 0;
+ } else if (getGlobalVar(V_CREATURE_EXPLODED)) {
+ if (!getGlobalVar(V_TILE_PUZZLE_SOLVED))
+ textIndex = 4;
+ else if (!getGlobalVar(V_HAS_TEST_TUBE))
+ textIndex = 5;
+ else if (!getSubVar(VA_LOCKS_DISABLED, 0x40119852))
+ textIndex = 6;
+ else if (!getGlobalVar(V_WATER_RUNNING))
+ textIndex = 7;
+ else if (!getGlobalVar(V_NOTES_PUZZLE_SOLVED))
+ textIndex = 8;
+ else if (!getSubVar(VA_LOCKS_DISABLED, 0x304008D2))
+ textIndex = 9;
+ else if (!getSubVar(VA_LOCKS_DISABLED, 0x01180951))
+ textIndex = 10;
+ else
+ textIndex = 11;
+ } else if (!getGlobalVar(V_CREATURE_ANGRY)) {
+ textIndex = 1;
+ } else if (getGlobalVar(V_TNT_DUMMY_BUILT)) {
+ textIndex = 3;
+ } else {
+ textIndex = 2;
+ }
+ return textIndex;
+}
+
+uint32 Scene1005::getTextIndex2() {
+ uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1);
+ if (textIndex + 1 >= 10) {
+ setGlobalVar(V_TEXT_COUNTING_INDEX1, 0);
+ textIndex = 0;
+ } else {
+ setGlobalVar(V_TEXT_COUNTING_INDEX1, textIndex + 1);
+ }
+ return textIndex + 40;
+}
+
+uint32 Scene1005::getTextIndex3() {
+ uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX2);
+ if (textIndex + 1 >= 10) {
+ setGlobalVar(V_TEXT_COUNTING_INDEX2, 0);
+ textIndex = 0;
+ } else {
+ setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1);
+ }
+ return textIndex + 30;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h
new file mode 100644
index 0000000000..9977590a6a
--- /dev/null
+++ b/engines/neverhood/modules/module1000.h
@@ -0,0 +1,300 @@
+/* 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 NEVERHOOD_MODULES_MODULE1000_H
+#define NEVERHOOD_MODULES_MODULE1000_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module1000
+
+class Module1000 : public Module {
+public:
+ Module1000(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1000();
+protected:
+ int _sceneNum;
+ uint32 _musicFileHash;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1001
+
+class AsScene1001Door : public AnimatedSprite {
+public:
+ AsScene1001Door(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void hammerHitsDoor();
+ void stShowIdleDoor();
+ void stBustedDoorMove();
+ void stBustedDoorGone();
+};
+
+class AsScene1001Hammer : public AnimatedSprite {
+public:
+ AsScene1001Hammer(NeverhoodEngine *vm, Sprite *asDoor);
+protected:
+ Sprite *_asDoor;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1001Window : public AnimatedSprite {
+public:
+ AsScene1001Window(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1001Lever : public AnimatedSprite {
+public:
+ AsScene1001Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int deltaXType);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsCommonButtonSprite : public StaticSprite {
+public:
+ SsCommonButtonSprite(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, int surfacePriority, uint32 soundFileHash);
+protected:
+ Scene *_parentScene;
+ uint32 _soundFileHash;
+ int16 _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1001 : public Scene {
+public:
+ Scene1001(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene1001();
+protected:
+ Sprite *_asHammer;
+ Sprite *_asDoor;
+ Sprite *_asWindow;
+ Sprite *_asLever;
+ Sprite *_ssButton;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// TODO: Move this to some common file since it's used several times
+
+class StaticScene : public Scene {
+public:
+ StaticScene(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 cursorFileHash);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1002
+
+class AsScene1002Ring : public AnimatedSprite {
+public:
+ AsScene1002Ring(NeverhoodEngine *vm, Scene *parentScene, bool isSpecial, int16 x, int16 y, int16 clipY1, bool isRingLow);
+protected:
+ Scene *_parentScene;
+ bool _isSpecial;
+ void update();
+ uint32 hmRingIdle(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRingPulled1(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRingPulled2(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRingHangingLow(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRingReleased(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002Door : public StaticSprite {
+public:
+ AsScene1002Door(NeverhoodEngine *vm, NRect &clipRect);
+protected:
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suOpenDoor();
+ void suCloseDoor();
+};
+
+class AsScene1002BoxingGloveHitEffect : public AnimatedSprite {
+public:
+ AsScene1002BoxingGloveHitEffect(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002DoorSpy : public AnimatedSprite {
+public:
+ AsScene1002DoorSpy(NeverhoodEngine *vm, NRect &clipRect, Scene *parentScene, Sprite *asDoor, Sprite *asScene1002BoxingGloveHitEffect);
+protected:
+ Scene *_parentScene;
+ Sprite *_asDoor;
+ Sprite *_asBoxingGloveHitEffect;
+ NRect _clipRect;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmDoorSpyAnimation(int messageNum, const MessageParam &param, Entity *sender);
+ void suDoorSpy();
+ void stDoorSpyIdle();
+ void stDoorSpyBoxingGlove();
+};
+
+class SsCommonPressButton : public StaticSprite {
+public:
+ SsCommonPressButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash);
+ void setFileHashes(uint32 fileHash1, uint32 fileHash2);
+protected:
+ Scene *_parentScene;
+ uint32 _soundFileHash;
+ uint32 _fileHashes[2];
+ int _status;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1002VenusFlyTrap : public AnimatedSprite {
+public:
+ AsScene1002VenusFlyTrap(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, bool isSecond);
+protected:
+ Scene *_parentScene;
+ Sprite *_klaymen;
+ int _countdown;
+ bool _isSecond;
+ void update();
+ void upIdle();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmAnimationSimple(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmAnimationExt(int messageNum, const MessageParam &param, Entity *sender);
+ void stWalkBack();
+ void stWalk();
+ void stRelease();
+ void stGrabRing();
+ void stRingGrabbed();
+ void stKlaymenInside();
+ void stIdle();
+ void stKlaymenInsideMoving();
+ void stSpitOutKlaymen();
+ void swallowKlaymen();
+};
+
+class AsScene1002OutsideDoorBackground : public AnimatedSprite {
+public:
+ AsScene1002OutsideDoorBackground(NeverhoodEngine *vm);
+protected:
+ int _countdown;
+ bool _isDoorClosed;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stCloseDoor();
+ void stDoorClosed();
+};
+
+class AsScene1002KlaymenLadderHands : public AnimatedSprite {
+public:
+ AsScene1002KlaymenLadderHands(NeverhoodEngine *vm, Klaymen *klaymen);
+protected:
+ Klaymen *_klaymen;
+ void update();
+};
+
+class AsScene1002KlaymenPeekHand : public AnimatedSprite {
+public:
+ AsScene1002KlaymenPeekHand(NeverhoodEngine *vm, Scene *parentScene, Klaymen *klaymen);
+protected:
+ Scene *_parentScene;
+ Klaymen *_klaymen;
+ bool _isClipRectSaved;
+ NRect _savedClipRect;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1002 : public Scene {
+public:
+ Scene1002(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene1002();
+protected:
+ Sprite *_asRing1;
+ Sprite *_asRing2;
+ Sprite *_asRing3;
+ Sprite *_asRing4;
+ Sprite *_asRing5;
+ Sprite *_asDoor;
+ Sprite *_asDoorSpy;
+ Sprite *_asVenusFlyTrap;
+ Sprite *_ssLadderArch;
+ Sprite *_ssLadderArchPart1;
+ Sprite *_ssLadderArchPart2;
+ Sprite *_ssLadderArchPart3;
+ Sprite *_ssCeiling;
+ Sprite *_asKlaymenLadderHands;
+ Sprite *_asKlaymenPeekHand;
+ Sprite *_asOutsideDoorBackground;
+ Sprite *_ssPressButton;
+ bool _isKlaymenFloor;
+ bool _isClimbingLadder;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1004
+
+class AsScene1004TrashCan : public AnimatedSprite {
+public:
+ AsScene1004TrashCan(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1004 : public Scene {
+public:
+ Scene1004(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_asKlaymenLadderHands;
+ Sprite *_asTrashCan;
+ int _paletteAreaStatus;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void updatePaletteArea();
+};
+
+// Scene1005
+
+class Scene1005 : public Scene {
+public:
+ Scene1005(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void drawTextToBackground();
+ uint32 getTextIndex();
+ uint32 getTextIndex1();
+ uint32 getTextIndex2();
+ uint32 getTextIndex3();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1000_H */
diff --git a/engines/neverhood/modules/module1100.cpp b/engines/neverhood/modules/module1100.cpp
new file mode 100644
index 0000000000..dbd8c60210
--- /dev/null
+++ b/engines/neverhood/modules/module1100.cpp
@@ -0,0 +1,701 @@
+/* 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 "neverhood/modules/module1100.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/navigationscene.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1100SoundList[] = {
+ 0x90805C50,
+ 0xB288D450,
+ 0x98C05840,
+ 0x98A01500,
+ 0xB4005E50,
+ 0x92025040,
+ 0x90035066,
+ 0x74E01054,
+ 0
+};
+
+Module1100::Module1100(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which < 0) {
+ createScene(_vm->gameState().sceneNum, -1);
+ } else if (which == 1) {
+ createScene(8, 1);
+ } else {
+ createScene(8, 3);
+ }
+
+ _vm->_soundMan->addSoundList(0x0002C818, kModule1100SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1100SoundList, true, 50, 600, 20, 250);
+ _vm->_soundMan->setSoundParams(0x74E01054, false, 100, 200, 10, 20);
+ _vm->_soundMan->setSoundVolume(0x74E01054, 60);
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0);
+
+}
+
+Module1100::~Module1100() {
+ _vm->_soundMan->deleteGroup(0x0002C818);
+}
+
+void Module1100::createScene(int sceneNum, int which) {
+ static const uint32 kSmackerFileHashList06[] = {0x10880805, 0x1088081D, 0};
+ static const uint32 kSmackerFileHashList07[] = {0x00290321, 0x01881000, 0};
+ static const byte kNavigationTypes02[] = {1, 0, 4, 1};
+ debug(1, "Module1100::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _countdown = 65;
+ createNavigationScene(0x004B8430, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _countdown = 50;
+ createNavigationScene(0x004B8460, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ if (getGlobalVar(V_ROBOT_TARGET)) {
+ createNavigationScene(0x004B84F0, which, kNavigationTypes02);
+ } else {
+ createNavigationScene(0x004B8490, which, kNavigationTypes02);
+ }
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ if (getGlobalVar(V_ROBOT_TARGET)) {
+ createNavigationScene(0x004B8580, which);
+ } else {
+ createNavigationScene(0x004B8550, which);
+ }
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _childObject = new Scene1105(_vm, this);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ if (getGlobalVar(V_ROBOT_TARGET))
+ createSmackerScene(0x04180001, true, false, false);
+ else
+ createSmackerScene(0x04180007, true, false, false);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->deleteSoundGroup(0x0002C818);
+ createSmackerScene(kSmackerFileHashList06, true, true, false);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->_soundMan->setSoundParams(0x74E01054, false, 0, 0, 0, 0);
+ createSmackerScene(kSmackerFileHashList07, true, true, false);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new Scene1109(_vm, this, which);
+ break;
+ case 1002:
+ _vm->gameState().sceneNum = 2;
+ _countdown = 40;
+ _vm->_soundMan->setTwoSoundsPlayFlag(true);
+ createSmackerScene(0x00012211, true, true, false);
+ break;
+ }
+ SetUpdateHandler(&Module1100::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1100::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ _countdown = 0;
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 65);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 65);
+ if (_moduleResult == 0)
+ createScene(1, 0);
+ else if (_moduleResult == 1)
+ createScene(8, 0);
+ break;
+ case 1:
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0);
+ if (getGlobalVar(V_ROBOT_HIT)) {
+ if (_moduleResult == 0)
+ createScene(6, -1);
+ else if (_moduleResult == 1)
+ createScene(0, 1);
+ } else {
+ if (_moduleResult == 0)
+ createScene(2, 0);
+ else if (_moduleResult == 1)
+ createScene(0, 1);
+ }
+ break;
+ case 2:
+ _vm->_soundMan->setSoundParams(0x74E01054, false, 0, 0, 0, 0);
+ if (_navigationAreaType == 3)
+ createScene(7, -1);
+ else if (_moduleResult == 1)
+ createScene(3, 0);
+ else if (_moduleResult == 2)
+ createScene(1002, -1);
+ break;
+ case 3:
+ if (_moduleResult == 0)
+ createScene(4, 0);
+ else if (_moduleResult == 1)
+ createScene(2, 3);
+ break;
+ case 4:
+ if (_moduleResult == 0)
+ createScene(3, 0);
+ else if (_moduleResult == 1)
+ createScene(5, -1);
+ break;
+ case 5:
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ if (getGlobalVar(V_ROBOT_TARGET))
+ createScene(3, 0);
+ else
+ createScene(4, 0);
+ break;
+ case 6:
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ leaveModule(1);
+ break;
+ case 7:
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ createScene(2, 2);
+ break;
+ case 8:
+ if (_moduleResult == 0)
+ createScene(0, 0);
+ else if (_moduleResult == 1)
+ leaveModule(0);
+ break;
+ case 1002:
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ _countdown = 0;
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0);
+ createScene(1, 1);
+ break;
+ }
+ } else {
+ switch (_sceneNum) {
+ case 0:
+ if (navigationScene()->isWalkingForward() && _countdown != 0 && (--_countdown == 0)) {
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 65);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 65);
+ }
+ break;
+ case 1:
+ if (navigationScene()->isWalkingForward() && _countdown != 0 && (--_countdown == 0))
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x41861371, 0x43A2507F, 0);
+ break;
+ case 2:
+ _vm->_soundMan->setSoundParams(0x74E01054, !navigationScene()->isWalkingForward(), 0, 0, 0, 0);
+ break;
+ case 5:
+ case 6:
+ case 7:
+ case 1002:
+ if (_countdown != 0 && (--_countdown == 0)) {
+ _vm->_soundMan->playTwoSounds(0x0002C818, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 65);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 65);
+ }
+ break;
+ }
+ }
+}
+
+static const uint32 kScene1105FileHashes[] = {
+ 0x00028006,
+ 0x0100A425,
+ 0x63090415,
+ 0x082100C4,
+ 0x0068C607,
+ 0x00018344,
+ 0x442090E4,
+ 0x0400E004,
+ 0x5020A054,
+ 0xB14A891E
+};
+
+static const uint32 kScene1105BackgroundFileHashes[] = {
+ 0x20018662,
+ 0x20014202,
+ 0x20012202,
+ 0x20010002 // CHECKME: This used ??
+};
+
+static const uint32 kSsScene1105SymbolDieFileHashes[] = {
+ 0,
+ 0x90898414,
+ 0x91098414,
+ 0x92098414,
+ 0x94098414,
+ 0x98098414,
+ 0x80098414,
+ 0xB0098414,
+ 0xD0098414,
+ 0x10098414
+};
+
+SsScene1105Button::SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds)
+ : StaticSprite(vm, fileHash, 200), _parentScene(parentScene), _countdown(0) {
+
+ _collisionBounds = collisionBounds;
+ SetMessageHandler(&SsScene1105Button::handleMessage);
+ SetUpdateHandler(&SsScene1105Button::update);
+ setVisible(false);
+}
+
+void SsScene1105Button::update() {
+ if (_countdown != 0 && (--_countdown == 0)) {
+ sendMessage(_parentScene, 0x4807, 0);
+ setVisible(false);
+ }
+}
+
+uint32 SsScene1105Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0) {
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ }
+ break;
+ case 0x480B:
+ _countdown = 8;
+ setVisible(true);
+ playSound(0, 0x44141000);
+ break;
+ }
+ return messageResult;
+}
+
+SsScene1105Symbol::SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y)
+ : StaticSprite(vm, 0) {
+
+ loadSprite(fileHash, kSLFCenteredDrawOffset | kSLFSetPosition, 200, x, y);
+}
+
+void SsScene1105Symbol::hide() {
+ setVisible(false);
+ _needRefresh = true;
+ updatePosition();
+}
+
+SsScene1105SymbolDie::SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y)
+ : StaticSprite(vm, 1100), _dieIndex(dieIndex) {
+
+ _x = x;
+ _y = y;
+ createSurface(200, 50, 50);
+ loadSymbolSprite();
+ SetMessageHandler(&SsScene1105SymbolDie::handleMessage);
+}
+
+uint32 SsScene1105SymbolDie::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ loadSymbolSprite();
+ break;
+ }
+ return messageResult;
+}
+
+void SsScene1105SymbolDie::loadSymbolSprite() {
+ loadSprite(kSsScene1105SymbolDieFileHashes[getSubVar(VA_CURR_DICE_NUMBERS, _dieIndex)], kSLFCenteredDrawOffset);
+}
+
+void SsScene1105SymbolDie::hide() {
+ setVisible(false);
+ _needRefresh = true;
+ updatePosition();
+}
+
+AsScene1105TeddyBear::AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(100, 556, 328);
+ _x = 320;
+ _y = 240;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1105TeddyBear::handleMessage);
+ startAnimation(0x65084002, 0, -1);
+ _newStickFrameIndex = 0;
+ setVisible(false);
+ _needRefresh = true;
+ updatePosition();
+ loadSound(0, 0xCE840261);
+ loadSound(1, 0xCCA41A62);
+}
+
+uint32 AsScene1105TeddyBear::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ if (getGlobalVar(V_ROBOT_TARGET)) {
+ startAnimation(0x6B0C0432, 0, -1);
+ playSound(0);
+ } else {
+ startAnimation(0x65084002, 0, -1);
+ playSound(1);
+ }
+ break;
+ case 0x3002:
+ sendMessage(_parentScene, 0x2003, 0);
+ stopAnimation();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1105TeddyBear::show() {
+ setVisible(true);
+ _needRefresh = true;
+ updatePosition();
+}
+
+void AsScene1105TeddyBear::hide() {
+ setVisible(false);
+ _needRefresh = true;
+ updatePosition();
+}
+
+SsScene1105OpenButton::SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _countdown(0), _isClicked(false) {
+
+ loadSprite(0x8228A46C, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ loadSound(0, 0x44045140);
+ SetUpdateHandler(&SsScene1105OpenButton::update);
+ SetMessageHandler(&SsScene1105OpenButton::handleMessage);
+}
+
+void SsScene1105OpenButton::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ setVisible(false);
+ sendMessage(_parentScene, 0x2001, 0);
+ }
+}
+
+uint32 SsScene1105OpenButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0 && !_isClicked) {
+ playSound(0);
+ setVisible(true);
+ _isClicked = true;
+ _countdown = 4;
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+Scene1105::Scene1105(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _countdown(0), _isPanelOpen(false), _isActionButtonClicked(false), _doMoveTeddy(false),
+ _isClosePanelDone(false), _leaveResult(0), _backgroundIndex(0) {
+
+ Sprite *ssOpenButton;
+
+ _vm->gameModule()->initMemoryPuzzle();
+
+ SetUpdateHandler(&Scene1105::update);
+ SetMessageHandler(&Scene1105::handleMessage);
+
+ setBackground(0x20010002);
+ setPalette(0x20010002);
+
+ _asTeddyBear = insertSprite<AsScene1105TeddyBear>(this);
+ ssOpenButton = insertSprite<SsScene1105OpenButton>(this);
+ addCollisionSprite(ssOpenButton);
+ insertPuzzleMouse(0x10006208, 20, 620);
+
+ loadSound(0, 0x48442057);
+ loadSound(1, 0xC025014F);
+ loadSound(2, 0x68E25540);
+
+}
+
+uint32 Scene1105::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ if (!_isActionButtonClicked && _backgroundIndex == 0) {
+ if (_isPanelOpen) {
+ _isPanelOpen = false;
+ _backgroundIndex = 15;
+ SetUpdateHandler(&Scene1105::upClosePanel);
+ } else
+ _isClosePanelDone = true;
+ _leaveResult = 0;
+ }
+ }
+ break;
+ case 0x2001:
+ showMouse(false);
+ _backgroundIndex = 24;
+ SetUpdateHandler(&Scene1105::upOpenPanel);
+ break;
+ case 0x2003:
+ _backgroundIndex = 24;
+ _leaveResult = 1;
+ SetUpdateHandler(&Scene1105::upClosePanel);
+ break;
+ case 0x4807:
+ if (sender == _ssActionButton) {
+ if (getSubVar(VA_GOOD_DICE_NUMBERS, 0) == getSubVar(VA_CURR_DICE_NUMBERS, 0) &&
+ getSubVar(VA_GOOD_DICE_NUMBERS, 1) == getSubVar(VA_CURR_DICE_NUMBERS, 1) &&
+ getSubVar(VA_GOOD_DICE_NUMBERS, 2) == getSubVar(VA_CURR_DICE_NUMBERS, 2)) {
+ setGlobalVar(V_ROBOT_TARGET, 1);
+ playSound(2);
+ _doMoveTeddy = true;
+ } else {
+ sendMessage(_asTeddyBear, 0x2002, 0);
+ }
+ showMouse(false);
+ _isActionButtonClicked = true;
+ }
+ break;
+ case 0x4826:
+ if (_isPanelOpen) {
+ if (sender == _ssActionButton) {
+ sendMessage(_ssActionButton, 0x480B, 0);
+ _isPanelOpen = false;
+ } else if (!getGlobalVar(V_ROBOT_TARGET)) {
+ if (sender == _ssSymbol1UpButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 0) < 9) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 0, +1);
+ sendMessage(_ssSymbol1UpButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[0], 0x2000, 0);
+ }
+ } else if (sender == _ssSymbol1DownButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 0) > 1) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 0, -1);
+ sendMessage(_ssSymbol1DownButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[0], 0x2000, 0);
+ }
+ } else if (sender == _ssSymbol2UpButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 1) < 9) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 1, +1);
+ sendMessage(_ssSymbol2UpButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[1], 0x2000, 0);
+ }
+ } else if (sender == _ssSymbol2DownButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 1) > 1) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 1, -1);
+ sendMessage(_ssSymbol2DownButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[1], 0x2000, 0);
+ }
+ } else if (sender == _ssSymbol3UpButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 2) < 9) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 2, +1);
+ sendMessage(_ssSymbol3UpButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[2], 0x2000, 0);
+ }
+ } else if (sender == _ssSymbol3DownButton) {
+ if (getSubVar(VA_CURR_DICE_NUMBERS, 2) > 1) {
+ incSubVar(VA_CURR_DICE_NUMBERS, 2, -1);
+ sendMessage(_ssSymbol3DownButton, 0x480B, 0);
+ sendMessage(_ssSymbolDice[2], 0x2000, 0);
+ }
+ }
+ }
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Scene1105::createObjects() {
+ _ssSymbols[0] = insertSprite<SsScene1105Symbol>(kScene1105FileHashes[getSubVar(VA_DICE_MEMORY_SYMBOLS, 0)], 161, 304);
+ _ssSymbols[1] = insertSprite<SsScene1105Symbol>(kScene1105FileHashes[getSubVar(VA_DICE_MEMORY_SYMBOLS, 1)], 294, 304);
+ _ssSymbols[2] = insertSprite<SsScene1105Symbol>(kScene1105FileHashes[getSubVar(VA_DICE_MEMORY_SYMBOLS, 2)], 440, 304);
+
+ _ssSymbolDice[0] = insertSprite<SsScene1105SymbolDie>(0, 206, 304);
+ _ssSymbolDice[1] = insertSprite<SsScene1105SymbolDie>(1, 339, 304);
+ _ssSymbolDice[2] = insertSprite<SsScene1105SymbolDie>(2, 485, 304);
+
+ _ssSymbol1UpButton = insertSprite<SsScene1105Button>(this, 0x08002860, NRect(146, 362, 192, 403));
+ addCollisionSprite(_ssSymbol1UpButton);
+ _ssSymbol1DownButton = insertSprite<SsScene1105Button>(this, 0x42012460, NRect(147, 404, 191, 442));
+ addCollisionSprite(_ssSymbol1DownButton);
+ _ssSymbol2UpButton = insertSprite<SsScene1105Button>(this, 0x100030A0, NRect(308, 361, 355, 402));
+ addCollisionSprite(_ssSymbol2UpButton);
+ _ssSymbol2DownButton = insertSprite<SsScene1105Button>(this, 0x840228A0, NRect(306, 406, 352, 445));
+ addCollisionSprite(_ssSymbol2DownButton);
+ _ssSymbol3UpButton = insertSprite<SsScene1105Button>(this, 0x20000120, NRect(476, 358, 509, 394));
+ addCollisionSprite(_ssSymbol3UpButton);
+ _ssSymbol3DownButton = insertSprite<SsScene1105Button>(this, 0x08043121, NRect(463, 401, 508, 438));
+ addCollisionSprite(_ssSymbol3DownButton);
+ _ssActionButton = insertSprite<SsScene1105Button>(this, 0x8248AD35, NRect(280, 170, 354, 245));
+ addCollisionSprite(_ssActionButton);
+
+ _isPanelOpen = true;
+
+ _asTeddyBear->show();
+
+ insertPuzzleMouse(0x18666208, 20, 620);
+
+}
+
+void Scene1105::upOpenPanel() {
+ Scene::update();
+ if (_backgroundIndex != 0) {
+ _backgroundIndex--;
+ if (_backgroundIndex < 6 && _backgroundIndex % 2 == 0) {
+ uint32 backgroundFileHash = kScene1105BackgroundFileHashes[_backgroundIndex / 2];
+ changeBackground(backgroundFileHash);
+ _palette->addPalette(backgroundFileHash, 0, 256, 0);
+ }
+ if (_backgroundIndex == 10)
+ playSound(0);
+ if (_backgroundIndex == 0) {
+ SetUpdateHandler(&Scene1105::update);
+ _countdown = 2;
+ }
+ }
+}
+
+void Scene1105::upClosePanel() {
+ Scene::update();
+ if (_backgroundIndex != 0) {
+ _backgroundIndex--;
+ if (_backgroundIndex == 14) {
+ showMouse(false);
+ _ssSymbols[0]->hide();
+ _ssSymbols[1]->hide();
+ _ssSymbols[2]->hide();
+ _ssSymbolDice[0]->hide();
+ _ssSymbolDice[1]->hide();
+ _ssSymbolDice[2]->hide();
+ }
+ if (_backgroundIndex < 6 && _backgroundIndex % 2 == 0) {
+ uint32 backgroundFileHash = kScene1105BackgroundFileHashes[3 - _backgroundIndex / 2]; // CHECKME
+ if (_backgroundIndex == 4) {
+ playSound(1);
+ _asTeddyBear->hide();
+ }
+ changeBackground(backgroundFileHash);
+ _palette->addPalette(backgroundFileHash, 0, 256, 0);
+ }
+ if (_backgroundIndex == 0) {
+ SetUpdateHandler(&Scene1105::update);
+ _isClosePanelDone = true;
+ }
+ }
+}
+
+void Scene1105::update() {
+ Scene::update();
+ if (_countdown != 0 && (--_countdown == 0))
+ createObjects();
+ if (_isClosePanelDone && !isSoundPlaying(1))
+ leaveScene(_leaveResult);
+ if (_doMoveTeddy && !isSoundPlaying(2)) {
+ sendMessage(_asTeddyBear, 0x2002, 0);
+ _doMoveTeddy = false;
+ }
+}
+
+Scene1109::Scene1109(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1109::handleMessage);
+
+ setBackground(0x8449E02F);
+ setPalette(0x8449E02F);
+ insertScreenMouse(0x9E02B84C);
+
+ _sprite1 = insertStaticSprite(0x600CEF01, 1100);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1109>(140, 436);
+ setMessageList(0x004B6260);
+ sendMessage(this, 0x2000, 0);
+ } else if (which == 1) {
+ // Klaymen teleporting in
+ insertKlaymen<KmScene1109>(450, 436);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6268, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 2) {
+ // Klaymen teleporting out
+ insertKlaymen<KmScene1109>(450, 436);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6318, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 3) {
+ // Klaymen returning from teleporter console
+ insertKlaymen<KmScene1109>(450, 436);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6278, false);
+ sendMessage(this, 0x2000, 1);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1109>(0, 436);
+ setMessageList(0x004B6258);
+ sendMessage(this, 0x2000, 0);
+ }
+
+ _klaymen->setClipRect(0, 0, _sprite1->getDrawRect().x2(), 480);
+
+}
+
+uint32 Scene1109::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (param.asInteger()) {
+ setRectList(0x004B63A8);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004B6398);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1100.h b/engines/neverhood/modules/module1100.h
new file mode 100644
index 0000000000..373f6b703f
--- /dev/null
+++ b/engines/neverhood/modules/module1100.h
@@ -0,0 +1,130 @@
+/* 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 NEVERHOOD_MODULES_MODULE1100_H
+#define NEVERHOOD_MODULES_MODULE1100_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module1100
+
+class Module1100 : public Module {
+public:
+ Module1100(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1100();
+protected:
+ int _sceneNum;
+ int _countdown;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+class SsScene1105Button : public StaticSprite {
+public:
+ SsScene1105Button(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash, NRect &collisionBounds);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene1105Symbol : public StaticSprite {
+public:
+ SsScene1105Symbol(NeverhoodEngine *vm, uint32 fileHash, int16 x, int16 y);
+ void hide();
+};
+
+class SsScene1105SymbolDie : public StaticSprite {
+public:
+ SsScene1105SymbolDie(NeverhoodEngine *vm, uint dieIndex, int16 x, int16 y);
+ void hide();
+protected:
+ uint _dieIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void loadSymbolSprite();
+};
+
+class AsScene1105TeddyBear : public AnimatedSprite {
+public:
+ AsScene1105TeddyBear(NeverhoodEngine *vm, Scene *parentScene);
+ void show();
+ void hide();
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene1105OpenButton : public StaticSprite {
+public:
+ SsScene1105OpenButton(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ bool _isClicked;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1105 : public Scene {
+public:
+ Scene1105(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ int _countdown;
+ int _backgroundIndex;
+ bool _isPanelOpen;
+ bool _isActionButtonClicked;
+ bool _doMoveTeddy;
+ bool _isClosePanelDone;
+ int _leaveResult;
+ AsScene1105TeddyBear *_asTeddyBear;
+ SsScene1105Symbol *_ssSymbols[3];
+ SsScene1105SymbolDie *_ssSymbolDice[3];
+ Sprite *_ssSymbol1UpButton;
+ Sprite *_ssSymbol1DownButton;
+ Sprite *_ssSymbol2UpButton;
+ Sprite *_ssSymbol2DownButton;
+ Sprite *_ssSymbol3UpButton;
+ Sprite *_ssSymbol3DownButton;
+ Sprite *_ssActionButton;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createObjects();
+ void upOpenPanel();
+ void upClosePanel();
+ void update();
+};
+
+class Scene1109 : public Scene {
+public:
+ Scene1109(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite1;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1100_H */
diff --git a/engines/neverhood/modules/module1200.cpp b/engines/neverhood/modules/module1200.cpp
new file mode 100644
index 0000000000..3e67ddb35a
--- /dev/null
+++ b/engines/neverhood/modules/module1200.cpp
@@ -0,0 +1,1102 @@
+/* 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 "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+Module1200::Module1200(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ SetMessageHandler(&Module1200::handleMessage);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 1)
+ createScene(0, 2);
+ else
+ createScene(0, 0);
+
+ _vm->_soundMan->addMusic(0x00478311, 0x62222CAE);
+ _vm->_soundMan->startMusic(0x62222CAE, 0, 0);
+}
+
+Module1200::~Module1200() {
+ _vm->_soundMan->deleteMusicGroup(0x00478311);
+}
+
+void Module1200::createScene(int sceneNum, int which) {
+ debug(1, "Module1200::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1201(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _childObject = new Scene1202(_vm, this);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->stopMusic(0x62222CAE, 0, 0);
+ createSmackerScene(0x31890001, true, true, false);
+ setGlobalVar(V_SEEN_CREATURE_EXPLODE_VID, 1);
+ break;
+ }
+ SetUpdateHandler(&Module1200::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1200::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(1, 0);
+ else if (_moduleResult == 2) {
+ if (getGlobalVar(V_CREATURE_EXPLODED) && !getGlobalVar(V_SEEN_CREATURE_EXPLODE_VID))
+ createScene(2, -1);
+ else
+ leaveModule(1);
+ } else
+ leaveModule(0);
+ break;
+ case 1:
+ createScene(0, 1);
+ break;
+ case 2:
+ _vm->_soundMan->startMusic(0x62222CAE, 0, 0);
+ createScene(0, 3);
+ break;
+ }
+ }
+}
+
+// Scene1201
+
+static const uint32 kScene1201InitArray[] = {
+ 1, 0, 2, 4, 5, 3, 6, 7, 8, 10, 9, 11, 13, 14, 12, 16, 17, 15
+};
+
+static const NPoint kScene1201PointArray[] = {
+ {218, 193}, {410, 225}, {368, 277},
+ {194, 227}, {366, 174}, {458, 224},
+ {242, 228}, {512, 228}, {458, 277},
+ {217, 233}, {458, 173}, {410, 276},
+ {203, 280}, {371, 226}, {508, 279},
+ {230, 273}, {410, 171}, {493, 174}
+};
+
+static const uint32 kScene1201TntFileHashList1[] = {
+ 0x2098212D, 0x1600437E, 0x1600437E,
+ 0x00A840E3, 0x1A1830F6, 0x1A1830F6,
+ 0x00212062, 0x384010B6, 0x384010B6,
+ 0x07A01080, 0xD80C2837, 0xD80C2837,
+ 0x03A22092, 0xD8802CB6, 0xD8802CB6,
+ 0x03A93831, 0xDA460476, 0xDA460476
+};
+
+static const uint32 kScene1201TntFileHashList2[] = {
+ 0x3040C676, 0x10914448, 0x10914448,
+ 0x3448A066, 0x1288C049, 0x1288C049,
+ 0x78C0E026, 0x3098D05A, 0x3098D05A,
+ 0x304890E6, 0x1284E048, 0x1284E048,
+ 0xB140A1E6, 0x5088A068, 0x5088A068,
+ 0x74C4C866, 0x3192C059, 0x3192C059
+};
+
+SsScene1201Tnt::SsScene1201Tnt(NeverhoodEngine *vm, uint32 elemIndex, uint32 pointIndex, int16 clipY2)
+ : StaticSprite(vm, 900) {
+
+ int16 x = kScene1201PointArray[pointIndex].x;
+ int16 y = kScene1201PointArray[pointIndex].y;
+ if (x < 300)
+ loadSprite(kScene1201TntFileHashList1[elemIndex], kSLFDefDrawOffset | kSLFDefPosition, 50);
+ else
+ loadSprite(kScene1201TntFileHashList2[elemIndex], kSLFCenteredDrawOffset | kSLFSetPosition, 50, x, y);
+ setClipRect(0, 0, 640, clipY2);
+}
+
+AsScene1201Tape::AsScene1201Tape(NeverhoodEngine *vm, Scene *parentScene, uint32 nameHash, int surfacePriority, int16 x, int16 y, uint32 fileHash)
+ : AnimatedSprite(vm, fileHash, surfacePriority, x, y), _parentScene(parentScene), _nameHash(nameHash) {
+
+ if (!getSubVar(VA_HAS_TAPE, _nameHash) && !getSubVar(VA_IS_TAPE_INSERTED, _nameHash)) {
+ SetMessageHandler(&AsScene1201Tape::handleMessage);
+ } else {
+ setVisible(false);
+ SetMessageHandler(NULL);
+ }
+}
+
+uint32 AsScene1201Tape::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setSubVar(VA_HAS_TAPE, _nameHash, 1);
+ setVisible(false);
+ SetMessageHandler(NULL);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1201TntManRope::AsScene1201TntManRope(NeverhoodEngine *vm, bool isDummyHanging)
+ : AnimatedSprite(vm, 1200) {
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1201TntManRope::handleMessage);
+ createSurface(10, 34, 149);
+ _x = 202;
+ _y = -32;
+ if (isDummyHanging) {
+ startAnimation(0x928F0C10, 15, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else {
+ startAnimation(0x928F0C10, 0, -1);
+ _newStickFrameIndex = 0;
+ }
+}
+
+uint32 AsScene1201TntManRope::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02060018)
+ playSound(0, 0x47900E06);
+ break;
+ case 0x2006:
+ startAnimation(0x928F0C10, 1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1201RightDoor::AsScene1201RightDoor(NeverhoodEngine *vm, Sprite *klaymen, bool isOpen)
+ : AnimatedSprite(vm, 1100), _klaymen(klaymen), _countdown(0) {
+
+ createSurface1(0xD088AC30, 100);
+ _x = 320;
+ _y = 240;
+ SetUpdateHandler(&AsScene1201RightDoor::update);
+ SetMessageHandler(&AsScene1201RightDoor::handleMessage);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ if (isOpen) {
+ startAnimation(0xD088AC30, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ _countdown = 25;
+ } else {
+ stopAnimation();
+ setVisible(false);
+ }
+}
+
+void AsScene1201RightDoor::update() {
+ if (_countdown != 0 && (--_countdown == 0))
+ stCloseDoor();
+ AnimatedSprite::update();
+}
+
+uint32 AsScene1201RightDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4829:
+ stOpenDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1201RightDoor::stOpenDoor() {
+ startAnimation(0xD088AC30, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ setVisible(true);
+ playSound(0, calcHash("fxDoorOpen20"));
+}
+
+void AsScene1201RightDoor::stCloseDoor() {
+ startAnimation(0xD088AC30, -1, -1);
+ _playBackwards = true;
+ setVisible(true);
+ playSound(0, calcHash("fxDoorClose20"));
+ NextState(&AsScene1201RightDoor::stCloseDoorDone);
+}
+
+void AsScene1201RightDoor::stCloseDoorDone() {
+ stopAnimation();
+ setVisible(false);
+}
+
+AsScene1201KlaymenHead::AsScene1201KlaymenHead(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200) {
+
+ createSurface(1200, 69, 98);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1201KlaymenHead::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ setVisible(false);
+}
+
+uint32 AsScene1201KlaymenHead::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2006:
+ _x = 436;
+ _y = 339;
+ startAnimation(0xA060C599, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1201TntMan::AsScene1201TntMan(NeverhoodEngine *vm, Scene *parentScene, Sprite *asTntManRope, bool isComingDown)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _asTntManRope(asTntManRope),
+ _isMoving(false) {
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1201TntMan::handleMessage);
+ createSurface(990, 106, 181);
+ _x = 201;
+ if (isComingDown) {
+ _y = 297;
+ stComingDown();
+ } else {
+ _y = 334;
+ stStanding();
+ }
+}
+
+AsScene1201TntMan::~AsScene1201TntMan() {
+ _vm->_soundMan->deleteSoundGroup(0x01D00560);
+}
+
+uint32 AsScene1201TntMan::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x092870C0)
+ sendMessage(_asTntManRope, 0x2006, 0);
+ else if (param.asInteger() == 0x11CA0144)
+ playSound(0, 0x51800A04);
+ break;
+ case 0x1011:
+ sendMessage(_parentScene, 0x2002, 0);
+ messageResult = 1;
+ break;
+ case 0x480B:
+ if (!_isMoving) {
+ _sprite = (Sprite*)sender;
+ stMoving();
+ }
+ break;
+ }
+ return messageResult;
+
+}
+
+uint32 AsScene1201TntMan::hmComingDown(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = AsScene1201TntMan::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1201TntMan::suMoving() {
+ _x = _sprite->getX() + 100;
+}
+
+void AsScene1201TntMan::stStanding() {
+ startAnimation(0x654913D0, 0, -1);
+ SetMessageHandler(&AsScene1201TntMan::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsScene1201TntMan::stComingDown() {
+ startAnimation(0x356803D0, 0, -1);
+ SetMessageHandler(&AsScene1201TntMan::hmComingDown);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ NextState(&AsScene1201TntMan::stStanding);
+}
+
+void AsScene1201TntMan::stMoving() {
+ _vm->_soundMan->addSound(0x01D00560, 0x4B044624);
+ _vm->_soundMan->playSoundLooping(0x4B044624);
+ _isMoving = true;
+ startAnimation(0x85084190, 0, -1);
+ SetMessageHandler(&AsScene1201TntMan::handleMessage);
+ SetSpriteUpdate(&AsScene1201TntMan::suMoving);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+AsScene1201TntManFlame::AsScene1201TntManFlame(NeverhoodEngine *vm, Sprite *asTntMan)
+ : AnimatedSprite(vm, 1200), _asTntMan(asTntMan) {
+
+ createSurface1(0x828C0411, 995);
+ SetUpdateHandler(&AsScene1201TntManFlame::update);
+ SetMessageHandler(&Sprite::handleMessage);
+ SetSpriteUpdate(&AsScene1201TntManFlame::suUpdate);
+ startAnimation(0x828C0411, 0, -1);
+ setVisible(false);
+}
+
+AsScene1201TntManFlame::~AsScene1201TntManFlame() {
+ _vm->_soundMan->deleteSoundGroup(0x041080A4);
+}
+
+void AsScene1201TntManFlame::update() {
+ AnimatedSprite::update();
+ if (getGlobalVar(V_TNT_DUMMY_FUSE_LIT)) {
+ setVisible(true);
+ SetUpdateHandler(&AnimatedSprite::update);
+ _vm->_soundMan->addSound(0x041080A4, 0x460A1050);
+ _vm->_soundMan->playSoundLooping(0x460A1050);
+ }
+}
+
+void AsScene1201TntManFlame::suUpdate() {
+ _x = _asTntMan->getX() - 18;
+ _y = _asTntMan->getY() - 158;
+}
+
+AsScene1201Match::AsScene1201Match(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _countdown(0) {
+
+ createSurface(1100, 57, 60);
+ SetUpdateHandler(&AsScene1201Match::update);
+ SetMessageHandler(&AsScene1201Match::hmOnDoorFrameAboutToMove);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ switch (getGlobalVar(V_MATCH_STATUS)) {
+ case 0:
+ _x = 521;
+ _y = 112;
+ _status = 0;
+ stIdleOnDoorFrame();
+ break;
+ case 1:
+ _x = 521;
+ _y = 112;
+ _status = 2;
+ stOnDoorFrameAboutToMove();
+ loadSound(0, 0xD00230CD);
+ break;
+ case 2:
+ setDoDeltaX(1);
+ _x = 403;
+ _y = 337;
+ _status = 0;
+ stIdleOnFloor();
+ break;
+ }
+}
+
+void AsScene1201Match::update() {
+ if (_countdown != 0 && (--_countdown == 0))
+ gotoNextState();
+ updateAnim();
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 AsScene1201Match::hmOnDoorFrameAboutToMove(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x86668011)
+ playSound(0);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1201Match::hmOnDoorFrameMoving(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmOnDoorFrameAboutToMove(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1201Match::hmIdle(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmOnDoorFrameAboutToMove(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x2001, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setVisible(false);
+ setGlobalVar(V_MATCH_STATUS, 3);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1201Match::stOnDoorFrameMoving() {
+ startAnimation(0x00842374, 0, -1);
+ SetMessageHandler(&AsScene1201Match::hmOnDoorFrameMoving);
+ if (_status == 0) {
+ NextState(&AsScene1201Match::stFallingFromDoorFrame);
+ } else {
+ NextState(&AsScene1201Match::stOnDoorFrameAboutToMove);
+ }
+}
+
+void AsScene1201Match::stFallingFromDoorFrame() {
+ setGlobalVar(V_MATCH_STATUS, 2);
+ _x -= 199;
+ _y += 119;
+ startAnimation(0x018D0240, 0, -1);
+ SetMessageHandler(&AsScene1201Match::hmOnDoorFrameMoving);
+ NextState(&AsScene1201Match::stIdleOnFloor);
+}
+
+void AsScene1201Match::stOnDoorFrameAboutToMove() {
+ startAnimation(0x00842374, 0, -1);
+ SetMessageHandler(&AsScene1201Match::hmOnDoorFrameAboutToMove);
+ _newStickFrameIndex = 0;
+ if (_status != 0) {
+ _countdown = 36;
+ _status--;
+ NextState(&AsScene1201Match::stOnDoorFrameMoving);
+ }
+}
+
+void AsScene1201Match::stIdleOnDoorFrame() {
+ startAnimation(0x00842374, 0, -1);
+ SetMessageHandler(&AsScene1201Match::hmIdle);
+ _newStickFrameIndex = 0;
+}
+
+void AsScene1201Match::stIdleOnFloor() {
+ setDoDeltaX(1);
+ _x = 403;
+ _y = 337;
+ startAnimation(0x00842374, 0, -1);
+ SetMessageHandler(&AsScene1201Match::hmIdle);
+ _newStickFrameIndex = 0;
+}
+
+AsScene1201Creature::AsScene1201Creature(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen)
+ : AnimatedSprite(vm, 900), _parentScene(parentScene), _klaymen(klaymen), _klaymenTooClose(false) {
+
+ // NOTE: _countdown2 and _countdown3 were unused/without effect and thus removed
+
+ createSurface(1100, 203, 199);
+ SetUpdateHandler(&AsScene1201Creature::update);
+ SetMessageHandler(&AsScene1201Creature::hmWaiting);
+ _x = 540;
+ _y = 320;
+ stWaiting();
+}
+
+void AsScene1201Creature::update() {
+ bool oldKlaymenTooClose = _klaymenTooClose;
+ _klaymenTooClose = _klaymen->getX() >= 385;
+ if (_klaymenTooClose != oldKlaymenTooClose)
+ stWaiting();
+ if (_countdown != 0 && (--_countdown == 0))
+ gotoNextState();
+ updateAnim();
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 AsScene1201Creature::hmWaiting(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02060018)
+ playSound(0, 0xCD298116);
+ break;
+ case 0x2004:
+ GotoState(&AsScene1201Creature::stStartReachForTntDummy);
+ break;
+ case 0x2006:
+ GotoState(&AsScene1201Creature::stPincerSnapKlaymen);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1201Creature::hmPincerSnap(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = hmWaiting(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1201Creature::hmPincerSnapKlaymen(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02060018) {
+ playSound(0, 0xCD298116);
+ sendMessage(_parentScene, 0x4814, 0);
+ sendMessage(_klaymen, 0x4814, 0);
+ }
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1201Creature::stWaiting() {
+ startAnimation(0x08081513, 0, -1);
+ SetMessageHandler(&AsScene1201Creature::hmWaiting);
+ NextState(&AsScene1201Creature::stPincerSnap);
+ _countdown = 36;
+}
+
+void AsScene1201Creature::stPincerSnap() {
+ if (!_klaymenTooClose) {
+ startAnimation(0xCA287133, 0, -1);
+ SetMessageHandler(&AsScene1201Creature::hmPincerSnap);
+ NextState(&AsScene1201Creature::stWaiting);
+ }
+}
+
+void AsScene1201Creature::stStartReachForTntDummy() {
+ startAnimation(0x08081513, 0, -1);
+ SetMessageHandler(&AsScene1201Creature::hmWaiting);
+ NextState(&AsScene1201Creature::stReachForTntDummy);
+ _countdown = 48;
+}
+
+void AsScene1201Creature::stReachForTntDummy() {
+ startAnimation(0x5A201453, 0, -1);
+ SetMessageHandler(&AsScene1201Creature::hmWaiting);
+ _countdown = 0;
+}
+
+void AsScene1201Creature::stPincerSnapKlaymen() {
+ startAnimation(0xCA287133, 0, -1);
+ SetMessageHandler(&AsScene1201Creature::hmPincerSnapKlaymen);
+ NextState(&AsScene1201Creature::stWaiting);
+ _countdown = 0;
+}
+
+AsScene1201LeftDoor::AsScene1201LeftDoor(NeverhoodEngine *vm, Sprite *klaymen)
+ : AnimatedSprite(vm, 1100), _klaymen(klaymen) {
+
+ _x = 320;
+ _y = 240;
+ createSurface(800, 55, 199);
+ if (_klaymen->getX() < 100) {
+ startAnimation(0x508A111B, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ playSound(0, calcHash("fxDoorOpen03"));
+ } else {
+ startAnimation(0x508A111B, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ }
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1201LeftDoor::handleMessage);
+}
+
+uint32 AsScene1201LeftDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4809:
+ stCloseDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1201LeftDoor::stCloseDoor() {
+ startAnimation(0x508A111B, -1, -1);
+ _playBackwards = true;
+ _newStickFrameIndex = 0;
+}
+
+Scene1201::Scene1201(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _creatureExploded(false), _asMatch(NULL), _asTntMan(NULL),
+ _asCreature(NULL), _asTntManRope(NULL), _asLeftDoor(NULL), _asRightDoor(NULL), _asTape(NULL) {
+
+ int16 topY1, topY2, topY3, topY4;
+ int16 x1, x2;
+ Sprite *tempSprite;
+
+ SetUpdateHandler(&Scene1201::update);
+ SetMessageHandler(&Scene1201::handleMessage);
+
+ setHitRects(0x004AEBD0);
+
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0xE8058B52)) {
+ setSubVar(VA_IS_PUZZLE_INIT, 0xE8058B52, 1);
+ for (uint32 index = 0; index < 18; index++)
+ setSubVar(VA_TNT_POSITIONS, index, kScene1201InitArray[index]);
+ }
+
+ insertScreenMouse(0x9A2C0409);
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 3, 1100, 243, 340, 0x9148A011);
+ addCollisionSprite(_asTape);
+
+ tempSprite = insertStaticSprite(0x03C82530, 100);
+ topY1 = tempSprite->getY() + tempSprite->getDrawRect().height;
+
+ tempSprite = insertStaticSprite(0x88182069, 200);
+ topY2 = tempSprite->getY() + tempSprite->getDrawRect().height;
+
+ tempSprite = insertStaticSprite(0x476014E0, 300);
+ topY3 = tempSprite->getY() + tempSprite->getDrawRect().height;
+
+ tempSprite = insertStaticSprite(0x04063110, 500);
+ topY4 = tempSprite->getY() + 1;
+
+ _asTntManRope = insertSprite<AsScene1201TntManRope>(getGlobalVar(V_TNT_DUMMY_BUILT) && which != 1);
+ _asTntManRope->setClipRect(0, topY4, 640, 480);
+
+ insertStaticSprite(0x400B04B0, 1200);
+
+ tempSprite = insertStaticSprite(0x40295462, 1200);
+ x1 = tempSprite->getX();
+
+ tempSprite = insertStaticSprite(0xA29223FA, 1200);
+ x2 = tempSprite->getX() + tempSprite->getDrawRect().width;
+
+ _asKlaymenHead = insertSprite<AsScene1201KlaymenHead>();
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1201>(364, 333);
+ setMessageList(0x004AEC08);
+ } else if (which == 3) {
+ // Klaymen standing after the weasel exploded
+ insertKlaymen<KmScene1201>(400, 329);
+ setMessageList(0x004AEC08);
+ } else if (which == 2) {
+ // Klaymen entering from the right
+ if (getGlobalVar(V_CREATURE_ANGRY) && !getGlobalVar(V_CREATURE_EXPLODED)) {
+ insertKlaymen<KmScene1201>(374, 333);
+ setMessageList(0x004AEC08);
+ } else {
+ insertKlaymen<KmScene1201>(640, 329);
+ setMessageList(0x004AEC20);
+ }
+ } else if (which == 1) {
+ // Klaymen returning from the TNT console
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene1201>(364, 333);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene1201>(246, 333);
+ }
+ setMessageList(0x004AEC30);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1201>(0, 336);
+ setMessageList(0x004AEC10);
+ }
+
+ _klaymen->setClipRect(x1, 0, x2, 480);
+ _klaymen->setRepl(64, 0);
+
+ if (getGlobalVar(V_CREATURE_ANGRY) && !getGlobalVar(V_CREATURE_EXPLODED)) {
+ setBackground(0x4019A2C4);
+ setPalette(0x4019A2C4);
+ _asRightDoor = NULL;
+ } else {
+ setBackground(0x40206EC5);
+ setPalette(0x40206EC5);
+ _asRightDoor = insertSprite<AsScene1201RightDoor>(_klaymen, which == 2);
+ }
+
+ if (getGlobalVar(V_TNT_DUMMY_BUILT)) {
+ insertStaticSprite(0x10002ED8, 500);
+ if (!getGlobalVar(V_CREATURE_EXPLODED)) {
+ _asTntMan = insertSprite<AsScene1201TntMan>(this, _asTntManRope, which == 1);
+ _asTntMan->setClipRect(x1, 0, x2, 480);
+ _asTntMan->setRepl(64, 0);
+ addCollisionSprite(_asTntMan);
+ tempSprite = insertSprite<AsScene1201TntManFlame>(_asTntMan);
+ tempSprite->setClipRect(x1, 0, x2, 480);
+ }
+
+ uint32 tntIndex = 1;
+ while (tntIndex < 18) {
+ uint32 elemIndex = getSubVar(VA_TNT_POSITIONS, tntIndex);
+ int16 clipY2;
+ if (kScene1201PointArray[elemIndex].y < 175)
+ clipY2 = topY1;
+ else if (kScene1201PointArray[elemIndex].y < 230)
+ clipY2 = topY2;
+ else
+ clipY2 = topY3;
+ insertSprite<SsScene1201Tnt>(tntIndex, getSubVar(VA_TNT_POSITIONS, tntIndex), clipY2);
+ elemIndex = getSubVar(VA_TNT_POSITIONS, tntIndex + 1);
+ if (kScene1201PointArray[elemIndex].y < 175)
+ clipY2 = topY1;
+ else if (kScene1201PointArray[elemIndex].y < 230)
+ clipY2 = topY2;
+ else
+ clipY2 = topY3;
+ insertSprite<SsScene1201Tnt>(tntIndex + 1, getSubVar(VA_TNT_POSITIONS, tntIndex + 1), clipY2);
+ tntIndex += 3;
+ }
+
+ if (getGlobalVar(V_CREATURE_ANGRY) && !getGlobalVar(V_CREATURE_EXPLODED)) {
+ setRectList(0x004AEE58);
+ } else {
+ setRectList(0x004AEDC8);
+ }
+
+ } else {
+
+ insertStaticSprite(0x8E8A1981, 900);
+
+ uint32 tntIndex = 0;
+ while (tntIndex < 18) {
+ uint32 elemIndex = getSubVar(VA_TNT_POSITIONS, tntIndex);
+ int16 clipY2;
+ if (kScene1201PointArray[elemIndex].x < 300) {
+ clipY2 = 480;
+ } else {
+ if (kScene1201PointArray[elemIndex].y < 175)
+ clipY2 = topY1;
+ else if (kScene1201PointArray[elemIndex].y < 230)
+ clipY2 = topY2;
+ else
+ clipY2 = topY3;
+ }
+ insertSprite<SsScene1201Tnt>(tntIndex, getSubVar(VA_TNT_POSITIONS, tntIndex), clipY2);
+ tntIndex++;
+ }
+
+ if (getGlobalVar(V_CREATURE_ANGRY) && !getGlobalVar(V_CREATURE_EXPLODED))
+ setRectList(0x004AEE18);
+ else
+ setRectList(0x004AED88);
+
+ }
+
+ tempSprite = insertStaticSprite(0x63D400BC, 900);
+
+ _asLeftDoor = insertSprite<AsScene1201LeftDoor>(_klaymen);
+ _asLeftDoor->setClipRect(x1, tempSprite->getDrawRect().y, tempSprite->getDrawRect().x2(), 480);
+
+ if (getGlobalVar(V_CREATURE_ANGRY) && getGlobalVar(V_MATCH_STATUS) == 0)
+ setGlobalVar(V_MATCH_STATUS, 1);
+
+ _asMatch = NULL;
+
+ if (getGlobalVar(V_MATCH_STATUS) < 3) {
+ _asMatch = insertSprite<AsScene1201Match>(this);
+ addCollisionSprite(_asMatch);
+ }
+
+ if (getGlobalVar(V_CREATURE_ANGRY) && getGlobalVar(V_CREATURE_EXPLODED) == 0) {
+ _asCreature = insertSprite<AsScene1201Creature>(this, _klaymen);
+ _asCreature->setClipRect(x1, 0, x2, 480);
+ }
+
+}
+
+Scene1201::~Scene1201() {
+ if (_creatureExploded)
+ setGlobalVar(V_CREATURE_EXPLODED, 1);
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+void Scene1201::update() {
+ Scene::update();
+ if (_asMatch && getGlobalVar(V_MATCH_STATUS) == 3)
+ deleteSprite(&_asMatch);
+}
+
+uint32 Scene1201::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x07053000) {
+ _creatureExploded = true;
+ sendMessage(_asCreature, 0x2004, 0);
+ } else if (param.asInteger() == 0x140E5744)
+ sendMessage(_asCreature, 0x2005, 0);
+ else if (param.asInteger() == 0x40253C40) {
+ _canAcceptInput = false;
+ sendMessage(_asCreature, 0x2006, 0);
+ } else if (param.asInteger() == 0x090EB048) {
+ if (_klaymen->getX() < 572)
+ setMessageList2(0x004AEC90);
+ else
+ setMessageList2(0x004AEC20);
+ }
+ break;
+ case 0x2001:
+ if (getGlobalVar(V_MATCH_STATUS) == 0)
+ setMessageList2(0x004AECB0);
+ else {
+ sendEntityMessage(_klaymen, 0x1014, _asMatch);
+ setMessageList2(0x004AECC0);
+ }
+ break;
+ case 0x2002:
+ if (getGlobalVar(V_TNT_DUMMY_FUSE_LIT)) {
+ // Move the TNT dummy if the fuse is burning
+ sendEntityMessage(_klaymen, 0x1014, _asTntMan);
+ setMessageList2(0x004AECF0, false);
+ } else if (getGlobalVar(V_MATCH_STATUS) == 3) {
+ // Light the TNT dummy if we have the match
+ sendEntityMessage(_klaymen, 0x1014, _asTntMan);
+ if (_klaymen->getX() > _asTntMan->getX())
+ setMessageList(0x004AECD0);
+ else
+ setMessageList(0x004AECE0);
+ }
+ break;
+ case 0x4814:
+ cancelMessageList();
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004AED38);
+ }
+ break;
+ case 0x4829:
+ sendMessage(_asRightDoor, 0x4829, 0);
+ break;
+ case 0x8000:
+ sendMessage(_asKlaymenHead, 0x2006, 0);
+ break;
+ }
+ return messageResult;
+}
+
+// Scene1202
+
+static const uint32 kScene1202Table[] = {
+ 1, 2, 0, 4, 5, 3, 7, 8, 6, 10, 11, 9, 13, 14, 12, 16, 17, 15
+};
+
+static const NPoint kScene1202Points[] = {
+ {203, 140}, {316, 212}, {277, 264},
+ {176, 196}, {275, 159}, {366, 212},
+ {230, 195}, {412, 212}, {368, 263},
+ {204, 192}, {365, 164}, {316, 262},
+ {191, 255}, {280, 213}, {406, 266},
+ {214, 254}, {316, 158}, {402, 161}
+};
+
+static const uint32 kScene1202FileHashes[] = {
+ 0x1AC00B8, 0x1AC14B8, 0x1AC14B8,
+ 0x1AC30B8, 0x1AC14B8, 0x1AC14B8,
+ 0x1AC00B8, 0x1AC14B8, 0x1AC14B8,
+ 0x1AC90B8, 0x1AC18B8, 0x1AC18B8,
+ 0x1AC30B8, 0x1AC14B8, 0x1AC14B8,
+ 0x1AC50B8, 0x1AC14B8, 0x1AC14B8
+};
+
+AsScene1202TntItem::AsScene1202TntItem(NeverhoodEngine *vm, Scene *parentScene, int itemIndex)
+ : AnimatedSprite(vm, 900), _parentScene(parentScene), _itemIndex(itemIndex) {
+
+ int positionIndex;
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1202TntItem::hmShowIdle);
+ positionIndex = getSubVar(VA_TNT_POSITIONS, _itemIndex);
+ createSurface(900, 37, 67);
+ _x = kScene1202Points[positionIndex].x;
+ _y = kScene1202Points[positionIndex].y;
+ stShowIdle();
+}
+
+uint32 AsScene1202TntItem::hmShowIdle(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x2000, _itemIndex);
+ messageResult = 1;
+ break;
+ case 0x2001:
+ _newPosition = (int)param.asInteger();
+ stChangePositionFadeOut();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1202TntItem::hmChangePosition(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1202TntItem::stShowIdle() {
+ startAnimation(kScene1202FileHashes[_itemIndex], 0, -1);
+ SetMessageHandler(&AsScene1202TntItem::hmShowIdle);
+ _newStickFrameIndex = 0;
+}
+
+void AsScene1202TntItem::stChangePositionFadeOut() {
+ startAnimation(kScene1202FileHashes[_itemIndex], 0, -1);
+ SetMessageHandler(&AsScene1202TntItem::hmChangePosition);
+ NextState(&AsScene1202TntItem::stChangePositionFadeIn);
+}
+
+void AsScene1202TntItem::stChangePositionFadeIn() {
+ _x = kScene1202Points[_newPosition].x;
+ _y = kScene1202Points[_newPosition].y;
+ startAnimation(kScene1202FileHashes[_itemIndex], 6, -1);
+ _playBackwards = true;
+ SetMessageHandler(&AsScene1202TntItem::hmChangePosition);
+ NextState(&AsScene1202TntItem::stChangePositionDone);
+}
+
+void AsScene1202TntItem::stChangePositionDone() {
+ sendMessage(_parentScene, 0x2002, _itemIndex);
+ stShowIdle();
+}
+
+Scene1202::Scene1202(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _paletteResource(vm),
+ _soundToggle(true), _isPuzzleSolved(false), _counter(0), _clickedIndex(-1) {
+
+ SetMessageHandler(&Scene1202::handleMessage);
+ SetUpdateHandler(&Scene1202::update);
+
+ setBackground(0x60210ED5);
+ setPalette(0x60210ED5);
+ addEntity(_palette);
+
+ _paletteResource.load(0x60250EB5);
+ _paletteResource.copyPalette(_paletteData);
+
+ insertPuzzleMouse(0x10ED160A, 20, 620);
+
+ for (int tntIndex = 0; tntIndex < 18; tntIndex++) {
+ _asTntItems[tntIndex] = insertSprite<AsScene1202TntItem>(this, tntIndex);
+ addCollisionSprite(_asTntItems[tntIndex]);
+ }
+
+ insertStaticSprite(0x8E8419C1, 1100);
+
+ if (getGlobalVar(V_TNT_DUMMY_BUILT))
+ SetMessageHandler(&Scene1202::hmSolved);
+
+ playSound(0, 0x40106542);
+ loadSound(1, 0x40005446);
+ loadSound(2, 0x40005446); // Same sound as slot 1
+ loadSound(3, 0x68E25540);
+
+}
+
+Scene1202::~Scene1202() {
+ if (isSolved())
+ setGlobalVar(V_TNT_DUMMY_BUILT, 1);
+}
+
+void Scene1202::update() {
+ Scene::update();
+ if (_isPuzzleSolved) {
+ if (!isSoundPlaying(3))
+ leaveScene(0);
+ } else if (_counter == 0 && isSolved()) {
+ _clickedIndex = 0;
+ SetMessageHandler(&Scene1202::hmSolved);
+ setGlobalVar(V_TNT_DUMMY_BUILT, 1);
+ _palette->copyToBasePalette(_paletteData);
+ _palette->startFadeToPalette(24);
+ playSound(3);
+ _isPuzzleSolved = true;
+ } else if (_clickedIndex >= 0 && _counter == 0) {
+ // Swap TNT positions
+ int destIndex = kScene1202Table[_clickedIndex];
+ sendMessage(_asTntItems[_clickedIndex], 0x2001, getSubVar(VA_TNT_POSITIONS, destIndex));
+ sendMessage(_asTntItems[destIndex], 0x2001, getSubVar(VA_TNT_POSITIONS, _clickedIndex));
+ int temp = getSubVar(VA_TNT_POSITIONS, destIndex);
+ setSubVar(VA_TNT_POSITIONS, destIndex, getSubVar(VA_TNT_POSITIONS, _clickedIndex));
+ setSubVar(VA_TNT_POSITIONS, _clickedIndex, temp);
+ _counter = 2;
+ _clickedIndex = -1;
+ playSound(_soundToggle ? 1 : 2);
+ _soundToggle = !_soundToggle;
+ }
+}
+
+uint32 Scene1202::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isPuzzleSolved)
+ leaveScene(0);
+ break;
+ case 0x2000:
+ _clickedIndex = (int)param.asInteger();
+ break;
+ case 0x2002:
+ _counter--;
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene1202::hmSolved(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ }
+ return 0;
+}
+
+bool Scene1202::isSolved() {
+ return
+ getSubVar(VA_TNT_POSITIONS, 0) == 0 && getSubVar(VA_TNT_POSITIONS, 3) == 3 &&
+ getSubVar(VA_TNT_POSITIONS, 6) == 6 && getSubVar(VA_TNT_POSITIONS, 9) == 9 &&
+ getSubVar(VA_TNT_POSITIONS, 12) == 12 && getSubVar(VA_TNT_POSITIONS, 15) == 15;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1200.h b/engines/neverhood/modules/module1200.h
new file mode 100644
index 0000000000..c97dc98986
--- /dev/null
+++ b/engines/neverhood/modules/module1200.h
@@ -0,0 +1,216 @@
+/* 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 NEVERHOOD_MODULES_MODULE1200_H
+#define NEVERHOOD_MODULES_MODULE1200_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module1200
+
+class Module1200 : public Module {
+public:
+ Module1200(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1200();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1201
+
+class AsScene1201Tape : public AnimatedSprite {
+public:
+ AsScene1201Tape(NeverhoodEngine *vm, Scene *parentScene, uint32 nameHash, int surfacePriority, int16 x, int16 y, uint32 fileHash);
+protected:
+ Scene *_parentScene;
+ uint32 _nameHash;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1201TntManRope : public AnimatedSprite {
+public:
+ AsScene1201TntManRope(NeverhoodEngine *vm, bool isDummyHanging);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1201RightDoor : public AnimatedSprite {
+public:
+ AsScene1201RightDoor(NeverhoodEngine *vm, Sprite *klaymen, bool isOpen);
+protected:
+ Sprite *_klaymen;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stCloseDoor();
+ void stCloseDoorDone();
+};
+
+class AsScene1201KlaymenHead : public AnimatedSprite {
+public:
+ AsScene1201KlaymenHead(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1201TntMan : public AnimatedSprite {
+public:
+ AsScene1201TntMan(NeverhoodEngine *vm, Scene *parentScene, Sprite *asTntManRope, bool isDown);
+ virtual ~AsScene1201TntMan();
+protected:
+ Scene *_parentScene;
+ Sprite *_asTntManRope;
+ Sprite *_sprite;
+ bool _isMoving;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmComingDown(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoving();
+ void stStanding();
+ void stComingDown();
+ void stMoving();
+};
+
+class AsScene1201TntManFlame : public AnimatedSprite {
+public:
+ AsScene1201TntManFlame(NeverhoodEngine *vm, Sprite *asTntMan);
+ ~AsScene1201TntManFlame();
+protected:
+ Sprite *_asTntMan;
+ void update();
+ void suUpdate();
+};
+
+class AsScene1201Match : public AnimatedSprite {
+public:
+ AsScene1201Match(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ int _status;
+ void update();
+ uint32 hmOnDoorFrameAboutToMove(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmOnDoorFrameMoving(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmIdle(int messageNum, const MessageParam &param, Entity *sender);
+ void stOnDoorFrameMoving();
+ void stFallingFromDoorFrame();
+ void stOnDoorFrameAboutToMove();
+ void stIdleOnDoorFrame();
+ void stIdleOnFloor();
+};
+
+class AsScene1201Creature : public AnimatedSprite {
+public:
+ AsScene1201Creature(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen);
+protected:
+ Scene *_parentScene;
+ Sprite *_klaymen;
+ int _countdown;
+ bool _klaymenTooClose;
+ void update();
+ uint32 hmWaiting(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmPincerSnap(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmPincerSnapKlaymen(int messageNum, const MessageParam &param, Entity *sender);
+ void stWaiting();
+ void stPincerSnap();
+ void stStartReachForTntDummy();
+ void stReachForTntDummy();
+ void stPincerSnapKlaymen();
+};
+
+class AsScene1201LeftDoor : public AnimatedSprite {
+public:
+ AsScene1201LeftDoor(NeverhoodEngine *vm, Sprite *klaymen);
+protected:
+ Sprite *_klaymen;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stCloseDoor();
+};
+
+class SsScene1201Tnt : public StaticSprite {
+public:
+ SsScene1201Tnt(NeverhoodEngine *vm, uint32 elemIndex, uint32 pointIndex, int16 clipY2);
+protected:
+ uint32 _elemIndex;
+};
+
+class Scene1201 : public Scene {
+public:
+ Scene1201(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene1201();
+protected:
+ Sprite *_asMatch;
+ AsScene1201TntMan *_asTntMan;
+ Sprite *_asCreature;
+ Sprite *_asTntManRope;
+ Sprite *_asLeftDoor;
+ Sprite *_asRightDoor;
+ Sprite *_asTape;
+ Sprite *_asKlaymenHead;
+ bool _creatureExploded;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1202
+
+class AsScene1202TntItem : public AnimatedSprite {
+public:
+ AsScene1202TntItem(NeverhoodEngine *vm, Scene *parentScene, int index);
+protected:
+ Scene *_parentScene;
+ int _itemIndex, _newPosition;
+ uint32 hmShowIdle(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmChangePosition(int messageNum, const MessageParam &param, Entity *sender);
+ void stShowIdle();
+ void stChangePositionFadeOut();
+ void stChangePositionFadeIn();
+ void stChangePositionDone();
+};
+
+class Scene1202 : public Scene {
+public:
+ Scene1202(NeverhoodEngine *vm, Module *parentModule);
+ virtual ~Scene1202();
+protected:
+ PaletteResource _paletteResource;
+ Sprite *_asTntItems[18];
+ int _counter;
+ int _clickedIndex;
+ byte _paletteData[1024];
+ bool _isPuzzleSolved;
+ bool _soundToggle;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmSolved(int messageNum, const MessageParam &param, Entity *sender);
+ bool isSolved();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1200_H */
diff --git a/engines/neverhood/modules/module1300.cpp b/engines/neverhood/modules/module1300.cpp
new file mode 100644
index 0000000000..cc5c22085c
--- /dev/null
+++ b/engines/neverhood/modules/module1300.cpp
@@ -0,0 +1,1837 @@
+/* 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 "neverhood/modules/module1300.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/modules/module1400.h"
+#include "neverhood/modules/module2200.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/diskplayerscene.h"
+#include "neverhood/menumodule.h"
+#include "neverhood/navigationscene.h"
+#include "neverhood/smackerscene.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1300SoundList[] = {
+ 0x16805648,
+ 0x16805C48,
+ 0xB4964448,
+ 0x96A05481,
+ 0xD0E14441,
+ 0x90815450,
+ 0
+};
+
+Module1300::Module1300(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x61C090, 0x00203197);
+ _vm->_soundMan->addSoundList(0x61C090, kModule1300SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 50, 600, 20, 150);
+ _vm->_soundMan->playTwoSounds(0x61C090, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
+
+ if (which < 0) {
+ if (_vm->gameState().sceneNum >= 1 && _vm->gameState().sceneNum <= 17)
+ createScene(_vm->gameState().sceneNum, -1);
+ else
+ createScene(11, 0);
+ } else {
+ switch (which) {
+ case 0:
+ createScene(11, 0);
+ break;
+ case 1:
+ createScene(13, 0);
+ break;
+ case 2:
+ createScene(14, 0);
+ break;
+ case 3:
+ createScene(15, 0);
+ break;
+ case 4:
+ createScene(7, 0);
+ break;
+ case 5:
+ createScene(5, 1);
+ break;
+ case 6:
+ createScene(5, 5);
+ break;
+ case 7:
+ createScene(3, 0);
+ break;
+ case 8:
+ createScene(1, 0);
+ break;
+ case 9:
+ createScene(2, 0);
+ break;
+ case 10:
+ createScene(6, 0);
+ break;
+ case 11:
+ createScene(4, 0);
+ break;
+ default:
+ createScene(12, 0);
+ break;
+ }
+ }
+
+}
+
+Module1300::~Module1300() {
+ _vm->_soundMan->deleteGroup(0x61C090);
+}
+
+void Module1300::createScene(int sceneNum, int which) {
+ debug(1, "Module1300::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x00203197, 0, 2);
+ _childObject = new Scene1302(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ _childObject = new Scene1303(_vm, this);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ _childObject = new Scene1304(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x00203197, 0, 2);
+ _childObject = new Scene1305(_vm, this, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x00203197, 0, 2);
+ _childObject = new Scene1306(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x00203197, 0, 2);
+ _childObject = new Scene1307(_vm, this);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x00203197, 0, 2);
+ _childObject = new Scene1308(_vm, this, which);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ _childObject = new DiskplayerScene(_vm, this, 1);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createSmackerScene(0x20082818, true, true, false);
+ break;
+ case 10:
+ _vm->gameState().sceneNum = 10;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createSmackerScene(0x20082828, true, true, false);
+ break;
+ case 11:
+ _vm->gameState().sceneNum = 11;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, true, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createNavigationScene(0x004B27A8, which);
+ break;
+ case 12:
+ _vm->gameState().sceneNum = 12;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, true, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createNavigationScene(0x004B2718, which);
+ break;
+ case 13:
+ _vm->gameState().sceneNum = 13;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, true, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createNavigationScene(0x004B27D8, which);
+ break;
+ case 14:
+ _vm->gameState().sceneNum = 14;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, true, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createNavigationScene(0x004B2808, which);
+ break;
+ case 15:
+ _vm->gameState().sceneNum = 15;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, true, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ createNavigationScene(0x004B2838, which);
+ break;
+ case 16:
+ _vm->gameState().sceneNum = 16;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ _childObject = new Scene1317(_vm, this);
+ break;
+ case 17:
+ _vm->gameState().sceneNum = 17;
+ _vm->_soundMan->setSoundListParams(kModule1300SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->stopMusic(0x00203197, 0, 2);
+ _childObject = new CreditsScene(_vm, this, false);
+ break;
+ }
+ SetUpdateHandler(&Module1300::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1300::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 1:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else
+ createScene(7, 1);
+ break;
+ case 2:
+ createScene(5, 3);
+ break;
+ case 3:
+ createScene(15, 0);
+ break;
+ case 4:
+ createScene(16, -1);
+ break;
+ case 5:
+ if (_moduleResult == 2)
+ createScene(8, 0);
+ else if (_moduleResult == 3)
+ createScene(2, 0);
+ else if (_moduleResult == 0)
+ leaveModule(0);
+ else if (_moduleResult == 1)
+ createScene(10, -1);
+ break;
+ case 6:
+ createScene(7, 2);
+ break;
+ case 7:
+ if (_moduleResult == 0)
+ createScene(13, 0);
+ else if (_moduleResult == 1)
+ createScene(1, 0);
+ else if (_moduleResult == 2)
+ createScene(6, 0);
+ break;
+ case 8:
+ createScene(5, 2);
+ break;
+ case 9:
+ createScene(5, 0);
+ break;
+ case 10:
+ createScene(14, 0);
+ break;
+ case 11:
+ if (_moduleResult == 0)
+ createScene(12, 0);
+ else if (_moduleResult == 1)
+ createScene(11, 1);
+ break;
+ case 12:
+ if (_moduleResult == 0)
+ createScene(14, 1);
+ else if (_moduleResult == 1)
+ createScene(15, 1);
+ else if (_moduleResult == 3)
+ createScene(11, 1);
+ else if (_moduleResult == 5)
+ createScene(13, 1);
+ break;
+ case 13:
+ if (_moduleResult == 0)
+ createScene(12, 2);
+ else if (_moduleResult == 1)
+ createScene(7, 0);
+ break;
+ case 14:
+ if (_moduleResult == 0)
+ createScene(12, 3);
+ else if (_moduleResult == 1)
+ createScene(9, -1);
+ break;
+ case 15:
+ if (_moduleResult == 0)
+ createScene(12, 4);
+ else if (_moduleResult == 1)
+ createScene(3, 0);
+ break;
+ case 16:
+ createScene(17, -1);
+ break;
+ case 17:
+ leaveModule(1);
+ break;
+ }
+ }
+}
+
+AsScene1302Bridge::AsScene1302Bridge(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ _x = 320;
+ _y = 240;
+ createSurface1(0x88148150, 500);
+ if (!getGlobalVar(V_FLYTRAP_RING_BRIDGE)) {
+ startAnimation(0x88148150, 0, -1);
+ _newStickFrameIndex = 0;
+ } else {
+ startAnimation(0x88148150, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ }
+ loadSound(0, 0x68895082);
+ loadSound(1, 0x689BD0C1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1302Bridge::handleMessage);
+}
+
+uint32 AsScene1302Bridge::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ stLowerBridge();
+ break;
+ case 0x4809:
+ stRaiseBridge();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1302Bridge::stLowerBridge() {
+ startAnimation(0x88148150, 0, -1);
+ playSound(1);
+ NextState(&AsScene1302Bridge::cbLowerBridgeEvent);
+}
+
+void AsScene1302Bridge::stRaiseBridge() {
+ startAnimation(0x88148150, 7, -1);
+ _playBackwards = true;
+ _newStickFrameIndex = 0;
+ playSound(0);
+}
+
+void AsScene1302Bridge::cbLowerBridgeEvent() {
+ sendMessage(_parentScene, 0x2032, 0);
+ startAnimation(0x88148150, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+SsScene1302Fence::SsScene1302Fence(NeverhoodEngine *vm)
+ : StaticSprite(vm, 0x11122122, 200) {
+
+ _firstY = _y;
+ if (getGlobalVar(V_FLYTRAP_RING_FENCE))
+ _y += 152;
+ loadSound(0, 0x7A00400C);
+ loadSound(1, 0x78184098);
+ SetUpdateHandler(&SsScene1302Fence::update);
+ SetMessageHandler(&SsScene1302Fence::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void SsScene1302Fence::update() {
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 SsScene1302Fence::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4808:
+ playSound(0);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(&SsScene1302Fence::suMoveDown);
+ break;
+ case 0x4809:
+ playSound(1);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(&SsScene1302Fence::suMoveUp);
+ break;
+ }
+ return messageResult;
+}
+
+void SsScene1302Fence::suMoveDown() {
+ if (_y < _firstY + 152)
+ _y += 8;
+ else {
+ SetMessageHandler(&SsScene1302Fence::handleMessage);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void SsScene1302Fence::suMoveUp() {
+ if (_y > _firstY)
+ _y -= 8;
+ else {
+ SetMessageHandler(&SsScene1302Fence::handleMessage);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+Scene1302::Scene1302(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1302::handleMessage);
+
+ setHitRects(0x004B0858);
+ setRectList(0x004B0A38);
+ setBackground(0x420643C4);
+ setPalette(0x420643C4);
+ insertScreenMouse(0x643C0428);
+
+ _class595 = insertStaticSprite(0xB0420130, 1015);
+ _sprite1 = insertStaticSprite(0x942FC224, 300);
+ _sprite2 = insertStaticSprite(0x70430830, 1200);
+ _sprite2->setVisible(false);
+ _sprite3 = insertStaticSprite(0x16E01E20, 1100);
+ _asRing1 = insertSprite<AsScene1002Ring>(this, false, 218, 122, _class595->getDrawRect().y, false);
+ _asRing2 = insertSprite<AsScene1002Ring>(this, true, 218 + 32, 132, _class595->getDrawRect().y, getGlobalVar(V_FLYTRAP_RING_BRIDGE));
+ _asRing3 = insertSprite<AsScene1002Ring>(this, false, 218 + 32 + 32, 122, _class595->getDrawRect().y, false);
+ _asRing4 = insertSprite<AsScene1002Ring>(this, true, 218 + 32 + 32 + 32, 132, _class595->getDrawRect().y, getGlobalVar(V_FLYTRAP_RING_FENCE));
+ _asRing5 = insertSprite<AsScene1002Ring>(this, false, 218 + 32 + 32 + 32 + 32, 115, _class595->getDrawRect().y, false);
+ _asBridge = insertSprite<AsScene1302Bridge>(this);
+ _ssFence = insertSprite<SsScene1302Fence>();
+ _ssFence->setClipRect(0, 0, 640, _sprite1->getDrawRect().y2());
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1002>(380, 364);
+ setMessageList(0x004B0868);
+ } else {
+ // Klaymen entering from back
+ insertKlaymen<KmScene1002>(293, 330);
+ setMessageList(0x004B0870);
+ }
+
+ _klaymen->setClipRect(0, 0, _sprite3->getDrawRect().x2(), 480);
+
+ _asVenusFlyTrap = insertSprite<AsScene1002VenusFlyTrap>(this, _klaymen, true);
+ addCollisionSprite(_asVenusFlyTrap);
+
+ sendEntityMessage(_klaymen, 0x2007, _asVenusFlyTrap);
+
+}
+
+uint32 Scene1302::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x4A845A00)
+ sendEntityMessage(_klaymen, 0x1014, _asRing1);
+ else if (param.asInteger() == 0x43807801) {
+ if (!getGlobalVar(V_FLYTRAP_RING_BRIDGE)) {
+ sendEntityMessage(_klaymen, 0x1014, _asRing2);
+ if (_asVenusFlyTrap->getX() - 10 < 218 + 32 && _asVenusFlyTrap->getX() + 10 > 218 + 32)
+ setMessageList(0x004B0940);
+ else
+ setMessageList(0x004B0938);
+ } else
+ setMessageList(0x004B0950);
+ messageResult = 1;
+ } else if (param.asInteger() == 0x46C26A01)
+ sendEntityMessage(_klaymen, 0x1014, _asRing3);
+ else if (param.asInteger() == 0x468C7B11) {
+ if (!getGlobalVar(V_FLYTRAP_RING_FENCE)) {
+ sendEntityMessage(_klaymen, 0x1014, _asRing4);
+ if (_asVenusFlyTrap->getX() - 10 < 218 + 32 + 32 + 32 && _asVenusFlyTrap->getX() + 10 > 218 + 32 + 32 + 32)
+ setMessageList(0x004B0940);
+ else
+ setMessageList(0x004B0938);
+ } else
+ setMessageList(0x004B0950);
+ messageResult = 1;
+ } else if (param.asInteger() == 0x42845B19)
+ sendEntityMessage(_klaymen, 0x1014, _asRing5);
+ else if (param.asInteger() == 0x430A6060) {
+ if (getGlobalVar(V_FLYTRAP_RING_BRIDGE))
+ setMessageList2(0x004B0910);
+ else
+ cancelMessageList();
+ } else if (param.asInteger() == 0x012E2070) {
+ if (getGlobalVar(V_FLYTRAP_RING_BRIDGE))
+ setMessageList2(0x004B0968);
+ else
+ cancelMessageList();
+ } else if (param.asInteger() == 0x11C40840) {
+ if (_asVenusFlyTrap->getX() >= 260 && _asVenusFlyTrap->getX() <= 342)
+ setMessageList(0x004B0878);
+ else
+ setMessageList(0x004B0978);
+ }
+ break;
+ case 0x2000:
+ if (_klaymen->getY() > 360) {
+ sendEntityMessage(_klaymen, 0x1014, _asVenusFlyTrap);
+ setMessageList2(0x004B08F0);
+ } else
+ setMessageList2(0x004B0920);
+ break;
+ case 0x2002:
+ if (_klaymen->getX() > 545)
+ leaveScene(1);
+ break;
+ case 0x2032:
+ _sprite2->setVisible(true);
+ break;
+ case 0x4806:
+ sendMessage(_parentModule, 0x1024, 2);
+ if (sender == _asRing1)
+ playSound(0, 0x665198C0);
+ else if (sender == _asRing2) {
+ sendMessage(_asBridge, 0x4808, 0);
+ setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1);
+ } else if (sender == _asRing3)
+ playSound(0, 0xE2D389C0);
+ else if (sender == _asRing4) {
+ sendMessage(_ssFence, 0x4808, 0);
+ setGlobalVar(V_FLYTRAP_RING_FENCE, 1);
+ } else if (sender == _asRing5)
+ playSound(0, 0x40428A09);
+ break;
+ case 0x4807:
+ if (sender == _asRing2) {
+ sendMessage(_asBridge, 0x4809, 0);
+ setGlobalVar(V_FLYTRAP_RING_BRIDGE, 0);
+ _sprite2->setVisible(false);
+ } else if (sender == _asRing4) {
+ sendMessage(_ssFence, 0x4809, 0);
+ setGlobalVar(V_FLYTRAP_RING_FENCE, 0);
+ } else if (sender == _asVenusFlyTrap) {
+ if (getGlobalVar(V_FLYTRAP_RING_BRIDGE))
+ sendMessage(_asRing2, 0x4807, 0);
+ else
+ sendMessage(_asRing4, 0x4807, 0);
+ }
+ break;
+ case 0x480F:
+ if (sender == _asRing2) {
+ playSound(0, 0x60755842);
+ sendMessage(_asBridge, 0x4808, 0);
+ setGlobalVar(V_FLYTRAP_RING_BRIDGE, 1);
+ } else if (sender == _asRing4) {
+ playSound(0, 0x60755842);
+ sendMessage(_ssFence, 0x4808, 0);
+ setGlobalVar(V_FLYTRAP_RING_FENCE, 1);
+ }
+ break;
+ case 0x482A:
+ sendMessage(_asVenusFlyTrap, 0x482B, 0);
+ break;
+ case 0x482B:
+ sendMessage(_asVenusFlyTrap, 0x482A, 0);
+ break;
+ case 0x8000:
+ setSpriteSurfacePriority(_class595, 995);
+ break;
+ case 0x8001:
+ setSpriteSurfacePriority(_class595, 1015);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene1303Balloon::AsScene1303Balloon(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(200, 128, 315);
+ _x = 289;
+ _y = 390;
+ startAnimation(0x800278D2, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1303Balloon::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+uint32 AsScene1303Balloon::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x2000:
+ stPopBalloon();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1303Balloon::hmBalloonPopped(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x020B0003)
+ playSound(0, 0x742B0055);
+ break;
+ case 0x3002:
+ playSound(0, 0x470007EE);
+ stopAnimation();
+ setVisible(false);
+ SetMessageHandler(NULL);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1303Balloon::stPopBalloon() {
+ startAnimation(0xAC004CD0, 0, -1);
+ SetMessageHandler(&AsScene1303Balloon::hmBalloonPopped);
+}
+
+Scene1303::Scene1303(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1303::handleMessage);
+
+ setRectList(0x004AF9E8);
+ setBackground(0x01581A9C);
+ setPalette(0x01581A9C);
+ insertScreenMouse(0x81A9801D);
+
+ if (!getGlobalVar(V_BALLOON_POPPED)) {
+ _asBalloon = insertSprite<AsScene1303Balloon>(this);
+ addCollisionSprite(_asBalloon);
+ }
+
+ _sprite1 = insertStaticSprite(0xA014216B, 1100);
+
+ insertKlaymen<KmScene1303>(207, 332);
+ setMessageList(0x004AF9A0);
+
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+
+}
+
+uint32 Scene1303::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ setGlobalVar(V_BALLOON_POPPED, 1);
+ sendMessage(_asBalloon, 0x2000, 0);
+ break;
+ case 0x4826:
+ if (sender == _asBalloon && getGlobalVar(V_HAS_NEEDLE))
+ setMessageList(0x004AF9B8);
+ break;
+ }
+ return 0;
+}
+
+AsScene1304Needle::AsScene1304Needle(NeverhoodEngine *vm, Scene *parentScene, int surfacePriority, int16 x, int16 y)
+ : AnimatedSprite(vm, 0x548E9411, surfacePriority, x, y), _parentScene(parentScene) {
+
+ // NOTE: Skipped check if Klaymen already has the needle since that's done in the scene itself
+ SetMessageHandler(&AsScene1304Needle::handleMessage);
+}
+
+uint32 AsScene1304Needle::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setGlobalVar(V_HAS_NEEDLE, 1);
+ setVisible(false);
+ SetMessageHandler(NULL);
+ break;
+ }
+ return messageResult;
+}
+
+Scene1304::Scene1304(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _asNeedle(NULL) {
+
+ SetMessageHandler(&Scene1304::handleMessage);
+
+ setRectList(0x004B91A8);
+ setBackground(0x062C0214);
+ setPalette(0x062C0214);
+ insertScreenMouse(0xC021006A);
+
+ if (getGlobalVar(V_BALLOON_POPPED)) {
+ _asKey = insertSprite<AsCommonKey>(this, 0, 1100, 278, 347);
+ addCollisionSprite(_asKey);
+ } else {
+ _asKey = insertSprite<AnimatedSprite>(0x80106018, 100, 279, 48);
+ }
+
+ if (!getGlobalVar(V_HAS_NEEDLE)) {
+ _asNeedle = insertSprite<AsScene1304Needle>(this, 1100, 278, 347);
+ addCollisionSprite(_asNeedle);
+ }
+
+ _sprite1 = insertStaticSprite(0x0562E621, 1100);
+ insertStaticSprite(0x012AE033, 1100);
+ insertStaticSprite(0x090AF033, 1100);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1304>(217, 347);
+ setMessageList(0x004B90E8);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1304>(100, 347);
+ setMessageList(0x004B90F0);
+ }
+
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+
+}
+
+uint32 Scene1304::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x415634A4) {
+ if (getGlobalVar(V_BALLOON_POPPED))
+ cancelMessageList();
+ else
+ setMessageList(0x004B9158);
+ }
+ break;
+ case 0x4826:
+ if (sender == _asNeedle) {
+ sendEntityMessage(_klaymen, 0x1014, _asNeedle);
+ setMessageList(0x004B9130);
+ } else if (sender == _asKey) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004B9140);
+ }
+ break;
+ }
+ return 0;
+}
+
+Scene1305::Scene1305(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1305::handleMessage);
+
+ setRectList(0x004B6E98);
+ setBackground(0x28801B64);
+ setPalette(0x28801B64);
+ insertScreenMouse(0x01B60280);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1305>(212, 441);
+ setMessageList(0x004B6E40);
+ } else {
+ // Klaymen enters falling
+ insertKlaymen<KmScene1305>(212, 441);
+ setMessageList(0x004B6E48);
+ }
+
+}
+
+uint32 Scene1305::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ return Scene::handleMessage(messageNum, param, sender);
+}
+
+AsScene1306Elevator::AsScene1306Elevator(NeverhoodEngine *vm, Scene *parentScene, AnimatedSprite *asElevatorDoor)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _asElevatorDoor(asElevatorDoor), _isUp(false), _isDown(true),
+ _countdown(0) {
+
+ _x = 320;
+ _y = 240;
+ createSurface1(0x043B0270, 100);
+ startAnimation(0x043B0270, 0, -1);
+ _newStickFrameIndex = 0;
+ loadSound(0, 0x1C100E83);
+ loadSound(1, 0x1C08CEC5);
+ loadSound(2, 0x5D011E87);
+ SetMessageHandler(&AsScene1306Elevator::handleMessage);
+}
+
+void AsScene1306Elevator::update() {
+ if (_isUp && _countdown != 0 && (--_countdown == 0))
+ stGoingDown();
+ AnimatedSprite::update();
+ if (_currFrameIndex == 7) {
+ playSound(1);
+ _asElevatorDoor->setVisible(false);
+ }
+}
+
+void AsScene1306Elevator::upGoingDown() {
+ AnimatedSprite::update();
+ if (_currFrameIndex == 5)
+ _asElevatorDoor->setVisible(true);
+}
+
+uint32 AsScene1306Elevator::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2001:
+ if (_isUp)
+ _countdown = 144;
+ messageResult = _isUp ? 1 : 0;
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ if (_isDown)
+ stGoingUp();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1306Elevator::stGoingUp() {
+ setVisible(true);
+ _isDown = false;
+ startAnimation(0x043B0270, 0, -1);
+ playSound(0);
+ SetUpdateHandler(&AsScene1306Elevator::update);
+ NextState(&AsScene1306Elevator::cbGoingUpEvent);
+}
+
+void AsScene1306Elevator::cbGoingUpEvent() {
+ sendMessage(_parentScene, 0x4808, 0);
+ _isUp = true;
+ _countdown = 144;
+ stopAnimation();
+ setVisible(false);
+ SetUpdateHandler(&AsScene1306Elevator::update);
+}
+
+void AsScene1306Elevator::stGoingDown() {
+ _isUp = false;
+ setVisible(true);
+ startAnimation(0x043B0270, -1, -1);
+ _playBackwards = true;
+ playSound(1);
+ SetUpdateHandler(&AsScene1306Elevator::upGoingDown);
+ NextState(&AsScene1306Elevator::cbGoingDownEvent);
+}
+
+void AsScene1306Elevator::cbGoingDownEvent() {
+ _isDown = true;
+ sendMessage(_parentScene, 0x4809, 0);
+ stopAnimation();
+ SetUpdateHandler(&AsScene1306Elevator::update);
+}
+
+Scene1306::Scene1306(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
+ setGlobalVar(V_KEY3_LOCATION, 4);
+
+ SetMessageHandler(&Scene1306::handleMessage);
+
+ setBackground(0x05303114);
+ setPalette(0x05303114);
+ insertScreenMouse(0x0311005B);
+
+ if (getGlobalVar(V_KEY3_LOCATION) == 4) {
+ _asKey = insertSprite<AsCommonKey>(this, 2, 1100, 435, 445);
+ addCollisionSprite(_asKey);
+ }
+
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x404A36A0, 100, 0x440C1000);
+ _asTape = insertSprite<AsScene1201Tape>(this, 19, 1100, 359, 445, 0x9148A011);
+ _asElevatorDoor = insertSprite<AnimatedSprite>(0x043B0270, 90, 320, 240);
+ _asElevatorDoor->startAnimation(0x043B0270, 6, -1);
+ _asElevatorDoor->setNewHashListIndex(6);
+ _asElevator = insertSprite<AsScene1306Elevator>(this, _asElevatorDoor);
+ _sprite1 = insertStaticSprite(0x036A1EE0, 80);
+ insertStaticSprite(0x00042313, 1100);
+
+ if (which < 0) {
+ // Resoring game
+ insertKlaymen<KmScene1306>(380, 440);
+ setMessageList(0x004AFAD0);
+ sendMessage(this, 0x2000, 0);
+ addCollisionSprite(_asTape);
+ } else if (which == 1) {
+ // Klaymen teleporting in
+ insertKlaymen<KmScene1306>(136, 440);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AFAF0);
+ sendMessage(this, 0x2000, 1);
+ addCollisionSprite(_asTape);
+ } else if (which == 2) {
+ // Klaymen returning from diskplayer
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene1306>(515, 440);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene1306>(355, 440);
+ }
+ setMessageList(0x004AFBC8);
+ sendMessage(this, 0x2000, 0);
+ addCollisionSprite(_asTape);
+ } else if (which == 3) {
+ // Klaymen returning from window
+ insertKlaymen<KmScene1306>(534, 440);
+ setMessageList(0x004AFC30);
+ sendMessage(this, 0x2000, 0);
+ addCollisionSprite(_asTape);
+ } else if (which == 4) {
+ // Klaymen teleporting out
+ insertKlaymen<KmScene1306>(136, 440);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AFC38);
+ sendMessage(this, 0x2000, 1);
+ addCollisionSprite(_asTape);
+ } else if (which == 5) {
+ // Klaymen returning from teleporter
+ insertKlaymen<KmScene1306>(136, 440);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AFB00);
+ sendMessage(this, 0x2000, 1);
+ addCollisionSprite(_asTape);
+ } else {
+ // Klaymen coming up in elevator
+ insertKlaymen<KmScene1306>(286, 408);
+ setSurfacePriority(_asElevator->getSurface(), 1100);
+ setSurfacePriority(_asElevatorDoor->getSurface(), 1090);
+ setSurfacePriority(_sprite1->getSurface(), 1080);
+ sendMessage(this, 0x2000, 0);
+ SetMessageHandler(&Scene1306::handleMessage416EB0);
+ clearRectList();
+ sendMessage(_asElevator, 0x4808, 0);
+ }
+
+}
+
+Scene1306::~Scene1306() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene1306::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x01C66840) {
+ if (sendMessage(_asElevator, 0x2001, 0) != 0)
+ setMessageList(0x004AFBD8);
+ else
+ setMessageList(0x004AFAE0);
+ } else if (param.asInteger() == 0x8E646E00) {
+ setMessageList(0x004AFAD8);
+ clearRectList();
+ SetMessageHandler(&Scene1306::handleMessage416EB0);
+ }
+ break;
+ case 0x2000:
+ if (param.asInteger() != 0) {
+ setRectList(0x004AFD28);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004AFD18);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ break;
+ case 0x480B:
+ if (sender == _ssButton)
+ sendMessage(_asElevator, 0x4808, 0);
+ break;
+ case 0x4826:
+ if (sender == _asKey) {
+ if (_klaymen->getX() >= 249) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004AFC58);
+ }
+ } else if (sender == _asTape) {
+ if (_klaymen->getX() >= 249) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004AFC68);
+ }
+ }
+ break;
+ case 0x482A:
+ setSurfacePriority(_asElevator->getSurface(), 1100);
+ setSurfacePriority(_asElevatorDoor->getSurface(), 1090);
+ setSurfacePriority(_sprite1->getSurface(), 1080);
+ break;
+ case 0x482B:
+ setSurfacePriority(_asElevator->getSurface(), 100);
+ setSurfacePriority(_asElevatorDoor->getSurface(), 90);
+ setSurfacePriority(_sprite1->getSurface(), 80);
+ sendMessage(this, 0x2000, 0);
+ addCollisionSprite(_asTape);
+ break;
+ }
+ return 0;
+}
+
+uint32 Scene1306::handleMessage416EB0(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4808:
+ setMessageList(0x004AFBD0);
+ SetMessageHandler(&Scene1306::handleMessage);
+ break;
+ case 0x4809:
+ leaveScene(1);
+ break;
+ case 0x482A:
+ setSurfacePriority(_asElevator->getSurface(), 1100);
+ setSurfacePriority(_asElevatorDoor->getSurface(), 1090);
+ setSurfacePriority(_sprite1->getSurface(), 1080);
+ break;
+ case 0x482B:
+ setSurfacePriority(_asElevator->getSurface(), 100);
+ setSurfacePriority(_asElevatorDoor->getSurface(), 90);
+ setSurfacePriority(_sprite1->getSurface(), 80);
+ sendMessage(this, 0x2000, 0);
+ addCollisionSprite(_asTape);
+ break;
+ }
+ return 0;
+}
+
+static const uint32 kAsScene1307KeyResourceList1[] = {
+ 0x0438069C, 0x45B0023C, 0x05700217
+};
+
+static const uint32 kAsScene1307KeyResourceList2[] = {
+ 0x04441334, 0x061433F0, 0x06019390
+};
+
+static const uint32 kAsScene1307KeyResourceList3[] = {
+ 0x11A80030, 0x178812B1, 0x1488121C
+};
+
+static const uint32 *kAsScene1307KeyResourceLists[] = {
+ kAsScene1307KeyResourceList1,
+ kAsScene1307KeyResourceList2,
+ kAsScene1307KeyResourceList3
+};
+
+static const int kAsScene1307KeySurfacePriorities[] = {
+ 700, 500, 300, 100
+};
+
+const uint kAsScene1307KeyPointsCount = 12;
+
+static const NPoint kAsScene1307KeyPoints[] = {
+ {-2, 0}, {-5, 0}, { 5, 0},
+ {12, 0}, {17, 0}, {25, 0},
+ {16, -2}, {10, -6}, { 0, -7},
+ {-7, -3}, {-3, 4}, { 2, 2}
+};
+
+const uint kAsScene1307KeyFrameIndicesCount = 20;
+
+static const int16 kAsScene1307KeyFrameIndices[] = {
+ 1, 4, 8, 11, 15, 16, 17, 17, 17, 16,
+ 15, 14, 12, 10, 9, 7, 5, 3, 2, 1
+};
+
+const int kAsScene1307KeyDivValue = 200;
+const int16 kAsScene1307KeyXDelta = 70;
+const int16 kAsScene1307KeyYDelta = -12;
+
+AsScene1307Key::AsScene1307Key(NeverhoodEngine *vm, Scene *parentScene, uint keyIndex, NRect *clipRects)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _keyIndex(keyIndex), _clipRects(clipRects),
+ _isClickable(true) {
+
+ NPoint pt;
+ const uint32 *fileHashes = kAsScene1307KeyResourceLists[_keyIndex];
+
+ _dataResource.load(0x22102142);
+ _pointList = _dataResource.getPointArray(0xAC849240);
+ pt = (*_pointList)[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex)];
+ _x = pt.x;
+ _y = pt.y;
+ createSurface(kAsScene1307KeySurfacePriorities[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4], 190, 148);
+ startAnimation(fileHashes[0], 0, -1);
+ loadSound(0, 0xDC4A1280);
+ loadSound(1, 0xCC021233);
+ loadSound(2, 0xC4C23844);
+ loadSound(3, 0xC4523208);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1307Key::handleMessage);
+}
+
+uint32 AsScene1307Key::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_isClickable) {
+ sendMessage(_parentScene, 0x4826, 0);
+ stRemoveKey();
+ messageResult = 1;
+ }
+ break;
+ case 0x2000:
+ _isClickable = param.asInteger() != 0;
+ break;
+ case 0x2001:
+ setSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex, param.asInteger());
+ stMoveKey();
+ break;
+ case 0x2003:
+ playSound(3);
+ stUnlock();
+ break;
+ case 0x2004:
+ playSound(2);
+ stInsert();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1307Key::suRemoveKey() {
+ if (_pointIndex < kAsScene1307KeyPointsCount) {
+ _x += kAsScene1307KeyPoints[_pointIndex].x;
+ _y += kAsScene1307KeyPoints[_pointIndex].y;
+ updateBounds();
+ _pointIndex++;
+ } else {
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1307Key::suInsertKey() {
+ if (_pointIndex < kAsScene1307KeyPointsCount) {
+ _x -= kAsScene1307KeyPoints[kAsScene1307KeyPointsCount - _pointIndex - 1].x;
+ _y -= kAsScene1307KeyPoints[kAsScene1307KeyPointsCount - _pointIndex - 1].y;
+ updateBounds();
+ _pointIndex++;
+ if (_pointIndex == 7)
+ playSound(0);
+ } else {
+ SetSpriteUpdate(NULL);
+ sendMessage(_parentScene, 0x2002, 0);
+ }
+}
+
+void AsScene1307Key::suMoveKey() {
+ if (_pointIndex < kAsScene1307KeyFrameIndicesCount) {
+ _frameIndex += kAsScene1307KeyFrameIndices[_pointIndex];
+ _x = _prevX + (_deltaX * _frameIndex) / kAsScene1307KeyDivValue;
+ _y = _prevY + (_deltaY * _frameIndex) / kAsScene1307KeyDivValue;
+ updateBounds();
+ _pointIndex++;
+ } else {
+ NPoint pt = (*_pointList)[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex)];
+ _x = pt.x + kAsScene1307KeyXDelta;
+ _y = pt.y + kAsScene1307KeyYDelta;
+ stInsertKey();
+ }
+}
+
+void AsScene1307Key::stRemoveKey() {
+ const uint32 *fileHashes = kAsScene1307KeyResourceLists[_keyIndex];
+ _pointIndex = 0;
+ startAnimation(fileHashes[0], 0, -1);
+ playSound(1);
+ SetSpriteUpdate(&AsScene1307Key::suRemoveKey);
+}
+
+void AsScene1307Key::stInsertKey() {
+ _pointIndex = 0;
+ sendMessage(_parentScene, 0x1022, kAsScene1307KeySurfacePriorities[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4]);
+ setClipRect(_clipRects[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex) % 4]);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ SetSpriteUpdate(&AsScene1307Key::suInsertKey);
+}
+
+void AsScene1307Key::stMoveKey() {
+ NPoint pt = (*_pointList)[getSubVar(VA_CURR_KEY_SLOT_NUMBERS, _keyIndex)];
+ int16 newX = pt.x + kAsScene1307KeyXDelta;
+ int16 newY = pt.y + kAsScene1307KeyYDelta;
+ sendMessage(_parentScene, 0x1022, 1000);
+ setClipRect(0, 0, 640, 480);
+ _prevX = _x;
+ _prevY = _y;
+ if (newX == _x && newY == _y) {
+ stInsertKey();
+ } else {
+ const uint32 *fileHashes = kAsScene1307KeyResourceLists[_keyIndex];
+ _pointIndex = 0;
+ _frameIndex = 0;
+ _deltaX = newX - _x;
+ _deltaY = newY - _y;
+ startAnimation(fileHashes[0], 0, -1);
+ SetSpriteUpdate(&AsScene1307Key::suMoveKey);
+ }
+}
+
+void AsScene1307Key::stUnlock() {
+ const uint32 *fileHashes = kAsScene1307KeyResourceLists[_keyIndex];
+ startAnimation(fileHashes[1], 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+void AsScene1307Key::stInsert() {
+ const uint32 *fileHashes = kAsScene1307KeyResourceLists[_keyIndex];
+ startAnimation(fileHashes[2], 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+Scene1307::Scene1307(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _countdown(0), _asCurrKey(NULL),
+ _isInsertingKey(false), _doLeaveScene(false), _isPuzzleSolved(false) {
+
+ Sprite *tempSprite;
+
+ _vm->gameModule()->initKeySlotsPuzzle();
+
+ _dataResource.load(0x22102142);
+ _keyHolePoints = _dataResource.getPointArray(0xAC849240);
+
+ for (uint i = 0; i < 16; i++) {
+ NPoint pt = (*_keyHolePoints)[i];
+ _keyHoleRects[i].x1 = pt.x - 15;
+ _keyHoleRects[i].y1 = pt.y - 15;
+ _keyHoleRects[i].x2 = pt.x + 15;
+ _keyHoleRects[i].y2 = pt.y + 15;
+ }
+
+ SetMessageHandler(&Scene1307::handleMessage);
+ SetUpdateHandler(&Scene1307::update);
+
+ setBackground(0xA8006200);
+ setPalette(0xA8006200);
+ addEntity(_palette);
+ insertPuzzleMouse(0x06204A88, 20, 620);
+
+ tempSprite = insertStaticSprite(0x00A3621C, 800);
+ _clipRects[0].set(tempSprite->getDrawRect().x, 0, 640, 480);
+ tempSprite = insertStaticSprite(0x00A3641C, 600);
+ _clipRects[1].set(tempSprite->getDrawRect().x, 0, 640, 480);
+ tempSprite = insertStaticSprite(0x00A3681C, 400);
+ _clipRects[2].set(tempSprite->getDrawRect().x, 0, 640, 480);
+ tempSprite = insertStaticSprite(0x00A3701C, 200);
+ _clipRects[3].set(tempSprite->getDrawRect().x, 0, 640, 480);
+
+ for (uint keyIndex = 0; keyIndex < 3; keyIndex++) {
+ if (getSubVar(VA_IS_KEY_INSERTED, keyIndex)) {
+ _asKeys[keyIndex] = insertSprite<AsScene1307Key>(this, keyIndex, _clipRects);
+ addCollisionSprite(_asKeys[keyIndex]);
+ } else {
+ _asKeys[keyIndex] = NULL;
+ }
+ }
+
+ loadSound(0, 0x68E25540);
+
+}
+
+void Scene1307::update() {
+ Scene::update();
+ if (_countdown && (--_countdown == 0))
+ _doLeaveScene = true;
+ else if (_countdown == 20)
+ _palette->startFadeToWhite(40);
+ if (_doLeaveScene && !isSoundPlaying(0)) {
+ leaveScene(1);
+ setGlobalVar(V_KEYDOOR_UNLOCKED, 1);
+ }
+}
+
+uint32 Scene1307::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (!_isPuzzleSolved) {
+ if (param.asPoint().x > 20 && param.asPoint().x < 620) {
+ if (_asCurrKey && !_isInsertingKey) {
+ int16 mouseX = param.asPoint().x;
+ int16 mouseY = param.asPoint().y;
+ uint clickedKeyHoleIndex;
+ for (clickedKeyHoleIndex = 0; clickedKeyHoleIndex < 16; clickedKeyHoleIndex++) {
+ if (mouseX >= _keyHoleRects[clickedKeyHoleIndex].x1 && mouseX <= _keyHoleRects[clickedKeyHoleIndex].x2 &&
+ mouseY >= _keyHoleRects[clickedKeyHoleIndex].y1 && mouseY <= _keyHoleRects[clickedKeyHoleIndex].y2)
+ break;
+ }
+ if (clickedKeyHoleIndex < 16) {
+ // Check if the clicked keyhole is already occupied with a key
+ bool occupied = false;
+ for (uint keyIndex = 0; keyIndex < 3 && !occupied; keyIndex++) {
+ if (getSubVar(VA_IS_KEY_INSERTED, keyIndex) && _asKeys[keyIndex] != _asCurrKey) {
+ if (getSubVar(VA_CURR_KEY_SLOT_NUMBERS, keyIndex) == clickedKeyHoleIndex)
+ occupied = true;
+ }
+ }
+ if (!occupied) {
+ // If the keyhole is free, insert the current key
+ sendMessage(_asCurrKey, 0x2001, clickedKeyHoleIndex);
+ _isInsertingKey = true;
+ _mouseClicked = false;
+ }
+ }
+ }
+ } else if (_countdown == 0 && !_asCurrKey && !_isInsertingKey)
+ leaveScene(0);
+ }
+ break;
+ case 0x2002:
+ // Check if all keys are in the correct keyholes
+ if (getSubVar(VA_IS_KEY_INSERTED, 0) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 0) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 0) &&
+ getSubVar(VA_IS_KEY_INSERTED, 1) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 1) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 1) &&
+ getSubVar(VA_IS_KEY_INSERTED, 2) && getSubVar(VA_CURR_KEY_SLOT_NUMBERS, 2) == getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 2)) {
+ // Play unlock animations for all keys
+ for (uint keyIndex = 0; keyIndex < 3; keyIndex++) {
+ if (_asKeys[keyIndex])
+ sendMessage(_asKeys[keyIndex], 0x2003, 1);
+ }
+ playSound(0);
+ _isPuzzleSolved = true;
+ _countdown = 47;
+ } else {
+ for (uint keyIndex = 0; keyIndex < 3; keyIndex++)
+ if (getSubVar(VA_IS_KEY_INSERTED, keyIndex) && _asKeys[keyIndex])
+ sendMessage(_asKeys[keyIndex], 0x2000, 1);
+ sendMessage(_asCurrKey, 0x2004, 1);
+ }
+ _asCurrKey = NULL;
+ _isInsertingKey = false;
+ break;
+ case 0x4826:
+ _asCurrKey = (Sprite*)sender;
+ for (uint keyIndex = 0; keyIndex < 3; keyIndex++)
+ if (getSubVar(VA_IS_KEY_INSERTED, keyIndex) && _asKeys[keyIndex])
+ sendMessage(_asKeys[keyIndex], 0x2000, 0);
+ break;
+ }
+ return messageResult;
+}
+
+static const uint32 kScene1308NumberFileHashes[] = {
+ 0x08006320, 0x10006320, 0x20006320,
+ 0x40006320, 0x80006320, 0x00006321,
+ 0x00006322, 0x00006324, 0x00006328,
+ 0x08306320, 0x10306320, 0x20306320,
+ 0x40306320, 0x80306320, 0x00306321,
+ 0x00306322
+};
+
+AsScene1308JaggyDoor::AsScene1308JaggyDoor(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 0xBA0AE050, 1100, 320, 240), _parentScene(parentScene) {
+
+ setVisible(false);
+ stopAnimation();
+ SetMessageHandler(&AsScene1308JaggyDoor::handleMessage);
+}
+
+uint32 AsScene1308JaggyDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ stOpenDoor();
+ break;
+ case 0x4809:
+ stCloseDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1308JaggyDoor::stOpenDoor() {
+ startAnimation(0xBA0AE050, 0, -1);
+ setVisible(true);
+ playSound(0, calcHash("fxDoorOpen38"));
+ NextState(&AsScene1308JaggyDoor::stOpenDoorDone);
+}
+
+void AsScene1308JaggyDoor::stOpenDoorDone() {
+ sendMessage(_parentScene, 0x2000, 0);
+ stopAnimation();
+ setVisible(false);
+}
+
+void AsScene1308JaggyDoor::stCloseDoor() {
+ startAnimation(0xBA0AE050, -1, -1);
+ _playBackwards = true;
+ setVisible(true);
+ playSound(0, calcHash("fxDoorClose38"));
+ NextState(&AsScene1308JaggyDoor::stCloseDoorDone);
+}
+
+void AsScene1308JaggyDoor::stCloseDoorDone() {
+ sendMessage(_parentScene, 0x2001, 0);
+ stopAnimation();
+}
+
+AsScene1308KeyboardDoor::AsScene1308KeyboardDoor(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 0xA08A0851, 1100, 320, 240), _parentScene(parentScene) {
+
+ playSound(0, 0x51456049);
+ SetMessageHandler(&AsScene1308KeyboardDoor::handleMessage);
+ NextState(&AsScene1308KeyboardDoor::stFallingKeys);
+}
+
+uint32 AsScene1308KeyboardDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1308KeyboardDoor::stFallingKeys() {
+ startAnimation(0x6238B191, 0, -1);
+ _x = 580;
+ _y = 383;
+ NextState(&AsScene1308KeyboardDoor::stFallingKeysDone);
+}
+
+void AsScene1308KeyboardDoor::stFallingKeysDone() {
+ sendMessage(_parentScene, 0x2004, 0);
+ stopAnimation();
+ setVisible(false);
+}
+
+AsScene1308LightWallSymbols::AsScene1308LightWallSymbols(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 0x80180A10, 100, 320, 240), _parentScene(parentScene) {
+
+ setVisible(false);
+ stopAnimation();
+ Entity::_priority = 1200;
+ SetMessageHandler(&AsScene1308LightWallSymbols::handleMessage);
+}
+
+uint32 AsScene1308LightWallSymbols::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ stFadeIn();
+ break;
+ case 0x2003:
+ stFadeOut();
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1308LightWallSymbols::stFadeIn() {
+ startAnimation(0x80180A10, 0, -1);
+ setVisible(true);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+void AsScene1308LightWallSymbols::stFadeOut() {
+ startAnimation(0x80180A10, -1, -1);
+ _playBackwards = true;
+ NextState(&AsScene1308LightWallSymbols::stFadeOutDone);
+}
+
+void AsScene1308LightWallSymbols::stFadeOutDone() {
+ sendMessage(_parentScene, 0x2003, 0);
+ stopAnimation();
+ setVisible(false);
+}
+
+SsScene1308Number::SsScene1308Number(NeverhoodEngine *vm, uint32 fileHash, int index)
+ : StaticSprite(vm, fileHash, 100) {
+
+ setVisible(false);
+ _x = _spriteResource.getPosition().x + index * 20;
+ updatePosition();
+}
+
+AsScene1308Mouse::AsScene1308Mouse(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ _x = 286;
+ _y = 429;
+ createSurface1(0xA282C472, 100);
+ startAnimation(0xA282C472, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1308Mouse::handleMessage);
+}
+
+uint32 AsScene1308Mouse::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x66382026)
+ playSound(0, 0x0CD84468);
+ else if (param.asInteger() == 0x6E28061C)
+ playSound(0, 0x78C8402C);
+ else if (param.asInteger() == 0x462F0410)
+ playSound(0, 0x60984E28);
+ break;
+ }
+ return messageResult;
+}
+
+Scene1308::Scene1308(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isProjecting(false), _asProjector(NULL) {
+
+ _vm->gameModule()->initKeySlotsPuzzle();
+
+ SetMessageHandler(&Scene1308::handleMessage);
+
+ setBackground(0x41024202);
+ setPalette(0x41024202);
+ insertScreenMouse(0x24206418);
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 17, 1100, 502, 445, 0x9148A011);
+ addCollisionSprite(_asTape);
+
+ if (getGlobalVar(V_MOUSE_SUCKED_IN)) {
+ insertSprite<AsScene1308Mouse>();
+ insertSprite<AnimatedSprite>(0x461A1490, 200, 235, 429);
+ }
+
+ _sprite1 = insertStaticSprite(0x0A042060, 1100);
+ _asJaggyDoor = insertSprite<AsScene1308JaggyDoor>(this);
+ _asLightWallSymbols = insertSprite<AsScene1308LightWallSymbols>(this);
+ _ssNumber1 = insertSprite<SsScene1308Number>(kScene1308NumberFileHashes[getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 1)], 0);
+ _ssNumber2 = insertSprite<SsScene1308Number>(kScene1308NumberFileHashes[getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 0)], 1);
+ _ssNumber3 = insertSprite<SsScene1308Number>(kScene1308NumberFileHashes[getSubVar(VA_GOOD_KEY_SLOT_NUMBERS, 2)], 2);
+ _sprite2 = insertStaticSprite(0x40043120, 995);
+ _sprite3 = insertStaticSprite(0x43003100, 995);
+ _sprite4 = NULL;
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1308>(380, 440);
+ setMessageList(0x004B57C0);
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED)) {
+ _sprite4 = insertStaticSprite(0x0101A624, 1100);
+ setRectList(0x004B5990);
+ } else {
+ _sprite5 = insertStaticSprite(0x080811A0, 100);
+ setRectList(0x004B5980);
+ }
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene1308>(640, 440);
+ setMessageList(0x004B57C8);
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED)) {
+ _sprite4 = insertStaticSprite(0x0101A624, 1100);
+ setRectList(0x004B5990);
+ } else {
+ _sprite5 = insertStaticSprite(0x080811A0, 100);
+ setRectList(0x004B5980);
+ }
+ } else if (which == 2) {
+ // Klaymen returning from keyslots panel
+ insertKlaymen<KmScene1308>(475, 440);
+ setMessageList(0x004B58B0);
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED)) {
+ _sprite5 = insertSprite<AsScene1308KeyboardDoor>(this);
+ _sprite4 = insertStaticSprite(0x0101A624, 1100);
+ _sprite4->setVisible(false);
+ } else {
+ _sprite5 = insertStaticSprite(0x080811A0, 100);
+ setRectList(0x004B5980);
+ }
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1308>(41, 440);
+ setMessageList(0x004B57D0);
+ sendMessage(_asJaggyDoor, 0x4808, 0);
+ _sprite1->setVisible(false);
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED)) {
+ _sprite4 = insertStaticSprite(0x0101A624, 1100);
+ _klaymen->setVisible(false);
+ } else {
+ _sprite5 = insertStaticSprite(0x080811A0, 100);
+ _klaymen->setVisible(false);
+ }
+ }
+
+ if (_sprite4)
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite4->getDrawRect().x2(), 480);
+ else
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+
+ if (getGlobalVar(V_PROJECTOR_LOCATION) == 4) {
+ _asProjector = insertSprite<AsCommonProjector>(this, _klaymen, (Sprite*)NULL);
+ addCollisionSprite(_asProjector);
+ _asProjector->setClipRect(0, 0, 640, _sprite2->getDrawRect().y2());
+ _asProjector->setRepl(64, 0);
+ }
+
+}
+
+uint32 Scene1308::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x88C11390) {
+ setRectList(0x004B59A0);
+ _isProjecting = true;
+ } else if (param.asInteger() == 0x08821382) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED))
+ setRectList(0x004B5990);
+ else
+ setRectList(0x004B5980);
+ _isProjecting = false;
+ } else if (param.asInteger() == 0x4AC68808) {
+ clearRectList();
+ sendMessage(_asJaggyDoor, 0x4809, 0);
+ _sprite1->setVisible(false);
+ _klaymen->setVisible(false);
+ }
+ break;
+ case 0x1022:
+ if (sender == _asProjector) {
+ if (param.asInteger() >= 1000)
+ setSurfacePriority(_sprite3->getSurface(), 1100);
+ else
+ setSurfacePriority(_sprite3->getSurface(), 995);
+ }
+ break;
+ case 0x2000:
+ if (getGlobalVar(V_KEYDOOR_UNLOCKED))
+ setRectList(0x004B5990);
+ else
+ setRectList(0x004B5980);
+ setMessageList(0x004B57E8, false);
+ _sprite1->setVisible(true);
+ _klaymen->setVisible(true);
+ break;
+ case 0x2001:
+ leaveScene(0);
+ break;
+ case 0x2003:
+ _ssNumber1->setVisible(false);
+ _ssNumber2->setVisible(false);
+ _ssNumber3->setVisible(false);
+ break;
+ case 0x2004:
+ _sprite4->setVisible(true);
+ setRectList(0x004B5990);
+ break;
+ case 0x4807:
+ sendMessage(_asLightWallSymbols, 0x2003, 0);
+ break;
+ case 0x480F:
+ sendMessage(_asLightWallSymbols, 0x2002, 0);
+ _ssNumber1->setVisible(true);
+ _ssNumber2->setVisible(true);
+ _ssNumber3->setVisible(true);
+ break;
+ case 0x4826:
+ if (sender == _asProjector) {
+ if (_isProjecting)
+ setMessageList2(0x004B5868);
+ else {
+ if (param.asInteger() == 1) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B5848);
+ } else if (sendMessage(_asProjector, 0x480C, _klaymen->getX() <= _asProjector->getX() ? 0 : 1) != 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B5830);
+ } else
+ setMessageList2(0x004B5800);
+ }
+ } else if (sender == _asTape) {
+ if (_isProjecting)
+ setMessageList2(0x004B5868);
+ else if (_messageListStatus != 2) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList2(0x004B58E0);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+Scene1317::Scene1317(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene1317::handleMessage);
+ _smackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, 0x08982841, true, false));
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ insertScreenMouse(0x08284011);
+ showMouse(false);
+ _smackerFileHash = 0;
+ _keepLastSmackerFrame = false;
+}
+
+void Scene1317::update() {
+ if (_smackerFileHash) {
+ _smackerPlayer->open(_smackerFileHash, _keepLastSmackerFrame);
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ _smackerFileHash = 0;
+ }
+ Scene::update();
+}
+
+void Scene1317::upChooseKing() {
+ if (!_klaymenBlinks && _klaymenBlinkCountdown != 0 && (--_klaymenBlinkCountdown == 0))
+ _klaymenBlinks = true;
+
+ if (!_klaymenBlinks && _smackerPlayer->getFrameNumber() + 1 >= 2) {
+ _smackerPlayer->rewind();
+ } else if (_klaymenBlinks && _smackerPlayer->getFrameNumber() + 1 >= 6) {
+ _smackerPlayer->rewind();
+ _klaymenBlinks = false;
+ _klaymenBlinkCountdown = _vm->_rnd->getRandomNumber(30 - 1) + 15;
+ }
+
+ if (!_klaymenBlinks && _decisionCountdown != 0 && (--_decisionCountdown == 0))
+ stNoDecisionYet();
+
+ if (_smackerFileHash) {
+ _smackerPlayer->open(_smackerFileHash, _keepLastSmackerFrame);
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ _smackerFileHash = 0;
+ }
+
+ Scene::update();
+
+}
+
+uint32 Scene1317::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ stChooseKing();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene1317::hmChooseKing(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x >= 21 && param.asPoint().y >= 24 &&
+ param.asPoint().x <= 261 && param.asPoint().y <= 280) {
+ stHoborgAsKing();
+ } else if (param.asPoint().x >= 313 && param.asPoint().y >= 184 &&
+ param.asPoint().x <= 399 && param.asPoint().y <= 379) {
+ stKlaymenAsKing();
+ } else if (param.asPoint().x >= 347 && param.asPoint().y >= 380 &&
+ param.asPoint().x <= 418 && param.asPoint().y <= 474) {
+ stKlaymenAsKing();
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene1317::hmHoborgAsKing(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ stEndMovie();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene1317::hmEndMovie(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ leaveScene(0);
+ break;
+ }
+ return messageResult;
+}
+
+void Scene1317::stChooseKing() {
+ showMouse(true);
+ _smackerFileHash = 0x10982841;
+ _keepLastSmackerFrame = true;
+ _decisionCountdown = 450;
+ _klaymenBlinks = false;
+ _klaymenBlinkCountdown = _vm->_rnd->getRandomNumber(30 - 1) + 15;
+ SetMessageHandler(&Scene1317::hmChooseKing);
+ SetUpdateHandler(&Scene1317::upChooseKing);
+}
+
+void Scene1317::stNoDecisionYet() {
+ showMouse(false);
+ _smackerFileHash = 0x20982841;
+ _keepLastSmackerFrame = false;
+ SetMessageHandler(&Scene1317::handleMessage);
+ SetUpdateHandler(&Scene1317::update);
+}
+
+void Scene1317::stHoborgAsKing() {
+ showMouse(false);
+ _smackerFileHash = 0x40982841;
+ _keepLastSmackerFrame = false;
+ SetMessageHandler(&Scene1317::hmHoborgAsKing);
+ SetUpdateHandler(&Scene1317::update);
+}
+
+void Scene1317::stKlaymenAsKing() {
+ showMouse(false);
+ _smackerFileHash = 0x80982841;
+ _keepLastSmackerFrame = false;
+ SetMessageHandler(&Scene1317::hmEndMovie);
+ SetUpdateHandler(&Scene1317::update);
+}
+
+void Scene1317::stEndMovie() {
+ showMouse(false);
+ _smackerFileHash = 0x40800711;
+ _keepLastSmackerFrame = false;
+ SetMessageHandler(&Scene1317::hmEndMovie);
+ SetUpdateHandler(&Scene1317::update);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1300.h b/engines/neverhood/modules/module1300.h
new file mode 100644
index 0000000000..501f76304f
--- /dev/null
+++ b/engines/neverhood/modules/module1300.h
@@ -0,0 +1,295 @@
+/* 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 NEVERHOOD_MODULES_MODULE1300_H
+#define NEVERHOOD_MODULES_MODULE1300_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/smackerplayer.h"
+
+namespace Neverhood {
+
+// Module1300
+
+class Module1300 : public Module {
+public:
+ Module1300(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1300();
+protected:
+ int _sceneNum;
+ uint32 _musicFileHash;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+class AsScene1302Bridge : public AnimatedSprite {
+public:
+ AsScene1302Bridge(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stLowerBridge();
+ void stRaiseBridge();
+ void cbLowerBridgeEvent();
+};
+
+class SsScene1302Fence : public StaticSprite {
+public:
+ SsScene1302Fence(NeverhoodEngine *vm);
+protected:
+ int16 _firstY;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoveDown();
+ void suMoveUp();
+};
+
+class Scene1302 : public Scene {
+public:
+ Scene1302(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_asVenusFlyTrap;
+ Sprite *_asBridge;
+ Sprite *_ssFence;
+ Sprite *_asRing1;
+ Sprite *_asRing2;
+ Sprite *_asRing3;
+ Sprite *_asRing4;
+ Sprite *_asRing5;
+ Sprite *_class595;
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1303Balloon : public AnimatedSprite {
+public:
+ AsScene1303Balloon(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmBalloonPopped(int messageNum, const MessageParam &param, Entity *sender);
+ void stPopBalloon();
+};
+
+class Scene1303 : public Scene {
+public:
+ Scene1303(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ Sprite *_sprite1;
+ Sprite *_asBalloon;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1304Needle : public AnimatedSprite {
+public:
+ AsScene1304Needle(NeverhoodEngine *vm, Scene *parentScene, int surfacePriority, int16 x, int16 y);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1304 : public Scene {
+public:
+ Scene1304(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite1;
+ Sprite *_asKey;
+ Sprite *_asNeedle;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1305 : public Scene {
+public:
+ Scene1305(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1306Elevator : public AnimatedSprite {
+public:
+ AsScene1306Elevator(NeverhoodEngine *vm, Scene *parentScene, AnimatedSprite *asElevatorDoor);
+protected:
+ Scene *_parentScene;
+ AnimatedSprite *_asElevatorDoor;
+ bool _isUp;
+ bool _isDown;
+ int _countdown;
+ void update();
+ void upGoingDown();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stGoingUp();
+ void cbGoingUpEvent();
+ void stGoingDown();
+ void cbGoingDownEvent();
+};
+
+class Scene1306 : public Scene {
+public:
+ Scene1306(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene1306();
+protected:
+ Sprite *_ssButton;
+ Sprite *_asTape;
+ AnimatedSprite *_asElevatorDoor;
+ Sprite *_asElevator;
+ Sprite *_sprite1;
+ Sprite *_asKey;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 handleMessage416EB0(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1307Key : public AnimatedSprite {
+public:
+ AsScene1307Key(NeverhoodEngine *vm, Scene *parentScene, uint keyIndex, NRect *clipRects);
+protected:
+ Scene *_parentScene;
+ NPointArray *_pointList;
+ uint _pointIndex;
+ int _frameIndex;
+ uint _keyIndex;
+ NRect *_clipRects;
+ bool _isClickable;
+ int16 _prevX, _prevY;
+ int16 _deltaX, _deltaY;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suRemoveKey();
+ void suInsertKey();
+ void suMoveKey();
+ void stRemoveKey();
+ void stInsertKey();
+ void stMoveKey();
+ void stUnlock();
+ void stInsert();
+};
+
+class Scene1307 : public Scene {
+public:
+ Scene1307(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ NPointArray *_keyHolePoints;
+ NRect _keyHoleRects[16];
+ NRect _clipRects[4];
+ Sprite *_asKeys[3];
+ int _countdown;
+ Sprite *_asCurrKey;
+ bool _isInsertingKey;
+ bool _doLeaveScene;
+ bool _isPuzzleSolved;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene1308JaggyDoor : public AnimatedSprite {
+public:
+ AsScene1308JaggyDoor(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stOpenDoorDone();
+ void stCloseDoor();
+ void stCloseDoorDone();
+};
+
+class AsScene1308KeyboardDoor : public AnimatedSprite {
+public:
+ AsScene1308KeyboardDoor(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stFallingKeys();
+ void stFallingKeysDone();
+};
+
+class AsScene1308LightWallSymbols : public AnimatedSprite {
+public:
+ AsScene1308LightWallSymbols(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stFadeIn();
+ void stFadeOut();
+ void stFadeOutDone();
+};
+
+class SsScene1308Number : public StaticSprite {
+public:
+ SsScene1308Number(NeverhoodEngine *vm, uint32 fileHash, int index);
+};
+
+class AsScene1308Mouse : public AnimatedSprite {
+public:
+ AsScene1308Mouse(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1308 : public Scene {
+public:
+ Scene1308(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_asTape;
+ Sprite *_asJaggyDoor;
+ Sprite *_asLightWallSymbols;
+ Sprite *_ssNumber1;
+ Sprite *_ssNumber2;
+ Sprite *_ssNumber3;
+ AnimatedSprite *_asProjector;
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_sprite4;
+ Sprite *_sprite5;
+ bool _isProjecting;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1317 : public Scene {
+public:
+ Scene1317(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ SmackerPlayer *_smackerPlayer;
+ bool _klaymenBlinks;
+ int _klaymenBlinkCountdown;
+ int _decisionCountdown;
+ uint32 _smackerFileHash;
+ bool _keepLastSmackerFrame;
+ void update();
+ void upChooseKing();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmChooseKing(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmHoborgAsKing(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmEndMovie(int messageNum, const MessageParam &param, Entity *sender);
+ void stChooseKing();
+ void stNoDecisionYet();
+ void stHoborgAsKing();
+ void stKlaymenAsKing();
+ void stEndMovie();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1300_H */
diff --git a/engines/neverhood/modules/module1400.cpp b/engines/neverhood/modules/module1400.cpp
new file mode 100644
index 0000000000..56c6ca5f13
--- /dev/null
+++ b/engines/neverhood/modules/module1400.cpp
@@ -0,0 +1,1621 @@
+/* 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 "neverhood/modules/module1400.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module2100.h"
+#include "neverhood/modules/module2200.h"
+#include "neverhood/diskplayerscene.h"
+#include "neverhood/gamemodule.h"
+
+namespace Neverhood {
+
+Module1400::Module1400(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x00AD0012, 0x06333232);
+ _vm->_soundMan->addMusic(0x00AD0012, 0x624A220E);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else
+ createScene(0, 0);
+
+}
+
+Module1400::~Module1400() {
+ _vm->_soundMan->deleteMusicGroup(0x00AD0012);
+}
+
+void Module1400::createScene(int sceneNum, int which) {
+ debug(1, "Module1400::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->startMusic(0x06333232, 0, 2);
+ _childObject = new Scene1401(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->stopMusic(0x06333232, 0, 2);
+ _vm->_soundMan->stopMusic(0x624A220E, 0, 2);
+ _childObject = new Scene1402(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->stopMusic(0x06333232, 0, 2);
+ _vm->_soundMan->startMusic(0x624A220E, 0, 2);
+ _childObject = new Scene1403(_vm, this, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->_soundMan->startMusic(0x06333232, 0, 2);
+ _childObject = new Scene1404(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->startMusic(0x06333232, 0, 2);
+ _childObject = new Scene1405(_vm, this);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->_soundMan->stopMusic(0x06333232, 0, 2);
+ _childObject = new DiskplayerScene(_vm, this, 2);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->stopMusic(0x06333232, 0, 2);
+ _childObject = new Scene1407(_vm, this);
+ break;
+ }
+ SetUpdateHandler(&Module1400::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1400::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(1, 0);
+ else if (_moduleResult == 2)
+ createScene(3, 0);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ if (_moduleResult == 1)
+ createScene(2, 0);
+ else if (_moduleResult == 2)
+ createScene(6, -1);
+ else
+ createScene(0, 1);
+ break;
+ case 2:
+ createScene(1, 1);
+ break;
+ case 3:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else if (_moduleResult == 2)
+ createScene(5, -1);
+ else
+ createScene(0, 2);
+ break;
+ case 4:
+ createScene(3, 1);
+ break;
+ case 5:
+ createScene(3, 2);
+ break;
+ case 6:
+ createScene(1, 2);
+ break;
+ }
+ }
+}
+
+// Scene1401
+
+AsScene1401Pipe::AsScene1401Pipe(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100), _countdown1(0), _countdown2(0) {
+
+ createSurface(900, 152, 147);
+ _x = 454;
+ _y = 217;
+ startAnimation(0x4C210500, 0, -1);
+ SetUpdateHandler(&AsScene1401Pipe::update);
+ SetMessageHandler(&AsScene1401Pipe::handleMessage);
+}
+
+AsScene1401Pipe::~AsScene1401Pipe() {
+ _vm->_soundMan->deleteSoundGroup(0x01104C08);
+}
+
+void AsScene1401Pipe::update() {
+ AnimatedSprite::update();
+ if (_countdown1 != 0 && (--_countdown1 == 0))
+ stDoneSucking();
+ if (_countdown2 != 0 && (--_countdown2 == 0)) {
+ _vm->_soundMan->addSound(0x01104C08, 0x4A116437);
+ _vm->_soundMan->playSoundLooping(0x4A116437);
+ }
+}
+
+void AsScene1401Pipe::upSuckInProjector() {
+ AnimatedSprite::update();
+ if (_countdown1 != 0)
+ _countdown1--;
+}
+
+uint32 AsScene1401Pipe::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0A8A1490)
+ playSound(1, 0x6AB6666F);
+ break;
+ case 0x2000:
+ _countdown1 = 70;
+ _countdown2 = 8;
+ stStartSucking();
+ break;
+ case 0x483A:
+ stSuckInProjector();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1401Pipe::hmSuckInProjector(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ if (_countdown1 != 0)
+ stStartSucking();
+ else
+ stDoneSucking();
+ SetMessageHandler(&AsScene1401Pipe::handleMessage);
+ SetUpdateHandler(&AsScene1401Pipe::update);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1401Pipe::stStartSucking() {
+ startAnimation(0x4C240100, 0, -1);
+ playSound(0, 0x4A30063F);
+}
+
+void AsScene1401Pipe::stDoneSucking() {
+ _vm->_soundMan->deleteSound(0x4A116437);
+ playSound(0, 0x4A120435);
+ startAnimation(0x4C210500, 0, -1);
+}
+
+void AsScene1401Pipe::stSuckInProjector() {
+ startAnimation(0x6C210810, 0, -1);
+ SetUpdateHandler(&AsScene1401Pipe::upSuckInProjector);
+ SetMessageHandler(&AsScene1401Pipe::hmSuckInProjector);
+}
+
+AsScene1401Mouse::AsScene1401Mouse(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface(100, 71, 41);
+ _x = 478;
+ _y = 433;
+ startAnimation(0xA282C472, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1401Mouse::handleMessage);
+}
+
+uint32 AsScene1401Mouse::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x66382026)
+ playSound(0, 0x0CD84468);
+ else if (param.asInteger() == 0x6E28061C)
+ playSound(0, 0x78C8402C);
+ else if (param.asInteger() == 0x462F0410)
+ playSound(0, 0x60984E28);
+ break;
+ case 0x4839:
+ stSuckedIn();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1401Mouse::suSuckedIn() {
+ AnimatedSprite::updateDeltaXY();
+ if (_collisionBounds.y1 <= 150) {
+ playSound(0, 0x0E32247F);
+ stopAnimation();
+ setVisible(false);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1401Mouse::stSuckedIn() {
+ startAnimation(0x34880040, 0, -1);
+ SetSpriteUpdate(&AsScene1401Mouse::suSuckedIn);
+}
+
+AsScene1401Cheese::AsScene1401Cheese(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface(200, 152, 147);
+ _x = 427;
+ _y = 433;
+ startAnimation(0x461A1490, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1401Cheese::handleMessage);
+}
+
+uint32 AsScene1401Cheese::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4839:
+ stSuckedIn();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1401Cheese::suSuckedIn() {
+ AnimatedSprite::updateDeltaXY();
+ if (_collisionBounds.y1 <= 150) {
+ playSound(0, 0x18020439);
+ stopAnimation();
+ setVisible(false);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1401Cheese::stSuckedIn() {
+ startAnimation(0x103B8020, 0, -1);
+ SetSpriteUpdate(&AsScene1401Cheese::suSuckedIn);
+}
+
+AsScene1401BackDoor::AsScene1401BackDoor(NeverhoodEngine *vm, Sprite *klaymen, bool isOpen)
+ : AnimatedSprite(vm, 1100), _klaymen(klaymen), _countdown(0), _isOpen(isOpen) {
+
+ _x = 320;
+ _y = 240;
+ createSurface1(0x04551900, 100);
+ if (isOpen) {
+ startAnimation(0x04551900, -1, -1);
+ _countdown = 48;
+ } else {
+ stopAnimation();
+ setVisible(false);
+ }
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ SetUpdateHandler(&AsScene1401BackDoor::update);
+ SetMessageHandler(&AsScene1401BackDoor::handleMessage);
+}
+
+void AsScene1401BackDoor::update() {
+ if (_countdown != 0 && (--_countdown == 0))
+ stCloseDoor();
+ AnimatedSprite::update();
+}
+
+
+uint32 AsScene1401BackDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2001:
+ if (_isOpen)
+ _countdown = 168;
+ messageResult = _isOpen ? 1 : 0;
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ _countdown = 168;
+ if (!_isOpen)
+ stOpenDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1401BackDoor::stOpenDoor() {
+ _isOpen = true;
+ setVisible(true);
+ startAnimation(0x04551900, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ playSound(0, calcHash("fxDoorOpen24"));
+}
+
+void AsScene1401BackDoor::stCloseDoor() {
+ _isOpen = false;
+ setVisible(true);
+ startAnimation(0x04551900, -1, -1);
+ playSound(0, calcHash("fxDoorClose24"));
+ _playBackwards = true;
+ NextState(&AsScene1401BackDoor::stCloseDoorDone);
+}
+
+void AsScene1401BackDoor::stCloseDoorDone() {
+ stopAnimation();
+ setVisible(false);
+}
+
+static const AsCommonProjectorItem kAsCommonProjectorItems[] = {
+ {{154, 453}, 4, 2, 0, 0, 1},
+ {{104, 391}, 4, -1, -1, 1, 1},
+ {{ 22, 447}, 6, -1, -1, 1, 1},
+ {{112, 406}, 2, -1, -1, 1, 0},
+ {{262, 433}, 1, 1, 0, 0, 0}
+};
+
+AsCommonProjector::AsCommonProjector(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, Sprite *asPipe)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _klaymen(klaymen), _asPipe(asPipe) {
+
+ _asProjectorItem = &kAsCommonProjectorItems[getGlobalVar(V_PROJECTOR_LOCATION)];
+ createSurface(990, 101, 182);
+ startAnimation(0x10E3042B, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsCommonProjector::handleMessage);
+ _x = getGlobalVar(V_PROJECTOR_SLOT) * 108 + _asProjectorItem->point.x;
+ _lockedInSlot = true;
+ moveProjector();
+ setDoDeltaX(1);
+ if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->lockSlotIndex)
+ stStayLockedInSlot();
+ loadSound(2, 0xC8C2507C);
+}
+
+AsCommonProjector::~AsCommonProjector() {
+ _vm->_soundMan->deleteSoundGroup(0x05331081);
+}
+
+uint32 AsCommonProjector::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4807:
+ setGlobalVar(V_PROJECTOR_SLOT, (_x - _asProjectorItem->point.x) / 108);
+ if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->lockSlotIndex)
+ stStartLockedInSlot();
+ else
+ stIdle();
+ break;
+ case 0x480B:
+ if (param.asInteger() != 1) {
+ if ((int8)getGlobalVar(V_PROJECTOR_SLOT) < _asProjectorItem->maxSlotCount)
+ incGlobalVar(V_PROJECTOR_SLOT, 1);
+ } else if (getGlobalVar(V_PROJECTOR_SLOT) > 0)
+ incGlobalVar(V_PROJECTOR_SLOT, -1);
+ stMoving();
+ break;
+ case 0x480C:
+ // Check if the projector can be moved
+ if (param.asInteger() != 1)
+ messageResult = (int8)getGlobalVar(V_PROJECTOR_SLOT) < _asProjectorItem->maxSlotCount ? 1 : 0;
+ else
+ messageResult = getGlobalVar(V_PROJECTOR_SLOT) > 0 ? 1 : 0;
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ case 0x4839:
+ stStartSuckedIn();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsCommonProjector::hmLockedInSlot(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (param.asPoint().x - _x >= 17 && param.asPoint().x - _x <= 56 &&
+ param.asPoint().y - _y >= -120 && param.asPoint().y - _y <= -82) {
+ sendMessage(_parentScene, 0x4826, 1);
+ } else
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4807:
+ sendMessage(_parentScene, 0x4807, 0);
+ stStopProjecting();
+ break;
+ case 0x480B:
+ if (param.asInteger() != 1) {
+ if ((int8)getGlobalVar(V_PROJECTOR_SLOT) < _asProjectorItem->maxSlotCount)
+ incGlobalVar(V_PROJECTOR_SLOT, 1);
+ } else if (getGlobalVar(V_PROJECTOR_SLOT) > 0)
+ incGlobalVar(V_PROJECTOR_SLOT, -1);
+ stTurnToFront();
+ break;
+ case 0x480C:
+ // Check if the projector can be moved
+ if (param.asInteger() != 1)
+ messageResult = (int8)getGlobalVar(V_PROJECTOR_SLOT) < _asProjectorItem->maxSlotCount ? 1 : 0;
+ else
+ messageResult = getGlobalVar(V_PROJECTOR_SLOT) > 0 ? 1 : 0;
+ break;
+ case 0x480F:
+ stStartProjecting();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsCommonProjector::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsCommonProjector::suMoving() {
+ if (_x <= _klaymen->getX())
+ _x = _klaymen->getX() - 100;
+ else
+ _x = _klaymen->getX() + 100;
+ moveProjector();
+ if (_beforeMoveX == _x) {
+ if (getGlobalVar(V_PROJECTOR_SLOT) == 0 && _asProjectorItem->leftBorderLeaves != 0) {
+ sendMessage(_parentScene, 0x1019, 0);
+ incGlobalVar(V_PROJECTOR_LOCATION, -1);
+ setGlobalVar(V_PROJECTOR_SLOT, kAsCommonProjectorItems[getGlobalVar(V_PROJECTOR_LOCATION)].maxSlotCount);
+ } else if ((int8)getGlobalVar(V_PROJECTOR_SLOT) == _asProjectorItem->maxSlotCount && _asProjectorItem->rightBorderLeaves != 0) {
+ sendMessage(_parentScene, 0x1019, 1);
+ incGlobalVar(V_PROJECTOR_LOCATION, +1);
+ setGlobalVar(V_PROJECTOR_SLOT, 0);
+ }
+ }
+ Sprite::updateBounds();
+}
+
+void AsCommonProjector::moveProjector() {
+
+ bool nowLockedInSlot = false;
+
+ _y = _asProjectorItem->point.y;
+
+ if (_asProjectorItem->index1 != -1) {
+ int16 elX = _asProjectorItem->index1 * 108 + _asProjectorItem->point.x;
+ if (elX - 20 < _x && elX + 20 > _x) {
+ nowLockedInSlot = true;
+ _y = _asProjectorItem->point.y + 10;
+ }
+ }
+
+ if (_asProjectorItem->lockSlotIndex != -1) {
+ int16 elX = _asProjectorItem->lockSlotIndex * 108 + _asProjectorItem->point.x;
+ if (elX - 20 < _x && elX + 20 > _x) {
+ nowLockedInSlot = true;
+ _y = _asProjectorItem->point.y + 10;
+ }
+ }
+
+ if (_lockedInSlot && !nowLockedInSlot)
+ _lockedInSlot = false;
+ else if (!_lockedInSlot && nowLockedInSlot) {
+ playSound(1, 0x5440E474);
+ _lockedInSlot = true;
+ }
+
+}
+
+void AsCommonProjector::stSuckedIn() {
+ AnimatedSprite::updateDeltaXY();
+ if (_collisionBounds.y1 <= 150) {
+ sendMessage(_asPipe, 0x483A, 0);
+ stopAnimation();
+ setVisible(false);
+ SetMessageHandler(&Sprite::handleMessage);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsCommonProjector::stIdle() {
+ startAnimation(0x10E3042B, 0, -1);
+ SetMessageHandler(&AsCommonProjector::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsCommonProjector::stMoving() {
+ _beforeMoveX = getGlobalVar(V_PROJECTOR_SLOT) * 108 + _asProjectorItem->point.x;
+ startAnimation(0x14A10137, 0, -1);
+ playSound(1, 0xEC008474);
+ SetMessageHandler(&AsCommonProjector::handleMessage);
+ SetSpriteUpdate(&AsCommonProjector::suMoving);
+}
+
+void AsCommonProjector::stStartLockedInSlot() {
+ startAnimation(0x80C32213, 0, -1);
+ SetMessageHandler(&AsCommonProjector::hmAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&AsCommonProjector::stStayLockedInSlot);
+}
+
+void AsCommonProjector::stStayLockedInSlot() {
+ startAnimation(0xD23B207F, 0, -1);
+ SetMessageHandler(&AsCommonProjector::hmLockedInSlot);
+ SetSpriteUpdate(NULL);
+}
+
+void AsCommonProjector::stStartProjecting() {
+ startAnimation(0x50A80517, 0, -1);
+ setGlobalVar(V_PROJECTOR_ACTIVE, 1);
+ playSound(0, 0xCC4A8456);
+ _vm->_soundMan->addSound(0x05331081, 0xCE428854);
+ _vm->_soundMan->playSoundLooping(0xCE428854);
+ SetMessageHandler(&AsCommonProjector::hmAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&AsCommonProjector::stLockedInSlot);
+}
+
+void AsCommonProjector::stLockedInSlot() {
+ sendMessage(_parentScene, 0x480F, 0);
+ startAnimation(0xD833207F, 0, -1);
+ SetMessageHandler(&AsCommonProjector::hmLockedInSlot);
+ SetSpriteUpdate(NULL);
+}
+
+void AsCommonProjector::stStopProjecting() {
+ startAnimation(0x50A94417, 0, -1);
+ setGlobalVar(V_PROJECTOR_ACTIVE, 0);
+ playSound(0, 0xCC4A8456);
+ _vm->_soundMan->deleteSound(0xCE428854);
+ SetMessageHandler(&AsCommonProjector::hmAnimation);
+ SetSpriteUpdate(NULL);
+ NextState(&AsCommonProjector::stStayLockedInSlot);
+}
+
+void AsCommonProjector::stTurnToFront() {
+ _beforeMoveX = getGlobalVar(V_PROJECTOR_SLOT) * 108 + _asProjectorItem->point.x;
+ startAnimation(0x22CB4A33, 0, -1);
+ SetMessageHandler(&AsCommonProjector::hmAnimation);
+ SetSpriteUpdate(&AsCommonProjector::suMoving);
+ NextState(&AsCommonProjector::stMoving);
+}
+
+void AsCommonProjector::stStartSuckedIn() {
+ setGlobalVar(V_PROJECTOR_LOCATION, 4);
+ setGlobalVar(V_PROJECTOR_SLOT, 0);
+ startAnimation(0x708D4712, 0, -1);
+ playSound(2);
+ SetMessageHandler(&Sprite::handleMessage);
+ SetSpriteUpdate(&AsCommonProjector::stSuckedIn);
+}
+
+Scene1401::Scene1401(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _projectorBorderFlag(false), _ssFloorButton(NULL), _asProjector(NULL),
+ _asPipe(NULL), _asMouse(NULL), _asCheese(NULL), _asBackDoor(NULL),
+ _sprite1(NULL), _sprite2(NULL), _sprite3(NULL), _ssButton(NULL) {
+
+ SetMessageHandler(&Scene1401::handleMessage);
+ SetUpdateHandler(&Scene1401::update);
+
+ setRectList(0x004B6758);
+ setBackground(0x08221FA5);
+ setPalette(0x08221FA5);
+ insertScreenMouse(0x21FA108A);
+
+ _ssFloorButton = insertSprite<SsCommonFloorButton>(this, 0x980F3124, 0x12192892, 100, 0);
+ _asPipe = insertSprite<AsScene1401Pipe>();
+
+ if (!getGlobalVar(V_MOUSE_SUCKED_IN)) {
+ _asMouse = insertSprite<AsScene1401Mouse>();
+ _asCheese = insertSprite<AsScene1401Cheese>();
+ }
+
+ _sprite3 = insertStaticSprite(0xA82BA811, 1100);
+ insertStaticSprite(0x0A116C60, 1100);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0xB84B1100, 100, 0);
+ _sprite1 = insertStaticSprite(0x38EA100C, 1005);
+ _sprite2 = insertStaticSprite(0x98D0223C, 1200);
+ _sprite2->setVisible(false);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1401>(380, 447);
+ setMessageList(0x004B65C8);
+ _sprite1->setVisible(false);
+ } else if (which == 1) {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1401>(0, 447);
+ setMessageList(0x004B65D0);
+ _sprite1->setVisible(false);
+ } else if (which == 2) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene1401>(660, 447);
+ setMessageList(0x004B65D8);
+ _sprite1->setVisible(false);
+ } else {
+ // Klaymen entering from the back
+ insertKlaymen<KmScene1401>(290, 413);
+ setMessageList(0x004B65E8);
+ _sprite1->setVisible(false);
+ }
+
+ if (getGlobalVar(V_PROJECTOR_LOCATION) == 2) {
+ _asProjector = insertSprite<AsCommonProjector>(this, _klaymen, _asPipe);
+ addCollisionSprite(_asProjector);
+ if (getGlobalVar(V_PROJECTOR_SLOT) == 6) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() + 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B6670);
+ } else if (getGlobalVar(V_PROJECTOR_SLOT) == 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() - 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B6670);
+ }
+ _asProjector->setClipRect(_sprite3->getDrawRect().x, _sprite2->getDrawRect().y, 640, 480);
+ }
+
+ _klaymen->setClipRect(_sprite3->getDrawRect().x, 0, 640, 480);
+
+ if (which == 0 && _asProjector)
+ sendMessage(_asProjector, 0x482B, 0);
+
+ _asBackDoor = insertSprite<AsScene1401BackDoor>(_klaymen, which == 0);
+
+}
+
+void Scene1401::update() {
+ Scene::update();
+ if (_asProjector && !_projectorBorderFlag && _asProjector->getY() < 360) {
+ _sprite2->setVisible(true);
+ _projectorBorderFlag = true;
+ } else
+ _sprite2->setVisible(false);
+}
+
+uint32 Scene1401::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02144CB1)
+ sendEntityMessage(_klaymen, 0x1014, _ssFloorButton);
+ else if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x01C66840) {
+ if (sendMessage(_asBackDoor, 0x2001, 0) != 0)
+ setMessageList(0x004B6690);
+ else
+ setMessageList(0x004B66B0);
+ }
+ break;
+ case 0x1019:
+ if (param.asInteger() != 0)
+ leaveScene(2);
+ else
+ leaveScene(1);
+ break;
+ case 0x480B:
+ if (sender == _ssFloorButton) {
+ sendMessage(_asPipe, 0x2000, 0);
+ if (!getGlobalVar(V_MOUSE_SUCKED_IN)) {
+ sendMessage(_asMouse, 0x4839, 0);
+ sendMessage(_asCheese, 0x4839, 0);
+ setGlobalVar(V_MOUSE_SUCKED_IN, 1);
+ }
+ if (_asProjector && _asProjector->getX() > 404 && _asProjector->getX() < 504)
+ sendMessage(_asProjector , 0x4839, 0);
+ } else if (sender == _ssButton)
+ sendMessage(_asBackDoor, 0x4808, 0);
+ break;
+ case 0x4826:
+ if (sender == _asProjector) {
+ if (sendMessage(_asProjector, 0x480C, _klaymen->getX() > _asProjector->getX() ? 1 : 0) != 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B6658);
+ } else
+ setMessageList2(0x004B65F0);
+ }
+ break;
+ case 0x482A:
+ _sprite1->setVisible(true);
+ if (_asProjector)
+ sendMessage(_asProjector, 0x482B, 0);
+ break;
+ case 0x482B:
+ _sprite1->setVisible(false);
+ if (_asProjector)
+ sendMessage(_asProjector, 0x482A, 0);
+ break;
+ }
+ return 0;
+}
+
+// Scene1402
+
+SsScene1402BridgePart::SsScene1402BridgePart(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority)
+ : StaticSprite(vm, fileHash, surfacePriority) {
+
+ SetFilterY(&Sprite::defFilterY);
+ SetUpdateHandler(&StaticSprite::updatePosition);
+}
+
+AsScene1402PuzzleBox::AsScene1402PuzzleBox(NeverhoodEngine *vm, Scene *parentScene, int status)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(900, 347, 230);
+
+ SetFilterY(&Sprite::defFilterY);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1402PuzzleBox::handleMessage);
+ _x = 279;
+ _y = 270;
+ if (status == 2) {
+ // Puzzle box after the puzzle was solved
+ startAnimation(0x20060259, 0, -1);
+ playSound(0, 0x419014AC);
+ loadSound(1, 0x61901C29);
+ NextState(&AsScene1402PuzzleBox::stMoveDownSolvedDone);
+ } else if (status == 1) {
+ // Puzzle box appears
+ startAnimation(0x210A0213, 0, -1);
+ playSound(0, 0x41809C6C);
+ NextState(&AsScene1402PuzzleBox::stMoveUpDone);
+ } else {
+ // Puzzle box is here
+ startAnimation(0x20060259, -1, -1);
+ loadSound(1, 0x61901C29);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ }
+}
+
+uint32 AsScene1402PuzzleBox::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ playSound(1);
+ startAnimation(0x20060259, -1, -1);
+ _playBackwards = true;
+ NextState(&AsScene1402PuzzleBox::stMoveDownDone);
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1402PuzzleBox::stMoveUpDone() {
+ sendMessage(_parentScene, 0x2000, 0);
+ stopAnimation();
+ setVisible(false);
+}
+
+void AsScene1402PuzzleBox::stMoveDownDone() {
+ sendMessage(_parentScene, 0x2001, 0);
+ stopAnimation();
+ setVisible(false);
+}
+
+void AsScene1402PuzzleBox::stMoveDownSolvedDone() {
+ sendMessage(_parentScene, 0x2003, 0);
+ stopAnimation();
+}
+
+Scene1402::Scene1402(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isShaking(false), _asPuzzleBox(NULL), _asProjector(NULL) {
+
+ SetMessageHandler(&Scene1402::handleMessage);
+
+ _vm->_screen->setYOffset(0);
+
+ setBackground(0x231482F0);
+ setBackgroundY(-10);
+ setPalette(0x231482F0);
+ _palette->addPalette(0x91D3A391, 0, 64, 0);
+ insertScreenMouse(0x482F4239);
+
+ _ssBridgePart1 = insertSprite<SsScene1402BridgePart>(0x15402D64, 1100);
+ _ssBridgePart2 = insertSprite<SsScene1402BridgePart>(0x10A02120, 1100);
+ _ssBridgePart3 = insertSprite<SsScene1402BridgePart>(0x60882BE0, 1100);
+
+ if (getGlobalVar(V_MOUSE_PUZZLE_SOLVED))
+ setRectList(0x004B0C48);
+ else
+ setRectList(0x004B0C98);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1402>(377, 391);
+ setMessageList(0x004B0B48);
+ if (!getGlobalVar(V_MOUSE_PUZZLE_SOLVED))
+ _asPuzzleBox = insertSprite<AsScene1402PuzzleBox>(this, 0);
+ } else if (which == 1) {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1402>(42, 391);
+ setMessageList(0x004B0B50);
+ } else if (which == 2) {
+ // Klaymen returning from the puzzle box
+ insertKlaymen<KmScene1402>(377, 391);
+ setMessageList(0x004B0B60);
+ _klaymen->setDoDeltaX(1);
+ if (getGlobalVar(V_MOUSE_PUZZLE_SOLVED)) {
+ _asPuzzleBox = insertSprite<AsScene1402PuzzleBox>(this, 1);
+ clearRectList();
+ showMouse(false);
+ startShaking();
+ } else
+ _asPuzzleBox = insertSprite<AsScene1402PuzzleBox>(this, 0);
+ } else {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene1402>(513, 391);
+ setMessageList(0x004B0B58);
+ if (!getGlobalVar(V_MOUSE_PUZZLE_SOLVED)) {
+ _asPuzzleBox = insertSprite<AsScene1402PuzzleBox>(this, 2);
+ startShaking();
+ }
+ }
+
+ if (_asPuzzleBox)
+ _asPuzzleBox->setClipRect(0, 0, 640, _ssBridgePart3->getDrawRect().y2());
+
+ if (getGlobalVar(V_PROJECTOR_LOCATION) == 1) {
+ _asProjector = insertSprite<AsCommonProjector>(this, _klaymen, (Sprite*)NULL);
+ addCollisionSprite(_asProjector);
+ if (getGlobalVar(V_PROJECTOR_SLOT) == 4) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() + 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B0BD0);
+ } else if (getGlobalVar(V_PROJECTOR_SLOT) == 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() - 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B0BD0);
+ }
+ _asProjector->setClipRect(_ssBridgePart1->getDrawRect().x, 0, _ssBridgePart2->getDrawRect().x, _ssBridgePart3->getDrawRect().y2());
+ }
+
+ _klaymen->setClipRect(_ssBridgePart1->getDrawRect().x, 0, _ssBridgePart2->getDrawRect().x2(), _ssBridgePart3->getDrawRect().y2());
+
+}
+
+void Scene1402::upShaking() {
+ if (_isShaking) {
+ setBackgroundY(_vm->_rnd->getRandomNumber(10 - 1) - 10);
+ _vm->_screen->setYOffset(-10 - getBackgroundY());
+ } else {
+ setBackgroundY(-10);
+ _vm->_screen->setYOffset(0);
+ SetUpdateHandler(&Scene::update);
+ }
+ Scene::update();
+ if (_asPuzzleBox)
+ _asPuzzleBox->setClipRect(0, 0, 640, _ssBridgePart3->getDrawRect().y2());
+ _klaymen->setClipRect(_ssBridgePart1->getDrawRect().x, 0, _ssBridgePart2->getDrawRect().x2(), _ssBridgePart3->getDrawRect().y2());
+}
+
+uint32 Scene1402::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x00F43389) {
+ if (getGlobalVar(V_MOUSE_PUZZLE_SOLVED))
+ leaveScene(0);
+ else {
+ clearRectList();
+ _klaymen->setVisible(false);
+ showMouse(false);
+ sendMessage(_asPuzzleBox, 0x2002, 0);
+ startShaking();
+ }
+ }
+ break;
+ case 0x1019:
+ if (param.asInteger())
+ leaveScene(0);
+ else
+ leaveScene(1);
+ break;
+ case 0x2000:
+ stopShaking();
+ showMouse(true);
+ setRectList(0x004B0C48);
+ break;
+ case 0x2001:
+ stopShaking();
+ leaveScene(0);
+ break;
+ case 0x2003:
+ stopShaking();
+ break;
+ case 0x4826:
+ if (sender == _asProjector) {
+ if (sendMessage(_asProjector, 0x480C, _klaymen->getX() > _asProjector->getX() ? 1 : 0) != 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B0BB8);
+ } else
+ setMessageList2(0x004B0B68);
+ }
+ break;
+ }
+ return 0;
+}
+
+void Scene1402::startShaking() {
+ _isShaking = true;
+ SetUpdateHandler(&Scene1402::upShaking);
+}
+
+void Scene1402::stopShaking() {
+ _isShaking = false;
+}
+
+// Scene1407
+
+static const int16 kScene1407MouseFloorY[] = {
+ 106, 150, 191, 230, 267, 308, 350, 395
+};
+
+static const struct {
+ int16 x;
+ int16 floorIndex;
+ int16 sectionIndex;
+ int16 nextHoleIndex;
+} kScene1407MouseHoles[] = {
+ {125, 0, 0, 7},
+ {452, 7, 21, 0},
+ {337, 4, 11, 4},
+ {286, 6, 17, 6},
+ {348, 6, 17, 39},
+ {536, 6, 18, 42},
+ {111, 1, 3, 18},
+ {203, 1, 3, 38},
+ {270, 1, 3, 9},
+ {197, 5, 14, 3},
+ {252, 5, 14, 35},
+ {297, 5, 14, 7},
+ {359, 5, 14, 8},
+ {422, 4, 12, 26},
+ {467, 4, 12, 2},
+ {539, 4, 12, 40},
+ {111, 5, 13, 17},
+ {211, 0, 1, 20},
+ {258, 0, 1, 11},
+ {322, 0, 1, 16},
+ { 99, 6, 16, 31},
+ {142, 6, 16, 27},
+ {194, 6, 16, 12},
+ {205, 2, 6, 45},
+ {264, 2, 6, 10},
+ { 98, 4, 10, 2},
+ {152, 4, 10, 37},
+ {199, 4, 10, 13},
+ {258, 4, 10, 16},
+ {100, 7, 19, 43},
+ {168, 7, 19, 23},
+ {123, 3, 8, 14},
+ {181, 3, 8, 39},
+ {230, 3, 8, 28},
+ {292, 3, 8, 22},
+ {358, 3, 8, 36},
+ {505, 3, 9, 44},
+ {400, 2, 7, 34},
+ {454, 2, 7, 32},
+ {532, 2, 7, 46},
+ {484, 5, 15, 25},
+ {529, 5, 15, 30},
+ {251, 7, 20, 48},
+ {303, 7, 20, 21},
+ {360, 7, 20, 33},
+ {503, 0, 2, 5},
+ {459, 1, 4, 19},
+ {530, 1, 4, 42},
+ {111, 2, 5, 47},
+ {442, 6, 18, 1}
+};
+
+static const struct {
+ int16 x1, x2;
+ int16 goodHoleIndex;
+} kScene1407MouseSections[] = {
+ {100, 149, 0},
+ {182, 351, 17},
+ {430, 524, 45},
+ { 89, 293, 7},
+ {407, 555, 47},
+ { 89, 132, 48},
+ {178, 303, 23},
+ {367, 551, 38},
+ {105, 398, 31},
+ {480, 537, 36},
+ { 84, 275, 27},
+ {318, 359, 2},
+ {402, 560, 15},
+ { 91, 132, 16},
+ {179, 400, 10},
+ {461, 552, 41},
+ { 86, 218, 21},
+ {267, 376, 4},
+ {420, 560, 49},
+ { 77, 188, 30},
+ {237, 394, 44},
+ {438, 515, 5}
+};
+
+AsScene1407Mouse::AsScene1407Mouse(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _currSectionIndex(0) {
+
+ createSurface(100, 117, 45);
+ _x = 108;
+ _y = 106;
+ stIdleLookAtGoodHole();
+ SetUpdateHandler(&AnimatedSprite::update);
+}
+
+void AsScene1407Mouse::suWalkTo() {
+ int16 xdelta = _walkDestX - _x;
+ if (xdelta > _deltaX)
+ xdelta = _deltaX;
+ else if (xdelta < -_deltaX)
+ xdelta = -_deltaX;
+ _deltaX = 0;
+ if (_walkDestX == _x)
+ sendMessage(this, 0x1019, 0);
+ else {
+ _x += xdelta;
+ updateBounds();
+ }
+}
+
+void AsScene1407Mouse::upGoThroughHole() {
+ if (_countdown != 0 && (--_countdown == 0)) {
+ SetUpdateHandler(&AnimatedSprite::update);
+ gotoNextState();
+ }
+ AnimatedSprite::update();
+}
+
+uint32 AsScene1407Mouse::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ {
+ int16 mouseX = param.asPoint().x;
+ int16 mouseY = param.asPoint().y;
+ int holeIndex;
+ for (holeIndex = 0; holeIndex < 50; holeIndex++) {
+ int16 holeX = kScene1407MouseHoles[holeIndex].x;
+ int16 holeY = kScene1407MouseFloorY[kScene1407MouseHoles[holeIndex].floorIndex];
+ if (mouseX >= holeX - 14 && mouseX <= holeX + 14 && mouseY >= holeY - 36 && mouseY <= holeY)
+ break;
+ }
+ if (holeIndex < 50 && kScene1407MouseHoles[holeIndex].sectionIndex == _currSectionIndex) {
+ _nextHoleIndex = kScene1407MouseHoles[holeIndex].nextHoleIndex;
+ _walkDestX = kScene1407MouseHoles[holeIndex].x;
+ stWalkToHole();
+ } else {
+ if (mouseX < kScene1407MouseSections[_currSectionIndex].x1)
+ _walkDestX = kScene1407MouseSections[_currSectionIndex].x1;
+ else if (mouseX > kScene1407MouseSections[_currSectionIndex].x2)
+ _walkDestX = kScene1407MouseSections[_currSectionIndex].x2;
+ else
+ _walkDestX = mouseX;
+ stWalkToDest();
+ }
+ }
+ break;
+ case 0x1019:
+ gotoNextState();
+ break;
+ case 0x2001:
+ {
+ // Reset the position
+ // Find the nearest hole and go through it, and exit at the first hole
+ int16 distance = 640;
+ int matchIndex = 50;
+ for (int index = 0; index < 50; index++)
+ if (kScene1407MouseHoles[index].sectionIndex == _currSectionIndex &&
+ ABS(kScene1407MouseHoles[index].x - _x) < distance) {
+ matchIndex = index;
+ distance = ABS(kScene1407MouseHoles[index].x - _x);
+ }
+ if (matchIndex < 50) {
+ _nextHoleIndex = 0;
+ _walkDestX = kScene1407MouseHoles[matchIndex].x;
+ stWalkToHole();
+ }
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1407Mouse::stIdleLookAtGoodHole() {
+ setDoDeltaX(kScene1407MouseHoles[kScene1407MouseSections[_currSectionIndex].goodHoleIndex].x < _x ? 1 : 0);
+ startAnimation(0x72215194, 0, -1);
+ SetMessageHandler(&AsScene1407Mouse::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsScene1407Mouse::stWalkToDest() {
+ if (_walkDestX != _x) {
+ setDoDeltaX(_walkDestX < _x ? 1 : 0);
+ startAnimation(0x22291510, 0, -1);
+ SetMessageHandler(&AsScene1407Mouse::handleMessage);
+ SetSpriteUpdate(&AsScene1407Mouse::suWalkTo);
+ NextState(&AsScene1407Mouse::stIdleLookAtGoodHole);
+ }
+}
+
+void AsScene1407Mouse::stWalkToHole() {
+ setDoDeltaX(_walkDestX < _x ? 1 : 0);
+ startAnimation(0x22291510, 0, -1);
+ SetMessageHandler(&AsScene1407Mouse::handleMessage);
+ SetSpriteUpdate(&AsScene1407Mouse::suWalkTo);
+ NextState(&AsScene1407Mouse::stGoThroughHole);
+}
+
+void AsScene1407Mouse::stGoThroughHole() {
+ startAnimation(0x72215194, 0, -1);
+ setVisible(false);
+ _countdown = 12;
+ SetUpdateHandler(&AsScene1407Mouse::upGoThroughHole);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(NULL);
+ NextState(&AsScene1407Mouse::stArriveAtHole);
+}
+
+void AsScene1407Mouse::stArriveAtHole() {
+ _currSectionIndex = kScene1407MouseHoles[_nextHoleIndex].sectionIndex;
+ _x = kScene1407MouseHoles[_nextHoleIndex].x;
+ _y = kScene1407MouseFloorY[kScene1407MouseHoles[_nextHoleIndex].floorIndex];
+ if (_nextHoleIndex == 1) {
+ sendMessage(_parentScene, 0x2000, 0);
+ _walkDestX = 512;
+ stWalkToDest();
+ setVisible(true);
+ } else {
+ _walkDestX = _x + 14;
+ stWalkToDest();
+ setVisible(true);
+ }
+}
+
+Scene1407::Scene1407(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _puzzleSolvedCountdown(0), _resetButtonCountdown(0) {
+
+ SetMessageHandler(&Scene1407::handleMessage);
+ SetUpdateHandler(&Scene1407::update);
+
+ setBackground(0x00442225);
+ setPalette(0x00442225);
+ insertPuzzleMouse(0x4222100C, 20, 620);
+
+ _asMouse = insertSprite<AsScene1407Mouse>(this);
+ _ssResetButton = insertStaticSprite(0x12006600, 100);
+ _ssResetButton->setVisible(false);
+
+}
+
+void Scene1407::update() {
+ Scene::update();
+ if (_puzzleSolvedCountdown != 0 && (--_puzzleSolvedCountdown == 0))
+ leaveScene(1);
+ else if (_resetButtonCountdown != 0 && (--_resetButtonCountdown == 0))
+ _ssResetButton->setVisible(false);
+}
+
+uint32 Scene1407::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (_puzzleSolvedCountdown == 0) {
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ // Exit scene
+ leaveScene(0);
+ } else if (param.asPoint().x >= 75 && param.asPoint().x <= 104 &&
+ param.asPoint().y >= 62 && param.asPoint().y <= 90) {
+ // The reset button was clicked
+ sendMessage(_asMouse, 0x2001, 0);
+ _ssResetButton->setVisible(true);
+ playSound(0, 0x44045000);
+ _resetButtonCountdown = 12;
+ } else {
+ // Handle the mouse
+ sendMessage(_asMouse, messageNum, param);
+ }
+ }
+ break;
+ case 0x2000:
+ // The mouse got the cheese (nomnom)
+ setGlobalVar(V_MOUSE_PUZZLE_SOLVED, 1);
+ playSound(0, 0x68E25540);
+ showMouse(false);
+ _puzzleSolvedCountdown = 72;
+ break;
+ }
+ return 0;
+}
+
+// Scene1403
+
+Scene1403::Scene1403(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _asProjector(NULL), _isProjecting(false) {
+
+ SetMessageHandler(&Scene1403::handleMessage);
+
+ setRectList(0x004B1FF8);
+ setBackground(0x2110A234);
+ setPalette(0x2110A234);
+ insertScreenMouse(0x0A230219);
+
+ _sprite1 = insertStaticSprite(0x01102A33, 100);
+ _sprite1->setVisible(false);
+ _sprite2 = insertStaticSprite(0x04442520, 995);
+ _sprite3 = insertStaticSprite(0x08742271, 995);
+ _asTape1 = insertSprite<AsScene1201Tape>(this, 12, 1100, 201, 468, 0x9148A011);
+ addCollisionSprite(_asTape1);
+ _asTape1->setRepl(64, 0);
+ _asTape2 = insertSprite<AsScene1201Tape>(this, 16, 1100, 498, 468, 0x9048A093);
+ addCollisionSprite(_asTape2);
+ _asTape2->setRepl(64, 0);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1403>(380, 463);
+ setMessageList(0x004B1F18);
+ } else {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene1403>(640, 463);
+ setMessageList(0x004B1F20);
+ }
+ _klaymen->setRepl(64, 0);
+
+ if (getGlobalVar(V_PROJECTOR_LOCATION) == 0) {
+ _asProjector = insertSprite<AsCommonProjector>(this, _klaymen, (Sprite*)NULL);
+ addCollisionSprite(_asProjector);
+ if (getGlobalVar(V_PROJECTOR_SLOT) == 4) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() + 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B1F70);
+ }
+ _asProjector->setClipRect(0, 0, 640, _sprite2->getDrawRect().y2());
+ _asProjector->setRepl(64, 0);
+ }
+
+}
+
+uint32 Scene1403::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x88C11390) {
+ setRectList(0x004B2008);
+ _isProjecting = true;
+ } else if (param.asInteger() == 0x08821382) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setRectList(0x004B1FF8);
+ _isProjecting = false;
+ }
+ break;
+ case 0x1019:
+ leaveScene(0);
+ break;
+ case 0x1022:
+ if (sender == _asProjector) {
+ if (param.asInteger() >= 1000)
+ setSurfacePriority(_sprite3->getSurface(), 1100);
+ else
+ setSurfacePriority(_sprite3->getSurface(), 995);
+ }
+ break;
+ case 0x4807:
+ _sprite1->setVisible(false);
+ break;
+ case 0x480F:
+ _sprite1->setVisible(true);
+ break;
+ case 0x4826:
+ if (sender == _asProjector) {
+ if (_isProjecting)
+ setMessageList2(0x004B1FA8);
+ else if (param.asInteger() == 1) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B1F88);
+ } else if (sendMessage(_asProjector, 0x480C, _klaymen->getX() > _asProjector->getX() ? 1 : 0) != 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B1F58);
+ } else
+ setMessageList2(0x004B1F28);
+ } else if (sender == _asTape1 || sender == _asTape2) {
+ if (_isProjecting)
+ setMessageList2(0x004B1FA8);
+ else if (_messageListStatus != 2) {
+ sendEntityMessage(_klaymen, 0x1014, sender);
+ setMessageList2(0x004B1FB8);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+// Scene1404
+
+Scene1404::Scene1404(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _asProjector(NULL), _asKey(NULL) {
+
+ if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
+ setGlobalVar(V_KEY3_LOCATION, 5);
+
+ SetMessageHandler(&Scene1404::handleMessage);
+
+ setRectList(0x004B8D80);
+ setBackground(0xAC0B006F);
+ setPalette(0xAC0B006F);
+ _palette->addPalette(0x00801510, 0, 65, 0);
+ insertScreenMouse(0xB006BAC8);
+
+ if (getGlobalVar(V_KEY3_LOCATION) == 5) {
+ _asKey = insertSprite<AsCommonKey>(this, 2, 1100, 267, 411);
+ addCollisionSprite(_asKey);
+ }
+
+ _sprite1 = insertStaticSprite(0x1900A1F8, 1100);
+ _asTape = insertSprite<AsScene1201Tape>(this, 14, 1100, 281, 411, 0x9148A011);
+ addCollisionSprite(_asTape);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1404>(376, 406);
+ setMessageList(0x004B8C28);
+ } else if (which == 1) {
+ // Klaymen returning from the tiles puzzle
+ insertKlaymen<KmScene1404>(376, 406);
+ setMessageList(0x004B8C30);
+ } else if (which == 2) {
+ // Klaymen returning from the diskplayer
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene1404>(347, 406);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene1404>(187, 406);
+ }
+ setMessageList(0x004B8D28);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1404>(30, 406);
+ setMessageList(0x004B8C38);
+ }
+
+ if (getGlobalVar(V_PROJECTOR_LOCATION) == 3) {
+ _asProjector = insertSprite<AsCommonProjector>(this, _klaymen, (Sprite*)NULL);
+ addCollisionSprite(_asProjector);
+ if (getGlobalVar(V_PROJECTOR_SLOT) == 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ _klaymen->setX(_asProjector->getX() - 100);
+ _klaymen->updateBounds();
+ setMessageList(0x004B8CB8);
+ }
+ _asProjector->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+ }
+
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+
+}
+
+Scene1404::~Scene1404() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene1404::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x410650C2) {
+ if (_asProjector && _asProjector->getX() == 220)
+ setMessageList(0x004B8C40);
+ else
+ setMessageList(0x004B8CE8);
+ }
+ break;
+ case 0x1019:
+ leaveScene(0);
+ break;
+ case 0x4826:
+ if (sender == _asProjector) {
+ if (sendMessage(_asProjector, 0x480C, _klaymen->getX() > _asProjector->getX() ? 1 : 0) != 0) {
+ sendEntityMessage(_klaymen, 0x1014, _asProjector);
+ setMessageList2(0x004B8CA0);
+ } else
+ setMessageList2(0x004B8C40);
+ } else if (sender == _asTape && _messageListStatus != 2) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B8CD0);
+ } else if (sender == _asKey && _messageListStatus != 2) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004B8D18);
+ }
+ break;
+ }
+ return 0;
+}
+
+// Scene1405
+
+static const NPoint kAsScene1405TileItemPositions[] = {
+ {100, 80}, {162, 78}, {222, 76}, {292, 76},
+ {356, 82}, {422, 84}, {488, 86}, {550, 90},
+ {102, 134}, {164, 132}, {224, 136}, {294, 136},
+ {360, 136}, {422, 138}, {484, 144}, {548, 146},
+ { 98, 196}, {160, 200}, {228, 200}, {294, 202},
+ {360, 198}, {424, 200}, {482, 202}, {548, 206},
+ { 98, 260}, {160, 264}, {226, 260}, {296, 262},
+ {358, 260}, {424, 262}, {486, 264}, {550, 266},
+ { 94, 322}, {160, 316}, {226, 316}, {296, 320},
+ {358, 322}, {422, 324}, {488, 322}, {550, 322},
+ { 98, 380}, {160, 376}, {226, 376}, {294, 378},
+ {356, 380}, {420, 380}, {490, 378}, {552, 376}
+};
+
+AsScene1405Tile::AsScene1405Tile(NeverhoodEngine *vm, Scene1405 *parentScene, uint32 tileIndex)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _tileIndex(tileIndex), _countdown(0), _isShowing(false) {
+
+ loadSound(0, 0x05308101);
+ setSoundPan(0, (tileIndex % 8 * 4 + 4) * 25 / 8);
+ _x = kAsScene1405TileItemPositions[_tileIndex].x;
+ _y = kAsScene1405TileItemPositions[_tileIndex].y;
+ createSurface1(0x844B805C, 1100);
+ setVisible(false);
+ if (getSubVar(VA_IS_TILE_MATCH, _tileIndex))
+ _countdown = _vm->_rnd->getRandomNumber(36 - 1) + 1;
+ startAnimation(0x844B805C, getSubVar(VA_TILE_SYMBOLS, _tileIndex), -1);
+ _newStickFrameIndex = (int16)getSubVar(VA_TILE_SYMBOLS, _tileIndex);
+ SetUpdateHandler(&AsScene1405Tile::update);
+ SetMessageHandler(&AsScene1405Tile::handleMessage);
+}
+
+void AsScene1405Tile::update() {
+ updateAnim();
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0))
+ show();
+}
+
+uint32 AsScene1405Tile::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (getSubVar(VA_IS_TILE_MATCH, _tileIndex) == 0 && _parentScene->getCountdown() == 0) {
+ show();
+ sendMessage(_parentScene, 0x2000, _tileIndex);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1405Tile::show() {
+ if (!_isShowing) {
+ _isShowing = true;
+ playSound(0);
+ setVisible(true);
+ }
+}
+
+void AsScene1405Tile::hide() {
+ if (_isShowing) {
+ _isShowing = false;
+ playSound(0);
+ setVisible(false);
+ }
+}
+
+Scene1405::Scene1405(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _selectFirstTile(true), _tilesLeft(48), _countdown(0) {
+
+ _vm->gameModule()->initMemoryPuzzle();
+
+ SetUpdateHandler(&Scene1405::update);
+ SetMessageHandler(&Scene1405::handleMessage);
+
+ setBackground(0x0C0C007D);
+ setPalette(0x0C0C007D);
+ insertPuzzleMouse(0xC00790C8, 20, 620);
+
+ for (uint32 tileIndex = 0; tileIndex < 48; tileIndex++) {
+ _tiles[tileIndex] = insertSprite<AsScene1405Tile>(this, tileIndex);
+ addCollisionSprite(_tiles[tileIndex]);
+ if (getSubVar(VA_IS_TILE_MATCH, tileIndex))
+ _tilesLeft--;
+ }
+
+ loadSound(0, 0x68E25540);
+}
+
+void Scene1405::update() {
+ Scene::update();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ _tilesLeft = 48;
+ _tiles[_firstTileIndex]->hide();
+ _tiles[_secondTileIndex]->hide();
+ for (uint32 i = 0; i < 48; i++) {
+ if (getSubVar(VA_IS_TILE_MATCH, i)) {
+ _tiles[i]->hide();
+ setSubVar(VA_IS_TILE_MATCH, i, 0);
+ }
+ }
+ }
+}
+
+uint32 Scene1405::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ case 0x2000:
+ if (_selectFirstTile) {
+ _firstTileIndex = param.asInteger();
+ _selectFirstTile = false;
+ } else {
+ _secondTileIndex = param.asInteger();
+ if (_firstTileIndex != _secondTileIndex) {
+ _selectFirstTile = true;
+ if (getSubVar(VA_TILE_SYMBOLS, _secondTileIndex) == getSubVar(VA_TILE_SYMBOLS, _firstTileIndex)) {
+ setSubVar(VA_IS_TILE_MATCH, _firstTileIndex, 1);
+ setSubVar(VA_IS_TILE_MATCH, _secondTileIndex, 1);
+ _tilesLeft -= 2;
+ if (_tilesLeft == 0)
+ playSound(0);
+ } else
+ _countdown = 10;
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1400.h b/engines/neverhood/modules/module1400.h
new file mode 100644
index 0000000000..9a592c2952
--- /dev/null
+++ b/engines/neverhood/modules/module1400.h
@@ -0,0 +1,281 @@
+/* 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 NEVERHOOD_MODULES_MODULE1400_H
+#define NEVERHOOD_MODULES_MODULE1400_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+class Module1400 : public Module {
+public:
+ Module1400(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1400();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1401
+
+class AsScene1401Pipe : public AnimatedSprite {
+public:
+ AsScene1401Pipe(NeverhoodEngine *vm);
+ virtual ~AsScene1401Pipe();
+protected:
+ int _countdown1;
+ int _countdown2;
+ void update();
+ void upSuckInProjector();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmSuckInProjector(int messageNum, const MessageParam &param, Entity *sender);
+ void stStartSucking();
+ void stDoneSucking();
+ void stSuckInProjector();
+};
+
+class AsScene1401Mouse : public AnimatedSprite {
+public:
+ AsScene1401Mouse(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suSuckedIn();
+ void stSuckedIn();
+};
+
+class AsScene1401Cheese : public AnimatedSprite {
+public:
+ AsScene1401Cheese(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suSuckedIn();
+ void stSuckedIn();
+};
+
+class AsScene1401BackDoor : public AnimatedSprite {
+public:
+ AsScene1401BackDoor(NeverhoodEngine *vm, Sprite *klaymen, bool isOpen);
+protected:
+ Sprite *_klaymen;
+ int _countdown;
+ bool _isOpen;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stCloseDoor();
+ void stCloseDoorDone();
+};
+
+struct AsCommonProjectorItem {
+ NPoint point;
+ int8 maxSlotCount;
+ int8 lockSlotIndex;
+ int8 index1;
+ int8 leftBorderLeaves;
+ int8 rightBorderLeaves;
+};
+
+class AsCommonProjector : public AnimatedSprite {
+public:
+ AsCommonProjector(NeverhoodEngine *vm, Scene *parentScene, Sprite *klaymen, Sprite *asPipe);
+ virtual ~AsCommonProjector();
+protected:
+ Scene *_parentScene;
+ Sprite *_klaymen;
+ Sprite *_asPipe;
+ const AsCommonProjectorItem *_asProjectorItem;
+ int16 _beforeMoveX;
+ bool _lockedInSlot;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmLockedInSlot(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoving();
+ void moveProjector();
+ void stSuckedIn();
+ void stIdle();
+ void stMoving();
+ void stStartLockedInSlot();
+ void stStayLockedInSlot();
+ void stStartProjecting();
+ void stLockedInSlot();
+ void stStopProjecting();
+ void stTurnToFront();
+ void stStartSuckedIn();
+};
+
+class Scene1401 : public Scene {
+public:
+ Scene1401(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ bool _projectorBorderFlag;
+ Sprite *_ssFloorButton;
+ AsCommonProjector *_asProjector;
+ Sprite *_asPipe;
+ Sprite *_asMouse;
+ Sprite *_asCheese;
+ Sprite *_asBackDoor;
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_ssButton;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1402
+
+class SsScene1402BridgePart : public StaticSprite {
+public:
+ SsScene1402BridgePart(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority);
+};
+
+class AsScene1402PuzzleBox : public AnimatedSprite {
+public:
+ AsScene1402PuzzleBox(NeverhoodEngine *vm, Scene *parentScene, int status);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stMoveUpDone();
+ void stMoveDownDone();
+ void stMoveDownSolvedDone();
+};
+
+class Scene1402 : public Scene {
+public:
+ Scene1402(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssBridgePart1;
+ Sprite *_ssBridgePart2;
+ Sprite *_ssBridgePart3;
+ Sprite *_asPuzzleBox;
+ AsCommonProjector *_asProjector;
+ bool _isShaking;
+ void upShaking();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void startShaking();
+ void stopShaking();
+};
+
+// Scene1407
+
+class AsScene1407Mouse : public AnimatedSprite {
+public:
+ AsScene1407Mouse(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ int16 _walkDestX;
+ int16 _currSectionIndex;
+ int16 _nextHoleIndex;
+ int _countdown;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suWalkTo();
+ void upGoThroughHole();
+ void stIdleLookAtGoodHole();
+ void stWalkToDest();
+ void stWalkToHole();
+ void stGoThroughHole();
+ void stArriveAtHole();
+};
+
+class Scene1407 : public Scene {
+public:
+ Scene1407(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ Sprite *_asMouse;
+ Sprite *_ssResetButton;
+ int _puzzleSolvedCountdown;
+ int _resetButtonCountdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1403
+
+class Scene1403 : public Scene {
+public:
+ Scene1403(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ AsScene1201Tape *_asTape1;
+ AsScene1201Tape *_asTape2;
+ AsCommonProjector *_asProjector;
+ bool _isProjecting;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1404
+
+class Scene1404 : public Scene {
+public:
+ Scene1404(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene1404();
+protected:
+ Sprite *_sprite1;
+ Sprite *_asTape;
+ AsCommonProjector *_asProjector;
+ Sprite *_asKey;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene1405
+
+class Scene1405;
+
+class AsScene1405Tile : public AnimatedSprite {
+public:
+ AsScene1405Tile(NeverhoodEngine *vm, Scene1405 *parentScene, uint32 tileIndex);
+ void show();
+ void hide();
+protected:
+ Scene1405 *_parentScene;
+ bool _isShowing;
+ uint32 _tileIndex;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1405 : public Scene {
+public:
+ Scene1405(NeverhoodEngine *vm, Module *parentModule);
+ int getCountdown() const { return _countdown; }
+protected:
+ bool _selectFirstTile;
+ int _firstTileIndex;
+ int _secondTileIndex;
+ int _tilesLeft;
+ int _countdown;
+ AsScene1405Tile *_tiles[48];
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1400_H */
diff --git a/engines/neverhood/modules/module1500.cpp b/engines/neverhood/modules/module1500.cpp
new file mode 100644
index 0000000000..00d64a8c2d
--- /dev/null
+++ b/engines/neverhood/modules/module1500.cpp
@@ -0,0 +1,134 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1500.h"
+
+namespace Neverhood {
+
+Module1500::Module1500(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else
+ createScene(3, -1);
+
+}
+
+void Module1500::createScene(int sceneNum, int which) {
+ debug(1, "Module1500::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1501(_vm, this, 0x8420221D, 0xA61024C4, 150, 48);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _childObject = new Scene1501(_vm, this, 0x30050A0A, 0x58B45E58, 110, 48);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ sendMessage(_parentModule, 0x0800, 0);
+ createSmackerScene(0x001A0005, true, true, true);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _childObject = new Scene1501(_vm, this, 0x0CA04202, 0, 110, 48);
+ break;
+ }
+ SetUpdateHandler(&Module1500::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1500::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ createScene(1, -1);
+ break;
+ case 1:
+ createScene(2, -1);
+ break;
+ case 3:
+ createScene(0, -1);
+ break;
+ default:
+ leaveModule(0);
+ break;
+ }
+ }
+}
+
+// Scene1501
+
+Scene1501::Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 soundFileHash, int countdown2, int countdown3)
+ : Scene(vm, parentModule), _countdown3(countdown3), _countdown2(countdown2), _countdown1(0), _skip(false) {
+
+ SetUpdateHandler(&Scene1501::update);
+ SetMessageHandler(&Scene1501::handleMessage);
+
+ setBackground(backgroundFileHash);
+ setPalette();
+ addEntity(_palette);
+ _palette->addBasePalette(backgroundFileHash, 0, 256, 0);
+ _palette->startFadeToPalette(12);
+
+ if (soundFileHash != 0)
+ playSound(0, soundFileHash);
+
+}
+
+void Scene1501::update() {
+ Scene::update();
+ if (_countdown1 != 0) {
+ _countdown1--;
+ if (_countdown1 == 0) {
+ _vm->_screen->clear();
+ leaveScene(0);
+ }
+ } else if ((_countdown2 != 0 && (--_countdown2 == 0)) || (_countdown2 == 0 && !isSoundPlaying(0))) {
+ _countdown1 = 12;
+ _palette->startFadeToBlack(11);
+ }
+
+ if (_countdown3 != 0)
+ _countdown3--;
+
+ if (_countdown3 == 0 && _skip && _countdown1 == 0) {
+ _countdown1 = 12;
+ _palette->startFadeToBlack(11);
+ }
+
+}
+
+uint32 Scene1501::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0009:
+ _skip = true;
+ break;
+ }
+ return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1500.h b/engines/neverhood/modules/module1500.h
new file mode 100644
index 0000000000..f244948918
--- /dev/null
+++ b/engines/neverhood/modules/module1500.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.
+ *
+ */
+
+// TODO: I couldn't come up with a better name than 'Module' so far
+
+#ifndef NEVERHOOD_MODULES_MODULE1500_H
+#define NEVERHOOD_MODULES_MODULE1500_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/smackerscene.h"
+
+namespace Neverhood {
+
+class Module1500 : public Module {
+public:
+ Module1500(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+class Scene1501 : public Scene {
+public:
+ Scene1501(NeverhoodEngine *vm, Module *parentModule, uint32 backgroundFileHash, uint32 soundFileHash, int countdown2, int countdown3);
+protected:
+ int _countdown1;
+ int _countdown2;
+ int _countdown3;
+ bool _skip;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1500_H */
diff --git a/engines/neverhood/modules/module1600.cpp b/engines/neverhood/modules/module1600.cpp
new file mode 100644
index 0000000000..40faa1e82d
--- /dev/null
+++ b/engines/neverhood/modules/module1600.cpp
@@ -0,0 +1,1412 @@
+/* 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 "neverhood/modules/module1600.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/modules/module2200.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1600SoundList[] = {
+ 0x90805C50, 0x90804450, 0xB4005E60,
+ 0x91835066, 0x90E14440, 0
+};
+
+Module1600::Module1600(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 1)
+ createScene(4, 1);
+ else if (which == 2)
+ createScene(5, 0);
+ else if (which == 3)
+ createScene(6, 1);
+ else if (which == 4)
+ createScene(1, 0);
+ else
+ createScene(0, 0);
+
+ _vm->_soundMan->addSoundList(0x1A008D8, kModule1600SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1600SoundList, true, 50, 600, 5, 150);
+ _vm->_soundMan->playTwoSounds(0x1A008D8, 0x41861371, 0x43A2507F, 0);
+
+}
+
+Module1600::~Module1600() {
+ _vm->_soundMan->deleteGroup(0x1A008D8);
+}
+
+void Module1600::createScene(int sceneNum, int which) {
+ debug(1, "Module1600::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ createNavigationScene(0x004B39D0, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(0x004B3A30, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ createNavigationScene(0x004B3A60, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ createNavigationScene(0x004B3A90, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ createNavigationScene(0x004B3B20, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ createNavigationScene(0x004B3B50, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ createNavigationScene(0x004B3B80, which);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _childObject = new Scene1608(_vm, this, which);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new Scene1609(_vm, this);
+ break;
+ case 1001:
+ _vm->gameState().sceneNum = 1;
+ if (getGlobalVar(V_TALK_COUNTING_INDEX) == 1)
+ createSmackerScene(0x80050200, true, true, false);
+ else if (getGlobalVar(V_TALK_COUNTING_INDEX) == 2)
+ createSmackerScene(0x80090200, true, true, false);
+ else
+ createSmackerScene(0x80000200, true, true, false);
+ if (getGlobalVar(V_TALK_COUNTING_INDEX) >= 2)
+ setGlobalVar(V_TALK_COUNTING_INDEX, 0);
+ else
+ incGlobalVar(V_TALK_COUNTING_INDEX, +1);
+ break;
+ }
+ SetUpdateHandler(&Module1600::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1600::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 0)
+ createScene(2, 0);
+ else if (_moduleResult == 1)
+ createScene(1, 0);
+ else if (_moduleResult == 2)
+ leaveModule(4);
+ break;
+ case 1:
+ if (_moduleResult == 0)
+ createScene(1001, -1);
+ else if (_moduleResult == 1)
+ createScene(0, 3);
+ break;
+ case 2:
+ if (_moduleResult == 0)
+ createScene(3, 0);
+ else if (_moduleResult == 1)
+ createScene(0, 2);
+ break;
+ case 3:
+ if (_moduleResult == 0)
+ createScene(5, 0);
+ else if (_moduleResult == 2)
+ createScene(6, 0);
+ else if (_moduleResult == 3)
+ createScene(2, 1);
+ else if (_moduleResult == 4)
+ createScene(4, 0);
+ break;
+ case 4:
+ if (_moduleResult == 0)
+ leaveModule(1);
+ else if (_moduleResult == 1)
+ createScene(3, 1);
+ break;
+ case 5:
+ if (_moduleResult == 0)
+ leaveModule(2);
+ else if (_moduleResult == 1)
+ createScene(3, 3);
+ break;
+ case 6:
+ if (_moduleResult == 0)
+ createScene(8, -1);
+ else if (_moduleResult == 1)
+ createScene(3, 5);
+ break;
+ case 7:
+ createScene(6, 1);
+ break;
+ case 8:
+ if (_moduleResult == 0)
+ createScene(6, 0);
+ else
+ createScene(7, 0);
+ break;
+ case 1001:
+ createScene(1, 0);
+ break;
+ }
+ }
+}
+
+AsCommonCar::AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y)
+ : AnimatedSprite(vm, 1000), _parentScene(parentScene) {
+
+ createSurface(200, 556, 328);
+ _x = x;
+ _y = y;
+
+ _inMainArea = false;
+ _exitDirection = 0;
+ _currPointIndex = 0;
+ _hasAgainDestPoint = false;
+ _stepError = 0;
+ _hasAgainDestPointIndex = false;
+ _steps = 0;
+ _isBraking = false;
+ _yMoveTotalSteps = 0;
+ _isBusy = false;
+ _isIdle = false;
+ _isMoving = true;
+ _rectFlag = false;
+ _newDeltaXType = -1;
+ _soundCounter = 0;
+ _pathPoints = NULL;
+ _currMoveDirection = 0;
+
+ startAnimation(0xD4220027, 0, -1);
+ setDoDeltaX(getGlobalVar(V_CAR_DELTA_X));
+
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+AsCommonCar::~AsCommonCar() {
+ if (_finalizeStateCb == AnimationCallback(&AsCommonCar::evTurnCarDone))
+ setGlobalVar(V_CAR_DELTA_X, !getGlobalVar(V_CAR_DELTA_X));
+}
+
+void AsCommonCar::setPathPoints(NPointArray *pathPoints) {
+ _pathPoints = pathPoints;
+}
+
+void AsCommonCar::update() {
+ if (_newDeltaXType >= 0) {
+ setDoDeltaX(_newDeltaXType);
+ _newDeltaXType = -1;
+ }
+ AnimatedSprite::update();
+ if (_hasAgainDestPoint && _yMoveTotalSteps == 0 && !_isBusy) {
+ _hasAgainDestPoint = false;
+ _hasAgainDestPointIndex = false;
+ sendPointMessage(this, 0x2004, _againDestPoint);
+ } else if (_hasAgainDestPointIndex && _yMoveTotalSteps == 0 && !_isBusy) {
+ _hasAgainDestPointIndex = false;
+ sendMessage(this, 0x2003, _againDestPointIndex);
+ }
+ updateMovement();
+ updateSound();
+}
+
+void AsCommonCar::upIdle() {
+ update();
+ if (++_idleCounter >= _idleCounterMax)
+ stIdleBlink();
+ updateSound();
+}
+
+uint32 AsCommonCar::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1019:
+ SetSpriteUpdate(NULL);
+ break;
+ case 0x2002:
+ // Set the current position without moving
+ _currPointIndex = param.asInteger();
+ _stepError = 0;
+ _x = pathPoint(_currPointIndex).x;
+ _y = pathPoint(_currPointIndex).y;
+ break;
+ case 0x2003:
+ // Move to a point by its index
+ {
+ int newPointIndex = param.asInteger();
+ if (_yMoveTotalSteps <= 0 && !_isBusy) {
+ _destX = pathPoint(newPointIndex).x;
+ _destY = pathPoint(newPointIndex).y;
+ if (_currPointIndex < newPointIndex) {
+ moveToNextPoint();
+ } else if (_currPointIndex == newPointIndex && _stepError == 0) {
+ if (_currPointIndex == 0) {
+ _yMoveTotalSteps = 0;
+ sendMessage(_parentScene, 0x2005, 0);
+ } else if (_currPointIndex == (int)_pathPoints->size()) {
+ _yMoveTotalSteps = 0;
+ sendMessage(_parentScene, 0x2006, 0);
+ }
+ } else {
+ moveToPrevPoint();
+ }
+ } else {
+ _hasAgainDestPointIndex = true;
+ _againDestPointIndex = newPointIndex;
+ }
+ }
+ break;
+ case 0x2004:
+ // Move to the point closest to the parameter point
+ {
+ int minMatchIndex = -1;
+ int minMatchDistance, distance;
+ NPoint pt = param.asPoint();
+ if (_yMoveTotalSteps <= 0 && !_isBusy) {
+ // Check if we're already exiting (or something)
+ if ((pt.x <= 20 && _exitDirection == 1) ||
+ (pt.x >= 620 && _exitDirection == 3) ||
+ (pt.y <= 20 && _exitDirection == 2) ||
+ (pt.y >= 460 && _exitDirection == 4))
+ break;
+ _destX = pt.x;
+ _destY = pt.y;
+ minMatchDistance = calcDistance(_destX, _destY, _x, _y) + 1;
+ for (int i = _currPointIndex + 1; i < (int)_pathPoints->size(); i++) {
+ distance = calcDistance(_destX, _destY, pathPoint(i).x, pathPoint(i).y);
+ if (distance >= minMatchDistance)
+ break;
+ minMatchDistance = distance;
+ minMatchIndex = i;
+ }
+ for (int i = _currPointIndex; i >= 0; i--) {
+ distance = calcDistance(_destX, _destY, pathPoint(i).x, pathPoint(i).y);
+ if (distance >= minMatchDistance)
+ break;
+ minMatchDistance = distance;
+ minMatchIndex = i;
+ }
+ if (minMatchIndex == -1) {
+ if (_currPointIndex == 0)
+ moveToPrevPoint();
+ else
+ SetSpriteUpdate(NULL);
+ } else {
+ if (minMatchIndex > _currPointIndex)
+ moveToNextPoint();
+ else
+ moveToPrevPoint();
+ }
+ } else {
+ _hasAgainDestPoint = true;
+ _againDestPoint = pt;
+ }
+ }
+ break;
+ case 0x2007:
+ _yMoveTotalSteps = param.asInteger();
+ _steps = 0;
+ _isBraking = false;
+ _lastDistance = 640;
+ SetSpriteUpdate(&AsCommonCar::suMoveToPrevPoint);
+ break;
+ case 0x2008:
+ _yMoveTotalSteps = param.asInteger();
+ _steps = 0;
+ _isBraking = false;
+ _lastDistance = 640;
+ SetSpriteUpdate(&AsCommonCar::suMoveToNextPoint);
+ break;
+ case 0x2009:
+ stEnterCar();
+ break;
+ case 0x200A:
+ stLeaveCar();
+ break;
+ case 0x200E:
+ stTurnCar();
+ break;
+ case 0x200F:
+ stCarAtHome();
+ _newDeltaXType = param.asInteger();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsCommonCar::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = AsCommonCar::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (_isBusy && param.asInteger() == 0x025424A2)
+ gotoNextState();
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsCommonCar::hmLeaveCar(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x2009:
+ stEnterCar();
+ break;
+ case 0x3002:
+ sendMessage(_parentScene, 0x200A, 0);
+ SetMessageHandler(&AsCommonCar::handleMessage);
+ break;
+ }
+ return 0;
+}
+
+void AsCommonCar::stCarAtHome() {
+ bool doDeltaX = _doDeltaX;
+ SetSpriteUpdate(NULL);
+ _hasAgainDestPoint = false;
+ _hasAgainDestPointIndex = false;
+ _isBraking = false;
+ _isBusy = false;
+ _isIdle = false;
+ _isMoving = false;
+ _rectFlag = false;
+ NextState(&AsCommonCar::stLeanForwardIdle);
+ startAnimation(0x35698F78, 0, -1);
+ setDoDeltaX(doDeltaX ? 1 : 0);
+ _currMoveDirection = 0;
+ _newMoveDirection = 0;
+ _steps = 0;
+ _idleCounter = 0;
+ _idleCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+ SetUpdateHandler(&AsCommonCar::upIdle);
+ SetMessageHandler(&AsCommonCar::handleMessage);
+ FinalizeState(&AsCommonCar::evIdleDone);
+}
+
+void AsCommonCar::updateTurnMovement() {
+ if (_turnMoveStatus == 1) {
+ _lastDistance = 640;
+ _isIdle = false;
+ _isBraking = false;
+ SetSpriteUpdate(&AsCommonCar::suMoveToNextPoint);
+ } else if (_turnMoveStatus == 2) {
+ _lastDistance = 640;
+ _isIdle = false;
+ _isBraking = false;
+ SetSpriteUpdate(&AsCommonCar::suMoveToPrevPoint);
+ }
+}
+
+void AsCommonCar::updateMovement() {
+ if (_isBraking && !_isIdle && !_isBusy) {
+ gotoNextState();
+ _isMoving = false;
+ _isIdle = true;
+ startAnimation(0x192ADD30, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stLeanForwardIdle);
+ } else if (!_isBraking && _steps && _isIdle) {
+ gotoNextState();
+ _isIdle = false;
+ startAnimation(0x9966B138, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stUpdateMoveDirection);
+ } else if (_newMoveDirection != _currMoveDirection && _isMoving && !_isBusy) {
+ gotoNextState();
+ _currMoveDirection = _newMoveDirection;
+ stUpdateMoveDirection();
+ }
+}
+
+void AsCommonCar::stEnterCar() {
+ startAnimation(0xA86A9538, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stLeanForwardIdle);
+}
+
+void AsCommonCar::stLeaveCar() {
+ startAnimation(0xA86A9538, -1, -1);
+ _playBackwards = true;
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmLeaveCar);
+}
+
+void AsCommonCar::stLeanForwardIdle() {
+ startAnimation(0x35698F78, 0, -1);
+ _currMoveDirection = 0;
+ _newMoveDirection = 0;
+ _steps = 0;
+ _idleCounter = 0;
+ _idleCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+ SetUpdateHandler(&AsCommonCar::upIdle);
+ SetMessageHandler(&AsCommonCar::handleMessage);
+ FinalizeState(&AsCommonCar::evIdleDone);
+}
+
+void AsCommonCar::evIdleDone() {
+ SetUpdateHandler(&AsCommonCar::update);
+}
+
+void AsCommonCar::stIdleBlink() {
+ startAnimation(0xB579A77C, 0, -1);
+ _idleCounter = 0;
+ _idleCounterMax = _vm->_rnd->getRandomNumber(64 - 1) + 24;
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stLeanForwardIdle);
+}
+
+void AsCommonCar::stUpdateMoveDirection() {
+ _isMoving = true;
+ if (_currMoveDirection == 1)
+ startAnimation(0xD4AA03A4, 0, -1);
+ else if (_currMoveDirection == 3)
+ startAnimation(0xD00A1364, 0, -1);
+ else if ((_currMoveDirection == 2 && _doDeltaX) || (_currMoveDirection == 4 && !_doDeltaX))
+ stTurnCar();
+ else
+ startAnimation(0xD4220027, 0, -1);
+ setGlobalVar(V_CAR_DELTA_X, _doDeltaX ? 1 : 0);
+}
+
+void AsCommonCar::moveToNextPoint() {
+ if (_currPointIndex >= (int)_pathPoints->size() - 1) {
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2006, 0);
+ } else {
+ NPoint nextPt = pathPoint(_currPointIndex + 1);
+ NPoint currPt = pathPoint(_currPointIndex);
+ if (ABS(nextPt.y - currPt.y) <= ABS(nextPt.x - currPt.x) &&
+ ((_currMoveDirection == 2 && nextPt.x < currPt.x) ||
+ (_currMoveDirection == 4 && nextPt.x >= currPt.x))) {
+ if (_currMoveDirection == 2)
+ _currMoveDirection = 4;
+ else if (_currMoveDirection == 4)
+ _currMoveDirection = 2;
+ if (_isIdle)
+ stTurnCarMoveToNextPoint();
+ else
+ stBrakeMoveToNextPoint();
+ } else {
+ if (_steps == 0) {
+ gotoNextState();
+ _isIdle = false;
+ startAnimation(0x9966B138, 0, -1);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ SetUpdateHandler(&AsCommonCar::update);
+ NextState(&AsCommonCar::stUpdateMoveDirection);
+ }
+ _isBraking = false;
+ SetSpriteUpdate(&AsCommonCar::suMoveToNextPoint);
+ _lastDistance = 640;
+ }
+ }
+}
+
+void AsCommonCar::stBrakeMoveToNextPoint() {
+ gotoNextState();
+ _isBusy = true;
+ _isBraking = true;
+ startAnimation(0x192ADD30, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stTurnCarMoveToNextPoint);
+}
+
+void AsCommonCar::stTurnCar() {
+ // Turn to left/right #1
+ gotoNextState();
+ _isBusy = true;
+ startAnimation(0xF46A0324, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ FinalizeState(&AsCommonCar::evTurnCarDone);
+ _turnMoveStatus = 0;
+ updateTurnMovement();
+}
+
+void AsCommonCar::stTurnCarMoveToNextPoint() {
+ // Turn to left/right #2
+ gotoNextState();
+ _isBusy = true;
+ startAnimation(0xF46A0324, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ FinalizeState(&AsCommonCar::evTurnCarDone);
+ _turnMoveStatus = 1;
+ updateTurnMovement();
+}
+
+void AsCommonCar::stTurnCarMoveToPrevPoint() {
+ // Turn to left/right #3
+ FinalizeState(NULL);
+ _isBusy = true;
+ startAnimation(0xF46A0324, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ FinalizeState(&AsCommonCar::evTurnCarDone);
+ _turnMoveStatus = 2;
+ updateTurnMovement();
+}
+
+void AsCommonCar::moveToPrevPoint() {
+ if (_currPointIndex == 0 && _stepError == 0) {
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2005, 0);
+ } else {
+ NPoint prevPt;
+ NPoint currPt;
+ if (_stepError == 0) {
+ prevPt = pathPoint(_currPointIndex - 1);
+ currPt = pathPoint(_currPointIndex);
+ } else {
+ prevPt = pathPoint(_currPointIndex);
+ currPt = pathPoint(_currPointIndex + 1);
+ }
+ if (ABS(prevPt.y - currPt.y) <= ABS(prevPt.x - currPt.x) &&
+ ((_currMoveDirection == 2 && prevPt.x < currPt.x) ||
+ (_currMoveDirection == 4 && prevPt.x >= currPt.x))) {
+ if (_currMoveDirection == 2)
+ _currMoveDirection = 4;
+ else if (_currMoveDirection == 4)
+ _currMoveDirection = 2;
+ if (_isIdle)
+ stTurnCarMoveToPrevPoint();
+ else
+ stBrakeMoveToPrevPoint();
+ } else {
+ if (_steps == 0) {
+ gotoNextState();
+ _isIdle = false;
+ startAnimation(0x9966B138, 0, -1);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ SetUpdateHandler(&AsCommonCar::update);
+ NextState(&AsCommonCar::stUpdateMoveDirection);
+ }
+ _isBraking = false;
+ SetSpriteUpdate(&AsCommonCar::suMoveToPrevPoint);
+ _lastDistance = 640;
+ }
+ }
+}
+
+void AsCommonCar::stBrakeMoveToPrevPoint() {
+ FinalizeState(NULL);
+ _isBusy = true;
+ _isBraking = true;
+ startAnimation(0x192ADD30, 0, -1);
+ SetUpdateHandler(&AsCommonCar::update);
+ SetMessageHandler(&AsCommonCar::hmAnimation);
+ NextState(&AsCommonCar::stTurnCarMoveToPrevPoint);
+}
+
+void AsCommonCar::evTurnCarDone() {
+ _isBusy = false;
+ setDoDeltaX(2);
+ _newMoveDirection = 0;
+ stUpdateMoveDirection();
+}
+
+void AsCommonCar::suMoveToNextPoint() {
+ int16 newX = _x, newY = _y;
+
+ if (_currPointIndex >= (int)_pathPoints->size()) {
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2006, 0);
+ return;
+ }
+
+ if (_isBraking) {
+ if (_steps <= 0) {
+ sendMessage(this, 0x1019, 0);
+ return;
+ } else
+ _steps--;
+ } else if (_steps < 11)
+ _steps++;
+
+ bool firstTime = true;
+ _ySteps = _steps;
+ int stepsCtr = _steps;
+
+ while (stepsCtr > 0) {
+ NPoint pt1;
+ NPoint pt2 = pathPoint(_currPointIndex);
+ if (_currPointIndex + 1 >= (int)_pathPoints->size())
+ pt1 = pathPoint(0);
+ else
+ pt1 = pathPoint(_currPointIndex + 1);
+ int16 deltaX = ABS(pt1.x - pt2.x);
+ int16 deltaY = ABS(pt1.y - pt2.y);
+ if (deltaX >= deltaY) {
+ _newMoveDirection = 2;
+ if (pt1.x < pt2.x)
+ _newMoveDirection = 4;
+ if (stepsCtr + _stepError >= deltaX) {
+ stepsCtr -= deltaX;
+ stepsCtr += _stepError;
+ _stepError = 0;
+ _currPointIndex++;
+ if (_currPointIndex == (int)_pathPoints->size() - 1)
+ stepsCtr = 0;
+ newX = pathPoint(_currPointIndex).x;
+ newY = pathPoint(_currPointIndex).y;
+ } else {
+ _stepError += stepsCtr;
+ if (pt1.x >= pt2.x)
+ newX += stepsCtr;
+ else
+ newX -= stepsCtr;
+ if (pt1.y >= pt2.y)
+ newY = pt2.y + (deltaY * _stepError) / deltaX;
+ else
+ newY = pt2.y - (deltaY * _stepError) / deltaX;
+ stepsCtr = 0;
+ }
+ } else {
+ _newMoveDirection = 3;
+ if (pt1.y < pt2.y)
+ _newMoveDirection = 1;
+ if (firstTime) {
+ if (pt1.y >= pt2.y)
+ stepsCtr += 7;
+ else {
+ stepsCtr -= 4;
+ if (stepsCtr < 0)
+ stepsCtr = 0;
+ }
+ _ySteps = stepsCtr;
+ }
+ if (stepsCtr + _stepError >= deltaY) {
+ stepsCtr -= deltaY;
+ stepsCtr += _stepError;
+ _stepError = 0;
+ _currPointIndex++;
+ if (_currPointIndex == (int)_pathPoints->size() - 1)
+ stepsCtr = 0;
+ newX = pathPoint(_currPointIndex).x;
+ newY = pathPoint(_currPointIndex).y;
+ } else {
+ _stepError += stepsCtr;
+ if (pt1.x >= pt2.x)
+ newX = pt2.x + (deltaX * _stepError) / deltaY;
+ else
+ newX = pt2.x - (deltaX * _stepError) / deltaY;
+ if (pt1.y >= pt2.y)
+ newY += stepsCtr;
+ else
+ newY -= stepsCtr;
+ stepsCtr = 0;
+ }
+ }
+ firstTime = false;
+ }
+
+ if (_yMoveTotalSteps != 0) {
+ _x = newX;
+ _y = newY;
+ _yMoveTotalSteps -= _ySteps;
+ if (_yMoveTotalSteps <= 0) {
+ _isBraking = true;
+ _yMoveTotalSteps = 0;
+ }
+ } else {
+ int distance = calcDistance(_destX, _destY, _x, _y);
+ _x = newX;
+ _y = newY;
+ if (newX > 20 && newX < 620 && newY > 20 && newY < 460) {
+ _exitDirection = 0;
+ _inMainArea = true;
+ } else if (_inMainArea) {
+ _destX = pathPoint(_pathPoints->size() - 1).x;
+ _destY = pathPoint(_pathPoints->size() - 1).y;
+ _inMainArea = false;
+ if (_x <= 20)
+ _exitDirection = 1;
+ else if (_x >= 620)
+ _exitDirection = 3;
+ else if (_y <= 20)
+ _exitDirection = 2;
+ else if (_y >= 460)
+ _exitDirection = 4;
+ if (_exitDirection != 0 && _isBraking) {
+ _isBraking = false;
+ _steps = 11;
+ }
+ }
+ if ((distance < 20 && _exitDirection == 0 && _lastDistance < distance) ||
+ (_exitDirection == 0 && _lastDistance + 20 < distance))
+ _isBraking = true;
+ if (distance < _lastDistance)
+ _lastDistance = distance;
+ if (_currPointIndex == (int)_pathPoints->size() - 1) {
+ _isBraking = true;
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2006, 0);
+ }
+ }
+
+}
+
+void AsCommonCar::suMoveToPrevPoint() {
+ int16 newX = _x, newY = _y;
+
+ if (_currPointIndex == 0 && _stepError == 0) {
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2005, 0);
+ return;
+ }
+
+ if (_isBraking) {
+ if (_steps <= 0) {
+ sendMessage(this, 0x1019, 0);
+ return;
+ } else
+ _steps--;
+ } else if (_steps < 11)
+ _steps++;
+
+ bool firstTime = true;
+ _ySteps = _steps;
+ int stepsCtr = _steps;
+
+ while (stepsCtr > 0) {
+ if (_stepError == 0)
+ _currPointIndex--;
+ NPoint pt1;
+ NPoint pt2 = pathPoint(_currPointIndex);
+ if (_currPointIndex + 1 >= (int)_pathPoints->size())
+ pt1 = pathPoint(0);
+ else
+ pt1 = pathPoint(_currPointIndex + 1);
+ int16 deltaX = ABS(pt1.x - pt2.x);
+ int16 deltaY = ABS(pt1.y - pt2.y);
+ if (deltaX >= deltaY) {
+ _newMoveDirection = 4;
+ if (pt1.x < pt2.x)
+ _newMoveDirection = 2;
+ if (_stepError == 0)
+ _stepError = deltaX;
+ if (stepsCtr > _stepError) {
+ stepsCtr -= _stepError;
+ _stepError = 0;
+ if (_currPointIndex == 0)
+ stepsCtr = 0;
+ newX = pathPoint(_currPointIndex).x;
+ newY = pathPoint(_currPointIndex).y;
+ } else {
+ _stepError -= stepsCtr;
+ if (pt1.x >= pt2.x)
+ newX -= stepsCtr;
+ else
+ newX += stepsCtr;
+ if (pt1.y >= pt2.y)
+ newY = pt2.y + (deltaY * _stepError) / deltaX;
+ else
+ newY = pt2.y - (deltaY * _stepError) / deltaX;
+ stepsCtr = 0;
+ }
+ } else {
+ _newMoveDirection = 1;
+ if (pt1.y < pt2.y)
+ _newMoveDirection = 3;
+ if (firstTime) {
+ if (pt1.y >= pt2.y) {
+ stepsCtr -= 4;
+ if (stepsCtr < 0)
+ stepsCtr = 0;
+ } else {
+ stepsCtr += 7;
+ }
+ _ySteps = stepsCtr;
+ }
+ if (_stepError == 0)
+ _stepError = deltaY;
+ if (stepsCtr > _stepError) {
+ stepsCtr -= _stepError;
+ _stepError = 0;
+ if (_currPointIndex == 0)
+ stepsCtr = 0;
+ newX = pathPoint(_currPointIndex).x;
+ newY = pathPoint(_currPointIndex).y;
+ } else {
+ _stepError -= stepsCtr;
+ if (pt1.x >= pt2.x)
+ newX = pt2.x + (deltaX * _stepError) / deltaY;
+ else
+ newX = pt2.x - (deltaX * _stepError) / deltaY;
+ if (pt1.y >= pt2.y)
+ newY -= stepsCtr;
+ else
+ newY += stepsCtr;
+ stepsCtr = 0;
+ }
+ }
+ firstTime = false;
+ }
+
+ if (_yMoveTotalSteps != 0) {
+ _x = newX;
+ _y = newY;
+ _yMoveTotalSteps -= _ySteps;
+ if (_yMoveTotalSteps <= 0) {
+ _isBraking = true;
+ _yMoveTotalSteps = 0;
+ }
+ } else {
+ int distance = calcDistance(_destX, _destY, _x, _y);
+ _x = newX;
+ _y = newY;
+ if (newX > 20 && newX < 620 && newY > 20 && newY < 460) {
+ _exitDirection = 0;
+ _inMainArea = true;
+ } else if (_inMainArea) {
+ _destX = pathPoint(0).x;
+ _destY = pathPoint(0).y;
+ _inMainArea = false;
+ if (_x <= 20)
+ _exitDirection = 1;
+ else if (_x >= 620)
+ _exitDirection = 3;
+ else if (_y <= 20)
+ _exitDirection = 2;
+ else if (_y >= 460)
+ _exitDirection = 4;
+ if (_exitDirection != 0 && _isBraking) {
+ _isBraking = false;
+ _steps = 11;
+ }
+ }
+ if ((distance < 20 && _exitDirection == 0 && _lastDistance < distance) ||
+ (_exitDirection == 0 && _lastDistance + 20 < distance))
+ _isBraking = true;
+ if (distance < _lastDistance)
+ _lastDistance = distance;
+ if (_currPointIndex == 0 && _stepError == 0) {
+ _isBraking = true;
+ _yMoveTotalSteps = 0;
+ sendMessage(this, 0x1019, 0);
+ sendMessage(_parentScene, 0x2005, 0);
+ }
+ }
+
+}
+
+void AsCommonCar::updateSound() {
+ int maxSoundCounter = 0;
+ _soundCounter++;
+ if (_steps != 0 && !_isIdle) {
+ if (_currMoveDirection == 1)
+ maxSoundCounter = 18 - _steps;
+ else if (_currMoveDirection == 3) {
+ maxSoundCounter = 5 - _steps;
+ if (maxSoundCounter < 1)
+ maxSoundCounter = 1;
+ } else
+ maxSoundCounter = 14 - _steps;
+ } else
+ maxSoundCounter = 21;
+ if (_soundCounter >= maxSoundCounter) {
+ sendMessage(_parentScene, 0x200D, 0);
+ _soundCounter = 0;
+ }
+}
+
+AsCommonIdleCarLower::AsCommonIdleCarLower(NeverhoodEngine *vm, int16 x, int16 y)
+ : AnimatedSprite(vm, 0x1209E09F, 1100, x, y) {
+
+ setDoDeltaX(1);
+ startAnimation(0x1209E09F, 1, -1);
+ _newStickFrameIndex = 1;
+}
+
+AsCommonIdleCarFull::AsCommonIdleCarFull(NeverhoodEngine *vm, int16 x, int16 y)
+ : AnimatedSprite(vm, 0x1209E09F, 100, x, y) {
+
+ setDoDeltaX(1);
+ _newStickFrameIndex = 0;
+}
+
+AsCommonCarConnector::AsCommonCarConnector(NeverhoodEngine *vm, AsCommonCar *asCar)
+ : AnimatedSprite(vm, 1100), _asCar(asCar) {
+
+ createSurface1(0x60281C10, 150);
+ startAnimation(0x60281C10, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ SetUpdateHandler(&AsCommonCarConnector::update);
+}
+
+void AsCommonCarConnector::update() {
+ _x = _asCar->getX();
+ _y = _asCar->getY();
+ AnimatedSprite::update();
+}
+
+void Tracks::findTrackPoint(NPoint pt, int &minMatchTrackIndex, int &minMatchDistance,
+ DataResource &dataResource) {
+ const uint trackCount = size();
+ minMatchTrackIndex = -1;
+ minMatchDistance = 640;
+ for (uint trackIndex = 0; trackIndex < trackCount; trackIndex++) {
+ NPointArray *pointList = dataResource.getPointArray((*this)[trackIndex]->trackPointsName);
+ for (uint pointIndex = 0; pointIndex < pointList->size(); pointIndex++) {
+ NPoint testPt = (*pointList)[pointIndex];
+ int distance = calcDistance(testPt.x, testPt.y, pt.x, pt.y);
+ if (distance < minMatchDistance) {
+ minMatchTrackIndex = trackIndex;
+ minMatchDistance = distance;
+ }
+ }
+ }
+}
+
+Scene1608::Scene1608(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _asCar(NULL), _countdown1(0) {
+
+ setGlobalVar(V_CAR_DELTA_X, 1);
+
+ SetMessageHandler(&Scene1608::hmLowerFloor);
+
+ _asKey = insertSprite<AsCommonKey>(this, 1, 1100, 198, 220);
+ addCollisionSprite(_asKey);
+
+ if (which < 0) {
+ // Restoring game
+ if (_vm->gameState().which == 1)
+ // Klaymen is in the car
+ which = 1;
+ else {
+ // Klaymen is standing around
+ setRectList(0x004B47D0);
+ insertKlaymen<KmScene1608>(380, 438);
+ _kmScene1608 = _klaymen;
+ _klaymenInCar = false;
+ _sprite1 = insertStaticSprite(0x7D0404E8, 1100);
+ setMessageList(0x004B46A8);
+ setBackground(0x10080E01);
+ setPalette(0x10080E01);
+ _asTape = insertSprite<AsScene1201Tape>(this, 13, 1100, 412, 443, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+ SetUpdateHandler(&Scene1608::upLowerFloor);
+ insertScreenMouse(0x80E05108);
+ insertStaticSprite(0x4B18F868, 1200);
+ }
+ } else if (which == 0) {
+ // Klaymen entering from the left
+ _vm->gameState().which = 0;
+ setRectList(0x004B47D0);
+ insertKlaymen<KmScene1608>(0, 438);
+ _kmScene1608 = _klaymen;
+ _klaymenInCar = false;
+ setMessageList(0x004B46B0);
+ setBackground(0x10080E01);
+ setPalette(0x10080E01);
+ _asTape = insertSprite<AsScene1201Tape>(this, 13, 1100, 412, 443, 0x9148A011);
+ addCollisionSprite(_asTape);
+ insertScreenMouse(0x80E05108);
+ _sprite1 = insertStaticSprite(0x7D0404E8, 1100);
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, 640, 480);
+ SetUpdateHandler(&Scene1608::upLowerFloor);
+ insertStaticSprite(0x4B18F868, 1200);
+ } else if (which == 2) {
+ // Klaymen returning from looking through the upper window
+ _vm->gameState().which = 1;
+ _dataResource.load(0x003C0492);
+ _roomPathPoints = _dataResource.getPointArray(calcHash("meArchroArchRoomPath"));
+ setBackground(0x98001604);
+ setPalette(0x98001604);
+ _palette->addPalette("paPodRed", 65, 31, 65);
+ insertScreenMouse(0x01600988);
+ _sprite2 = insertStaticSprite(0x491F38A8, 1100);
+ _asCar = createSprite<AsCommonCar>(this, 375, 227); // Create but don't add to the sprite list yet
+ _asIdleCarLower = insertSprite<AsCommonIdleCarLower>(375, 227);
+ _asIdleCarFull = insertSprite<AsCommonIdleCarFull>(375, 227);
+ _asCar->setVisible(false);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene1608>(373, 220);
+ _klaymen->setDoDeltaX(1);
+ } else
+ insertKlaymen<KmScene1608>(283, 220);
+ _kmScene1608 = _klaymen;
+ setMessageList(0x004B47A8);
+ SetMessageHandler(&Scene1608::hmUpperFloor);
+ SetUpdateHandler(&Scene1608::upUpperFloor);
+ _asCar->setPathPoints(_roomPathPoints);
+ sendMessage(_asCar, 0x2002, _roomPathPoints->size() - 1);
+ _sprite3 = insertStaticSprite(0xB47026B0, 1100);
+ _clipRect1.set(_sprite3->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2());
+ _clipRect3.set(_sprite2->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2());
+ _clipRect2 = _clipRect1;
+ _clipRect2.y2 = 215;
+ _klaymen->setClipRect(_clipRect1);
+ _asCar->setClipRect(_clipRect1);
+ _asIdleCarLower->setClipRect(_clipRect1);
+ _asIdleCarFull->setClipRect(_clipRect1);
+ _asTape = insertSprite<AsScene1201Tape>(this, 13, 1100, 412, 443, 0x9148A011);
+ addCollisionSprite(_asTape);
+ insertSprite<AsCommonCarConnector>(_asCar)->setClipRect(_clipRect1);
+ _klaymenInCar = false;
+ _carClipFlag = false;
+ _carStatus = 0;
+ setRectList(0x004B4810);
+ }
+
+ // NOTE: Not in the else because 'which' is set to 1 in the true branch
+ if (which == 1) {
+ // Klaymen riding the car
+ _vm->gameState().which = 1;
+ _dataResource.load(0x003C0492);
+ _roomPathPoints = _dataResource.getPointArray(calcHash("meArchroArchRoomPath"));
+ setBackground(0x98001604);
+ setPalette(0x98001604);
+ _palette->addPalette("paPodRed", 65, 31, 65);
+ insertScreenMouse(0x01600988);
+ _asCar = insertSprite<AsCommonCar>(this, 375, 227);
+ _asIdleCarLower = insertSprite<AsCommonIdleCarLower>(375, 227);
+ _asIdleCarFull = insertSprite<AsCommonIdleCarFull>(375, 227);
+ _sprite2 = insertStaticSprite(0x491F38A8, 1100);
+ _kmScene1608 = createSprite<KmScene1608>(this, 439, 220);
+ sendMessage(_kmScene1608, 0x2032, 1);
+ _kmScene1608->setDoDeltaX(1);
+ SetMessageHandler(&Scene1608::hmRidingCar);
+ SetUpdateHandler(&Scene1608::upRidingCar);
+ _asIdleCarLower->setVisible(false);
+ _asIdleCarFull->setVisible(false);
+ _asCar->setPathPoints(_roomPathPoints);
+ sendMessage(_asCar, 0x2002, 0);
+ sendMessage(_asCar, 0x2008, 90);
+ _sprite3 = insertStaticSprite(0xB47026B0, 1100);
+ _clipRect1.set(_sprite3->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2());
+ _clipRect3.set(_sprite2->getDrawRect().x, _sprite3->getDrawRect().y, 640, _sprite2->getDrawRect().y2());
+ _clipRect2 = _clipRect1;
+ _clipRect2.y2 = 215;
+ _kmScene1608->setClipRect(_clipRect1);
+ _asCar->setClipRect(_clipRect1);
+ _asIdleCarLower->setClipRect(_clipRect1);
+ _asIdleCarFull->setClipRect(_clipRect1);
+ _asTape = insertSprite<AsScene1201Tape>(this, 13, 1100, 412, 443, 0x9148A011);
+ // ... addCollisionSprite(_asTape);
+ insertSprite<AsCommonCarConnector>(_asCar)->setClipRect(_clipRect1);
+ _klaymenInCar = true;
+ _carClipFlag = true;
+ _carStatus = 0;
+ }
+
+ _palette->addPalette("paKlayRed", 0, 64, 0);
+
+}
+
+Scene1608::~Scene1608() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _kmScene1608->isDoDeltaX() ? 1 : 0);
+ if (_klaymenInCar)
+ delete _kmScene1608;
+ else
+ delete _asCar;
+}
+
+void Scene1608::upLowerFloor() {
+ Scene::update();
+ if (_countdown1 != 0 && (--_countdown1 == 0))
+ leaveScene(0);
+}
+
+void Scene1608::upUpperFloor() {
+ Scene::update();
+ if (_carStatus == 1) {
+ removeSurface(_klaymen->getSurface());
+ removeEntity(_klaymen);
+ addSprite(_asCar);
+ _klaymenInCar = true;
+ clearRectList();
+ SetUpdateHandler(&Scene1608::upCarAtHome);
+ SetMessageHandler(&Scene1608::hmCarAtHome);
+ _asIdleCarLower->setVisible(false);
+ _asIdleCarFull->setVisible(false);
+ _asCar->setVisible(true);
+ sendMessage(_asCar, 0x2009, 0);
+ _asCar->handleUpdate();
+ _klaymen = NULL;
+ _carStatus = 0;
+ }
+ updateKlaymenCliprect();
+}
+
+void Scene1608::upCarAtHome() {
+ Scene::update();
+ if (_mouseClicked) {
+ if (_mouseClickPos.x <= 329 && _asCar->getX() == 375 && _asCar->getY() == 227) {
+ sendMessage(_asCar, 0x200A, 0);
+ SetUpdateHandler(&Scene1608::upGettingOutOfCar);
+ } else {
+ sendPointMessage(_asCar, 0x2004, _mouseClickPos);
+ SetMessageHandler(&Scene1608::hmRidingCar);
+ SetUpdateHandler(&Scene1608::upRidingCar);
+ }
+ _mouseClicked = false;
+ }
+ updateKlaymenCliprect();
+}
+
+void Scene1608::upGettingOutOfCar() {
+ Scene::update();
+ if (_carStatus == 2) {
+ _klaymen = _kmScene1608;
+ removeSurface(_asCar->getSurface());
+ removeEntity(_asCar);
+ addSprite(_klaymen);
+ _klaymenInCar = false;
+ SetMessageHandler(&Scene1608::hmUpperFloor);
+ SetUpdateHandler(&Scene1608::upUpperFloor);
+ setRectList(0x004B4810);
+ _asIdleCarLower->setVisible(true);
+ _asIdleCarFull->setVisible(true);
+ _asCar->setVisible(false);
+ setMessageList(0x004B4748);
+ processMessageList();
+ _klaymen->handleUpdate();
+ _carStatus = 0;
+ }
+ updateKlaymenCliprect();
+}
+
+void Scene1608::upRidingCar() {
+ Scene::update();
+ if (_mouseClicked) {
+ sendPointMessage(_asCar, 0x2004, _mouseClickPos);
+ _mouseClicked = false;
+ }
+ if (_asCar->getX() < 300) {
+ if (_carClipFlag) {
+ _carClipFlag = false;
+ _asCar->setClipRect(_clipRect1);
+ if (!_asCar->isDoDeltaX())
+ sendMessage(_asCar, 0x200E, 0);
+ }
+ } else if (!_carClipFlag) {
+ _carClipFlag = true;
+ _asCar->setClipRect(_clipRect3);
+ }
+}
+
+uint32 Scene1608::hmLowerFloor(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x20250B1A) {
+ clearRectList();
+ _klaymen->setVisible(false);
+ showMouse(false);
+ _sprite1->setVisible(false);
+ //sendMessage(_asDoor, 0x4809, 0); // Play sound?
+ _countdown1 = 28;
+ }
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_kmScene1608, 0x1014, _asTape);
+ setMessageList(0x004B4770);
+ } else if (sender == _asKey)
+ setMessageList(0x004B46C8);
+ break;
+ }
+ return 0;
+}
+
+uint32 Scene1608::hmUpperFloor(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x60842040)
+ _carStatus = 1;
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ case 0x4826:
+ if (sender == _asKey) {
+ sendEntityMessage(_kmScene1608, 0x1014, _asKey);
+ setMessageList(0x004B4760);
+ }
+ break;
+ }
+ return 0;
+}
+
+uint32 Scene1608::hmRidingCar(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2005:
+ leaveScene(1);
+ break;
+ case 0x2006:
+ SetMessageHandler(&Scene1608::hmCarAtHome);
+ SetUpdateHandler(&Scene1608::upCarAtHome);
+ sendMessage(_asCar, 0x200F, 1);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+uint32 Scene1608::hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x200A:
+ _carStatus = 2;
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+void Scene1608::updateKlaymenCliprect() {
+ if (_kmScene1608->getX() <= 375)
+ _kmScene1608->setClipRect(_clipRect1);
+ else
+ _kmScene1608->setClipRect(_clipRect2);
+}
+
+Scene1609::Scene1609(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _countdown1(1), _currentSymbolIndex(0), _symbolPosition(0), _changeCurrentSymbol(true), _isSolved(false) {
+
+ _vm->gameModule()->initCodeSymbolsPuzzle();
+ _noisySymbolIndex = getGlobalVar(V_NOISY_SYMBOL_INDEX);
+
+ SetMessageHandler(&Scene1609::handleMessage);
+ SetUpdateHandler(&Scene1609::update);
+
+ setBackground(0x92124A14);
+ setPalette(0x92124A14);
+ insertPuzzleMouse(0x24A10929, 20, 620);
+
+ for (int symbolPosition = 0; symbolPosition < 12; symbolPosition++)
+ _asSymbols[symbolPosition] = insertSprite<AsScene3011Symbol>(symbolPosition, false);
+
+ _ssButton = insertSprite<SsScene3011Button>(this, true);
+ addCollisionSprite(_ssButton);
+ loadSound(0, 0x68E25540);
+
+}
+
+void Scene1609::update() {
+ if (!_isSolved && _countdown1 != 0 && (--_countdown1 == 0)) {
+ if (_changeCurrentSymbol) {
+ _currentSymbolIndex++;
+ if (_currentSymbolIndex >= 12)
+ _currentSymbolIndex = 0;
+ _asSymbols[_symbolPosition]->change(_currentSymbolIndex + 12, _currentSymbolIndex == (int)getSubVar(VA_CODE_SYMBOLS, _noisySymbolIndex));
+ _changeCurrentSymbol = false;
+ _countdown1 = 36;
+ } else {
+ _asSymbols[_symbolPosition]->hide();
+ _changeCurrentSymbol = true;
+ _countdown1 = 12;
+ }
+ }
+ if (_isSolved && !isSoundPlaying(0))
+ leaveScene(1);
+ Scene::update();
+}
+
+uint32 Scene1609::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ case 0x2000:
+ if (!_isSolved) {
+ if (_changeCurrentSymbol)
+ _asSymbols[_symbolPosition]->change(_currentSymbolIndex + 12, false);
+ _asSymbols[_symbolPosition]->stopSymbolSound();
+ _symbolPosition++;
+ if (_symbolPosition >= 12) {
+ if (testVars()) {
+ playSound(0);
+ setGlobalVar(V_CODE_SYMBOLS_SOLVED, 1);
+ _isSolved = true;
+ } else {
+ _symbolPosition = 0;
+ for (int i = 0; i < 12; i++)
+ _asSymbols[i]->hide();
+ }
+ }
+ _changeCurrentSymbol = true;
+ _countdown1 = 1;
+ }
+ break;
+ }
+ return 0;
+}
+
+bool Scene1609::testVars() {
+ int cmpSymbolIndex = 0;
+
+ // Find the position of the first symbol
+ while ((int)getSubVar(VA_CODE_SYMBOLS, cmpSymbolIndex) != _asSymbols[0]->getSymbolIndex())
+ cmpSymbolIndex++;
+
+ // Check if the entered symbols match
+ for (int enteredSymbolIndex = 0; enteredSymbolIndex < 12; enteredSymbolIndex++) {
+ if ((int)getSubVar(VA_CODE_SYMBOLS, cmpSymbolIndex) != _asSymbols[enteredSymbolIndex]->getSymbolIndex())
+ return false;
+ cmpSymbolIndex++;
+ if (cmpSymbolIndex >= 12)
+ cmpSymbolIndex = 0;
+ }
+
+ return true;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1600.h b/engines/neverhood/modules/module1600.h
new file mode 100644
index 0000000000..5f0da528ab
--- /dev/null
+++ b/engines/neverhood/modules/module1600.h
@@ -0,0 +1,185 @@
+/* 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 NEVERHOOD_MODULES_MODULE1600_H
+#define NEVERHOOD_MODULES_MODULE1600_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/console.h"
+#include "neverhood/modules/module3000.h"
+
+namespace Neverhood {
+
+// Module1600
+
+class Module1600 : public Module {
+public:
+ Module1600(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1600();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+class AsCommonCar : public AnimatedSprite {
+public:
+ AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y);
+ ~AsCommonCar();
+ void setPathPoints(NPointArray *pathPoints);
+protected:
+ Scene *_parentScene;
+ NPointArray *_pathPoints;
+ int _newMoveDirection;
+ int _currMoveDirection;
+ int _exitDirection;
+ int _currPointIndex;
+ bool _hasAgainDestPoint;
+ NPoint _againDestPoint;
+ bool _hasAgainDestPointIndex;
+ int _againDestPointIndex;
+ bool _inMainArea;
+ bool _isBraking;
+ bool _isBusy;
+ bool _isIdle;
+ bool _isMoving;
+ bool _rectFlag;
+ int _idleCounter;
+ int _idleCounterMax;
+ int _steps;
+ int _stepError;
+ int _lastDistance;
+ int _yMoveTotalSteps;
+ int _ySteps;
+ int _newDeltaXType;
+ int _soundCounter;
+ int _turnMoveStatus;
+ int16 _destX, _destY;
+ NPoint pathPoint(uint index) { return (*_pathPoints)[index]; }
+ void update();
+ void upIdle();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmLeaveCar(int messageNum, const MessageParam &param, Entity *sender);
+ void stCarAtHome();
+ void updateTurnMovement();
+ void updateMovement();
+ void stEnterCar();
+ void stLeaveCar();
+ void stLeanForwardIdle();
+ void evIdleDone();
+ void stIdleBlink();
+ void stUpdateMoveDirection();
+ void stTurnCar();
+ void moveToNextPoint();
+ void stBrakeMoveToNextPoint();
+ void stTurnCarMoveToNextPoint();
+ void moveToPrevPoint();
+ void stBrakeMoveToPrevPoint();
+ void stTurnCarMoveToPrevPoint();
+ void evTurnCarDone();
+ void suMoveToNextPoint();
+ void suMoveToPrevPoint();
+ void updateSound();
+};
+
+class AsCommonIdleCarLower : public AnimatedSprite {
+public:
+ AsCommonIdleCarLower(NeverhoodEngine *vm, int16 x, int16 y);
+};
+
+class AsCommonIdleCarFull : public AnimatedSprite {
+public:
+ AsCommonIdleCarFull(NeverhoodEngine *vm, int16 x, int16 y);
+};
+
+class AsCommonCarConnector : public AnimatedSprite {
+public:
+ AsCommonCarConnector(NeverhoodEngine *vm, AsCommonCar *asCar);
+protected:
+ AsCommonCar *_asCar;
+ void update();
+};
+
+class Tracks : public Common::Array<TrackInfo*> {
+public:
+ void findTrackPoint(NPoint pt, int &minMatchTrackIndex, int &minMatchDistance,
+ DataResource &dataResource);
+};
+
+class Scene1608 : public Scene {
+public:
+ Scene1608(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene1608();
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_asKey;
+ Sprite *_asIdleCarLower;
+ Sprite *_asIdleCarFull;
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_asTape;
+ Klaymen *_kmScene1608;
+ NRect _clipRect1;
+ NRect _clipRect2;
+ NRect _clipRect3;
+ int _carStatus;
+ bool _carClipFlag;
+ bool _klaymenInCar;
+ int _countdown1;
+ NPointArray *_roomPathPoints;
+ void upLowerFloor();
+ void upUpperFloor();
+ void upCarAtHome();
+ void upGettingOutOfCar();
+ void upRidingCar();
+ uint32 hmLowerFloor(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmUpperFloor(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRidingCar(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender);
+ void updateKlaymenCliprect();
+};
+
+class Scene1609 : public Scene {
+ friend class Console;
+public:
+ Scene1609(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ Sprite *_ssButton;
+ AsScene3011Symbol *_asSymbols[12];
+ int _currentSymbolIndex;
+ int _noisySymbolIndex;
+ int _symbolPosition;
+ int _countdown1;
+ bool _changeCurrentSymbol;
+ bool _isSolved;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ bool testVars();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1600_H */
diff --git a/engines/neverhood/modules/module1700.cpp b/engines/neverhood/modules/module1700.cpp
new file mode 100644
index 0000000000..38ed561d51
--- /dev/null
+++ b/engines/neverhood/modules/module1700.cpp
@@ -0,0 +1,279 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/modules/module1700.h"
+#include "neverhood/gamemodule.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1700SoundList[] = {
+ 0xB288D450,
+ 0x90804450,
+ 0x99801500,
+ 0xB288D455,
+ 0x93825040,
+ 0
+};
+
+Module1700::Module1700(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x04212331, 0x31114225);
+ _vm->_soundMan->addSoundList(0x04212331, kModule1700SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1700SoundList, true, 50, 600, 5, 150);
+ _vm->_soundMan->playTwoSounds(0x04212331, 0x41861371, 0x43A2507F, 0);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 0)
+ createScene(0, -1);
+ else if (which == 1)
+ createScene(4, 1);
+ else
+ createScene(4, 3);
+
+}
+
+Module1700::~Module1700() {
+ _vm->_soundMan->deleteGroup(0x04212331);
+}
+
+void Module1700::createScene(int sceneNum, int which) {
+ debug(1, "Module1700::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->setSoundListParams(kModule1700SoundList, false, 0, 0, 0, 0);
+ createSmackerScene(0x3028A005, true, true, false);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(0x004AE8B8, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ createNavigationScene(0x004AE8E8, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->_soundMan->setSoundListParams(kModule1700SoundList, false, 0, 0, 0, 0);
+ createSmackerScene(0x01190041, true, true, false);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->setSoundListParams(kModule1700SoundList, false, 0, 0, 0, 0);
+ _vm->_soundMan->startMusic(0x31114225, 0, 2);
+ _childObject = new Scene1705(_vm, this, which);
+ break;
+ }
+ SetUpdateHandler(&Module1700::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1700::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ _vm->_soundMan->setSoundListParams(kModule1700SoundList, true, 0, 0, 0, 0);
+ createScene(1, 0);
+ break;
+ case 1:
+ if (_moduleResult == 0)
+ createScene(2, 0);
+ else if (_moduleResult == 1)
+ createScene(1, 1);
+ break;
+ case 2:
+ if (_moduleResult == 0)
+ createScene(3, -1);
+ else if (_moduleResult == 1)
+ createScene(1, 1);
+ else if (_moduleResult == 2) {
+ if (!isSoundPlaying(0)) {
+ setSoundVolume(0, 60);
+ playSound(0, 0x58B45E58);
+ }
+ createScene(2, 2);
+ }
+ break;
+ case 3:
+ createScene(4, 0);
+ break;
+ case 4:
+ leaveModule(1);
+ break;
+ }
+ }
+}
+
+// Scene1705
+
+static const uint32 kScene1705FileHashes[] = {
+ 0x910EA801, 0x920EA801, 0x940EA801,
+ 0x980EA801, 0x800EA801, 0xB00EA801,
+ 0xD00EA801, 0x100EA801, 0x900EA800,
+ 0xD10EA801, 0x110EA801, 0x910EA800
+};
+
+SsScene1705WallSymbol::SsScene1705WallSymbol(NeverhoodEngine *vm, uint32 fileHash, int symbolIndex)
+ : StaticSprite(vm, fileHash, 100) {
+
+ _x = _spriteResource.getPosition().x + symbolIndex * 30;
+ _y = _spriteResource.getPosition().y + 160;
+ updatePosition();
+}
+
+SsScene1705Tape::SsScene1705Tape(NeverhoodEngine *vm, Scene *parentScene, uint32 tapeIndex, int surfacePriority, int16 x, int16 y, uint32 fileHash)
+ : StaticSprite(vm, fileHash, surfacePriority, x - 24, y - 4), _parentScene(parentScene), _tapeIndex(tapeIndex) {
+
+ if (!getSubVar(VA_HAS_TAPE, _tapeIndex) && !getSubVar(VA_IS_TAPE_INSERTED, _tapeIndex)) {
+ SetMessageHandler(&SsScene1705Tape::handleMessage);
+ } else {
+ setVisible(false);
+ SetMessageHandler(NULL);
+ }
+ _collisionBoundsOffset = _drawOffset;
+ _collisionBoundsOffset.x -= 4;
+ _collisionBoundsOffset.y -= 8;
+ _collisionBoundsOffset.width += 8;
+ _collisionBoundsOffset.height += 16;
+ Sprite::updateBounds();
+}
+
+uint32 SsScene1705Tape::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setSubVar(VA_HAS_TAPE, _tapeIndex, 1);
+ setVisible(false);
+ SetMessageHandler(NULL);
+ break;
+ }
+ return messageResult;
+}
+
+Scene1705::Scene1705(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _paletteArea(1) {
+
+ Sprite *tempSprite;
+
+ setGlobalVar(V_FELL_DOWN_HOLE, 1);
+ _vm->gameModule()->initCannonSymbolsPuzzle();
+
+ SetMessageHandler(&Scene1705::handleMessage);
+ SetUpdateHandler(&Scene1705::update);
+
+ setHitRects(0x004B69D8);
+ setBackground(0x03118226);
+ setPalette(0x03118226);
+ _palette->addBasePalette(0x91D3A391, 0, 64, 0);
+ _palette->copyBasePalette(0, 256, 0);
+ addEntity(_palette);
+ insertScreenMouse(0x18222039);
+
+ insertSprite<SsScene1705WallSymbol>(kScene1705FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_2, 0)], 0);
+ insertSprite<SsScene1705WallSymbol>(kScene1705FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_2, 1)], 1);
+ insertSprite<SsScene1705WallSymbol>(kScene1705FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_2, 2)], 2);
+ _sprite = insertStaticSprite(0x31313A22, 1100);
+ _ssTape = insertSprite<SsScene1705Tape>(this, 15, 1100, 238, 439, 0x02363852);
+ addCollisionSprite(_ssTape);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1705>(231, 434);
+ setMessageList(0x004B69E8);
+ sendMessage(this, 0x2000, 0);
+ _klaymen->setClipRect(0, 0, _sprite->getDrawRect().x2(), 480);
+ } else if (which == 1) {
+ // Klaymen teleporting in
+ insertKlaymen<KmScene1705>(431, 434);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6A08, false);
+ sendMessage(this, 0x2000, 1);
+ _klaymen->setClipRect(0, 0, _sprite->getDrawRect().x2(), 480);
+ } else if (which == 2) {
+ // Klaymen teleporting out
+ insertKlaymen<KmScene1705>(431, 434);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6AA0, false);
+ sendMessage(this, 0x2000, 1);
+ _klaymen->setClipRect(0, 0, _sprite->getDrawRect().x2(), 480);
+ } else if (which == 3) {
+ // Klaymen returning from teleporter console
+ insertKlaymen<KmScene1705>(431, 434);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B6A18, false);
+ sendMessage(this, 0x2000, 1);
+ _klaymen->setClipRect(0, 0, _sprite->getDrawRect().x2(), 480);
+ } else {
+ // Klaymen falling through the hole
+ insertKlaymen<KmScene1705>(231, 74);
+ sendMessage(_klaymen, 0x2000, 0);
+ setMessageList(0x004B69F0);
+ sendMessage(this, 0x2000, 0);
+ tempSprite = insertStaticSprite(0x30303822, 1100);
+ _klaymen->setClipRect(0, tempSprite->getDrawRect().y, _sprite->getDrawRect().x2(), 480);
+ }
+
+}
+
+void Scene1705::update() {
+ Scene::update();
+ if (_klaymen->getX() < 224 && _paletteArea != 0) {
+ _palette->addBasePalette(0xF2210C15, 0, 64, 0);
+ _palette->startFadeToPalette(12);
+ _paletteArea = 0;
+ } else if (_klaymen->getX() >= 224 && _paletteArea == 0) {
+ _palette->addBasePalette(0x91D3A391, 0, 64, 0);
+ _palette->startFadeToPalette(12);
+ _paletteArea = 1;
+ }
+}
+
+uint32 Scene1705::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (param.asInteger()) {
+ setRectList(0x004B6B40);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004B6B30);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ break;
+ case 0x4826:
+ if (sender == _ssTape && _klaymen->getX() <= 318) {
+ sendEntityMessage(_klaymen, 0x1014, sender);
+ setMessageList(0x004B6AC0);
+ }
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1700.h b/engines/neverhood/modules/module1700.h
new file mode 100644
index 0000000000..f57c411a18
--- /dev/null
+++ b/engines/neverhood/modules/module1700.h
@@ -0,0 +1,72 @@
+/* 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 NEVERHOOD_MODULES_MODULE1700_H
+#define NEVERHOOD_MODULES_MODULE1700_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/smackerscene.h"
+
+namespace Neverhood {
+
+class Module1700 : public Module {
+public:
+ Module1700(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1700();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1705
+
+class SsScene1705WallSymbol : public StaticSprite {
+public:
+ SsScene1705WallSymbol(NeverhoodEngine *vm, uint32 fileHash, int symbolIndex);
+};
+
+class SsScene1705Tape : public StaticSprite {
+public:
+ SsScene1705Tape(NeverhoodEngine *vm, Scene *parentScene, uint32 tapeIndex, int surfacePriority, int16 x, int16 y, uint32 fileHash);
+protected:
+ Scene *_parentScene;
+ uint32 _tapeIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1705 : public Scene {
+public:
+ Scene1705(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite;
+ Sprite *_ssTape;
+ int _paletteArea;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1700_H */
diff --git a/engines/neverhood/modules/module1800.cpp b/engines/neverhood/modules/module1800.cpp
new file mode 100644
index 0000000000..b7371c9a4a
--- /dev/null
+++ b/engines/neverhood/modules/module1800.cpp
@@ -0,0 +1,181 @@
+/* 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 "neverhood/modules/module1800.h"
+#include "neverhood/navigationscene.h"
+#include "neverhood/menumodule.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1800SoundList[] = {
+ 0x16805548,
+ 0x16805048,
+ 0xD0E14441,
+ 0x90E090C2,
+ 0x90E1D0C2,
+ 0x90E2D0C2,
+ 0
+};
+
+Module1800::Module1800(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addSoundList(0x04A14718, kModule1800SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1800SoundList, true, 50, 600, 10, 150);
+ _vm->_soundMan->playTwoSounds(0x04A14718, 0x8A382B55, 0x0C242F1D, 0);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 2)
+ createScene(5, 0);
+ else if (which == 3)
+ createScene(0, 0);
+ else
+ createScene(3, 1);
+
+}
+
+Module1800::~Module1800() {
+ _vm->_soundMan->deleteGroup(0x04A14718);
+}
+
+void Module1800::createScene(int sceneNum, int which) {
+ static const byte kNavigationTypes00[] = {1, 0, 2, 0};
+ static const byte kNavigationTypes01[] = {5};
+ debug(1, "Module1800::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ createNavigationScene(0x004AFD38, which, kNavigationTypes00);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(0x004AFD98, which, kNavigationTypes01);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ createSmackerScene(0x006C0085, true, true, false);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ createNavigationScene(0x004AFDB0, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ createNavigationScene(0x004AFDE0, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ createNavigationScene(0x004AFE40, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->deleteGroup(0x04A14718);
+ createSmackerScene(0x08D84010, true, true, false);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->_soundMan->setSoundListParams(kModule1800SoundList, false, 0, 0, 0, 0);
+ createSmackerScene(0x0168B121, true, true, false);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new CreditsScene(_vm, this, false);
+ break;
+ case 1009:
+ _vm->gameState().sceneNum = 3;
+ // NOTE: Newly introduced sceneNum 1009 (was duplicate 3 with own update handler)
+ createSmackerScene(0x0A840C01, true, true, false);
+ break;
+ }
+ SetUpdateHandler(&Module1800::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1800::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else if (_moduleResult == 2)
+ createScene(1, -1);
+ else if (_moduleResult == 3)
+ createScene(3, 0);
+ break;
+ case 1:
+ if (_navigationAreaType == 3)
+ createScene(7, -1);
+ else
+ createScene(2, -1);
+ break;
+ case 2:
+ createScene(0, 2);
+ break;
+ case 3:
+ if (_moduleResult == 0)
+ createScene(1009, -1);
+ else if (_moduleResult == 1)
+ createScene(0, 1);
+ break;
+ case 4:
+ if (_moduleResult == 0)
+ createScene(6, -1);
+ else if (_moduleResult == 1)
+ createScene(5, 0);
+ else if (_moduleResult == 2)
+ createScene(0, 3);
+ else if (_moduleResult == 3)
+ createScene(4, 3);
+ break;
+ case 5:
+ if (_moduleResult == 0)
+ leaveModule(2);
+ else if (_moduleResult == 1)
+ createScene(4, 3);
+ break;
+ case 6:
+ createScene(8, -1);
+ break;
+ case 7:
+ leaveModule(3);
+ break;
+ case 8:
+ // NOTE: After Klaymen jumped into the hole and died...
+ leaveModule(1);
+ break;
+ case 1009:
+ leaveModule(0);
+ break;
+ }
+ } else {
+ switch (_sceneNum) {
+ case 0:
+ if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 2)
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ break;
+ }
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1800.h b/engines/neverhood/modules/module1800.h
new file mode 100644
index 0000000000..d3f3a635c3
--- /dev/null
+++ b/engines/neverhood/modules/module1800.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 NEVERHOOD_MODULES_MODULE1800_H
+#define NEVERHOOD_MODULES_MODULE1800_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module1800
+
+class Module1800 : public Module {
+public:
+ Module1800(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1800();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1800_H */
diff --git a/engines/neverhood/modules/module1900.cpp b/engines/neverhood/modules/module1900.cpp
new file mode 100644
index 0000000000..7f08b01d3f
--- /dev/null
+++ b/engines/neverhood/modules/module1900.cpp
@@ -0,0 +1,650 @@
+/* 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 "neverhood/modules/module1900.h"
+#include "neverhood/gamemodule.h"
+
+namespace Neverhood {
+
+static const uint32 kModule1900SoundList[] = {
+ 0xB4005E60,
+ 0x91835066,
+ 0x90E14440,
+ 0
+};
+
+Module1900::Module1900(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ // NOTE: The original has a Scene1908 here as well but it's not used here but in another module...
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else
+ createScene(0, 0);
+
+ _vm->_soundMan->addSoundList(0x04E1C09C, kModule1900SoundList);
+ _vm->_soundMan->setSoundListParams(kModule1900SoundList, true, 50, 600, 5, 150);
+
+}
+
+Module1900::~Module1900() {
+ _vm->_soundMan->deleteGroup(0x04E1C09C);
+}
+
+void Module1900::createScene(int sceneNum, int which) {
+ debug(1, "Module1900::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1901(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _childObject = new Scene1907(_vm, this);
+ break;
+ }
+ SetUpdateHandler(&Module1900::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module1900::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(6, 0);
+ else
+ leaveModule(0);
+ break;
+ case 6:
+ createScene(0, 1);
+ break;
+ }
+ }
+}
+
+// Scene1901
+
+Scene1901::Scene1901(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ setRectList(0x004B34C8);
+
+ setBackground(0x01303227);
+ setPalette(0x01303227);
+ insertScreenMouse(0x0322301B);
+
+ insertStaticSprite(0x42213133, 1100);
+
+ if (!getGlobalVar(V_STAIRS_PUZZLE_SOLVED))
+ insertStaticSprite(0x40A40168, 100);
+ else if (getGlobalVar(V_STAIRS_DOWN)) {
+ insertStaticSprite(0x124404C4, 100);
+ setGlobalVar(V_STAIRS_DOWN_ONCE, 1);
+ } else
+ insertStaticSprite(0x02840064, 100);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene1901>(120, 380);
+ setMessageList(0x004B3408);
+ } else if (which == 1) {
+ // Klaymen returning from the puzzle
+ insertKlaymen<KmScene1901>(372, 380);
+ setMessageList(0x004B3410);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene1901>(0, 380);
+ setMessageList(0x004B3400);
+ }
+
+ tempSprite = insertStaticSprite(0x4830A402, 1100);
+ _klaymen->setClipRect(tempSprite->getDrawRect().x, 0, 640, 480);
+
+}
+
+static const NPoint kAsScene1907SymbolGroundPositions[] = {
+ {160, 310}, { 90, 340}, {210, 335},
+ {210, 380}, {310, 340}, {290, 400},
+ {400, 375}, {370, 435}, {475, 415}
+};
+
+static const NPoint kAsScene1907SymbolPluggedInPositions[] = {
+ {275, 125}, {244, 125}, {238, 131},
+ {221, 135}, {199, 136}, {168, 149},
+ {145, 152}, {123, 154}, {103, 157}
+};
+
+static const NPoint kAsScene1907SymbolGroundHitPositions[] = {
+ {275, 299}, {244, 299}, {238, 305},
+ {221, 309}, {199, 310}, {168, 323},
+ {145, 326}, {123, 328}, {103, 331}
+};
+
+static const NPoint kAsScene1907SymbolPluggedInDownPositions[] = {
+ {275, 136}, {244, 156}, {238, 183},
+ {221, 207}, {199, 228}, {168, 262},
+ {145, 285}, {123, 307}, {103, 331}
+};
+
+static const uint32 kAsScene1907SymbolFileHashes[] = {
+ 0x006A1034, 0x006A1010, 0x006A1814,
+ 0x006A1016, 0x006A0014, 0x002A1014,
+ 0x00EA1014, 0x206A1014, 0x046A1414
+};
+
+bool AsScene1907Symbol::_plugInFailed = false;
+int AsScene1907Symbol::_plugInTryCount = 0;
+
+AsScene1907Symbol::AsScene1907Symbol(NeverhoodEngine *vm, Scene1907 *parentScene, int elementIndex, int positionIndex)
+ : AnimatedSprite(vm, 1000 - positionIndex), _parentScene(parentScene), _elementIndex(elementIndex), _isMoving(false) {
+
+ _plugInFailed = false;
+ _plugInTryCount = 0;
+
+ if (getGlobalVar(V_STAIRS_PUZZLE_SOLVED)) {
+ _isPluggedIn = true;
+ _currPositionIndex = elementIndex;
+ if (!getGlobalVar(V_STAIRS_DOWN)) {
+ _x = kAsScene1907SymbolPluggedInPositions[_currPositionIndex].x;
+ _y = kAsScene1907SymbolPluggedInPositions[_currPositionIndex].y;
+ } else {
+ _x = kAsScene1907SymbolPluggedInDownPositions[_currPositionIndex].x;
+ _y = kAsScene1907SymbolPluggedInDownPositions[_currPositionIndex].y;
+ }
+ createSurface1(kAsScene1907SymbolFileHashes[_elementIndex], 1000 + _currPositionIndex);
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else {
+ _isPluggedIn = false;
+ _currPositionIndex = positionIndex;
+ loadSound(0, 0x74231924);
+ loadSound(1, 0x36691914);
+ loadSound(2, 0x5421D806);
+ _parentScene->setPositionFree(_currPositionIndex, false);
+ _x = kAsScene1907SymbolGroundPositions[_currPositionIndex].x;
+ _y = kAsScene1907SymbolGroundPositions[_currPositionIndex].y;
+ createSurface1(kAsScene1907SymbolFileHashes[_elementIndex], 1000 + _currPositionIndex);
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], 0, -1);
+ _newStickFrameIndex = 0;
+ }
+ _collisionBoundsOffset.set(0, 0, 80, 80);
+ Sprite::updateBounds();
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+
+}
+
+void AsScene1907Symbol::update() {
+ updateAnim();
+ handleSpriteUpdate();
+ updatePosition();
+ if (_plugInFailed && _plugInTryCount == 0)
+ _plugInFailed = false;
+}
+
+uint32 AsScene1907Symbol::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_isPluggedIn && !_plugInFailed) {
+ tryToPlugIn();
+ messageResult = 1;
+ } else
+ messageResult = 0;
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene1907Symbol::hmTryToPlugIn(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1907Symbol::suTryToPlugIn() {
+ _currStep++;
+ _x -= _deltaX;
+ _y -= _deltaY;
+ if (_currStep == 16) {
+ _x -= _smallDeltaX;
+ _y -= _smallDeltaY;
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1907Symbol::suFallOff() {
+ if (_fallOffDelay != 0) {
+ _fallOffDelay--;
+ } else {
+ _y += _yAccel;
+ _yAccel += 8;
+ if (_y >= kAsScene1907SymbolGroundHitPositions[_currPositionIndex].y) {
+ _y = kAsScene1907SymbolGroundHitPositions[_currPositionIndex].y;
+ stFallOffHitGround();
+ }
+ }
+}
+
+void AsScene1907Symbol::suFallOffHitGround() {
+
+ if (_x == _someX - _xBreak)
+ _x -= _smallDeltaX;
+ else
+ _x -= _deltaX;
+
+ if (_y == kAsScene1907SymbolGroundHitPositions[_currPositionIndex].y) {
+ _y -= _someY;
+ }
+
+ if (_currStep < 8) {
+ _y -= _yAccel;
+ _yAccel -= 4;
+ if (_yAccel < 0)
+ _yAccel = 0;
+ } else if (_currStep < 15) {
+ _y += _yAccel;
+ _yAccel += 4;
+ } else {
+ _y = kAsScene1907SymbolGroundPositions[_newPositionIndex].y;
+ cbFallOffHitGroundEvent();
+ }
+
+ _currStep++;
+}
+
+void AsScene1907Symbol::suMoveDown() {
+ _y += _yIncr;
+ if (_yIncr < 11)
+ _yIncr++;
+ if (_y >= kAsScene1907SymbolPluggedInDownPositions[_elementIndex].y) {
+ _y = kAsScene1907SymbolPluggedInDownPositions[_elementIndex].y;
+ _isMoving = false;
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1907Symbol::suMoveUp() {
+ _y -= _yIncr;
+ if (getGlobalVar(V_WALL_BROKEN)) {
+ if (_y - (9 + (_elementIndex > 5 ? 31 : 0)) < kAsScene1907SymbolPluggedInPositions[_elementIndex].y)
+ _yIncr--;
+ else
+ _yIncr++;
+ } else
+ _yIncr = 2;
+ if (_yIncr > 9)
+ _yIncr = 9;
+ else if (_yIncr < 1)
+ _yIncr = 1;
+ if (_y < kAsScene1907SymbolPluggedInPositions[_elementIndex].y) {
+ _y = kAsScene1907SymbolPluggedInPositions[_elementIndex].y;
+ _isMoving = false;
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene1907Symbol::tryToPlugIn() {
+ _isPluggedIn = true;
+ _plugInTryCount++;
+ _newPositionIndex = _parentScene->getNextPosition();
+ _parentScene->setPositionFree(_currPositionIndex, true);
+ sendMessage(_parentScene, 0x1022, 1100 + _newPositionIndex);
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], 0, -1);
+ SetUpdateHandler(&AsScene1907Symbol::update);
+ SetMessageHandler(&AsScene1907Symbol::hmTryToPlugIn);
+ SetSpriteUpdate(&AsScene1907Symbol::suTryToPlugIn);
+ _currStep = 0;
+ _deltaX = (_x - kAsScene1907SymbolPluggedInPositions[_newPositionIndex].x) / 16;
+ _smallDeltaX = _x - _deltaX * 16 - kAsScene1907SymbolPluggedInPositions[_newPositionIndex].x;
+ _deltaY = (_y - kAsScene1907SymbolPluggedInPositions[_newPositionIndex].y) / 16;
+ _smallDeltaY = _y - _deltaY * 16 - kAsScene1907SymbolPluggedInPositions[_newPositionIndex].y;
+ if (_elementIndex == _newPositionIndex) {
+ NextState(&AsScene1907Symbol::stPlugIn);
+ } else {
+ _plugInFailed = true;
+ NextState(&AsScene1907Symbol::stPlugInFail);
+ }
+}
+
+void AsScene1907Symbol::fallOff(int newPositionIndex, int fallOffDelay) {
+ _isPluggedIn = false;
+ _newPositionIndex = newPositionIndex;
+ _fallOffDelay = fallOffDelay;
+ _parentScene->setPositionFree(_newPositionIndex, false);
+ _x = kAsScene1907SymbolPluggedInPositions[_currPositionIndex].x;
+ _y = kAsScene1907SymbolPluggedInPositions[_currPositionIndex].y;
+ _someX = _x;
+ _someY = _y;
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], -1, 0);
+ _playBackwards = true;
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ _currStep = 0;
+ _yAccel = 1;
+ SetUpdateHandler(&AsScene1907Symbol::update);
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+ SetSpriteUpdate(&AsScene1907Symbol::suFallOff);
+}
+
+void AsScene1907Symbol::stFallOffHitGround() {
+ playSound(1);
+ sendMessage(_parentScene, 0x1022, 1000 + _newPositionIndex);
+ Entity::_priority = 1000 - _newPositionIndex;
+ _parentScene->removeCollisionSprite(this);
+ _parentScene->addCollisionSprite(this);
+ SetSpriteUpdate(&AsScene1907Symbol::suFallOffHitGround);
+ NextState(&AsScene1907Symbol::cbFallOffHitGroundEvent);
+ _newStickFrameIndex = 0;
+ _currStep = 0;
+ _yAccel = 30;
+ _deltaX = (_x - kAsScene1907SymbolGroundPositions[_newPositionIndex].x) / 15;
+ _xBreak = _deltaX * 15;
+ _smallDeltaX = _x - kAsScene1907SymbolGroundPositions[_newPositionIndex].x - _xBreak;
+ _someY = 0;
+ if (kAsScene1907SymbolGroundHitPositions[_currPositionIndex].y > kAsScene1907SymbolGroundPositions[_newPositionIndex].y)
+ _someY = kAsScene1907SymbolGroundHitPositions[_currPositionIndex].y - kAsScene1907SymbolGroundPositions[_newPositionIndex].y;
+}
+
+void AsScene1907Symbol::cbFallOffHitGroundEvent() {
+ _currPositionIndex = _newPositionIndex;
+ if (_plugInTryCount > 0)
+ _plugInTryCount--;
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+ SetSpriteUpdate(NULL);
+ updateBounds();
+ playSound(2);
+}
+
+void AsScene1907Symbol::stPlugIn() {
+ playSound(0);
+ _currPositionIndex = _newPositionIndex;
+ stopAnimation();
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+ SetSpriteUpdate(NULL);
+ if (_elementIndex == 8)
+ sendMessage(_parentScene, 0x2001, 0);
+}
+
+void AsScene1907Symbol::stPlugInFail() {
+ _currPositionIndex = _newPositionIndex;
+ stopAnimation();
+ _parentScene->plugInFailed();
+}
+
+void AsScene1907Symbol::moveUp() {
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], -1, -1);
+ stopAnimation();
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+ SetSpriteUpdate(&AsScene1907Symbol::suMoveUp);
+ _yIncr = 1;
+ _isMoving = true;
+}
+
+void AsScene1907Symbol::moveDown() {
+ startAnimation(kAsScene1907SymbolFileHashes[_elementIndex], -1, -1);
+ stopAnimation();
+ SetMessageHandler(&AsScene1907Symbol::handleMessage);
+ SetSpriteUpdate(&AsScene1907Symbol::suMoveDown);
+ _yIncr = 4;
+ _isMoving = true;
+}
+
+SsScene1907UpDownButton::SsScene1907UpDownButton(NeverhoodEngine *vm, Scene1907 *parentScene, AsScene1907Symbol *asScene1907Symbol)
+ : StaticSprite(vm, 1400), _parentScene(parentScene), _asScene1907Symbol(asScene1907Symbol),
+ _countdown1(0) {
+
+ loadSprite(0x64516424, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 1400);
+ setVisible(false);
+ loadSound(0, 0x44061000);
+ SetUpdateHandler(&SsScene1907UpDownButton::update);
+ SetMessageHandler(&SsScene1907UpDownButton::handleMessage);
+ if (getGlobalVar(V_STAIRS_PUZZLE_SOLVED)) {
+ if (getGlobalVar(V_STAIRS_DOWN))
+ setToDownPosition();
+ else
+ setToUpPosition();
+ }
+}
+
+void SsScene1907UpDownButton::update() {
+ updatePosition();
+ if (_countdown1 != 0 && (--_countdown1 == 0)) {
+ setVisible(false);
+ sendMessage(_parentScene, 0x2000, 0);
+ }
+}
+
+uint32 SsScene1907UpDownButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown1 == 0 && !_asScene1907Symbol->isMoving() && getGlobalVar(V_STAIRS_PUZZLE_SOLVED)) {
+ setVisible(true);
+ _countdown1 = 4;
+ updatePosition();
+ playSound(0);
+ }
+ messageResult = 1;
+ }
+ return messageResult;
+}
+
+void SsScene1907UpDownButton::setToUpPosition() {
+ _y = _spriteResource.getPosition().y;
+ updateBounds();
+ updatePosition();
+}
+
+void SsScene1907UpDownButton::setToDownPosition() {
+ _y = _spriteResource.getPosition().y + 174;
+ updateBounds();
+ updatePosition();
+}
+
+AsScene1907WaterHint::AsScene1907WaterHint(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1400) {
+
+ createSurface1(0x110A1061, 1500);
+ _x = 320;
+ _y = 240;
+ startAnimation(0x110A1061, 0, -1);
+ _newStickFrameIndex = 0;
+ setVisible(false);
+ _needRefresh = true;
+ AnimatedSprite::updatePosition();
+ SetUpdateHandler(&AsScene1907WaterHint::update);
+ SetMessageHandler(&Sprite::handleMessage);
+}
+
+void AsScene1907WaterHint::update() {
+ updateAnim();
+ updatePosition();
+}
+
+uint32 AsScene1907WaterHint::hmShowing(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene1907WaterHint::show() {
+ setVisible(true);
+ startAnimation(0x110A1061, 0, -1);
+ SetMessageHandler(&AsScene1907WaterHint::hmShowing);
+ NextState(&AsScene1907WaterHint::hide);
+}
+
+void AsScene1907WaterHint::hide() {
+ stopAnimation();
+ setVisible(false);
+ SetMessageHandler(&Sprite::handleMessage);
+}
+
+Scene1907::Scene1907(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _currMovingSymbolIndex(0), _pluggedInCount(0),
+ _moveDownCountdown(0), _moveUpCountdown(0), _countdown3(0), _hasPlugInFailed(false) {
+
+ setBackground(0x20628E05);
+ setPalette(0x20628E05);
+
+ for (int i = 0; i < 9; i++)
+ _positionFree[i] = true;
+
+ for (int i = 0; i < 9; i++) {
+ _asSymbols[i] = insertSprite<AsScene1907Symbol>(this, i, getRandomPositionIndex());
+ addCollisionSprite(_asSymbols[i]);
+ }
+
+ _ssUpDownButton = insertSprite<SsScene1907UpDownButton>(this, _asSymbols[8]);
+ addCollisionSprite(_ssUpDownButton);
+
+ _asWaterHint = insertSprite<AsScene1907WaterHint>();
+
+ insertPuzzleMouse(0x28E0120E, 20, 620);
+
+ SetMessageHandler(&Scene1907::handleMessage);
+ SetUpdateHandler(&Scene1907::update);
+
+ if (getGlobalVar(V_STAIRS_PUZZLE_SOLVED))
+ _pluggedInCount = 9;
+
+ loadSound(0, 0x72004A10);
+ loadSound(1, 0x22082A12);
+ loadSound(2, 0x21100A10);
+ loadSound(3, 0x68E25540);
+
+}
+
+void Scene1907::update() {
+ Scene::update();
+
+ if (_hasPlugInFailed) {
+ int fallOffDelay = 0;
+ _hasPlugInFailed = false;
+ for (int i = 0; i < 9; i++) {
+ AsScene1907Symbol *asSymbol = _asSymbols[8 - i];
+ if (asSymbol->isPluggedIn()) {
+ asSymbol->fallOff(getRandomPositionIndex(), fallOffDelay);
+ fallOffDelay += _vm->_rnd->getRandomNumber(10 - 1) + 4;
+ }
+ }
+ }
+
+ if (_moveDownCountdown != 0 && (--_moveDownCountdown == 0)) {
+ _asSymbols[_currMovingSymbolIndex]->moveDown();
+ if (_currMovingSymbolIndex > 0) {
+ _moveDownCountdown = 2;
+ _currMovingSymbolIndex--;
+ }
+ }
+
+ if (_moveUpCountdown != 0 && (--_moveUpCountdown == 0)) {
+ _moveDownCountdown = 0;
+ for (int i = 0; i < 9; i++)
+ _asSymbols[i]->moveUp();
+ }
+
+ if (_countdown3 != 0 && (--_countdown3 == 0)) {
+ _asWaterHint->show();
+ _moveUpCountdown = 4;
+ }
+
+}
+
+uint32 Scene1907::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) &&
+ !_hasPlugInFailed && _moveDownCountdown == 0 && _moveUpCountdown == 0 && _countdown3 == 0) {
+ leaveScene(0);
+ }
+ break;
+ case 0x2000:
+ if (getGlobalVar(V_STAIRS_DOWN)) {
+ playSound(0);
+ for (int i = 0; i < 9; i++)
+ _asSymbols[i]->moveUp();
+ _ssUpDownButton->setToUpPosition();
+ setGlobalVar(V_STAIRS_DOWN, 0);
+ } else {
+ if (!getGlobalVar(V_WALL_BROKEN)) {
+ playSound(2);
+ _countdown3 = 5;
+ } else {
+ playSound(1);
+ _ssUpDownButton->setToDownPosition();
+ setGlobalVar(V_STAIRS_DOWN, 1);
+ }
+ _moveDownCountdown = 1;
+ _currMovingSymbolIndex = 8;
+ }
+ break;
+ case 0x2001:
+ playSound(3);
+ setGlobalVar(V_STAIRS_PUZZLE_SOLVED, 1);
+ break;
+ }
+ return 0;
+}
+
+void Scene1907::plugInFailed() {
+ _pluggedInCount = 0;
+ _hasPlugInFailed = true;
+}
+
+int Scene1907::getRandomPositionIndex() {
+ bool found = false;
+ int index = 0;
+ // Check if any position is free
+ for (int i = 0; i < 9; i++)
+ if (_positionFree[i])
+ found = true;
+ if (found) {
+ // Get a random free position
+ found = false;
+ while (!found) {
+ index = _vm->_rnd->getRandomNumber(9 - 1);
+ if (_positionFree[index])
+ found = true;
+ }
+ }
+ return index;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module1900.h b/engines/neverhood/modules/module1900.h
new file mode 100644
index 0000000000..abb5eb1d87
--- /dev/null
+++ b/engines/neverhood/modules/module1900.h
@@ -0,0 +1,143 @@
+/* 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 NEVERHOOD_MODULES_MODULE1900_H
+#define NEVERHOOD_MODULES_MODULE1900_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+class Module1900 : public Module {
+public:
+ Module1900(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module1900();
+protected:
+ int _sceneNum;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1901
+
+class Scene1901 : public Scene {
+public:
+ Scene1901(NeverhoodEngine *vm, Module *parentModule, int which);
+};
+
+// Scene1907
+
+class Scene1907;
+
+class AsScene1907Symbol : public AnimatedSprite {
+public:
+ AsScene1907Symbol(NeverhoodEngine *vm, Scene1907 *parentScene, int elementIndex, int positionIndex);
+ void moveUp();
+ void moveDown();
+ void fallOff(int newPositionIndex, int fallOffDelay);
+ bool isPluggedIn() { return _isPluggedIn; }
+ bool isMoving() { return _isMoving; }
+protected:
+ Scene1907 *_parentScene;
+ int _elementIndex;
+ int _currPositionIndex;
+ int _newPositionIndex;
+ bool _isPluggedIn;
+ bool _isMoving;
+ int _someX, _someY;
+ int _xBreak;
+ int _currStep;
+ int _yAccel;
+ int _yIncr;
+ int _fallOffDelay;
+ int _deltaX, _smallDeltaX;
+ int _deltaY, _smallDeltaY;
+ // Dumb, change if possible
+ static bool _plugInFailed;
+ static int _plugInTryCount;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmTryToPlugIn(int messageNum, const MessageParam &param, Entity *sender);
+ void suTryToPlugIn();
+ void suFallOff();
+ void suFallOffHitGround();
+ void suMoveDown();
+ void suMoveUp();
+ void tryToPlugIn();
+ void stFallOffHitGround();
+ void cbFallOffHitGroundEvent();
+ void stPlugIn();
+ void stPlugInFail();
+};
+
+class AsScene1907WaterHint : public AnimatedSprite {
+public:
+ AsScene1907WaterHint(NeverhoodEngine *vm);
+ void show();
+protected:
+ void update();
+ uint32 hmShowing(int messageNum, const MessageParam &param, Entity *sender);
+ void hide();
+};
+
+class SsScene1907UpDownButton : public StaticSprite {
+public:
+ SsScene1907UpDownButton(NeverhoodEngine *vm, Scene1907 *parentScene, AsScene1907Symbol *asScene1907Symbol);
+ void setToUpPosition();
+ void setToDownPosition();
+protected:
+ Scene1907 *_parentScene;
+ AsScene1907Symbol *_asScene1907Symbol;
+ int _countdown1;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene1907 : public Scene {
+public:
+ Scene1907(NeverhoodEngine *vm, Module *parentModule);
+ void plugInFailed();
+ void setPositionFree(int index, bool value) { _positionFree[index] = value; }
+ int getNextPosition() { return _pluggedInCount++; }
+protected:
+ AsScene1907Symbol *_asSymbols[9];
+ SsScene1907UpDownButton *_ssUpDownButton;
+ AsScene1907WaterHint *_asWaterHint;
+ int _currMovingSymbolIndex;
+ int _pluggedInCount;
+ int _moveDownCountdown;
+ int _moveUpCountdown;
+ int _countdown3;
+ bool _hasPlugInFailed;
+ bool _positionFree[9];
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ int getRandomPositionIndex();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE1900_H */
diff --git a/engines/neverhood/modules/module2000.cpp b/engines/neverhood/modules/module2000.cpp
new file mode 100644
index 0000000000..644b7c479a
--- /dev/null
+++ b/engines/neverhood/modules/module2000.cpp
@@ -0,0 +1,160 @@
+/* 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 "neverhood/modules/module2000.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/navigationscene.h"
+
+namespace Neverhood {
+
+Module2000::Module2000(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 0)
+ createScene(0, 1);
+ else if (which == 1)
+ createScene(0, 3);
+
+}
+
+Module2000::~Module2000() {
+ _vm->_soundMan->deleteGroup(0x81293110);
+}
+
+void Module2000::createScene(int sceneNum, int which) {
+ debug(1, "Module2000::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2001(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(getGlobalVar(V_WORLDS_JOINED) ? 0x004B7B48 : 0x004B7B00, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ setGlobalVar(V_WORLDS_JOINED, 1);
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, 1, 1);
+ createSmackerScene(0x204B2031, true, true, false);
+ break;
+ }
+ SetUpdateHandler(&Module2000::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2000::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ leaveModule(0);
+ else
+ createScene(1, 0);
+ break;
+ case 1:
+ if (_moduleResult == 0) {
+ if (getGlobalVar(V_WORLDS_JOINED))
+ createScene(1, 0);
+ else
+ createScene(2, -1);
+ } else if (_moduleResult == 1)
+ createScene(1, 1);
+ else if (_moduleResult == 2)
+ createScene(0, 0);
+ break;
+ case 2:
+ createScene(1, 0);
+ break;
+ }
+ }
+}
+
+// Scene2001
+
+Scene2001::Scene2001(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2001::handleMessage);
+
+ setBackground(0xA6417244);
+ setPalette(0xA6417244);
+ insertScreenMouse(0x17240A6C);
+
+ tempSprite = insertStaticSprite(0x0D641724, 1100);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2001>(300, 345);
+ setMessageList(0x004B3538);
+ sendMessage(this, 0x2000, 0);
+ } else if (which == 1) {
+ // Klaymen teleporting in
+ insertKlaymen<KmScene2001>(116, 345);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B3540, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 2) {
+ // Klaymen teleporting out
+ insertKlaymen<KmScene2001>(116, 345);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B35F0, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 3) {
+ // Klaymen returning from teleporter console
+ insertKlaymen<KmScene2001>(116, 345);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B3550, false);
+ sendMessage(this, 0x2000, 1);
+ } else {
+ // Klaymen standing around
+ insertKlaymen<KmScene2001>(390, 345);
+ setMessageList(0x004B3530);
+ sendMessage(this, 0x2000, 0);
+ _klaymen->setDoDeltaX(1);
+ }
+
+ _klaymen->setClipRect(tempSprite->getDrawRect().x, 0, 640, 480);
+
+}
+
+uint32 Scene2001::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (param.asInteger()) {
+ setRectList(0x004B3680);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004B3670);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2000.h b/engines/neverhood/modules/module2000.h
new file mode 100644
index 0000000000..fa62f9a70e
--- /dev/null
+++ b/engines/neverhood/modules/module2000.h
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE2000_H
+#define NEVERHOOD_MODULES_MODULE2000_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+class Module2000 : public Module {
+public:
+ Module2000(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2000();
+protected:
+ int _sceneNum;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene2001
+
+class Scene2001 : public Scene {
+public:
+ Scene2001(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2000_H */
diff --git a/engines/neverhood/modules/module2100.cpp b/engines/neverhood/modules/module2100.cpp
new file mode 100644
index 0000000000..b664e93dde
--- /dev/null
+++ b/engines/neverhood/modules/module2100.cpp
@@ -0,0 +1,336 @@
+/* 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 "neverhood/modules/module2100.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+Module2100::Module2100(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x10A10C14, 0x11482B95);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 1)
+ createScene(0, 0);
+ else if (which == 2)
+ createScene(0, 3);
+ else
+ createScene(0, 1);
+
+}
+
+Module2100::~Module2100() {
+ _vm->_soundMan->deleteMusicGroup(0x10A10C14);
+}
+
+void Module2100::createScene(int sceneNum, int which) {
+ debug(1, "Module2100::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->startMusic(0x11482B95, 0, 1);
+ _childObject = new Scene2101(_vm, this, which);
+ break;
+ }
+ SetUpdateHandler(&Module2100::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2100::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1) {
+ setGlobalVar(V_DOOR_PASSED, 1);
+ leaveModule(0);
+ } else
+ leaveModule(1);
+ break;
+ }
+ }
+}
+
+// Scene2101
+
+AsScene2101Door::AsScene2101Door(NeverhoodEngine *vm, bool isOpen)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface(100, 328, 347);
+ _x = 320;
+ _y = 240;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2101Door::handleMessage);
+ if (isOpen) {
+ startAnimation(0x0C202B9C, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else
+ setVisible(false);
+}
+
+uint32 AsScene2101Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ stOpenDoor();
+ break;
+ case 0x4809:
+ stCloseDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2101Door::stOpenDoor() {
+ startAnimation(0x0C202B9C, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ setVisible(true);
+ playSound(0, calcHash("fxDoorOpen32"));
+}
+
+void AsScene2101Door::stCloseDoor() {
+ startAnimation(0xC222A8D4, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ setVisible(true);
+ playSound(0, calcHash("fxDoorClose32"));
+ NextState(&AsScene2101Door::stCloseDoorDone);
+}
+
+void AsScene2101Door::stCloseDoorDone() {
+ stopAnimation();
+ setVisible(false);
+}
+
+AsScene2101HitByDoorEffect::AsScene2101HitByDoorEffect(NeverhoodEngine *vm, Sprite *klaymen)
+ : AnimatedSprite(vm, 1400), _klaymen(klaymen) {
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2101HitByDoorEffect::handleMessage);
+ createSurface(1200, 88, 165);
+ setVisible(false);
+}
+
+uint32 AsScene2101HitByDoorEffect::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2001:
+ _x = _klaymen->getX();
+ _y = _klaymen->getY() - 132;
+ startAnimation(0x0422255A, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+SsCommonFloorButton::SsCommonFloorButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash)
+ : StaticSprite(vm, 1100), _parentScene(parentScene), _countdown(0),
+ _fileHash1(fileHash1), _fileHash2(fileHash2), _soundFileHash(soundFileHash) {
+
+ SetUpdateHandler(&SsCommonFloorButton::update);
+ SetMessageHandler(&SsCommonFloorButton::handleMessage);
+ if (_soundFileHash == 0)
+ _soundFileHash = 0x44141000;
+ createSurface(1010, 61, 30);
+ if (_fileHash1)
+ loadSprite(_fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+ else
+ setVisible(false);
+}
+
+void SsCommonFloorButton::update() {
+ if (_countdown != 0 && (--_countdown == 0)) {
+ sendMessage(_parentScene, 0x1022, 1010);
+ if (_fileHash1)
+ loadSprite(_fileHash1, kSLFDefDrawOffset | kSLFDefPosition);
+ else
+ setVisible(false);
+ }
+}
+
+uint32 SsCommonFloorButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x480B:
+ sendMessage(_parentScene, 0x480B, 0);
+ setVisible(true);
+ sendMessage(_parentScene, 0x1022, 990);
+ loadSprite(_fileHash2, kSLFDefDrawOffset | kSLFDefPosition);
+ _countdown = 16;
+ playSound(0, _soundFileHash);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2101::Scene2101(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2101::handleMessage);
+ SetUpdateHandler(&Scene2101::update);
+
+ setBackground(0x44242305);
+ setPalette(0x44242305);
+ insertScreenMouse(0x4230144A);
+
+ insertStaticSprite(0x00502330, 1100);
+ tempSprite = insertStaticSprite(0x78492010, 1100);
+ _ssFloorButton = insertSprite<SsCommonFloorButton>(this, 0x72427010, 0x32423010, 200, 0);
+ _asTape1 = insertSprite<AsScene1201Tape>(this, 18, 1100, 412, 443, 0x9148A011);
+ addCollisionSprite(_asTape1);
+ _asTape2 = insertSprite<AsScene1201Tape>(this, 11, 1100, 441, 443, 0x9148A011);
+ addCollisionSprite(_asTape2);
+
+ if (which < 0) {
+ insertKlaymen<KmScene2101>(380, 438);
+ setMessageList(0x004B8E48);
+ sendMessage(this, 0x2000, 0);
+ _asDoor = insertSprite<AsScene2101Door>(false);
+ _doorStatus = 1;
+ _countdown1 = 0;
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2101>(640, 438);
+ setMessageList(0x004B8E50);
+ sendMessage(this, 0x2000, 0);
+ _asDoor = insertSprite<AsScene2101Door>(true);
+ _doorStatus = 2;
+ _countdown1 = 48;
+ } else if (which == 2) {
+ // Klaymen teleporting out
+ insertKlaymen<KmScene2101>(115, 438);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B8F58);
+ sendMessage(this, 0x2000, 1);
+ _asDoor = insertSprite<AsScene2101Door>(false);
+ _doorStatus = 1;
+ _countdown1 = 0;
+ } else if (which == 3) {
+ // Klaymen returning from the teleporter console
+ insertKlaymen<KmScene2101>(115, 438);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B8EB0);
+ sendMessage(this, 0x2000, 1);
+ _asDoor = insertSprite<AsScene2101Door>(false);
+ _doorStatus = 1;
+ _countdown1 = 0;
+ } else {
+ // Klaymen teleporting in
+ insertKlaymen<KmScene2101>(115, 438);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004B8EA0);
+ sendMessage(this, 0x2000, 1);
+ _asDoor = insertSprite<AsScene2101Door>(false);
+ _doorStatus = 1;
+ _countdown1 = 0;
+ }
+
+ _asHitByDoorEffect = insertSprite<AsScene2101HitByDoorEffect>(_klaymen);
+ _klaymen->setClipRect(0, 0, tempSprite->getDrawRect().x2(), 480);
+
+}
+
+void Scene2101::update() {
+ if (_countdown1 != 0) {
+ if (_doorStatus == 2) {
+ if (--_countdown1 == 0) {
+ sendMessage(_asDoor, 0x4809, 0);
+ _doorStatus = 1;
+ }
+ } else {
+ if (_klaymen->getX() > 575)
+ _canAcceptInput = false;
+ if (--_countdown1 == 0) {
+ if (_klaymen->getX() < 480) {
+ sendMessage(_asDoor, 0x4809, 0);
+ _doorStatus = 1;
+ } else if (_klaymen->getX() >= 480 && _klaymen->getX() <= 575) {
+ _klaymen->setDoDeltaX(0);
+ setMessageList2(0x004B8F48);
+ sendMessage(_asDoor, 0x4809, 0);
+ sendMessage(_asHitByDoorEffect, 0x2001, 0);
+ _doorStatus = 1;
+ }
+ }
+ }
+ } else if (_doorStatus == 1 && _messageValue >= 0 && _klaymen->getX() > 470 && !isMessageList2(0x004B8F48))
+ setMessageList2(0x004B8F50);
+ Scene::update();
+}
+
+uint32 Scene2101::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x02144CB1)
+ sendEntityMessage(_klaymen, 0x1014, _ssFloorButton);
+ else if (param.asInteger() == 0x21E64A00) {
+ if (_doorStatus == 0)
+ setMessageList(0x004B8E80);
+ else
+ setMessageList(0x004B8EC8);
+ } else if (param.asInteger() == 0x41442820)
+ cancelMessageList();
+ break;
+ case 0x2000:
+ if (param.asInteger() != 0) {
+ setRectList(0x004B9008);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004B8FF8);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ break;
+ case 0x480B:
+ if (sender == _ssFloorButton && _doorStatus == 1) {
+ sendMessage(_asDoor, 0x4808, 0);
+ _doorStatus = 0;
+ _countdown1 = 90;
+ }
+ break;
+ case 0x4826:
+ if (sender == _asTape1 || sender == _asTape2) {
+ if (_klaymen->getX() >= 228 && _klaymen->getX() <= 500) {
+ sendEntityMessage(_klaymen, 0x1014, sender);
+ setMessageList(0x004B8F78);
+ } else if (_klaymen->getX() < 228)
+ setMessageList2(0x004B8F00);
+ }
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2100.h b/engines/neverhood/modules/module2100.h
new file mode 100644
index 0000000000..369f5ac0cc
--- /dev/null
+++ b/engines/neverhood/modules/module2100.h
@@ -0,0 +1,92 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE2100_H
+#define NEVERHOOD_MODULES_MODULE2100_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class Module2100 : public Module {
+public:
+ Module2100(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2100();
+protected:
+ int _sceneNum;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene1901
+
+class AsScene2101Door : public AnimatedSprite {
+public:
+ AsScene2101Door(NeverhoodEngine *vm, bool isOpen);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stCloseDoor();
+ void stCloseDoorDone();
+};
+
+class AsScene2101HitByDoorEffect : public AnimatedSprite {
+public:
+ AsScene2101HitByDoorEffect(NeverhoodEngine *vm, Sprite *klaymen);
+protected:
+ Sprite *_klaymen;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsCommonFloorButton : public StaticSprite {
+public:
+ SsCommonFloorButton(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int surfacePriority, uint32 soundFileHash);
+protected:
+ Scene *_parentScene;
+ uint32 _soundFileHash;
+ uint32 _fileHash1, _fileHash2;
+ int16 _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2101 : public Scene {
+public:
+ Scene2101(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssFloorButton;
+ Sprite *_asTape1;
+ Sprite *_asTape2;
+ Sprite *_asDoor;
+ Sprite *_asHitByDoorEffect;
+ int _countdown1;
+ int _doorStatus;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2100_H */
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
new file mode 100644
index 0000000000..08ed274eb3
--- /dev/null
+++ b/engines/neverhood/modules/module2200.cpp
@@ -0,0 +1,2563 @@
+/* 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 "neverhood/modules/module2200.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/diskplayerscene.h"
+
+namespace Neverhood {
+
+Module2200::Module2200(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x11391412, 0x601C908C);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else
+ createScene(0, 0);
+
+}
+
+Module2200::~Module2200() {
+ _vm->_soundMan->deleteGroup(0x11391412);
+}
+
+void Module2200::createScene(int sceneNum, int which) {
+ debug(1, "Module2200::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2201(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->startMusic(0x601C908C, 0, 2);
+ _childObject = new Scene2202(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->startMusic(0x601C908C, 0, 2);
+ _childObject = new Scene2203(_vm, this, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
+ _childObject = new DiskplayerScene(_vm, this, 3);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
+ _childObject = new Scene2205(_vm, this, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->_soundMan->stopMusic(0x601C908C, 0, 2);
+ _childObject = new Scene2206(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _childObject = new Scene2207(_vm, this);
+ break;
+ case 7:
+ if (which >= 0)
+ _vm->gameState().which = _vm->gameState().sceneNum;
+ _vm->gameState().sceneNum = 7;
+ _childObject = new Scene2208(_vm, this, which);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new Scene2208(_vm, this, which);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ createHallOfRecordsScene(which, 0x004B7180);
+ break;
+ case 10:
+ _vm->gameState().sceneNum = 10;
+ createHallOfRecordsScene(which, 0x004B7198);
+ break;
+ case 11:
+ _vm->gameState().sceneNum = 11;
+ createHallOfRecordsScene(which, 0x004B71B0);
+ break;
+ case 12:
+ _vm->gameState().sceneNum = 12;
+ createHallOfRecordsScene(which, 0x004B71C8);
+ break;
+ case 13:
+ _vm->gameState().sceneNum = 13;
+ createHallOfRecordsScene(which, 0x004B71E0);
+ break;
+ case 14:
+ _vm->gameState().sceneNum = 14;
+ createHallOfRecordsScene(which, 0x004B71F8);
+ break;
+ case 15:
+ _vm->gameState().sceneNum = 15;
+ createHallOfRecordsScene(which, 0x004B7210);
+ break;
+ case 16:
+ _vm->gameState().sceneNum = 16;
+ createHallOfRecordsScene(which, 0x004B7228);
+ break;
+ case 17:
+ _vm->gameState().sceneNum = 17;
+ createHallOfRecordsScene(which, 0x004B7240);
+ break;
+ case 18:
+ _vm->gameState().sceneNum = 18;
+ createHallOfRecordsScene(which, 0x004B7258);
+ break;
+ case 19:
+ _vm->gameState().sceneNum = 19;
+ createHallOfRecordsScene(which, 0x004B7270);
+ break;
+ case 20:
+ _vm->gameState().sceneNum = 20;
+ createHallOfRecordsScene(which, 0x004B7288);
+ break;
+ case 21:
+ _vm->gameState().sceneNum = 21;
+ createHallOfRecordsScene(which, 0x004B72A0);
+ break;
+ case 22:
+ _vm->gameState().sceneNum = 22;
+ createHallOfRecordsScene(which, 0x004B72B8);
+ break;
+ case 23:
+ _vm->gameState().sceneNum = 23;
+ createHallOfRecordsScene(which, 0x004B72D0);
+ break;
+ case 24:
+ _vm->gameState().sceneNum = 24;
+ createHallOfRecordsScene(which, 0x004B72E8);
+ break;
+ case 25:
+ _vm->gameState().sceneNum = 25;
+ createHallOfRecordsScene(which, 0x004B7300);
+ break;
+ case 26:
+ _vm->gameState().sceneNum = 26;
+ createHallOfRecordsScene(which, 0x004B7318);
+ break;
+ case 27:
+ _vm->gameState().sceneNum = 27;
+ createHallOfRecordsScene(which, 0x004B7330);
+ break;
+ case 28:
+ _vm->gameState().sceneNum = 28;
+ createHallOfRecordsScene(which, 0x004B7348);
+ break;
+ case 29:
+ _vm->gameState().sceneNum = 29;
+ createHallOfRecordsScene(which, 0x004B7360);
+ break;
+ case 30:
+ _vm->gameState().sceneNum = 30;
+ createHallOfRecordsScene(which, 0x004B7378);
+ break;
+ case 31:
+ _vm->gameState().sceneNum = 31;
+ createHallOfRecordsScene(which, 0x004B7390);
+ break;
+ case 32:
+ _vm->gameState().sceneNum = 32;
+ createHallOfRecordsScene(which, 0x004B73A8);
+ break;
+ case 33:
+ _vm->gameState().sceneNum = 33;
+ createHallOfRecordsScene(which, 0x004B73C0);
+ break;
+ case 34:
+ _vm->gameState().sceneNum = 34;
+ createHallOfRecordsScene(which, 0x004B73D8);
+ break;
+ case 35:
+ _vm->gameState().sceneNum = 35;
+ createHallOfRecordsScene(which, 0x004B73F0);
+ break;
+ case 36:
+ _vm->gameState().sceneNum = 36;
+ createHallOfRecordsScene(which, 0x004B7408);
+ break;
+ case 37:
+ _vm->gameState().sceneNum = 37;
+ createHallOfRecordsScene(which, 0x004B7420);
+ break;
+ case 38:
+ _vm->gameState().sceneNum = 38;
+ createHallOfRecordsScene(which, 0x004B7438);
+ break;
+ case 39:
+ _vm->gameState().sceneNum = 39;
+ createHallOfRecordsScene(which, 0x004B7450);
+ break;
+ case 40:
+ _vm->gameState().sceneNum = 40;
+ createHallOfRecordsScene(which, 0x004B7468);
+ break;
+ case 41:
+ _vm->gameState().sceneNum = 41;
+ _childObject = new Scene2242(_vm, this, which);
+ break;
+ case 42:
+ _vm->gameState().sceneNum = 42;
+ createHallOfRecordsScene(which, 0x004B7480);
+ break;
+ case 43:
+ _vm->gameState().sceneNum = 43;
+ createHallOfRecordsScene(which, 0x004B7498);
+ break;
+ case 44:
+ _vm->gameState().sceneNum = 44;
+ createHallOfRecordsScene(which, 0x004B74B0);
+ break;
+ case 45:
+ _vm->gameState().sceneNum = 45;
+ createHallOfRecordsScene(which, 0x004B74C8);
+ break;
+ case 46:
+ _vm->gameState().sceneNum = 46;
+ _childObject = new Scene2247(_vm, this, which);
+ break;
+ case 47:
+ _vm->gameState().sceneNum = 47;
+ if (!getGlobalVar(V_WORLDS_JOINED)) {
+ if (getGlobalVar(V_LIGHTS_ON))
+ createStaticScene(0x83110287, 0x10283839);
+ else
+ createStaticScene(0x83412B9D, 0x12B9983C);
+ } else {
+ if (getGlobalVar(V_LIGHTS_ON))
+ createStaticScene(0x48632087, 0x3208348E);
+ else
+ createStaticScene(0x08C74886, 0x74882084);
+ }
+ break;
+ }
+ SetUpdateHandler(&Module2200::updateScene);
+ _childObject->handleUpdate();
+}
+
+#define HallOfRecordsSceneLink(nextSceneNum, prevSceneNum) \
+ if (_moduleResult == 1) createScene(nextSceneNum, 0); else if (_moduleResult == 2) createScene(7, 0); else createScene(prevSceneNum, 1)
+
+void Module2200::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(2, 0);
+ else if (_moduleResult == 2)
+ createScene(1, 0);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ createScene(0, 2);
+ break;
+ case 2:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else if (_moduleResult == 2)
+ createScene(3, 0);
+ else
+ createScene(0, 1);
+ break;
+ case 3:
+ createScene(2, 2);
+ break;
+ case 4:
+ if (_moduleResult == 1)
+ createScene(5, 0);
+ else if (_moduleResult == 2)
+ createScene(4, 2);
+ else
+ createScene(2, 1);
+ break;
+ case 5:
+ if (_moduleResult == 1)
+ createScene(46, 0);
+ else if (_moduleResult == 2)
+ createScene(6, 0);
+ else if (_moduleResult == 3)
+ createScene(8, 0);
+ else
+ createScene(4, 1);
+ break;
+ case 6:
+ createScene(5, 2);
+ break;
+ case 7:
+ createScene(_vm->gameState().which, 2);
+ break;
+ case 8:
+ createScene(5, 3);
+ break;
+ case 9:
+ HallOfRecordsSceneLink(10, 46);
+ break;
+ case 10:
+ HallOfRecordsSceneLink(11, 9);
+ break;
+ case 11:
+ HallOfRecordsSceneLink(12, 10);
+ break;
+ case 12:
+ HallOfRecordsSceneLink(13, 11);
+ break;
+ case 13:
+ HallOfRecordsSceneLink(14, 12);
+ break;
+ case 14:
+ HallOfRecordsSceneLink(15, 13);
+ break;
+ case 15:
+ HallOfRecordsSceneLink(16, 14);
+ break;
+ case 16:
+ HallOfRecordsSceneLink(17, 15);
+ break;
+ case 17:
+ HallOfRecordsSceneLink(18, 16);
+ break;
+ case 18:
+ HallOfRecordsSceneLink(19, 17);
+ break;
+ case 19:
+ HallOfRecordsSceneLink(20, 18);
+ break;
+ case 20:
+ HallOfRecordsSceneLink(21, 19);
+ break;
+ case 21:
+ HallOfRecordsSceneLink(22, 20);
+ break;
+ case 22:
+ HallOfRecordsSceneLink(23, 21);
+ break;
+ case 23:
+ HallOfRecordsSceneLink(24, 22);
+ break;
+ case 24:
+ HallOfRecordsSceneLink(25, 23);
+ break;
+ case 25:
+ HallOfRecordsSceneLink(26, 24);
+ break;
+ case 26:
+ HallOfRecordsSceneLink(27, 25);
+ break;
+ case 27:
+ HallOfRecordsSceneLink(28, 26);
+ break;
+ case 28:
+ HallOfRecordsSceneLink(29, 27);
+ break;
+ case 29:
+ HallOfRecordsSceneLink(30, 28);
+ break;
+ case 30:
+ HallOfRecordsSceneLink(31, 29);
+ break;
+ case 31:
+ HallOfRecordsSceneLink(32, 30);
+ break;
+ case 32:
+ HallOfRecordsSceneLink(33, 31);
+ break;
+ case 33:
+ HallOfRecordsSceneLink(34, 32);
+ break;
+ case 34:
+ HallOfRecordsSceneLink(42, 33);
+ break;
+ case 35:
+ HallOfRecordsSceneLink(36, 45);
+ break;
+ case 36:
+ HallOfRecordsSceneLink(37, 35);
+ break;
+ case 37:
+ HallOfRecordsSceneLink(38, 36);
+ break;
+ case 38:
+ HallOfRecordsSceneLink(39, 37);
+ break;
+ case 39:
+ HallOfRecordsSceneLink(40, 38);
+ break;
+ case 40:
+ HallOfRecordsSceneLink(41, 39);
+ break;
+ case 41:
+ HallOfRecordsSceneLink(47, 40);
+ break;
+ case 42:
+ HallOfRecordsSceneLink(43, 34);
+ break;
+ case 43:
+ HallOfRecordsSceneLink(44, 42);
+ break;
+ case 44:
+ HallOfRecordsSceneLink(45, 43);
+ break;
+ case 45:
+ HallOfRecordsSceneLink(35, 44);
+ break;
+ case 46:
+ HallOfRecordsSceneLink(9, 5);
+ break;
+ case 47:
+ createScene(41, 1);
+ break;
+ }
+ }
+}
+
+#undef HallOfRecordsSceneLink
+
+void Module2200::createHallOfRecordsScene(int which, uint32 hallOfRecordsInfoId) {
+ _childObject = new HallOfRecordsScene(_vm, this, which, hallOfRecordsInfoId);
+}
+
+// Scene2201
+
+AsScene2201CeilingFan::AsScene2201CeilingFan(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ _x = 403;
+ _y = 259;
+ createSurface(100, 233, 96);
+ startAnimation(0x8600866, 0, -1);
+ SetUpdateHandler(&AnimatedSprite::update);
+}
+
+AsScene2201Door::AsScene2201Door(NeverhoodEngine *vm, Klaymen *klaymen, Sprite *ssDoorLight, bool isOpen)
+ : AnimatedSprite(vm, 1100), _klaymen(klaymen), _ssDoorLight(ssDoorLight), _countdown(0), _isOpen(isOpen) {
+
+ _x = 408;
+ _y = 290;
+ createSurface(900, 63, 266);
+ SetUpdateHandler(&AsScene2201Door::update);
+ SetMessageHandler(&AsScene2201Door::handleMessage);
+ if (_isOpen) {
+ startAnimation(0xE2CB0412, -1, -1);
+ _countdown = 48;
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else {
+ startAnimation(0xE2CB0412, 0, -1);
+ _newStickFrameIndex = 0;
+ _ssDoorLight->setVisible(false);
+ }
+}
+
+void AsScene2201Door::update() {
+ if (_countdown != 0 && _isOpen && (--_countdown == 0))
+ stCloseDoor();
+ AnimatedSprite::update();
+}
+
+uint32 AsScene2201Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x11001090) {
+ if (_isOpen)
+ _ssDoorLight->setVisible(true);
+ } else if (param.asInteger() == 0x11283090) {
+ if (!_isOpen)
+ _ssDoorLight->setVisible(false);
+ }
+ break;
+ case 0x2000:
+ if (_isOpen)
+ _countdown = 144;
+ messageResult = _isOpen ? 1 : 0;
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ _countdown = 144;
+ if (!_isOpen)
+ stOpenDoor();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2201Door::stOpenDoor() {
+ _isOpen = true;
+ startAnimation(0xE2CB0412, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ playSound(0, calcHash("fxDoorOpen33"));
+}
+
+void AsScene2201Door::stCloseDoor() {
+ _isOpen = false;
+ startAnimation(0xE2CB0412, -1, -1);
+ _playBackwards = true;
+ _newStickFrameIndex = 0;
+ playSound(0, calcHash("fxDoorClose33"));
+}
+
+SsScene2201PuzzleCube::SsScene2201PuzzleCube(NeverhoodEngine *vm, uint32 positionIndex, uint32 cubeIndex)
+ : StaticSprite(vm, 900) {
+
+ createSurface(100, 16, 16);
+ loadSprite(kSsScene2201PuzzleCubeFileHashes[cubeIndex], kSLFCenteredDrawOffset | kSLFSetPosition, 0,
+ kSsScene2201PuzzleCubePoints[positionIndex].x, kSsScene2201PuzzleCubePoints[positionIndex].y);
+}
+
+Scene2201::Scene2201(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isSoundPlaying(false) {
+
+ Sprite *tempSprite;
+
+ _vm->gameModule()->initCubeSymbolsPuzzle();
+
+ SetMessageHandler(&Scene2201::handleMessage);
+ SetUpdateHandler(&Scene2201::update);
+
+ loadDataResource(0x04104242);
+ loadHitRectList();
+ setBackground(0x40008208);
+ setPalette(0x40008208);
+ insertScreenMouse(0x0820C408);
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 7, 1100, 459, 432, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _ssDoorButton = insertSprite<SsCommonPressButton>(this, 0xE4A43E29, 0xE4A43E29, 100, 0);
+
+ for (uint32 cubeIndex = 0; cubeIndex < 9; cubeIndex++)
+ if ((int16)getSubVar(VA_CUBE_POSITIONS, cubeIndex) >= 0)
+ insertSprite<SsScene2201PuzzleCube>(cubeIndex, (int16)getSubVar(VA_CUBE_POSITIONS, cubeIndex));
+
+ _clipRects[0].y1 = 0;
+ _clipRects[0].x2 = 640;
+ _clipRects[1].x2 = 640;
+ _clipRects[1].y2 = 480;
+
+ if (!getGlobalVar(V_TILE_PUZZLE_SOLVED))
+ insertStaticSprite(0x00026027, 900);
+
+ tempSprite = insertStaticSprite(0x030326A0, 1100);
+ _clipRects[0].x1 = tempSprite->getDrawRect().x;
+ insertStaticSprite(0x811DA061, 1100);
+ tempSprite = insertStaticSprite(0x11180022, 1100);
+ _clipRects[1].x1 = tempSprite->getDrawRect().x;
+ tempSprite = insertStaticSprite(0x0D411130, 1100);
+ _clipRects[0].y2 = tempSprite->getDrawRect().y2();
+ _clipRects[1].y1 = tempSprite->getDrawRect().y2();
+ _ssDoorLight = insertStaticSprite(0xA4062212, 900);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2201>(300, 427, _clipRects, 2);
+ setMessageList(0x004B8118);
+ _asDoor = insertSprite<AsScene2201Door>(_klaymen, _ssDoorLight, false);
+ } else if (which == 1) {
+ // Klaymen entering from the back
+ insertKlaymen<KmScene2201>(412, 393, _clipRects, 2);
+ setMessageList(0x004B8130);
+ _asDoor = insertSprite<AsScene2201Door>(_klaymen, _ssDoorLight, false);
+ } else if (which == 2) {
+ // Klaymen returning from the puzzle
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene2201>(379, 427, _clipRects, 2);
+ _klaymen->setDoDeltaX(1);
+ } else
+ insertKlaymen<KmScene2201>(261, 427, _clipRects, 2);
+ setMessageList(0x004B8178);
+ _asDoor = insertSprite<AsScene2201Door>(_klaymen, _ssDoorLight, false);
+ } else {
+ // Klaymen entering from the left
+ NPoint pt = _dataResource.getPoint(0x0304D8DC);
+ insertKlaymen<KmScene2201>(pt.x, pt.y, _clipRects, 2);
+ setMessageList(0x004B8120);
+ _asDoor = insertSprite<AsScene2201Door>(_klaymen, _ssDoorLight, true);
+ }
+
+ insertSprite<AsScene2201CeilingFan>();
+
+ _vm->_soundMan->addSound(0x04106220, 0x81212040);
+
+}
+
+Scene2201::~Scene2201() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+ _vm->_soundMan->deleteSoundGroup(0x04106220);
+}
+
+void Scene2201::update() {
+ Scene::update();
+ if (!_isSoundPlaying) {
+ _vm->_soundMan->playSoundLooping(0x81212040);
+ _isSoundPlaying = true;
+ }
+}
+
+uint32 Scene2201::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssDoorButton);
+ else if (param.asInteger() == 0x35803198) {
+ if (sendMessage(_asDoor, 0x2000, 0))
+ setMessageList(0x004B81A0);
+ else
+ setMessageList(0x004B81B8);
+ } else if (param.asInteger() == 0x51445010) {
+ if (getGlobalVar(V_TILE_PUZZLE_SOLVED))
+ setMessageList(0x004B8108);
+ else
+ setMessageList(0x004B8150);
+ } else if (param.asInteger() == 0x1D203082)
+ setMessageList(0x004B8180);
+ else if (param.asInteger() == 0x00049091) {
+ if (getGlobalVar(V_TILE_PUZZLE_SOLVED))
+ setMessageList(0x004B8138);
+ else
+ setMessageList(0x004B8108);
+ }
+ break;
+ case 0x480B:
+ if (sender == _ssDoorButton)
+ sendMessage(_asDoor, 0x4808, 0);
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B81C8);
+ }
+ break;
+ }
+ return 0;
+}
+
+static const NPoint kSsScene2202PuzzleCubePoints[] = {
+ {196, 105}, {323, 102}, {445, 106},
+ {192, 216}, {319, 220}, {446, 216},
+ {188, 320}, {319, 319}, {443, 322}
+};
+
+static const uint32 kSsScene2202PuzzleCubeFileHashes1[] = {
+ 0xA500800C, 0x2182910C, 0x2323980C,
+ 0x23049084, 0x21008080, 0x2303900C,
+ 0x6120980C, 0x2504D808
+};
+
+static const uint32 kSsScene2202PuzzleCubeFileHashes2[] = {
+ 0x0AAD8080, 0x0A290291, 0x0A2BA398,
+ 0x822B8490, 0x86298080, 0x0A2B8390,
+ 0x0A69A098, 0x0E2D84D8
+};
+
+SsScene2202PuzzleCube::SsScene2202PuzzleCube(NeverhoodEngine *vm, Scene *parentScene, int16 cubePosition, int16 cubeSymbol)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _cubeSymbol(cubeSymbol), _cubePosition(cubePosition), _isMoving(false) {
+
+ int surfacePriority;
+
+ SetUpdateHandler(&SsScene2202PuzzleCube::update);
+ SetMessageHandler(&SsScene2202PuzzleCube::handleMessage);
+ if (_cubePosition >= 0 && _cubePosition <= 2)
+ surfacePriority = 100;
+ else if (_cubePosition >= 3 && _cubePosition <= 5)
+ surfacePriority = 300;
+ else
+ surfacePriority = 500;
+ debug(1, "TODO: Unused SurfacePriority: %d", surfacePriority);
+ loadSprite(kSsScene2202PuzzleCubeFileHashes2[_cubeSymbol], kSLFCenteredDrawOffset | kSLFSetPosition | kSLFDefCollisionBoundsOffset, 0,
+ kSsScene2202PuzzleCubePoints[_cubePosition].x, kSsScene2202PuzzleCubePoints[_cubePosition].y);
+ loadSound(0, 0x40958621);
+ loadSound(1, 0x51108241);
+}
+
+void SsScene2202PuzzleCube::update() {
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 SsScene2202PuzzleCube::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_isMoving && !getGlobalVar(V_TILE_PUZZLE_SOLVED))
+ sendMessage(_parentScene, 0x2000, _cubePosition);
+ messageResult = 1;
+ break;
+ case 0x2001:
+ _isMoving = true;
+ moveCube(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+void SsScene2202PuzzleCube::suMoveCubeX() {
+
+ bool done = false;
+
+ if (_counterDirection) {
+ if (_counter > 2)
+ _counter -= 2;
+ } else {
+ if (_counter < 20)
+ _counter += 2;
+ }
+
+ for (int16 i = 0; i < _counter; i++) {
+ _x += _xIncr;
+ _errValue += _yDelta;
+ if (_errValue >= _xDelta) {
+ _errValue -= _xDelta;
+ _y += _yIncr;
+ }
+ if (_x == _newX && _y == _newY) {
+ done = true;
+ break;
+ }
+ if (_x == _xFlagPos)
+ _counterDirection = true;
+ }
+
+ if (done)
+ stopMoving();
+
+ updateBounds();
+
+}
+
+void SsScene2202PuzzleCube::suMoveCubeY() {
+
+ bool done = false;
+
+ if (_counterDirection) {
+ if (_counter > 2)
+ _counter -= 2;
+ } else {
+ if (_counter < 20)
+ _counter += 2;
+ }
+
+ for (int16 i = 0; i < _counter; i++) {
+ _y += _yIncr;
+ _errValue += _xDelta;
+ if (_errValue >= _yDelta) {
+ _errValue -= _yDelta;
+ _x += _xIncr;
+ }
+ if (_x == _newX && _y == _newY) {
+ done = true;
+ break;
+ }
+ if (_x == _xFlagPos)
+ _counterDirection = true;
+ }
+
+ if (done)
+ stopMoving();
+
+ updateBounds();
+
+}
+
+void SsScene2202PuzzleCube::moveCube(int16 newCubePosition) {
+
+ loadSprite(kSsScene2202PuzzleCubeFileHashes1[_cubeSymbol], kSLFCenteredDrawOffset);
+
+ setSubVar(VA_CUBE_POSITIONS, _cubePosition, (uint32)-1);
+ setSubVar(VA_CUBE_POSITIONS, newCubePosition, (uint32)_cubeSymbol);
+
+ _cubePosition = newCubePosition;
+ _errValue = 0;
+ _counterDirection = false;
+ _counter = 0;
+ _newX = kSsScene2202PuzzleCubePoints[newCubePosition].x;
+ _newY = kSsScene2202PuzzleCubePoints[newCubePosition].y;
+
+ if (_x == _newX && _y == _newY)
+ return;
+
+ if (_x <= _newX) {
+ if (_y <= _newY) {
+ _xDelta = _newX - _x;
+ _yDelta = _newY - _y;
+ _xIncr = 1;
+ _yIncr = 1;
+ } else {
+ _xDelta = _newX - _x;
+ _yDelta = _y - _newY;
+ _xIncr = 1;
+ _yIncr = -1;
+ }
+ } else {
+ if (_y <= _newY) {
+ _xDelta = _x - _newX;
+ _yDelta = _newY - _y;
+ _xIncr = -1;
+ _yIncr = 1;
+ } else {
+ _xDelta = _x - _newX;
+ _yDelta = _y - _newY;
+ _xIncr = -1;
+ _yIncr = -1;
+ }
+ }
+
+ if (_xDelta > _yDelta) {
+ SetSpriteUpdate(&SsScene2202PuzzleCube::suMoveCubeX);
+ if (_xIncr > 0) {
+ if (_newX - _x >= 180)
+ _xFlagPos = _newX - 90;
+ else
+ _xFlagPos = _x + _newX / 2;
+ } else {
+ if (_x - _newX >= 180)
+ _xFlagPos = _x + 90;
+ else
+ _xFlagPos = _x / 2 + _newX;
+ }
+ playSound(0);
+ } else {
+ SetSpriteUpdate(&SsScene2202PuzzleCube::suMoveCubeY);
+ if (_yIncr > 0) {
+ if (_newY - _y >= 180)
+ _xFlagPos = _newY - 90;
+ else
+ _xFlagPos = _y + _newY / 2;
+ } else {
+ if (_y - _newY >= 180)
+ _xFlagPos = _y + 90;
+ else
+ _xFlagPos = _y / 2 + _newY;
+ }
+ playSound(1);
+ }
+
+}
+
+void SsScene2202PuzzleCube::stopMoving() {
+ loadSprite(kSsScene2202PuzzleCubeFileHashes2[_cubeSymbol], kSLFCenteredDrawOffset);
+ SetSpriteUpdate(NULL);
+ _isMoving = false;
+ sendMessage(_parentScene, 0x2002, _cubePosition);
+}
+
+Scene2202::Scene2202(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isSolved(false), _leaveScene(false), _isCubeMoving(false),
+ _ssMovingCube(NULL), _ssDoneMovingCube(NULL) {
+
+ _vm->gameModule()->initCubeSymbolsPuzzle();
+
+ SetMessageHandler(&Scene2202::handleMessage);
+ SetUpdateHandler(&Scene2202::update);
+
+ setBackground(0x08100A0C);
+ setPalette(0x08100A0C);
+ addEntity(_palette);
+ insertPuzzleMouse(0x00A08089, 20, 620);
+
+ for (uint32 cubePosition = 0; cubePosition < 9; cubePosition++) {
+ int16 cubeSymbol = (int16)getSubVar(VA_CUBE_POSITIONS, cubePosition);
+ if (cubeSymbol >= 0) {
+ Sprite *puzzleCubeSprite = insertSprite<SsScene2202PuzzleCube>(this, cubePosition, cubeSymbol);
+ addCollisionSprite(puzzleCubeSprite);
+ }
+ }
+
+ insertStaticSprite(0x55C043B8, 200);
+ insertStaticSprite(0x85500158, 400);
+ insertStaticSprite(0x25547028, 600);
+
+ loadSound(0, 0x68E25540);
+ loadSound(1, 0x40400457);
+
+ _vm->_soundMan->addSound(0x60400854, 0x8101A241);
+ _vm->_soundMan->playSoundLooping(0x8101A241);
+
+}
+
+Scene2202::~Scene2202() {
+ _vm->_soundMan->deleteSoundGroup(0x60400854);
+}
+
+void Scene2202::update() {
+ Scene::update();
+
+ if (_leaveScene && !isSoundPlaying(1))
+ leaveScene(0);
+
+ if (_isSolved && !isSoundPlaying(0)) {
+ playSound(1);
+ _isSolved = false;
+ _leaveScene = true;
+ }
+
+ if (_ssMovingCube && !_isCubeMoving) {
+ int16 freeCubePosition = getFreeCubePosition(_movingCubePosition);
+ if (freeCubePosition != -1) {
+ setSurfacePriority(_ssMovingCube->getSurface(), 700);
+ sendMessage(_ssMovingCube, 0x2001, freeCubePosition);
+ _ssMovingCube = NULL;
+ _isCubeMoving = true;
+ }
+ }
+
+ if (_ssDoneMovingCube) {
+ setSurfacePriority(_ssDoneMovingCube->getSurface(), _surfacePriority);
+ _ssDoneMovingCube = NULL;
+ if (testIsSolved()) {
+ playSound(0);
+ setGlobalVar(V_TILE_PUZZLE_SOLVED, 1);
+ _isSolved = true;
+ }
+ }
+
+}
+
+uint32 Scene2202::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ case 0x2000:
+ _movingCubePosition = (int16)param.asInteger();
+ _ssMovingCube = (Sprite*)sender;
+ break;
+ case 0x2002:
+ _isCubeMoving = false;
+ _ssDoneMovingCube = (Sprite*)sender;
+ if (param.asInteger() <= 2)
+ _surfacePriority = 100;
+ else if (param.asInteger() >= 3 && param.asInteger() <= 5)
+ _surfacePriority = 300;
+ else
+ _surfacePriority = 500;
+ break;
+ }
+ return 0;
+}
+
+int16 Scene2202::getFreeCubePosition(int16 cubePosition) {
+ if (cubePosition >= 3 && (int16)getSubVar(VA_CUBE_POSITIONS, cubePosition - 3) == -1)
+ return cubePosition - 3;
+ else if (cubePosition <= 5 && (int16)getSubVar(VA_CUBE_POSITIONS, cubePosition + 3) == -1)
+ return cubePosition + 3;
+ else if (cubePosition != 0 && cubePosition != 3 && cubePosition != 6 && (int16)getSubVar(VA_CUBE_POSITIONS, cubePosition - 1) == -1)
+ return cubePosition - 1;
+ else if (cubePosition != 2 && cubePosition != 5 && cubePosition != 8 && (int16)getSubVar(VA_CUBE_POSITIONS, cubePosition + 1) == -1)
+ return cubePosition + 1;
+ else
+ return -1;
+}
+
+bool Scene2202::testIsSolved() {
+ return
+ getSubVar(VA_CUBE_POSITIONS, 0) == 0 &&
+ getSubVar(VA_CUBE_POSITIONS, 2) == 2 &&
+ getSubVar(VA_CUBE_POSITIONS, 3) == 3 &&
+ getSubVar(VA_CUBE_POSITIONS, 4) == 4 &&
+ getSubVar(VA_CUBE_POSITIONS, 5) == 5 &&
+ getSubVar(VA_CUBE_POSITIONS, 6) == 6 &&
+ getSubVar(VA_CUBE_POSITIONS, 8) == 7;
+}
+
+static const uint32 kAsCommonKeyFileHashes[] = {
+ 0x2450D850, 0x0C9CE8D0, 0x2C58A152
+};
+
+AsCommonKey::AsCommonKey(NeverhoodEngine *vm, Scene *parentScene, int keyIndex, int surfacePriority, int16 x, int16 y)
+ : AnimatedSprite(vm, kAsCommonKeyFileHashes[keyIndex], surfacePriority, x, y), _parentScene(parentScene), _keyIndex(keyIndex) {
+
+ if (!getSubVar(VA_HAS_KEY, _keyIndex) && !getSubVar(VA_IS_KEY_INSERTED, _keyIndex)) {
+ SetMessageHandler(&AsCommonKey::handleMessage);
+ } else {
+ // If Klaymen already has the key or it's already inserted then don't show it
+ setVisible(false);
+ SetMessageHandler(NULL);
+ }
+}
+
+uint32 AsCommonKey::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setSubVar(VA_HAS_KEY, _keyIndex, 1);
+ setVisible(false);
+ SetMessageHandler(NULL);
+ }
+ return messageResult;
+}
+
+static const uint32 kAsScene2203DoorFileHashes[] = {
+ 0x7868AE10, 0x1A488110
+};
+
+AsScene2203Door::AsScene2203Door(NeverhoodEngine *vm, Scene *parentScene, uint doorIndex)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _doorIndex(doorIndex) {
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2203Door::handleMessage);
+ _x = 320;
+ _y = 240;
+ createSurface1(kAsScene2203DoorFileHashes[_doorIndex], 900);
+ if (getGlobalVar(V_LARGE_DOOR_NUMBER) == _doorIndex) {
+ startAnimation(kAsScene2203DoorFileHashes[_doorIndex], -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else {
+ startAnimation(kAsScene2203DoorFileHashes[_doorIndex], 0, -1);
+ _newStickFrameIndex = 0;
+ }
+}
+
+uint32 AsScene2203Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_doorIndex == getGlobalVar(V_LARGE_DOOR_NUMBER))
+ sendMessage(_parentScene, 0x2002, 0);
+ else
+ sendMessage(_parentScene, 0x2001, 0);
+ messageResult = 1;
+ break;
+ case 0x2000:
+ _otherDoor = (Sprite*)param.asEntity();
+ break;
+ case 0x3002:
+ if (_doorIndex == getGlobalVar(V_LARGE_DOOR_NUMBER))
+ sendMessage(_parentScene, 0x4808, 0);
+ stopAnimation();
+ break;
+ case 0x4808:
+ setGlobalVar(V_LARGE_DOOR_NUMBER, _doorIndex);
+ sendMessage(_otherDoor, 0x4809, 0);
+ openDoor();
+ break;
+ case 0x4809:
+ closeDoor();
+ sendMessage(_parentScene, 0x2003, 0);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2203Door::openDoor() {
+ playSound(0, 0x341014C4);
+ startAnimation(kAsScene2203DoorFileHashes[_doorIndex], 1, -1);
+}
+
+void AsScene2203Door::closeDoor() {
+ startAnimation(kAsScene2203DoorFileHashes[_doorIndex], -1, -1);
+ _playBackwards = true;
+ _newStickFrameIndex = 0;
+}
+
+Scene2203::Scene2203(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
+ setGlobalVar(V_KEY3_LOCATION, 1);
+
+ SetMessageHandler(&Scene2203::handleMessage);
+
+ setBackground(0x82C80334);
+ setPalette(0x82C80334);
+ insertScreenMouse(0x80330824);
+ setHitRects(0x004B8320);
+ setRectList(0x004B8420);
+
+ if (getGlobalVar(V_KEY3_LOCATION) == 1) {
+ _asKey = insertSprite<AsCommonKey>(this, 2, 1100, 282, 432);
+ addCollisionSprite(_asKey);
+ }
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 1, 1100, 435, 432, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _asLeftDoor = insertSprite<AsScene2203Door>(this, 0);
+ _asRightDoor = insertSprite<AsScene2203Door>(this, 1);
+ _ssSmallLeftDoor = insertStaticSprite(0x542CC072, 1100);
+ _ssSmallRightDoor = insertStaticSprite(0x0A2C0432, 1100);
+ _leftDoorClipRect.set(_ssSmallLeftDoor->getDrawRect().x, 0, 640, 480);
+ _rightDoorClipRect.set(0, 0, _ssSmallRightDoor->getDrawRect().x2(), 480);
+ sendEntityMessage(_asLeftDoor, 0x2000, _asRightDoor);
+ sendEntityMessage(_asRightDoor, 0x2000, _asLeftDoor);
+ addCollisionSprite(_asLeftDoor);
+ addCollisionSprite(_asRightDoor);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2203>(200, 427);
+ setMessageList(0x004B8340);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2203>(640, 427);
+ setMessageList(0x004B8350);
+ } else if (which == 2) {
+ // Klaymen returning from the displayer
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene2203>(362, 427);
+ _klaymen->setDoDeltaX(1);
+ } else
+ insertKlaymen<KmScene2203>(202, 427);
+ setMessageList(0x004B8358);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2203>(0, 427);
+ setMessageList(0x004B8348);
+ }
+
+ if (getGlobalVar(V_LARGE_DOOR_NUMBER)) {
+ _ssSmallLeftDoor->setVisible(false);
+ _klaymen->setClipRect(_rightDoorClipRect);
+ } else {
+ _ssSmallRightDoor->setVisible(false);
+ _klaymen->setClipRect(_leftDoorClipRect);
+ }
+
+}
+
+Scene2203::~Scene2203() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene2203::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2001:
+ sendEntityMessage(_klaymen, 0x1014, sender);
+ if (sender == _asLeftDoor)
+ setMessageList2(0x004B83B0);
+ else
+ setMessageList2(0x004B83C8);
+ break;
+ case 0x2002:
+ if (sender == _asLeftDoor)
+ setMessageList2(0x004B8370);
+ else
+ setMessageList2(0x004B8360);
+ break;
+ case 0x2003:
+ if (sender == _asLeftDoor)
+ _ssSmallLeftDoor->setVisible(false);
+ else
+ _ssSmallRightDoor->setVisible(false);
+ break;
+ case 0x4808:
+ if (sender == _asLeftDoor) {
+ _ssSmallLeftDoor->setVisible(true);
+ _klaymen->setClipRect(_leftDoorClipRect);
+ } else {
+ _ssSmallRightDoor->setVisible(true);
+ _klaymen->setClipRect(_rightDoorClipRect);
+ }
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B83E0);
+ } else if (sender == _asKey) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004B83F0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+SsScene2205DoorFrame::SsScene2205DoorFrame(NeverhoodEngine *vm)
+ : StaticSprite(vm, 900) {
+
+ SetMessageHandler(&SsScene2205DoorFrame::handleMessage);
+ createSurface(1100, 45, 206);
+ loadSprite(getGlobalVar(V_LIGHTS_ON) ? 0x24306227 : 0xD90032A0, kSLFDefDrawOffset | kSLFDefPosition);
+}
+
+uint32 SsScene2205DoorFrame::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ loadSprite(getGlobalVar(V_LIGHTS_ON) ? 0x24306227 : 0xD90032A0, kSLFDefDrawOffset | kSLFDefPosition);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2205::Scene2205(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene2205::handleMessage);
+ SetUpdateHandler(&Scene2205::update);
+
+ setHitRects(0x004B0620);
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ _isLightOn = true;
+ setBackground(0x0008028D);
+ setPalette(0x0008028D);
+ addEntity(_palette);
+ insertScreenMouse(0x80289008);
+ _ssLightSwitch = insertSprite<SsCommonPressButton>(this, 0x2D339030, 0x2D309030, 100, 0);
+ } else {
+ _isLightOn = false;
+ setBackground(0xD00A028D);
+ setPalette(0xD00A028D);
+ addEntity(_palette);
+ insertScreenMouse(0xA0289D08);
+ _ssLightSwitch = insertSprite<SsCommonPressButton>(this, 0x2D339030, 0xDAC86E84, 100, 0);
+ }
+ _palette->addBasePalette(0xD00A028D, 0, 256, 0);
+ _ssDoorFrame = insertSprite<SsScene2205DoorFrame>();
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2205>(320, 417);
+ setMessageList(0x004B0658);
+ if (!getGlobalVar(V_LIGHTS_ON))
+ _palette->addPalette(0x68033B1C, 0, 65, 0);
+ _isKlaymenInLight = false;
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2205>(640, 417);
+ setMessageList(0x004B0648);
+ if (!getGlobalVar(V_LIGHTS_ON))
+ _palette->addPalette(0x68033B1C, 0, 65, 0);
+ _isKlaymenInLight = false;
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2205>(0, 417);
+ setMessageList(0x004B0640);
+ _isKlaymenInLight = true;
+ }
+
+ _klaymen->setClipRect(_ssDoorFrame->getDrawRect().x, 0, 640, 480);
+ _klaymen->setSoundFlag(true);
+
+ loadDataResource(0x00144822);
+
+}
+
+void Scene2205::update() {
+ Scene::update();
+ if (!_isLightOn && getGlobalVar(V_LIGHTS_ON)) {
+ _palette->addPalette(0x0008028D, 0, 256, 0);
+ changeBackground(0x0008028D);
+ _ssLightSwitch->setFileHashes(0x2D339030, 0x2D309030);
+ sendMessage(_ssDoorFrame, 0x2000, 0);
+ changeMouseCursor(0x80289008);
+ _isLightOn = true;
+ } else if (_isLightOn && !getGlobalVar(V_LIGHTS_ON)) {
+ _palette->addPalette(0xD00A028D, 0, 256, 0);
+ changeBackground(0xD00A028D);
+ _ssLightSwitch->setFileHashes(0x2D339030, 0xDAC86E84);
+ sendMessage(_ssDoorFrame, 0x2000, 0);
+ changeMouseCursor(0xA0289D08);
+ _isKlaymenInLight = true;
+ if (_klaymen->getX() > 85) {
+ _palette->addPalette(0x68033B1C, 0, 65, 0);
+ _isKlaymenInLight = false;
+ }
+ _isLightOn = false;
+ }
+ if (!getGlobalVar(V_LIGHTS_ON)) {
+ if (_isKlaymenInLight && _klaymen->getX() > 85) {
+ _palette->addBasePalette(0x68033B1C, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isKlaymenInLight = false;
+ } else if (!_isKlaymenInLight && _klaymen->getX() <= 85) {
+ _palette->addBasePalette(0xD00A028D, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isKlaymenInLight = true;
+ }
+ }
+}
+
+uint32 Scene2205::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x6449569A)
+ setMessageList(0x004B0690);
+ else if (param.asInteger() == 0x2841369C)
+ setMessageList(0x004B0630);
+ else if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssLightSwitch);
+ break;
+ case 0x480B:
+ setGlobalVar(V_LIGHTS_ON, getGlobalVar(V_LIGHTS_ON) ? 0 : 1);
+ break;
+ }
+ return 0;
+}
+
+static const int16 kScene2206XPositions[] = {
+ 384, 480, 572
+};
+
+static const uint32 kScene2206MessageIds1[] = {
+ 0x004B8998, 0x004B89B8, 0x004B89D8
+};
+
+static const uint32 kScene2206MessageIds2[] = {
+ 0x004B89F8, 0x004B8A20, 0x004B8A48
+};
+
+static const int16 kAsScene2206DoorSpikesXDeltasOpen[] = {
+ -24, -28, -18, 6, 9, -8
+};
+
+static const int16 kAsScene2206DoorSpikesXDeltasClose[] = {
+ -8, 7, 11, 26, 13, 14
+};
+
+AsScene2206DoorSpikes::AsScene2206DoorSpikes(NeverhoodEngine *vm, uint32 fileHash)
+ : StaticSprite(vm, fileHash, 200) {
+
+ if (getGlobalVar(V_SPIKES_RETRACTED))
+ _x -= 63;
+ SetUpdateHandler(&AsScene2206DoorSpikes::update);
+ SetMessageHandler(&AsScene2206DoorSpikes::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsScene2206DoorSpikes::update() {
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 AsScene2206DoorSpikes::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4808:
+ _deltaIndex = 0;
+ playSound(0, 0x032746E0);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(&AsScene2206DoorSpikes::suOpen);
+ break;
+ case 0x4809:
+ _deltaIndex = 0;
+ playSound(0, 0x002642C0);
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(&AsScene2206DoorSpikes::suClose);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2206DoorSpikes::suOpen() {
+ if (_deltaIndex < 6) {
+ _x += kAsScene2206DoorSpikesXDeltasOpen[_deltaIndex];
+ _deltaIndex++;
+ } else {
+ SetMessageHandler(&AsScene2206DoorSpikes::handleMessage);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+void AsScene2206DoorSpikes::suClose() {
+ if (_deltaIndex < 6) {
+ _x += kAsScene2206DoorSpikesXDeltasClose[_deltaIndex];
+ _deltaIndex++;
+ } else {
+ SetMessageHandler(&AsScene2206DoorSpikes::handleMessage);
+ SetSpriteUpdate(NULL);
+ }
+}
+
+AsScene2206Platform::AsScene2206Platform(NeverhoodEngine *vm, uint32 fileHash)
+ : StaticSprite(vm, fileHash, 50) {
+
+ SetUpdateHandler(&AsScene2206Platform::update);
+ SetMessageHandler(&AsScene2206Platform::handleMessage);
+ SetSpriteUpdate(NULL);
+}
+
+void AsScene2206Platform::update() {
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+uint32 AsScene2206Platform::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4803:
+ _yDelta = 0;
+ SetMessageHandler(NULL);
+ SetSpriteUpdate(&AsScene2206Platform::suMoveDown);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2206Platform::suMoveDown() {
+ _yDelta++;
+ _y += _yDelta;
+}
+
+SsScene2206TestTube::SsScene2206TestTube(NeverhoodEngine *vm, Scene *parentScene, int surfacePriority, uint32 fileHash)
+ : StaticSprite(vm, fileHash, surfacePriority), _parentScene(parentScene) {
+
+ if (getGlobalVar(V_HAS_TEST_TUBE)) {
+ setVisible(false);
+ SetMessageHandler(NULL);
+ } else
+ SetMessageHandler(&SsScene2206TestTube::handleMessage);
+ _collisionBoundsOffset = _drawOffset;
+ updateBounds();
+}
+
+uint32 SsScene2206TestTube::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x4806:
+ setGlobalVar(V_HAS_TEST_TUBE, 1);
+ setVisible(false);
+ SetMessageHandler(NULL);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2206::Scene2206(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ uint32 fileHash;
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&Scene2206::handleMessage);
+
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ fileHash = 0x41983216;
+ _sprite1 = insertStaticSprite(0x2201266A, 100);
+ _sprite2 = insertStaticSprite(0x3406A333, 300);
+ _sprite3 = insertStaticSprite(0x24A223A2, 100);
+ _asDoorSpikes = insertSprite<AsScene2206DoorSpikes>(0x26133023);
+ _asDoorSpikes->setClipRect(_sprite2->getDrawRect().x, 0, 640, 480);
+ setRectList(0x004B8AF8);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x0E038022, 100, 0);
+ insertScreenMouse(0x83212411);
+ _ssTestTube = insertSprite<SsScene2206TestTube>(this, 1100, /*464, 433, */0x5E00E262);
+ _asPlatform = insertSprite<AsScene2206Platform>(0x085E25E0);
+ } else {
+ fileHash = 0xE0102A45;
+ _sprite1 = insertStaticSprite(0x1C1106B8, 100);
+ _sprite2 = insertStaticSprite(0x020462E0, 300);
+ _sprite3 = insertStaticSprite(0x900626A2, 100);
+ _asDoorSpikes = insertSprite<AsScene2206DoorSpikes>(0x544822A8);
+ _asDoorSpikes->setClipRect(_sprite2->getDrawRect().x, 0, 640, 480);
+ setRectList(0x004B8B58);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x16882608, 100, 0);
+ insertScreenMouse(0x02A41E09);
+ _ssTestTube = insertSprite<SsScene2206TestTube>(this, 1100, /*464, 433, */0x52032563);
+ _asPlatform = insertSprite<AsScene2206Platform>(0x317831A0);
+ }
+
+ _asPlatform->setClipRect(_sprite2->getDrawRect().x, 0, _sprite3->getDrawRect().x2(), _sprite1->getDrawRect().y2());
+ setBackground(fileHash);
+ setPalette(fileHash);
+ addEntity(_palette);
+ _palette->addBasePalette(fileHash, 0, 256, 0);
+ if (!getGlobalVar(V_LIGHTS_ON))
+ _palette->addPalette(0x0263D144, 0, 65, 0);
+ addCollisionSprite(_ssTestTube);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2206>(200, 430);
+ setMessageList(0x004B88A8);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2206>(640, 430);
+ setMessageList(0x004B88B8);
+ } else if (which == 2) {
+ // Klaymen entering from the back
+ insertKlaymen<KmScene2206>(205, 396);
+ setMessageList(0x004B88C8);
+ _palette->addPalette(getGlobalVar(V_LIGHTS_ON) ? 0xB103B604 : 0x0263D144, 0, 65, 0);
+ klaymenBehindSpikes();
+ playSound(0, 0x53B8284A);
+ } else if (which == 3) {
+ // Klaymen entering from reading a text column
+ insertKlaymen<KmScene2206>(kScene2206XPositions[getGlobalVar(V_CLICKED_COLUMN_INDEX)], 430);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ setMessageList(0x004B8A70);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2206>(0, 430);
+ setMessageList(0x004B88B0);
+ }
+
+ _klaymen->setSoundFlag(true);
+ _klaymen->setKlaymenIdleTable2();
+
+}
+
+Scene2206::~Scene2206() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene2206::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x800C6694)
+ readClickedColumn();
+ else if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x11C40840) {
+ if (getGlobalVar(V_SPIKES_RETRACTED))
+ setMessageList(0x004B8948);
+ else
+ setMessageList(0x004B8970);
+ }
+ break;
+ case 0x4803:
+ sendMessage(_asPlatform, 0x4803, 0);
+ break;
+ case 0x480B:
+ if (sender == _ssButton) {
+ setGlobalVar(V_SPIKES_RETRACTED, getGlobalVar(V_SPIKES_RETRACTED) ? 0 : 1);
+ if (getGlobalVar(V_SPIKES_RETRACTED))
+ sendMessage(_asDoorSpikes, 0x4808, 0);
+ else
+ sendMessage(_asDoorSpikes, 0x4809, 0);
+ }
+ break;
+ case 0x4826:
+ sendEntityMessage(_klaymen, 0x1014, _ssTestTube);
+ setMessageList(0x004B8988);
+ break;
+ case 0x482A:
+ klaymenBehindSpikes();
+ break;
+ case 0x482B:
+ klaymenInFrontSpikes();
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2206::klaymenInFrontSpikes() {
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ _palette->addBasePalette(0x41983216, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ }
+ setSurfacePriority(_sprite1->getSurface(), 100);
+ setSurfacePriority(_sprite2->getSurface(), 300);
+ setSurfacePriority(_sprite3->getSurface(), 100);
+ setSurfacePriority(_asDoorSpikes->getSurface(), 200);
+ _klaymen->setClipRect(0, 0, 640, 480);
+}
+
+void Scene2206::klaymenBehindSpikes() {
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ _palette->addBasePalette(0xB103B604, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ }
+ setSurfacePriority(_sprite1->getSurface(), 1100);
+ setSurfacePriority(_sprite2->getSurface(), 1300);
+ setSurfacePriority(_sprite3->getSurface(), 1100);
+ setSurfacePriority(_asDoorSpikes->getSurface(), 1200);
+ _klaymen->setClipRect(_sprite2->getDrawRect().x, 0, _sprite3->getDrawRect().x2(), _sprite1->getDrawRect().y2());
+}
+
+void Scene2206::readClickedColumn() {
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, (_mouseClickPos.x - 354) / 96);
+ if (getGlobalVar(V_CLICKED_COLUMN_INDEX) > 2)
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, 2);
+ setGlobalVar(V_CLICKED_COLUMN_ROW, (_mouseClickPos.y - 183) / 7);
+ setGlobalVar(V_COLUMN_TEXT_NAME, calcHash("stLineagex"));
+ setGlobalVar(V_COLUMN_BACK_NAME, 0);
+ if (ABS(kScene2206XPositions[getGlobalVar(V_CLICKED_COLUMN_INDEX)] - _klaymen->getX()) >= 144)
+ setMessageList2(kScene2206MessageIds1[getGlobalVar(V_CLICKED_COLUMN_INDEX)]);
+ else
+ setMessageList2(kScene2206MessageIds2[getGlobalVar(V_CLICKED_COLUMN_INDEX)]);
+}
+
+static const uint32 kScene2207FileHashes[] = {
+ 0x33B1E12E, 0x33D1E12E, 0x3311E12E,
+ 0x3291E12E, 0x3191E12E, 0x3791E12E,
+ 0x3B91E12E, 0x2391E12E, 0x1391E12E,
+ 0x3BB1E12E, 0x23B1E12E, 0x13B1E12E
+};
+
+AsScene2207Elevator::AsScene2207Elevator(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 900), _parentScene(parentScene), _pointIndex(0), _destPointIndex(0), _destPointIndexDelta(0) {
+
+ NPoint pt;
+
+ _dataResource.load(0x00524846);
+ _pointArray = _dataResource.getPointArray(0x005B02B7);
+ pt = _dataResource.getPoint(0x403A82B1);
+ _x = pt.x;
+ _y = pt.y;
+ createSurface(1100, 129, 103);
+ startAnimation(getGlobalVar(V_LIGHTS_ON) ? 0xC858CC19 : 0x294B3377, 0, 0);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AsScene2207Elevator::update);
+ SetMessageHandler(&AsScene2207Elevator::handleMessage);
+ SetSpriteUpdate(&AsScene2207Elevator::suSetPosition);
+}
+
+AsScene2207Elevator::~AsScene2207Elevator() {
+ _vm->_soundMan->deleteSoundGroup(0x02700413);
+}
+
+void AsScene2207Elevator::update() {
+
+ if (_destPointIndex + _destPointIndexDelta > _pointIndex) {
+ _pointIndex++;
+ startAnimation(getGlobalVar(V_LIGHTS_ON) ? 0xC858CC19 : 0x294B3377, _pointIndex, _pointIndex);
+ _newStickFrameIndex = _pointIndex;
+ if (_destPointIndex + _destPointIndexDelta == _pointIndex) {
+ if (_destPointIndexDelta != 0)
+ _destPointIndexDelta = 0;
+ else {
+ _vm->_soundMan->deleteSound(0xD3B02847);
+ playSound(0, 0x53B8284A);
+ }
+ }
+ }
+
+ if (_destPointIndex + _destPointIndexDelta < _pointIndex) {
+ _pointIndex--;
+ if (_pointIndex == 0)
+ sendMessage(_parentScene, 0x2003, 0);
+ startAnimation(getGlobalVar(V_LIGHTS_ON) ? 0xC858CC19 : 0x294B3377, _pointIndex, _pointIndex);
+ _newStickFrameIndex = _pointIndex;
+ if (_destPointIndex + _destPointIndexDelta == _pointIndex) {
+ if (_destPointIndexDelta != 0)
+ _destPointIndexDelta = 0;
+ else {
+ _vm->_soundMan->deleteSound(0xD3B02847);
+ playSound(0, 0x53B8284A);
+ }
+ }
+ }
+
+ if (_pointIndex > 20 && _surface->getPriority() != 900)
+ sendMessage(_parentScene, 0x2002, 900);
+ else if (_pointIndex < 20 && _surface->getPriority() != 1100)
+ sendMessage(_parentScene, 0x2002, 1100);
+
+ AnimatedSprite::update();
+
+ if (_destPointIndex + _destPointIndexDelta == _pointIndex && _isMoving) {
+ sendMessage(_parentScene, 0x2004, 0);
+ _isMoving = false;
+ }
+
+}
+
+void AsScene2207Elevator::suSetPosition() {
+ _x = (*_pointArray)[_pointIndex].x;
+ _y = (*_pointArray)[_pointIndex].y - 60;
+ updateBounds();
+}
+
+uint32 AsScene2207Elevator::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ moveToY(param.asInteger());
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2207Elevator::moveToY(int16 y) {
+ int16 minDistance = 480;
+
+ if (!_pointArray || _pointArray->size() == 0)
+ return;
+
+ for (uint i = 0; i < _pointArray->size(); i++) {
+ int16 distance = ABS(y - (*_pointArray)[i].y);
+ if (distance < minDistance) {
+ minDistance = distance;
+ _destPointIndex = i;
+ }
+ }
+
+ if (_destPointIndex != _pointIndex) {
+ if (_destPointIndex == 0 || _destPointIndex == (int)_pointArray->size() - 1)
+ _destPointIndexDelta = 0;
+ else if (_destPointIndex < _pointIndex)
+ _destPointIndexDelta = -2;
+ else
+ _destPointIndexDelta = 2;
+ _vm->_soundMan->addSound(0x02700413, 0xD3B02847);
+ _vm->_soundMan->playSoundLooping(0xD3B02847);
+ }
+
+ _isMoving = true;
+
+}
+
+AsScene2207Lever::AsScene2207Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int doDeltaX)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ _x = x;
+ _y = y;
+ createSurface(1010, 71, 73);
+ setDoDeltaX(doDeltaX);
+ startAnimation(0x80880090, 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2207Lever::handleMessage);
+}
+
+uint32 AsScene2207Lever::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x4826, 0);
+ messageResult = 1;
+ break;
+ case 0x3002:
+ gotoNextState();
+ stopAnimation();
+ break;
+ case 0x4807:
+ stLeverUp();
+ break;
+ case 0x480F:
+ stLeverDown();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2207Lever::stLeverDown() {
+ startAnimation(0x80880090, 1, -1);
+ playSound(0, 0x40581882);
+ FinalizeState(&AsScene2207Lever::stLeverDownEvent);
+}
+
+void AsScene2207Lever::stLeverDownEvent() {
+ sendMessage(_parentScene, 0x480F, 0);
+}
+
+void AsScene2207Lever::stLeverUp() {
+ startAnimation(0x80880090, 6, -1);
+ _playBackwards = true;
+ playSound(0, 0x40581882);
+ FinalizeState(&AsScene2207Lever::stLeverUpEvent);
+}
+
+void AsScene2207Lever::stLeverUpEvent() {
+ sendMessage(_parentScene, 0x4807, 0);
+}
+
+AsScene2207WallRobotAnimation::AsScene2207WallRobotAnimation(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1200), _idle(true) {
+
+ _x = 309;
+ _y = 320;
+ createSurface1(0xCCFD6090, 100);
+ startAnimation(0xCCFD6090, 0, -1);
+ _newStickFrameIndex = 0;
+ loadSound(1, 0x40330872);
+ loadSound(2, 0x72A2914A);
+ loadSound(3, 0xD4226080);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2207WallRobotAnimation::handleMessage);
+}
+
+AsScene2207WallRobotAnimation::~AsScene2207WallRobotAnimation() {
+ _vm->_soundMan->deleteSoundGroup(0x80D00820);
+}
+
+uint32 AsScene2207WallRobotAnimation::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (!_idle) {
+ if (param.asInteger() == 0x3423093) {
+ _vm->_soundMan->addSound(0x80D00820, 0x12121943);
+ _vm->_soundMan->playSoundLooping(0x12121943);
+ } else if (param.asInteger() == 0x834AB011) {
+ stopSound(0);
+ stopSound(1);
+ stopSound(2);
+ stopSound(3);
+ _vm->_soundMan->deleteSound(0x12121943);
+ } else if (param.asInteger() == 0x3A980501)
+ playSound(1);
+ else if (param.asInteger() == 0x2A2AD498)
+ playSound(2);
+ else if (param.asInteger() == 0xC4980008)
+ playSound(3);
+ else if (param.asInteger() == 0x06B84228)
+ playSound(0, 0xE0702146);
+ }
+ break;
+ case 0x2006:
+ stStartAnimation();
+ break;
+ case 0x2007:
+ stStopAnimation();
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2207WallRobotAnimation::stStartAnimation() {
+ if (!_idle) {
+ NextState(NULL);
+ } else {
+ startAnimation(0xCCFD6090, 0, -1);
+ _idle = false;
+ setVisible(true);
+ }
+}
+
+void AsScene2207WallRobotAnimation::stStopAnimation() {
+ NextState(&AsScene2207WallRobotAnimation::cbStopAnimation);
+}
+
+void AsScene2207WallRobotAnimation::cbStopAnimation() {
+ stopAnimation();
+ stopSound(0);
+ stopSound(1);
+ stopSound(2);
+ stopSound(3);
+ _vm->_soundMan->deleteSound(0x12121943);
+ _idle = true;
+ setVisible(false);
+}
+
+AsScene2207WallCannonAnimation::AsScene2207WallCannonAnimation(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200), _idle(true) {
+
+ _x = 309;
+ _y = 320;
+ createSurface1(0x8CAA0099, 100);
+ startAnimation(0x8CAA0099, 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2207WallCannonAnimation::handleMessage);
+}
+
+uint32 AsScene2207WallCannonAnimation::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2006:
+ stStartAnimation();
+ break;
+ case 0x2007:
+ stStopAnimation();
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2207WallCannonAnimation::stStartAnimation() {
+ if (!_idle) {
+ NextState(NULL);
+ } else {
+ setVisible(true);
+ startAnimation(0x8CAA0099, 0, -1);
+ _idle = false;
+ }
+}
+
+void AsScene2207WallCannonAnimation::stStopAnimation() {
+ NextState(&AsScene2207WallCannonAnimation::cbStopAnimation);
+}
+
+void AsScene2207WallCannonAnimation::cbStopAnimation() {
+ stopAnimation();
+ setVisible(false);
+ _idle = true;
+}
+
+SsScene2207Symbol::SsScene2207Symbol(NeverhoodEngine *vm, uint32 fileHash, int index)
+ : StaticSprite(vm, fileHash, 100) {
+
+ _x = 330;
+ _y = 246 + index * 50;
+ updatePosition();
+}
+
+Scene2207::Scene2207(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule), _klaymenAtElevator(true), _elevatorSurfacePriority(0) {
+
+ _vm->gameModule()->initCannonSymbolsPuzzle();
+
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x88460852))
+ setSubVar(VA_IS_PUZZLE_INIT, 0x88460852, 1);
+
+ SetMessageHandler(&Scene2207::handleMessage);
+ SetUpdateHandler(&Scene2207::update);
+
+ insertKlaymen<KmScene2207>(0, 0);
+ _klaymen->setRepl(64, 0);
+ setMessageList(0x004B38E8);
+ _asElevator = insertSprite<AsScene2207Elevator>(this);
+
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ setBackground(0x88C00241);
+ setPalette(0x88C00241);
+ insertScreenMouse(0x00245884);
+ _ssMaskPart1 = insertStaticSprite(0xE20A28A0, 1200);
+ _ssMaskPart2 = insertStaticSprite(0x688F62A5, 1100);
+ _ssMaskPart3 = insertStaticSprite(0x0043B038, 1100);
+ _asTape = insertSprite<AsScene1201Tape>(this, 4, 1100, 277, 428, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _asLever = insertSprite<AsScene2207Lever>(this, 527, 333, 0);
+ addCollisionSprite(_asLever);
+ _asWallRobotAnimation = insertSprite<AsScene2207WallRobotAnimation>(this);
+ _asWallCannonAnimation = insertSprite<AsScene2207WallCannonAnimation>();
+ _asWallRobotAnimation->setVisible(false);
+ _asWallCannonAnimation->setVisible(false);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x2C4061C4, 100, 0);
+ _asLever->setClipRect(0, 0, _ssMaskPart3->getDrawRect().x2(), 480);
+ _klaymen->setClipRect(0, _ssMaskPart1->getDrawRect().y, 640, _ssMaskPart2->getDrawRect().y2());
+ _asElevator->setClipRect(0, _ssMaskPart1->getDrawRect().y, 640, _ssMaskPart2->getDrawRect().y2());
+ } else {
+ setGlobalVar(V_SEEN_SYMBOLS_NO_LIGHT, 1);
+ setBackground(0x05C02A55);
+ setPalette(0x05C02A55);
+ insertScreenMouse(0x02A51054);
+ _ssMaskPart1 = insertStaticSprite(0x980E46A4, 1200);
+ insertSprite<SsScene2207Symbol>(kScene2207FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_1, 0)], 0);
+ insertSprite<SsScene2207Symbol>(kScene2207FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_1, 1)], 1);
+ insertSprite<SsScene2207Symbol>(kScene2207FileHashes[getSubVar(VA_GOOD_CANNON_SYMBOLS_1, 2)], 2);
+ _asTape = NULL;
+ _asLever = NULL;
+ _asWallRobotAnimation = NULL;
+ _asWallCannonAnimation = NULL;
+ _ssButton = NULL;
+ _klaymen->setClipRect(0, _ssMaskPart1->getDrawRect().y, 640, 480);
+ _asElevator->setClipRect(0, _ssMaskPart1->getDrawRect().y, 640, 480);
+ }
+
+ _dataResource.load(0x00524846);
+ setRectList(0x004B38B8);
+
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ sendMessage(_asElevator, 0x2000, 480);
+
+ loadSound(1, calcHash("fxFogHornSoft"));
+
+}
+
+void Scene2207::update() {
+ Scene::update();
+ if (_elevatorSurfacePriority != 0) {
+ setSurfacePriority(_asElevator->getSurface(), _elevatorSurfacePriority);
+ _elevatorSurfacePriority = 0;
+ }
+ if (_klaymen->getY() == 423)
+ _klaymenAtElevator = _klaymen->getX() > 459 && _klaymen->getX() < 525;
+}
+
+uint32 Scene2207::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0014F275) {
+ if (_klaymenAtElevator) {
+ sendMessage(_asElevator, 0x2000, _mouseClickPos.y);
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ } else
+ cancelMessageList();
+ } else if (param.asInteger() == 0x34569073) {
+ if (_klaymenAtElevator) {
+ _isKlaymenBusy = true;
+ sendMessage(_asElevator, 0x2000, 0);
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ } else
+ cancelMessageList();
+ } else if (param.asInteger() == 0x4054C877) {
+ if (_klaymenAtElevator) {
+ sendMessage(_asElevator, 0x2000, 480);
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ } else
+ cancelMessageList();
+ } else if (param.asInteger() == 0x0CBC6211) {
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ setRectList(0x004B38B8);
+ } else if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x231DA241) {
+ if (_ssButton)
+ setMessageList(0x004B38F0);
+ else
+ setMessageList(0x004B37D8);
+ }
+ break;
+ case 0x2002:
+ _elevatorSurfacePriority = param.asInteger();
+ break;
+ case 0x2003:
+ _isKlaymenBusy = false;
+ break;
+ case 0x4807:
+ sendMessage(_asWallRobotAnimation, 0x2007, 0);
+ sendMessage(_asWallCannonAnimation, 0x2007, 0);
+ break;
+ case 0x480B:
+ if (sender == _ssButton) {
+ if (getSubVar(VA_LOCKS_DISABLED, 0x40119852)) {
+ setSubVar(VA_LOCKS_DISABLED, 0x40119852, 0);
+ playSound(0, calcHash("fx3LocksDisable"));
+ } else {
+ setSubVar(VA_LOCKS_DISABLED, 0x40119852, 1);
+ playSound(1);
+ }
+ }
+ break;
+ case 0x480F:
+ sendMessage(_asWallRobotAnimation, 0x2006, 0);
+ sendMessage(_asWallCannonAnimation, 0x2006, 0);
+ _asWallRobotAnimation->setVisible(true);
+ _asWallCannonAnimation->setVisible(true);
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ if (_klaymen->getY() == 423) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B3958);
+ }
+ } else if (_klaymenAtElevator) {
+ SetMessageHandler(&Scene2207::handleMessage2);
+ sendMessage(_asElevator, 0x2000, 347);
+ sendEntityMessage(_klaymen, 0x1014, _asElevator);
+ sendMessage(_klaymen, 0x2001, 0);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene2207::handleMessage2(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ _elevatorSurfacePriority = param.asInteger();
+ break;
+ case 0x2004:
+ SetMessageHandler(&Scene2207::handleMessage);
+ sendMessage(_klaymen, 0x2005, 0);
+ sendEntityMessage(_klaymen, 0x1014, _asLever);
+ setMessageList(0x004B3920);
+ setRectList(0x004B3948);
+ break;
+ }
+ return messageResult;
+}
+
+static const uint32 kScene2208FileHashes1[] = {
+ 0x041023CB, 0x041020CB, 0x041026CB, 0x04102ACB,
+ 0x041032CB, 0x041002CB
+};
+
+static const uint32 kScene2208FileHashes2[] = {
+ 0x091206C9, 0x091406C9, 0x091806C9, 0x090006C9,
+ 0x093006C9, 0x095006C9
+};
+
+Scene2208::Scene2208(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _textResource(vm) {
+
+ SpriteResource spriteResource(_vm);
+ const char *textStart, *textEnd;
+
+ if (!getGlobalVar(V_COLUMN_TEXT_NAME))
+ setGlobalVar(V_COLUMN_TEXT_NAME, calcHash("stLineagex"));
+
+ _textResource.load(getGlobalVar(V_COLUMN_TEXT_NAME));
+
+ textStart = _textResource.getString(getGlobalVar(V_CLICKED_COLUMN_INDEX), textEnd);
+ while (textStart < textEnd) {
+ _strings.push_back(textStart);
+ textStart += strlen(textStart) + 1;
+ }
+
+ _maxRowIndex = 8 + 10 * (3 - (getGlobalVar(V_COLUMN_TEXT_NAME) == calcHash("stLineagex") ? 1 : 0));
+
+ _background = new Background(_vm, 0);
+ _background->createSurface(0, 640, 528);
+ _background->getSpriteResource().getPosition().y = 480;
+ addBackground(_background);
+ setPalette(0x08100289);
+ addEntity(_palette);
+ insertPuzzleMouse(0x0028D089, 40, 600);
+
+ _fontSurface = FontSurface::createFontSurface(_vm, 0x0800090C);
+
+ _backgroundSurface = new BaseSurface(_vm, 0, 640, 480, "background");
+ spriteResource.load(0x08100289, true);
+ _backgroundSurface->drawSpriteResourceEx(spriteResource, false, false, 0, 0);
+
+ _topBackgroundSurface = new BaseSurface(_vm, 0, 640, 192, "top background");
+ spriteResource.load(!getGlobalVar(V_COLUMN_BACK_NAME)
+ ? kScene2208FileHashes1[getGlobalVar(V_CLICKED_COLUMN_INDEX) % 6]
+ : getGlobalVar(V_COLUMN_BACK_NAME), true);
+ _topBackgroundSurface->drawSpriteResourceEx(spriteResource, false, false, 0, 0);
+
+ _bottomBackgroundSurface = new BaseSurface(_vm, 0, 640, 192, "bottom background");
+ spriteResource.load(kScene2208FileHashes2[getGlobalVar(V_CLICKED_COLUMN_INDEX) % 6], true);
+ _bottomBackgroundSurface->drawSpriteResourceEx(spriteResource, false, false, 0, 0);
+
+ SetUpdateHandler(&Scene2208::update);
+ SetMessageHandler(&Scene2208::handleMessage);
+
+ _visibleRowsCount = 10;
+ _newRowIndex = (int16)getGlobalVar(V_CLICKED_COLUMN_ROW);
+ if (_newRowIndex + _visibleRowsCount > _maxRowIndex)
+ _newRowIndex = _maxRowIndex - _visibleRowsCount;
+ if (_newRowIndex < 6)
+ _newRowIndex = 0;
+ _rowScrollY = 0;
+ _backgroundScrollY = 48 * _newRowIndex;
+ _currRowIndex = _newRowIndex;
+
+ for (int16 rowIndex = 0; rowIndex < _visibleRowsCount; rowIndex++)
+ drawRow(_newRowIndex + rowIndex);
+
+ _background->getSurface()->getSysRect().y = _backgroundScrollY;
+
+}
+
+Scene2208::~Scene2208() {
+ delete _fontSurface;
+ delete _backgroundSurface;
+ delete _topBackgroundSurface;
+ delete _bottomBackgroundSurface;
+}
+
+void Scene2208::update() {
+
+ int16 mouseY = _vm->getMouseY();
+
+ if (mouseY < 48) {
+ if (_currRowIndex > 0)
+ _newRowIndex = _currRowIndex - 1;
+ } else if (mouseY > 432) {
+ if (_currRowIndex < _maxRowIndex - _visibleRowsCount)
+ _newRowIndex = _currRowIndex + 1;
+ } else {
+ if (_currRowIndex > _newRowIndex)
+ _newRowIndex = _currRowIndex;
+ }
+
+ if (_currRowIndex < _newRowIndex) {
+ if (_rowScrollY == 0)
+ drawRow(_currRowIndex + _visibleRowsCount);
+ _backgroundScrollY += 4;
+ _rowScrollY += 4;
+ if (_rowScrollY == 48) {
+ _rowScrollY = 0;
+ _currRowIndex++;
+ }
+ _background->getSurface()->getSysRect().y = _backgroundScrollY;
+ } else if (_currRowIndex > _newRowIndex || _rowScrollY > 0) {
+ if (_rowScrollY == 0) {
+ drawRow(_currRowIndex - 1);
+ _currRowIndex--;
+ }
+ _backgroundScrollY -= 4;
+ if (_rowScrollY == 0)
+ _rowScrollY = 48;
+ _rowScrollY -= 4;
+ _background->getSurface()->getSysRect().y = _backgroundScrollY;
+ }
+
+ Scene::update();
+
+}
+
+uint32 Scene2208::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 40 || param.asPoint().x >= 600)
+ leaveScene(0);
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2208::drawRow(int16 rowIndex) {
+ NDrawRect sourceRect;
+ int16 y = (rowIndex * 48) % 528;
+ if (rowIndex < 4) {
+ sourceRect.x = 0;
+ sourceRect.y = y;
+ sourceRect.width = 640;
+ sourceRect.height = 48;
+ _background->getSurface()->copyFrom(_topBackgroundSurface->getSurface(), 0, y, sourceRect);
+ } else if (rowIndex > _maxRowIndex - 5) {
+ sourceRect.x = 0;
+ sourceRect.y = (rowIndex - _maxRowIndex + 4) * 48;
+ sourceRect.width = 640;
+ sourceRect.height = 48;
+ _background->getSurface()->copyFrom(_bottomBackgroundSurface->getSurface(), 0, y, sourceRect);
+ } else {
+ rowIndex -= 4;
+ sourceRect.x = 0;
+ sourceRect.y = (rowIndex * 48) % 480;
+ sourceRect.width = 640;
+ sourceRect.height = 48;
+ _background->getSurface()->copyFrom(_backgroundSurface->getSurface(), 0, y, sourceRect);
+ if (rowIndex < (int)_strings.size()) {
+ const char *text = _strings[rowIndex];
+ _fontSurface->drawString(_background->getSurface(), 95, y, (const byte*)text);
+ }
+ }
+}
+
+static const int16 kScene2242XPositions[] = {
+ 68, 158
+};
+
+static const uint32 kScene2242MessageListIds2[] = {
+ 0x004B3CB8, 0x004B3CD8
+};
+
+static const uint32 kScene2242MessageListIds1[] = {
+ 0x004B3CF8, 0x004B3D20
+};
+
+Scene2242::Scene2242(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isKlaymenInLight(false) {
+
+ SetMessageHandler(&Scene2242::handleMessage);
+ SetUpdateHandler(&Scene2242::update);
+
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ setBackground(0x11840E24);
+ setPalette(0x11840E24);
+ insertScreenMouse(0x40E20110);
+ setRectList(0x004B3DC8);
+ } else {
+ setBackground(0x25848E24);
+ setPalette(0x25848E24);
+ addEntity(_palette);
+ _palette->copyBasePalette(0, 256, 0);
+ _palette->addPalette(0x68033B1C, 0, 65, 0);
+ insertScreenMouse(0x48E20250);
+ setRectList(0x004B3E18);
+ }
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 10, 1100, 464, 435, 0x9148A011);
+ addCollisionSprite(_asTape);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2242>(200, 430);
+ setMessageList(0x004B3C18);
+ } else if (which == 1) {
+ // Klaymen entering from looking through the window
+ insertKlaymen<KmScene2242>(530, 430);
+ setMessageList(0x004B3D60);
+ } else if (which == 2) {
+ // Klaymen returning from reading a text column
+ insertKlaymen<KmScene2242>(kScene2242XPositions[!getGlobalVar(V_CLICKED_COLUMN_INDEX) ? 0 : 1], 430);
+ setMessageList(0x004B3D48);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2242>(0, 430);
+ setMessageList(0x004B3C20);
+ }
+
+ _klaymen->setSoundFlag(true);
+
+}
+
+Scene2242::~Scene2242() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+void Scene2242::update() {
+ if (!getGlobalVar(V_LIGHTS_ON)) {
+ if (_isKlaymenInLight && _klaymen->getX() < 440) {
+ _palette->addBasePalette(0x68033B1C, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isKlaymenInLight = false;
+ } else if (!_isKlaymenInLight && _klaymen->getX() >= 440) {
+ _palette->addBasePalette(0x25848E24, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isKlaymenInLight = true;
+ }
+ }
+ Scene::update();
+}
+
+uint32 Scene2242::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x800C6694)
+ readClickedColumn();
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B3D50);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2242::readClickedColumn() {
+ int index;
+ if (_mouseClickPos.x < 108) {
+ setGlobalVar(V_COLUMN_TEXT_NAME, 0x04290188);
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, 42);
+ setGlobalVar(V_COLUMN_BACK_NAME, calcHash("bgRecPanelStart1"));
+ index = 0;
+ } else {
+ setGlobalVar(V_COLUMN_TEXT_NAME, 0x04290188);
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, 43);
+ setGlobalVar(V_COLUMN_BACK_NAME, calcHash("bgRecPanelStart2"));
+ index = 1;
+ }
+ setGlobalVar(V_CLICKED_COLUMN_ROW, (_mouseClickPos.y - 100) / 7);
+ if (ABS(_klaymen->getX() - kScene2242XPositions[index]) < 133)
+ setMessageList2(kScene2242MessageListIds1[index]);
+ else
+ setMessageList2(kScene2242MessageListIds2[index]);
+}
+
+static const int16 kHallOfRecordsKlaymenXPos[] = {
+ 68, 157, 246, 335,
+ 424, 513, 602
+};
+
+static const uint32 kHallOfRecordsSceneMessageListIds2[] = {
+ 0x004B2978, 0x004B2998, 0x004B29B8, 0x004B29D8,
+ 0x004B29F8, 0x004B2A18, 0x004B2A38
+};
+
+static const uint32 kHallOfRecordsSceneMessageListIds1[] = {
+ 0x004B2A58, 0x004B2A80, 0x004B2AA8, 0x004B2AD0,
+ 0x004B2AF8, 0x004B2B20, 0x004B2B48
+};
+
+HallOfRecordsScene::HallOfRecordsScene(NeverhoodEngine *vm, Module *parentModule, int which, uint32 hallOfRecordsInfoId)
+ : Scene(vm, parentModule) {
+
+ _hallOfRecordsInfo = _vm->_staticData->getHallOfRecordsInfoItem(hallOfRecordsInfoId);
+
+ SetMessageHandler(&HallOfRecordsScene::handleMessage);
+ SetUpdateHandler(&Scene::update);
+
+ if (!getGlobalVar(V_LIGHTS_ON) && _hallOfRecordsInfo->bgFilename2) {
+ setRectList(0x004B2BF8);
+ setBackground(_hallOfRecordsInfo->bgFilename2);
+ setPalette(_hallOfRecordsInfo->bgFilename2);
+ insertScreenMouse(0x14320138);
+ } else {
+ setRectList(0x004B2BB8);
+ setBackground(_hallOfRecordsInfo->bgFilename1);
+ setPalette(_hallOfRecordsInfo->bgFilename1);
+ insertScreenMouse(0x63A40028);
+ }
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmHallOfRecords>(200, 430);
+ setMessageList(0x004B2900);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmHallOfRecords>(640, 430);
+ setMessageList(0x004B2910);
+ } else if (which == 2) {
+ // Klaymen returning from reading a text column
+ insertKlaymen<KmHallOfRecords>(kHallOfRecordsKlaymenXPos[getGlobalVar(V_CLICKED_COLUMN_INDEX) - _hallOfRecordsInfo->xPosIndex], 430);
+ setMessageList(0x004B2B70);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmHallOfRecords>(0, 430);
+ setMessageList(0x004B2908);
+ }
+
+ _klaymen->setSoundFlag(true);
+ _klaymen->setKlaymenIdleTable2();
+
+}
+
+HallOfRecordsScene::~HallOfRecordsScene() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 HallOfRecordsScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x800C6694)
+ readClickedColumn();
+ break;
+ }
+ return messageResult;
+}
+
+void HallOfRecordsScene::readClickedColumn() {
+ int16 index = (_mouseClickPos.x - 23) / 89;
+ if (index >= _hallOfRecordsInfo->count)
+ setMessageList2(0x004B2920);
+ else {
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, _hallOfRecordsInfo->xPosIndex + index);
+ setGlobalVar(V_CLICKED_COLUMN_ROW, (_mouseClickPos.y - 100) / 7);
+ setGlobalVar(V_COLUMN_TEXT_NAME, _hallOfRecordsInfo->txFilename);
+ if (index == 0 && _hallOfRecordsInfo->bgFilename3)
+ setGlobalVar(V_COLUMN_BACK_NAME, _hallOfRecordsInfo->bgFilename3);
+ else
+ setGlobalVar(V_COLUMN_BACK_NAME, 0);
+ if (ABS(_klaymen->getX() - kHallOfRecordsKlaymenXPos[index]) < 133)
+ setMessageList2(kHallOfRecordsSceneMessageListIds1[index]);
+ else
+ setMessageList2(kHallOfRecordsSceneMessageListIds2[index]);
+ }
+}
+
+static const int16 kScene2247XPositions[] = {
+ 513, 602
+};
+
+static const uint32 kScene2247MessageListIds2[] = {
+ 0x004B54A0, 0x004B54C0
+};
+
+static const uint32 kScene2247MessageListIds1[] = {
+ 0x004B54E0, 0x004B5508
+};
+
+Scene2247::Scene2247(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene2247::handleMessage);
+ SetUpdateHandler(&Scene::update);
+
+ if (getGlobalVar(V_LIGHTS_ON)) {
+ setRectList(0x004B5588);
+ setBackground(0x40339414);
+ setPalette(0x40339414);
+ insertScreenMouse(0x3941040B);
+ } else {
+ setRectList(0x004B55C8);
+ setBackground(0x071963E5);
+ setPalette(0x071963E5);
+ insertScreenMouse(0x14320138);
+ }
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2247>(200, 430);
+ setMessageList(0x004B5428);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2247>(640, 430);
+ setMessageList(0x004B5438);
+ } else if (which == 2) {
+ // Klaymen returning from reading a text column
+ insertKlaymen<KmScene2247>(kScene2247XPositions[getGlobalVar(V_COLUMN_TEXT_NAME) == 0x0008E486 ? 0 : 1], 430);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ setMessageList(0x004B5530);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2247>(0, 430);
+ setMessageList(0x004B5430);
+ }
+
+ _klaymen->setSoundFlag(true);
+
+}
+
+Scene2247::~Scene2247() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene2247::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x800C6694)
+ readClickedColumn();
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2247::readClickedColumn() {
+ int index;
+ if (_mouseClickPos.x < 553) {
+ setGlobalVar(V_COLUMN_TEXT_NAME, 0x0008E486);
+ setGlobalVar(V_COLUMN_BACK_NAME, calcHash("bgFatherHeader"));
+ index = 0;
+ } else {
+ setGlobalVar(V_COLUMN_TEXT_NAME, 0x03086004);
+ setGlobalVar(V_COLUMN_BACK_NAME, calcHash("bgQuaterHeader"));
+ index = 1;
+ }
+ setGlobalVar(V_CLICKED_COLUMN_INDEX, 0);
+ setGlobalVar(V_CLICKED_COLUMN_ROW, (_mouseClickPos.y - 100) / 7);
+ if (ABS(_klaymen->getX() - kScene2247XPositions[index]) < 133)
+ setMessageList2(kScene2247MessageListIds1[index]);
+ else
+ setMessageList2(kScene2247MessageListIds2[index]);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2200.h b/engines/neverhood/modules/module2200.h
new file mode 100644
index 0000000000..af7171dd53
--- /dev/null
+++ b/engines/neverhood/modules/module2200.h
@@ -0,0 +1,375 @@
+/* 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 NEVERHOOD_MODULES_MODULE2200_H
+#define NEVERHOOD_MODULES_MODULE2200_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/graphics.h"
+
+namespace Neverhood {
+
+// Module2200
+
+class Module2200 : public Module {
+public:
+ Module2200(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2200();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ void createHallOfRecordsScene(int which, uint32 hallOfRecordsInfoId);
+};
+
+// Scene2201
+
+static const NPoint kSsScene2201PuzzleCubePoints[] = {
+ {305, 305}, {321, 305}, {336, 305}, {305, 319},
+ {321, 319}, {336, 319}, {305, 332}, {321, 332},
+ {336, 333}
+};
+
+static const uint32 kSsScene2201PuzzleCubeFileHashes[] = {
+ 0x88134A44, 0xAA124340, 0xB8124602, 0xA902464C,
+ 0x890A4244, 0xA8124642, 0xB812C204, 0x381A4A4C
+};
+
+class AsScene2201CeilingFan : public AnimatedSprite {
+public:
+ AsScene2201CeilingFan(NeverhoodEngine *vm);
+};
+
+class AsScene2201Door : public AnimatedSprite {
+public:
+ AsScene2201Door(NeverhoodEngine *vm, Klaymen *klaymen, Sprite *ssDoorLight, bool isOpen);
+protected:
+ Klaymen *_klaymen;
+ Sprite *_ssDoorLight;
+ bool _isOpen;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stOpenDoor();
+ void stCloseDoor();
+};
+
+class SsScene2201PuzzleCube : public StaticSprite {
+public:
+ SsScene2201PuzzleCube(NeverhoodEngine *vm, uint32 positionIndex, uint32 cubeIndex);
+};
+
+class Scene2201 : public Scene {
+public:
+ Scene2201(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2201();
+protected:
+ NRect _clipRects[2];
+ Sprite *_ssDoorLight;
+ Sprite *_asDoor;
+ Sprite *_ssDoorButton;
+ Sprite *_asTape;
+ bool _isSoundPlaying;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2202PuzzleCube : public StaticSprite {
+public:
+ SsScene2202PuzzleCube(NeverhoodEngine *vm, Scene *parentScene, int16 cubePosition, int16 cubeSymbol);
+protected:
+ Scene *_parentScene;
+ int16 _cubeSymbol;
+ int16 _cubePosition;
+ int16 _newX, _newY;
+ int16 _xDelta, _yDelta;
+ int16 _xIncr;
+ int16 _yIncr;
+ int16 _errValue;
+ int16 _counter;
+ int16 _xFlagPos;
+ bool _counterDirection;
+ bool _isMoving;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoveCubeX();
+ void suMoveCubeY();
+ void moveCube(int16 newCubePosition);
+ void stopMoving();
+};
+
+class Scene2202 : public Scene {
+public:
+ Scene2202(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2202();
+protected:
+ Sprite *_ssMovingCube;
+ Sprite *_ssDoneMovingCube;
+ bool _isCubeMoving;
+ int16 _movingCubePosition;
+ int _surfacePriority;
+ bool _leaveScene;
+ bool _isSolved;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ int16 getFreeCubePosition(int16 index);
+ bool testIsSolved();
+};
+
+class AsCommonKey : public AnimatedSprite {
+public:
+ AsCommonKey(NeverhoodEngine *vm, Scene *parentScene, int keyIndex, int surfacePriority, int16 x, int16 y);
+protected:
+ Scene *_parentScene;
+ int _keyIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2203Door : public AnimatedSprite {
+public:
+ AsScene2203Door(NeverhoodEngine *vm, Scene *parentScene, uint doorIndex);
+protected:
+ Scene *_parentScene;
+ Sprite *_otherDoor;
+ uint _doorIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void openDoor();
+ void closeDoor();
+};
+
+class Scene2203 : public Scene {
+public:
+ Scene2203(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2203();
+protected:
+ Sprite *_asLeftDoor;
+ Sprite *_asRightDoor;
+ Sprite *_ssSmallLeftDoor;
+ Sprite *_ssSmallRightDoor;
+ Sprite *_asTape;
+ Sprite *_asKey;
+ NRect _leftDoorClipRect;
+ NRect _rightDoorClipRect;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2205DoorFrame : public StaticSprite {
+public:
+ SsScene2205DoorFrame(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2205 : public Scene {
+public:
+ Scene2205(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ SsCommonPressButton *_ssLightSwitch;
+ Sprite *_ssDoorFrame;
+ bool _isKlaymenInLight;
+ bool _isLightOn;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2206DoorSpikes : public StaticSprite {
+public:
+ AsScene2206DoorSpikes(NeverhoodEngine *vm, uint32 fileHash);
+protected:
+ int _deltaIndex;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suOpen();
+ void suClose();
+};
+
+class AsScene2206Platform : public StaticSprite {
+public:
+ AsScene2206Platform(NeverhoodEngine *vm, uint32 fileHash);
+protected:
+ int16 _yDelta;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoveDown();
+};
+
+class SsScene2206TestTube : public StaticSprite {
+public:
+ SsScene2206TestTube(NeverhoodEngine *vm, Scene *parentScene, int surfacePriority, uint32 fileHash);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2206 : public Scene {
+public:
+ Scene2206(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2206();
+protected:
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_asDoorSpikes;
+ Sprite *_ssButton;
+ Sprite *_asPlatform;
+ Sprite *_ssTestTube;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void klaymenInFrontSpikes();
+ void klaymenBehindSpikes();
+ void readClickedColumn();
+};
+
+class AsScene2207Elevator : public AnimatedSprite {
+public:
+ AsScene2207Elevator(NeverhoodEngine *vm, Scene *parentScene);
+ ~AsScene2207Elevator();
+protected:
+ Scene *_parentScene;
+ NPointArray *_pointArray;
+ int16 _pointIndex;
+ int16 _destPointIndex, _destPointIndexDelta;
+ bool _isMoving;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suSetPosition();
+ void moveToY(int16 y);
+};
+
+class AsScene2207Lever : public AnimatedSprite {
+public:
+ AsScene2207Lever(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16 y, int doDeltaX);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stLeverDown();
+ void stLeverDownEvent();
+ void stLeverUp();
+ void stLeverUpEvent();
+};
+
+class AsScene2207WallRobotAnimation : public AnimatedSprite {
+public:
+ AsScene2207WallRobotAnimation(NeverhoodEngine *vm, Scene *parentScene);
+ ~AsScene2207WallRobotAnimation();
+protected:
+ bool _idle;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stStartAnimation();
+ void stStopAnimation();
+ void cbStopAnimation();
+};
+
+class AsScene2207WallCannonAnimation : public AnimatedSprite {
+public:
+ AsScene2207WallCannonAnimation(NeverhoodEngine *vm);
+protected:
+ bool _idle;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stStartAnimation();
+ void stStopAnimation();
+ void cbStopAnimation();
+};
+
+class SsScene2207Symbol : public StaticSprite {
+public:
+ SsScene2207Symbol(NeverhoodEngine *vm, uint32 fileHash, int index);
+};
+
+class Scene2207 : public Scene {
+public:
+ Scene2207(NeverhoodEngine *vm, Module *parentModule);
+protected:
+ Sprite *_asElevator;
+ Sprite *_ssMaskPart1;
+ Sprite *_ssMaskPart2;
+ Sprite *_ssMaskPart3;
+ Sprite *_asTape;
+ Sprite *_asLever;
+ Sprite *_asWallRobotAnimation;
+ Sprite *_asWallCannonAnimation;
+ Sprite *_ssButton;
+ int _elevatorSurfacePriority;
+ bool _klaymenAtElevator;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 handleMessage2(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2208 : public Scene {
+public:
+ Scene2208(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2208();
+protected:
+ FontSurface *_fontSurface;
+ BaseSurface *_backgroundSurface;
+ BaseSurface *_topBackgroundSurface;
+ BaseSurface *_bottomBackgroundSurface;
+ TextResource _textResource;
+ int16 _backgroundScrollY;
+ int16 _newRowIndex;
+ int16 _currRowIndex;
+ int16 _rowScrollY;
+ int16 _maxRowIndex;
+ int16 _visibleRowsCount;
+ Common::Array<const char*> _strings;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void drawRow(int16 rowIndex);
+};
+
+class Scene2242 : public Scene {
+public:
+ Scene2242(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2242();
+protected:
+ Sprite *_asTape;
+ bool _isKlaymenInLight;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void readClickedColumn();
+};
+
+class HallOfRecordsScene : public Scene {
+public:
+ HallOfRecordsScene(NeverhoodEngine *vm, Module *parentModule, int which, uint32 hallOfRecordsInfoId);
+ ~HallOfRecordsScene();
+protected:
+ HallOfRecordsInfo *_hallOfRecordsInfo;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void readClickedColumn();
+};
+
+class Scene2247 : public Scene {
+public:
+ Scene2247(NeverhoodEngine *vm, Module *parentModule, int which);
+ ~Scene2247();
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void readClickedColumn();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2200_H */
diff --git a/engines/neverhood/modules/module2300.cpp b/engines/neverhood/modules/module2300.cpp
new file mode 100644
index 0000000000..b434fb98c0
--- /dev/null
+++ b/engines/neverhood/modules/module2300.cpp
@@ -0,0 +1,186 @@
+/* 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 "neverhood/modules/module2300.h"
+#include "neverhood/navigationscene.h"
+
+namespace Neverhood {
+
+static const uint32 kModule2300SoundList[] = {
+ 0x90805C50, 0x90804450, 0xB4005E60, 0x91835066,
+ 0x90E14440, 0x90F0D1C3, 0
+};
+
+Module2300::Module2300(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _soundVolume(0) {
+
+ _vm->_soundMan->addSoundList(0x1A214010, kModule2300SoundList);
+ _vm->_soundMan->setSoundListParams(kModule2300SoundList, true, 50, 600, 10, 150);
+
+ _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+
+ if (_isWallBroken) {
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
+ _vm->_soundMan->playSoundLooping(0x90F0D1C3);
+ } else {
+ _vm->_soundMan->setSoundParams(0x90F0D1C3, false, 0, 0, 0, 0);
+ }
+
+ _vm->_soundMan->playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->playTwoSounds(0x1A214010, 0x41861371, 0x43A2507F, 0);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 1)
+ createScene(2, 0);
+ else if (which == 2)
+ createScene(3, 0);
+ else if (which == 3)
+ createScene(4, -1);
+ else if (which == 4)
+ createScene(1, 3);
+ else
+ createScene(0, 1);
+
+}
+
+Module2300::~Module2300() {
+ _vm->_soundMan->deleteGroup(0x1A214010);
+}
+
+void Module2300::createScene(int sceneNum, int which) {
+ debug(1, "Module2300::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ createNavigationScene(0x004B67B8, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(0x004B67E8, which);
+ if (_isWallBroken) {
+ _soundVolume = 15;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 15);
+ }
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ createNavigationScene(0x004B6878, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ if (getGlobalVar(V_WALL_BROKEN))
+ createNavigationScene(0x004B68F0, which);
+ else {
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ createNavigationScene(0x004B68A8, which);
+ if (_isWallBroken) {
+ _soundVolume = 87;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 87);
+ }
+ }
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->setTwoSoundsPlayFlag(true);
+ createSmackerScene(0x20080A0B, true, true, false);
+ break;
+ case 9999:
+ createDemoScene();
+ break;
+ }
+ SetUpdateHandler(&Module2300::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2300::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(1, 4);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ if (_moduleResult == 1)
+ createScene(0, 0);
+ else if (_vm->isDemo())
+ createScene(9999, 0);
+ else if (_moduleResult == 2)
+ createScene(2, 1);
+ else if (_moduleResult == 3)
+ createScene(1, 3);
+ else if (_moduleResult == 4)
+ createScene(3, 1);
+ else if (_moduleResult == 5)
+ leaveModule(3);
+ else
+ leaveModule(4);
+ break;
+ case 2:
+ if (_moduleResult == 1)
+ leaveModule(1);
+ else
+ createScene(1, 5);
+ break;
+ case 3:
+ if (_moduleResult == 1)
+ leaveModule(2);
+ else
+ createScene(1, 1);
+ break;
+ case 4:
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ createScene(1, 2);
+ break;
+ case 9999:
+ createScene(1, -1);
+ break;
+ }
+ } else {
+ switch (_sceneNum) {
+ case 1:
+ if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 4 &&
+ navigationScene()->getFrameNumber() % 2) {
+ _soundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ }
+ if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 0 &&
+ navigationScene()->getFrameNumber() == 50) {
+ _vm->_soundMan->playTwoSounds(0x1A214010, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
+ }
+ break;
+ case 3:
+ if (_isWallBroken && navigationScene()->isWalkingForward() && navigationScene()->getFrameNumber() % 2) {
+ _soundVolume--;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ }
+ break;
+ }
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2300.h b/engines/neverhood/modules/module2300.h
new file mode 100644
index 0000000000..0a1e1d57a4
--- /dev/null
+++ b/engines/neverhood/modules/module2300.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 NEVERHOOD_MODULES_MODULE2300_H
+#define NEVERHOOD_MODULES_MODULE2300_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module2300
+
+class Module2300 : public Module {
+public:
+ Module2300(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2300();
+protected:
+ int _sceneNum;
+ bool _isWallBroken;
+ int _soundVolume;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2300_H */
diff --git a/engines/neverhood/modules/module2400.cpp b/engines/neverhood/modules/module2400.cpp
new file mode 100644
index 0000000000..47f842b939
--- /dev/null
+++ b/engines/neverhood/modules/module2400.cpp
@@ -0,0 +1,992 @@
+/* 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 "neverhood/modules/module2400.h"
+
+namespace Neverhood {
+
+Module2400::Module2400(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ _vm->_soundMan->addMusic(0x202D1010, 0xB110382D);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, _vm->gameState().which);
+ else
+ createScene(0, 0);
+
+}
+
+Module2400::~Module2400() {
+ _vm->_soundMan->deleteMusicGroup(0x202D1010);
+}
+
+void Module2400::createScene(int sceneNum, int which) {
+ debug(1, "Module2400::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 0);
+ _childObject = new Scene2401(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->startMusic(0xB110382D, 0, 2);
+ _childObject = new Scene2402(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->startMusic(0xB110382D, 0, 0);
+ _childObject = new Scene2403(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 2);
+ _childObject = new DiskplayerScene(_vm, this, 0);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->_soundMan->startMusic(0xB110382D, 0, 2);
+ _childObject = new Scene2406(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->stopMusic(0xB110382D, 0, 2);
+ createSmackerScene(0x20D80001, true, true, false);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ createStaticScene(0x81523218, 0x2321C81D);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ createStaticScene(0x08100210, 0x00214089);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ createStaticScene(0x8C020505, 0x205018C8);
+ break;
+ }
+ SetUpdateHandler(&Module2400::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2400::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(1, 0);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ if (_moduleResult == 1)
+ createScene(5, 0);
+ else if (_moduleResult == 2)
+ createScene(7, -1);
+ else
+ createScene(0, 1);
+ break;
+ case 2:
+ if (_moduleResult == 1)
+ createScene(9, -1);
+ else if (_moduleResult == 2)
+ createScene(6, -1);
+ else
+ createScene(5, 1);
+ break;
+ case 4:
+ createScene(5, 2);
+ break;
+ case 5:
+ if (_moduleResult == 1)
+ createScene(2, 0);
+ else if (_moduleResult == 2)
+ createScene(4, 0);
+ else if (_moduleResult == 3)
+ createScene(8, -1);
+ else
+ createScene(1, 1);
+ break;
+ case 6:
+ createScene(2, 2);
+ break;
+ case 7:
+ createScene(1, 2);
+ break;
+ case 8:
+ createScene(5, 3);
+ break;
+ case 9:
+ createScene(2, 1);
+ break;
+ }
+ }
+}
+
+static const NPoint kScene2401Points[] = {
+ {384, 389}, {406, 389}, {429, 389},
+ {453, 389}, {477, 389}
+};
+
+static const uint32 kScene2401FileHashes1[] = {
+ 0x02842920, 0x02882920, 0x02902920,
+ 0x02A02920, 0x02C02920, 0x02002920,
+ 0x03802920, 0x00802920, 0x06802920,
+ 0x03842920
+};
+
+static const uint32 kScene2401FileHashes2[] = {
+ 0xD0910020, 0xD0910038, 0xD0910008,
+ 0xD0910068, 0xD09100A8, 0
+};
+
+static const uint32 kScene2401FileHashes3[] = {
+ 0xD0910020, 0xD0910038, 0xD0910008,
+ 0xD0910068, 0xD09100A8, 0
+};
+
+static const NRect kScene2401Rects[] = {
+ NRect(369, 331, 394, 389),
+ NRect(395, 331, 419, 389),
+ NRect(420, 331, 441, 389),
+ NRect(442, 331, 464, 389),
+ NRect(465, 331, 491, 389)
+};
+
+static const uint32 kAsScene2401WaterSpitFileHashes2[] = {
+ 0x5C044690, 0x5C644690, 0x5CA44690,
+ 0x5D244690, 0x5E244690
+};
+
+static const uint32 kAsScene2401WaterSpitFileHashes1[] = {
+ 0xF4418408, 0xF4418808, 0xF4419008,
+ 0xF441A008, 0xCD4F8411
+};
+
+AsScene2401WaterSpit::AsScene2401WaterSpit(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200) {
+
+ _x = 240;
+ _y = 447;
+ createSurface(100, 146, 74);
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2401WaterSpit::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+}
+
+uint32 AsScene2401WaterSpit::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x120A0013)
+ playSound(0, kAsScene2401WaterSpitFileHashes1[_soundIndex]);
+ break;
+ case 0x2000:
+ _x = 240;
+ _y = 447;
+ _soundIndex = getSubVar(VA_CURR_WATER_PIPES_LEVEL, param.asInteger());
+ startAnimation(kAsScene2401WaterSpitFileHashes2[param.asInteger()], 0, -1);
+ setVisible(true);
+ playSound(0, 0x48640244);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2401FlowingWater::AsScene2401FlowingWater(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200), _isWaterFlowing(false) {
+
+ _x = 88;
+ _y = 421;
+ createSurface1(0x10203116, 100);
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2401FlowingWater::handleMessage);
+}
+
+AsScene2401FlowingWater::~AsScene2401FlowingWater() {
+ _vm->_soundMan->deleteSoundGroup(0x40F11C09);
+}
+
+uint32 AsScene2401FlowingWater::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (_isWaterFlowing && param.asInteger() == 0x02421405)
+ startAnimationByHash(0x10203116, 0x01084280, 0);
+ break;
+ case 0x2002:
+ if (!_isWaterFlowing) {
+ _vm->_soundMan->addSound(0x40F11C09, 0x980C1420);
+ _vm->_soundMan->playSoundLooping(0x980C1420);
+ startAnimation(0x10203116, 0, -1);
+ setVisible(true);
+ _isWaterFlowing = true;
+ }
+ break;
+ case 0x2003:
+ _vm->_soundMan->deleteSound(0x980C1420);
+ _isWaterFlowing = false;
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2401WaterFlushing::AsScene2401WaterFlushing(NeverhoodEngine *vm, int16 x, int16 y)
+ : AnimatedSprite(vm, 1200), _countdown(0), _flushLoopCount(0) {
+
+ _x = x;
+ _y = y;
+ createSurface1(0xB8596884, 100);
+ setVisible(false);
+ SetUpdateHandler(&AsScene2401WaterFlushing::update);
+ SetMessageHandler(&AsScene2401WaterFlushing::handleMessage);
+}
+
+void AsScene2401WaterFlushing::update() {
+ if (_countdown != 0 && (--_countdown) == 0) {
+ setDoDeltaX(_vm->_rnd->getRandomNumber(1));
+ startAnimation(0xB8596884, 0, -1);
+ setVisible(true);
+ }
+ AnimatedSprite::update();
+}
+
+uint32 AsScene2401WaterFlushing::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (_flushLoopCount > 0 && param.asInteger() == 0x02421405) {
+ startAnimationByHash(0xB8596884, 0x01084280, 0);
+ _flushLoopCount--;
+ }
+ break;
+ case 0x2002:
+ if (param.asInteger() > 0) {
+ _flushLoopCount = param.asInteger() - 1;
+ _countdown = _vm->_rnd->getRandomNumber(3) + 1;
+ }
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2401Door::AsScene2401Door(NeverhoodEngine *vm, bool isOpen)
+ : AnimatedSprite(vm, 1100), _countdown(0), _isOpen(isOpen) {
+
+ _x = 320;
+ _y = 240;
+ createSurface1(0x44687810, 100);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ if (_isOpen) {
+ stopAnimation();
+ setVisible(false);
+ _countdown = 48;
+ } else {
+ startAnimation(0x44687810, 0, -1);
+ _newStickFrameIndex = 0;
+ }
+ SetUpdateHandler(&AsScene2401Door::update);
+ SetMessageHandler(&AsScene2401Door::handleMessage);
+}
+
+void AsScene2401Door::update() {
+ if (_isOpen && _countdown != 0 && (--_countdown) == 0) {
+ _isOpen = false;
+ setVisible(true);
+ startAnimation(0x44687810, -1, -1);
+ _newStickFrameIndex = 0;
+ _playBackwards = true;
+ playSound(0, calcHash("fxDoorClose38"));
+ }
+ AnimatedSprite::update();
+}
+
+uint32 AsScene2401Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2004:
+ if (_isOpen)
+ _countdown = 168;
+ messageResult = _isOpen ? 1 : 0;
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ if (!_isOpen) {
+ _countdown = 168;
+ _isOpen = true;
+ setVisible(true);
+ startAnimation(0x44687810, 0, -1);
+ playSound(0, calcHash("fxDoorOpen38"));
+ NextState(&AsScene2401Door::stDoorOpenFinished);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2401Door::stDoorOpenFinished() {
+ stopAnimation();
+ setVisible(false);
+}
+
+Scene2401::Scene2401(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown1(0), _countdown2(0), _unkFlag(false),
+ _soundToggle(false), _asWaterSpitIndex(0) {
+
+ _vm->gameModule()->initWaterPipesPuzzle();
+
+ SetMessageHandler(&Scene2401::handleMessage);
+ SetUpdateHandler(&Scene2401::update);
+
+ setRectList(0x004B3140);
+ setBackground(0x8C030206);
+ setPalette(0x8C030206);
+ addEntity(_palette);
+ _palette->addBasePalette(0x8C030206, 0, 256, 0);
+ _palette->addPalette(0x91D3A391, 0, 65, 0);
+ insertScreenMouse(0x302028C8);
+
+ _sprite1 = insertStaticSprite(0x2E068A23, 200);
+ insertStaticSprite(0x401410A6, 200);
+ _asFlowingWater = insertSprite<AsScene2401FlowingWater>();
+ insertStaticSprite(0x90C0A4B4, 200);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x0092916A, 100, 0);
+ _ssFloorButton = insertSprite<SsCommonFloorButton>(this, 0x28001120, 0x00911068, 100, 0);
+
+ for (uint i = 0; i < 5; i++)
+ _asWaterFlushing[i] = insertSprite<AsScene2401WaterFlushing>(kScene2401Points[i].x, kScene2401Points[i].y);
+
+ for (uint i = 0; i < 10; i++) {
+ _ssWaterPipes[i] = insertStaticSprite(kScene2401FileHashes1[i], 300);
+ _ssWaterPipes[i]->setVisible(false);
+ }
+
+ _asWaterSpit[0] = insertSprite<AsScene2401WaterSpit>();
+ _asWaterSpit[1] = insertSprite<AsScene2401WaterSpit>();
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2401>(200, 447);
+ setMessageList(0x004B2F70);
+ _asDoor = insertSprite<AsScene2401Door>(false);
+ } else if (which == 1) {
+ // Klaymen entering from the back
+ insertKlaymen<KmScene2401>(280, 413);
+ setMessageList(0x004B2F80);
+ _palette->addBasePalette(0xB103B604, 0, 65, 0);
+ _palette->addPalette(0xB103B604, 0, 65, 0);
+ _asDoor = insertSprite<AsScene2401Door>(true);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2401>(-20, 447);
+ setMessageList(0x004B2F78);
+ _asDoor = insertSprite<AsScene2401Door>(false);
+ }
+
+}
+
+void Scene2401::update() {
+
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ if (_pipeStatus > 0 && _pipeStatus <= 10)
+ _ssWaterPipes[_pipeStatus - 1]->setVisible(false);
+ if (_pipeStatus >= 10) {
+ bool puzzleSolved = true, waterInside = false;
+ for (uint pipeIndex = 0; pipeIndex < 5; pipeIndex++) {
+ if (getSubVar(VA_CURR_WATER_PIPES_LEVEL, pipeIndex) != getSubVar(VA_GOOD_WATER_PIPES_LEVEL, pipeIndex))
+ puzzleSolved = false;
+ if (getSubVar(VA_CURR_WATER_PIPES_LEVEL, pipeIndex) != 0)
+ waterInside = true;
+ }
+ if (puzzleSolved) {
+ setGlobalVar(V_NOTES_DOOR_UNLOCKED, 1);
+ setGlobalVar(V_NOTES_PUZZLE_SOLVED, 1);
+ sendMessage(_asDoor, 0x4808, 0);
+ } else if (waterInside) {
+ playPipeSound(0xD0431020);
+ for (uint i = 0; i < 5; i++) {
+ sendMessage(_asWaterFlushing[i], 0x2002, getSubVar(VA_CURR_WATER_PIPES_LEVEL, i));
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, i, 0);
+ }
+ }
+ } else if (_pipeStatus >= 5) {
+ _ssWaterPipes[_pipeStatus]->setVisible(true);
+ _countdown1 = 8;
+ playPipeSound(kScene2401FileHashes3[getSubVar(VA_CURR_WATER_PIPES_LEVEL, _pipeStatus - 5)]);
+ } else {
+ _ssWaterPipes[_pipeStatus]->setVisible(true);
+ _countdown1 = _pipeStatus == 4 ? 16 : 8;
+ playPipeSound(kScene2401FileHashes3[getSubVar(VA_GOOD_WATER_PIPES_LEVEL, _pipeStatus)]);
+ }
+ _pipeStatus++;
+ }
+
+ if (_countdown2 != 0 && (--_countdown2) == 0)
+ sendMessage(_asFlowingWater, 0x2003, 0);
+
+ Scene::update();
+
+}
+
+uint32 Scene2401::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x02144CB1)
+ sendEntityMessage(_klaymen, 0x1014, _ssFloorButton);
+ else if (param.asInteger() == 0x11C40840) {
+ if (getGlobalVar(V_NOTES_DOOR_UNLOCKED) && sendMessage(_asDoor, 0x2004, 0))
+ setMessageList(0x004B3090);
+ else
+ setMessageList(0x004B30B0);
+ } else if (param.asInteger() == 0x412722C0) {
+ if (_countdown2 > 0 && getGlobalVar(V_HAS_TEST_TUBE)) {
+ _countdown2 = 144;
+ setMessageList(0x004B3020);
+ } else
+ setMessageList(0x004B3050);
+ } else if (param.asInteger() == 0x21142050) {
+ if (_unkFlag && _countdown1 == 0 && !getGlobalVar(V_NOTES_PUZZLE_SOLVED))
+ setMessageList(0x004B2FA8);
+ else
+ setMessageList(0x004B2FC8);
+ } else if (param.asInteger() == 0x87441031)
+ setSurfacePriority(_sprite1->getSurface(), 1100);
+ else if (param.asInteger() == 0x80C40322) {
+ setSurfacePriority(_sprite1->getSurface(), 200);
+ cancelMessageList();
+ _unkFlag = true;
+ } else if (param.asInteger() == 0x09C4B40A && _countdown2 > 12)
+ _countdown2 = 12;
+ break;
+ case 0x2000:
+ messageResult = 0;
+ for (uint32 i = 0; i < 5; i++)
+ if (kScene2401Rects[i].contains(_mouseClickPos.x, _mouseClickPos.y)) {
+ messageResult = i;
+ break;
+ }
+ break;
+ case 0x2001:
+ sendMessage(_asWaterSpit[_asWaterSpitIndex], 0x2000, param.asInteger());
+ _asWaterSpitIndex = (_asWaterSpitIndex + 1) & 1;
+ incSubVar(VA_CURR_WATER_PIPES_LEVEL, param.asInteger(), 1);
+ if (getSubVar(VA_CURR_WATER_PIPES_LEVEL, param.asInteger()) >= 5)
+ setSubVar(VA_CURR_WATER_PIPES_LEVEL, param.asInteger(), 4);
+ break;
+ case 0x480B:
+ if (sender == _ssButton) {
+ _pipeStatus = 0;
+ _countdown1 = 8;
+ } else if (sender == _ssFloorButton && getGlobalVar(V_WATER_RUNNING)) {
+ _countdown2 = 144;
+ sendMessage(_asFlowingWater, 0x2002, 0);
+ playSound(0, 0xE1130324);
+ }
+ break;
+ case 0x482A:
+ _palette->addBasePalette(0xB103B604, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ break;
+ case 0x482B:
+ _palette->addBasePalette(0x91D3A391, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2401::playPipeSound(uint32 fileHash) {
+ playSound(_soundToggle ? 0 : 1, fileHash);
+ _soundToggle = !_soundToggle;
+}
+
+static const uint32 kScene2402FileHashes[] = {
+ 0xD0910020, 0xD0910038, 0xD0910008,
+ 0xD0910068, 0xD09100A8
+};
+
+AsScene2402Door::AsScene2402Door(NeverhoodEngine *vm, Scene *parentScene, bool isOpen)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _isOpen(isOpen), _countdown(0) {
+
+ _x = 320;
+ _y = 240;
+ createSurface1(0x80495831, 100);
+ if (_isOpen) {
+ startAnimation(0x80495831, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ _countdown = 48;
+ } else {
+ stopAnimation();
+ setVisible(false);
+ }
+ SetUpdateHandler(&AsScene2402Door::update);
+ SetMessageHandler(&AsScene2402Door::handleMessage);
+}
+
+void AsScene2402Door::update() {
+ if (_isOpen && _countdown != 0 && (--_countdown) == 0) {
+ _isOpen = false;
+ setVisible(true);
+ startAnimation(0x80495831, -1, -1);
+ _playBackwards = true;
+ playSound(0, calcHash("fxDoorClose38"));
+ NextState(&AsScene2402Door::stDoorClosingFinished);
+ }
+ AnimatedSprite::update();
+}
+
+uint32 AsScene2402Door::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (_isOpen)
+ _countdown = 144;
+ messageResult = _isOpen ? 1 : 0;
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x4808:
+ _countdown = 144;
+ _isOpen = true;
+ setVisible(true);
+ startAnimation(0x80495831, 0, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ playSound(0, calcHash("fxDoorOpen38"));
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2402Door::stDoorClosingFinished() {
+ sendMessage(_parentScene, 0x2001, 0);
+ setVisible(false);
+}
+
+AsScene2402TV::AsScene2402TV(NeverhoodEngine *vm, Klaymen *klaymen)
+ : AnimatedSprite(vm, 1100), _klaymen(klaymen), _countdown1(0), _countdown2(0) {
+
+ _x = 260;
+ _y = 210;
+ createSurface(100, 127, 90);
+ setDoDeltaX(1);
+ SetMessageHandler(&Sprite::handleMessage);
+ if (!getGlobalVar(V_TV_JOKE_TOLD)) {
+ loadSound(0, 0x58208810);
+ _countdown1 = 48;
+ startAnimation(0x4919397A, 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AsScene2402TV::upWait);
+ } else {
+ int16 frameIndex;
+ if (_klaymen->getX() > 320)
+ _currFrameIndex = 29;
+ frameIndex = CLIP<int16>((_klaymen->getX() - _x + 150) / 10, 0, 29);
+ startAnimation(0x050A0103, frameIndex, -1);
+ _newStickFrameIndex = frameIndex;
+ _countdown1 = 0;
+ SetUpdateHandler(&AsScene2402TV::upFocusKlaymen);
+ }
+}
+
+AsScene2402TV::~AsScene2402TV() {
+ _vm->_soundMan->deleteSoundGroup(0x01520123);
+}
+
+void AsScene2402TV::upWait() {
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ startAnimation(0x4919397A, 0, -1);
+ SetMessageHandler(&AsScene2402TV::hmJoke);
+ NextState(&AsScene2402TV::stJokeFinished);
+ }
+ AnimatedSprite::update();
+}
+
+void AsScene2402TV::upFocusKlaymen() {
+ int16 frameIndex = CLIP<int16>((_klaymen->getX() - _x + 150) / 10, 0, 29);
+ if (frameIndex != _currFrameIndex) {
+ if (frameIndex > _currFrameIndex)
+ _currFrameIndex++;
+ else if (frameIndex < _currFrameIndex)
+ _currFrameIndex--;
+ startAnimation(0x050A0103, _currFrameIndex, -1);
+ _newStickFrameIndex = _currFrameIndex;
+ if (_countdown2 == 0) {
+ _vm->_soundMan->addSound(0x01520123, 0xC42D4528);
+ _vm->_soundMan->playSoundLooping(0xC42D4528);
+ }
+ _countdown2 = 5;
+ } else if (_countdown2 != 0 && (--_countdown2 == 0))
+ _vm->_soundMan->deleteSound(0xC42D4528);
+ AnimatedSprite::update();
+}
+
+void AsScene2402TV::stJokeFinished() {
+ setGlobalVar(V_TV_JOKE_TOLD, 1);
+ startAnimation(0x050A0103, 0, -1);
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AsScene2402TV::upFocusKlaymen);
+}
+
+uint32 AsScene2402TV::hmJoke(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x431EA0B0)
+ playSound(0);
+ break;
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+Scene2402::Scene2402(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown(0), _soundToggle(false) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2402::handleMessage);
+ SetUpdateHandler(&Scene2402::update);
+
+ setRectList(0x004AF900);
+ setBackground(0x81660220);
+ setPalette(0x81660220);
+ insertScreenMouse(0x6022481E);
+ _asTape = insertSprite<AsScene1201Tape>(this, 9, 1100, 286, 409, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x15288120, 100, 0);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2402>(198, 404);
+ setMessageList(0x004AF7C8);
+ } else if (which == 1) {
+ // Klaymen entering from the right
+ insertKlaymen<KmScene2402>(660, 404);
+ setMessageList(0x004AF7D8);
+ } else if (which == 2) {
+ // Klaymen returning from looking through the window
+ insertKlaymen<KmScene2402>(409, 404);
+ _klaymen->setDoDeltaX(getGlobalVar(V_KLAYMEN_IS_DELTA_X) ? 1 : 0);
+ setMessageList(0x004AF888);
+ } else {
+ // Klaymen entering from the left
+ insertKlaymen<KmScene2402>(0, 404);
+ setMessageList(0x004AF7D0);
+ }
+
+ tempSprite = insertStaticSprite(0x081A60A8, 1100);
+ _ssDoorFrame = (StaticSprite*)insertStaticSprite(0x406C0AE0, 1100);
+ _klaymen->setClipRect(_ssDoorFrame->getDrawRect().x, 0, 639, tempSprite->getDrawRect().y2());
+ _asDoor = insertSprite<AsScene2402Door>(this, which == 0);
+ insertSprite<AsScene2402TV>(_klaymen);
+ insertStaticSprite(0x3A01A020, 200);
+
+}
+
+Scene2402::~Scene2402() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+void Scene2402::update() {
+ if (_countdown != 0 && (--_countdown) == 0) {
+ if (_pipeStatus >= 10) {
+ sendMessage(_asDoor, 0x4808, 0);
+ _ssDoorFrame->loadSprite(0x00B415E0, kSLFDefDrawOffset | kSLFDefPosition);
+ } else if (_pipeStatus >= 5) {
+ _countdown = 8;
+ playPipeSound(kScene2402FileHashes[getSubVar(VA_CURR_WATER_PIPES_LEVEL, _pipeStatus - 5)]);
+ } else {
+ _countdown = _pipeStatus == 4 ? 16 : 8;
+ playPipeSound(kScene2402FileHashes[getSubVar(VA_GOOD_WATER_PIPES_LEVEL, _pipeStatus)]);
+ }
+ _pipeStatus++;
+ }
+ Scene::update();
+}
+
+uint32 Scene2402::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x402064D8)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x01C66840) {
+ if (sendMessage(_asDoor, 0x2000, 0))
+ setMessageList(0x004AF800);
+ else
+ setMessageList(0x004AF818);
+ }
+ break;
+ case 0x2001:
+ _ssDoorFrame->loadSprite(0x406C0AE0, kSLFDefDrawOffset | kSLFDefPosition);
+ break;
+ case 0x480B:
+ if (sender == _ssButton) {
+ _pipeStatus = 0;
+ _countdown = 8;
+ }
+ break;
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004AF890);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2402::playPipeSound(uint32 fileHash) {
+ playSound(_soundToggle ? 0 : 1, fileHash);
+ _soundToggle = !_soundToggle;
+}
+
+Scene2403::Scene2403(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite1, *tempSprite2, *tempSprite3;
+
+ SetMessageHandler(&Scene2403::handleMessage);
+ setBackground(0x0C05060C);
+ setPalette(0x0C05060C);
+ _palette->addPalette(0x414364B0, 0, 65, 0);
+ insertScreenMouse(0x506080C8);
+ _asTape = insertSprite<AsScene1201Tape>(this, 2, 1100, 480, 454, 0x9148A011);
+ addCollisionSprite(_asTape);
+ _asLightCord = insertSprite<AsScene2803LightCord>(this, 0xA1095A10, 0x836D3813, 368, 200);
+ _asLightCord->setClipRect(0, 25, 640, 480);
+
+ if (which < 0) {
+ // Restoring game
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2403>(220, 449);
+ setMessageList(0x004B5C98);
+ setRectList(0x004B5E18);
+ } else if (which == 1) {
+ // Klaymen returning from looking through the window
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2403>(433, 449);
+ setMessageList(0x004B5D70);
+ setRectList(0x004B5E18);
+ } else if (which == 2) {
+ // Klaymen standing around after the critter video
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2403>(440, 449);
+ _klaymen->setDoDeltaX(1);
+ setMessageList(0x004B5C98);
+ setRectList(0x004B5E18);
+ } else {
+ // Klaymen coming up from ladder
+ _isClimbingLadder = true;
+ insertKlaymen<KmScene2403>(122, 599);
+ setMessageList(0x004B5CA0);
+ setRectList(0x004B5E28);
+ }
+
+ _ssButton = insertSprite<SsCommonButtonSprite>(this, 0x3130B0EB, 100, 0);
+ tempSprite1 = insertStaticSprite(0x20C24220, 1100);
+ tempSprite2 = insertStaticSprite(0x03080900, 1300);
+ tempSprite3 = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite3->setClipRect(tempSprite1->getDrawRect().x, 0, 640, tempSprite2->getDrawRect().y2());
+ _klaymen->setClipRect(tempSprite1->getDrawRect().x, 0, 640, tempSprite2->getDrawRect().y2());
+ loadSound(1, calcHash("fxFogHornSoft"));
+}
+
+uint32 Scene2403::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x040424D0)
+ sendEntityMessage(_klaymen, 0x1014, _ssButton);
+ else if (param.asInteger() == 0x180CE614)
+ sendEntityMessage(_klaymen, 0x1014, _asLightCord);
+ break;
+ case 0x2000:
+ _isClimbingLadder = true;
+ setRectList(0x004B5E28);
+ break;
+ case 0x2001:
+ _isClimbingLadder = false;
+ setRectList(0x004B5E18);
+ break;
+ case 0x480B:
+ if (sender == _ssButton) {
+ if (getSubVar(VA_LOCKS_DISABLED, 0x304008D2)) {
+ setSubVar(VA_LOCKS_DISABLED, 0x304008D2, 0);
+ playSound(0, calcHash("fx3LocksDisable"));
+ } else {
+ setSubVar(VA_LOCKS_DISABLED, 0x304008D2, 1);
+ playSound(1);
+ }
+ }
+ break;
+ case 0x480F:
+ if (sender == _asLightCord)
+ leaveScene(2);
+ break;
+ case 0x4826:
+ if (sender == _asTape && !_isClimbingLadder) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B5D98);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+Scene2406::Scene2406(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite1, *tempSprite2;
+
+ if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
+ setGlobalVar(V_KEY3_LOCATION, 2);
+
+ SetMessageHandler(&Scene2406::handleMessage);
+
+ setRectList(0x004B78C8);
+ insertScreenMouse(0xB03001A8);
+
+ if (getGlobalVar(V_KEY3_LOCATION) == 2) {
+ _asKey = insertSprite<AsCommonKey>(this, 2, 1100, 560, 409);
+ addCollisionSprite(_asKey);
+ }
+
+ _asTape = insertSprite<AsScene1201Tape>(this, 5, 1100, 456, 409, 0x9148A011);
+ addCollisionSprite(_asTape);
+ tempSprite2 = insertStaticSprite(0x19625293, 1100);
+ _clipRects[0].x1 = 0;
+ _clipRects[0].y1 = 0;
+ _clipRects[0].x2 = tempSprite2->getDrawRect().x2();
+ _clipRects[0].y2 = 480;
+
+ if (getGlobalVar(V_SPIKES_RETRACTED)) {
+ setBackground(0x1A0B0304);
+ setPalette(0x1A0B0304);
+ tempSprite1 = insertStaticSprite(0x32923922, 1100);
+ } else {
+ setBackground(0x0A038595);
+ setPalette(0x0A038595);
+ tempSprite1 = insertStaticSprite(0x1712112A, 1100);
+ }
+
+ tempSprite2 = insertStaticSprite(0x22300924, 1300);
+ _clipRects[1].x1 = tempSprite1->getDrawRect().x;
+ _clipRects[1].y1 = tempSprite2->getDrawRect().y;
+ _clipRects[1].x2 = 640;
+ _clipRects[1].y2 = 480;
+
+ if (which < 0) {
+ // Restoring game
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2406>(307, 404, _clipRects, 2);
+ setMessageList(0x004B76C8);
+ setRectList(0x004B78C8);
+ } else if (which == 1) {
+ // Klaymen coming down the ladder
+ _isClimbingLadder = true;
+ insertKlaymen<KmScene2406>(253, -16, _clipRects, 2);
+ setMessageList(0x004B76D8);
+ setRectList(0x004B78D8);
+ } else if (which == 2) {
+ // Klaymen returning from the diskplayer
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2406>(480, 404, _clipRects, 2);
+ setMessageList(0x004B77C0);
+ setRectList(0x004B78C8);
+ } else if (which == 3) {
+ // Klaymen returning from looking through the window
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2406>(387, 404, _clipRects, 2);
+ setMessageList(0x004B7810);
+ setRectList(0x004B78C8);
+ } else {
+ // Klaymen entering from the left
+ _isClimbingLadder = false;
+ insertKlaymen<KmScene2406>(0, 404, _clipRects, 2);
+ setMessageList(0x004B76D0);
+ setRectList(0x004B78C8);
+ }
+
+ tempSprite2 = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite2->setClipRect(_clipRects[1]);
+
+}
+
+uint32 Scene2406::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x41062804) {
+ if (getGlobalVar(V_SPIKES_RETRACTED))
+ setMessageList(0x004B7758);
+ else
+ setMessageList(0x004B7738);
+ }
+ break;
+ case 0x2000:
+ _isClimbingLadder = true;
+ setRectList(0x004B78D8);
+ break;
+ case 0x2001:
+ _isClimbingLadder = false;
+ setRectList(0x004B78C8);
+ break;
+ case 0x4826:
+ if (sender == _asTape && !_isClimbingLadder) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B77C8);
+ } else if (sender == _asKey && !_isClimbingLadder) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004B77D8);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2400.h b/engines/neverhood/modules/module2400.h
new file mode 100644
index 0000000000..b50fff91c4
--- /dev/null
+++ b/engines/neverhood/modules/module2400.h
@@ -0,0 +1,182 @@
+/* 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 NEVERHOOD_MODULES_MODULE2400_H
+#define NEVERHOOD_MODULES_MODULE2400_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/modules/module2100.h"
+#include "neverhood/modules/module2200.h"
+#include "neverhood/modules/module2800.h"
+#include "neverhood/diskplayerscene.h"
+
+namespace Neverhood {
+
+// Module2400
+
+class Module2400 : public Module {
+public:
+ Module2400(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2400();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2401WaterSpit : public AnimatedSprite {
+public:
+ AsScene2401WaterSpit(NeverhoodEngine *vm);
+protected:
+ int _soundIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2401FlowingWater : public AnimatedSprite {
+public:
+ AsScene2401FlowingWater(NeverhoodEngine *vm);
+ virtual ~AsScene2401FlowingWater();
+protected:
+ bool _isWaterFlowing;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2401WaterFlushing : public AnimatedSprite {
+public:
+ AsScene2401WaterFlushing(NeverhoodEngine *vm, int16 x, int16 y);
+protected:
+ int _countdown;
+ int _flushLoopCount;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2401Door : public AnimatedSprite {
+public:
+ AsScene2401Door(NeverhoodEngine *vm, bool isOpen);
+protected:
+ int _countdown;
+ bool _isOpen;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stDoorOpenFinished();
+};
+
+class Scene2401 : public Scene {
+public:
+ Scene2401(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite1;
+ Sprite *_asFlowingWater;
+ Sprite *_ssButton;
+ Sprite *_ssFloorButton;
+ Sprite *_asWaterSpit[2];
+ Sprite *_ssWaterPipes[10];
+ Sprite *_asWaterFlushing[5];
+ Sprite *_asDoor;
+ bool _soundToggle;
+ bool _unkFlag;
+ int _countdown1;
+ int _countdown2;
+ int _pipeStatus;
+ int _asWaterSpitIndex;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void playPipeSound(uint32 fileHash);
+};
+
+class AsScene2402Door : public AnimatedSprite {
+public:
+ AsScene2402Door(NeverhoodEngine *vm, Scene *parentScene, bool isOpen);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ bool _isOpen;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void stDoorClosingFinished();
+};
+
+class AsScene2402TV : public AnimatedSprite {
+public:
+ AsScene2402TV(NeverhoodEngine *vm, Klaymen *klaymen);
+ virtual ~AsScene2402TV();
+protected:
+ Klaymen *_klaymen;
+ int _countdown1;
+ int _countdown2;
+ void upWait();
+ void upFocusKlaymen();
+ void stJokeFinished();
+ uint32 hmJoke(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2402 : public Scene {
+public:
+ Scene2402(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene2402();
+protected:
+ Sprite *_asDoor;
+ Sprite *_ssButton;
+ Sprite *_asTape;
+ StaticSprite *_ssDoorFrame;
+ int _pipeStatus;
+ int _countdown;
+ bool _soundToggle;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void playPipeSound(uint32 fileHash);
+};
+
+class Scene2403 : public Scene {
+public:
+ Scene2403(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssButton;
+ Sprite *_asTape;
+ Sprite *_asKey;
+ Sprite *_asLightCord;
+ bool _isClimbingLadder;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2406 : public Scene {
+public:
+ Scene2406(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_asTape;
+ Sprite *_asKey;
+ NRect _clipRects[2];
+ bool _isClimbingLadder;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2400_H */
diff --git a/engines/neverhood/modules/module2500.cpp b/engines/neverhood/modules/module2500.cpp
new file mode 100644
index 0000000000..e3a3b74280
--- /dev/null
+++ b/engines/neverhood/modules/module2500.cpp
@@ -0,0 +1,546 @@
+/* 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 "neverhood/modules/module2500.h"
+#include "neverhood/modules/module1600.h"
+
+namespace Neverhood {
+
+static const uint32 kScene2505StaticSprites[] = {
+ 0x4000A226, 0
+};
+
+static const NRect kScene2505ClipRect = NRect(0, 0, 564, 480);
+
+static const uint32 kScene2506StaticSprites[] = {
+ 0x4027AF02, 0
+};
+
+static const NRect kScene2506ClipRect = NRect(0, 0, 640, 441);
+
+static const uint32 kScene2508StaticSprites1[] = {
+ 0x2F08E610, 0xD844E6A0, 0
+};
+
+static const NRect kScene2508ClipRect1 = NRect(0, 0, 594, 448);
+
+static const uint32 kScene2508StaticSprites2[] = {
+ 0x2F08E610, 0
+};
+
+static const NRect kScene2508ClipRect2 = NRect(0, 0, 594, 448);
+
+Module2500::Module2500(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _soundIndex(0) {
+
+ _vm->_soundMan->addMusic(0x29220120, 0x05343184);
+ _vm->_soundMan->startMusic(0x05343184, 0, 0);
+ SetMessageHandler(&Module2500::handleMessage);
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, _vm->gameState().which);
+ else
+ createScene(0, 0);
+
+ loadSound(0, 0x00880CCC);
+ loadSound(1, 0x00880CC0);
+ loadSound(2, 0x00880CCC);
+ loadSound(3, 0x00880CC0);
+
+}
+
+Module2500::~Module2500() {
+ _vm->_soundMan->deleteMusicGroup(0x29220120);
+}
+
+void Module2500::createScene(int sceneNum, int which) {
+ debug(1, "Module2500::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2501(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B01B8, 220);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->gameState().which = which;
+ if (getGlobalVar(V_WORLDS_JOINED))
+ createScene2704(which, 0x004B01E0, 150);
+ else
+ createScene2704(which, 0x004B0208, 150);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _childObject = new Scene2504(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B0230, 150, kScene2505StaticSprites, &kScene2505ClipRect);
+ break;
+ case 5:
+ setGlobalVar(V_CAR_DELTA_X, 1);
+ _vm->gameState().sceneNum = 5;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B0268, 150, kScene2506StaticSprites, &kScene2506ClipRect);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B02A0, 150);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->gameState().which = which;
+ if (getGlobalVar(V_ENTRANCE_OPEN))
+ createScene2704(which, 0x004B02C8, 150, kScene2508StaticSprites1, &kScene2508ClipRect1);
+ else
+ createScene2704(which, 0x004B02C8, 150, kScene2508StaticSprites2, &kScene2508ClipRect2);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new Scene1608(_vm, this, which);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ if (getGlobalVar(V_ENTRANCE_OPEN))
+ createStaticScene(0xC62A0645, 0xA0641C6A);
+ else
+ createStaticScene(0x7A343546, 0x435427AB);
+ break;
+ }
+ SetUpdateHandler(&Module2500::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2500::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(2, 0);
+ else if (_moduleResult == 2)
+ createScene(1, 0);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ if (_moduleResult == 1)
+ createScene(3, -1);
+ else
+ createScene(0, 2);
+ break;
+ case 2:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else
+ createScene(0, 1);
+ break;
+ case 3:
+ createScene(1, 1);
+ break;
+ case 4:
+ if (_moduleResult == 1)
+ createScene(5, 0);
+ else
+ createScene(2, 1);
+ break;
+ case 5:
+ if (_moduleResult == 1)
+ createScene(6, 0);
+ else
+ createScene(4, 1);
+ break;
+ case 6:
+ if (_moduleResult == 1)
+ createScene(7, 0);
+ else
+ createScene(5, 1);
+ break;
+ case 7:
+ if (_moduleResult == 1)
+ createScene(8, 1);
+ else
+ createScene(6, 1);
+ break;
+ case 8:
+ if (_moduleResult == 2)
+ createScene(9, -1);
+ else
+ createScene(7, 1);
+ break;
+ case 9:
+ createScene(8, 2);
+ break;
+ }
+ }
+}
+
+uint32 Module2500::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Module::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x200D:
+ playSound(_soundIndex);
+ _soundIndex++;
+ if (_soundIndex >= 4)
+ _soundIndex = 0;
+ break;
+ }
+ return messageResult;
+}
+
+void Module2500::createScene2704(int which, uint32 sceneInfoId, int16 value, const uint32 *staticSprites, const NRect *clipRect) {
+ _childObject = new Scene2704(_vm, this, which, sceneInfoId, value, staticSprites, clipRect);
+}
+
+Scene2501::Scene2501(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B2628));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B264C));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B2670));
+
+ setGlobalVar(V_CAR_DELTA_X, 1);
+ SetUpdateHandler(&Scene2501::update);
+ setBackground(0x1B8E8115);
+ setPalette(0x1B8E8115);
+ _palette->addPalette(0x00128842, 65, 31, 65);
+ _palette->addPalette("paKlayRed", 0, 64, 0);
+ insertScreenMouse(0xE81111B0);
+
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(0x99BE9015); // Don't add this to the sprite list
+ addEntity(_ssTrackShadowBackground);
+ _asCar = createSprite<AsCommonCar>(this, 211, 400); // Create but don't add to the sprite list yet
+ _asIdleCarLower = insertSprite<AsCommonIdleCarLower>(211, 400);
+ _asIdleCarFull = insertSprite<AsCommonIdleCarFull>(211, 400);
+ insertStaticSprite(0xC42AC521, 1500);
+
+ if (which < 0) {
+ // Restoring game
+ insertKlaymen<KmScene2501>(162, 393);
+ _kmScene2501 = _klaymen;
+ _klaymenInCar = false;
+ setMessageList(0x004B2538);
+ setRectList(0x004B2608);
+ SetMessageHandler(&Scene2501::handleMessage);
+ SetUpdateHandler(&Scene2501::update);
+ sendMessage(_asCar, 0x2009, 0);
+ _asCar->setVisible(false);
+ _currTrackIndex = 0;
+ } else if (which == 1 || which == 2) {
+ // 1: Klaymen entering riding the car on the left track
+ // 2: Klaymen entering riding the car on the bottom track
+ addSprite(_asCar);
+ _kmScene2501 = (Klaymen*)new KmScene2501(_vm, this, 275, 393);
+ _klaymenInCar = true;
+ sendMessage(_kmScene2501, 0x2000, 1);
+ _kmScene2501->setDoDeltaX(1);
+ SetMessageHandler(&Scene2501::hmRidingCar);
+ SetUpdateHandler(&Scene2501::upRidingCar);
+ _asIdleCarLower->setVisible(false);
+ _asIdleCarFull->setVisible(false);
+ _currTrackIndex = which;
+ } else {
+ // Klaymen entering the car
+ insertKlaymen<KmScene2501>(162, 393);
+ _kmScene2501 = _klaymen;
+ _klaymenInCar = false;
+ setMessageList(0x004B2538);
+ setRectList(0x004B2608);
+ SetMessageHandler(&Scene2501::handleMessage);
+ SetUpdateHandler(&Scene2501::update);
+ sendMessage(_asCar, 0x2009, 0);
+ _asCar->setVisible(false);
+ _currTrackIndex = 0;
+ }
+
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ insertSprite<AsCommonCarConnector>(_asCar);
+
+ _newTrackIndex = -1;
+ _dataResource.load(calcHash("Ashooded"));
+
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which >= 0 && _tracks[_currTrackIndex]->which2 == which) {
+ NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480)
+ sendMessage(_asCar, 0x2007, 150);
+ } else {
+ NPoint testPoint = (*_trackPoints)[0];
+ sendMessage(_asCar, 0x2002, 0);
+ if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480)
+ sendMessage(_asCar, 0x2008, 150);
+ }
+
+ _carStatus = 0;
+
+}
+
+Scene2501::~Scene2501() {
+ // Free sprites not currently in the sprite list
+ if (_klaymenInCar)
+ delete _kmScene2501;
+ else
+ delete _asCar;
+}
+
+void Scene2501::update() {
+ Scene::update();
+ if (_carStatus == 1) {
+ removeSprite(_klaymen);
+ addSprite(_asCar);
+ clearRectList();
+ _klaymenInCar = true;
+ SetMessageHandler(&Scene2501::hmCarAtHome);
+ SetUpdateHandler(&Scene2501::upCarAtHome);
+ _asIdleCarLower->setVisible(false);
+ _asIdleCarFull->setVisible(false);
+ _asCar->setVisible(true);
+ sendMessage(_asCar, 0x2009, 0);
+ _asCar->handleUpdate();
+ _klaymen = NULL;
+ _carStatus = 0;
+ }
+ updateKlaymenClipRect();
+}
+
+void Scene2501::upCarAtHome() {
+ Scene::update();
+ if (_mouseClicked) {
+ if (_mouseClickPos.x <= 210 && _asCar->getX() == 211 && _asCar->getY() == 400) {
+ sendMessage(_asCar, 0x200A, 0);
+ SetUpdateHandler(&Scene2501::upGettingOutOfCar);
+ } else {
+ moveCarToPoint(_mouseClickPos);
+ SetMessageHandler(&Scene2501::hmRidingCar);
+ SetUpdateHandler(&Scene2501::upRidingCar);
+ }
+ _mouseClicked = false;
+ }
+ updateKlaymenClipRect();
+}
+
+void Scene2501::upGettingOutOfCar() {
+ Scene::update();
+ if (_carStatus == 2) {
+ _klaymen = _kmScene2501;
+ removeSprite(_asCar);
+ addSprite(_klaymen);
+ _klaymenInCar = false;
+ SetMessageHandler(&Scene2501::handleMessage);
+ SetUpdateHandler(&Scene2501::update);
+ setRectList(0x004B2608);
+ _asIdleCarLower->setVisible(true);
+ _asIdleCarFull->setVisible(true);
+ _asCar->setVisible(false);
+ setMessageList(0x004B2570);
+ processMessageList();
+ _klaymen->handleUpdate();
+ _carStatus = 0;
+ }
+ updateKlaymenClipRect();
+}
+
+void Scene2501::upRidingCar() {
+ Scene::update();
+ if (_mouseClicked) {
+ moveCarToPoint(_mouseClickPos);
+ _mouseClicked = false;
+ }
+}
+
+uint32 Scene2501::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x60842040)
+ _carStatus = 1;
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene2501::hmRidingCar(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2005:
+ if (_tracks[_currTrackIndex]->which1 < 0 && _newTrackIndex >= 0)
+ changeTrack();
+ else if (_tracks[_currTrackIndex]->which1 == 0) {
+ SetMessageHandler(&Scene2501::hmCarAtHome);
+ SetUpdateHandler(&Scene2501::upCarAtHome);
+ sendMessage(_asCar, 0x200F, 1);
+ } else if (_tracks[_currTrackIndex]->which1 > 0)
+ leaveScene(_tracks[_currTrackIndex]->which1);
+ break;
+ case 0x2006:
+ if (_tracks[_currTrackIndex]->which2 < 0 && _newTrackIndex >= 0)
+ changeTrack();
+ else if (_tracks[_currTrackIndex]->which2 == 0) {
+ SetMessageHandler(&Scene2501::hmCarAtHome);
+ SetUpdateHandler(&Scene2501::upCarAtHome);
+ sendMessage(_asCar, 0x200F, 1);
+ } else if (_tracks[_currTrackIndex]->which2 > 0)
+ leaveScene(_tracks[_currTrackIndex]->which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 Scene2501::hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x200A:
+ _carStatus = 2;
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2501::moveCarToPoint(NPoint &pt) {
+ int minMatchTrackIndex, minMatchDistance;
+ _tracks.findTrackPoint(pt, minMatchTrackIndex, minMatchDistance, _dataResource);
+ if (minMatchTrackIndex >= 0 && minMatchTrackIndex != _currTrackIndex) {
+ _newTrackIndex = minMatchTrackIndex;
+ _clickPoint = pt;
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2003, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2003, 0);
+ } else {
+ _newTrackIndex = -1;
+ sendMessage(_asCar, 0x2004, pt);
+ }
+}
+
+void Scene2501::changeTrack() {
+ _currTrackIndex = _newTrackIndex;
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2002, 0);
+ sendPointMessage(_asCar, 0x2004, _clickPoint);
+ _newTrackIndex = -1;
+}
+
+void Scene2501::updateKlaymenClipRect() {
+ if (_kmScene2501->getX() <= 211)
+ _kmScene2501->setClipRect(0, 0, 640, 480);
+ else
+ _kmScene2501->setClipRect(0, 0, 640, 388);
+}
+
+SsScene2504Button::SsScene2504Button(NeverhoodEngine *vm)
+ : StaticSprite(vm, 1400), _countdown(0), _isSoundPlaying(false) {
+
+ loadSprite(0x070220D9, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ loadSound(0, 0x4600204C);
+ loadSound(1, 0x408C0034);
+ loadSound(2, 0x44043000);
+ loadSound(3, 0x44045000);
+ SetMessageHandler(&SsScene2504Button::handleMessage);
+ SetUpdateHandler(&SsScene2504Button::update);
+}
+
+void SsScene2504Button::update() {
+ updatePosition();
+ if (_isSoundPlaying && !isSoundPlaying(0) && !isSoundPlaying(1)) {
+ playSound(3);
+ setVisible(false);
+ _isSoundPlaying = false;
+ }
+ if (_countdown != 0 && (--_countdown) == 0) {
+ if (getSubVar(VA_LOCKS_DISABLED, 0x01180951))
+ playSound(0);
+ else
+ playSound(1);
+ _isSoundPlaying = true;
+ }
+}
+
+uint32 SsScene2504Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0 && !_isSoundPlaying) {
+ setVisible(true);
+ _countdown = 2;
+ if (getSubVar(VA_LOCKS_DISABLED, 0x01180951))
+ setSubVar(VA_LOCKS_DISABLED, 0x01180951, 0);
+ else
+ setSubVar(VA_LOCKS_DISABLED, 0x01180951, 1);
+ playSound(2);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+Scene2504::Scene2504(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *ssButton;
+
+ setBackground(0x90791B80);
+ setPalette(0x90791B80);
+ ssButton = insertSprite<SsScene2504Button>();
+ addCollisionSprite(ssButton);
+ insertPuzzleMouse(0x91B8490F, 20, 620);
+ SetMessageHandler(&Scene2504::handleMessage);
+ SetUpdateHandler(&Scene::update);
+}
+
+uint32 Scene2504::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene(0);
+ break;
+ }
+ return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2500.h b/engines/neverhood/modules/module2500.h
new file mode 100644
index 0000000000..07db7907d5
--- /dev/null
+++ b/engines/neverhood/modules/module2500.h
@@ -0,0 +1,101 @@
+/* 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 NEVERHOOD_MODULES_MODULE2500_H
+#define NEVERHOOD_MODULES_MODULE2500_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1600.h"
+#include "neverhood/modules/module2700.h"
+
+namespace Neverhood {
+
+// Module2500
+
+class Module2500 : public Module {
+public:
+ Module2500(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2500();
+protected:
+ int _sceneNum;
+ int _soundIndex;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createScene2704(int which, uint32 sceneInfoId, int16 value, const uint32 *staticSprites = NULL, const NRect *clipRect = NULL);
+};
+
+class Scene2501 : public Scene {
+public:
+ Scene2501(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene2501();
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarConnectorShadow;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asIdleCarLower;
+ Sprite *_asIdleCarFull;
+ Klaymen *_kmScene2501;
+ Tracks _tracks;
+ NPointArray *_trackPoints;
+ int _currTrackIndex;
+ NPoint _clickPoint;
+ int _newTrackIndex;
+ int _carStatus;
+ bool _klaymenInCar;
+ void update();
+ void upCarAtHome();
+ void upGettingOutOfCar();
+ void upRidingCar();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRidingCar(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender);
+ void moveCarToPoint(NPoint &pt);
+ void changeTrack();
+ void updateKlaymenClipRect();
+};
+
+class SsScene2504Button : public StaticSprite {
+public:
+ SsScene2504Button(NeverhoodEngine *vm);
+protected:
+ int _countdown;
+ bool _isSoundPlaying;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2504 : public Scene {
+public:
+ Scene2504(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2500_H */
diff --git a/engines/neverhood/modules/module2600.cpp b/engines/neverhood/modules/module2600.cpp
new file mode 100644
index 0000000000..56b4c65f8d
--- /dev/null
+++ b/engines/neverhood/modules/module2600.cpp
@@ -0,0 +1,348 @@
+/* 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 "neverhood/modules/module2600.h"
+
+namespace Neverhood {
+
+static const uint32 kModule2600SoundList[] = {
+ 0xB288D450,
+ 0x90804450,
+ 0x99801500,
+ 0xB288D455,
+ 0x93825040,
+ 0
+};
+
+Module2600::Module2600(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which < 0)
+ createScene(_vm->gameState().sceneNum, -1);
+ else if (which == 1)
+ createScene(4, 1);
+ else
+ createScene(0, 1);
+
+ _vm->_soundMan->addSoundList(0x40271018, kModule2600SoundList);
+ _vm->_soundMan->setSoundListParams(kModule2600SoundList, true, 50, 600, 5, 150);
+ _vm->_soundMan->playTwoSounds(0x40271018, 0x41861371, 0x43A2507F, 0);
+
+}
+
+Module2600::~Module2600() {
+ _vm->_soundMan->deleteGroup(0x40271018);
+}
+
+void Module2600::createScene(int sceneNum, int which) {
+ debug(1, "Module2600::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ createNavigationScene(0x004B8608, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ createNavigationScene(0x004B8638, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ createNavigationScene(0x004B86C8, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ if (getGlobalVar(V_CREATURE_ANGRY))
+ createNavigationScene(0x004B8758, which);
+ else
+ createNavigationScene(0x004B86F8, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ createNavigationScene(0x004B87B8, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ createNavigationScene(0x004B8698, which);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->_soundMan->deleteGroup(0x40271018);
+ createSmackerScene(0x30090001, true, true, false);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _childObject = new Scene2609(_vm, this, which);
+ break;
+ case 1002:
+ _vm->gameState().sceneNum = 2;
+ if (getGlobalVar(V_FRUIT_COUNTING_INDEX) == 1)
+ createSmackerScene(0x018C0404, true, true, false);
+ else if (getGlobalVar(V_FRUIT_COUNTING_INDEX) == 2)
+ createSmackerScene(0x018C0407, true, true, false);
+ else
+ createSmackerScene(0x818C0405, true, true, false);
+ if (getGlobalVar(V_FRUIT_COUNTING_INDEX) >= 2)
+ setGlobalVar(V_FRUIT_COUNTING_INDEX, 0);
+ else
+ incGlobalVar(V_FRUIT_COUNTING_INDEX, +1);
+ break;
+ case 1003:
+ _vm->gameState().sceneNum = 3;
+ createSmackerScene(0x001C0007, true, true, false);
+ break;
+ case 1006:
+ _vm->gameState().sceneNum = 6;
+ if (getGlobalVar(V_WATER_RUNNING))
+ createSmackerScene(0x049A1181, true, true, false);
+ else
+ createSmackerScene(0x04981181, true, true, false);
+ break;
+ case 1008:
+ _vm->gameState().sceneNum = 8;
+ if (getGlobalVar(V_WATER_RUNNING))
+ createSmackerScene(0x42B80941, true, true, false);
+ else
+ createSmackerScene(0x42980941, true, true, false);
+ break;
+ case 9999:
+ createDemoScene();
+ break;
+ }
+ SetUpdateHandler(&Module2600::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2600::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == 1)
+ createScene(1, 3);
+ else
+ leaveModule(0);
+ break;
+ case 1:
+ if (_moduleResult == 0)
+ createScene(6, 0);
+ else if (_moduleResult == 1)
+ createScene(0, 0);
+ else if (_moduleResult == 2)
+ createScene(2, 1);
+ else if (_moduleResult == 3)
+ createScene(3, 0);
+ break;
+ case 2:
+ if (_moduleResult == 0)
+ createScene(1, 0);
+ else if (_moduleResult == 1) {
+ if (_vm->isDemo())
+ createScene(9999, -1);
+ else
+ createScene(1002, -1);
+ }
+ break;
+ case 3:
+ if (_moduleResult == 0) {
+ if (getGlobalVar(V_CREATURE_ANGRY))
+ createScene(4, 0);
+ else
+ createScene(1003, -1);
+ } else if (_moduleResult == 2)
+ createScene(1, 1);
+ else if (_moduleResult == 3) {
+ if (getGlobalVar(V_CREATURE_ANGRY))
+ createScene(4, 0);
+ else {
+ setGlobalVar(V_CREATURE_ANGRY, 1);
+ createScene(7, -1);
+ }
+ }
+ break;
+ case 4:
+ if (_moduleResult == 0)
+ leaveModule(1);
+ else
+ createScene(3, 1);
+ break;
+ case 6:
+ if (_moduleResult == 0) {
+ if (_vm->isDemo())
+ createScene(9999, -1);
+ else
+ createScene(1006, -1);
+ }
+ else if (_moduleResult == 1)
+ createScene(1, 2);
+ break;
+ case 7:
+ leaveModule(0);
+ break;
+ case 8:
+ createScene(1008, -1);
+ break;
+ case 1002:
+ createScene(2, 1);
+ break;
+ case 1003:
+ createScene(3, 0);
+ break;
+ case 1006:
+ createScene(8, -1);
+ break;
+ case 1008:
+ createScene(6, 0);
+ break;
+ case 9999:
+ createScene(_vm->gameState().sceneNum, -1);
+ break;
+ }
+ }
+}
+
+SsScene2609Button::SsScene2609Button(NeverhoodEngine *vm, Scene *parentScene)
+ : StaticSprite(vm, 1400), _parentScene(parentScene), _countdown(0) {
+
+ SetUpdateHandler(&SsScene2609Button::update);
+ SetMessageHandler(&SsScene2609Button::handleMessage);
+
+ loadSprite(0x825A6923, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ if (!getGlobalVar(V_WATER_RUNNING))
+ setVisible(false);
+ loadSound(0, 0x10267160);
+ loadSound(1, 0x7027FD64);
+ loadSound(2, 0x44043000);
+ loadSound(3, 0x44045000);
+}
+
+void SsScene2609Button::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ if (getGlobalVar(V_WATER_RUNNING)) {
+ setGlobalVar(V_WATER_RUNNING, 0);
+ sendMessage(_parentScene, 0x2001, 0);
+ } else {
+ setGlobalVar(V_WATER_RUNNING, 1);
+ sendMessage(_parentScene, 0x2002, 0);
+ }
+ }
+}
+
+uint32 SsScene2609Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0) {
+ sendMessage(_parentScene, 0x2000, 0);
+ if (getGlobalVar(V_WATER_RUNNING)) {
+ setVisible(false);
+ playSound(3);
+ playSound(1);
+ _countdown = 12;
+ } else {
+ setVisible(true);
+ playSound(2);
+ playSound(0);
+ _countdown = 96;
+ }
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2609Water::AsScene2609Water(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1000) {
+
+ _x = 240;
+ _y = 420;
+ setDoDeltaX(1);
+ createSurface1(0x9C210C90, 1200);
+ setClipRect(260, 260, 400, 368);
+ _vm->_soundMan->addSound(0x08526C36, 0xDC2769B0);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2609Water::handleMessage);
+ if (getGlobalVar(V_WATER_RUNNING))
+ sendMessage(this, 0x2002, 0);
+}
+
+AsScene2609Water::~AsScene2609Water() {
+ _vm->_soundMan->deleteSoundGroup(0x08526C36);
+}
+
+uint32 AsScene2609Water::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2001:
+ stopAnimation();
+ setVisible(false);
+ _vm->_soundMan->stopSound(0xDC2769B0);
+ break;
+ case 0x2002:
+ startAnimation(0x9C210C90, 0, -1);
+ setVisible(true);
+ _vm->_soundMan->playSoundLooping(0xDC2769B0);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2609::Scene2609(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isBusy(false) {
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&Scene2609::handleMessage);
+
+ setBackground(0x51409A16);
+ setPalette(0x51409A16);
+ _asWater = insertSprite<AsScene2609Water>();
+ _ssButton = insertSprite<SsScene2609Button>(this);
+ addCollisionSprite(_ssButton);
+ insertPuzzleMouse(0x09A1251C, 20, 620);
+ insertStaticSprite(0x02138002, 1200);
+ insertStaticSprite(0x825E2827, 1200);
+}
+
+uint32 Scene2609::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !_isBusy)
+ leaveScene(0);
+ break;
+ case 0x2000:
+ _isBusy = true;
+ break;
+ case 0x2001:
+ _isBusy = false;
+ sendMessage(_asWater, 0x2001, 0);
+ break;
+ case 0x2002:
+ _isBusy = false;
+ sendMessage(_asWater, 0x2002, 0);
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2600.h b/engines/neverhood/modules/module2600.h
new file mode 100644
index 0000000000..d972e0fb0d
--- /dev/null
+++ b/engines/neverhood/modules/module2600.h
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MODULES_MODULE2600_H
+#define NEVERHOOD_MODULES_MODULE2600_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module2600
+
+class Module2600 : public Module {
+public:
+ Module2600(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2600();
+protected:
+ int _sceneNum;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+class SsScene2609Button : public StaticSprite {
+public:
+ SsScene2609Button(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2609Water : public AnimatedSprite {
+public:
+ AsScene2609Water(NeverhoodEngine *vm);
+ virtual ~AsScene2609Water();
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2609 : public Scene {
+public:
+ Scene2609(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ bool _isBusy;
+ Sprite *_asWater;
+ Sprite *_ssButton;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2600_H */
diff --git a/engines/neverhood/modules/module2700.cpp b/engines/neverhood/modules/module2700.cpp
new file mode 100644
index 0000000000..19655d128b
--- /dev/null
+++ b/engines/neverhood/modules/module2700.cpp
@@ -0,0 +1,1211 @@
+/* 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 "neverhood/modules/module2700.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1000.h"
+
+namespace Neverhood {
+
+static const NRect kScene2710ClipRect = NRect(0, 0, 626, 480);
+
+static const uint32 kScene2710StaticSprites[] = {
+ 0x0D2016C0,
+ 0
+};
+
+static const NRect kScene2711ClipRect = NRect(0, 0, 521, 480);
+
+static const uint32 kScene2711FileHashes1[] = {
+ 0,
+ 0x100801A1,
+ 0x201081A0,
+ 0x006800A4,
+ 0x40390120,
+ 0x000001B1,
+ 0x001000A1,
+ 0
+};
+
+static const uint32 kScene2711FileHashes2[] = {
+ 0,
+ 0x40403308,
+ 0x71403168,
+ 0x80423928,
+ 0x224131A8,
+ 0x50401328,
+ 0x70423328,
+ 0
+};
+
+static const uint32 kScene2711FileHashes3[] = {
+ 0,
+ 0x1088A021,
+ 0x108120E5,
+ 0x18A02321,
+ 0x148221A9,
+ 0x10082061,
+ 0x188820E1,
+ 0
+};
+
+static const NRect kScene2724ClipRect = NRect(0, 141, 640, 480);
+
+static const uint32 kScene2724StaticSprites[] = {
+ 0xC20D00A5,
+ 0
+};
+
+static const NRect kScene2725ClipRect = NRect(0, 0, 640, 413);
+
+static const uint32 kScene2725StaticSprites[] = {
+ 0xC20E00A5,
+ 0
+};
+
+Module2700::Module2700(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _soundIndex(0), _raidoMusicInitialized(false) {
+
+ _vm->_soundMan->addMusic(0x42212411, 0x04020210);
+ _vm->_soundMan->startMusic(0x04020210, 24, 2);
+ SetMessageHandler(&Module2700::handleMessage);
+
+ if (which < 0) {
+ which = _vm->gameState().which;
+ // Scenes 0, 30 and 31 are "normal" scenes, whereas the other scenes are tracks.
+ // "gameState().which" indicates which track the car is at.
+ if (_vm->gameState().sceneNum == 0 || _vm->gameState().sceneNum == 30 || _vm->gameState().sceneNum == 31)
+ which = -1;
+ createScene(_vm->gameState().sceneNum, which);
+ } else
+ createScene(0, 0);
+
+ loadSound(0, 0x00880CCC);
+ loadSound(1, 0x00880CC0);
+ loadSound(2, 0x00880CCC);
+ loadSound(3, 0x00880CC0);
+
+}
+
+Module2700::~Module2700() {
+ _vm->_soundMan->deleteGroup(0x42212411);
+}
+
+void Module2700::createScene(int sceneNum, int which) {
+ debug(1, "Module2700::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->gameState().which = which;
+ _childObject = new Scene2701(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->gameState().which = which;
+ _childObject = new Scene2702(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->gameState().which = which;
+ if (which == 6 || which == 7)
+ createScene2703(which, 0x004B1710);
+ else if (which == 4 || which == 5)
+ createScene2703(which, 0x004B1738);
+ else if (which == 2 || which == 3)
+ createScene2703(which, 0x004B1760);
+ else
+ createScene2703(which, 0x004B1788);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B17B0, 150);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B17D8, 150);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->gameState().which = which;
+ if (which >= 4)
+ _childObject = new Scene2706(_vm, this, which);
+ else if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1828, 150);
+ else
+ createScene2704(which, 0x004B1800, 150);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1850, 150);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->gameState().which = which;
+ if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1878, 150);
+ else
+ createScene2704(which, 0x004B18A0, 150);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _vm->gameState().which = which;
+ if (which == 2 || which == 3)
+ createScene2704(which, 0x004B18C8, 150);
+ else
+ createScene2704(which, 0x004B18F0, 150);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1918, 150, kScene2710StaticSprites, &kScene2710ClipRect);
+ break;
+ case 10:
+ _vm->gameState().sceneNum = 10;
+ _vm->gameState().which = which;
+ _vm->gameModule()->initTestTubes2Puzzle();
+ _scene2711StaticSprites[0] = kScene2711FileHashes1[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2)];
+ _scene2711StaticSprites[1] = kScene2711FileHashes2[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1)];
+ _scene2711StaticSprites[2] = kScene2711FileHashes3[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0)];
+ _scene2711StaticSprites[3] = 0x0261282E;
+ _scene2711StaticSprites[4] = 0x9608E5A0;
+ _scene2711StaticSprites[5] = 0;
+ createScene2704(which, 0x004B1950, 150, _scene2711StaticSprites, &kScene2711ClipRect);
+ break;
+ case 11:
+ _vm->gameState().sceneNum = 11;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B19E0, 150);
+ break;
+ case 12:
+ _vm->gameState().sceneNum = 12;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1A08, 150);
+ break;
+ case 13:
+ _vm->gameState().sceneNum = 13;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1A30, 150);
+ break;
+ case 14:
+ _vm->gameState().sceneNum = 14;
+ _vm->gameState().which = which;
+ if (which == 4 || which == 5)
+ createScene2704(which, 0x004B1A58, 150);
+ else if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1A80, 150);
+ else
+ createScene2704(which, 0x004B1AA8, 150);
+ break;
+ case 15:
+ _vm->gameState().sceneNum = 15;
+ _vm->gameState().which = which;
+ if (which == 4 || which == 5)
+ createScene2704(which, 0x004B1AD0, 150);
+ else if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1AF8, 150);
+ else
+ createScene2704(which, 0x004B1B20, 150);
+ break;
+ case 16:
+ _vm->gameState().sceneNum = 16;
+ _vm->gameState().which = which;
+ if (which == 4 || which == 5)
+ createScene2704(which, 0x004B1B48, 150);
+ else if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1B70, 150);
+ else
+ createScene2704(which, 0x004B1B98, 150);
+ break;
+ case 17:
+ _vm->gameState().sceneNum = 17;
+ _vm->gameState().which = which;
+ if (which == 4 || which == 5)
+ createScene2704(which, 0x004B1BC0, 150);
+ else if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1BE8, 150);
+ else
+ createScene2704(which, 0x004B1C10, 150);
+ break;
+ case 18:
+ _vm->gameState().sceneNum = 18;
+ _vm->gameState().which = which;
+ if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1C38, 150);
+ else
+ createScene2704(which, 0x004B1C60, 150);
+ break;
+ case 19:
+ _vm->gameState().sceneNum = 19;
+ _vm->gameState().which = which;
+ if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1CB0, 150);
+ else
+ createScene2704(which, 0x004B1C88, 150);
+ break;
+ case 20:
+ _vm->gameState().sceneNum = 20;
+ _vm->gameState().which = which;
+ if (which == 2 || which == 3)
+ createScene2704(which, 0x004B1CD8, 150);
+ else
+ createScene2704(which, 0x004B1D00, 150);
+ break;
+ case 21:
+ _vm->gameState().sceneNum = 21;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1D28, 150);
+ break;
+ case 22:
+ _vm->gameState().sceneNum = 22;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1D50, 150);
+ break;
+ case 23:
+ _vm->gameState().sceneNum = 23;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1D78, 150, kScene2724StaticSprites, &kScene2724ClipRect);
+ break;
+ case 24:
+ _vm->gameState().sceneNum = 24;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1DB0, 150, kScene2725StaticSprites, &kScene2725ClipRect);
+ break;
+ case 25:
+ _vm->gameState().sceneNum = 25;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1DE8, 150);
+ break;
+ case 26:
+ _vm->gameState().sceneNum = 26;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1E10, 150);
+ break;
+ case 27:
+ _vm->gameState().sceneNum = 27;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1E38, 150);
+ break;
+ case 28:
+ _vm->gameState().sceneNum = 28;
+ _vm->gameState().which = which;
+ createScene2704(which, 0x004B1E60, 150);
+ break;
+ case 30:
+ _vm->gameState().sceneNum = 30;
+ createStaticScene(0x09507248, 0x0724C09D);
+ break;
+ case 31:
+ _vm->gameState().sceneNum = 31;
+ _childObject = new Scene2732(_vm, this);
+ break;
+ }
+ SetUpdateHandler(&Module2700::updateScene);
+ _childObject->handleUpdate();
+}
+
+#define SceneLinkIf(moduleResult, sceneNum, which) \
+ if (_moduleResult == moduleResult) { createScene(sceneNum, which); break; }
+
+void Module2700::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ SceneLinkIf(1, 1, 0);
+ leaveModule(0);
+ break;
+ case 1:
+ SceneLinkIf(1, 14, 1);
+ SceneLinkIf(2, 2, 2);
+ SceneLinkIf(3, 14, 3);
+ SceneLinkIf(4, 2, 6);
+ SceneLinkIf(5, 2, 4);
+ createScene(0, 1);
+ break;
+ case 2:
+ SceneLinkIf(1, 5, 0);
+ SceneLinkIf(2, 1, 2);
+ SceneLinkIf(3, 5, 2);
+ SceneLinkIf(4, 1, 5);
+ SceneLinkIf(5, 5, 4);
+ SceneLinkIf(6, 1, 4);
+ SceneLinkIf(7, 11, 0);
+ createScene(3, 0);
+ break;
+ case 3:
+ createScene(2, 0);
+ break;
+ case 4:
+ SceneLinkIf(1, 7, 2);
+ createScene(5, 5);
+ break;
+ case 5:
+ SceneLinkIf(1, 6, 0);
+ SceneLinkIf(2, 2, 3);
+ SceneLinkIf(3, 8, 2);
+ SceneLinkIf(4, 2, 5);
+ SceneLinkIf(5, 4, 0);
+ SceneLinkIf(6, 7, 0);
+ createScene(2, 1);
+ break;
+ case 6:
+ SceneLinkIf(1, 8, 0);
+ createScene(5, 1);
+ break;
+ case 7:
+ SceneLinkIf(1, 8, 3);
+ SceneLinkIf(2, 4, 1);
+ SceneLinkIf(3, 9, 0);
+ createScene(5, 6);
+ break;
+ case 8:
+ SceneLinkIf(1, 10, 0);
+ SceneLinkIf(2, 5, 3);
+ SceneLinkIf(3, 7, 1);
+ createScene(6, 1);
+ break;
+ case 9:
+ SceneLinkIf(1, 10, 1);
+ createScene(7, 3);
+ break;
+ case 10:
+ SceneLinkIf(1, 9, 1);
+ createScene(8, 1);
+ break;
+ case 11:
+ SceneLinkIf(1, 12, 0);
+ createScene(2, 7);
+ break;
+ case 12:
+ SceneLinkIf(1, 13, 0);
+ createScene(11, 1);
+ break;
+ case 13:
+ SceneLinkIf(1, 30, 0);
+ createScene(12, 1);
+ break;
+ case 14:
+ SceneLinkIf(1, 1, 1);
+ SceneLinkIf(2, 15, 3);
+ SceneLinkIf(3, 1, 3);
+ SceneLinkIf(4, 15, 5);
+ SceneLinkIf(5, 22, 0);
+ createScene(15, 1);
+ break;
+ case 15:
+ SceneLinkIf(1, 14, 0);
+ SceneLinkIf(2, 16, 3);
+ SceneLinkIf(3, 14, 2);
+ SceneLinkIf(4, 16, 5);
+ SceneLinkIf(5, 14, 4);
+ createScene(16, 1);
+ break;
+ case 16:
+ SceneLinkIf(1, 15, 0);
+ SceneLinkIf(2, 17, 3);
+ SceneLinkIf(3, 15, 2);
+ SceneLinkIf(4, 17, 5);
+ SceneLinkIf(5, 15, 4);
+ createScene(17, 1);
+ break;
+ case 17:
+ SceneLinkIf(1, 16, 0);
+ SceneLinkIf(2, 18, 3);
+ SceneLinkIf(3, 16, 2);
+ SceneLinkIf(4, 20, 1);
+ SceneLinkIf(5, 16, 4);
+ createScene(18, 1);
+ break;
+ case 18:
+ SceneLinkIf(1, 17, 0);
+ SceneLinkIf(2, 19, 2);
+ SceneLinkIf(3, 17, 2);
+ createScene(19, 0);
+ break;
+ case 19:
+ SceneLinkIf(1, 20, 2);
+ SceneLinkIf(2, 18, 2);
+ SceneLinkIf(3, 20, 0);
+ createScene(18, 0);
+ break;
+ case 20:
+ SceneLinkIf(1, 17, 4);
+ SceneLinkIf(2, 19, 1);
+ SceneLinkIf(3, 21, 0);
+ createScene(19, 3);
+ break;
+ case 21:
+ _vm->_soundMan->deleteMusic(_musicFileHash);
+ _vm->_soundMan->startMusic(0x04020210, 0, 2);
+ _vm->_soundMan->deleteSoundGroup(0x42212411);
+ createScene(20, 3);
+ break;
+ case 22:
+ SceneLinkIf(1, 23, 0);
+ createScene(14, 5);
+ break;
+ case 23:
+ SceneLinkIf(1, 24, 0);
+ createScene(22, 1);
+ break;
+ case 24:
+ SceneLinkIf(1, 25, 0);
+ createScene(23, 1);
+ break;
+ case 25:
+ SceneLinkIf(1, 26, 0);
+ createScene(24, 1);
+ break;
+ case 26:
+ SceneLinkIf(1, 27, 0);
+ createScene(25, 1);
+ break;
+ case 27:
+ SceneLinkIf(1, 28, 0);
+ createScene(26, 1);
+ break;
+ case 28:
+ SceneLinkIf(1, 31, 0);
+ createScene(27, 1);
+ break;
+ case 30:
+ createScene(13, 1);
+ break;
+ case 31:
+ createScene(28, 1);
+ break;
+ }
+ } else {
+ switch (_sceneNum) {
+ case 21:
+ if (!_raidoMusicInitialized) {
+ _vm->_soundMan->stopMusic(0x04020210, 0, 1);
+ _vm->gameModule()->initRadioPuzzle();
+ _musicFileHash = getGlobalVar(V_GOOD_RADIO_MUSIC_NAME);
+ _vm->_soundMan->addMusic(0x42212411, _musicFileHash);
+ _vm->_soundMan->startMusic(_musicFileHash, 0, 2);
+ _vm->_soundMan->addSound(0x42212411, 0x44014282);
+ _vm->_soundMan->setSoundParams(0x44014282, true, 120, 360, 72, 0);
+ _raidoMusicInitialized = true;
+ }
+ break;
+ }
+ }
+}
+
+uint32 Module2700::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Module::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x200D:
+ playSound(_soundIndex);
+ _soundIndex++;
+ if (_soundIndex >= 4)
+ _soundIndex = 0;
+ break;
+ }
+ return messageResult;
+}
+
+void Module2700::createScene2703(int which, uint32 trackInfoId) {
+ _childObject = new Scene2703(_vm, this, which, trackInfoId);
+}
+
+void Module2700::createScene2704(int which, uint32 trackInfoId, int16 value, const uint32 *staticSprites, const NRect *clipRect) {
+ _childObject = new Scene2704(_vm, this, which, trackInfoId, value, staticSprites, clipRect);
+}
+
+static const NPoint kCarShadowOffsets[] = {
+ {-63, 3}, {-48, 40}, {-33, 58},
+ { 0, 65}, { 40, 53}, { 56, 27},
+ { 63, 0}, {-30, 26}, { 0, 30},
+ { 26, 25}
+};
+
+SsCommonTrackShadowBackground::SsCommonTrackShadowBackground(NeverhoodEngine *vm, uint32 fileHash)
+ : StaticSprite(vm, 0) {
+
+ loadSprite(fileHash, kSLFDefDrawOffset | kSLFDefPosition, 0);
+}
+
+AsCommonCarShadow::AsCommonCarShadow(NeverhoodEngine *vm, AnimatedSprite *asCar, BaseSurface *shadowSurface, uint index)
+ : AnimatedSprite(vm, 1100), _asCar(asCar), _index(index), _animFileHash(0) {
+
+ SetUpdateHandler(&AsCommonCarShadow::update);
+ createShadowSurface(shadowSurface, 211, 147, 100);
+ updateShadow();
+}
+
+void AsCommonCarShadow::update() {
+ updateShadow();
+ AnimatedSprite::update();
+}
+
+void AsCommonCarShadow::updateShadow() {
+ if (_asCar->getFrameIndex() != _currFrameIndex || _asCar->getCurrAnimFileHash() != _animFileHash) {
+ uint32 fileHash = _asCar->getCurrAnimFileHash();
+ if (fileHash == 0x35698F78 || fileHash == 0x192ADD30 || fileHash == 0x9C220DA4 ||
+ fileHash == 0x9966B138 || fileHash == 0xB579A77C || fileHash == 0xA86A9538 ||
+ fileHash == 0xD4220027 || fileHash == 0xD00A1364 || fileHash == 0xD4AA03A4 ||
+ fileHash == 0xF46A0324) {
+ startAnimation(fileHash, _asCar->getFrameIndex(), -1);
+ _newStickFrameIndex = _asCar->getFrameIndex();
+ }
+ _animFileHash = fileHash;
+ }
+ _x = _asCar->getX() + kCarShadowOffsets[_index].x;
+ _y = _asCar->getY() + kCarShadowOffsets[_index].y;
+ if (!_asCar->getVisible()) {
+ startAnimation(0x1209E09F, 0, -1);
+ _newStickFrameIndex = 0;
+ }
+ setDoDeltaX(_asCar->isDoDeltaX() ? 1 : 0);
+}
+
+AsCommonCarConnectorShadow::AsCommonCarConnectorShadow(NeverhoodEngine *vm, Sprite *asCar, BaseSurface *shadowSurface, uint index)
+ : AnimatedSprite(vm, 1100), _asCar(asCar), _index(index) {
+
+ SetUpdateHandler(&AsCommonCarConnectorShadow::update);
+ createShadowSurface1(shadowSurface, 0x60281C10, 150);
+ startAnimation(0x60281C10, -1, -1);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+}
+
+void AsCommonCarConnectorShadow::update() {
+ _x = _asCar->getX() + kCarShadowOffsets[_index].x;
+ _y = _asCar->getY() + kCarShadowOffsets[_index].y;
+ AnimatedSprite::update();
+}
+
+AsCommonCarTrackShadow::AsCommonCarTrackShadow(NeverhoodEngine *vm, Sprite *asCar, BaseSurface *shadowSurface, int16 frameIndex)
+ : AnimatedSprite(vm, 1100), _asCar(asCar) {
+
+ SetUpdateHandler(&AsCommonCarTrackShadow::update);
+ createShadowSurface1(shadowSurface, 0x0759129C, 100);
+ startAnimation(0x0759129C, frameIndex, -1);
+ _newStickFrameIndex = frameIndex;
+}
+
+void AsCommonCarTrackShadow::update() {
+ _x = _asCar->getX();
+ _y = _asCar->getY();
+ AnimatedSprite::update();
+}
+
+Scene2701::Scene2701(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ NRect clipRect;
+ TrackInfo *tracks = _vm->_staticData->getTrackInfo(0x004B2240);
+ setGlobalVar(V_CAR_DELTA_X, 1);
+
+ setBackground(tracks->bgFilename);
+ setPalette(tracks->bgFilename);
+ _palette->addPalette(calcHash("paPodFloor"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayFloor"), 0, 65, 0);
+ insertScreenMouse(0x08B08180);
+
+ tempSprite = insertStaticSprite(0x1E086325, 1200);
+ clipRect.set(0, 0, 640, tempSprite->getDrawRect().y2());
+
+ if (tracks->bgShadowFilename) {
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(tracks->bgShadowFilename);
+ addEntity(_ssTrackShadowBackground);
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ } else {
+ _ssTrackShadowBackground = NULL;
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ }
+
+ _asCarConnector = insertSprite<AsCommonCarConnector>(_asCar);
+ _which1 = tracks->which1;
+ _which2 = tracks->which2;
+ _dataResource.load(tracks->dataResourceFilename);
+ _trackPoints = _dataResource.getPointArray(tracks->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which == _which2) {
+ NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480)
+ sendMessage(_asCar, 0x2007, 150);
+ } else {
+ NPoint testPoint = (*_trackPoints)[0];
+ sendMessage(_asCar, 0x2002, 0);
+ if (testPoint.x < 0 || testPoint.x >= 640 || testPoint.y < 0 || testPoint.y >= 480)
+ sendMessage(_asCar, 0x2008, 150);
+ }
+
+ _asCar->setClipRect(clipRect);
+ _asCarConnector->setClipRect(clipRect);
+
+ if (which == 1) {
+ SetMessageHandler(&Scene2701::hmRidingCar);
+ } else {
+ sendMessage(_asCar, 0x2009, 0);
+ SetMessageHandler(&Scene2701::hmCarAtHome);
+ }
+
+}
+
+uint32 Scene2701::hmRidingCar(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ sendPointMessage(_asCar, 0x2004, param.asPoint());
+ break;
+ case 0x2005:
+ if (_which1 >= 0)
+ SetMessageHandler(&Scene2701::hmCarAtHome);
+ break;
+ case 0x2006:
+ if (_which2 >= 0)
+ leaveScene(_which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+uint32 Scene2701::hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x >= 385)
+ leaveScene(0);
+ else {
+ sendPointMessage(_asCar, 0x2004, param.asPoint());
+ SetMessageHandler(&Scene2701::hmRidingCar);
+ }
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+Scene2702::Scene2702(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _isInLight(true), _newTrackIndex(-1) {
+
+ SetMessageHandler(&Scene2702::handleMessage);
+ SetUpdateHandler(&Scene2702::update);
+
+ setBackground(0x18808B00);
+ setPalette(0x18808B00);
+ _palette->addPalette(calcHash("paPodFloor"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayFloor"), 0, 65, 0);
+ addEntity(_palette);
+ insertScreenMouse(0x08B04180);
+
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(0x12002035);
+ addEntity(_ssTrackShadowBackground);
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ insertSprite<AsCommonCarConnector>(_asCar);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _dataResource.load(0x04310014);
+
+ if (which == 1) {
+ _isUpperTrack = false;
+ _currTrackIndex = 1;
+ } else if (which == 2) {
+ _isUpperTrack = false;
+ _currTrackIndex = 2;
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+ _isInLight = false;
+ } else if (which == 3) {
+ _isUpperTrack = true;
+ _currTrackIndex = 0;
+ } else if (which == 4) {
+ _isUpperTrack = true;
+ _currTrackIndex = 2;
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+ _isInLight = false;
+ } else if (which == 5) {
+ _isUpperTrack = true;
+ _currTrackIndex = 1;
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+ _isInLight = false;
+ } else {
+ _isUpperTrack = false;
+ _currTrackIndex = 0;
+ }
+
+ if (_isUpperTrack) {
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B5F68));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B5F8C));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B5FB0));
+ } else {
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B5FD8));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B5FFC));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B6020));
+ }
+
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which == _tracks[_currTrackIndex]->which2) {
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ sendMessage(_asCar, 0x2007, 150);
+ } else {
+ sendMessage(_asCar, 0x2002, 0);
+ sendMessage(_asCar, 0x2008, 150);
+ }
+
+ _palette->copyBasePalette(0, 256, 0);
+
+}
+
+void Scene2702::update() {
+ Scene::update();
+ if (_isInLight && _asCar->getX() > 422) {
+ _palette->addBasePalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addBasePalette(calcHash("paKlayShade"), 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isInLight = false;
+ } else if (!_isInLight && _asCar->getX() <= 422) {
+ _palette->addBasePalette(calcHash("paPodFloor"), 65, 31, 65);
+ _palette->addBasePalette(calcHash("paKlayFloor"), 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _isInLight = true;
+ }
+}
+
+uint32 Scene2702::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ moveCarToPoint(param.asPoint());
+ break;
+ case 0x2005:
+ if (_newTrackIndex >= 0) {
+ if (_tracks[_currTrackIndex]->which1 < 0)
+ changeTrack();
+ } else if (_tracks[_currTrackIndex]->which1 >= 0)
+ leaveScene(_tracks[_currTrackIndex]->which1);
+ break;
+ case 0x2006:
+ if (_newTrackIndex >= 0) {
+ if (_tracks[_currTrackIndex]->which2 < 0)
+ changeTrack();
+ } else if (_tracks[_currTrackIndex]->which2 >= 0)
+ leaveScene(_tracks[_currTrackIndex]->which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+void Scene2702::moveCarToPoint(NPoint pt) {
+ int minMatchTrackIndex, minMatchDistance;
+ _tracks.findTrackPoint(pt, minMatchTrackIndex, minMatchDistance, _dataResource);
+ if (minMatchTrackIndex >= 0 && minMatchTrackIndex != _currTrackIndex) {
+ _newTrackIndex = minMatchTrackIndex;
+ _newTrackDestX = pt.x;
+ if (_isUpperTrack) {
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2003, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2003, 0);
+ } else if (_currTrackIndex == 2)
+ sendMessage(_asCar, 0x2003, 0);
+ else
+ sendMessage(_asCar, 0x2003, _trackPoints->size() - 1);
+ } else {
+ _newTrackIndex = -1;
+ sendMessage(_asCar, 0x2004, pt.x);
+ }
+}
+
+void Scene2702::changeTrack() {
+ _currTrackIndex = _newTrackIndex;
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+ if (_isUpperTrack) {
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2002, 0);
+ } else if (_currTrackIndex == 2)
+ sendMessage(_asCar, 0x2002, 0);
+ else
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ sendMessage(_asCar, 0x2004, _newTrackDestX);
+ _newTrackIndex = -1;
+}
+
+Scene2703::Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId)
+ : Scene(vm, parentModule) {
+
+ TrackInfo *tracks = _vm->_staticData->getTrackInfo(trackInfoId);
+
+ SetMessageHandler(&Scene2703::handleMessage);
+ SetUpdateHandler(&Scene2703::update);
+
+ setBackground(tracks->bgFilename);
+ setPalette(tracks->bgFilename);
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+ addEntity(_palette);
+ insertScreenMouse(tracks->mouseCursorFilename);
+
+ _palStatus = 2;
+
+ if (tracks->bgShadowFilename) {
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(tracks->bgShadowFilename);
+ addEntity(_ssTrackShadowBackground);
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ } else {
+ _ssTrackShadowBackground = NULL;
+ _asCarShadow = NULL;
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ }
+
+ _asCarConnector = insertSprite<AsCommonCarConnector>(_asCar);
+ _which1 = tracks->which1;
+ _which2 = tracks->which2;
+ _dataResource.load(tracks->dataResourceFilename);
+ _trackPoints = _dataResource.getPointArray(tracks->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which == _which2) {
+ NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480)
+ sendMessage(_asCar, 0x2009, 0);
+ else
+ sendMessage(_asCar, 0x2007, 150);
+ } else {
+ NPoint testPoint = (*_trackPoints)[0];
+ sendMessage(_asCar, 0x2002, 0);
+ if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480)
+ sendMessage(_asCar, 0x2009, 0);
+ else
+ sendMessage(_asCar, 0x2008, 150);
+ }
+
+ if (which == 0) {
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+ _palStatus = 1;
+ } else if (which == 2 || which == 4 || which == 6) {
+ _palette->addPalette(calcHash("paPodBlack"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayBlack"), 0, 65, 0);
+ _palStatus = 0;
+ }
+
+ _palette->copyBasePalette(0, 256, 0);
+
+}
+
+void Scene2703::update() {
+ Scene::update();
+ if (_mouseClicked) {
+ sendPointMessage(_asCar, 0x2004, _mouseClickPos);
+ _mouseClicked = false;
+ }
+ if (_asCar->getX() > 469) {
+ if (_palStatus != 2) {
+ _palette->addBasePalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addBasePalette(calcHash("paKlayShade"), 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _palStatus = 2;
+ }
+ } else if (_asCar->getX() > 181) {
+ if (_palStatus != 1) {
+ _palette->addBasePalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addBasePalette(calcHash("paKlayShade"), 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _palStatus = 1;
+ }
+ } else if (_palStatus != 0) {
+ _palette->addBasePalette(calcHash("paPodBlack"), 65, 31, 65);
+ _palette->addBasePalette(calcHash("paKlayBlack"), 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ _palStatus = 0;
+ }
+}
+
+uint32 Scene2703::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2005:
+ if (_which1 >= 0)
+ leaveScene(_which1);
+ break;
+ case 0x2006:
+ if (_which2 >= 0)
+ leaveScene(_which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+Scene2704::Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId, int16 value,
+ const uint32 *staticSprites, const NRect *clipRect)
+ : Scene(vm, parentModule) {
+
+ TrackInfo *tracks = _vm->_staticData->getTrackInfo(trackInfoId);
+
+ SetMessageHandler(&Scene2704::handleMessage);
+ SetUpdateHandler(&Scene2704::update);
+
+ setBackground(tracks->bgFilename);
+ setPalette(tracks->bgFilename);
+
+ if (tracks->exPaletteFilename1)
+ _palette->addPalette(tracks->exPaletteFilename1, 0, 65, 0);
+
+ if (tracks->exPaletteFilename2)
+ _palette->addPalette(tracks->exPaletteFilename2, 65, 31, 65);
+
+ while (staticSprites && *staticSprites)
+ insertStaticSprite(*staticSprites++, 1100);
+
+ insertScreenMouse(tracks->mouseCursorFilename);
+
+ if (tracks->bgShadowFilename) {
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(tracks->bgShadowFilename);
+ addEntity(_ssTrackShadowBackground);
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ } else {
+ _ssTrackShadowBackground = NULL;
+ _asCarShadow = NULL;
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ }
+
+ _asCarConnector = insertSprite<AsCommonCarConnector>(_asCar);
+ _which1 = tracks->which1;
+ _which2 = tracks->which2;
+ _dataResource.load(tracks->dataResourceFilename);
+ _trackPoints = _dataResource.getPointArray(tracks->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which == _which2) {
+ NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480)
+ sendMessage(_asCar, 0x2009, 0);
+ else
+ sendMessage(_asCar, 0x2007, 0);
+ } else {
+ NPoint testPoint = (*_trackPoints)[0];
+ sendMessage(_asCar, 0x2002, 0);
+ if (testPoint.x > 0 && testPoint.x < 640 && testPoint.y > 0 && testPoint.y < 480)
+ sendMessage(_asCar, 0x2009, 0);
+ else
+ sendMessage(_asCar, 0x2008, 0);
+ }
+
+ if (clipRect) {
+ _asCar->getClipRect() = *clipRect;
+ if (_asCarShadow)
+ _asCarShadow->getClipRect() = *clipRect;
+ if (_asCarTrackShadow)
+ _asCarTrackShadow->getClipRect() = *clipRect;
+ if (_asCarConnectorShadow)
+ _asCarConnectorShadow->getClipRect() = *clipRect;
+ if (_asCarConnector)
+ _asCarConnector->getClipRect() = *clipRect;
+ }
+
+}
+
+void Scene2704::update() {
+ Scene::update();
+ if (_mouseClicked) {
+ sendPointMessage(_asCar, 0x2004, _mouseClickPos);
+ _mouseClicked = false;
+ }
+}
+
+uint32 Scene2704::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2005:
+ if (_which1 >= 0)
+ leaveScene(_which1);
+ break;
+ case 0x2006:
+ if (_which2 >= 0)
+ leaveScene(_which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+Scene2706::Scene2706(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _newTrackIndex(-1) {
+
+ SetMessageHandler(&Scene2706::handleMessage);
+
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B22A0));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B22C4));
+ _tracks.push_back(_vm->_staticData->getTrackInfo(0x004B22E8));
+
+ setBackground(0x18808B88);
+ setPalette(0x18808B88);
+
+ _palette->addPalette(calcHash("paPodShade"), 65, 31, 65);
+ _palette->addPalette(calcHash("paKlayShade"), 0, 65, 0);
+
+ insertScreenMouse(0x08B8C180);
+
+ _ssTrackShadowBackground = createSprite<SsCommonTrackShadowBackground>(0x18808B88);
+ addEntity(_ssTrackShadowBackground);
+
+ _asCar = insertSprite<AsCommonCar>(this, 320, 240);
+ _asCarShadow = insertSprite<AsCommonCarShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnector = insertSprite<AsCommonCarConnector>(_asCar);
+ _asCarTrackShadow = insertSprite<AsCommonCarTrackShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+ _asCarConnectorShadow = insertSprite<AsCommonCarConnectorShadow>(_asCar, _ssTrackShadowBackground->getSurface(), 4);
+
+ _dataResource.load(0x06000162);
+
+ if (which == 5)
+ _currTrackIndex = 2;
+ else if (which == 6)
+ _currTrackIndex = 1;
+ else
+ _currTrackIndex = 0;
+
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+
+ if (which == _tracks[_currTrackIndex]->which2) {
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ if (which == 5)
+ sendMessage(_asCar, 0x2007, 50);
+ else
+ sendMessage(_asCar, 0x2007, 150);
+ } else {
+ sendMessage(_asCar, 0x2002, 0);
+ if (which == 5)
+ sendMessage(_asCar, 0x2008, 50);
+ else
+ sendMessage(_asCar, 0x2008, 150);
+ }
+
+}
+
+uint32 Scene2706::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ moveCarToPoint(param.asPoint());
+ break;
+ case 0x2005:
+ if (_newTrackIndex >= 0) {
+ if (_tracks[_currTrackIndex]->which1 < 0)
+ changeTrack();
+ } else if (_tracks[_currTrackIndex]->which1 >= 0)
+ leaveScene(_tracks[_currTrackIndex]->which1);
+ break;
+ case 0x2006:
+ if (_newTrackIndex >= 0) {
+ if (_tracks[_currTrackIndex]->which2 < 0)
+ changeTrack();
+ } else if (_tracks[_currTrackIndex]->which2 >= 0)
+ leaveScene(_tracks[_currTrackIndex]->which2);
+ break;
+ case 0x200D:
+ sendMessage(_parentModule, 0x200D, 0);
+ break;
+ }
+ return 0;
+}
+
+void Scene2706::moveCarToPoint(NPoint pt) {
+ int minMatchTrackIndex, minMatchDistance;
+ _tracks.findTrackPoint(pt, minMatchTrackIndex, minMatchDistance, _dataResource);
+ if (minMatchTrackIndex >= 0 && minMatchTrackIndex != _currTrackIndex) {
+ _newTrackIndex = minMatchTrackIndex;
+ _newTrackDestX = pt.x;
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2003, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2003, 0);
+ } else {
+ _newTrackIndex = -1;
+ sendMessage(_asCar, 0x2004, pt.x);
+ }
+}
+
+void Scene2706::changeTrack() {
+ _currTrackIndex = _newTrackIndex;
+ _trackPoints = _dataResource.getPointArray(_tracks[_currTrackIndex]->trackPointsName);
+ _asCar->setPathPoints(_trackPoints);
+ if (_currTrackIndex == 0)
+ sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
+ else
+ sendMessage(_asCar, 0x2002, 0);
+ sendMessage(_asCar, 0x2004, _newTrackDestX);
+ _newTrackIndex = -1;
+}
+
+Scene2732::Scene2732(NeverhoodEngine *vm, Module *parentModule)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ setBackground(0x0220C041);
+ setPalette(0x0220C041);
+ insertScreenMouse(0x0C04502A);
+ setRectList(0x004AE360);
+
+ insertKlaymen<KmScene2732>(108, 331);
+ setMessageList(0x004AE328);
+
+ tempSprite = insertStaticSprite(0x50C22C48, 1100);
+ _klaymen->setClipRect(tempSprite->getDrawRect().x, 0, 640, 480);
+
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2700.h b/engines/neverhood/modules/module2700.h
new file mode 100644
index 0000000000..003666bb7f
--- /dev/null
+++ b/engines/neverhood/modules/module2700.h
@@ -0,0 +1,182 @@
+/* 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 NEVERHOOD_MODULES_MODULE2700_H
+#define NEVERHOOD_MODULES_MODULE2700_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1600.h"
+
+namespace Neverhood {
+
+// Module2700
+
+class Module2700 : public Module {
+public:
+ Module2700(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2700();
+protected:
+ int _sceneNum;
+ int _soundIndex;
+ bool _raidoMusicInitialized;
+ uint32 _scene2711StaticSprites[6];
+ uint32 _musicFileHash;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createScene2703(int which, uint32 trackInfoId);
+ void createScene2704(int which, uint32 trackInfoId, int16 value, const uint32 *staticSprites = NULL, const NRect *clipRect = NULL);
+};
+
+class SsCommonTrackShadowBackground : public StaticSprite {
+public:
+ SsCommonTrackShadowBackground(NeverhoodEngine *vm, uint32 fileHash);
+};
+
+class AsCommonCarShadow : public AnimatedSprite {
+public:
+ AsCommonCarShadow(NeverhoodEngine *vm, AnimatedSprite *asCar, BaseSurface *shadowSurface, uint index);
+protected:
+ uint _index;
+ AnimatedSprite *_asCar;
+ uint32 _animFileHash;
+ void update();
+ void updateShadow();
+};
+
+class AsCommonCarConnectorShadow : public AnimatedSprite {
+public:
+ AsCommonCarConnectorShadow(NeverhoodEngine *vm, Sprite *asCar, BaseSurface *shadowSurface, uint index);
+protected:
+ uint _index;
+ Sprite *_asCar;
+ void update();
+};
+
+class AsCommonCarTrackShadow : public AnimatedSprite {
+public:
+ AsCommonCarTrackShadow(NeverhoodEngine *vm, Sprite *asCar, BaseSurface *shadowSurface, int16 frameIndex);
+protected:
+ Sprite *_asCar;
+ void update();
+};
+
+class Scene2701 : public Scene {
+public:
+ Scene2701(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asCarConnectorShadow;
+ Sprite *_asCarConnector;
+ int _which1, _which2;
+ NPointArray *_trackPoints;
+ uint32 hmRidingCar(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmCarAtHome(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2702 : public Scene {
+public:
+ Scene2702(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asCarConnectorShadow;
+ int16 _newTrackDestX;
+ bool _isInLight;
+ int _currTrackIndex, _newTrackIndex;
+ bool _isUpperTrack;
+ Tracks _tracks;
+ NPointArray *_trackPoints;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void moveCarToPoint(NPoint pt);
+ void changeTrack();
+};
+
+class Scene2703 : public Scene {
+public:
+ Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId);
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarConnector;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asCarConnectorShadow;
+ int _palStatus;
+ int _which1, _which2;
+ NPointArray *_trackPoints;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2704 : public Scene {
+public:
+ Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint32 trackInfoId, int16 value,
+ const uint32 *staticSprites = NULL, const NRect *clipRect = NULL);
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarConnector;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asCarConnectorShadow;
+ int _which1, _which2;
+ NPointArray *_trackPoints;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2706 : public Scene {
+public:
+ Scene2706(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ AsCommonCar *_asCar;
+ Sprite *_ssTrackShadowBackground;
+ Sprite *_asCarShadow;
+ Sprite *_asCarConnector;
+ Sprite *_asCarTrackShadow;
+ Sprite *_asCarConnectorShadow;
+ int16 _newTrackDestX;
+ int _currTrackIndex, _newTrackIndex;
+ Tracks _tracks;
+ NPointArray *_trackPoints;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void moveCarToPoint(NPoint pt);
+ void changeTrack();
+};
+
+class Scene2732 : public Scene {
+public:
+ Scene2732(NeverhoodEngine *vm, Module *parentModule);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2700_H */
diff --git a/engines/neverhood/modules/module2800.cpp b/engines/neverhood/modules/module2800.cpp
new file mode 100644
index 0000000000..3d76d05762
--- /dev/null
+++ b/engines/neverhood/modules/module2800.cpp
@@ -0,0 +1,3187 @@
+/* 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 "neverhood/modules/module2800.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1000.h"
+#include "neverhood/modules/module1200.h"
+#include "neverhood/modules/module1700.h"
+#include "neverhood/modules/module2200.h"
+#include "neverhood/diskplayerscene.h"
+
+namespace Neverhood {
+
+Module2800::Module2800(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _musicResource(NULL) {
+
+ _currentMusicFileHash = 0;
+ _vm->_soundMan->addMusic(0x64210814, 0xD2FA4D14);
+ setGlobalVar(V_RADIO_MOVE_DISH_VIDEO, 1);
+
+ if (which < 0) {
+ createScene(_vm->gameState().sceneNum, which);
+ } else if (which == 2) {
+ createScene(4, 3);
+ } else if (which == 1) {
+ createScene(4, 1);
+ } else {
+ createScene(0, 0);
+ }
+
+}
+
+Module2800::~Module2800() {
+ if (_musicResource) {
+ _musicResource->unload();
+ delete _musicResource;
+ }
+ _vm->_soundMan->deleteGroup(0x64210814);
+}
+
+void Module2800::createScene(int sceneNum, int which) {
+ debug(1, "Module2800::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0);
+ _childObject = new Scene2801(_vm, this, which);
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 1;
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0);
+ if (getGlobalVar(V_RADIO_ENABLED))
+ _childObject = new Scene2802(_vm, this, which);
+ else
+ createStaticScene(0x000C6444, 0xC6440008);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 2;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ if (getGlobalVar(V_KLAYMEN_SMALL))
+ _childObject = new Scene2803Small(_vm, this, which);
+ else
+ _childObject = new Scene2803(_vm, this, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 3;
+ _childObject = new Scene2804(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 4;
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2805(_vm, this, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 5;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2806(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 6;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2807(_vm, this, which);
+ break;
+ case 7:
+ _vm->gameState().sceneNum = 7;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2808(_vm, this, 0);
+ break;
+ case 8:
+ _vm->gameState().sceneNum = 8;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2809(_vm, this, which);
+ break;
+ case 9:
+ _vm->gameState().sceneNum = 9;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2810(_vm, this, which);
+ break;
+ case 10:
+ _vm->gameState().sceneNum = 10;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2808(_vm, this, 1);
+ break;
+ case 11:
+ _vm->gameState().sceneNum = 11;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2812(_vm, this, which);
+ break;
+ case 12:
+ _vm->gameState().sceneNum = 12;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x0000A245, 0x0A241008);
+ break;
+ case 13:
+ _vm->gameState().sceneNum = 13;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x81C60635, 0x60631814);
+ break;
+ case 14:
+ _vm->gameState().sceneNum = 14;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0xCA811204, 0x11200CA0);
+ break;
+ case 15:
+ _vm->gameState().sceneNum = 15;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x2D438A00, 0x38A042DC);
+ break;
+ case 16:
+ _vm->gameState().sceneNum = 16;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x0A806204, 0x062000A0);
+ break;
+ case 17:
+ _vm->gameState().sceneNum = 17;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x010F9284, 0xF9280018);
+ break;
+ case 18:
+ _vm->gameState().sceneNum = 18;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x0100022B, 0x0022F018);
+ break;
+ case 19:
+ _vm->gameState().sceneNum = 19;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x10866205, 0x66201100);
+ break;
+ case 20:
+ _vm->gameState().sceneNum = 20;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x01C58000, 0x58004014);
+ break;
+ case 21:
+ _vm->gameState().sceneNum = 21;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new Scene2822(_vm, this, which);
+ break;
+ case 22:
+ _vm->gameState().sceneNum = 22;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x9408121E, 0x8121A948);
+ break;
+ case 23:
+ _vm->gameState().sceneNum = 23;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x048C0600, 0xC0604040);
+ break;
+ case 24:
+ _vm->gameState().sceneNum = 24;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ createStaticScene(0x04270A94, 0x70A9004A);
+ break;
+ case 25:
+ _vm->gameState().sceneNum = 25;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON))
+ createStaticScene(0x01600204, 0x0020001E);
+ else
+ createStaticScene(0x08611204, 0x1120008E);
+ break;
+ case 26:
+ _vm->gameState().sceneNum = 26;
+ _vm->_soundMan->startMusic(0xD2FA4D14, 0, 2);
+ _childObject = new DiskplayerScene(_vm, this, 4);
+ break;
+ case 1001:
+ _vm->_soundMan->stopMusic(0xD2FA4D14, 0, 0);
+ createSmackerScene(0x00800801, true, true, false);
+ break;
+ }
+ SetUpdateHandler(&Module2800::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2800::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult != 2) {
+ if (_musicResource) {
+ _musicResource->unload();
+ delete _musicResource;
+ _musicResource = NULL;
+ }
+ _currentMusicFileHash = 0;
+ }
+ if (_moduleResult == 1) {
+ createScene(2, 0);
+ } else if (_moduleResult == 2) {
+ createScene(1, 0);
+ } else {
+ leaveModule(0);
+ }
+ break;
+ case 1:
+ if (_moduleResult == 0) {
+ createScene(0, 2);
+ } else {
+ createScene(1001, -1);
+ }
+ break;
+ case 2:
+ if (_moduleResult == 1)
+ createScene(3, 0);
+ else if (_moduleResult == 2)
+ createScene(5, 0);
+ else if (_moduleResult == 3)
+ createScene(6, 0);
+ else if (_moduleResult == 4)
+ createScene(9, 0);
+ else if (_moduleResult == 5)
+ createScene(25, 0);
+ else
+ createScene(0, 1);
+ break;
+ case 3:
+ createScene(2, 1);
+ break;
+ case 4:
+ if (_moduleResult == 1) {
+ leaveModule(1);
+ } else {
+ createScene(11, 1);
+ }
+ break;
+ case 5:
+ if (_moduleResult == 1) {
+ createScene(7, 0);
+ } else {
+ createScene(2, 2);
+ }
+ break;
+ case 6:
+ createScene(2, 3);
+ break;
+ case 7:
+ createScene(5, _moduleResult);
+ break;
+ case 8:
+ if (_moduleResult == 1)
+ createScene(10, 0);
+ else
+ createScene(9, 4);
+ break;
+ case 9:
+ if (_moduleResult == 1)
+ createScene(11, 0);
+ else if (_moduleResult == 2)
+ createScene(2, 0);
+ else if (_moduleResult == 3)
+ createScene(24, 0);
+ else if (_moduleResult == 4)
+ createScene(8, 0);
+ else if (_moduleResult == 6)
+ createScene(2, 6);
+ else if (_moduleResult == 11)
+ createScene(12, 0);
+ else if (_moduleResult == 12)
+ createScene(13, 0);
+ else if (_moduleResult == 13)
+ createScene(14, 0);
+ else if (_moduleResult == 14)
+ createScene(15, 0);
+ else if (_moduleResult == 15)
+ createScene(16, 0);
+ else if (_moduleResult == 16)
+ createScene(17, 0);
+ else if (_moduleResult == 17)
+ createScene(18, 0);
+ else if (_moduleResult == 18)
+ createScene(19, 0);
+ else if (_moduleResult == 19)
+ createScene(20, 0);
+ else if (_moduleResult == 20)
+ createScene(21, 0);
+ else if (_moduleResult == 21)
+ createScene(22, 0);
+ else if (_moduleResult == 22)
+ createScene(23, 0);
+ else
+ createScene(2, 4);
+ break;
+ case 10:
+ createScene(8, _moduleResult);
+ break;
+ case 11:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else if (_moduleResult == 2)
+ createScene(26, 0);
+ else if (_moduleResult == 3)
+ createScene(9, 5);
+ else
+ createScene(9, 1);
+ break;
+ case 12:
+ createScene(9, 11);
+ break;
+ case 13:
+ createScene(9, 12);
+ break;
+ case 14:
+ createScene(9, 13);
+ break;
+ case 15:
+ createScene(9, 14);
+ break;
+ case 16:
+ createScene(9, 15);
+ break;
+ case 17:
+ createScene(9, 16);
+ break;
+ case 18:
+ createScene(9, 17);
+ break;
+ case 19:
+ createScene(9, 18);
+ break;
+ case 20:
+ createScene(9, 19);
+ break;
+ case 21:
+ createScene(9, 20);
+ break;
+ case 22:
+ createScene(9, 21);
+ break;
+ case 23:
+ createScene(9, 22);
+ break;
+ case 24:
+ createScene(9, 3);
+ break;
+ case 25:
+ createScene(2, 5);
+ break;
+ case 26:
+ createScene(11, 2);
+ break;
+ case 1001:
+ createScene(1, -1);
+ break;
+ }
+ } else {
+ switch (_sceneNum) {
+ case 0:
+ updateMusic(true);
+ break;
+ case 1:
+ updateMusic(false);
+ break;
+ }
+ }
+}
+
+void Module2800::updateMusic(bool halfVolume) {
+
+ uint32 newMusicFileHash = _vm->_gameModule->getCurrRadioMusicFileHash();
+
+ if (!_musicResource)
+ _musicResource = new MusicResource(_vm);
+
+ if (newMusicFileHash != _currentMusicFileHash) {
+ _currentMusicFileHash = newMusicFileHash;
+ if (_currentMusicFileHash != 0) {
+ _musicResource->load(_currentMusicFileHash);
+ _musicResource->setVolume(halfVolume ? 60 : 100);
+ _musicResource->play(0);
+ } else {
+ _musicResource->stop(0);
+ }
+ } else if (_currentMusicFileHash != 0) {
+ if (!_musicResource->isPlaying()) {
+ _musicResource->setVolume(halfVolume ? 60 : 100);
+ _musicResource->play(0);
+ } else {
+ _musicResource->setVolume(halfVolume ? 60 : 100);
+ }
+ } else {
+ _musicResource->stop(0);
+ }
+
+}
+
+Scene2801::Scene2801(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+
+ _vm->gameModule()->initRadioPuzzle();
+
+ SetMessageHandler(&Scene2801::handleMessage);
+ SetUpdateHandler(&Scene::update);
+
+ // Display the disabled radio; only possible when the left door is open
+ if (!getGlobalVar(V_RADIO_ENABLED))
+ insertStaticSprite(0x0001264C, 100);
+
+ if (which < 0) {
+ insertKlaymen<KmScene2801>(194, 430);
+ setMessageList(0x004B6BB8);
+ } else if (which == 1) {
+ insertKlaymen<KmScene2801>(443, 398);
+ setMessageList(0x004B6BC0);
+ } else if (which == 2) {
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene2801>(312, 432);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene2801>(194, 432);
+ }
+ setMessageList(0x004B6C10);
+ } else {
+ insertKlaymen<KmScene2801>(0, 432);
+ setMessageList(0x004B6BB0);
+ }
+
+ if (getGlobalVar(V_RADIO_ROOM_LEFT_DOOR)) {
+ setRectList(0x004B6CE0);
+ setBackground(0x01400666);
+ setPalette(0x01400666);
+ _paletteHash = 0x15021024;
+ _palette->addBasePalette(0x01400666, 0, 256, 0);
+ _sprite1 = insertStaticSprite(0x100CA0A8, 1100);
+ _sprite2 = insertStaticSprite(0x287C21A4, 1100);
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite2->getDrawRect().x2(), 480);
+ insertScreenMouse(0x0066201C);
+ _asTape = insertSprite<AsScene1201Tape>(this, 8, 1100, 302, 437, 0x9148A011);
+ addCollisionSprite(_asTape);
+ } else if (getGlobalVar(V_RADIO_ROOM_RIGHT_DOOR)) {
+ setRectList(0x004B6CD0);
+ setBackground(0x11E00684);
+ setPalette(0x11E00684);
+ _paletteHash = 0x15021024;
+ _palette->addBasePalette(0x11E00684, 0, 256, 0);
+ _sprite2 = insertStaticSprite(0x061601C8, 1100);
+ _klaymen->setClipRect(0, 0, _sprite2->getDrawRect().x2(), 480);
+ insertScreenMouse(0x00680116);
+ _asTape = insertSprite<SsScene1705Tape>(this, 8, 1100, 302, 437, 0x01142428);
+ addCollisionSprite(_asTape);
+ } else {
+ setRectList(0x004B6CF0);
+ setBackground(0x030006E6);
+ setPalette(0x030006E6);
+ _paletteHash = 0x15021024;
+ _palette->addBasePalette(0x030006E6, 0, 256, 0);
+ _sprite2 = insertStaticSprite(0x273801CE, 1100);
+ _klaymen->setClipRect(0, 0, _sprite2->getDrawRect().x2(), 480);
+ insertScreenMouse(0x006E2038);
+ _asTape = insertSprite<AsScene1201Tape>(this, 8, 1100, 302, 437, 0x9148A011);
+ addCollisionSprite(_asTape);
+ }
+
+ addEntity(_palette);
+
+ if (which == 1) {
+ _palette->addPalette(0xB103B604, 0, 65, 0);
+ _palette->addBasePalette(0xB103B604, 0, 65, 0);
+ } else {
+ _palette->addPalette(_paletteHash, 0, 65, 0);
+ _palette->addBasePalette(_paletteHash, 0, 65, 0);
+ }
+
+}
+
+Scene2801::~Scene2801() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+}
+
+uint32 Scene2801::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4826:
+ if (sender == _asTape) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004B6C40);
+ }
+ break;
+ case 0x482A:
+ _palette->addBasePalette(0xB103B604, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ break;
+ case 0x482B:
+ _palette->addBasePalette(_paletteHash, 0, 65, 0);
+ _palette->startFadeToPalette(12);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2802::Scene2802(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _currTuneStatus(0), _countdown1(0), _countdown2(0) {
+
+ SetMessageHandler(&Scene2802::handleMessage);
+ SetUpdateHandler(&Scene2802::update);
+ insertPuzzleMouse(0x008810A8, 20, 620);
+ _smackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, 0x8284C100, true, true, true));
+ _currRadioMusicIndex = getGlobalVar(V_CURR_RADIO_MUSIC_INDEX);
+ // Need to go to the first frame first to load up the palette
+ _smackerPlayer->gotoFrame(0);
+ // Now we can actually set the current radio frame
+ _smackerPlayer->gotoFrame(_currRadioMusicIndex);
+ _vm->_soundMan->addSound(0x04360A18, 0x422630C2);
+ _vm->_soundMan->addSound(0x04360A18, 0x00632252);
+ _vm->_soundMan->addSound(0x04360A18, 0x00372241);
+ _vm->_soundMan->setSoundVolume(0x00372241, 60);
+ changeTuneStatus(0, 0);
+ _vm->_soundMan->playSoundLooping(0x00372241);
+}
+
+Scene2802::~Scene2802() {
+ _vm->_soundMan->deleteSoundGroup(0x04360A18);
+ if (_currRadioMusicIndex == 0) {
+ setGlobalVar(V_RADIO_ROOM_LEFT_DOOR, 1);
+ setGlobalVar(V_RADIO_ROOM_RIGHT_DOOR, 0);
+ } else if (_currRadioMusicIndex == getGlobalVar(V_GOOD_RADIO_MUSIC_INDEX)) {
+ setGlobalVar(V_RADIO_ROOM_LEFT_DOOR, 0);
+ setGlobalVar(V_RADIO_ROOM_RIGHT_DOOR, 1);
+ } else {
+ setGlobalVar(V_RADIO_ROOM_LEFT_DOOR, 0);
+ setGlobalVar(V_RADIO_ROOM_RIGHT_DOOR, 0);
+ }
+ setGlobalVar(V_CURR_RADIO_MUSIC_INDEX, _currRadioMusicIndex);
+}
+
+void Scene2802::update() {
+ int prevTuneStatus = _currTuneStatus;
+ uint prevRadioMusicIndex = _currRadioMusicIndex;
+
+ Scene::update();
+ if (_countdown1 > 0)
+ --_countdown1;
+ else if (_currTuneStatus == 1)
+ _currTuneStatus = 3;
+ else if (_currTuneStatus == 4)
+ _currTuneStatus = 6;
+
+ switch (_currTuneStatus) {
+ case 2:
+ if (_currRadioMusicIndex < 90)
+ incRadioMusicIndex(+1);
+ _currTuneStatus = 0;
+ break;
+ case 3:
+ if (_countdown2 > 0)
+ --_countdown2;
+ else if (_currRadioMusicIndex < 90) {
+ incRadioMusicIndex(+1);
+ _countdown2 = 1;
+ } else
+ _currTuneStatus = 0;
+ break;
+ case 5:
+ if (_currRadioMusicIndex > 0)
+ incRadioMusicIndex(-1);
+ _currTuneStatus = 0;
+ break;
+ case 6:
+ if (_countdown2 > 0)
+ --_countdown2;
+ else if (_currRadioMusicIndex > 0) {
+ incRadioMusicIndex(-1);
+ _countdown2 = 1;
+ } else
+ _currTuneStatus = 0;
+ break;
+
+ }
+
+ if (prevRadioMusicIndex != _currRadioMusicIndex)
+ _smackerPlayer->gotoFrame(_currRadioMusicIndex);
+
+ if (prevTuneStatus != _currTuneStatus)
+ changeTuneStatus(prevTuneStatus, _currTuneStatus);
+
+ if (getGlobalVar(V_RADIO_MOVE_DISH_VIDEO) && prevTuneStatus != _currTuneStatus && _currRadioMusicIndex != 0) {
+ setGlobalVar(V_RADIO_MOVE_DISH_VIDEO, 0);
+ leaveScene(1);
+ }
+
+}
+
+uint32 Scene2802::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ int prevTuneStatus = _currTuneStatus;
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ } else if (_currTuneStatus == 0) {
+ if (param.asPoint().x > 180 && param.asPoint().x < 300 &&
+ param.asPoint().y > 130 && param.asPoint().y < 310) {
+ _currTuneStatus = 4;
+ } else if (param.asPoint().x > 300 && param.asPoint().x < 400 &&
+ param.asPoint().y > 130 && param.asPoint().y < 310) {
+ _currTuneStatus = 1;
+ }
+ if (_currTuneStatus == 1 || _currTuneStatus == 4) {
+ _countdown1 = 8;
+ changeTuneStatus(0, _currTuneStatus);
+ }
+ }
+ break;
+ case 0x0002:
+ if (_countdown1 == 0)
+ _currTuneStatus = 0;
+ else {
+ if (_currTuneStatus == 1)
+ _currTuneStatus = 2;
+ else if (_currTuneStatus == 4)
+ _currTuneStatus = 5;
+ else
+ _currTuneStatus = 0;
+ _countdown1 = 0;
+ }
+ if (prevTuneStatus != _currTuneStatus)
+ changeTuneStatus(prevTuneStatus, _currTuneStatus);
+ break;
+ }
+ return 0;
+}
+
+void Scene2802::incRadioMusicIndex(int delta) {
+ _currRadioMusicIndex += delta;
+ setGlobalVar(V_CURR_RADIO_MUSIC_INDEX, _currRadioMusicIndex);
+}
+
+void Scene2802::changeTuneStatus(int prevTuneStatus, int newTuneStatus) {
+
+ if (prevTuneStatus == 3 || prevTuneStatus == 6) {
+ _vm->_soundMan->stopSound(0x422630C2);
+ _vm->_soundMan->stopSound(0x00632252);
+ }
+
+ if (newTuneStatus == 0) {
+ if (_vm->_gameModule->getCurrRadioMusicFileHash() != 0)
+ _vm->_soundMan->stopSound(0x00632252);
+ else
+ _vm->_soundMan->playSoundLooping(0x00632252);
+ } else if (newTuneStatus == 3 || newTuneStatus == 6) {
+ _vm->_soundMan->playSoundLooping(0x422630C2);
+ _vm->_soundMan->playSoundLooping(0x00632252);
+ }
+
+}
+
+AsScene2803LightCord::AsScene2803LightCord(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int16 x, int16 y)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _fileHash1(fileHash1), _fileHash2(fileHash2),
+ _isPulled(false), _isBusy(false) {
+
+ createSurface(1010, 28, 379);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ _x = x;
+ _y = y;
+ stIdle();
+}
+
+uint32 AsScene2803LightCord::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (!_isBusy && param.asInteger() == calcHash("ClickSwitch")) {
+ sendMessage(_parentScene, 0x480F, 0);
+ playSound(0, 0x4E1CA4A0);
+ }
+ break;
+ case 0x480F:
+ stPulled();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene2803LightCord::hmPulled(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2803LightCord::stPulled() {
+ _isBusy = false;
+ _isPulled = true;
+ startAnimation(_fileHash2, 0, -1);
+ SetMessageHandler(&AsScene2803LightCord::hmPulled);
+ NextState(&AsScene2803LightCord::stIdle);
+}
+
+void AsScene2803LightCord::stIdle() {
+ _isPulled = false;
+ startAnimation(_fileHash1, 0, -1);
+ SetMessageHandler(&AsScene2803LightCord::handleMessage);
+}
+
+void AsScene2803LightCord::setFileHashes(uint32 fileHash1, uint32 fileHash2) {
+ _fileHash1 = fileHash1;
+ _fileHash2 = fileHash2;
+ if (_isPulled) {
+ startAnimation(_fileHash2, _currFrameIndex, -1);
+ _isBusy = true;
+ } else {
+ startAnimation(_fileHash1, 0, -1);
+ }
+}
+
+AsScene2803TestTubeOne::AsScene2803TestTubeOne(NeverhoodEngine *vm, uint32 fileHash1, uint32 fileHash2)
+ : AnimatedSprite(vm, 1200), _fileHash1(fileHash1), _fileHash2(fileHash2) {
+
+ createSurface1(fileHash1, 100);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2803TestTubeOne::handleMessage);
+ _x = 529;
+ _y = 326;
+}
+
+uint32 AsScene2803TestTubeOne::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (param.asInteger())
+ startAnimation(_fileHash2, 0, -1);
+ else
+ startAnimation(_fileHash1, 0, -1);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2803Rope::AsScene2803Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(990, 68, 476);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ SetMessageHandler(&AsScene2803Rope::handleMessage);
+ startAnimation(0x9D098C23, 35, 53);
+ NextState(&AsScene2803Rope::stReleased);
+ _x = x;
+ _y = -276;
+}
+
+uint32 AsScene2803Rope::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ startAnimation(0x9D098C23, 50, -1);
+ SetMessageHandler(&AsScene2803Rope::hmReleased);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene2803Rope::hmReleased(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2803Rope::stReleased() {
+ startAnimation(0x8258A030, 0, 1);
+ NextState(&AsScene2803Rope::stHide);
+}
+
+void AsScene2803Rope::stHide() {
+ stopAnimation();
+ setVisible(false);
+}
+
+Scene2803::Scene2803(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _paletteArea(0) {
+
+ static const uint32 kScene2803FileHashes1[] = {
+ 0,
+ 0x081000F1,
+ 0x08100171,
+ 0x08100271
+ };
+
+ static const uint32 kScene2803FileHashes2[] = {
+ 0,
+ 0x286800D4,
+ 0x286806D4,
+ 0x28680AD4
+ };
+
+ setGlobalVar(V_BEEN_SHRINKING_ROOM, 1);
+ _vm->gameModule()->initTestTubes1Puzzle();
+
+ SetMessageHandler(&Scene2803::handleMessage);
+
+ loadDataResource(0x00900849);
+
+ _background = new Background(_vm, 0);
+ _background->createSurface(0, 640, 480);
+ addBackground(_background);
+
+ setPalette(0x412A423E);
+ addEntity(_palette);
+
+ insertScreenMouse(0xA423A41A);
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 0) {
+ _asTestTubeOne = (StaticSprite*)insertStaticSprite(0x66121222, 100);
+ } else {
+ _asTestTubeOne = (StaticSprite*)insertSprite<AsScene2803TestTubeOne>(
+ kScene2803FileHashes1[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0)],
+ kScene2803FileHashes2[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0)]);
+ }
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3)
+ _asTestTubeTwo = (StaticSprite*)insertStaticSprite(0x64330236, 100);
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3)
+ _asTestTubeThree = (StaticSprite*)insertStaticSprite(0x2E4A22A2, 100);
+
+ _asLightCord = insertSprite<AsScene2803LightCord>(this, 0x8FAD5932, 0x276E1A3D, 578, 200);
+ _sprite3 = (StaticSprite*)insertStaticSprite(0xA40EF2FB, 1100);
+ _sprite4 = (StaticSprite*)insertStaticSprite(0x0C03AA23, 1100);
+ _sprite5 = (StaticSprite*)insertStaticSprite(0x2A822E2E, 1100);
+ _sprite6 = (StaticSprite*)insertStaticSprite(0x2603A202, 1100);
+ _sprite7 = (StaticSprite*)insertStaticSprite(0x24320220, 1100);
+ _sprite8 = (StaticSprite*)insertStaticSprite(0x3C42022F, 1100);
+ _sprite9 = (StaticSprite*)insertStaticSprite(0x341A0237, 1100);
+ _sprite10 = insertStaticSprite(0x855820A3, 1200);
+
+ _clipRectsFloor[0].x1 = 0;
+ _clipRectsFloor[0].y1 = 0;
+ _clipRectsFloor[0].x2 = 640;
+ _clipRectsFloor[0].y2 = _sprite8->getDrawRect().y2();
+
+ _clipRectsFloor[1].x1 = _sprite8->getDrawRect().x2();
+ _clipRectsFloor[1].y1 = _sprite8->getDrawRect().y2();
+ _clipRectsFloor[1].x2 = 640;
+ _clipRectsFloor[1].y2 = 480;
+
+ _clipRectsStairs[0].x1 = _sprite5->getDrawRect().x;
+ _clipRectsStairs[0].y1 = 0;
+ _clipRectsStairs[0].x2 = _sprite5->getDrawRect().x2();
+ _clipRectsStairs[0].y2 = _sprite5->getDrawRect().y2();
+
+ _clipRectsStairs[1].x1 = _sprite6->getDrawRect().x;
+ _clipRectsStairs[1].y1 = 0;
+ _clipRectsStairs[1].x2 = _sprite3->getDrawRect().x;
+ _clipRectsStairs[1].y2 = _sprite6->getDrawRect().y2();
+
+ _clipRectsStairs[2].x1 = _sprite3->getDrawRect().x;
+ _clipRectsStairs[2].y1 = 0;
+ _clipRectsStairs[2].x2 = _sprite4->getDrawRect().x2();
+ _clipRectsStairs[2].y2 = 480;
+
+ if (which < 0) {
+ insertKlaymen<KmScene2803>(302, 445, _clipRectsFloor, 2);
+ setMessageList(0x004B79F0);
+ klaymenFloor();
+ } else if (which == 1) {
+ insertKlaymen<KmScene2803>(200, 445, _clipRectsFloor, 2);
+ setMessageList(0x004B79C8);
+ klaymenFloor();
+ } else if (which == 3) {
+ NPoint pt = _dataResource.getPoint(0xC2A08694);
+ insertKlaymen<KmScene2803>(pt.x, pt.y, _clipRectsStairs, 3);
+ setMessageList(0x004B7A00);
+ klaymenStairs();
+ } else if (which == 5) {
+ insertKlaymen<KmScene2803>(253, 298, _clipRectsStairs, 3);
+ setMessageList(0x004B7A00);
+ klaymenStairs();
+ } else if (which == 6) {
+ _asRope = insertSprite<AsScene2803Rope>(this, 384);
+ _asRope->setClipRect(0, 25, 640, 480);
+ insertKlaymen<KmScene2803>(384, 0, _clipRectsFloor, 2);
+ sendEntityMessage(_klaymen, 0x1014, _asRope);
+ _klaymen->setClipRect(0, 25, 640, 480);
+ setMessageList(0x004B7A78);
+ klaymenFloor();
+ } else if (which == 2) {
+ insertKlaymen<KmScene2803>(400, 445, _clipRectsFloor, 2);
+ setMessageList(0x004B79F8);
+ klaymenFloor();
+ } else {
+ insertKlaymen<KmScene2803>(50, 231, _clipRectsStairs, 3);
+ setMessageList(0x004B79C0);
+ klaymenStairs();
+ }
+
+ changeBackground();
+
+}
+
+void Scene2803::upKlaymenStairs() {
+ if (_klaymen->getX() < 350) {
+ setPaletteArea0();
+ } else {
+ setPaletteArea1();
+ }
+ Scene::update();
+}
+
+uint32 Scene2803::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x480F:
+ toggleBackground();
+ // NOTE Intentional fall-through
+ case 0x100D:
+ if (param.asInteger() == 0x84251F82)
+ setMessageList(0x004B7A50);
+ else if (param.asInteger() == 0x4254A2D2)
+ setMessageList(0x004B7A58);
+ else if (param.asInteger() == 0xE90A40A0)
+ setMessageList(0x004B7A08);
+ else if (param.asInteger() == 0x482D1210)
+ setMessageList(0x004B7A30);
+ else if (param.asInteger() == 0x802402B2) {
+ sendEntityMessage(_klaymen, 0x1014, _asLightCord);
+ setMessageList(0x004B7A68);
+ } else if (param.asInteger() == 0x9626F390)
+ setMessageList(0x004B7A88);
+ break;
+ case 0x482A:
+ klaymenStairs();
+ setPaletteArea1();
+ break;
+ case 0x482B:
+ klaymenFloor();
+ setPaletteArea0();
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2803::klaymenStairs() {
+ SetUpdateHandler(&Scene2803::upKlaymenStairs);
+ _klaymen->getSurface()->setClipRects(_clipRectsStairs, 3);
+ sendMessage(_klaymen, 0x482C, 0xE5A48297);
+ _sprite3->setVisible(true);
+ _sprite4->setVisible(true);
+ _sprite5->setVisible(true);
+ _sprite6->setVisible(true);
+ _sprite7->setVisible(true);
+ _sprite8->setVisible(false);
+ _sprite9->setVisible(false);
+}
+
+void Scene2803::klaymenFloor() {
+ SetUpdateHandler(&Scene::update);
+ _klaymen->getSurface()->setClipRects(_clipRectsFloor, 2);
+ sendMessage(_klaymen, 0x482C, 0);
+ _sprite3->setVisible(false);
+ _sprite4->setVisible(false);
+ _sprite5->setVisible(false);
+ _sprite6->setVisible(false);
+ _sprite7->setVisible(false);
+ _sprite8->setVisible(true);
+ _sprite9->setVisible(true);
+}
+
+void Scene2803::toggleBackground() {
+ setGlobalVar(V_SHRINK_LIGHTS_ON, getGlobalVar(V_SHRINK_LIGHTS_ON) ? 0 : 1);
+ changeBackground();
+}
+
+void Scene2803::changeBackground() {
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON)) {
+ _asLightCord->setFileHashes(0x8FAD5932, 0x276E1A3D);
+ _background->load(0x412A423E);
+ _palette->addPalette(0x412A423E, 0, 256, 0);
+ _palette->addBasePalette(0x412A423E, 0, 256, 0);
+ _sprite3->loadSprite(0xA40EF2FB);
+ _sprite4->loadSprite(0x0C03AA23);
+ _sprite5->loadSprite(0x2A822E2E);
+ _sprite6->loadSprite(0x2603A202);
+ _sprite7->loadSprite(0x24320220);
+ _mouseCursor->load(0xA423A41A);
+ _mouseCursor->updateCursor();
+ _sprite8->loadSprite(0x3C42022F);
+ _sprite9->loadSprite(0x341A0237);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 0)
+ _asTestTubeOne->loadSprite(0x66121222);
+ else
+ sendMessage(_asTestTubeOne, 0x2000, 0);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3)
+ _asTestTubeTwo->loadSprite(0x64330236);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3)
+ _asTestTubeThree->loadSprite(0x2E4A22A2);
+ _sprite10->setVisible(true);
+ } else {
+ _asLightCord->setFileHashes(0xAFAD591A, 0x276E321D);
+ _background->load(0x29800A01);
+ _palette->addPalette(0x29800A01, 0, 256, 0);
+ _palette->addBasePalette(0x29800A01, 0, 256, 0);
+ _sprite3->loadSprite(0x234340A0);
+ _sprite4->loadSprite(0x16202200);
+ _sprite5->loadSprite(0x1030169A);
+ _sprite6->loadSprite(0x1600A6A8);
+ _sprite7->loadSprite(0xD0802EA0);
+ _mouseCursor->load(0x00A05290);
+ _mouseCursor->updateCursor();
+ _sprite8->loadSprite(0x108012C1);
+ _sprite9->loadSprite(0x708072E0);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) != 0)
+ sendMessage(_asTestTubeOne, 0x2000, 1);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3)
+ _asTestTubeTwo->loadSprite(0xD48077A0);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3)
+ _asTestTubeThree->loadSprite(0x30022689);
+ _sprite10->setVisible(false);
+ }
+ updatePaletteArea();
+}
+
+void Scene2803::setPaletteArea0() {
+ if (_paletteArea != 0) {
+ _paletteArea = 0;
+ updatePaletteArea();
+ }
+}
+
+void Scene2803::setPaletteArea1() {
+ if (_paletteArea != 1) {
+ _paletteArea = 1;
+ updatePaletteArea();
+ }
+}
+
+void Scene2803::updatePaletteArea() {
+ uint32 fadePaletteHash;
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON))
+ fadePaletteHash = (_paletteArea == 1) ? 0xB103B604 : 0x412A423E;
+ else
+ fadePaletteHash = (_paletteArea == 1) ? 0x0263D144 : 0x29800A01;
+ _palette->addBasePalette(fadePaletteHash, 0, 64, 0);
+ _palette->startFadeToPalette(12);
+}
+
+Scene2803Small::Scene2803Small(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _paletteArea(0) {
+
+ static const uint32 kScene2803SmallFileHashes1[] = {
+ 0, 0x081000F1, 0x08100171, 0x08100271
+ };
+
+ static const uint32 kScene2803SmallFileHashes2[] = {
+ 0, 0x286800D4, 0x286806D4, 0x28680AD4
+ };
+
+ SetMessageHandler(&Scene2803Small::handleMessage);
+
+ loadDataResource(0x81120132);
+ insertScreenMouse(0x00A05290);
+
+ insertSprite<AsScene2803LightCord>(this, 0xAFAD591A, 0x276E321D, 578, 200);
+
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON)) {
+ setBackground(0x412A423E);
+ setPalette(0x412A423E);
+ _palette->addBasePalette(0x412A423E, 0, 256, 0);
+ addEntity(_palette);
+ _sprite1 = insertStaticSprite(0x0C03AA23, 1100);
+ _sprite2 = insertStaticSprite(0x24320220, 1100);
+ _sprite3 = insertStaticSprite(0x1A032204, 1100);
+ _sprite4 = insertStaticSprite(0x18032204, 1100);
+ _sprite5 = insertStaticSprite(0x34422912, 1100);
+ _sprite6 = insertStaticSprite(0x3C42022F, 1100);
+ _sprite7 = insertStaticSprite(0x341A0237, 1100);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 0)
+ insertStaticSprite(0x66121222, 100);
+ else
+ insertSprite<AnimatedSprite>(kScene2803SmallFileHashes1[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0)], 100, 529, 326);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3)
+ insertStaticSprite(0x64330236, 100);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3)
+ insertStaticSprite(0x2E4A22A2, 100);
+ } else {
+ setBackground(0x29800A01);
+ setPalette(0x29800A01);
+ _palette->addBasePalette(0x29800A01, 0, 256, 0);
+ addEntity(_palette);
+ _sprite1 = insertStaticSprite(0x16202200, 1100);
+ _sprite2 = insertStaticSprite(0xD0802EA0, 1100);
+ _sprite3 = insertStaticSprite(0x780C2E30, 1100);
+ _sprite4 = insertStaticSprite(0x700C2E30, 1100);
+ _sprite5 = insertStaticSprite(0x102CE6E1, 900);
+ _sprite6 = insertStaticSprite(0x108012C1, 1100);
+ _sprite7 = insertStaticSprite(0x708072E0, 1100);
+ insertStaticSprite(0x90582EA4, 100);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) != 0)
+ insertSprite<AnimatedSprite>(kScene2803SmallFileHashes2[getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0)], 100, 529, 326);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3)
+ insertStaticSprite(0xD48077A0, 100);
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3)
+ insertStaticSprite(0x30022689, 100);
+ }
+
+ _sprite6->setVisible(false);
+ _sprite7->setVisible(false);
+
+ if (which < 0) {
+ insertKlaymen<KmScene2803Small>(479, 435);
+ klaymenFloor();
+ setMessageList(0x004B60D8);
+ } else if (which == 3) {
+ NPoint pt = _dataResource.getPoint(0x096520ED);
+ insertKlaymen<KmScene2803Small>(pt.x, pt.y);
+ klaymenSlope();
+ setMessageList(0x004B6100);
+ _klaymen->setRepl(64, 0);
+ } else if (which == 4) {
+ NPoint pt = _dataResource.getPoint(0x20C6238D);
+ insertKlaymen<KmScene2803Small>(pt.x, pt.y);
+ klaymenSlope();
+ setMessageList(0x004B60F8);
+ _klaymen->setRepl(64, 0);
+ } else if (which == 5) {
+ NPoint pt = _dataResource.getPoint(0x2146690D);
+ insertKlaymen<KmScene2803Small>(pt.x, pt.y);
+ klaymenSlope();
+ setMessageList(0x004B6100);
+ _klaymen->setRepl(64, 0);
+ } else if (which == 2) {
+ NPoint pt = _dataResource.getPoint(0x104C03ED);
+ insertKlaymen<KmScene2803Small>(pt.x, pt.y);
+ klaymenFloor();
+ setMessageList(0x004B6138);
+ } else {
+ insertKlaymen<KmScene2803Small>(135, 444);
+ klaymenFloor();
+ setMessageList(0x004B60E0, false);
+ _sprite6->setVisible(true);
+ _sprite7->setVisible(true);
+ }
+
+}
+
+uint32 Scene2803Small::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xB4E4884C) {
+ setMessageList(0x004B6180);
+ } else if (param.asInteger() == 0xB1FDAB2E) {
+ NPoint pt = _dataResource.getPoint(0x0D84A1AD);
+ _klaymen->setX(pt.x);
+ _klaymen->setY(pt.y);
+ _klaymen->updateBounds();
+ klaymenFloor();
+ _klaymen->setClipRect(517, 401, 536, 480);
+ setMessageList(0x004B6198);
+ } else if (param.asInteger() == 0xB00C7C48) {
+ setMessageList(0x004B6108);
+ } else if (param.asInteger() == 0x61F64346) {
+ setMessageList(0x004B6150);
+ } else if (param.asInteger() == 0xAC69A28D) {
+ setMessageList(0x004B6168);
+ } else if (param.asInteger() == 0x00086212) {
+ _klaymen->setClipRect(0, 0, 560, 315);
+ _klaymen->setX(560);
+ _klaymen->setY(315);
+ _klaymen->updateBounds();
+ klaymenSlope();
+ setMessageList(0x004B61A0);
+ } else if (param.asInteger() == 0x002CAA68) {
+ setMessageList(0x004B61A8);
+ }
+ break;
+ case 0x482A:
+ if (_klaymen->getX() < 200) {
+ setPaletteArea3();
+ } else if (_klaymen->getX() < 500) {
+ setSurfacePriority(_sprite5->getSurface(), 1100);
+ sendMessage(_klaymen, 0x482C, 0);
+ setPaletteArea2();
+ } else {
+ _klaymen->setClipRect(517, 401, 536, 480);
+ setPaletteArea2();
+ }
+ break;
+ case 0x482B:
+ _sprite6->setVisible(false);
+ _sprite7->setVisible(false);
+ _klaymen->setClipRect(0, 0, 640, 480);
+ setSurfacePriority(_sprite5->getSurface(), 900);
+ sendMessage(_klaymen, 0x482C, 0x2086222D);
+ break;
+ }
+ return 0;
+}
+
+void Scene2803Small::upKlaymenSlope() {
+ if (_klaymen->getX() < 388) {
+ _klaymen->setClipRect(_sprite3->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ setPaletteArea0();
+ } else if (_klaymen->getX() < 500) {
+ _klaymen->setClipRect(0, 0, _sprite1->getDrawRect().x2(), _sprite1->getDrawRect().y2());
+ setPaletteArea1();
+ }
+ Scene::update();
+}
+
+void Scene2803Small::upKlaymenFloor() {
+ if (_klaymen->getX() > 194 && _klaymen->getX() < 273)
+ setPaletteArea2();
+ else if (_klaymen->getX() > 155 && _klaymen->getX() < 300)
+ setPaletteArea0();
+ Scene::update();
+}
+
+void Scene2803Small::klaymenSlope() {
+ SetUpdateHandler(&Scene2803Small::upKlaymenSlope);
+ sendMessage(_klaymen, 0x482C, 0x23C630D9);
+ _klaymen->setClipRect(0, 0, _sprite1->getDrawRect().x2(), _sprite1->getDrawRect().y2());
+ _klaymen->setRepl(64, 0);
+ _sprite1->setVisible(true);
+}
+
+void Scene2803Small::klaymenFloor() {
+ SetUpdateHandler(&Scene2803Small::upKlaymenFloor);
+ sendMessage(_klaymen, 0x482C, 0x2086222D);
+ _klaymen->setClipRect(0, 0, 640, 480);
+ _klaymen->clearRepl();
+ _sprite1->setVisible(false);
+}
+
+void Scene2803Small::setPaletteArea0() {
+ if (_paletteArea != 0) {
+ _paletteArea = 0;
+ updatePaletteArea(false);
+ }
+}
+
+void Scene2803Small::setPaletteArea1() {
+ if (_paletteArea != 1) {
+ _paletteArea = 1;
+ updatePaletteArea(false);
+ }
+}
+
+void Scene2803Small::setPaletteArea2() {
+ if (_paletteArea != 2) {
+ _paletteArea = 2;
+ updatePaletteArea(false);
+ }
+}
+
+void Scene2803Small::setPaletteArea3() {
+ if (_paletteArea != 3) {
+ _paletteArea = 3;
+ updatePaletteArea(true);
+ }
+}
+
+void Scene2803Small::updatePaletteArea(bool instantly) {
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON)) {
+ switch (_paletteArea) {
+ case 1:
+ _palette->addBasePalette(0x0A938204, 0, 64, 0);
+ break;
+ case 2:
+ _palette->addBasePalette(0xB103B604, 0, 64, 0);
+ break;
+ case 3:
+ _palette->fillBaseBlack(0, 64);
+ break;
+ default:
+ _palette->addBasePalette(0x412A423E, 0, 64, 0);
+ break;
+ }
+ } else {
+ switch (_paletteArea) {
+ case 2:
+ _palette->addBasePalette(0x0263D144, 0, 64, 0);
+ break;
+ case 3:
+ _palette->fillBaseBlack(0, 64);
+ break;
+ default:
+ _palette->addBasePalette(0x29800A01, 0, 64, 0);
+ break;
+ }
+ }
+ _palette->startFadeToPalette(instantly ? 0 : 12);
+}
+
+SsScene2804RedButton::SsScene2804RedButton(NeverhoodEngine *vm, Scene2804 *parentScene)
+ : StaticSprite(vm, 900), _countdown(0), _parentScene(parentScene) {
+
+ loadSprite(getGlobalVar(V_SHRINK_LIGHTS_ON) ? 0x51A10202 : 0x11814A21, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ SetUpdateHandler(&SsScene2804RedButton::update);
+ SetMessageHandler(&SsScene2804RedButton::handleMessage);
+ loadSound(0, 0x44241240);
+}
+
+void SsScene2804RedButton::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ setVisible(false);
+ }
+}
+
+uint32 SsScene2804RedButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0 && !_parentScene->isWorking()) {
+ playSound(0);
+ setVisible(true);
+ _countdown = 4;
+ sendMessage(_parentScene, 0x2000, 0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+SsScene2804LightCoil::SsScene2804LightCoil(NeverhoodEngine *vm)
+ : StaticSprite(vm, 900) {
+
+ loadSprite(0x8889B008, kSLFDefDrawOffset | kSLFDefPosition, 400);
+ setVisible(false);
+ SetMessageHandler(&SsScene2804LightCoil::handleMessage);
+}
+
+uint32 SsScene2804LightCoil::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ setVisible(true);
+ updatePosition();
+ messageResult = 1;
+ break;
+ case 0x2003:
+ setVisible(false);
+ updatePosition();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+SsScene2804LightTarget::SsScene2804LightTarget(NeverhoodEngine *vm)
+ : StaticSprite(vm, 900) {
+
+ loadSprite(0x06092132, kSLFDefDrawOffset | kSLFDefPosition, 400);
+ setVisible(false);
+ SetMessageHandler(&SsScene2804LightTarget::handleMessage);
+}
+
+uint32 SsScene2804LightTarget::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2004:
+ setVisible(true);
+ updatePosition();
+ messageResult = 1;
+ break;
+ case 0x2005:
+ setVisible(false);
+ updatePosition();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+SsScene2804Flash::SsScene2804Flash(NeverhoodEngine *vm)
+ : StaticSprite(vm, 900) {
+
+ loadSprite(0x211003A0, kSLFDefDrawOffset | kSLFDefPosition, 400);
+ setVisible(false);
+ loadSound(0, 0xCB36BA54);
+}
+
+void SsScene2804Flash::show() {
+ setVisible(true);
+ updatePosition();
+ playSound(0);
+}
+
+SsScene2804BeamCoilBody::SsScene2804BeamCoilBody(NeverhoodEngine *vm)
+ : StaticSprite(vm, 900) {
+
+ loadSprite(0x9A816000, kSLFDefDrawOffset | kSLFDefPosition, 400);
+ setVisible(false);
+}
+
+AsScene2804CrystalWaves::AsScene2804CrystalWaves(NeverhoodEngine *vm, uint crystalIndex)
+ : AnimatedSprite(vm, 1100), _crystalIndex(crystalIndex) {
+
+ static const NPoint kAsScene2804CrystalWavesPoints[] = {
+ {323, 245},
+ {387, 76},
+ {454, 260},
+ {527, 70}
+ };
+
+ _x = kAsScene2804CrystalWavesPoints[crystalIndex].x;
+ _y = kAsScene2804CrystalWavesPoints[crystalIndex].y;
+ createSurface1(0x840C41F0, 1200);
+ if (crystalIndex & 1)
+ setDoDeltaY(1);
+ setVisible(false);
+ _needRefresh = true;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&Sprite::handleMessage);
+}
+
+void AsScene2804CrystalWaves::show() {
+ setVisible(true);
+ startAnimation(0x840C41F0, 0, -1);
+}
+
+void AsScene2804CrystalWaves::hide() {
+ setVisible(false);
+ stopAnimation();
+}
+
+static const int16 kAsScene2804CrystalFrameNums[] = {
+ 0, 6, 2, 8, 1, 10, 0, 0
+};
+
+static const uint32 kAsScene2804CrystalFileHashes[] = {
+ 0x000540B0,
+ 0x001280D0,
+ 0x003D0010,
+ 0x00620190,
+ 0x00DC0290
+};
+
+AsScene2804Crystal::AsScene2804Crystal(NeverhoodEngine *vm, AsScene2804CrystalWaves *asCrystalWaves, uint crystalIndex)
+ : AnimatedSprite(vm, 1100), _asCrystalWaves(asCrystalWaves), _crystalIndex(crystalIndex), _isShowing(false) {
+
+ static const NPoint kAsScene2804CrystalPoints[] = {
+ {204, 196},
+ {272, 316},
+ {334, 206},
+ {410, 334},
+ {470, 180}
+ };
+
+ _colorNum = (int16)getSubVar(VA_CURR_CRYSTAL_COLORS, crystalIndex);
+ _isLightOn = getGlobalVar(V_SHRINK_LIGHTS_ON) != 0;
+ if (_isLightOn) {
+ _x = kAsScene2804CrystalPoints[crystalIndex].x;
+ _y = kAsScene2804CrystalPoints[crystalIndex].y;
+ createSurface1(0x108DFB12, 1200);
+ startAnimation(0x108DFB12, kAsScene2804CrystalFrameNums[_colorNum], -1);
+ _needRefresh = true;
+ _newStickFrameIndex = kAsScene2804CrystalFrameNums[_colorNum];
+ } else {
+ _x = 320;
+ _y = 240;
+ createSurface1(kAsScene2804CrystalFileHashes[crystalIndex], 1200);
+ startAnimation(kAsScene2804CrystalFileHashes[crystalIndex], _colorNum, -1);
+ setVisible(false);
+ _needRefresh = true;
+ _newStickFrameIndex = _colorNum;
+ }
+ loadSound(0, 0x725294D4);
+ SetUpdateHandler(&AnimatedSprite::update);
+}
+
+void AsScene2804Crystal::show() {
+ if (!_isLightOn) {
+ setVisible(true);
+ _isShowing = true;
+ if (_asCrystalWaves)
+ _asCrystalWaves->show();
+ playSound(0);
+ }
+}
+
+void AsScene2804Crystal::hide() {
+ if (!_isLightOn) {
+ setVisible(false);
+ _isShowing = false;
+ if (_asCrystalWaves)
+ _asCrystalWaves->hide();
+ }
+}
+
+void AsScene2804Crystal::activate() {
+ if (!_isShowing) {
+ int16 frameNum = kAsScene2804CrystalFrameNums[_colorNum];
+ _colorNum++;
+ if (_colorNum >= 6)
+ _colorNum = 0;
+ if (_isLightOn) {
+ startAnimation(0x108DFB12, frameNum, kAsScene2804CrystalFrameNums[_colorNum]);
+ _playBackwards = kAsScene2804CrystalFrameNums[_colorNum] < _colorNum;
+ _newStickFrameIndex = kAsScene2804CrystalFrameNums[_colorNum];
+ } else {
+ startAnimation(kAsScene2804CrystalFileHashes[_crystalIndex], _colorNum, -1);
+ _newStickFrameIndex = _colorNum;
+ }
+ setSubVar(VA_CURR_CRYSTAL_COLORS, _crystalIndex, _colorNum);
+ }
+}
+
+SsScene2804CrystalButton::SsScene2804CrystalButton(NeverhoodEngine *vm, Scene2804 *parentScene, AsScene2804Crystal *asCrystal, uint crystalIndex)
+ : StaticSprite(vm, 900), _countdown(0), _parentScene(parentScene), _asCrystal(asCrystal), _crystalIndex(crystalIndex) {
+
+ static const uint32 kSsScene2804CrystalButtonFileHashes1[] = {
+ 0x911101B0,
+ 0x22226001,
+ 0x4444A362,
+ 0x888925A4,
+ 0x11122829
+ };
+
+ static const uint32 kSsScene2804CrystalButtonFileHashes2[] = {
+ 0xB500A1A0,
+ 0x6A012021,
+ 0xD4022322,
+ 0xA8042525,
+ 0x5008292B
+ };
+
+ loadSprite(getGlobalVar(V_SHRINK_LIGHTS_ON) ? kSsScene2804CrystalButtonFileHashes1[crystalIndex] : kSsScene2804CrystalButtonFileHashes2[crystalIndex],
+ kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ loadSound(0, 0x44045140);
+ SetUpdateHandler(&SsScene2804CrystalButton::update);
+ SetMessageHandler(&SsScene2804CrystalButton::handleMessage);
+}
+
+void SsScene2804CrystalButton::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ setVisible(false);
+ }
+}
+
+uint32 SsScene2804CrystalButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0 && !_parentScene->isWorking()) {
+ playSound(0);
+ setVisible(true);
+ _countdown = 4;
+ _asCrystal->activate();
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2804BeamCoil::AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene, SsScene2804BeamCoilBody *ssBeamCoilBody)
+ : AnimatedSprite(vm, 1400), _parentScene(parentScene), _ssBeamCoilBody(ssBeamCoilBody), _countdown(0) {
+
+ createSurface1(0x00494891, 1000);
+ _x = 125;
+ _y = 184;
+ setVisible(false);
+ _needRefresh = true;
+ AnimatedSprite::updatePosition();
+ loadSound(0, 0x6352F051);
+ _vm->_soundMan->addSound(0xC5EA0B28, 0xEF56B094);
+ SetUpdateHandler(&AsScene2804BeamCoil::update);
+ SetMessageHandler(&AsScene2804BeamCoil::handleMessage);
+}
+
+AsScene2804BeamCoil::~AsScene2804BeamCoil() {
+ _vm->_soundMan->deleteSoundGroup(0xC5EA0B28);
+}
+
+void AsScene2804BeamCoil::update() {
+ updateAnim();
+ updatePosition();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ sendMessage(_parentScene, 0x2001, 0);
+ }
+}
+
+uint32 AsScene2804BeamCoil::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2002:
+ show();
+ _countdown = 92;
+ messageResult = 1;
+ break;
+ case 0x2003:
+ hide();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2804BeamCoil::show() {
+ _ssBeamCoilBody->setVisible(true);
+ setVisible(true);
+ startAnimation(0x00494891, 0, -1);
+ playSound(0);
+ SetMessageHandler(&AsScene2804BeamCoil::hmBeaming);
+ NextState(&AsScene2804BeamCoil::stBeaming);
+}
+
+void AsScene2804BeamCoil::hide() {
+ stopAnimation();
+ SetMessageHandler(&AsScene2804BeamCoil::handleMessage);
+ setVisible(false);
+ _ssBeamCoilBody->setVisible(false);
+ _vm->_soundMan->stopSound(0xEF56B094);
+}
+
+void AsScene2804BeamCoil::stBeaming() {
+ startAnimation(0x00494891, 93, -1);
+ NextState(&AsScene2804BeamCoil::stBeaming);
+ _vm->_soundMan->playSoundLooping(0xEF56B094);
+}
+
+uint32 AsScene2804BeamCoil::hmBeaming(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2804BeamTarget::AsScene2804BeamTarget(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1400) {
+
+ createSurface1(0x03842000, 1000);
+ _x = 475;
+ _y = 278;
+ setVisible(false);
+ _needRefresh = true;
+ updatePosition();
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2804BeamTarget::handleMessage);
+}
+
+uint32 AsScene2804BeamTarget::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2004:
+ setVisible(true);
+ startAnimation(0x03842000, 0, -1);
+ messageResult = 1;
+ break;
+ case 0x2005:
+ setVisible(false);
+ stopAnimation();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+Scene2804::Scene2804(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown1(0), _countdown2(0), _countdown3(0),
+ _beamStatus(0), _isSolved(false), _isWorking(false) {
+
+ _vm->gameModule()->initCrystalColorsPuzzle();
+
+ SetMessageHandler(&Scene2804::handleMessage);
+ SetUpdateHandler(&Scene2804::update);
+
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON)) {
+ setBackground(0xA1D03005);
+ setPalette(0xA1D03005);
+ addEntity(_palette);
+ insertPuzzleMouse(0x03001A15, 20, 620);
+ _asCoil = insertSprite<SsScene2804LightCoil>();
+ _asTarget = insertSprite<SsScene2804LightTarget>();
+ } else {
+ SsScene2804BeamCoilBody *ssBeamCoilBody;
+ setBackground(0x01C01414);
+ setPalette(0x01C01414);
+ addEntity(_palette);
+ insertPuzzleMouse(0x01410014, 20, 620);
+ ssBeamCoilBody = insertSprite<SsScene2804BeamCoilBody>();
+ _asCoil = insertSprite<AsScene2804BeamCoil>(this, ssBeamCoilBody);
+ _asTarget = insertSprite<AsScene2804BeamTarget>();
+ _ssFlash = insertSprite<SsScene2804Flash>();
+ }
+
+ _ssRedButton = insertSprite<SsScene2804RedButton>(this);
+ addCollisionSprite(_ssRedButton);
+
+ for (uint crystalIndex = 0; crystalIndex < 5; crystalIndex++) {
+ AsScene2804CrystalWaves *asCrystalWaves = NULL;
+ if (crystalIndex < 4 && getGlobalVar(V_SHRINK_LIGHTS_ON) == 0)
+ asCrystalWaves = insertSprite<AsScene2804CrystalWaves>(crystalIndex);
+ _asCrystals[crystalIndex] = insertSprite<AsScene2804Crystal>(asCrystalWaves, crystalIndex);
+ _ssCrystalButtons[crystalIndex] = insertSprite<SsScene2804CrystalButton>(this, _asCrystals[crystalIndex], crystalIndex);
+ addCollisionSprite(_ssCrystalButtons[crystalIndex]);
+ }
+
+}
+
+uint32 Scene2804::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ }
+ break;
+ case 0x2000:
+ _isWorking = true;
+ sendMessage(_asCoil, 0x2002, 0);
+ if (getGlobalVar(V_SHRINK_LIGHTS_ON)) {
+ sendMessage(_asTarget, 0x2004, 0);
+ _countdown2 = 48;
+ }
+ break;
+ case 0x2001:
+ _countdown3 = 2;
+ _isSolved = true;
+ _beamStatus = 0;
+ for (uint index = 0; index < 5; index++)
+ if (_asCrystals[index]->getColorNum() != (int16)getSubVar(VA_GOOD_CRYSTAL_COLORS, index))
+ _isSolved = false;
+ _countdown2 = 48;
+ break;
+ }
+ return 0;
+}
+
+void Scene2804::update() {
+
+ Scene::update();
+
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ leaveScene(0);
+ }
+
+ if (_countdown2 != 0 && (--_countdown2) == 0) {
+ _isWorking = false;
+ sendMessage(_asCoil, 0x2003, 0);
+ sendMessage(_asTarget, 0x2005, 0);
+ for (uint index = 0; index < 5; index++)
+ _asCrystals[index]->hide();
+ }
+
+ if (_countdown3 != 0 && (--_countdown3) == 0) {
+ if (_beamStatus == 5) {
+ sendMessage(_asTarget, 0x2004, 0);
+ if (_isSolved) {
+ _palette->fillBaseWhite(0, 256);
+ _palette->startFadeToPalette(18);
+ setGlobalVar(V_KLAYMEN_SMALL, 1);
+ _countdown1 = 48;
+ }
+ } else if (_beamStatus == 6) {
+ if (_isSolved)
+ _ssFlash->show();
+ } else {
+ _asCrystals[_beamStatus]->show();
+ }
+ _beamStatus++;
+ if (_beamStatus < 6)
+ _countdown3 = 2;
+ else if (_beamStatus < 7)
+ _countdown3 = 4;
+ }
+
+}
+
+Scene2805::Scene2805(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene2805::handleMessage);
+
+ setBackground(0x08021E04);
+ setPalette(0x08021E04);
+ _palette->addPalette(0x8A6B1F91, 0, 65, 0);
+ insertScreenMouse(0x21E00088);
+
+ _sprite1 = insertStaticSprite(0x008261E7, 1100);
+ _sprite2 = insertStaticSprite(0x020CE421, 1100);
+
+ if (which < 0) {
+ insertKlaymen<KmScene2805>(380, 338);
+ setMessageList(0x004AE1C8);
+ sendMessage(this, 0x2000, 0);
+ } else if (which == 1) {
+ insertKlaymen<KmScene2805>(493, 338);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AE1D0, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 2) {
+ insertKlaymen<KmScene2805>(493, 338);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AE288, false);
+ sendMessage(this, 0x2000, 1);
+ } else if (which == 3) {
+ insertKlaymen<KmScene2805>(493, 338);
+ sendMessage(_klaymen, 0x2000, 1);
+ setMessageList(0x004AE1E0, false);
+ sendMessage(this, 0x2000, 1);
+ } else {
+ insertKlaymen<KmScene2805>(340, 338);
+ setMessageList(0x004AE1C0);
+ sendMessage(this, 0x2000, 0);
+ }
+
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite2->getDrawRect().x2(), 480);
+
+}
+
+uint32 Scene2805::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ if (param.asInteger()) {
+ setRectList(0x004AE318);
+ _klaymen->setKlaymenIdleTable3();
+ } else {
+ setRectList(0x004AE308);
+ _klaymen->setKlaymenIdleTable1();
+ }
+ break;
+ }
+ return 0;
+}
+
+AsScene2806Spew::AsScene2806Spew(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200) {
+
+ createSurface1(0x04211490, 1200);
+ _x = 378;
+ _y = 423;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2806Spew::handleMessage);
+ setDoDeltaX(1);
+ setVisible(false);
+}
+
+uint32 AsScene2806Spew::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ playSound(0, 0x48640244);
+ startAnimation(0x04211490, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2806::Scene2806(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2806::handleMessage);
+ SetUpdateHandler(&Scene2806::update);
+
+ loadDataResource(0x98182003);
+ loadHitRectList();
+
+ _pointList = _dataResource.getPointArray(0x3606A422);
+
+ insertScreenMouse(0x22114C13);
+ setBackground(0xC1B22110);
+ setPalette(0xC1B22110);
+
+ _sprite1 = insertStaticSprite(0xA21F82CB, 1100);
+ _clipRects[0].x1 = _sprite1->getDrawRect().x;
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+ _clipRects[0].x2 = _sprite1->getDrawRect().x2();
+ _clipRects[0].y2 = _sprite1->getDrawRect().y2();
+
+ _sprite2 = insertStaticSprite(0x92035301, 1100);
+ _clipRects[1].y2 = _sprite2->getDrawRect().y2();
+
+ _sprite3 = insertStaticSprite(0x3182220E, 1100);
+
+ _sprite4 = insertStaticSprite(0x72090342, 1100);
+ _clipRects[1].x1 = _sprite4->getDrawRect().x;
+ _clipRects[1].y1 = _sprite4->getDrawRect().y;
+
+ tempSprite = insertStaticSprite(0xD2012C02, 1100);
+ _clipRects[2].x1 = tempSprite->getDrawRect().x;
+ _clipRects[2].y2 = tempSprite->getDrawRect().y2();
+ _clipRects[3].y1 = tempSprite->getDrawRect().y2();
+ _clipRects[1].x2 = tempSprite->getDrawRect().x;
+
+ tempSprite = insertStaticSprite(0x72875F42, 1100);
+ _clipRects[3].x1 = tempSprite->getDrawRect().x;
+
+ insertStaticSprite(0x0201410A, 1100);
+ insertStaticSprite(0x72875F42, 1100);
+
+ _asSpew = insertSprite<AsScene2806Spew>();
+
+ _clipRects[2].y1 = 0;
+ _clipRects[3].y2 = 480;
+ _clipRects[2].x2 = 640;
+ _clipRects[3].x2 = 640;
+
+ if (which < 0) {
+ insertKlaymen<KmScene2806>(441, 423, false, _clipRects, 4);
+ setMessageList(0x004AF098);
+ } else if (which == 1) {
+ insertKlaymen<KmScene2806>(378, 423, false, _clipRects, 4);
+ setMessageList(0x004AF098);
+ } else if (which == 2) {
+ insertKlaymen<KmScene2806>(378, 423, false, _clipRects, 4);
+ setMessageList(0x004AF0C8, false);
+ } else if (which == 3) {
+ insertKlaymen<KmScene2806>(378, 423, true, _clipRects, 4);
+ setMessageList(0x004AF0A0, false);
+ setGlobalVar(V_KLAYMEN_SMALL, 0);
+ } else {
+ insertKlaymen<KmScene2806>(670, 423, false, _clipRects, 4);
+ setMessageList(0x004AF090);
+ }
+
+ _pointIndex = -1;
+ findClosestPoint();
+
+}
+
+uint32 Scene2806::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x44262B12) {
+ setMessageList(0x004AF0E0);
+ }
+ break;
+ case 0x2000:
+ sendMessage(_asSpew, 0x2000, 0);
+ break;
+ }
+ return 0;
+}
+
+void Scene2806::update() {
+ Scene::update();
+ findClosestPoint();
+}
+
+void Scene2806::findClosestPoint() {
+
+ static const uint32 kScene2806PaletteFileHashes[] = {
+ 0x48052508,
+ 0x01139404,
+ 0x01138C04,
+ 0x01138004,
+ 0x01138604,
+ 0x086B8890
+ };
+
+ int16 x = MIN<int16>(_klaymen->getX(), 639);
+ int index = 1;
+
+ while (index < (int)_pointList->size() && (*_pointList)[index].x < x)
+ ++index;
+ --index;
+
+ if (_pointIndex != index) {
+ _pointIndex = index;
+ _palette->addPalette(kScene2806PaletteFileHashes[index], 0, 64, 0);
+ }
+
+}
+
+Scene2807::Scene2807(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ SetMessageHandler(&Scene2807::handleMessage);
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 1) {
+ insertStaticSprite(0x103021E2, 300);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 2) {
+ insertStaticSprite(0x103022E2, 300);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) == 3) {
+ insertStaticSprite(0x103024E2, 300);
+ }
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 1) {
+ insertStaticSprite(0x4800A52A, 200);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 2) {
+ insertStaticSprite(0x4800A62A, 200);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) == 3) {
+ insertStaticSprite(0x4800A02A, 200);
+ }
+
+ if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 1) {
+ insertStaticSprite(0x31203430, 100);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 2) {
+ insertStaticSprite(0x31203400, 100);
+ } else if (getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2) == 3) {
+ insertStaticSprite(0x31203460, 100);
+ }
+
+ setBackground(0x3E049A95);
+ setPalette(0x3E049A95);
+ insertPuzzleMouse(0x49A913E8, 20, 620);
+
+}
+
+uint32 Scene2807::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ }
+ break;
+ }
+ return 0;
+}
+
+static const uint32 kScene2808FileHashes1[] = {
+ 0x90B0392,
+ 0x90B0192
+};
+
+static const uint32 kScene2808FileHashes2[] = {
+ 0xB0396098,
+ 0xB0196098
+};
+
+static const uint32 kClass428FileHashes[] = {
+ 0x140022CA,
+ 0x4C30A602,
+ 0xB1633402,
+ 0x12982135,
+ 0x0540B728,
+ 0x002A81E3,
+ 0x08982841,
+ 0x10982841,
+ 0x20982841,
+ 0x40982841,
+ 0x80982841,
+ 0x40800711
+};
+
+static const int kClass428Countdowns1[] = {
+ 18, 16, 10, 0
+};
+
+static const int kClass428Countdowns2[] = {
+ 9, 9, 8, 8, 5, 5, 0, 0
+};
+
+static const uint32 kClass490FileHashes[] = {
+ 0x08100071,
+ 0x24084215,
+ 0x18980A10
+};
+
+static const int16 kClass490FrameIndices1[] = {
+ 0, 8, 15, 19
+};
+
+static const int16 kClass490FrameIndices2[] = {
+ 0, 4, 8, 11, 15, 17, 19, 0
+};
+
+SsScene2808Dispenser::SsScene2808Dispenser(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum, int testTubeIndex)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _countdown(0), _testTubeSetNum(testTubeSetNum),
+ _testTubeIndex(testTubeIndex) {
+
+ loadSprite(kClass428FileHashes[testTubeSetNum * 3 + testTubeIndex], kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 1500);
+ setVisible(false);
+ SetUpdateHandler(&SsScene2808Dispenser::update);
+ SetMessageHandler(&SsScene2808Dispenser::handleMessage);
+}
+
+void SsScene2808Dispenser::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ setVisible(false);
+ }
+}
+
+uint32 SsScene2808Dispenser::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ sendMessage(_parentScene, 0x2000, _testTubeIndex);
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void SsScene2808Dispenser::startCountdown(int index) {
+ setVisible(true);
+ updatePosition();
+ if (_testTubeSetNum == 0) {
+ _countdown = kClass428Countdowns1[index];
+ } else {
+ _countdown = kClass428Countdowns2[index];
+ }
+}
+
+AsScene2808TestTube::AsScene2808TestTube(NeverhoodEngine *vm, int testTubeSetNum, int testTubeIndex, SsScene2808Dispenser *ssDispenser)
+ : AnimatedSprite(vm, 1100), _testTubeSetNum(testTubeSetNum), _testTubeIndex(testTubeIndex), _ssDispenser(ssDispenser), _fillLevel(0) {
+
+ if (testTubeSetNum == 0) {
+ _x = 504;
+ _y = 278;
+ } else {
+ setDoDeltaX(1);
+ _x = 136;
+ _y = 278;
+ }
+
+ createSurface1(kClass490FileHashes[testTubeIndex], 1100);
+
+ if (testTubeSetNum == 0) {
+ loadSound(0, 0x30809E2D);
+ loadSound(1, 0x72811E2D);
+ loadSound(2, 0x78B01625);
+ } else {
+ loadSound(3, 0x70A41E0C);
+ loadSound(4, 0x50205E2D);
+ loadSound(5, 0xF8621E2D);
+ loadSound(6, 0xF1A03C2D);
+ loadSound(7, 0x70A43D2D);
+ loadSound(8, 0xF0601E2D);
+ }
+
+ startAnimation(kClass490FileHashes[testTubeIndex], 0, -1);
+ _newStickFrameIndex = 0;
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2808TestTube::handleMessage);
+
+ if (_fillLevel == 0)
+ setVisible(false);
+
+}
+
+uint32 AsScene2808TestTube::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ fill();
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2808TestTube::fill() {
+ if ((int)_fillLevel < _testTubeSetNum * 3 + 3) {
+ if (_testTubeSetNum == 0) {
+ playSound(_fillLevel);
+ setVisible(true);
+ startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices1[_fillLevel], kClass490FrameIndices1[_fillLevel + 1]);
+ _newStickFrameIndex = kClass490FrameIndices1[_fillLevel + 1];
+ } else {
+ playSound(3 + _fillLevel);
+ setVisible(true);
+ startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices2[_fillLevel], kClass490FrameIndices2[_fillLevel + 1]);
+ _newStickFrameIndex = kClass490FrameIndices2[_fillLevel + 1];
+ }
+ _ssDispenser->startCountdown(_fillLevel);
+ _fillLevel++;
+ }
+}
+
+void AsScene2808TestTube::flush() {
+ if (_fillLevel != 0) {
+ if (_testTubeSetNum == 0) {
+ startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices1[_fillLevel], -1);
+ } else {
+ startAnimation(kClass490FileHashes[_testTubeIndex], kClass490FrameIndices2[_fillLevel], -1);
+ }
+ _newStickFrameIndex = 0;
+ _playBackwards = true;
+ setVisible(true);
+ }
+}
+
+AsScene2808Handle::AsScene2808Handle(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum)
+ : AnimatedSprite(vm, 1300), _parentScene(parentScene), _testTubeSetNum(testTubeSetNum), _isActivated(false) {
+
+ loadSound(0, 0xE18D1F30);
+ _x = 320;
+ _y = 240;
+ if (_testTubeSetNum == 1)
+ setDoDeltaX(1);
+ createSurface1(0x040900D0, 1300);
+ startAnimation(0x040900D0, 0, -1);
+ _needRefresh = true;
+ _newStickFrameIndex = 0;
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2808Handle::handleMessage);
+ AnimatedSprite::updatePosition();
+}
+
+uint32 AsScene2808Handle::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_isActivated) {
+ sendMessage(_parentScene, 0x2001, 0);
+ playSound(0);
+ activate();
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene2808Handle::hmActivating(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2808Handle::activate() {
+ startAnimation(0x040900D0, 0, -1);
+ SetMessageHandler(&AsScene2808Handle::hmActivating);
+ NextState(&AsScene2808Handle::stActivated);
+ _isActivated = true;
+ _newStickFrameIndex = -1;
+}
+
+void AsScene2808Handle::stActivated() {
+ stopAnimation();
+ sendMessage(_parentScene, 0x2002, 0);
+}
+
+AsScene2808Flow::AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _testTubeSetNum(testTubeSetNum) {
+
+ if (testTubeSetNum == 0) {
+ _x = 312;
+ _y = 444;
+ } else {
+ _x = 328;
+ _y = 444;
+ }
+ createSurface1(0xB8414818, 1200);
+ startAnimation(0xB8414818, 0, -1);
+ setVisible(false);
+ _newStickFrameIndex = 0;
+ _needRefresh = true;
+ loadSound(0, 0x6389B652);
+ SetUpdateHandler(&AnimatedSprite::update);
+ AnimatedSprite::updatePosition();
+}
+
+uint32 AsScene2808Flow::hmFlowing(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2808Flow::start() {
+ startAnimation(0xB8414818, 0, -1);
+ setVisible(true);
+ SetMessageHandler(&AsScene2808Flow::hmFlowing);
+ NextState(&AsScene2808Flow::stKeepFlowing);
+ playSound(0);
+}
+
+void AsScene2808Flow::stKeepFlowing() {
+ startAnimation(0xB8414818, 1, -1);
+ NextState(&AsScene2808Flow::stKeepFlowing);
+}
+
+AsScene2808LightEffect::AsScene2808LightEffect(NeverhoodEngine *vm, int testTubeSetNum)
+ : AnimatedSprite(vm, 800), _countdown(1) {
+
+ _x = 320;
+ _y = 240;
+ if (testTubeSetNum == 1)
+ setDoDeltaX(1);
+ createSurface1(0x804C2404, 800);
+ SetUpdateHandler(&AsScene2808LightEffect::update);
+ _needRefresh = true;
+ AnimatedSprite::updatePosition();
+}
+
+void AsScene2808LightEffect::update() {
+ if (_countdown != 0 && (--_countdown) == 0) {
+ int16 frameIndex = _vm->_rnd->getRandomNumber(3 - 1);
+ startAnimation(0x804C2404, frameIndex, frameIndex);
+ updateAnim();
+ updatePosition();
+ _countdown = _vm->_rnd->getRandomNumber(3 - 1) + 1;
+ }
+}
+
+Scene2808::Scene2808(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown(0), _testTubeSetNum(which), _leaveResult(0), _isFlowing(false) {
+
+ Sprite *asHandle;
+
+ if (which == 0)
+ _vm->gameModule()->initTestTubes1Puzzle();
+ else
+ _vm->gameModule()->initTestTubes2Puzzle();
+
+ SetMessageHandler(&Scene2808::handleMessage);
+ SetUpdateHandler(&Scene2808::update);
+
+ setBackground(kScene2808FileHashes1[which]);
+ setPalette(kScene2808FileHashes1[which]);
+
+ asHandle = insertSprite<AsScene2808Handle>(this, which);
+ addCollisionSprite(asHandle);
+
+ _asFlow = insertSprite<AsScene2808Flow>(this, which);
+ insertSprite<AsScene2808LightEffect>(which);
+
+ for (int testTubeIndex = 0; testTubeIndex < 3; testTubeIndex++) {
+ SsScene2808Dispenser *ssDispenser = insertSprite<SsScene2808Dispenser>(this, which, testTubeIndex);
+ addCollisionSprite(ssDispenser);
+ _asTestTubes[testTubeIndex] = insertSprite<AsScene2808TestTube>(which, testTubeIndex, ssDispenser);
+ addCollisionSprite(_asTestTubes[testTubeIndex]);
+ }
+
+ insertScreenMouse(kScene2808FileHashes2[which]);
+
+}
+
+uint32 Scene2808::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !isAnyTestTubeFilled()) {
+ leaveScene(1);
+ }
+ break;
+ case 0x2000:
+ if (!_isFlowing)
+ _asTestTubes[param.asInteger()]->fill();
+ break;
+ case 0x2001:
+ _isFlowing = true;
+ break;
+ case 0x2002:
+ if (isAnyTestTubeFilled()) {
+ _leaveResult = 3;
+ if (!isMixtureGood())
+ _leaveResult = 2;
+ _asFlow->start();
+ for (int i = 0; i < 3; i++)
+ _asTestTubes[i]->flush();
+ _mouseCursor->setVisible(false);
+ _countdown = 16;
+ } else {
+ leaveScene(1);
+ }
+ break;
+ }
+ return 0;
+}
+
+void Scene2808::update() {
+ Scene::update();
+ if (_countdown != 0 && (--_countdown) == 0) {
+ leaveScene(_leaveResult);
+ }
+}
+
+bool Scene2808::isMixtureGood() {
+ if (_testTubeSetNum == 0) {
+ return
+ _asTestTubes[0]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 0) &&
+ _asTestTubes[1]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 1) &&
+ _asTestTubes[2]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_1, 2);
+ } else {
+ return
+ _asTestTubes[0]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 0) &&
+ _asTestTubes[1]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 1) &&
+ _asTestTubes[2]->getFillLevel() == getSubVar(VA_GOOD_TEST_TUBES_LEVEL_2, 2);
+ }
+}
+
+bool Scene2808::isAnyTestTubeFilled() {
+ return
+ _asTestTubes[0]->getFillLevel() > 0 ||
+ _asTestTubes[1]->getFillLevel() > 0 ||
+ _asTestTubes[2]->getFillLevel() > 0;
+}
+
+AsScene2809Spew::AsScene2809Spew(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1200) {
+
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2809Spew::handleMessage);
+ createSurface1(0x04211490, 1200);
+ _x = 262;
+ _y = 423;
+ setDoDeltaX(0);
+ setVisible(false);
+}
+
+uint32 AsScene2809Spew::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ playSound(0, 0x48640244);
+ startAnimation(0x04211490, 0, -1);
+ setVisible(true);
+ break;
+ case 0x3002:
+ stopAnimation();
+ setVisible(false);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2809::Scene2809(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2809::handleMessage);
+ SetUpdateHandler(&Scene2809::update);
+
+ loadDataResource(0x1830009A);
+ loadHitRectList();
+
+ _pointList = _dataResource.getPointArray(0x064A310E);
+
+ setBackground(0xB22116C5);
+ setPalette(0xB22116C5);
+ insertScreenMouse(0x116C1B2A);
+
+ _sprite1 = insertStaticSprite(0x1FA2EB82, 1100);
+
+ _clipRects[0].x1 = _sprite1->getDrawRect().x;
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+ _clipRects[0].x2 = _sprite1->getDrawRect().x2();
+ _clipRects[0].y2 = _sprite1->getDrawRect().y2();
+
+ _sprite2 = insertStaticSprite(0x037321B2, 1100);
+ _clipRects[1].y2 = _sprite2->getDrawRect().y2();
+
+ _sprite3 = insertStaticSprite(0x82022E11, 1100);
+
+ _sprite4 = insertStaticSprite(0x09236252, 1100);
+ _clipRects[1].x2 = _sprite4->getDrawRect().x2();
+ _clipRects[1].y1 = _sprite4->getDrawRect().y;
+
+ tempSprite = insertStaticSprite(0x010C22F2, 1100);
+ _clipRects[2].x2 = tempSprite->getDrawRect().x2();
+ _clipRects[2].y2 = tempSprite->getDrawRect().y2();
+ _clipRects[3].y1 = tempSprite->getDrawRect().y2();
+ _clipRects[1].x1 = tempSprite->getDrawRect().x2();
+
+ tempSprite = insertStaticSprite(0x877F6252, 1100);
+ _clipRects[3].x2 = tempSprite->getDrawRect().x2();
+
+ insertStaticSprite(0x01612A22, 1100);
+ insertStaticSprite(0x877F6252, 1100);
+
+ _asSpew = insertSprite<AsScene2809Spew>();
+ _clipRects[2].y1 = 0;
+ _clipRects[3].y2 = 480;
+ _clipRects[2].x1 = 0;
+ _clipRects[3].x1 = 0;
+
+ if (which < 0) {
+ insertKlaymen<KmScene2809>(226, 423, false, _clipRects, 4);
+ setMessageList(0x004B5B90);
+ } else if (which == 1) {
+ insertKlaymen<KmScene2809>(262, 423, false, _clipRects, 4);
+ setMessageList(0x004B5B90);
+ } else if (which == 2) {
+ insertKlaymen<KmScene2809>(262, 423, false, _clipRects, 4);
+ setMessageList(0x004B5BD0);
+ } else if (which == 3) {
+ insertKlaymen<KmScene2809>(262, 423, true, _clipRects, 4);
+ setMessageList(0x004B5BA8, false);
+ setGlobalVar(V_KLAYMEN_SMALL, 0);
+ } else {
+ insertKlaymen<KmScene2809>(-30, 423, false, _clipRects, 4);
+ setMessageList(0x004B5B88);
+ }
+
+ _pointIndex = -1;
+ findClosestPoint();
+
+}
+
+void Scene2809::update() {
+ Scene::update();
+ findClosestPoint();
+}
+
+uint32 Scene2809::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x160DA937) {
+ setMessageList(0x004B5B98);
+ }
+ break;
+ case 0x2000:
+ sendMessage(_asSpew, 0x2000, 0);
+ break;
+ }
+ return 0;
+}
+
+void Scene2809::findClosestPoint() {
+
+ static const uint32 kScene2809PaletteFileHashes[] = {
+ 0x04260848,
+ 0x12970401,
+ 0x128F0401,
+ 0x12830401,
+ 0x12850401,
+ 0x6A8B9008
+ };
+
+ int16 x = MAX<int16>(_klaymen->getX(), 2);
+ int index = 1;
+
+ while (index < (int)_pointList->size() && (*_pointList)[index].x >= x)
+ ++index;
+ --index;
+
+ if (_pointIndex != index) {
+ _pointIndex = index;
+ _palette->addPalette(kScene2809PaletteFileHashes[index], 0, 64, 0);
+ }
+
+}
+
+AsScene2810Rope::AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface(990, 68, 476);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2810Rope::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ _x = x;
+ _y = -276;
+ startAnimation(0x9D098C23, 35, 53);
+}
+
+uint32 AsScene2810Rope::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ startAnimation(0x9D098C23, 35, 53);
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+Scene2810::Scene2810(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule) {
+
+ Sprite *tempSprite;
+
+ SetMessageHandler(&Scene2810::handleMessage);
+
+ setBackground(0x26508804);
+ setPalette(0x26508804);
+ insertScreenMouse(0x0880026D);
+
+ _sprite6 = insertStaticSprite(0x03615227, 1100);
+ _sprite5 = insertStaticSprite(0xE059A224, 1100);
+
+ _clipRects[0].x1 = 0;
+ _clipRects[0].y1 = 0;
+ _clipRects[0].x2 = 640;
+ _clipRects[0].y2 = 400;
+ _clipRects[1].x1 = _sprite5->getDrawRect().x;
+ _clipRects[1].y1 = 400;
+ _clipRects[1].x2 = _sprite6->getDrawRect().x2();
+ _clipRects[1].y2 = 480;
+
+ if (getGlobalVar(V_KLAYMEN_SMALL)) {
+ _asTape = insertSprite<AsScene1201Tape>(this, 0, 900, 245, 429, 0x9148A011);
+ addCollisionSprite(_asTape);
+ } else {
+ _asTape = insertSprite<AsScene1201Tape>(this, 0, 1100, 245, 429, 0x9148A011);
+ addCollisionSprite(_asTape);
+ }
+
+ _sprite1 = insertStaticSprite(0x430001C4, 1200);
+
+ if (getGlobalVar(V_LADDER_DOWN)) {
+ setGlobalVar(V_BEEN_STATUE_ROOM, 1);
+ if (getGlobalVar(V_KLAYMEN_SMALL)) {
+ _sprite4 = insertStaticSprite(0x82653808, 100);
+ } else {
+ _sprite4 = insertStaticSprite(0x82653808, 1100);
+ }
+ _sprite4->setClipRect(0, _sprite1->getDrawRect().y, 640, 480);
+ }
+
+ if (which < 0) {
+ if (getGlobalVar(V_KLAYMEN_SMALL)) {
+ insertKlaymen<KmScene2810Small>(240, 448);
+ _klaymen->setClipRect(_sprite5->getDrawRect().x, 0, 640, 480);
+ setMessageList(0x004AE438);
+ setRectList(0x004AE810);
+ _isRopingDown = false;
+ removeCollisionSprite(_asTape);
+ } else {
+ insertKlaymen<KmScene2810>(300, 424, _clipRects, 2);
+ setMessageList(0x004AE438);
+ if (getGlobalVar(V_LADDER_DOWN))
+ loadDataResource(0x84130112);
+ else
+ loadDataResource(0x84500132);
+ tempSprite = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite->setClipRect(0, _sprite1->getDrawRect().y, 640, 480);
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+ _isRopingDown = false;
+ }
+ } else if (which == 1) {
+ insertKlaymen<KmScene2810>(186, 64, _clipRects, 2);
+ setMessageList(0x004AE440);
+ loadDataResource(0x84130112);
+ tempSprite = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite->setClipRect(0, _sprite1->getDrawRect().y, 640, 480);
+ _isRopingDown = true;
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+ } else if (which == 5) {
+ insertStaticSprite(0xC3007EA0, 100);
+ _sprite2 = insertStaticSprite(0x02780936, 1100);
+ _sprite3 = insertStaticSprite(0x1CA02160, 1100);
+ _asRope = insertSprite<AsScene2810Rope>(this, 384);
+ insertKlaymen<KmScene2810>(384, 0, _clipRects, 0);
+ sendEntityMessage(_klaymen, 0x1014, _asRope);
+ setMessageList(0x004AE738);
+ _klaymen->setClipRect(0, _sprite2->getDrawRect().y, 640, _sprite3->getDrawRect().y2());
+ _asRope->setClipRect(0, _sprite2->getDrawRect().y, 640, _sprite3->getDrawRect().y2());
+ _vm->_soundMan->addSound(0x84400112, 0xC874EE6C);
+ _vm->_soundMan->playSoundLooping(0xC874EE6C);
+ _vm->_soundMan->setSoundVolume(0xC874EE6C, 50);
+ _isRopingDown = false;
+ } else if ((which >= 11 && which <= 14) || (which >= 19 && which <= 22) || which == 3) {
+ if (getGlobalVar(V_KLAYMEN_SMALL)) {
+ insertKlaymen<KmScene2810Small>((int16)getGlobalVar(V_KLAYMEN_SAVED_X), 448);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ _klaymen->setClipRect(_sprite5->getDrawRect().x, 0, 640, 480);
+ setMessageList(0x004AE6D8);
+ setRectList(0x004AE810);
+ _isRopingDown = false;
+ removeCollisionSprite(_asTape);
+ } else {
+ insertKlaymenLadder();
+ if (getGlobalVar(V_LADDER_DOWN_ACTION)) {
+ setMessageList(0x004AE6E8);
+ setGlobalVar(V_LADDER_DOWN_ACTION, 0);
+ _isRopingDown = false;
+ } else {
+ setMessageList(0x004AE6D8);
+ _isRopingDown = false;
+ }
+ }
+ } else if (which >= 15 && which <= 18) {
+ insertKlaymenLadder();
+ setMessageList(0x004AE6E0);
+ _isRopingDown = false;
+ } else if (which == 4) {
+ if (getGlobalVar(V_KLAYMEN_SMALL)) {
+ insertKlaymen<KmScene2810Small>(473, 448);
+ _klaymen->setClipRect(_sprite5->getDrawRect().x, 0, 640, 480);
+ setMessageList(0x004AE428);
+ setRectList(0x004AE810);
+ _isRopingDown = false;
+ removeCollisionSprite(_asTape);
+ } else {
+ insertKlaymen<KmScene2810>(450, 424, _clipRects, 2);
+ setMessageList(0x004AE418);
+ if (getGlobalVar(V_LADDER_DOWN))
+ loadDataResource(0x84130112);
+ else
+ loadDataResource(0x84500132);
+ tempSprite = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite->setClipRect(0, _sprite1->getDrawRect().y, 640, 480);
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+ _isRopingDown = false;
+ }
+ } else {
+ insertKlaymen<KmScene2810Small>(120, 448);
+ _klaymen->setClipRect(_sprite5->getDrawRect().x, 0, 640, 480);
+ setMessageList(0x004AE410);
+ setRectList(0x004AE810);
+ _isRopingDown = false;
+ removeCollisionSprite(_asTape);
+ }
+
+}
+
+Scene2810::~Scene2810() {
+ setGlobalVar(V_KLAYMEN_IS_DELTA_X, _klaymen->isDoDeltaX() ? 1 : 0);
+ setGlobalVar(V_KLAYMEN_SAVED_X, _klaymen->getX());
+ _vm->_soundMan->deleteSoundGroup(0x84400112);
+}
+
+void Scene2810::insertKlaymenLadder() {
+ Sprite *tempSprite;
+
+ if (getGlobalVar(V_LADDER_DOWN_ACTION)) {
+ insertKlaymen<KmScene2810>(430, 424, _clipRects, 2);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene2810>((int16)getGlobalVar(V_KLAYMEN_SAVED_X), 424, _clipRects, 2);
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X))
+ _klaymen->setDoDeltaX(1);
+ }
+ if (getGlobalVar(V_LADDER_DOWN))
+ loadDataResource(0x84130112);
+ else
+ loadDataResource(0x84500132);
+ tempSprite = insertSprite<AsScene1002KlaymenLadderHands>(_klaymen);
+ tempSprite->setClipRect(0, _sprite1->getDrawRect().y, 640, 480);
+ _clipRects[0].y1 = _sprite1->getDrawRect().y;
+}
+
+uint32 Scene2810::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0xE574F14C)
+ setMessageList(0x004AE458);
+ else if (param.asInteger() == 0x7214A05C || param.asInteger() == 0x2905E574)
+ setMessageList(0x004AE4A8);
+ else if (param.asInteger() == 0x7274E24C || param.asInteger() == 0x2D24E572)
+ setMessageList(0x004AE4D0);
+ else if (param.asInteger() == 0x4A07A040 || param.asInteger() == 0x190426F5)
+ setMessageList(0x004AE4F8);
+ else if (param.asInteger() == 0x6604200C || param.asInteger() == 0x2100E435)
+ setMessageList(0x004AE520);
+ else if (param.asInteger() == 0xE216A05C || param.asInteger() == 0x0905EC74)
+ setMessageList(0x004AE548);
+ else if (param.asInteger() == 0x721DA05C || param.asInteger() == 0xB905E574)
+ setMessageList(0x004AE570);
+ else if (param.asInteger() == 0x6214E09C || param.asInteger() == 0x2D09E474)
+ setMessageList(0x004AE598);
+ else if (param.asInteger() == 0x6276A04C || param.asInteger() == 0x0904E472)
+ setMessageList(0x004AE5C0);
+ else if (param.asInteger() == 0x6E14A00C || param.asInteger() == 0x2900E4B4)
+ setMessageList(0x004AE5E8);
+ else if (param.asInteger() == 0x6014A04D || param.asInteger() == 0x2904F454)
+ setMessageList(0x004AE610);
+ else if (param.asInteger() == 0x6215A3C4 || param.asInteger() == 0x393C6474)
+ setMessageList(0x004AE638);
+ else if (param.asInteger() == 0x6A54E24D || param.asInteger() == 0x2D24F4F0)
+ setMessageList(0x004AE660);
+ else if (param.asInteger() == 0x2064294C || param.asInteger() == 0x2194E053)
+ setMessageList(0x004AE688);
+ break;
+ case 0x2000:
+ setRectList(0x004AE800);
+ _isRopingDown = true;
+ break;
+ case 0x2001:
+ if (getGlobalVar(V_LADDER_DOWN))
+ loadDataResource(0x84130112);
+ else
+ loadDataResource(0x84500132);
+ _isRopingDown = false;
+ break;
+ case 0x4826:
+ if (sender == _asTape && getGlobalVar(V_KLAYMEN_SMALL) == 0 && !_isRopingDown) {
+ sendEntityMessage(_klaymen, 0x1014, _asTape);
+ setMessageList(0x004AE750);
+ }
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2812Winch::AsScene2812Winch(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 1100) {
+
+ createSurface1(0x20DA08A0, 1200);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2812Winch::handleMessage);
+ setVisible(false);
+ _x = 280;
+ _y = 184;
+}
+
+AsScene2812Winch::~AsScene2812Winch() {
+ _vm->_soundMan->deleteSoundGroup(0x00B000E2);
+}
+
+uint32 AsScene2812Winch::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ startAnimation(0x20DA08A0, 0, -1);
+ setVisible(true);
+ _vm->_soundMan->addSound(0x00B000E2, 0xC874EE6C);
+ _vm->_soundMan->playSoundLooping(0xC874EE6C);
+ break;
+ case 0x3002:
+ startAnimation(0x20DA08A0, 7, -1);
+ break;
+ }
+ return messageResult;
+}
+
+AsScene2812Rope::AsScene2812Rope(NeverhoodEngine *vm, Scene *parentScene)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene) {
+
+ createSurface(990, 68, 476);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene2812Rope::handleMessage);
+ SetSpriteUpdate(&AnimatedSprite::updateDeltaXY);
+ startAnimation(0xAE080551, 0, -1);
+ _x = 334;
+ _y = 201;
+}
+
+uint32 AsScene2812Rope::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x4806:
+ setDoDeltaX(((Sprite*)sender)->isDoDeltaX() ? 1 : 0);
+ stRopingDown();
+ break;
+ case 0x482A:
+ sendMessage(_parentScene, 0x1022, 990);
+ break;
+ case 0x482B:
+ sendMessage(_parentScene, 0x1022, 1010);
+ break;
+ }
+ return messageResult;
+}
+
+uint32 AsScene2812Rope::hmRopingDown(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene2812Rope::stRopingDown() {
+ sendMessage(_parentScene, 0x4806, 0);
+ startAnimation(0x9D098C23, 0, -1);
+ SetMessageHandler(&AsScene2812Rope::hmRopingDown);
+}
+
+AsScene2812TrapDoor::AsScene2812TrapDoor(NeverhoodEngine *vm)
+ : AnimatedSprite(vm, 0x805D0029, 100, 320, 240) {
+
+ SetMessageHandler(&AsScene2812TrapDoor::handleMessage);
+ _newStickFrameIndex = 0;
+}
+
+uint32 AsScene2812TrapDoor::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2000:
+ startAnimation(0x805D0029, 0, -1);
+ playSound(0, 0xEA005F40);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ break;
+ }
+ return messageResult;
+}
+
+Scene2812::Scene2812(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _paletteArea(0) {
+
+ if (getGlobalVar(V_HAS_FINAL_KEY) && getGlobalVar(V_KEY3_LOCATION) == 0)
+ setGlobalVar(V_KEY3_LOCATION, 3);
+
+ SetMessageHandler(&Scene2812::handleMessage);
+ SetUpdateHandler(&Scene2812::update);
+
+ setRectList(0x004AF700);
+
+ setBackground(0x03600606);
+ setPalette(0x03600606);
+ addEntity(_palette);
+ _palette->addBasePalette(0x03600606, 0, 256, 0);
+
+ _sprite1 = insertStaticSprite(0x0C06C860, 1100);
+ insertScreenMouse(0x0060203E);
+
+ if (getGlobalVar(V_KEY3_LOCATION) == 3) {
+ _asKey = insertSprite<AsCommonKey>(this, 2, 1100, 474, 437);
+ addCollisionSprite(_asKey);
+ }
+
+ _ssTape = insertSprite<SsScene1705Tape>(this, 6, 1100, 513, 437, 0xA1361863);
+ addCollisionSprite(_ssTape);
+
+ _asWinch = insertSprite<AsScene2812Winch>();
+ _asTrapDoor = insertSprite<AsScene2812TrapDoor>();
+ _asRope = insertSprite<AsScene2812Rope>(this);
+
+ _sprite2 = insertStaticSprite(0x08478078, 1100);
+ _sprite3 = insertStaticSprite(0x2203B821, 1100);
+ _sprite4 = insertStaticSprite(0x08592134, 1100);
+
+ if (which < 0) {
+ _isRopingDown = false;
+ insertKlaymen<KmScene2812>(272, 432);
+ setMessageList(0x004AF560);
+ _sprite1->setVisible(false);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ } else if (which == 1) {
+ _isRopingDown = false;
+ insertKlaymen<KmScene2812>(338, 398);
+ setMessageList(0x004AF588);
+ setPaletteArea1(true);
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite1->getDrawRect().x2(), _sprite3->getDrawRect().y2());
+ } else if (which == 2) {
+ _isRopingDown = false;
+ if (getGlobalVar(V_KLAYMEN_IS_DELTA_X)) {
+ insertKlaymen<KmScene2812>(554, 432);
+ _klaymen->setDoDeltaX(1);
+ } else {
+ insertKlaymen<KmScene2812>(394, 432);
+ }
+ setMessageList(0x004AF5F0);
+ _sprite1->setVisible(false);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ } else {
+ _isRopingDown = true;
+ insertKlaymen<KmScene2812>(150, 582);
+ setMessageList(0x004AF568);
+ setPaletteArea2(true);
+ _sprite1->setVisible(false);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ }
+
+ _asRope->setClipRect(0, _sprite2->getDrawRect().y, 640, _sprite3->getDrawRect().y2());
+
+}
+
+void Scene2812::update() {
+ if (_klaymen->getX() < 220)
+ setPaletteArea2(false);
+ else if (_klaymen->getX() < 240)
+ setPaletteArea0(false);
+ Scene::update();
+}
+
+uint32 Scene2812::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x100D:
+ if (param.asInteger() == 0x0004269B)
+ sendEntityMessage(_klaymen, 0x1014, _asRope);
+ break;
+ case 0x2001:
+ _isRopingDown = true;
+ setRectList(0x004AF710);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite4->getDrawRect().y2());
+ break;
+ case 0x2002:
+ _isRopingDown = false;
+ setRectList(0x004AF700);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ break;
+ case 0x4806:
+ sendMessage(_asWinch, 0x2000, 0);
+ sendMessage(_asTrapDoor, 0x2000, 0);
+ break;
+ case 0x4826:
+ if (sender == _ssTape && !_isRopingDown) {
+ sendEntityMessage(_klaymen, 0x1014, _ssTape);
+ setMessageList(0x004AF658);
+ } else if (sender == _asKey && !_isRopingDown) {
+ sendEntityMessage(_klaymen, 0x1014, _asKey);
+ setMessageList(0x004AF668);
+ }
+ break;
+ case 0x482A:
+ setPaletteArea1(false);
+ _sprite1->setVisible(true);
+ _klaymen->setClipRect(_sprite1->getDrawRect().x, 0, _sprite1->getDrawRect().x2(), _sprite3->getDrawRect().y2());
+ break;
+ case 0x482B:
+ setPaletteArea0(false);
+ _sprite1->setVisible(false);
+ _klaymen->setClipRect(_sprite4->getDrawRect().x, 0, 640, _sprite3->getDrawRect().y2());
+ break;
+ }
+ return messageResult;
+}
+
+void Scene2812::setPaletteArea0(bool instantly) {
+ if (_paletteArea != 0) {
+ _paletteArea = 0;
+ updatePaletteArea(instantly);
+ }
+}
+
+void Scene2812::setPaletteArea1(bool instantly) {
+ if (_paletteArea != 1) {
+ _paletteArea = 1;
+ updatePaletteArea(instantly);
+ }
+}
+
+void Scene2812::setPaletteArea2(bool instantly) {
+ if (_paletteArea != 2) {
+ _paletteArea = 2;
+ updatePaletteArea(instantly);
+ }
+}
+
+void Scene2812::updatePaletteArea(bool instantly) {
+ if (_paletteArea == 0)
+ _palette->addBasePalette(0x05D30F11, 0, 64, 0);
+ else if (_paletteArea == 1)
+ _palette->addBasePalette(0x92CA2C9B, 0, 64, 0);
+ else if (_paletteArea == 2)
+ _palette->addBasePalette(0x381F92C5, 0, 64, 0);
+ _palette->startFadeToPalette(instantly ? 0 : 12);
+}
+
+Scene2822::Scene2822(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown(0), _scrollIndex(0) {
+
+ SetMessageHandler(&Scene2822::handleMessage);
+ SetUpdateHandler(&Scene2822::update);
+ _background = new Background(_vm, 0xD542022E, 0, 0);
+ addBackground(_background);
+ _background->getSurface()->getDrawRect().y = -10;
+ setPalette(0xD542022E);
+ insertPuzzleMouse(0x0028D089, 20, 620);
+ _ssButton = insertStaticSprite(0x1A4D4120, 1100);
+ _ssButton->setVisible(false);
+ loadSound(2, 0x19044E72);
+}
+
+void Scene2822::update() {
+
+ static const int16 kScene2822BackgroundYPositions[] = {
+ 0, -20, -5, -15, -8, -12, -9, -11, -10, 0
+ };
+
+ Scene::update();
+
+ if (_countdown != 0) {
+ if ((--_countdown) == 0) {
+ if (_countdownStatus == 0) {
+ _ssButton->setVisible(false);
+ _countdownStatus = 1;
+ _countdown = 48;
+ } else if (_countdownStatus == 1) {
+ playSound(0, 0x1384CB60);
+ _countdownStatus = 2;
+ _countdown = 12;
+ } else if (_countdownStatus == 2 && getGlobalVar(V_LADDER_DOWN_ACTION)) {
+ leaveScene(0);
+ }
+ } else if (_countdownStatus == 2 && getGlobalVar(V_LADDER_DOWN_ACTION)) {
+ if (_scrollIndex < 9) {
+ _background->getSurface()->getDrawRect().y = kScene2822BackgroundYPositions[_scrollIndex];
+ _scrollIndex++;
+ } else {
+ _background->getSurface()->getDrawRect().y = -10;
+ }
+ }
+ }
+
+}
+
+uint32 Scene2822::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ } else if (param.asPoint().x >= 257 && param.asPoint().y >= 235 &&
+ param.asPoint().x <= 293 && param.asPoint().y <= 273) {
+ _ssButton->setVisible(true);
+ _countdownStatus = 0;
+ _countdown = 12;
+ playSound(1, 0x44061000);
+ if (getGlobalVar(V_LADDER_DOWN) == 0) {
+ setGlobalVar(V_LADDER_DOWN, 1);
+ setGlobalVar(V_LADDER_DOWN_ACTION, 1);
+ SetMessageHandler(NULL);
+ playSound(2);
+ _mouseCursor->setVisible(false);
+ }
+ }
+ break;
+ }
+ return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2800.h b/engines/neverhood/modules/module2800.h
new file mode 100644
index 0000000000..fe62f11307
--- /dev/null
+++ b/engines/neverhood/modules/module2800.h
@@ -0,0 +1,505 @@
+/* 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 NEVERHOOD_MODULES_MODULE2800_H
+#define NEVERHOOD_MODULES_MODULE2800_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module2800
+
+class Module2800 : public Module {
+public:
+ Module2800(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module2800();
+protected:
+ int _sceneNum;
+ uint32 _currentMusicFileHash;
+ MusicResource *_musicResource;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ void updateMusic(bool halfVolume);
+};
+
+class Scene2801 : public Scene {
+public:
+ Scene2801(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene2801();
+protected:
+ Sprite *_asTape;
+ uint32 _paletteHash;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2802 : public Scene {
+public:
+ Scene2802(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene2802();
+protected:
+ SmackerPlayer *_smackerPlayer;
+ uint _currRadioMusicIndex;
+ int _currTuneStatus;
+ int _countdown1;
+ int _countdown2;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void incRadioMusicIndex(int delta);
+ void changeTuneStatus(int prevTuneStatus, int newTuneStatus);
+};
+
+class AsScene2803LightCord : public AnimatedSprite {
+public:
+ AsScene2803LightCord(NeverhoodEngine *vm, Scene *parentScene, uint32 fileHash1, uint32 fileHash2, int16 x, int16 y);
+ void stPulled();
+ void stIdle();
+ void setFileHashes(uint32 fileHash1, uint32 fileHash2);
+protected:
+ Scene *_parentScene;
+ uint32 _fileHash1, _fileHash2;
+ bool _isPulled, _isBusy;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmPulled(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2803TestTubeOne : public AnimatedSprite {
+public:
+ AsScene2803TestTubeOne(NeverhoodEngine *vm, uint32 fileHash1, uint32 fileHash2);
+protected:
+ uint32 _fileHash1, _fileHash2;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2803Rope : public AnimatedSprite {
+public:
+ AsScene2803Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmReleased(int messageNum, const MessageParam &param, Entity *sender);
+ void stReleased();
+ void stHide();
+};
+
+class Scene2803 : public Scene {
+public:
+ Scene2803(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ StaticSprite *_asTestTubeOne;
+ StaticSprite *_asTestTubeTwo;
+ StaticSprite *_asTestTubeThree;
+ Sprite *_asRope;
+ AsScene2803LightCord *_asLightCord;
+ StaticSprite *_sprite3;
+ StaticSprite *_sprite4;
+ StaticSprite *_sprite5;
+ StaticSprite *_sprite6;
+ StaticSprite *_sprite7;
+ StaticSprite *_sprite8;
+ StaticSprite *_sprite9;
+ Sprite *_sprite10;
+ NRect _clipRectsFloor[2];
+ NRect _clipRectsStairs[3];
+ int _paletteArea;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void upKlaymenStairs();
+ void klaymenStairs();
+ void klaymenFloor();
+ void toggleBackground();
+ void changeBackground();
+ void setPaletteArea0();
+ void setPaletteArea1();
+ void updatePaletteArea();
+};
+
+class Scene2803Small : public Scene {
+public:
+ Scene2803Small(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ int _paletteArea;
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_sprite4;
+ Sprite *_sprite5;
+ Sprite *_sprite6;
+ Sprite *_sprite7;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void upKlaymenSlope();
+ void upKlaymenFloor();
+ void klaymenSlope();
+ void klaymenFloor();
+ void setPaletteArea0();
+ void setPaletteArea1();
+ void setPaletteArea2();
+ void setPaletteArea3();
+ void updatePaletteArea(bool instantly);
+};
+
+class Scene2804;
+
+class SsScene2804RedButton : public StaticSprite {
+public:
+ SsScene2804RedButton(NeverhoodEngine *vm, Scene2804 *parentScene);
+protected:
+ Scene2804 *_parentScene;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2804LightCoil : public StaticSprite {
+public:
+ SsScene2804LightCoil(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2804BeamCoilBody : public StaticSprite {
+public:
+ SsScene2804BeamCoilBody(NeverhoodEngine *vm);
+};
+
+class SsScene2804LightTarget : public StaticSprite {
+public:
+ SsScene2804LightTarget(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2804Flash : public StaticSprite {
+public:
+ SsScene2804Flash(NeverhoodEngine *vm);
+ void show();
+};
+
+class AsScene2804CrystalWaves : public AnimatedSprite {
+public:
+ AsScene2804CrystalWaves(NeverhoodEngine *vm, uint crystalIndex);
+ void show();
+ void hide();
+protected:
+ uint _crystalIndex;
+};
+
+class AsScene2804Crystal : public AnimatedSprite {
+public:
+ AsScene2804Crystal(NeverhoodEngine *vm, AsScene2804CrystalWaves *asCrystalWaves, uint crystalIndex);
+ void show();
+ void hide();
+ void activate();
+ int16 getColorNum() const { return _colorNum; }
+protected:
+ AsScene2804CrystalWaves *_asCrystalWaves;
+ uint _crystalIndex;
+ int16 _colorNum;
+ bool _isLightOn;
+ bool _isShowing;
+};
+
+class SsScene2804CrystalButton : public StaticSprite {
+public:
+ SsScene2804CrystalButton(NeverhoodEngine *vm, Scene2804 *parentScene, AsScene2804Crystal *asCrystal, uint crystalIndex);
+protected:
+ Scene2804 *_parentScene;
+ AsScene2804Crystal *_asCrystal;
+ uint _crystalIndex;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2804BeamCoil : public AnimatedSprite {
+public:
+ AsScene2804BeamCoil(NeverhoodEngine *vm, Scene *parentScene, SsScene2804BeamCoilBody *ssBeamCoilBody);
+ virtual ~AsScene2804BeamCoil();
+protected:
+ Scene *_parentScene;
+ SsScene2804BeamCoilBody *_ssBeamCoilBody;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void show();
+ void hide();
+ void stBeaming();
+ uint32 hmBeaming(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2804BeamTarget : public AnimatedSprite {
+public:
+ AsScene2804BeamTarget(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2804 : public Scene {
+public:
+ Scene2804(NeverhoodEngine *vm, Module *parentModule, int which);
+ bool isWorking() const { return _isWorking; }
+protected:
+ int _countdown1;
+ int _countdown2;
+ int _countdown3;
+ int _beamStatus;
+ bool _isSolved;
+ bool _isWorking;
+ Sprite *_ssRedButton;
+ Sprite *_asCoil;
+ Sprite *_asTarget;
+ SsScene2804Flash *_ssFlash;
+ AsScene2804Crystal *_asCrystals[5];
+ Sprite *_ssCrystalButtons[5];
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2805 : public Scene {
+public:
+ Scene2805(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2806Spew : public AnimatedSprite {
+public:
+ AsScene2806Spew(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2806 : public Scene {
+public:
+ Scene2806(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ NPointArray *_pointList;
+ int _pointIndex;
+ NRect _clipRects[4];
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_sprite4;
+ Sprite *_asSpew;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void update();
+ void findClosestPoint();
+};
+
+class Scene2807 : public Scene {
+public:
+ Scene2807(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2808Dispenser : public StaticSprite {
+public:
+ SsScene2808Dispenser(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum, int testTubeIndex);
+ void startCountdown(int index);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ int _testTubeSetNum, _testTubeIndex;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2808TestTube : public AnimatedSprite {
+public:
+ AsScene2808TestTube(NeverhoodEngine *vm, int testTubeSetNum, int testTubeIndex, SsScene2808Dispenser *ssDispenser);
+ void fill();
+ void flush();
+ uint32 getFillLevel() const { return _fillLevel; }
+protected:
+ SsScene2808Dispenser *_ssDispenser;
+ int _testTubeSetNum;
+ uint32 _fillLevel;
+ int _testTubeIndex;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2808Handle : public AnimatedSprite {
+public:
+ AsScene2808Handle(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
+ void activate();
+ void stActivated();
+protected:
+ Scene *_parentScene;
+ int _testTubeSetNum;
+ bool _isActivated;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmActivating(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2808Flow : public AnimatedSprite {
+public:
+ AsScene2808Flow(NeverhoodEngine *vm, Scene *parentScene, int testTubeSetNum);
+ void start();
+ void stKeepFlowing();
+protected:
+ Scene *_parentScene;
+ int _testTubeSetNum;
+ uint32 hmFlowing(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2808LightEffect : public AnimatedSprite {
+public:
+ AsScene2808LightEffect(NeverhoodEngine *vm, int which);
+protected:
+ int _countdown;
+ void update();
+};
+
+class Scene2808 : public Scene {
+public:
+ Scene2808(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ int _countdown;
+ int _testTubeSetNum;
+ AsScene2808Flow *_asFlow;
+ int _leaveResult;
+ bool _isFlowing;
+ AsScene2808TestTube *_asTestTubes[3];
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void update();
+ bool isMixtureGood();
+ bool isAnyTestTubeFilled();
+};
+
+class AsScene2809Spew : public AnimatedSprite {
+public:
+ AsScene2809Spew(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2809 : public Scene {
+public:
+ Scene2809(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ NPointArray *_pointList;
+ int _pointIndex;
+ NRect _clipRects[4];
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_sprite4;
+ Sprite *_asSpew;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void findClosestPoint();
+};
+
+class AsScene2810Rope : public AnimatedSprite {
+public:
+ AsScene2810Rope(NeverhoodEngine *vm, Scene *parentScene, int16 x);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2810 : public Scene {
+public:
+ Scene2810(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene2810();
+protected:
+ Sprite *_sprite1;
+ Sprite *_sprite2;
+ Sprite *_sprite3;
+ Sprite *_asRope;
+ Sprite *_sprite4;
+ Sprite *_asTape;
+ Sprite *_sprite5;
+ Sprite *_sprite6;
+ bool _isRopingDown;
+ NRect _clipRects[2];
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void insertKlaymenLadder();
+};
+
+class AsScene2812Winch : public AnimatedSprite {
+public:
+ AsScene2812Winch(NeverhoodEngine *vm);
+ virtual ~AsScene2812Winch();
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene2812Rope : public AnimatedSprite {
+public:
+ AsScene2812Rope(NeverhoodEngine *vm, Scene *parentScene);
+protected:
+ Scene *_parentScene;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ uint32 hmRopingDown(int messageNum, const MessageParam &param, Entity *sender);
+ void stRopingDown();
+};
+
+class AsScene2812TrapDoor : public AnimatedSprite {
+public:
+ AsScene2812TrapDoor(NeverhoodEngine *vm);
+protected:
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2812 : public Scene {
+public:
+ Scene2812(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_asWinch;
+ Sprite *_asTrapDoor;
+ Sprite *_asRope;
+ Sprite *_sprite3;
+ Sprite *_sprite2;
+ Sprite *_sprite4;
+ Sprite *_ssTape;
+ Sprite *_asKey;
+ Sprite *_sprite1;
+ bool _isRopingDown;
+ int _paletteArea;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void setPaletteArea0(bool instantly);
+ void setPaletteArea1(bool instantly);
+ void setPaletteArea2(bool instantly);
+ void updatePaletteArea(bool instantly);
+};
+
+class Scene2822 : public Scene {
+public:
+ Scene2822(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssButton;
+ int _scrollIndex;
+ int _countdown;
+ int _countdownStatus;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2800_H */
diff --git a/engines/neverhood/modules/module2900.cpp b/engines/neverhood/modules/module2900.cpp
new file mode 100644
index 0000000000..248fb81bdc
--- /dev/null
+++ b/engines/neverhood/modules/module2900.cpp
@@ -0,0 +1,439 @@
+/* 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 "neverhood/modules/module2900.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/modules/module1100.h"
+#include "neverhood/modules/module1300.h"
+#include "neverhood/modules/module1700.h"
+#include "neverhood/modules/module2000.h"
+#include "neverhood/modules/module2100.h"
+#include "neverhood/modules/module2800.h"
+
+namespace Neverhood {
+
+Module2900::Module2900(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule) {
+
+ if (which >= 0)
+ setGlobalVar(V_TELEPORTER_WHICH, which);
+
+ createScene(0, 0);
+
+}
+
+void Module2900::createScene(int sceneNum, int which) {
+ debug(1, "Module2900::createScene(%d, %d)", sceneNum, which);
+ _sceneNum = sceneNum;
+ switch (_sceneNum) {
+ case 0:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2901(_vm, this, getGlobalVar(V_TELEPORTER_WHICH));
+ break;
+ case 1:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2805(_vm, this, which);
+ break;
+ case 2:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2101(_vm, this, which);
+ break;
+ case 3:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1306(_vm, this, which);
+ break;
+ case 4:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1705(_vm, this, which);
+ break;
+ case 5:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene1109(_vm, this, which);
+ break;
+ case 6:
+ _vm->gameState().sceneNum = 0;
+ _childObject = new Scene2001(_vm, this, which);
+ break;
+ }
+ SetUpdateHandler(&Module2900::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module2900::updateScene() {
+ if (!updateChild()) {
+ switch (_sceneNum) {
+ case 0:
+ if (_moduleResult == (uint32)-1) {
+ leaveModule((uint32)-1);
+ } else {
+ _teleporterModuleResult = _moduleResult;
+ switch (getGlobalVar(V_TELEPORTER_WHICH)) {
+ case 0:
+ createScene(3, 4);
+ break;
+ case 1:
+ createScene(2, 2);
+ break;
+ case 2:
+ createScene(5, 2);
+ break;
+ case 3:
+ createScene(4, 2);
+ break;
+ case 4:
+ createScene(6, 2);
+ break;
+ case 5:
+ createScene(1, 2);
+ break;
+ default:
+ leaveModule(_moduleResult);
+ break;
+ }
+ }
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ leaveModule(_teleporterModuleResult);
+ break;
+ }
+ }
+}
+
+static const uint32 kScene2901FileHashes1[] = {
+ 0x023023B4,
+ 0x36204507,
+ 0x046CF08E,
+ 0x9313A237,
+ 0xA651F246,
+ 0x02108034
+};
+
+static const uint32 kScene2901FileHashes2[] = {
+ 0x023B002B,
+ 0x0450336A,
+ 0xCF08A04E,
+ 0x3A233939,
+ 0x1F242A6D,
+ 0x08030029
+};
+
+static const uint32 kSsScene2901LocationButtonFileHashes[] = {
+ 0x2311326A,
+ 0x212323AC,
+ 0x10098138,
+ 0x25213167,
+ 0x1119A363,
+ 0x94452612,
+ 0x39464212,
+ 0x01860450,
+ 0x53002104,
+ 0x58E68412,
+ 0x18600300,
+ 0xB650A890,
+ 0x2452A7C4,
+ 0xA0232748,
+ 0x08862B02,
+ 0x2491E648,
+ 0x0010EB46,
+ 0x214C8A11,
+ 0x16A31921,
+ 0x0AC33A00,
+ 0x238028AA,
+ 0x26737A21,
+ 0x063039A8,
+ 0x51286C60,
+ 0x464006B4,
+ 0x42242538,
+ 0x20716010,
+ 0x4A2000AE,
+ 0x225124A6,
+ 0x28E82E45,
+ 0x58652C04,
+ 0xC82210A4,
+ 0x62A84060,
+ 0xC0693CB4,
+ 0x22212C64,
+ 0x5034EA71
+};
+
+static const NPoint kSsScene2901LocationButtonPoints[] = {
+ {525, 120}, {576, 149}, {587, 205},
+ {538, 232}, {484, 205}, {479, 153}
+};
+
+static const uint32 kSsScene2901LocationButtonLightFileHashes1[] = {
+ 0x03136246,
+ 0x2106216E,
+ 0x4025A13A,
+ 0x21816927,
+ 0x110B2202,
+ 0xCC0522B2,
+ 0x3CC24258,
+ 0x59C600F0,
+ 0x534A2480,
+ 0x50E61019,
+ 0x34400150,
+ 0x225BA090,
+ 0xB059AFC4,
+ 0xE093A741,
+ 0x0086BF09,
+ 0x3281E760,
+ 0xA048AB42,
+ 0x20649C01,
+ 0x14611904,
+ 0x26E33850,
+ 0x23A52A68,
+ 0xA2733024,
+ 0x10203880,
+ 0x1B2DE860,
+ 0x0644A6EC,
+ 0x426E20BC,
+ 0x80292014,
+ 0x4360B02E,
+ 0x22742664,
+ 0x98682705,
+ 0x0925B82C,
+ 0x5C2918A4,
+ 0xD2284920,
+ 0x41083CA6,
+ 0x6824A864,
+ 0x50266B10
+};
+
+static const uint32 kSsScene2901LocationButtonLightFileHashes2[] = {
+ 0x43C46D4C,
+ 0x43C4AD4C,
+ 0x43C52D4C,
+ 0x43C62D4C,
+ 0x43C02D4C,
+ 0x43CC2D4C
+};
+
+static const uint32 kSsScene2901BrokenButtonFileHashes[] = {
+ 0x3081BD3A,
+ 0xD3443003,
+ 0x0786A320,
+ 0xE3A22029,
+ 0x61611814,
+ 0x425848E2
+};
+
+static const uint32 kSsScene2901BigButtonFileHashes[] = {
+ 0x010D7748,
+ 0x9D02019A,
+ 0x351A2F43,
+ 0x448138E5,
+ 0x02788CF0,
+ 0x71718024
+};
+
+SsScene2901LocationButton::SsScene2901LocationButton(NeverhoodEngine *vm, Scene *parentScene, int which, uint index)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _index(index), _countdown1(0) {
+
+ const NPoint &pt = kSsScene2901LocationButtonPoints[_index];
+
+ loadSprite(kSsScene2901LocationButtonFileHashes[which * 6 + index], kSLFDefDrawOffset | kSLFDefPosition, 800);
+ _collisionBounds.set(pt.x - 25, pt.y - 25, pt.x + 25, pt.y + 25);
+ setVisible(false);
+ loadSound(0, 0x440430C0);
+ SetUpdateHandler(&SsScene2901LocationButton::update);
+ SetMessageHandler(&SsScene2901LocationButton::handleMessage);
+}
+
+void SsScene2901LocationButton::update() {
+ updatePosition();
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ setVisible(false);
+ }
+}
+
+uint32 SsScene2901LocationButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown1 == 0) {
+ playSound(0);
+ setVisible(true);
+ _countdown1 = 4;
+ sendMessage(_parentScene, 0x2001, _index);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+SsScene2901LocationButtonLight::SsScene2901LocationButtonLight(NeverhoodEngine *vm, int which, uint index)
+ : StaticSprite(vm, 900), _index(index) {
+
+ loadSprite(kSsScene2901LocationButtonLightFileHashes1[which * 6 + index], kSLFDefDrawOffset | kSLFDefPosition, 900);
+ setVisible(false);
+ loadSound(0, kSsScene2901LocationButtonLightFileHashes2[_index]);
+}
+
+void SsScene2901LocationButtonLight::show() {
+ playSound(0);
+ setVisible(true);
+ updatePosition();
+}
+
+void SsScene2901LocationButtonLight::hide() {
+ setVisible(false);
+ updatePosition();
+}
+
+SsScene2901BrokenButton::SsScene2901BrokenButton(NeverhoodEngine *vm, int which)
+ : StaticSprite(vm, 900) {
+
+ loadSprite(kSsScene2901BrokenButtonFileHashes[which], kSLFDefDrawOffset | kSLFDefPosition, 900);
+}
+
+SsScene2901BigButton::SsScene2901BigButton(NeverhoodEngine *vm, Scene *parentScene, int which)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _which(which), _countdown1(0) {
+
+ loadSprite(kSsScene2901BigButtonFileHashes[which], kSLFDefDrawOffset | kSLFDefPosition, 400);
+ _collisionBounds.set(62, 94, 322, 350);
+ setVisible(false);
+ loadSound(0, 0xF3D420C8);
+ SetUpdateHandler(&SsScene2901BigButton::update);
+ SetMessageHandler(&SsScene2901BigButton::handleMessage);
+}
+
+void SsScene2901BigButton::update() {
+ updatePosition();
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ setVisible(false);
+ sendMessage(_parentScene, 0x2000, 0);
+ }
+}
+
+uint32 SsScene2901BigButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown1 == 0) {
+ playSound(0);
+ setVisible(true);
+ _countdown1 = 4;
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+Scene2901::Scene2901(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _currLocationButtonNum(which), _selectedButtonNum(which),
+ _currWhirlButtonNum(0), _prevWhirlButtonNum(0), _countdown1(1), _skipCountdown(0), _blinkOn(0) {
+
+ _isButton2Broken = getGlobalVar(V_ENTRANCE_OPEN) != 0;
+
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, which, 1);
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, 5, 1);
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, 4, 1);
+
+ if (_currLocationButtonNum == 3)
+ setSubVar(V_TELEPORTER_DEST_AVAILABLE, 2, 1);
+
+ setBackground(kScene2901FileHashes1[_currLocationButtonNum]);
+ setPalette(kScene2901FileHashes1[_currLocationButtonNum]);
+
+ for (uint i = 0; i < 6; ++i) {
+ if (i != 2 || !_isButton2Broken) {
+ _ssLocationButtons[i] = insertSprite<SsScene2901LocationButton>(this, _currLocationButtonNum, i);
+ addCollisionSprite(_ssLocationButtons[i]);
+ _ssLocationButtonLights[i] = insertSprite<SsScene2901LocationButtonLight>(_currLocationButtonNum, i);
+ }
+ }
+
+ if (_isButton2Broken)
+ insertSprite<SsScene2901BrokenButton>(_currLocationButtonNum);
+
+ _ssBigButton = insertSprite<SsScene2901BigButton>(this, _currLocationButtonNum);
+ addCollisionSprite(_ssBigButton);
+
+ insertPuzzleMouse(kScene2901FileHashes2[_currLocationButtonNum], 20, 620);
+
+ SetUpdateHandler(&Scene2901::update);
+ SetMessageHandler(&Scene2901::handleMessage);
+
+}
+
+void Scene2901::update() {
+ Scene::update();
+ if (_countdown1 != 0 && (--_countdown1) == 0) {
+ if (_currLocationButtonNum == _selectedButtonNum) {
+ _ssLocationButtonLights[_currWhirlButtonNum]->hide();
+ ++_currWhirlButtonNum;
+ while (!getSubVar(V_TELEPORTER_DEST_AVAILABLE, _currWhirlButtonNum) || (_currWhirlButtonNum == 2 && _isButton2Broken) || _currLocationButtonNum == _currWhirlButtonNum) {
+ ++_currWhirlButtonNum;
+ if (_currWhirlButtonNum >= 6)
+ _currWhirlButtonNum = 0;
+ }
+ if (_currWhirlButtonNum != _prevWhirlButtonNum || _skipCountdown == 0) {
+ _ssLocationButtonLights[_currWhirlButtonNum]->show();
+ _skipCountdown = 4;
+ }
+ _countdown1 = 2;
+ --_skipCountdown;
+ _prevWhirlButtonNum = _currWhirlButtonNum;
+ } else if (_blinkOn) {
+ _blinkOn = false;
+ _ssLocationButtonLights[_selectedButtonNum]->hide();
+ _countdown1 = 16;
+ } else {
+ _blinkOn = true;
+ _ssLocationButtonLights[_selectedButtonNum]->show();
+ _countdown1 = 4;
+ }
+ }
+}
+
+uint32 Scene2901::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620)
+ leaveScene((uint32)-1);
+ break;
+ case 0x2000:
+ if (_currLocationButtonNum != _selectedButtonNum)
+ leaveScene(_selectedButtonNum);
+ break;
+ case 0x2001:
+ if (_currLocationButtonNum == _selectedButtonNum)
+ _selectedButtonNum = _currWhirlButtonNum;
+ _ssLocationButtonLights[_selectedButtonNum]->hide();
+ _selectedButtonNum = param.asInteger();
+ if (!getSubVar(V_TELEPORTER_DEST_AVAILABLE, _selectedButtonNum))
+ _selectedButtonNum = _currLocationButtonNum;
+ break;
+ }
+ return 0;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module2900.h b/engines/neverhood/modules/module2900.h
new file mode 100644
index 0000000000..75b29567f6
--- /dev/null
+++ b/engines/neverhood/modules/module2900.h
@@ -0,0 +1,102 @@
+/* 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 NEVERHOOD_MODULES_MODULE2900_H
+#define NEVERHOOD_MODULES_MODULE2900_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// Module2900
+
+class Module2900 : public Module {
+public:
+ Module2900(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ int _sceneNum;
+ int _teleporterModuleResult;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+ void updateMusic(bool halfVolume);
+};
+
+class SsScene2901LocationButton : public StaticSprite {
+public:
+ SsScene2901LocationButton(NeverhoodEngine *vm, Scene *parentScene, int which, uint index);
+protected:
+ Scene *_parentScene;
+ uint _index;
+ int _countdown1;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene2901LocationButtonLight : public StaticSprite {
+public:
+ SsScene2901LocationButtonLight(NeverhoodEngine *vm, int which, uint index);
+ void show();
+ void hide();
+protected:
+ uint _index;
+};
+
+class SsScene2901BrokenButton : public StaticSprite {
+public:
+ SsScene2901BrokenButton(NeverhoodEngine *vm, int which);
+};
+
+class SsScene2901BigButton : public StaticSprite {
+public:
+ SsScene2901BigButton(NeverhoodEngine *vm, Scene *parentScene, int which);
+protected:
+ Scene *_parentScene;
+ int _which;
+ int _countdown1;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene2901 : public Scene {
+public:
+ Scene2901(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssLocationButtons[6];
+ SsScene2901LocationButtonLight *_ssLocationButtonLights[6];
+ Sprite *_ssBigButton;
+ int _currWhirlButtonNum;
+ int _prevWhirlButtonNum;
+ int _countdown1;
+ int _currLocationButtonNum;
+ int _selectedButtonNum;
+ int _skipCountdown;
+ int _blinkOn;
+ bool _isButton2Broken;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE2900_H */
diff --git a/engines/neverhood/modules/module3000.cpp b/engines/neverhood/modules/module3000.cpp
new file mode 100644
index 0000000000..373bfb57f6
--- /dev/null
+++ b/engines/neverhood/modules/module3000.cpp
@@ -0,0 +1,1536 @@
+/* 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 "neverhood/modules/module3000.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/navigationscene.h"
+
+namespace Neverhood {
+
+static const uint32 kModule3000SoundList[] = {
+ 0x92025040,
+ 0x90035066,
+ 0x90815450,
+ 0x99801500,
+ 0x90E14440,
+ 0x16805048,
+ 0x90F0D1C3,
+ 0
+};
+
+Module3000::Module3000(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Module(vm, parentModule), _soundVolume(0) {
+
+ _vm->_soundMan->addSoundList(0x81293110, kModule3000SoundList);
+ _vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 50, 600, 5, 150);
+ _vm->_soundMan->setSoundParams(0x90F0D1C3, false, 20000, 30000, 20000, 30000);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+
+ _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+
+ if (_isWallBroken) {
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
+ _vm->_soundMan->playSoundLooping(0x90F0D1C3);
+ }
+
+ if (which < 0) {
+ createScene(_vm->gameState().sceneNum, -1);
+ } else if (which == 0) {
+ createScene(1, 0);
+ } else if (which == 1) {
+ createScene(4, 2);
+ } else if (which == 2) {
+ createScene(4, 1);
+ } else if (which == 3) {
+ createScene(5, 1);
+ }
+
+}
+
+Module3000::~Module3000() {
+ _vm->_soundMan->deleteGroup(0x81293110);
+}
+
+void Module3000::createScene(int sceneNum, int which) {
+ static const byte kNavigationTypes05[] = {3, 0};
+ static const byte kNavigationTypes06[] = {5};
+ debug(1, "Module3000::createScene(%d, %d)", sceneNum, which);
+ _vm->gameState().sceneNum = sceneNum;
+ switch (_vm->gameState().sceneNum) {
+ case 1:
+ if (!getGlobalVar(V_BOLT_DOOR_OPEN)) {
+ createNavigationScene(0x004B7C80, which);
+ } else if (getGlobalVar(V_WALL_BROKEN)) {
+ createNavigationScene(0x004B7CE0, which);
+ } else {
+ createNavigationScene(0x004B7CB0, which);
+ }
+ break;
+ case 2:
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ if (_isWallBroken) {
+ _soundVolume = 90;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 90);
+ }
+ if (getGlobalVar(V_WALL_BROKEN)) {
+ createNavigationScene(0x004B7D58, which);
+ } else {
+ createNavigationScene(0x004B7D10, which);
+ }
+ break;
+ case 3:
+ if (getGlobalVar(V_STAIRS_DOWN))
+ createNavigationScene(0x004B7E60, which);
+ else if (getGlobalVar(V_WALL_BROKEN))
+ createNavigationScene(0x004B7DA0, which);
+ else
+ createNavigationScene(0x004B7E00, which);
+ break;
+ case 4:
+ if (getGlobalVar(V_STAIRS_DOWN))
+ createNavigationScene(0x004B7F20, which);
+ else
+ createNavigationScene(0x004B7EC0, which);
+ break;
+ case 5:
+ createNavigationScene(0x004B7F80, which, kNavigationTypes05);
+ break;
+ case 6:
+ createNavigationScene(0x004B7FB0, which, kNavigationTypes06);
+ break;
+ case 7:
+ _vm->_soundMan->setSoundListParams(kModule3000SoundList, false, 0, 0, 0, 0);
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x089809C2)) {
+ setSubVar(VA_IS_PUZZLE_INIT, 0x089809C2, 1);
+ createSmackerScene(0x90022001, true, true, false);
+ } else
+ createSmackerScene(0x98022001, true, true, false);
+ break;
+ case 8:
+ _childObject = new Scene3009(_vm, this, which);
+ break;
+ case 9:
+ _childObject = new Scene3010(_vm, this, 0);
+ break;
+ case 10:
+ _childObject = new Scene3011(_vm, this, 0);
+ break;
+ case 11:
+ _vm->_soundMan->setSoundListParams(kModule3000SoundList, false, 0, 0, 0, 0);
+ if (!getSubVar(VA_IS_PUZZLE_INIT, 0x10130993)) {
+ setSubVar(VA_IS_PUZZLE_INIT, 0x10130993, 1);
+ createSmackerScene(0x31093019, true, true, false);
+ } else
+ createSmackerScene(0x20093019, true, true, false);
+ break;
+ case 12:
+ _childObject = new Scene3010(_vm, this, 1);
+ break;
+ // NOTE: Newly introduced sceneNums
+ case 1001:
+ if (!getGlobalVar(V_BOLT_DOOR_OPEN))
+ if (getGlobalVar(V_WALL_BROKEN))
+ createSmackerScene(0x00940021, true, true, false);
+ else
+ createSmackerScene(0x01140021, true, true, false);
+ else
+ if (getGlobalVar(V_WALL_BROKEN))
+ createSmackerScene(0x001011B1, true, true, false);
+ else
+ createSmackerScene(0x001021B1, true, true, false);
+ setGlobalVar(V_BOLT_DOOR_OPEN, getGlobalVar(V_BOLT_DOOR_OPEN) ? 0 : 1);
+ break;
+ case 1006:
+ createSmackerScene(0x080810C5, true, true, false);
+ break;
+ case 1008:
+ createSmackerScene(getGlobalVar(V_CANNON_SMACKER_NAME), true, true, false);
+ break;
+ }
+ SetUpdateHandler(&Module3000::updateScene);
+ _childObject->handleUpdate();
+}
+
+void Module3000::updateScene() {
+ if (!updateChild()) {
+ switch (_vm->gameState().sceneNum) {
+ case 1:
+ if (!getGlobalVar(V_BOLT_DOOR_OPEN)) {
+ if (_moduleResult == 0)
+ createScene(9, -1);
+ else if (_moduleResult == 1)
+ leaveModule(0);
+ } else {
+ if (_moduleResult == 0)
+ if (_navigationAreaType == 2)
+ createScene(2, 0);
+ else
+ createScene(1001, -1);
+ else if (_moduleResult == 1)
+ leaveModule(0);
+ }
+ break;
+ case 2:
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ if (_isWallBroken) {
+ _soundVolume = 0;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, 0);
+ }
+ if (_moduleResult == 0) {
+ createScene(3, 0);
+ } else if (_moduleResult == 1) {
+ setGlobalVar(V_BOLT_DOOR_OPEN, 0);
+ createScene(1, 1);
+ }
+ break;
+ case 3:
+ if (_moduleResult == 1)
+ createScene(4, 0);
+ else if (_moduleResult == 3)
+ createScene(10, -1);
+ else if (getGlobalVar(V_STAIRS_DOWN))
+ createScene(5, 0);
+ else
+ createScene(2, 1);
+ break;
+ case 4:
+ if (_moduleResult == 0)
+ leaveModule(1);
+ else if (_moduleResult == 1)
+ createScene(7, -1);
+ else if (_moduleResult == 2)
+ createScene(3, 3);
+ break;
+ case 5:
+ if (_moduleResult == 0)
+ createScene(6, 0);
+ else if (_moduleResult == 1)
+ createScene(3, 0);
+ break;
+ case 6:
+ if (_navigationAreaType == 4)
+ createScene(11, -1);
+ else
+ createScene(1006, -1);
+ break;
+ case 7:
+ createScene(8, -1);
+ break;
+ case 8:
+ _isWallBroken = getGlobalVar(V_WALL_BROKEN) != 0;
+ if (_moduleResult != 1) {
+ _vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 0, 0, 0, 0);
+ createScene(4, 1);
+ } else if (getGlobalVar(V_CANNON_SMACKER_NAME)) {
+ createScene(1008, -1);
+ } else {
+ _vm->_soundMan->setSoundListParams(kModule3000SoundList, true, 0, 0, 0, 0);
+ createScene(4, 1);
+ }
+ break;
+ case 9:
+ if (_moduleResult == 0 || _moduleResult == 2)
+ createScene(1, 0);
+ else if (_moduleResult == 1)
+ createScene(1001, -1);
+ break;
+ case 10:
+ createScene(3, 3);
+ break;
+ case 11:
+ leaveModule(3);
+ break;
+ case 12:
+ createScene(1, 0);
+ break;
+ case 1001:
+ if (getGlobalVar(V_BOLT_DOOR_OPEN))
+ createScene(1, 0);
+ else
+ createScene(12, -1);
+ break;
+ case 1006:
+ createScene(5, 0);
+ break;
+ case 1008:
+ createScene(8, -1);
+ break;
+ }
+ } else {
+ switch (_vm->gameState().sceneNum) {
+ case 1:
+ if (navigationScene()->isWalkingForward()) {
+ uint32 frameNumber = navigationScene()->getFrameNumber();
+ int navigationIndex = navigationScene()->getNavigationIndex();
+ if (navigationIndex == 1) {
+ if (frameNumber == 0) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
+ } else if (frameNumber == 100) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ }
+ } else if (navigationIndex == 0) {
+ if (frameNumber == 0) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
+ } else if (frameNumber == 10) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ }
+ if (_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+ if (frameNumber == 0)
+ _soundVolume = 40;
+ else
+ _soundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ }
+ }
+ }
+ break;
+ case 2:
+ if (navigationScene()->isWalkingForward()) {
+ uint32 frameNumber = navigationScene()->getFrameNumber();
+ int navigationIndex = navigationScene()->getNavigationIndex();
+ if (_isWallBroken && _soundVolume > 1 && frameNumber % 2) {
+ _soundVolume--;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ }
+ if (navigationIndex == 0) {
+ if (frameNumber == 35) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x41861371, 0x43A2507F, 0);
+ }
+ } else if (navigationIndex == 1) {
+ if (frameNumber == 55) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x48498E46, 0x50399F64, 0);
+ _vm->_soundMan->setSoundVolume(0x48498E46, 70);
+ _vm->_soundMan->setSoundVolume(0x50399F64, 70);
+ }
+ }
+ }
+ break;
+ case 3:
+ if (navigationScene()->isWalkingForward()) {
+ uint32 frameNumber = navigationScene()->getFrameNumber();
+ int navigationIndex = navigationScene()->getNavigationIndex();
+ if (navigationIndex == 2) {
+ if (frameNumber == 40) {
+ _vm->_soundMan->playTwoSounds(0x81293110, 0x40030A51, 0xC862CA15, 0);
+ }
+ if (_isWallBroken && _soundVolume < 90 && frameNumber % 2) {
+ if (frameNumber == 0)
+ _soundVolume = 40;
+ else
+ _soundVolume++;
+ _vm->_soundMan->setSoundVolume(0x90F0D1C3, _soundVolume);
+ }
+ }
+ }
+ break;
+ case 5:
+ if (navigationScene()->isWalkingForward() && navigationScene()->getNavigationIndex() == 0) {
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ }
+ break;
+ }
+ }
+}
+
+// Scene3009
+
+enum {
+ kCTSNull = 0,
+ kCTSBreakWall = 1,
+ kCTSWall = 2,
+ kCTSEmptyness = 3,
+ kCTSFireRobotNoTarget = 4,
+ kCTSFireRobotIsTarget = 5,
+ kCTSFireNoRobot = 6,
+ kCTSRaiseCannon = 7,
+ kCTSRightRobotNoTarget = 8,
+ kCTSRightRobotIsTarget = 9,
+ kCTSRightNoRobot = 10,
+ kCTSLeftRobotNoTarget = 11,
+ kCTSLeftRobotIsTarget = 12,
+ kCTSLeftNoRobot = 13,
+ kCTSLowerCannon = 14,
+ kCTSCount = 14
+};
+
+static const uint32 kScene3009CannonScopeVideos[] = {
+ 0x1010000D,
+ 0x340A0049,
+ 0x340A0049,
+ 0x0282081D,
+ 0x0082080D,
+ 0x0882080D,
+ 0x0882080D,
+ 0x0282081D,
+ 0x004B000B,
+ 0x014B000B,
+ 0x044B000B,
+ 0x0282081D,
+ 0x0282081D,
+ 0x0282081D,
+ 0x340A0049
+};
+
+static const uint32 kScene3009CannonActionVideos[] = {
+ 0x00000000,
+ 0x8004001B, // 1 Fire cannon at wall, it breaks (lowered)
+ 0x0004001A, // 2 Fire cannon at wall, nothing happens (lowered)
+ 0x1048404B, // 3 Fire cannon at emptyness (raised)
+ 0x50200109, // 4 Fire cannon, robot missed (raised)
+ 0x12032109, // 5 Fire cannon, robot hit (raised)
+ 0x10201109, // 6 Fire cannon, no robot (raised)
+ 0x000A2030, // 7 Raise the cannon
+ 0x000A0028, // 8
+ 0x000A0028, // 9
+ 0x000A0028, // 10
+ 0x040A1069, // 11
+ 0x040A1069, // 12
+ 0x040A1069, // 13
+ 0x240A1101 // 14 Lower the cannon
+};
+
+static const uint32 kSsScene3009SymbolEdgesFileHashes[] = {
+ 0x618827A0,
+ 0xB1A92322
+};
+
+static const uint32 kSsScene3009TargetLineFileHashes[] = {
+ 0x4011018C,
+ 0x15086623
+};
+
+static const NPoint kAsScene3009SymbolPoints[] = {
+ {289, 338},
+ {285, 375},
+ {284, 419},
+ {456, 372},
+ {498, 372},
+ {541, 372}
+};
+
+static const uint32 kAsScene3009SymbolFileHashes[] = {
+ 0x24542582,
+ 0x1CD61D96
+};
+
+static const uint32 kSsScene3009SymbolArrowFileHashes1[] = {
+ 0x24016060,
+ 0x21216221,
+ 0x486160A0,
+ 0x42216422,
+ 0x90A16120,
+ 0x84216824,
+ 0x08017029,
+ 0x08217029,
+ 0x10014032,
+ 0x10214032,
+ 0x20012004,
+ 0x20212004
+};
+
+static const uint32 kSsScene3009SymbolArrowFileHashes2[] = {
+ 0x40092024,
+ 0x01636002,
+ 0x8071E028,
+ 0x02A56064,
+ 0x00806031,
+ 0x052960A8,
+ 0x0A116130,
+ 0x0A316130,
+ 0x14216200,
+ 0x14016200,
+ 0x28416460,
+ 0x28616460
+};
+
+SsScene3009FireCannonButton::SsScene3009FireCannonButton(NeverhoodEngine *vm, Scene3009 *parentScene)
+ : StaticSprite(vm, 1400), _parentScene(parentScene), _isClicked(false) {
+
+ loadSprite(0x120B24B0, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ SetUpdateHandler(&SsScene3009FireCannonButton::update);
+ SetMessageHandler(&SsScene3009FireCannonButton::handleMessage);
+ loadSound(0, 0x3901B44F);
+}
+
+void SsScene3009FireCannonButton::update() {
+ updatePosition();
+ if (_isClicked && !isSoundPlaying(0)) {
+ sendMessage(_parentScene, 0x2000, 0);
+ setVisible(false);
+ }
+}
+
+uint32 SsScene3009FireCannonButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_isClicked && !_parentScene->isTurning()) {
+ _isClicked = true;
+ setVisible(true);
+ playSound(0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+SsScene3009SymbolEdges::SsScene3009SymbolEdges(NeverhoodEngine *vm, int index)
+ : StaticSprite(vm, 1400), _blinkCountdown(0) {
+
+ loadSprite(kSsScene3009SymbolEdgesFileHashes[index], kSLFDefDrawOffset | kSLFDefPosition, 600);
+ if (getGlobalVar(V_ROBOT_HIT))
+ hide();
+ else
+ startBlinking();
+ SetUpdateHandler(&SsScene3009SymbolEdges::update);
+}
+
+void SsScene3009SymbolEdges::update() {
+ if (_blinkCountdown != 0 && (--_blinkCountdown == 0)) {
+ if (_blinkToggle) {
+ setVisible(true);
+ } else {
+ setVisible(false);
+ }
+ updatePosition();
+ _blinkCountdown = 3;
+ _blinkToggle = !_blinkToggle;
+ }
+}
+
+void SsScene3009SymbolEdges::show() {
+ setVisible(true);
+ updatePosition();
+ _blinkCountdown = 0;
+}
+
+void SsScene3009SymbolEdges::hide() {
+ setVisible(false);
+ updatePosition();
+ _blinkCountdown = 0;
+}
+
+void SsScene3009SymbolEdges::startBlinking() {
+ setVisible(true);
+ updatePosition();
+ _blinkCountdown = 3;
+ _blinkToggle = true;
+}
+
+SsScene3009TargetLine::SsScene3009TargetLine(NeverhoodEngine *vm, int index)
+ : StaticSprite(vm, 1400) {
+
+ loadSprite(kSsScene3009TargetLineFileHashes[index], kSLFDefDrawOffset | kSLFDefPosition, 600);
+ setVisible(false);
+}
+
+void SsScene3009TargetLine::show() {
+ setVisible(true);
+ updatePosition();
+}
+
+SsScene3009SymbolArrow::SsScene3009SymbolArrow(NeverhoodEngine *vm, Sprite *asSymbol, int index)
+ : StaticSprite(vm, 1400), _asSymbol(asSymbol), _index(index), _enabled(true), _countdown(0) {
+
+ _incrDecr = _index % 2;
+
+ createSurface(1200, 33, 31);
+ loadSprite(kSsScene3009SymbolArrowFileHashes2[_index], kSLFDefPosition);
+ _drawOffset.set(0, 0, 33, 31);
+ _collisionBoundsOffset = _drawOffset;
+ updateBounds();
+ _needRefresh = true;
+
+ SetUpdateHandler(&SsScene3009SymbolArrow::update);
+ SetMessageHandler(&SsScene3009SymbolArrow::handleMessage);
+ loadSound(0, 0x2C852206);
+}
+
+void SsScene3009SymbolArrow::hide() {
+ _enabled = false;
+ setVisible(false);
+}
+
+void SsScene3009SymbolArrow::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ loadSprite(kSsScene3009SymbolArrowFileHashes2[_index], kSLFDefDrawOffset);
+ }
+}
+
+uint32 SsScene3009SymbolArrow::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_enabled && _countdown == 0) {
+ _countdown = 2;
+ loadSprite(kSsScene3009SymbolArrowFileHashes1[_index], kSLFDefDrawOffset);
+ playSound(0);
+ sendMessage(_asSymbol, 0x2005, _incrDecr);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene3009VerticalIndicator::AsScene3009VerticalIndicator(NeverhoodEngine *vm, Scene3009 *parentScene, int index)
+ : AnimatedSprite(vm, 1000), _parentScene(parentScene), _enabled(false) {
+
+ _x = 300;
+ _y = getGlobalVar(V_CANNON_RAISED) ? 52 : 266;
+ createSurface1(0xC2463913, 1200);
+ _needRefresh = true;
+ updatePosition();
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene3009VerticalIndicator::handleMessage);
+}
+
+void AsScene3009VerticalIndicator::show() {
+ startAnimation(0xC2463913, 0, -1);
+ setVisible(true);
+ updatePosition();
+ _enabled = true;
+}
+
+uint32 AsScene3009VerticalIndicator::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_enabled) {
+ sendMessage(_parentScene, 0x2002, 0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene3009HorizontalIndicator::AsScene3009HorizontalIndicator(NeverhoodEngine *vm, Scene3009 *parentScene, uint32 cannonTargetStatus)
+ : AnimatedSprite(vm, 1000), _parentScene(parentScene), _enabled(false) {
+
+ _x = getGlobalVar(V_CANNON_TURNED) ? 533 : 92;
+ _y = 150;
+ createSurface1(0xC0C12954, 1200);
+ _needRefresh = true;
+ updatePosition();
+ setVisible(false);
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene3009HorizontalIndicator::handleMessage);
+ if (cannonTargetStatus == kCTSRightRobotNoTarget || cannonTargetStatus == kCTSRightRobotIsTarget || cannonTargetStatus == kCTSRightNoRobot) {
+ SetSpriteUpdate(&AsScene3009HorizontalIndicator::suMoveRight);
+ _x = 280;
+ }
+}
+
+uint32 AsScene3009HorizontalIndicator::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_enabled) {
+ sendMessage(_parentScene, 0x2004, 0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene3009HorizontalIndicator::suMoveLeft() {
+ _x -= 6;
+ if (_x < 92) {
+ SetSpriteUpdate(NULL);
+ _x = 92;
+ }
+}
+
+void AsScene3009HorizontalIndicator::suMoveRight() {
+ _x += 6;
+ if (_x > 533) {
+ SetSpriteUpdate(NULL);
+ _x = 533;
+ }
+}
+
+void AsScene3009HorizontalIndicator::show() {
+ startAnimation(0xC0C12954, 0, -1);
+ setVisible(true);
+ updatePosition();
+ _enabled = true;
+}
+
+void AsScene3009HorizontalIndicator::stMoveLeft() {
+ _x = 533;
+ SetSpriteUpdate(&AsScene3009HorizontalIndicator::suMoveLeft);
+}
+
+void AsScene3009HorizontalIndicator::stMoveRight() {
+ _x = 330;
+ SetSpriteUpdate(&AsScene3009HorizontalIndicator::suMoveRight);
+}
+
+AsScene3009Symbol::AsScene3009Symbol(NeverhoodEngine *vm, Scene3009 *parentScene, int symbolPosition)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _symbolPosition(symbolPosition) {
+
+ _symbolIndex = getSubVar(VA_CURR_CANNON_SYMBOLS, _symbolPosition);
+
+ _x = kAsScene3009SymbolPoints[_symbolPosition].x;
+ _y = kAsScene3009SymbolPoints[_symbolPosition].y;
+ createSurface1(kAsScene3009SymbolFileHashes[_symbolPosition / 3], 1200);
+ startAnimation(kAsScene3009SymbolFileHashes[_symbolPosition / 3], _symbolIndex, -1);
+ _newStickFrameIndex = _symbolIndex;
+ _needRefresh = true;
+ updatePosition();
+ SetUpdateHandler(&AnimatedSprite::update);
+ SetMessageHandler(&AsScene3009Symbol::handleMessage);
+ _ssArrowPrev = _parentScene->insertSprite<SsScene3009SymbolArrow>(this, _symbolPosition * 2 + 0);
+ _parentScene->addCollisionSprite(_ssArrowPrev);
+ _ssArrowNext = _parentScene->insertSprite<SsScene3009SymbolArrow>(this, _symbolPosition * 2 + 1);
+ _parentScene->addCollisionSprite(_ssArrowNext);
+}
+
+uint32 AsScene3009Symbol::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2005:
+ if (param.asInteger()) {
+ if (_symbolIndex == 11)
+ _symbolIndex = 0;
+ else
+ _symbolIndex++;
+ } else {
+ if (_symbolIndex == 0)
+ _symbolIndex = 11;
+ else
+ _symbolIndex--;
+ }
+ startAnimation(kAsScene3009SymbolFileHashes[_symbolPosition / 3], _symbolIndex, -1);
+ _newStickFrameIndex = _symbolIndex;
+ setSubVar(VA_CURR_CANNON_SYMBOLS, _symbolPosition, _symbolIndex);
+ if (_symbolPosition / 3 == 0) {
+ sendMessage(_parentScene, 0x2001, 0);
+ } else {
+ sendMessage(_parentScene, 0x2003, 0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene3009Symbol::hide() {
+ _ssArrowPrev->hide();
+ _ssArrowNext->hide();
+}
+
+Scene3009::Scene3009(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _keepVideo(false), _moveCannonLeftFirst(false),
+ _isTurning(false), _lockSymbolsPart1Countdown(1), _lockSymbolsPart2Countdown(1) {
+
+ _cannonTargetStatus = getGlobalVar(V_CANNON_TARGET_STATUS);
+
+ _vm->gameModule()->initCannonSymbolsPuzzle();
+
+ setGlobalVar(V_CANNON_SMACKER_NAME, 0);
+
+ _vm->_screen->clear();
+
+ setBackground(0xD000420C);
+ setPalette(0xD000420C);
+ insertPuzzleMouse(0x04208D08, 20, 620);
+
+ _ssFireCannonButton = insertSprite<SsScene3009FireCannonButton>(this);
+ addCollisionSprite(_ssFireCannonButton);
+
+ _asVerticalIndicator = insertSprite<AsScene3009VerticalIndicator>(this, _cannonTargetStatus);
+ addCollisionSprite(_asVerticalIndicator);
+
+ _asHorizontalIndicator = insertSprite<AsScene3009HorizontalIndicator>(this, _cannonTargetStatus);
+ addCollisionSprite(_asHorizontalIndicator);
+
+ if (_cannonTargetStatus != kCTSNull && _cannonTargetStatus != kCTSRightRobotNoTarget && _cannonTargetStatus != kCTSRightRobotIsTarget && _cannonTargetStatus != kCTSRightNoRobot) {
+ _keepVideo = true;
+ } else {
+ _keepVideo = false;
+ if (_cannonTargetStatus != kCTSNull) {
+ _asHorizontalIndicator->stMoveRight();
+ _isTurning = true;
+ }
+ }
+
+ _cannonSmackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, kScene3009CannonScopeVideos[_cannonTargetStatus], false, _keepVideo));
+ _cannonSmackerPlayer->setDrawPos(89, 37);
+ _palette->usePalette(); // Use it again since the SmackerPlayer overrides the usage
+
+ insertStaticSprite(0x8540252C, 400);
+
+ for (int i = 0; i < 2; i++) {
+ _ssSymbolEdges[i] = insertSprite<SsScene3009SymbolEdges>(i);
+ _ssTargetLines[i] = insertSprite<SsScene3009TargetLine>(i);
+ }
+
+ for (int symbolPosition = 0; symbolPosition < 6; symbolPosition++) {
+ _asSymbols[symbolPosition] = insertSprite<AsScene3009Symbol>(this, symbolPosition);
+ if (symbolPosition < 3)
+ _correctSymbols[symbolPosition] = getSubVar(VA_GOOD_CANNON_SYMBOLS_1, symbolPosition);
+ else
+ _correctSymbols[symbolPosition] = getSubVar(VA_GOOD_CANNON_SYMBOLS_2, symbolPosition - 3);
+ }
+
+ SetMessageHandler(&Scene3009::handleMessage);
+ SetUpdateHandler(&Scene3009::update);
+}
+
+Scene3009::~Scene3009() {
+}
+
+void Scene3009::openSmacker(uint32 fileHash, bool keepLastFrame) {
+ _cannonSmackerPlayer->open(fileHash, keepLastFrame);
+ //_vm->_screen->setSmackerDecoder(_cannonSmackerPlayer->getSmackerDecoder());
+ _palette->usePalette();
+}
+
+void Scene3009::update() {
+ Scene::update();
+
+ if (!_keepVideo && _cannonSmackerPlayer->isDone() && _cannonTargetStatus <= kCTSCount) {
+ switch (_cannonTargetStatus) {
+ case kCTSNull:
+ case kCTSLowerCannon:
+ openSmacker(0x340A0049, true);
+ _keepVideo = true;
+ break;
+ case kCTSRightRobotNoTarget:
+ openSmacker(0x0082080D, true);
+ _keepVideo = true;
+ _isTurning = false;
+ break;
+ case kCTSRightRobotIsTarget:
+ openSmacker(0x0282080D, true);
+ _keepVideo = true;
+ _isTurning = false;
+ break;
+ case kCTSRightNoRobot:
+ openSmacker(0x0882080D, true);
+ _keepVideo = true;
+ _isTurning = false;
+ break;
+ case kCTSLeftRobotNoTarget:
+ case kCTSLeftRobotIsTarget:
+ case kCTSLeftNoRobot:
+ if (_moveCannonLeftFirst) {
+ if (_cannonTargetStatus == kCTSLeftRobotNoTarget)
+ openSmacker(0x110A000F, false);
+ else if (_cannonTargetStatus == kCTSLeftRobotIsTarget)
+ openSmacker(0x500B004F, false);
+ else if (_cannonTargetStatus == kCTSLeftNoRobot)
+ openSmacker(0x100B010E, false);
+ _moveCannonLeftFirst = false;
+ _asHorizontalIndicator->stMoveLeft();
+ } else {
+ playActionVideo();
+ }
+ break;
+ }
+ }
+
+ if (_lockSymbolsPart1Countdown != 0 && (--_lockSymbolsPart1Countdown == 0) && isSymbolsPart1Solved()) {
+ for (int i = 0; i < 3; i++)
+ _asSymbols[i]->hide();
+ if (!getGlobalVar(V_ROBOT_HIT) || getGlobalVar(V_CANNON_RAISED) || getGlobalVar(V_CANNON_TURNED)) {
+ _ssSymbolEdges[0]->show();
+ _ssTargetLines[0]->show();
+ _asVerticalIndicator->show();
+ }
+ }
+
+ if (_lockSymbolsPart2Countdown != 0 && (--_lockSymbolsPart2Countdown == 0) && isSymbolsPart2Solved()) {
+ for (int i = 3; i < 6; i++)
+ _asSymbols[i]->hide();
+ if (!getGlobalVar(V_ROBOT_HIT) || getGlobalVar(V_CANNON_RAISED) || getGlobalVar(V_CANNON_TURNED)) {
+ _ssSymbolEdges[1]->show();
+ _ssTargetLines[1]->show();
+ _asHorizontalIndicator->show();
+ }
+ }
+
+}
+
+uint32 Scene3009::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && !getGlobalVar(V_CANNON_RAISED)) {
+ setGlobalVar(V_CANNON_TARGET_STATUS, 0);
+ leaveScene(0);
+ }
+ break;
+ case 0x2000:
+ if (!getGlobalVar(V_CANNON_RAISED)) {
+ if (!getGlobalVar(V_WALL_BROKEN)) {
+ _cannonTargetStatus = kCTSBreakWall;
+ setGlobalVar(V_WALL_BROKEN, 1);
+ } else {
+ _cannonTargetStatus = kCTSWall;
+ }
+ } else if (!getGlobalVar(V_CANNON_TURNED)) {
+ _cannonTargetStatus = kCTSEmptyness;
+ } else if (!getGlobalVar(V_ROBOT_TARGET)) {
+ _cannonTargetStatus = kCTSFireRobotNoTarget;
+ } else if (!getGlobalVar(V_ROBOT_HIT)) {
+ setGlobalVar(V_ROBOT_HIT, 1);
+ _cannonTargetStatus = kCTSFireRobotIsTarget;
+ } else {
+ _cannonTargetStatus = kCTSFireNoRobot;
+ }
+ playActionVideo();
+ break;
+ case 0x2001:
+ _lockSymbolsPart1Countdown = 24;
+ break;
+ case 0x2002:
+ // Raise/lower the cannon
+ if (!getGlobalVar(V_CANNON_TURNED) && !_isTurning) {
+ if (getGlobalVar(V_CANNON_RAISED)) {
+ _cannonTargetStatus = kCTSLowerCannon;
+ setGlobalVar(V_CANNON_RAISED, 0);
+ } else {
+ _cannonTargetStatus = kCTSRaiseCannon;
+ setGlobalVar(V_CANNON_RAISED, 1);
+ }
+ playActionVideo();
+ }
+ break;
+ case 0x2003:
+ _lockSymbolsPart2Countdown = 24;
+ break;
+ case 0x2004:
+ // Turn the cannon if it's raised
+ if (getGlobalVar(V_CANNON_RAISED)) {
+ if (!getGlobalVar(V_CANNON_TURNED)) {
+ // Cannon is at the left position
+ if (!getGlobalVar(V_ROBOT_TARGET)) {
+ _cannonTargetStatus = kCTSRightRobotNoTarget;
+ } else if (!getGlobalVar(V_ROBOT_HIT)) {
+ _cannonTargetStatus = kCTSRightRobotIsTarget;
+ } else {
+ _cannonTargetStatus = kCTSRightNoRobot;
+ }
+ setGlobalVar(V_CANNON_TURNED, 1);
+ _isTurning = true;
+ playActionVideo();
+ } else {
+ // Cannon is at the right position
+ if (!getGlobalVar(V_ROBOT_TARGET)) {
+ _cannonTargetStatus = kCTSLeftRobotNoTarget;
+ openSmacker(0x108A000F, false);
+ } else if (!getGlobalVar(V_ROBOT_HIT)) {
+ _cannonTargetStatus = kCTSLeftRobotIsTarget;
+ openSmacker(0x500B002F, false);
+ } else {
+ _cannonTargetStatus = kCTSLeftNoRobot;
+ openSmacker(0x100B008E, false);
+ }
+ _moveCannonLeftFirst = true;
+ _isTurning = true;
+ _keepVideo = false;
+ setGlobalVar(V_CANNON_TURNED, 0);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+void Scene3009::playActionVideo() {
+ setGlobalVar(V_CANNON_TARGET_STATUS, _cannonTargetStatus);
+ setGlobalVar(V_CANNON_SMACKER_NAME, kScene3009CannonActionVideos[_cannonTargetStatus]);
+ leaveScene(1);
+}
+
+bool Scene3009::isSymbolsPart1Solved() {
+ for (int i = 0; i < 3; i++)
+ if (_correctSymbols[i] != getSubVar(VA_CURR_CANNON_SYMBOLS, i))
+ return false;
+ return true;
+}
+
+bool Scene3009::isSymbolsPart2Solved() {
+ for (int i = 3; i < 6; i++)
+ if (_correctSymbols[i] != getSubVar(VA_CURR_CANNON_SYMBOLS, i))
+ return false;
+ return true;
+}
+
+bool Scene3009::isTurning() {
+ return _isTurning;
+}
+
+// Scene3010
+
+static const uint32 kScene3010ButtonNameHashes[] = {
+ 0x304008D2,
+ 0x40119852,
+ 0x01180951
+};
+
+static const uint32 kScene3010DeadBoltButtonFileHashes1[] = {
+ 0x301024C2,
+ 0x20280580,
+ 0x30200452
+};
+
+static const uint32 kScene3010DeadBoltButtonFileHashes2[] = {
+ 0x50C025A8,
+ 0x1020A0A0,
+ 0x5000A7E8
+};
+
+static const NPoint kAsScene3010DeadBoltPoints[] = {
+ {550, 307},
+ {564, 415},
+ {560, 514}
+};
+
+static const uint32 kAsScene3010DeadBoltFileHashes2[] = {
+ 0x181A0042,
+ 0x580A08F2,
+ 0x18420076
+};
+
+static const uint32 kAsScene3010DeadBoltFileHashes1[] = {
+ 0x300E105A,
+ 0x804E0052,
+ 0x040E485A
+};
+
+SsScene3010DeadBoltButton::SsScene3010DeadBoltButton(NeverhoodEngine *vm, Scene *parentScene, int buttonIndex, int initCountdown, bool initDisabled)
+ : StaticSprite(vm, 900), _parentScene(parentScene), _buttonLocked(false), _countdown1(0), _countdown2(0), _buttonIndex(buttonIndex) {
+
+ _buttonEnabled = getSubVar(VA_LOCKS_DISABLED, kScene3010ButtonNameHashes[_buttonIndex]) != 0;
+ createSurface(400, 88, 95);
+ setSprite(kScene3010DeadBoltButtonFileHashes2[_buttonIndex]);
+ if (initDisabled)
+ disableButton();
+ else if (_buttonEnabled)
+ _countdown1 = initCountdown * 12 + 1;
+ loadSound(0, 0xF4217243);
+ loadSound(1, 0x44049000);
+ loadSound(2, 0x6408107E);
+ SetUpdateHandler(&SsScene3010DeadBoltButton::update);
+ SetMessageHandler(&SsScene3010DeadBoltButton::handleMessage);
+}
+
+void SsScene3010DeadBoltButton::update() {
+
+ if (_countdown1 != 0 && (--_countdown1 == 0)) {
+ playSound(0);
+ setVisible(false);
+ setSprite(kScene3010DeadBoltButtonFileHashes1[_buttonIndex]);
+ }
+
+ if (_countdown2 != 0 && (--_countdown2 == 0)) {
+ setVisible(true);
+ setSprite(kScene3010DeadBoltButtonFileHashes2[_buttonIndex]);
+ }
+
+}
+
+uint32 SsScene3010DeadBoltButton::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (!_buttonLocked && _countdown1 == 0) {
+ if (_buttonEnabled) {
+ playSound(1);
+ playSound(2);
+ setVisible(true);
+ _buttonLocked = true;
+ sendMessage(_parentScene, 0x2000, _buttonIndex);
+ } else {
+ sendMessage(_parentScene, 0x2002, _buttonIndex);
+ }
+ _needRefresh = true;
+ updatePosition();
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+void SsScene3010DeadBoltButton::disableButton() {
+ _buttonLocked = true;
+ setSprite(kScene3010DeadBoltButtonFileHashes1[_buttonIndex]);
+ setVisible(true);
+}
+
+void SsScene3010DeadBoltButton::setSprite(uint32 fileHash) {
+ loadSprite(fileHash, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset);
+}
+
+void SsScene3010DeadBoltButton::setCountdown(int count) {
+ _countdown2 = count * 18 + 1;
+}
+
+AsScene3010DeadBolt::AsScene3010DeadBolt(NeverhoodEngine *vm, Scene *parentScene, int boltIndex, bool initUnlocked)
+ : AnimatedSprite(vm, 1100), _parentScene(parentScene), _boltIndex(boltIndex), _soundToggle(true),
+ _unlocked(false), _locked(false), _countdown(0) {
+
+ _x = kAsScene3010DeadBoltPoints[_boltIndex].x;
+ _y = kAsScene3010DeadBoltPoints[_boltIndex].y;
+
+ if (getSubVar(VA_LOCKS_DISABLED, kScene3010ButtonNameHashes[_boltIndex])) {
+ createSurface1(kAsScene3010DeadBoltFileHashes1[_boltIndex], 1200);
+ startAnimation(kAsScene3010DeadBoltFileHashes1[_boltIndex], 0, -1);
+ loadSound(0, 0x46005BC4);
+ } else {
+ createSurface1(kAsScene3010DeadBoltFileHashes2[_boltIndex], 1200);
+ startAnimation(kAsScene3010DeadBoltFileHashes2[_boltIndex], 0, -1);
+ loadSound(0, 0x420073DC);
+ loadSound(1, 0x420073DC);
+ }
+
+ setVisible(false);
+ stIdle();
+ if (initUnlocked)
+ unlock(true);
+
+ _needRefresh = true;
+ AnimatedSprite::updatePosition();
+
+}
+
+void AsScene3010DeadBolt::update() {
+ updateAnim();
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ stDisabled();
+ }
+}
+
+uint32 AsScene3010DeadBolt::hmAnimation(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x3002:
+ gotoNextState();
+ break;
+ }
+ return messageResult;
+}
+
+void AsScene3010DeadBolt::stIdle() {
+ stopAnimation();
+ SetUpdateHandler(&AsScene3010DeadBolt::update);
+ SetMessageHandler(&Sprite::handleMessage);
+ _locked = false;
+}
+
+void AsScene3010DeadBolt::unlock(bool skipAnim) {
+ if (!_unlocked) {
+ setVisible(true);
+ if (skipAnim) {
+ startAnimation(kAsScene3010DeadBoltFileHashes1[_boltIndex], -1, 0);
+ _newStickFrameIndex = STICK_LAST_FRAME;
+ } else {
+ startAnimation(kAsScene3010DeadBoltFileHashes1[_boltIndex], 0, -1);
+ SetMessageHandler(&AsScene3010DeadBolt::hmAnimation);
+ FinalizeState(&AsScene3010DeadBolt::stIdleMessage);
+ NextState(&AsScene3010DeadBolt::stIdle);
+ playSound(0);
+ }
+ _unlocked = true;
+ loadSound(2, 0x4010C345);
+ }
+}
+
+void AsScene3010DeadBolt::stIdleMessage() {
+ stopAnimation();
+ SetMessageHandler(&Sprite::handleMessage);
+ sendMessage(_parentScene, 0x2001, _boltIndex);
+}
+
+void AsScene3010DeadBolt::lock() {
+ if (!_locked) {
+ _locked = true;
+ setVisible(true);
+ startAnimation(kAsScene3010DeadBoltFileHashes2[_boltIndex], 0, -1);
+ SetMessageHandler(&AsScene3010DeadBolt::hmAnimation);
+ FinalizeState(&AsScene3010DeadBolt::stDisabledMessage);
+ NextState(&AsScene3010DeadBolt::stIdle);
+ if (_soundToggle) {
+ playSound(0);
+ } else {
+ playSound(1);
+ }
+ _soundToggle = !_soundToggle;
+ }
+}
+
+void AsScene3010DeadBolt::setCountdown(int count) {
+ _countdown = count * 18 + 1;
+}
+
+void AsScene3010DeadBolt::stDisabled() {
+ setVisible(true);
+ startAnimation(kAsScene3010DeadBoltFileHashes1[_boltIndex], 0, -1);
+ SetMessageHandler(&AsScene3010DeadBolt::hmAnimation);
+ FinalizeState(&AsScene3010DeadBolt::stDisabledMessage);
+ NextState(&AsScene3010DeadBolt::stIdle);
+ _playBackwards = true;
+ playSound(2);
+}
+
+void AsScene3010DeadBolt::stDisabledMessage() {
+ setVisible(false);
+ sendMessage(_parentScene, 0x2003, _boltIndex);
+}
+
+Scene3010::Scene3010(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _countdown(0), _doorUnlocked(false), _checkUnlocked(false) {
+
+ int initCountdown = 0;
+
+ setBackground(0x80802626);
+ setPalette(0x80802626);
+
+ for (int i = 0; i < 3; i++) {
+ _asDeadBolts[i] = insertSprite<AsScene3010DeadBolt>(this, i, which == 1);//CHECKME
+ _ssDeadBoltButtons[i] = insertSprite<SsScene3010DeadBoltButton>(this, i, initCountdown, which == 1);//CHECKME
+ addCollisionSprite(_ssDeadBoltButtons[i]);
+ if (getSubVar(VA_LOCKS_DISABLED, kScene3010ButtonNameHashes[i]))
+ initCountdown++;
+ _boltUnlocking[i] = false;
+ _boltUnlocked[i] = false;
+ }
+
+ if (which == 0) {
+ insertPuzzleMouse(0x02622800, 20, 620);
+ }
+
+ loadSound(0, 0x68E25540);
+
+ SetMessageHandler(&Scene3010::handleMessage);
+ SetUpdateHandler(&Scene3010::update);
+
+ if (which == 1) {
+ _checkUnlocked = true;
+ for (int i = 0; i < 3; i++) {
+ _boltUnlocked[i] = true;
+ _ssDeadBoltButtons[i]->setCountdown(i + 1);
+ _asDeadBolts[i]->setCountdown(i + 1);
+ }
+ }
+
+}
+
+void Scene3010::update() {
+ Scene::update();
+ if (_checkUnlocked && !_boltUnlocked[0] && !_boltUnlocked[1] && !_boltUnlocked[2]) {
+ _countdown = 24;
+ _checkUnlocked = false;
+ }
+ if (_countdown != 0 && (--_countdown == 0)) {
+ leaveScene(_doorUnlocked ? 1 : 0);
+ }
+}
+
+uint32 Scene3010::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if ((param.asPoint().x <= 20 || param.asPoint().x >= 620) && _countdown == 0 && !_checkUnlocked) {
+ if (!_boltUnlocking[0] && !_boltUnlocking[1] && !_boltUnlocking[2]) {
+ showMouse(false);
+ if (!_boltUnlocked[0] && !_boltUnlocked[1] && !_boltUnlocked[2]) {
+ _countdown = 1;
+ } else {
+ _checkUnlocked = true;
+ for (int i = 0; i < 3; i++) {
+ _ssDeadBoltButtons[i]->setCountdown(i);
+ if (_boltUnlocked[i]) {
+ _asDeadBolts[i]->setCountdown(i);
+ }
+ }
+ }
+ }
+ }
+ break;
+ case 0x2000:
+ if (!_boltUnlocked[param.asInteger()] && !_checkUnlocked && _countdown == 0) {
+ _asDeadBolts[param.asInteger()]->unlock(false);
+ _boltUnlocking[param.asInteger()] = true;
+ }
+ break;
+ case 0x2001:
+ _boltUnlocked[param.asInteger()] = true;
+ _boltUnlocking[param.asInteger()] = false;
+ if (_boltUnlocked[0] && _boltUnlocked[1] && _boltUnlocked[2]) {
+ if (!getGlobalVar(V_BOLT_DOOR_UNLOCKED)) {
+ setGlobalVar(V_BOLT_DOOR_UNLOCKED, 1);
+ playSound(0);
+ _countdown = 60;
+ } else {
+ _countdown = 48;
+ }
+ _doorUnlocked = true;
+ }
+ break;
+ case 0x2002:
+ if (!_checkUnlocked && _countdown == 0) {
+ _asDeadBolts[param.asInteger()]->lock();
+ }
+ break;
+ case 0x2003:
+ _boltUnlocked[param.asInteger()] = false;
+ break;
+ }
+ return 0;
+}
+
+// Scene3011
+
+static const uint32 kAsScene3011SymbolFileHashes[] = {
+ 0x00C88050,
+ 0x01488050,
+ 0x02488050,
+ 0x04488050,
+ 0x08488050,
+ 0x10488050,
+ 0x20488050,
+ 0x40488050,
+ 0x80488050,
+ 0x00488051,
+ 0x00488052,
+ 0x00488054,
+ 0x008B0000,
+ 0x008D0000,
+ 0x00810000,
+ 0x00990000,
+ 0x00A90000,
+ 0x00C90000,
+ 0x00090000,
+ 0x01890000,
+ 0x02890000,
+ 0x04890000,
+ 0x08890000,
+ 0x10890000
+};
+
+SsScene3011Button::SsScene3011Button(NeverhoodEngine *vm, Scene *parentScene, bool flag)
+ : StaticSprite(vm, 1400), _parentScene(parentScene), _countdown(0) {
+
+ loadSprite(flag ? 0x11282020 : 0x994D0433, kSLFDefDrawOffset | kSLFDefPosition | kSLFDefCollisionBoundsOffset, 400);
+ setVisible(false);
+ loadSound(0, 0x44061000);
+ SetUpdateHandler(&SsScene3011Button::update);
+ SetMessageHandler(&SsScene3011Button::handleMessage);
+}
+
+void SsScene3011Button::update() {
+ updatePosition();
+ if (_countdown != 0 && (--_countdown == 0)) {
+ setVisible(false);
+ }
+}
+
+uint32 SsScene3011Button::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = 0;
+ StaticSprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x1011:
+ if (_countdown == 0) {
+ setVisible(true);
+ _countdown = 4;
+ sendMessage(_parentScene, 0x2000, 0);
+ playSound(0);
+ }
+ messageResult = 1;
+ break;
+ }
+ return messageResult;
+}
+
+AsScene3011Symbol::AsScene3011Symbol(NeverhoodEngine *vm, int symbolIndex, bool largeSymbol)
+ : AnimatedSprite(vm, 1000), _symbolIndex(symbolIndex), _largeSymbol(largeSymbol), _isNoisy(false) {
+
+ if (_largeSymbol) {
+ _x = 310;
+ _y = 200;
+ createSurface1(kAsScene3011SymbolFileHashes[_symbolIndex], 1200);
+ loadSound(0, 0x6052C60F);
+ loadSound(1, 0x6890433B);
+ } else {
+ _symbolIndex = 12;
+ _x = symbolIndex * 39 + 96;
+ _y = 225;
+ createSurface(1200, 41, 48);
+ loadSound(0, 0x64428609);
+ loadSound(1, 0x7080023B);
+ }
+ setVisible(false);
+ _needRefresh = true;
+ SetUpdateHandler(&AnimatedSprite::update);
+}
+
+void AsScene3011Symbol::show(bool isNoisy) {
+ _isNoisy = isNoisy;
+ startAnimation(kAsScene3011SymbolFileHashes[_symbolIndex], 0, -1);
+ setVisible(true);
+ if (_isNoisy) {
+ playSound(1);
+ } else {
+ playSound(0);
+ }
+}
+
+void AsScene3011Symbol::hide() {
+ stopAnimation();
+ setVisible(false);
+}
+
+void AsScene3011Symbol::stopSymbolSound() {
+ if (_isNoisy) {
+ stopSound(1);
+ } else {
+ stopSound(0);
+ }
+}
+
+void AsScene3011Symbol::change(int symbolIndex, bool isNoisy) {
+ _symbolIndex = symbolIndex;
+ _isNoisy = isNoisy;
+ startAnimation(kAsScene3011SymbolFileHashes[_symbolIndex], 0, -1);
+ setVisible(true);
+ if (_isNoisy) {
+ playSound(1);
+ } else {
+ playSound(0);
+ }
+}
+
+Scene3011::Scene3011(NeverhoodEngine *vm, Module *parentModule, int which)
+ : Scene(vm, parentModule), _updateStatus(0), _buttonClicked(false), _currentSymbolIndex(0), _countdown(0) {
+
+ _vm->gameModule()->initCodeSymbolsPuzzle();
+ _noisySymbolIndex = getGlobalVar(V_NOISY_SYMBOL_INDEX);
+
+ SetMessageHandler(&Scene3011::handleMessage);
+ SetUpdateHandler(&Scene3011::update);
+
+ setBackground(0x92124A04);
+ setPalette(0xA4070114);
+ addEntity(_palette);
+
+ insertPuzzleMouse(0x24A00929, 20, 620);
+
+ for (int symbolIndex = 0; symbolIndex < 12; symbolIndex++)
+ _asSymbols[symbolIndex] = insertSprite<AsScene3011Symbol>(symbolIndex, true);
+
+ _ssButton = insertSprite<SsScene3011Button>(this, true);
+ addCollisionSprite(_ssButton);
+
+}
+
+void Scene3011::update() {
+ Scene::update();
+
+ if (_countdown != 0 && (--_countdown == 0)) {
+ switch (_updateStatus) {
+ case 0:
+ if (_buttonClicked) {
+ if (_noisySymbolIndex == _currentSymbolIndex) {
+ do {
+ _noisyRandomSymbolIndex = _vm->_rnd->getRandomNumber(12 - 1);
+ } while (_noisySymbolIndex == _noisyRandomSymbolIndex);
+ _asSymbols[getSubVar(VA_CODE_SYMBOLS, _noisyRandomSymbolIndex)]->show(true);
+ } else {
+ _asSymbols[getSubVar(VA_CODE_SYMBOLS, _currentSymbolIndex)]->show(false);
+ }
+ _updateStatus = 1;
+ _countdown = 24;
+ fadeIn();
+ _buttonClicked = false;
+ }
+ break;
+ case 1:
+ _updateStatus = 2;
+ _countdown = 24;
+ break;
+ case 2:
+ fadeOut();
+ _updateStatus = 3;
+ _countdown = 24;
+ break;
+ case 3:
+ _updateStatus = 0;
+ _countdown = 1;
+ if (_noisySymbolIndex == _currentSymbolIndex) {
+ _asSymbols[getSubVar(VA_CODE_SYMBOLS, _noisyRandomSymbolIndex)]->hide();
+ } else {
+ _asSymbols[getSubVar(VA_CODE_SYMBOLS, _currentSymbolIndex)]->hide();
+ }
+ _currentSymbolIndex++;
+ if (_currentSymbolIndex >= 12)
+ _currentSymbolIndex = 0;
+ break;
+ }
+ }
+}
+
+uint32 Scene3011::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0001:
+ if (param.asPoint().x <= 20 || param.asPoint().x >= 620) {
+ leaveScene(0);
+ }
+ break;
+ case 0x2000:
+ _buttonClicked = true;
+ if (_countdown == 0)
+ _countdown = 1;
+ break;
+ }
+ return 0;
+}
+
+void Scene3011::fadeIn() {
+ _palette->addBasePalette(0x92124A04, 0, 256, 0);
+ _palette->startFadeToPalette(24);
+}
+
+void Scene3011::fadeOut() {
+ _palette->addBasePalette(0xA4070114, 0, 256, 0);
+ _palette->startFadeToPalette(24);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/modules/module3000.h b/engines/neverhood/modules/module3000.h
new file mode 100644
index 0000000000..797be1885f
--- /dev/null
+++ b/engines/neverhood/modules/module3000.h
@@ -0,0 +1,257 @@
+/* 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 NEVERHOOD_MODULES_MODULE3000_H
+#define NEVERHOOD_MODULES_MODULE3000_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/module.h"
+#include "neverhood/scene.h"
+#include "neverhood/modules/module1200.h"
+
+namespace Neverhood {
+
+class Module3000 : public Module {
+public:
+ Module3000(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Module3000();
+protected:
+ int _soundVolume;
+ bool _isWallBroken;
+ void createScene(int sceneNum, int which);
+ void updateScene();
+};
+
+// Scene3009
+
+class Scene3009;
+
+class SsScene3009FireCannonButton : public StaticSprite {
+public:
+ SsScene3009FireCannonButton(NeverhoodEngine *vm, Scene3009 *parentScene);
+protected:
+ Scene3009 *_parentScene;
+ bool _isClicked;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene3009SymbolEdges : public StaticSprite {
+public:
+ SsScene3009SymbolEdges(NeverhoodEngine *vm, int index);
+ void show();
+ void hide();
+ void startBlinking();
+protected:
+ int _blinkCountdown;
+ bool _blinkToggle;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class SsScene3009TargetLine : public StaticSprite {
+public:
+ SsScene3009TargetLine(NeverhoodEngine *vm, int index);
+ void show();
+};
+
+class SsScene3009SymbolArrow : public StaticSprite {
+public:
+ SsScene3009SymbolArrow(NeverhoodEngine *vm, Sprite *asSymbol, int index);
+ void hide();
+protected:
+ Sprite *_asSymbol;
+ int _index;
+ int _incrDecr;
+ bool _enabled;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene3009VerticalIndicator : public AnimatedSprite {
+public:
+ AsScene3009VerticalIndicator(NeverhoodEngine *vm, Scene3009 *parentScene, int index);
+ void show();
+protected:
+ Scene3009 *_parentScene;
+ bool _enabled;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene3009HorizontalIndicator : public AnimatedSprite {
+public:
+ AsScene3009HorizontalIndicator(NeverhoodEngine *vm, Scene3009 *parentScene, uint32 cannonTargetStatus);
+ void show();
+ void stMoveLeft();
+ void stMoveRight();
+protected:
+ Scene3009 *_parentScene;
+ bool _enabled;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void suMoveLeft();
+ void suMoveRight();
+};
+
+class AsScene3009Symbol : public AnimatedSprite {
+public:
+ AsScene3009Symbol(NeverhoodEngine *vm, Scene3009 *parentScene, int symbolPosition);
+ void hide();
+protected:
+ Scene3009 *_parentScene;
+ int _symbolPosition;
+ uint32 _symbolIndex;
+ SsScene3009SymbolArrow *_ssArrowPrev;
+ SsScene3009SymbolArrow *_ssArrowNext;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class Scene3009 : public Scene {
+public:
+ Scene3009(NeverhoodEngine *vm, Module *parentModule, int which);
+ virtual ~Scene3009();
+ bool isTurning();
+protected:
+ int _lockSymbolsPart1Countdown;
+ int _lockSymbolsPart2Countdown;
+ SmackerPlayer *_cannonSmackerPlayer;
+ Sprite *_ssFireCannonButton;
+ SsScene3009SymbolEdges *_ssSymbolEdges[2];
+ SsScene3009TargetLine *_ssTargetLines[2];
+ AsScene3009VerticalIndicator *_asVerticalIndicator;
+ AsScene3009HorizontalIndicator *_asHorizontalIndicator;
+ AsScene3009Symbol *_asSymbols[6];
+ uint32 _cannonTargetStatus;
+ uint32 _correctSymbols[6];
+ bool _keepVideo;
+ bool _moveCannonLeftFirst;
+ bool _isTurning;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void playActionVideo();
+ bool isSymbolsPart1Solved();
+ bool isSymbolsPart2Solved();
+ void openSmacker(uint32 fileHash, bool keepLastFrame);
+};
+
+// Scene3010
+
+class SsScene3010DeadBoltButton : public StaticSprite {
+public:
+ SsScene3010DeadBoltButton(NeverhoodEngine *vm, Scene *parentScene, int buttonIndex, int initCountdown, bool initDisabled);
+ void setCountdown(int count);
+protected:
+ Scene *_parentScene;
+ int _buttonIndex;
+ bool _buttonEnabled;
+ bool _buttonLocked;
+ int _countdown1;
+ int _countdown2;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void disableButton();
+ void setSprite(uint32 fileHash);
+};
+
+class AsScene3010DeadBolt : public AnimatedSprite {
+public:
+ AsScene3010DeadBolt(NeverhoodEngine *vm, Scene *parentScene, int boltIndex, bool initUnlocked);
+ void setCountdown(int count);
+ void lock();
+ void unlock(bool skipAnim);
+protected:
+ Scene *_parentScene;
+ int _boltIndex;
+ int _countdown;
+ bool _soundToggle;
+ bool _unlocked;
+ bool _locked;
+ void update();
+ uint32 hmAnimation(int messageNum, const MessageParam &param, Entity *sender);
+ void stIdle();
+ void stIdleMessage();
+ void stDisabled();
+ void stDisabledMessage();
+};
+
+class Scene3010 : public Scene {
+public:
+ Scene3010(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ int _countdown;
+ bool _doorUnlocked;
+ bool _checkUnlocked;
+ SsScene3010DeadBoltButton *_ssDeadBoltButtons[3];
+ AsScene3010DeadBolt *_asDeadBolts[3];
+ bool _boltUnlocked[3];
+ bool _boltUnlocking[3];
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+// Scene3011
+
+class SsScene3011Button : public StaticSprite {
+public:
+ SsScene3011Button(NeverhoodEngine *vm, Scene *parentScene, bool flag);
+protected:
+ Scene *_parentScene;
+ int _countdown;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+class AsScene3011Symbol : public AnimatedSprite {
+public:
+ AsScene3011Symbol(NeverhoodEngine *vm, int symbolIndex, bool largeSymbol);
+ void show(bool isNoisy);
+ void hide();
+ void stopSymbolSound();
+ void change(int symbolIndex, bool isNoisy);
+ int getSymbolIndex() { return _largeSymbol ? _symbolIndex : _symbolIndex - 12; }
+protected:
+ bool _largeSymbol;
+ bool _isNoisy;
+ int _symbolIndex;
+};
+
+class Scene3011 : public Scene {
+public:
+ Scene3011(NeverhoodEngine *vm, Module *parentModule, int which);
+protected:
+ Sprite *_ssButton;
+ AsScene3011Symbol *_asSymbols[12];
+ int _updateStatus;
+ bool _buttonClicked;
+ int _countdown;
+ int _noisySymbolIndex;
+ int _currentSymbolIndex;
+ int _noisyRandomSymbolIndex;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void fadeIn();
+ void fadeOut();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MODULES_MODULE3000_H */
diff --git a/engines/neverhood/mouse.cpp b/engines/neverhood/mouse.cpp
new file mode 100644
index 0000000000..632f56fb74
--- /dev/null
+++ b/engines/neverhood/mouse.cpp
@@ -0,0 +1,256 @@
+/* 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 "neverhood/mouse.h"
+#include "graphics/cursorman.h"
+
+namespace Neverhood {
+
+Mouse::Mouse(NeverhoodEngine *vm, uint32 fileHash, const NRect &mouseRect)
+ : StaticSprite(vm, 2000), _mouseType(kMouseType433),
+ _mouseCursorResource(vm), _frameNum(0) {
+
+ _mouseRect = mouseRect;
+ init(fileHash);
+ if (_x >= _mouseRect.x1 && _x <= _mouseRect.x2 &&
+ _y >= _mouseRect.y1 && _y <= _mouseRect.y2) {
+ _mouseCursorResource.setCursorNum(1);
+ } else {
+ _mouseCursorResource.setCursorNum(4);
+ }
+ updateCursor();
+}
+
+Mouse::Mouse(NeverhoodEngine *vm, uint32 fileHash, int16 x1, int16 x2)
+ : StaticSprite(vm, 2000), _mouseType(kMouseType435),
+ _mouseCursorResource(vm), _frameNum(0), _x1(x1), _x2(x2) {
+
+ init(fileHash);
+ if (_x <= _x1) {
+ _mouseCursorResource.setCursorNum(6);
+ } else if (_x >= _x2) {
+ _mouseCursorResource.setCursorNum(5);
+ } else {
+ _mouseCursorResource.setCursorNum(4);
+ }
+ updateCursor();
+}
+
+Mouse::Mouse(NeverhoodEngine *vm, uint32 fileHash, int type)
+ : StaticSprite(vm, 2000), _mouseType(kMouseTypeNavigation),
+ _mouseCursorResource(vm), _type(type), _frameNum(0) {
+
+ init(fileHash);
+ _mouseCursorResource.setCursorNum(0);
+}
+
+Mouse::~Mouse() {
+ CursorMan.showMouse(false);
+}
+
+void Mouse::init(uint32 fileHash) {
+ _mouseCursorResource.load(fileHash);
+ _x = _vm->getMouseX();
+ _y = _vm->getMouseY();
+ createSurface(2000, 32, 32);
+ SetUpdateHandler(&Mouse::update);
+ SetMessageHandler(&Mouse::handleMessage);
+ _drawOffset.x = 0;
+ _drawOffset.y = 0;
+ _drawOffset.width = 32;
+ _drawOffset.height = 32;
+ _collisionBoundsOffset = _drawOffset;
+ updateBounds();
+ _needRefresh = true;
+ CursorMan.showMouse(false);
+}
+
+void Mouse::load(uint32 fileHash) {
+ _mouseCursorResource.load(fileHash);
+ _needRefresh = true;
+}
+
+void Mouse::update() {
+ if (CursorMan.isVisible() && !_surface->getVisible()) {
+ CursorMan.showMouse(false);
+ } else if (!CursorMan.isVisible() && _surface->getVisible()) {
+ CursorMan.showMouse(true);
+ }
+ updateCursor();
+ _frameNum++;
+ if (_frameNum >= 6)
+ _frameNum = 0;
+ _needRefresh = _frameNum % 2 == 0;
+}
+
+uint32 Mouse::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ debug(7, "Mouse::handleMessage(%04X)", messageNum);
+ uint32 messageResult = Sprite::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x2064:
+ _x = param.asPoint().x;
+ _y = param.asPoint().y;
+ switch (_type) {
+ case 1:
+ if (_x >= 320)
+ messageResult = 1;
+ else
+ messageResult = 0;
+ break;
+ case 2:
+ default:
+ if (_x < 100)
+ messageResult = 0;
+ else if (_x > 540)
+ messageResult = 1;
+ else
+ messageResult = 2;
+ break;
+ case 3:
+ if (_x < 100)
+ messageResult = 0;
+ else if (_x > 540)
+ messageResult = 1;
+ else
+ messageResult = 4;
+ break;
+ case 4:
+ if (_x < 100)
+ messageResult = 0;
+ else if (_x > 540)
+ messageResult = 1;
+ else if (_y >= 150)
+ messageResult = 2;
+ else
+ messageResult = 3;
+ break;
+ case 5:
+ if (_y >= 240)
+ messageResult = 4;
+ else
+ messageResult = 3;
+ break;
+ }
+ break;
+ case 0x4002:
+ _x = param.asPoint().x;
+ _y = param.asPoint().y;
+ updateCursorNum();
+ updateBounds();
+ break;
+ }
+ return messageResult;
+}
+
+void Mouse::updateCursor() {
+
+ if (!_surface)
+ return;
+
+ if (_doDeltaX) {
+ _surface->getDrawRect().x = filterX(_x - _drawOffset.width - _drawOffset.x + 1);
+ } else {
+ _surface->getDrawRect().x = filterX(_x + _drawOffset.x);
+ }
+
+ if (_doDeltaY) {
+ _surface->getDrawRect().y = filterY(_y - _drawOffset.height - _drawOffset.y + 1);
+ } else {
+ _surface->getDrawRect().y = filterY(_y + _drawOffset.y);
+ }
+
+ if (_needRefresh) {
+ _needRefresh = false;
+ _drawOffset = _mouseCursorResource.getRect();
+ _surface->drawMouseCursorResource(_mouseCursorResource, _frameNum / 2);
+ Graphics::Surface *cursorSurface = _surface->getSurface();
+ CursorMan.replaceCursor((const byte*)cursorSurface->pixels,
+ cursorSurface->w, cursorSurface->h, -_drawOffset.x, -_drawOffset.y, 0);
+ }
+
+}
+
+void Mouse::updateCursorNum() {
+ switch (_mouseType) {
+ case kMouseType433:
+ if (_x >= _mouseRect.x1 && _x <= _mouseRect.x2 &&
+ _y >= _mouseRect.y1 && _y <= _mouseRect.y2) {
+ _mouseCursorResource.setCursorNum(1);
+ } else {
+ _mouseCursorResource.setCursorNum(4);
+ }
+ break;
+ case kMouseType435:
+ if (_x <= _x1) {
+ _mouseCursorResource.setCursorNum(6);
+ } else if (_x >= _x2) {
+ _mouseCursorResource.setCursorNum(5);
+ } else {
+ _mouseCursorResource.setCursorNum(4);
+ }
+ break;
+ case kMouseTypeNavigation:
+ switch (_type) {
+ case 1:
+ if (_x >= 320)
+ _mouseCursorResource.setCursorNum(5);
+ else
+ _mouseCursorResource.setCursorNum(6);
+ break;
+ case 2:
+ default:
+ if (_x < 100)
+ _mouseCursorResource.setCursorNum(6);
+ else if (_x > 540)
+ _mouseCursorResource.setCursorNum(5);
+ else
+ _mouseCursorResource.setCursorNum(0);
+ break;
+ case 3:
+ if (_x < 100)
+ _mouseCursorResource.setCursorNum(1);
+ else if (_x > 540)
+ _mouseCursorResource.setCursorNum(1);
+ break;
+ case 4:
+ if (_x < 100)
+ _mouseCursorResource.setCursorNum(6);
+ else if (_x > 540)
+ _mouseCursorResource.setCursorNum(5);
+ else if (_y >= 150)
+ _mouseCursorResource.setCursorNum(0);
+ else
+ _mouseCursorResource.setCursorNum(3);
+ break;
+ case 5:
+ if (_y >= 240)
+ _mouseCursorResource.setCursorNum(2);
+ else
+ _mouseCursorResource.setCursorNum(3);
+ break;
+ }
+ break;
+ }
+
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/mouse.h b/engines/neverhood/mouse.h
new file mode 100644
index 0000000000..0b927de4df
--- /dev/null
+++ b/engines/neverhood/mouse.h
@@ -0,0 +1,63 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_MOUSE_H
+#define NEVERHOOD_MOUSE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/sprite.h"
+#include "neverhood/graphics.h"
+#include "neverhood/resource.h"
+
+namespace Neverhood {
+
+enum MouseType {
+ kMouseType433,
+ kMouseType435,
+ kMouseTypeNavigation
+};
+
+class Mouse : public StaticSprite {
+public:
+ Mouse(NeverhoodEngine *vm, uint32 fileHash, const NRect &mouseRect);
+ Mouse(NeverhoodEngine *vm, uint32 fileHash, int16 x1, int16 x2);
+ Mouse(NeverhoodEngine *vm, uint32 fileHash, int _type);
+ virtual ~Mouse();
+ void load(uint32 fileHash);
+ void updateCursor();
+protected:
+ MouseType _mouseType;
+ MouseCursorResource _mouseCursorResource;
+ int _frameNum;
+ NRect _mouseRect;
+ int16 _x1;
+ int16 _x2;
+ int _type;
+ void init(uint32 fileHash);
+ void update();
+ void updateCursorNum();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_MOUSE_H */
diff --git a/engines/neverhood/navigationscene.cpp b/engines/neverhood/navigationscene.cpp
new file mode 100644
index 0000000000..33e2a264a8
--- /dev/null
+++ b/engines/neverhood/navigationscene.cpp
@@ -0,0 +1,216 @@
+/* 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 "neverhood/navigationscene.h"
+#include "neverhood/mouse.h"
+
+namespace Neverhood {
+
+NavigationScene::NavigationScene(NeverhoodEngine *vm, Module *parentModule, uint32 navigationListId, int navigationIndex, const byte *itemsTypes)
+ : Scene(vm, parentModule), _itemsTypes(itemsTypes), _navigationIndex(navigationIndex), _smackerDone(false),
+ _isWalkingForward(false), _isTurning(false), _smackerFileHash(0), _interactive(true), _leaveSceneAfter(false) {
+
+ _navigationList = _vm->_staticData->getNavigationList(navigationListId);
+
+ if (_navigationIndex < 0) {
+ _navigationIndex = (int)getGlobalVar(V_NAVIGATION_INDEX);
+ if (_navigationIndex >= (int)_navigationList->size())
+ _navigationIndex = 0;
+ }
+ setGlobalVar(V_NAVIGATION_INDEX, _navigationIndex);
+
+ SetUpdateHandler(&NavigationScene::update);
+ SetMessageHandler(&NavigationScene::handleMessage);
+
+ _smackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, (*_navigationList)[_navigationIndex].fileHash, true, true));
+
+ createMouseCursor();
+
+ _vm->_screen->clear();
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+
+ sendMessage(_parentModule, 0x100A, _navigationIndex);
+
+}
+
+NavigationScene::~NavigationScene() {
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ _vm->_soundMan->setSoundThreePlayFlag(false);
+}
+
+int NavigationScene::getNavigationAreaType() {
+ NPoint mousePos;
+ mousePos.x = _mouseCursor->getX();
+ mousePos.y = _mouseCursor->getY();
+ return sendPointMessage(_mouseCursor, 0x2064, mousePos);
+}
+
+void NavigationScene::update() {
+ if (_smackerFileHash != 0) {
+ showMouse(false);
+ _smackerPlayer->open(_smackerFileHash, false);
+ _vm->_screen->clear();
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ _smackerDone = false;
+ /*
+ if (!_interactive)
+ _smackerDone = true;
+ */
+ _smackerFileHash = 0;
+ } else if (_smackerDone) {
+ if (_leaveSceneAfter) {
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, _navigationIndex);
+ } else {
+ const NavigationItem &navigationItem = (*_navigationList)[_navigationIndex];
+ createMouseCursor();
+ showMouse(true);
+ _isTurning = false;
+ _isWalkingForward = false;
+ _interactive = true;
+ _vm->_soundMan->setTwoSoundsPlayFlag(false);
+ _vm->_soundMan->setSoundThreePlayFlag(false);
+ _smackerDone = false;
+ _smackerPlayer->open(navigationItem.fileHash, true);
+ _vm->_screen->clear();
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ sendMessage(_parentModule, 0x100A, _navigationIndex);
+ }
+ }
+ Scene::update();
+}
+
+uint32 NavigationScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x0000:
+ if (_interactive)
+ sendMessage(_mouseCursor, 0x4002, param);
+ break;
+ case 0x0001:
+ if (_interactive)
+ handleNavigation(param.asPoint());
+ break;
+ case 0x0009:
+ if (!_interactive)
+ _smackerDone = true;
+ break;
+ case 0x3002:
+ _smackerDone = true;
+ break;
+ }
+ return 0;
+}
+
+void NavigationScene::createMouseCursor() {
+
+ const NavigationItem &navigationItem = (*_navigationList)[_navigationIndex];
+ uint32 mouseCursorFileHash;
+ int areaType;
+
+ if (_mouseCursor) {
+ deleteSprite((Sprite**)&_mouseCursor);
+ }
+
+ mouseCursorFileHash = navigationItem.mouseCursorFileHash;
+ if (mouseCursorFileHash == 0)
+ mouseCursorFileHash = 0x63A40028;
+
+ if (_itemsTypes) {
+ areaType = _itemsTypes[_navigationIndex];
+ } else if (navigationItem.middleSmackerFileHash != 0 || navigationItem.middleFlag) {
+ areaType = 0;
+ } else {
+ areaType = 1;
+ }
+
+ insertNavigationMouse(mouseCursorFileHash, areaType);
+ sendPointMessage(_mouseCursor, 0x4002, _vm->getMousePos());
+
+}
+
+void NavigationScene::handleNavigation(const NPoint &mousePos) {
+
+ const NavigationItem &navigationItem = (*_navigationList)[_navigationIndex];
+ bool oldIsWalkingForward = _isWalkingForward;
+ bool oldIsTurning = _isTurning;
+ uint32 direction = sendPointMessage(_mouseCursor, 0x2064, mousePos);
+
+ switch (direction) {
+ case 0:
+ if (navigationItem.leftSmackerFileHash != 0) {
+ _smackerFileHash = navigationItem.leftSmackerFileHash;
+ _interactive = false;
+ _isWalkingForward = false;
+ _isTurning = true;
+ do {
+ _navigationIndex--;
+ if (_navigationIndex < 0)
+ _navigationIndex = _navigationList->size() - 1;
+ } while (!(*_navigationList)[_navigationIndex].interactive);
+ setGlobalVar(V_NAVIGATION_INDEX, _navigationIndex);
+ } else {
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, _navigationIndex);
+ }
+ break;
+ case 1:
+ if (navigationItem.rightSmackerFileHash != 0) {
+ _smackerFileHash = navigationItem.rightSmackerFileHash;
+ _interactive = false;
+ _isWalkingForward = false;
+ _isTurning = true;
+ do {
+ _navigationIndex++;
+ if (_navigationIndex >= (int)_navigationList->size())
+ _navigationIndex = 0;
+ } while (!(*_navigationList)[_navigationIndex].interactive);
+ setGlobalVar(V_NAVIGATION_INDEX, _navigationIndex);
+ } else {
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, _navigationIndex);
+ }
+ break;
+ case 2:
+ case 3:
+ case 4:
+ if (navigationItem.middleFlag) {
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, _navigationIndex);
+ } else if (navigationItem.middleSmackerFileHash != 0) {
+ _smackerFileHash = navigationItem.middleSmackerFileHash;
+ _interactive = false;
+ _isWalkingForward = true;
+ _isTurning = false;
+ _leaveSceneAfter = true;
+ }
+ break;
+ }
+
+ if (oldIsTurning != _isTurning)
+ _vm->_soundMan->setSoundThreePlayFlag(_isTurning);
+
+ if (oldIsWalkingForward != _isWalkingForward)
+ _vm->_soundMan->setTwoSoundsPlayFlag(_isWalkingForward);
+
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/navigationscene.h b/engines/neverhood/navigationscene.h
new file mode 100644
index 0000000000..ebe9a3597c
--- /dev/null
+++ b/engines/neverhood/navigationscene.h
@@ -0,0 +1,60 @@
+/* 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 NEVERHOOD_NAVIGATIONSCENE_H
+#define NEVERHOOD_NAVIGATIONSCENE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class NavigationScene : public Scene {
+public:
+ NavigationScene(NeverhoodEngine *vm, Module *parentModule, uint32 navigationListId, int navigationIndex, const byte *itemsTypes);
+ virtual ~NavigationScene();
+ int getNavigationAreaType();
+ int getNavigationIndex() const { return _navigationIndex; }
+ bool isWalkingForward() const { return _isWalkingForward; }
+ bool isTurning() const { return _isTurning; }
+ int getFrameNumber() const { return _smackerPlayer->getFrameNumber(); }
+protected:
+ SmackerPlayer *_smackerPlayer;
+ bool _smackerDone;
+ NavigationList *_navigationList;
+ int _navigationIndex;
+ uint32 _smackerFileHash;
+ bool _interactive;
+ bool _isWalkingForward;
+ bool _isTurning;
+ bool _leaveSceneAfter;
+ const byte *_itemsTypes;
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void createMouseCursor();
+ void handleNavigation(const NPoint &mousePos);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_NAVIGATIONSCENE_H */
diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp
new file mode 100644
index 0000000000..d60d8b760f
--- /dev/null
+++ b/engines/neverhood/neverhood.cpp
@@ -0,0 +1,208 @@
+/* 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/file.h"
+#include "common/config-manager.h"
+#include "common/textconsole.h"
+
+#include "base/plugins.h"
+#include "base/version.h"
+
+#include "graphics/cursorman.h"
+
+#include "engines/util.h"
+
+#include "neverhood/neverhood.h"
+#include "neverhood/blbarchive.h"
+#include "neverhood/console.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/gamevars.h"
+#include "neverhood/graphics.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/resource.h"
+#include "neverhood/screen.h"
+#include "neverhood/sound.h"
+#include "neverhood/staticdata.h"
+
+namespace Neverhood {
+
+NeverhoodEngine::NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+ // Setup mixer
+ if (!_mixer->isReady()) {
+ warning("Sound initialization failed.");
+ }
+
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+
+ _rnd = new Common::RandomSource("neverhood");
+
+}
+
+NeverhoodEngine::~NeverhoodEngine() {
+ delete _rnd;
+}
+
+Common::Error NeverhoodEngine::run() {
+ initGraphics(640, 480, true);
+
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data");
+
+ _isSaveAllowed = false;
+
+ _mouseX = 0;
+ _mouseY = 0;
+
+ _gameState.sceneNum = 0;
+ _gameState.which = 0;
+
+ _staticData = new StaticData();
+ _staticData->load("neverhood.dat");
+ _gameVars = new GameVars();
+ _screen = new Screen(this);
+ _res = new ResourceMan();
+ _console = new Console(this);
+
+ if (isDemo()) {
+ _res->addArchive("a.blb");
+ _res->addArchive("nevdemo.blb");
+ } else {
+ _res->addArchive("a.blb");
+ _res->addArchive("c.blb");
+ _res->addArchive("hd.blb");
+ _res->addArchive("i.blb");
+ _res->addArchive("m.blb");
+ _res->addArchive("s.blb");
+ _res->addArchive("t.blb");
+ }
+
+ CursorMan.showMouse(false);
+
+ _soundMan = new SoundMan(this);
+ _audioResourceMan = new AudioResourceMan(this);
+
+ _gameModule = new GameModule(this);
+
+ _isSaveAllowed = true;
+ _updateSound = true;
+
+ if (isDemo()) {
+ // Adjust this navigation list for the demo version
+ NavigationList *navigationList = _staticData->getNavigationList(0x004B67E8);
+ (*navigationList)[0].middleSmackerFileHash = 0;
+ (*navigationList)[0].middleFlag = 1;
+ (*navigationList)[2].middleSmackerFileHash = 0;
+ (*navigationList)[2].middleFlag = 1;
+ (*navigationList)[4].middleSmackerFileHash = 0;
+ (*navigationList)[4].middleFlag = 1;
+ (*navigationList)[5].middleSmackerFileHash = 0;
+ (*navigationList)[5].middleFlag = 1;
+ }
+
+ if (ConfMan.hasKey("save_slot"))
+ loadGameState(ConfMan.getInt("save_slot"));
+ else
+ _gameModule->startup();
+
+ mainLoop();
+
+ delete _gameModule;
+ delete _soundMan;
+ delete _audioResourceMan;
+
+ delete _console;
+ delete _res;
+ delete _screen;
+
+ delete _gameVars;
+ delete _staticData;
+
+ return Common::kNoError;
+}
+
+void NeverhoodEngine::mainLoop() {
+ uint32 nextFrameTime = 0;
+ while (!shouldQuit()) {
+ Common::Event event;
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_d) {
+ // Open debugger console
+ _console->attach();
+ continue;
+ }
+ _gameModule->handleKeyDown(event.kbd.keycode);
+ _gameModule->handleAsciiKey(event.kbd.ascii);
+ break;
+ case Common::EVENT_KEYUP:
+ break;
+ case Common::EVENT_MOUSEMOVE:
+ _mouseX = event.mouse.x;
+ _mouseY = event.mouse.y;
+ _gameModule->handleMouseMove(event.mouse.x, event.mouse.y);
+ break;
+ case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
+ _gameModule->handleMouseDown(event.mouse.x, event.mouse.y);
+ break;
+ case Common::EVENT_LBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
+ _gameModule->handleMouseUp(event.mouse.x, event.mouse.y);
+ break;
+ case Common::EVENT_QUIT:
+ _system->quit();
+ break;
+ default:
+ break;
+ }
+ }
+ if (_system->getMillis() >= nextFrameTime) {
+ _gameModule->checkRequests();
+ _gameModule->handleUpdate();
+ _gameModule->draw();
+ _console->onFrame();
+ _screen->update();
+ nextFrameTime = _screen->getNextFrameTime();
+ };
+
+ if (_updateSound) {
+ _soundMan->update();
+ _audioResourceMan->updateMusic();
+ }
+
+ _system->updateScreen();
+ _system->delayMillis(10);
+ }
+}
+
+NPoint NeverhoodEngine::getMousePos() {
+ NPoint pt;
+ pt.x = _mouseX;
+ pt.y = _mouseY;
+ return pt;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h
new file mode 100644
index 0000000000..39bc9cef2c
--- /dev/null
+++ b/engines/neverhood/neverhood.h
@@ -0,0 +1,146 @@
+/* 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 NEVERHOOD_H
+#define NEVERHOOD_H
+
+#include "common/scummsys.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/random.h"
+#include "common/savefile.h"
+#include "common/str-array.h"
+#include "common/system.h"
+#include "audio/mixer.h"
+#include "engines/engine.h"
+#include "neverhood/messages.h"
+
+namespace Neverhood {
+
+enum NeverhoodGameFeatures {
+};
+
+struct NeverhoodGameDescription;
+
+class GameModule;
+class GameVars;
+class ResourceMan;
+class Screen;
+class SoundMan;
+class AudioResourceMan;
+class StaticData;
+class Console;
+struct NPoint;
+
+struct GameState {
+ int sceneNum;
+ int which;
+};
+
+class NeverhoodEngine : public ::Engine {
+protected:
+
+ Common::Error run();
+ void mainLoop();
+
+public:
+ NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc);
+ virtual ~NeverhoodEngine();
+
+ // Detection related functions
+ const NeverhoodGameDescription *_gameDescription;
+ const char *getGameId() const;
+ uint32 getFeatures() const;
+ uint16 getVersion() const;
+ Common::Platform getPlatform() const;
+ bool hasFeature(EngineFeature f) const;
+ bool isDemo() const;
+ Common::String getTargetName() { return _targetName; };
+
+ Common::RandomSource *_rnd;
+
+ int16 _mouseX, _mouseY;
+ uint16 _buttonState;
+
+ GameState _gameState;
+ GameVars *_gameVars;
+ Screen *_screen;
+ ResourceMan *_res;
+ GameModule *_gameModule;
+ StaticData *_staticData;
+ Console *_console;
+
+ SoundMan *_soundMan;
+ AudioResourceMan *_audioResourceMan;
+
+public:
+
+ /* Save/load */
+
+ enum kReadSaveHeaderError {
+ kRSHENoError = 0,
+ kRSHEInvalidType = 1,
+ kRSHEInvalidVersion = 2,
+ kRSHEIoError = 3
+ };
+
+ struct SaveHeader {
+ Common::String description;
+ uint32 version;
+ byte gameID;
+ uint32 flags;
+ uint32 saveDate;
+ uint32 saveTime;
+ uint32 playTime;
+ Graphics::Surface *thumbnail;
+ };
+
+ bool _isSaveAllowed;
+
+ bool canLoadGameStateCurrently() { return _isSaveAllowed; }
+ bool canSaveGameStateCurrently() { return _isSaveAllowed; }
+
+ Common::Error loadGameState(int slot);
+ Common::Error saveGameState(int slot, const Common::String &description);
+ Common::Error removeGameState(int slot);
+ void savegame(const char *filename, const char *description);
+ void loadgame(const char *filename);
+ const char *getSavegameFilename(int num);
+ static Common::String getSavegameFilename(const Common::String &target, int num);
+ static kReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header);
+
+ GameState& gameState() { return _gameState; }
+ GameModule *gameModule() { return _gameModule; }
+ int16 getMouseX() const { return _mouseX; }
+ int16 getMouseY() const { return _mouseY; }
+ NPoint getMousePos();
+
+ void toggleSoundUpdate(bool state) { _updateSound = state; }
+
+private:
+ bool _updateSound;
+
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_H */
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
new file mode 100644
index 0000000000..d4b9b67f53
--- /dev/null
+++ b/engines/neverhood/palette.cpp
@@ -0,0 +1,201 @@
+/* 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 "neverhood/palette.h"
+#include "neverhood/resource.h"
+#include "neverhood/screen.h"
+
+namespace Neverhood {
+
+// Palette
+
+Palette::Palette(NeverhoodEngine *vm) : Entity(vm, 0) {
+ init();
+ memset(_palette, 0, 1024);
+ SetUpdateHandler(&Palette::update);
+}
+
+Palette::Palette(NeverhoodEngine *vm, byte *palette) : Entity(vm, 0) {
+ init();
+ memcpy(_palette, palette, 1024);
+ SetUpdateHandler(&Palette::update);
+}
+
+Palette::Palette(NeverhoodEngine *vm, const char *filename) : Entity(vm, 0) {
+ PaletteResource paletteResource(_vm);
+ init();
+ paletteResource.load(calcHash(filename));
+ paletteResource.copyPalette(_palette);
+ SetUpdateHandler(&Palette::update);
+}
+
+Palette::Palette(NeverhoodEngine *vm, uint32 fileHash) : Entity(vm, 0) {
+ PaletteResource paletteResource(_vm);
+ init();
+ paletteResource.load(fileHash);
+ paletteResource.copyPalette(_palette);
+ SetUpdateHandler(&Palette::update);
+}
+
+Palette::~Palette() {
+ _vm->_screen->unsetPaletteData(_palette);
+ delete[] _palette;
+ delete[] _basePalette;
+}
+
+void Palette::init() {
+ _status = 0;
+ _palette = new byte[1024];
+ _basePalette = new byte[1024];
+}
+
+void Palette::usePalette() {
+ _vm->_screen->setPaletteData(_palette);
+}
+
+void Palette::addPalette(const char *filename, int toIndex, int count, int fromIndex) {
+ addPalette(calcHash(filename), toIndex, count, fromIndex);
+}
+
+void Palette::addPalette(uint32 fileHash, int toIndex, int count, int fromIndex) {
+ PaletteResource paletteResource(_vm);
+ if (toIndex + count > 256)
+ count = 256 - toIndex;
+ paletteResource.load(fileHash);
+ memcpy(_palette + toIndex * 4, paletteResource.palette() + fromIndex * 4, count * 4);
+ _vm->_screen->testPalette(_palette);
+}
+
+void Palette::addBasePalette(uint32 fileHash, int toIndex, int count, int fromIndex) {
+ PaletteResource paletteResource(_vm);
+ if (toIndex + count > 256)
+ count = 256 - toIndex;
+ paletteResource.load(fileHash);
+ memcpy(_basePalette + toIndex * 4, paletteResource.palette() + fromIndex * 4, count * 4);
+}
+
+void Palette::copyPalette(const byte *palette, int toIndex, int count, int fromIndex) {
+ if (toIndex + count > 256)
+ count = 256 - toIndex;
+ memcpy(_palette + toIndex * 4, palette + fromIndex * 4, count * 4);
+ _vm->_screen->testPalette(_palette);
+}
+
+void Palette::copyBasePalette(int toIndex, int count, int fromIndex) {
+ if (toIndex + count > 256)
+ count = 256 - toIndex;
+ memcpy(_basePalette + toIndex * 4, _palette + fromIndex * 4, count * 4);
+}
+
+void Palette::startFadeToBlack(int counter) {
+ debug(2, "Palette::startFadeToBlack(%d)", counter);
+ if (counter == 0)
+ counter = 1;
+ _fadeToR = 0;
+ _fadeToG = 0;
+ _fadeToB = 0;
+ _palCounter = counter;
+ _fadeStep = 255 / counter;
+ _status = 1;
+}
+
+void Palette::startFadeToWhite(int counter) {
+ debug(2, "Palette::startFadeToWhite(%d)", counter);
+ if (counter == 0)
+ counter = 1;
+ _fadeToR = 255;
+ _fadeToG = 255;
+ _fadeToB = 255;
+ _palCounter = counter;
+ _fadeStep = 255 / counter;
+ _status = 1;
+}
+
+void Palette::startFadeToPalette(int counter) {
+ debug(2, "Palette::startFadeToPalette(%d)", counter);
+ if (counter == 0)
+ counter = 1;
+ _palCounter = counter;
+ _fadeStep = 255 / counter;
+ _status = 2;
+}
+
+void Palette::fillBaseWhite(int index, int count) {
+ if (index + count > 256)
+ count = 256 - index;
+ for (int i = 0; i < count; i++) {
+ _basePalette[(i + index) * 4 + 0] = 0xFF;
+ _basePalette[(i + index) * 4 + 1] = 0xFF;
+ _basePalette[(i + index) * 4 + 2] = 0xFF;
+ _basePalette[(i + index) * 4 + 3] = 0;
+ }
+}
+
+void Palette::fillBaseBlack(int index, int count) {
+ if (index + count > 256)
+ count = 256 - index;
+ for (int i = 0; i < count; i++) {
+ _basePalette[(i + index) * 4 + 0] = 0;
+ _basePalette[(i + index) * 4 + 1] = 0;
+ _basePalette[(i + index) * 4 + 2] = 0;
+ _basePalette[(i + index) * 4 + 3] = 0;
+ }
+}
+
+void Palette::copyToBasePalette(byte *palette) {
+ memcpy(_basePalette, palette, 256 * 4);
+}
+
+void Palette::update() {
+ debug(2, "Palette::update() _status = %d", _status);
+ if (_status == 1) {
+ if (_palCounter > 1) {
+ for (int i = 0; i < 256; i++)
+ fadeColor(_palette + i * 4, _fadeToR, _fadeToG, _fadeToB);
+ _vm->_screen->testPalette(_palette);
+ _palCounter--;
+ } else {
+ memset(_palette, 0, 1024);
+ _status = 0;
+ }
+ } else if (_status == 2) {
+ if (_palCounter > 1) {
+ for (int i = 0; i < 256; i++)
+ fadeColor(_palette + i * 4, _basePalette[i * 4 + 0], _basePalette[i * 4 + 1], _basePalette[i * 4 + 2]);
+ _vm->_screen->testPalette(_palette);
+ _palCounter--;
+ } else {
+ memcpy(_palette, _basePalette, 256 * 4);
+ _status = 0;
+ }
+ }
+}
+
+void Palette::fadeColor(byte *rgb, byte toR, byte toG, byte toB) {
+ #define FADE(color, toColor) color += _fadeStep < toColor - color ? _fadeStep : (-_fadeStep <= toColor - color ? toColor - color : -_fadeStep)
+ FADE(rgb[0], toR);
+ FADE(rgb[1], toG);
+ FADE(rgb[2], toB);
+ #undef FADE
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/palette.h b/engines/neverhood/palette.h
new file mode 100644
index 0000000000..c83207caae
--- /dev/null
+++ b/engines/neverhood/palette.h
@@ -0,0 +1,68 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_PALETTE_H
+#define NEVERHOOD_PALETTE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/entity.h"
+
+namespace Neverhood {
+
+class Palette : public Entity {
+public:
+ // Default constructor with black palette
+ Palette(NeverhoodEngine *vm);
+ // Create from existing palette
+ Palette(NeverhoodEngine *vm, byte *palette);
+ // Create from resource with filename
+ Palette(NeverhoodEngine *vm, const char *filename);
+ // Create from resource with fileHash
+ Palette(NeverhoodEngine *vm, uint32 fileHash);
+ virtual ~Palette();
+ void init();
+ void usePalette();
+ void addPalette(const char *filename, int toIndex, int count, int fromIndex);
+ void addPalette(uint32 fileHash, int toIndex, int count, int fromIndex);
+ void addBasePalette(uint32 fileHash, int toIndex, int count, int fromIndex);
+ void copyPalette(const byte *palette, int toIndex, int count, int fromIndex);
+ void copyBasePalette(int toIndex, int count, int fromIndex);
+ void startFadeToBlack(int counter);
+ void startFadeToWhite(int counter);
+ void startFadeToPalette(int counter);
+ void fillBaseWhite(int index, int count);
+ void fillBaseBlack(int index, int count);
+ void copyToBasePalette(byte *palette);
+protected:
+ int _status;
+ byte *_palette;
+ byte *_basePalette;
+ int _palCounter;
+ byte _fadeToR, _fadeToG, _fadeToB;
+ int _fadeStep;
+ void update();
+ void fadeColor(byte *rgb, byte toR, byte toG, byte toB);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_PALETTE_H */
diff --git a/engines/neverhood/resource.cpp b/engines/neverhood/resource.cpp
new file mode 100644
index 0000000000..442713196e
--- /dev/null
+++ b/engines/neverhood/resource.cpp
@@ -0,0 +1,583 @@
+/* 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/algorithm.h"
+#include "common/memstream.h"
+#include "neverhood/resource.h"
+#include "neverhood/resourceman.h"
+
+namespace Neverhood {
+
+// SpriteResource
+
+SpriteResource::SpriteResource(NeverhoodEngine *vm)
+ : _vm(vm), _pixels(NULL) {
+}
+
+SpriteResource::~SpriteResource() {
+ unload();
+}
+
+void SpriteResource::draw(Graphics::Surface *destSurface, bool flipX, bool flipY) {
+ if (_pixels) {
+ byte *dest = (byte*)destSurface->pixels;
+ const int destPitch = destSurface->pitch;
+ if (_rle)
+ unpackSpriteRle(_pixels, _dimensions.width, _dimensions.height, dest, destPitch, flipX, flipY);
+ else
+ unpackSpriteNormal(_pixels, _dimensions.width, _dimensions.height, dest, destPitch, flipX, flipY);
+ }
+}
+
+bool SpriteResource::load(uint32 fileHash, bool doLoadPosition) {
+ debug(2, "SpriteResource::load(%08X)", fileHash);
+ unload();
+ _vm->_res->queryResource(fileHash, _resourceHandle);
+ if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeBitmap) {
+ _vm->_res->loadResource(_resourceHandle);
+ const byte *spriteData = _resourceHandle.data();
+ NPoint *position = doLoadPosition ? &_position : NULL;
+ parseBitmapResource(spriteData, &_rle, &_dimensions, position, NULL, &_pixels);
+ }
+ return _pixels != NULL;
+}
+
+void SpriteResource::unload() {
+ _vm->_res->unloadResource(_resourceHandle);
+ _pixels = NULL;
+ _rle = false;
+}
+
+// PaletteResource
+
+PaletteResource::PaletteResource(NeverhoodEngine *vm)
+ : _vm(vm), _palette(NULL) {
+}
+
+PaletteResource::~PaletteResource() {
+ unload();
+}
+
+bool PaletteResource::load(uint32 fileHash) {
+ debug(2, "PaletteResource::load(%08X)", fileHash);
+ unload();
+ _vm->_res->queryResource(fileHash, _resourceHandle);
+ if (_resourceHandle.isValid() &&
+ (_resourceHandle.type() == kResTypeBitmap || _resourceHandle.type() == kResTypePalette)) {
+ _vm->_res->loadResource(_resourceHandle);
+ _palette = _resourceHandle.data();
+ // Check if the palette is stored in a bitmap
+ if (_resourceHandle.type() == kResTypeBitmap)
+ parseBitmapResource(_palette, NULL, NULL, NULL, &_palette, NULL);
+
+ }
+ return _palette != NULL;
+}
+
+void PaletteResource::unload() {
+ _vm->_res->unloadResource(_resourceHandle);
+ _palette = NULL;
+}
+
+void PaletteResource::copyPalette(byte *destPalette) {
+ if (_palette)
+ memcpy(destPalette, _palette, 1024);
+}
+
+// AnimResource
+
+AnimResource::AnimResource(NeverhoodEngine *vm)
+ : _vm(vm), _width(0), _height(0), _currSpriteData(NULL), _fileHash(0), _paletteData(NULL),
+ _spriteData(NULL), _replEnabled(false), _replOldColor(0), _replNewColor(0) {
+}
+
+AnimResource::~AnimResource() {
+ unload();
+}
+
+void AnimResource::draw(uint frameIndex, Graphics::Surface *destSurface, bool flipX, bool flipY) {
+ const AnimFrameInfo frameInfo = _frames[frameIndex];
+ byte *dest = (byte*)destSurface->pixels;
+ const int destPitch = destSurface->pitch;
+ _currSpriteData = _spriteData + frameInfo.spriteDataOffs;
+ _width = frameInfo.drawOffset.width;
+ _height = frameInfo.drawOffset.height;
+ if (_replEnabled && _replOldColor != _replNewColor)
+ unpackSpriteRle(_currSpriteData, _width, _height, dest, destPitch, flipX, flipY, _replOldColor, _replNewColor);
+ else
+ unpackSpriteRle(_currSpriteData, _width, _height, dest, destPitch, flipX, flipY);
+}
+
+bool AnimResource::load(uint32 fileHash) {
+ debug(2, "AnimResource::load(%08X)", fileHash);
+
+ if (fileHash == _fileHash)
+ return true;
+
+ unload();
+
+ _vm->_res->queryResource(fileHash, _resourceHandle);
+ if (!_resourceHandle.isValid() || _resourceHandle.type() != kResTypeAnimation)
+ return false;
+
+ const byte *resourceData, *animList, *frameList;
+ uint16 animInfoStartOfs, animListIndex, animListCount;
+ uint16 frameListStartOfs, frameCount;
+ uint32 spriteDataOfs, paletteDataOfs;
+
+ _vm->_res->loadResource(_resourceHandle);
+ resourceData = _resourceHandle.data();
+
+ animListCount = READ_LE_UINT16(resourceData);
+ animInfoStartOfs = READ_LE_UINT16(resourceData + 2);
+ spriteDataOfs = READ_LE_UINT32(resourceData + 4);
+ paletteDataOfs = READ_LE_UINT32(resourceData + 8);
+
+ animList = resourceData + 12;
+ for (animListIndex = 0; animListIndex < animListCount; animListIndex++) {
+ debug(8, "hash: %08X", READ_LE_UINT32(animList));
+ if (READ_LE_UINT32(animList) == fileHash)
+ break;
+ animList += 8;
+ }
+
+ if (animListIndex >= animListCount) {
+ _vm->_res->unloadResource(_resourceHandle);
+ return false;
+ }
+
+ _spriteData = resourceData + spriteDataOfs;
+ if (paletteDataOfs > 0)
+ _paletteData = resourceData + paletteDataOfs;
+
+ frameCount = READ_LE_UINT16(animList + 4);
+ frameListStartOfs = READ_LE_UINT16(animList + 6);
+
+ debug(8, "frameCount = %d; frameListStartOfs = %04X; animInfoStartOfs = %04X", frameCount, frameListStartOfs, animInfoStartOfs);
+
+ frameList = resourceData + animInfoStartOfs + frameListStartOfs;
+
+ _frames.clear();
+ _frames.reserve(frameCount);
+
+ for (uint16 frameIndex = 0; frameIndex < frameCount; frameIndex++) {
+ AnimFrameInfo frameInfo;
+ frameInfo.frameHash = READ_LE_UINT32(frameList);
+ frameInfo.counter = READ_LE_UINT16(frameList + 4);
+ frameInfo.drawOffset.x = READ_LE_UINT16(frameList + 6);
+ frameInfo.drawOffset.y = READ_LE_UINT16(frameList + 8);
+ frameInfo.drawOffset.width = READ_LE_UINT16(frameList + 10);
+ frameInfo.drawOffset.height = READ_LE_UINT16(frameList + 12);
+ frameInfo.deltaX = READ_LE_UINT16(frameList + 14);
+ frameInfo.deltaY = READ_LE_UINT16(frameList + 16);
+ frameInfo.collisionBoundsOffset.x = READ_LE_UINT16(frameList + 18);
+ frameInfo.collisionBoundsOffset.y = READ_LE_UINT16(frameList + 20);
+ frameInfo.collisionBoundsOffset.width = READ_LE_UINT16(frameList + 22);
+ frameInfo.collisionBoundsOffset.height = READ_LE_UINT16(frameList + 24);
+ frameInfo.spriteDataOffs = READ_LE_UINT32(frameList + 28);
+ debug(8, "frameHash = %08X; counter = %d; rect = (%d,%d,%d,%d); deltaX = %d; deltaY = %d; collisionBoundsOffset = (%d,%d,%d,%d); spriteDataOffs = %08X",
+ frameInfo.frameHash, frameInfo.counter,
+ frameInfo.drawOffset.x, frameInfo.drawOffset.y, frameInfo.drawOffset.width, frameInfo.drawOffset.height,
+ frameInfo.deltaX, frameInfo.deltaY,
+ frameInfo.collisionBoundsOffset.x, frameInfo.collisionBoundsOffset.y, frameInfo.collisionBoundsOffset.width, frameInfo.collisionBoundsOffset.height,
+ frameInfo.spriteDataOffs);
+ frameList += 32;
+ _frames.push_back(frameInfo);
+ }
+
+ _fileHash = fileHash;
+
+ return true;
+
+}
+
+void AnimResource::unload() {
+ _vm->_res->unloadResource(_resourceHandle);
+ _currSpriteData = NULL;
+ _fileHash = 0;
+ _paletteData = NULL;
+ _spriteData = NULL;
+ _replEnabled = true;
+ _replOldColor = 0;
+ _replNewColor = 0;
+}
+
+int16 AnimResource::getFrameIndex(uint32 frameHash) {
+ int16 frameIndex = -1;
+ for (uint i = 0; i < _frames.size(); i++)
+ if (_frames[i].frameHash == frameHash) {
+ frameIndex = (int16)i;
+ break;
+ }
+ debug(2, "AnimResource::getFrameIndex(%08X) -> %d", frameHash, frameIndex);
+ return frameIndex;
+}
+
+void AnimResource::setRepl(byte oldColor, byte newColor) {
+ _replOldColor = oldColor;
+ _replNewColor = newColor;
+}
+
+NDimensions AnimResource::loadSpriteDimensions(uint32 fileHash) {
+ ResourceHandle resourceHandle;
+ NDimensions dimensions;
+ _vm->_res->queryResource(fileHash, resourceHandle);
+ const byte *resDimensions = resourceHandle.extData();
+ if (resDimensions) {
+ dimensions.width = READ_LE_UINT16(resDimensions + 0);
+ dimensions.height = READ_LE_UINT16(resDimensions + 2);
+ } else {
+ dimensions.width = 0;
+ dimensions.height = 0;
+ }
+ return dimensions;
+}
+
+// MouseCursorResource
+
+MouseCursorResource::MouseCursorResource(NeverhoodEngine *vm)
+ : _cursorSprite(vm), _cursorNum(4), _currFileHash(0) {
+
+ _rect.width = 32;
+ _rect.height = 32;
+}
+
+void MouseCursorResource::load(uint32 fileHash) {
+ if (_currFileHash != fileHash) {
+ if (_cursorSprite.load(fileHash) && !_cursorSprite.isRle() &&
+ _cursorSprite.getDimensions().width == 96 && _cursorSprite.getDimensions().height == 224) {
+ _currFileHash = fileHash;
+ } else {
+ unload();
+ }
+ }
+}
+
+void MouseCursorResource::unload() {
+ _cursorSprite.unload();
+ _currFileHash = 0;
+ _cursorNum = 4;
+}
+
+NDrawRect& MouseCursorResource::getRect() {
+ static const NPoint kCursorHotSpots[] = {
+ {-15, -5},
+ {-17, -25},
+ {-17, -30},
+ {-14, -1},
+ {-3, -7},
+ {-30, -18},
+ {-1, -18}
+ };
+ _rect.x = kCursorHotSpots[_cursorNum].x;
+ _rect.y = kCursorHotSpots[_cursorNum].y;
+ return _rect;
+}
+
+void MouseCursorResource::draw(int frameNum, Graphics::Surface *destSurface) {
+ if (_cursorSprite.getPixels()) {
+ const int sourcePitch = (_cursorSprite.getDimensions().width + 3) & 0xFFFC; // 4 byte alignment
+ const int destPitch = destSurface->pitch;
+ const byte *source = _cursorSprite.getPixels() + _cursorNum * (sourcePitch * 32) + frameNum * 32;
+ byte *dest = (byte*)destSurface->pixels;
+ for (int16 yc = 0; yc < 32; yc++) {
+ memcpy(dest, source, 32);
+ source += sourcePitch;
+ dest += destPitch;
+ }
+ }
+}
+
+// TextResource
+
+TextResource::TextResource(NeverhoodEngine *vm)
+ : _vm(vm), _textData(NULL), _count(0) {
+
+}
+
+TextResource::~TextResource() {
+ unload();
+}
+
+void TextResource::load(uint32 fileHash) {
+ debug(2, "TextResource::load(%08X)", fileHash);
+ unload();
+ _vm->_res->queryResource(fileHash, _resourceHandle);
+ if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeText) {
+ _vm->_res->loadResource(_resourceHandle);
+ _textData = _resourceHandle.data();
+ _count = READ_LE_UINT32(_textData);
+ }
+}
+
+void TextResource::unload() {
+ _vm->_res->unloadResource(_resourceHandle);
+ _textData = NULL;
+ _count = 0;
+}
+
+const char *TextResource::getString(uint index, const char *&textEnd) {
+ const char *textStart = (const char*)(_textData + 4 + _count * 4 + READ_LE_UINT32(_textData + (index + 1) * 4));
+ textEnd = (const char*)(_textData + 4 + _count * 4 + READ_LE_UINT32(_textData + (index + 2) * 4));
+ return textStart;
+}
+
+// DataResource
+
+DataResource::DataResource(NeverhoodEngine *vm)
+ : _vm(vm) {
+}
+
+DataResource::~DataResource() {
+ unload();
+}
+
+void DataResource::load(uint32 fileHash) {
+ if (_resourceHandle.fileHash() == fileHash)
+ return;
+ const byte *data = NULL;
+ uint32 dataSize = 0;
+ unload();
+ _vm->_res->queryResource(fileHash, _resourceHandle);
+ if (_resourceHandle.isValid() && _resourceHandle.type() == kResTypeData) {
+ _vm->_res->loadResource(_resourceHandle);
+ data = _resourceHandle.data();
+ dataSize = _resourceHandle.size();
+ }
+ if (data && dataSize) {
+ Common::MemoryReadStream dataS(data, dataSize);
+ uint itemCount = dataS.readUint16LE();
+ uint32 itemStartOffs = 2 + itemCount * 8;
+ debug(2, "itemCount = %d", itemCount);
+ for (uint i = 0; i < itemCount; i++) {
+ dataS.seek(2 + i * 8);
+ DRDirectoryItem drDirectoryItem;
+ drDirectoryItem.nameHash = dataS.readUint32LE();
+ drDirectoryItem.offset = dataS.readUint16LE();
+ drDirectoryItem.type = dataS.readUint16LE();
+ debug(2, "%03d nameHash = %08X; offset = %04X; type = %d", i, drDirectoryItem.nameHash, drDirectoryItem.offset, drDirectoryItem.type);
+ dataS.seek(itemStartOffs + drDirectoryItem.offset);
+ switch (drDirectoryItem.type) {
+ case 1:
+ {
+ debug(3, "NPoint");
+ NPoint point;
+ point.x = dataS.readUint16LE();
+ point.y = dataS.readUint16LE();
+ debug(3, "(%d, %d)", point.x, point.y);
+ drDirectoryItem.offset = _points.size();
+ _points.push_back(point);
+ break;
+ }
+ case 2:
+ {
+ uint count = dataS.readUint16LE();
+ NPointArray *pointArray = new NPointArray();
+ debug(3, "NPointArray; count = %d", count);
+ for (uint j = 0; j < count; j++) {
+ NPoint point;
+ point.x = dataS.readUint16LE();
+ point.y = dataS.readUint16LE();
+ debug(3, "(%d, %d)", point.x, point.y);
+ pointArray->push_back(point);
+ }
+ drDirectoryItem.offset = _pointArrays.size();
+ _pointArrays.push_back(pointArray);
+ break;
+ }
+ case 3:
+ {
+ uint count = dataS.readUint16LE();
+ HitRectList *hitRectList = new HitRectList();
+ debug(3, "HitRectList; count = %d", count);
+ for (uint j = 0; j < count; j++) {
+ HitRect hitRect;
+ hitRect.rect.x1 = dataS.readUint16LE();
+ hitRect.rect.y1 = dataS.readUint16LE();
+ hitRect.rect.x2 = dataS.readUint16LE();
+ hitRect.rect.y2 = dataS.readUint16LE();
+ hitRect.type = dataS.readUint16LE() + 0x5001;
+ debug(3, "(%d, %d, %d, %d) -> %04d", hitRect.rect.x1, hitRect.rect.y1, hitRect.rect.x2, hitRect.rect.y2, hitRect.type);
+ hitRectList->push_back(hitRect);
+ }
+ drDirectoryItem.offset = _hitRectLists.size();
+ _hitRectLists.push_back(hitRectList);
+ break;
+ }
+ case 4:
+ {
+ uint count = dataS.readUint16LE();
+ MessageList *messageList = new MessageList();
+ debug(3, "MessageList; count = %d", count);
+ for (uint j = 0; j < count; j++) {
+ MessageItem messageItem;
+ messageItem.messageNum = dataS.readUint32LE();
+ messageItem.messageValue = dataS.readUint32LE();
+ debug(3, "(%08X, %08X)", messageItem.messageNum, messageItem.messageValue);
+ messageList->push_back(messageItem);
+ }
+ drDirectoryItem.offset = _messageLists.size();
+ _messageLists.push_back(messageList);
+ break;
+ }
+ case 5:
+ {
+ uint count = dataS.readUint16LE();
+ DRSubRectList *drSubRectList = new DRSubRectList();
+ debug(3, "SubRectList; count = %d", count);
+ for (uint j = 0; j < count; j++) {
+ DRSubRect drSubRect;
+ drSubRect.rect.x1 = dataS.readUint16LE();
+ drSubRect.rect.y1 = dataS.readUint16LE();
+ drSubRect.rect.x2 = dataS.readUint16LE();
+ drSubRect.rect.y2 = dataS.readUint16LE();
+ drSubRect.messageListHash = dataS.readUint32LE();
+ drSubRect.messageListItemIndex = dataS.readUint16LE();
+ debug(3, "(%d, %d, %d, %d) -> %08X (%d)", drSubRect.rect.x1, drSubRect.rect.y1, drSubRect.rect.x2, drSubRect.rect.y2, drSubRect.messageListHash, drSubRect.messageListItemIndex);
+ drSubRectList->push_back(drSubRect);
+ }
+ drDirectoryItem.offset = _drSubRectLists.size();
+ _drSubRectLists.push_back(drSubRectList);
+ break;
+ }
+ case 6:
+ {
+ DRRect drRect;
+ drRect.rect.x1 = dataS.readUint16LE();
+ drRect.rect.y1 = dataS.readUint16LE();
+ drRect.rect.x2 = dataS.readUint16LE();
+ drRect.rect.y2 = dataS.readUint16LE();
+ drRect.subRectIndex = dataS.readUint16LE();
+ debug(3, "(%d, %d, %d, %d) -> %d", drRect.rect.x1, drRect.rect.y1, drRect.rect.x2, drRect.rect.y2, drRect.subRectIndex);
+ drDirectoryItem.offset = _drRects.size();
+ _drRects.push_back(drRect);
+ break;
+ }
+ case 7:
+ {
+ uint count = dataS.readUint16LE();
+ NRectArray *rectArray = new NRectArray();
+ debug(3, "NRectArray; count = %d", count);
+ for (uint j = 0; j < count; j++) {
+ NRect rect;
+ rect.x1 = dataS.readUint16LE();
+ rect.y1 = dataS.readUint16LE();
+ rect.x2 = dataS.readUint16LE();
+ rect.y2 = dataS.readUint16LE();
+ debug(3, "(%d, %d, %d, %d)", rect.x1, rect.y1, rect.x2, rect.y2);
+ rectArray->push_back(rect);
+ }
+ drDirectoryItem.offset = _rectArrays.size();
+ _rectArrays.push_back(rectArray);
+ break;
+ }
+ }
+ _directory.push_back(drDirectoryItem);
+ }
+ }
+}
+
+void DataResource::unload() {
+ _directory.clear();
+ _points.clear();
+ for (Common::Array<NPointArray*>::iterator it = _pointArrays.begin(); it != _pointArrays.end(); ++it)
+ delete (*it);
+ _pointArrays.clear();
+ for (Common::Array<NRectArray*>::iterator it = _rectArrays.begin(); it != _rectArrays.end(); ++it)
+ delete (*it);
+ _rectArrays.clear();
+ for (Common::Array<HitRectList*>::iterator it = _hitRectLists.begin(); it != _hitRectLists.end(); ++it)
+ delete (*it);
+ _hitRectLists.clear();
+ for (Common::Array<MessageList*>::iterator it = _messageLists.begin(); it != _messageLists.end(); ++it)
+ delete (*it);
+ _messageLists.clear();
+ _drRects.clear();
+ for (Common::Array<DRSubRectList*>::iterator it = _drSubRectLists.begin(); it != _drSubRectLists.end(); ++it)
+ delete (*it);
+ _drSubRectLists.clear();
+ _vm->_res->unloadResource(_resourceHandle);
+}
+
+NPoint DataResource::getPoint(uint32 nameHash) {
+ DataResource::DRDirectoryItem *drDirectoryItem = findDRDirectoryItem(nameHash, 1);
+ return drDirectoryItem ? _points[drDirectoryItem->offset] : NPoint();
+}
+
+NPointArray *DataResource::getPointArray(uint32 nameHash) {
+ DataResource::DRDirectoryItem *drDirectoryItem = findDRDirectoryItem(nameHash, 2);
+ return drDirectoryItem ? _pointArrays[drDirectoryItem->offset] : NULL;
+}
+
+NRectArray *DataResource::getRectArray(uint32 nameHash) {
+ DataResource::DRDirectoryItem *drDirectoryItem = findDRDirectoryItem(nameHash, 3);
+ return drDirectoryItem ? _rectArrays[drDirectoryItem->offset] : NULL;
+}
+
+HitRectList *DataResource::getHitRectList() {
+ DataResource::DRDirectoryItem *drDirectoryItem = findDRDirectoryItem(calcHash("HitArray"), 3);
+ return drDirectoryItem ? _hitRectLists[drDirectoryItem->offset] : NULL;
+}
+
+MessageList *DataResource::getMessageListAtPos(int16 klaymenX, int16 klaymenY, int16 mouseX, int16 mouseY) {
+ for (uint i = 0; i < _drRects.size(); i++) {
+ if (klaymenX >= _drRects[i].rect.x1 && klaymenX <= _drRects[i].rect.x2 &&
+ klaymenY >= _drRects[i].rect.y1 && klaymenY <= _drRects[i].rect.y2) {
+ DRSubRectList *drSubRectList = _drSubRectLists[_drRects[i].subRectIndex];
+ for (uint j = 0; j < drSubRectList->size(); j++) {
+ DRSubRect &subRect = (*drSubRectList)[j];
+ if (mouseX >= subRect.rect.x1 && mouseX <= subRect.rect.x2 &&
+ mouseY >= subRect.rect.y1 && mouseY <= subRect.rect.y2) {
+ return _messageLists[subRect.messageListItemIndex];
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+DataResource::DRDirectoryItem *DataResource::findDRDirectoryItem(uint32 nameHash, uint16 type) {
+ for (Common::Array<DRDirectoryItem>::iterator it = _directory.begin(); it != _directory.end(); it++)
+ if ((*it).nameHash == nameHash && (*it).type == type)
+ return &(*it);
+ return NULL;
+}
+
+uint32 calcHash(const char *value) {
+ uint32 hash = 0, shiftValue = 0;
+ while (*value != 0) {
+ char ch = *value++;
+ if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')) {
+ if (ch >= 'a' && ch <= 'z')
+ ch -= 32;
+ else if (ch >= '0' && ch <= '9')
+ ch += 22;
+ shiftValue += ch - 64;
+ if (shiftValue >= 32)
+ shiftValue -= 32;
+ hash ^= 1 << shiftValue;
+ }
+ }
+ return hash;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/resource.h b/engines/neverhood/resource.h
new file mode 100644
index 0000000000..6a84a69ecd
--- /dev/null
+++ b/engines/neverhood/resource.h
@@ -0,0 +1,205 @@
+/* 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 NEVERHOOD_RESOURCE_H
+#define NEVERHOOD_RESOURCE_H
+
+#include "common/str.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/graphics.h"
+#include "neverhood/staticdata.h"
+#include "neverhood/resourceman.h"
+
+namespace Neverhood {
+
+enum {
+ kResTypeBitmap = 2,
+ kResTypePalette = 3,
+ kResTypeAnimation = 4,
+ kResTypeData = 5,
+ kResTypeText = 6,
+ kResTypeSound = 7,
+ kResTypeMusic = 8,
+ kResTypeVideo = 10
+};
+
+class SpriteResource {
+public:
+ SpriteResource(NeverhoodEngine *vm);
+ ~SpriteResource();
+ void draw(Graphics::Surface *destSurface, bool flipX, bool flipY);
+ bool load(uint32 fileHash, bool doLoadPosition = false);
+ void unload();
+ const NDimensions& getDimensions() { return _dimensions; }
+ NPoint& getPosition() { return _position; }
+ bool isRle() const { return _rle; }
+ const byte *getPixels() const { return _pixels; }
+protected:
+ NeverhoodEngine *_vm;
+ ResourceHandle _resourceHandle;
+ NDimensions _dimensions;
+ NPoint _position;
+ const byte *_pixels;
+ bool _rle;
+};
+
+class PaletteResource {
+public:
+ PaletteResource(NeverhoodEngine *vm);
+ ~PaletteResource();
+ bool load(uint32 fileHash);
+ void unload();
+ void copyPalette(byte *destPalette);
+ const byte *palette() { return _palette; }
+protected:
+ NeverhoodEngine *_vm;
+ ResourceHandle _resourceHandle;
+ const byte *_palette;
+};
+
+struct AnimFrameInfo {
+ uint32 frameHash;
+ int16 counter;
+ NDrawRect drawOffset;
+ int16 deltaX, deltaY;
+ NDrawRect collisionBoundsOffset;
+ uint32 spriteDataOffs;
+};
+
+class AnimResource {
+public:
+ AnimResource(NeverhoodEngine *vm);
+ ~AnimResource();
+ void draw(uint frameIndex, Graphics::Surface *destSurface, bool flipX, bool flipY);
+ bool load(uint32 fileHash);
+ void unload();
+ void clear();
+ uint getFrameCount() const { return _frames.size(); }
+ const AnimFrameInfo& getFrameInfo(int16 index) const { return _frames[index]; }
+ int16 getFrameIndex(uint32 frameHash);
+ void setReplEnabled(bool value) { _replEnabled = value; }
+ void setRepl(byte oldColor, byte newColor);
+ NDimensions loadSpriteDimensions(uint32 fileHash);
+protected:
+ NeverhoodEngine *_vm;
+ ResourceHandle _resourceHandle;
+ int16 _width, _height;
+ const byte *_currSpriteData;
+ uint32 _fileHash;
+ const byte *_paletteData;
+ const byte *_spriteData;
+ bool _replEnabled;
+ byte _replOldColor;
+ byte _replNewColor;
+ Common::Array<AnimFrameInfo> _frames;
+};
+
+class MouseCursorResource {
+public:
+ MouseCursorResource(NeverhoodEngine *vm);
+ void load(uint32 fileHash);
+ void unload();
+ NDrawRect& getRect();
+ void draw(int frameNum, Graphics::Surface *destSurface);
+ int getCursorNum() const { return _cursorNum; }
+ void setCursorNum(int cursorNum) { _cursorNum = cursorNum; }
+protected:
+ int _cursorNum;
+ SpriteResource _cursorSprite;
+ NDrawRect _rect;
+ uint32 _currFileHash;
+};
+
+class TextResource {
+public:
+ TextResource(NeverhoodEngine *vm);
+ ~TextResource();
+ void load(uint32 fileHash);
+ void unload();
+ const char *getString(uint index, const char *&textEnd);
+ uint getCount() const { return _count;}
+protected:
+ NeverhoodEngine *_vm;
+ ResourceHandle _resourceHandle;
+ const byte *_textData;
+ uint _count;
+};
+
+/* DataResource
+ 1 Single NPoint
+ 2 Array of NPoints
+ 3 Array of NRects
+ 4 MessageList
+ 5 SubRectList
+ 6 RectList
+*/
+
+class DataResource {
+public:
+ DataResource(NeverhoodEngine *vm);
+ ~DataResource();
+ void load(uint32 fileHash);
+ void unload();
+ NPoint getPoint(uint32 nameHash);
+ NPointArray *getPointArray(uint32 nameHash);
+ NRectArray *getRectArray(uint32 nameHash);
+ HitRectList *getHitRectList();
+ MessageList *getMessageListAtPos(int16 klaymenX, int16 klaymenY, int16 mouseX, int16 mouseY);
+protected:
+
+ struct DRDirectoryItem {
+ uint32 nameHash;
+ uint16 offset;
+ uint16 type;
+ };
+
+ struct DRRect {
+ NRect rect;
+ uint16 subRectIndex;
+ };
+
+ struct DRSubRect {
+ NRect rect;
+ uint32 messageListHash;
+ uint16 messageListItemIndex;
+ };
+
+ typedef Common::Array<DRSubRect> DRSubRectList;
+
+ NeverhoodEngine *_vm;
+ ResourceHandle _resourceHandle;
+ Common::Array<DRDirectoryItem> _directory;
+ Common::Array<NPoint> _points;
+ Common::Array<NPointArray*> _pointArrays;
+ Common::Array<NRectArray*> _rectArrays;
+ Common::Array<HitRectList*> _hitRectLists;
+ Common::Array<MessageList*> _messageLists;
+ Common::Array<DRRect> _drRects;
+ Common::Array<DRSubRectList*> _drSubRectLists;
+ DataResource::DRDirectoryItem *findDRDirectoryItem(uint32 nameHash, uint16 type);
+};
+
+uint32 calcHash(const char *value);
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_RESOURCE_H */
diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp
new file mode 100644
index 0000000000..d5e7786c17
--- /dev/null
+++ b/engines/neverhood/resourceman.cpp
@@ -0,0 +1,128 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "neverhood/resourceman.h"
+
+namespace Neverhood {
+
+ResourceHandle::ResourceHandle()
+ : _resourceFileEntry(NULL), _data(NULL) {
+}
+
+ResourceHandle::~ResourceHandle() {
+}
+
+ResourceMan::ResourceMan() {
+}
+
+ResourceMan::~ResourceMan() {
+}
+
+void ResourceMan::addArchive(const Common::String &filename) {
+ BlbArchive *archive = new BlbArchive();
+ archive->open(filename);
+ _archives.push_back(archive);
+ debug(3, "ResourceMan::addArchive(%s) %d files", filename.c_str(), archive->getCount());
+ for (uint archiveEntryIndex = 0; archiveEntryIndex < archive->getCount(); archiveEntryIndex++) {
+ BlbArchiveEntry *archiveEntry = archive->getEntry(archiveEntryIndex);
+ ResourceFileEntry *entry = findEntrySimple(archiveEntry->fileHash);
+ if (entry) {
+ if (archiveEntry->timeStamp > entry->archiveEntry->timeStamp) {
+ entry->archive = archive;
+ entry->archiveEntry = archiveEntry;
+ }
+ } else {
+ ResourceFileEntry newEntry;
+ newEntry.resourceHandle = -1;
+ newEntry.archive = archive;
+ newEntry.archiveEntry = archiveEntry;
+ _entries[archiveEntry->fileHash] = newEntry;
+ }
+ }
+}
+
+ResourceFileEntry *ResourceMan::findEntrySimple(uint32 fileHash) {
+ EntriesMap::iterator p = _entries.find(fileHash);
+ return p != _entries.end() ? &(*p)._value : NULL;
+}
+
+ResourceFileEntry *ResourceMan::findEntry(uint32 fileHash, ResourceFileEntry **firstEntry) {
+ ResourceFileEntry *entry = findEntrySimple(fileHash);
+ if (firstEntry)
+ *firstEntry = entry;
+ for (; entry && entry->archiveEntry->comprType == 0x65; fileHash = entry->archiveEntry->diskSize)
+ entry = findEntrySimple(fileHash);
+ return entry;
+}
+
+Common::SeekableReadStream *ResourceMan::createStream(uint32 fileHash) {
+ ResourceFileEntry *entry = findEntry(fileHash);
+ return entry ? entry->archive->createStream(entry->archiveEntry) : NULL;
+}
+
+void ResourceMan::queryResource(uint32 fileHash, ResourceHandle &resourceHandle) {
+ ResourceFileEntry *firstEntry;
+ resourceHandle._resourceFileEntry = findEntry(fileHash, &firstEntry);
+ resourceHandle._extData = firstEntry ? firstEntry->archiveEntry->extData : NULL;
+}
+
+void ResourceMan::loadResource(ResourceHandle &resourceHandle) {
+ resourceHandle._data = NULL;
+ if (resourceHandle.isValid()) {
+ const uint32 fileHash = resourceHandle.fileHash();
+ ResourceData *resourceData = _data[fileHash];
+ if (!resourceData) {
+ resourceData = new ResourceData();
+ _data[fileHash] = resourceData;
+ }
+ if (resourceData->data != NULL) {
+ resourceData->dataRefCount++;
+ } else {
+ resourceData->data = new byte[resourceHandle._resourceFileEntry->archiveEntry->size];
+ resourceHandle._resourceFileEntry->archive->load(resourceHandle._resourceFileEntry->archiveEntry, resourceData->data, 0);
+ resourceData->dataRefCount = 1;
+ }
+ resourceHandle._data = resourceData->data;
+ }
+}
+
+void ResourceMan::unloadResource(ResourceHandle &resourceHandle) {
+ if (resourceHandle.isValid()) {
+ ResourceData *resourceData = _data[resourceHandle.fileHash()];
+ if (resourceData && resourceData->dataRefCount > 0)
+ --resourceData->dataRefCount;
+ resourceHandle._resourceFileEntry = NULL;
+ resourceHandle._data = NULL;
+ }
+}
+
+void ResourceMan::purgeResources() {
+ for (Common::HashMap<uint32, ResourceData*>::iterator it = _data.begin(); it != _data.end(); ++it) {
+ ResourceData *resourceData = (*it)._value;
+ if (resourceData->dataRefCount == 0) {
+ delete[] resourceData->data;
+ resourceData->data = NULL;
+ }
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/resourceman.h b/engines/neverhood/resourceman.h
new file mode 100644
index 0000000000..5a3697fe0d
--- /dev/null
+++ b/engines/neverhood/resourceman.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 NEVERHOOD_RESOURCEMAN_H
+#define NEVERHOOD_RESOURCEMAN_H
+
+#include "common/array.h"
+#include "common/file.h"
+#include "common/hashmap.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/blbarchive.h"
+
+namespace Neverhood {
+
+struct ResourceFileEntry {
+ int resourceHandle;
+ BlbArchive *archive;
+ BlbArchiveEntry *archiveEntry;
+};
+
+struct Resource {
+ ResourceFileEntry *entry;
+ int useRefCount;
+};
+
+struct ResourceData {
+ byte *data;
+ int dataRefCount;
+ ResourceData() : data(NULL), dataRefCount() {}
+};
+
+class ResourceMan;
+
+struct ResourceHandle {
+friend class ResourceMan;
+public:
+ ResourceHandle();
+ ~ResourceHandle();
+ bool isValid() const { return _resourceFileEntry != NULL && _resourceFileEntry->archiveEntry != NULL; }
+ byte type() const { return isValid() ? _resourceFileEntry->archiveEntry->type : 0; };
+ const byte *data() const { return _data; }
+ uint32 size() const { return isValid() ? _resourceFileEntry->archiveEntry->size : 0; };
+ const byte *extData() const { return _extData; };
+ uint32 fileHash() const { return isValid() ? _resourceFileEntry->archiveEntry->fileHash : 0; };
+protected:
+ ResourceFileEntry *_resourceFileEntry;
+ const byte *_extData;
+ const byte *_data;
+};
+
+class ResourceMan {
+public:
+ ResourceMan();
+ ~ResourceMan();
+ void addArchive(const Common::String &filename);
+ ResourceFileEntry *findEntrySimple(uint32 fileHash);
+ ResourceFileEntry *findEntry(uint32 fileHash, ResourceFileEntry **firstEntry = NULL);
+ Common::SeekableReadStream *createStream(uint32 fileHash);
+ const ResourceFileEntry& getEntry(uint index) { return _entries[index]; }
+ uint getEntryCount() { return _entries.size(); }
+ void queryResource(uint32 fileHash, ResourceHandle &resourceHandle);
+ void loadResource(ResourceHandle &resourceHandle);
+ void unloadResource(ResourceHandle &resourceHandle);
+ void purgeResources();
+protected:
+ typedef Common::HashMap<uint32, ResourceFileEntry> EntriesMap;
+ Common::Array<BlbArchive*> _archives;
+ EntriesMap _entries;
+ Common::HashMap<uint32, ResourceData*> _data;
+ Common::Array<Resource*> _resources;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_RESOURCEMAN_H */
diff --git a/engines/neverhood/saveload.cpp b/engines/neverhood/saveload.cpp
new file mode 100644
index 0000000000..578d9858ff
--- /dev/null
+++ b/engines/neverhood/saveload.cpp
@@ -0,0 +1,164 @@
+/* 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/savefile.h"
+
+#include "graphics/thumbnail.h"
+
+#include "neverhood/neverhood.h"
+#include "neverhood/gamemodule.h"
+#include "neverhood/gamevars.h"
+
+namespace Neverhood {
+
+#define NEVERHOOD_SAVEGAME_VERSION 0
+
+NeverhoodEngine::kReadSaveHeaderError NeverhoodEngine::readSaveHeader(Common::SeekableReadStream *in, bool loadThumbnail, SaveHeader &header) {
+
+ header.version = in->readUint32LE();
+ if (header.version > NEVERHOOD_SAVEGAME_VERSION)
+ return kRSHEInvalidVersion;
+
+ byte descriptionLen = in->readByte();
+ header.description = "";
+ while (descriptionLen--)
+ header.description += (char)in->readByte();
+
+ if (loadThumbnail) {
+ header.thumbnail = Graphics::loadThumbnail(*in);
+ } else {
+ Graphics::skipThumbnail(*in);
+ }
+
+ // Not used yet, reserved for future usage
+ header.gameID = in->readByte();
+ header.flags = in->readUint32LE();
+
+ header.saveDate = in->readUint32LE();
+ header.saveTime = in->readUint32LE();
+ header.playTime = in->readUint32LE();
+
+ return ((in->eos() || in->err()) ? kRSHEIoError : kRSHENoError);
+}
+
+void NeverhoodEngine::savegame(const char *filename, const char *description) {
+
+ Common::OutSaveFile *out;
+ if (!(out = g_system->getSavefileManager()->openForSaving(filename))) {
+ warning("Can't create file '%s', game not saved", filename);
+ return;
+ }
+
+ TimeDate curTime;
+ g_system->getTimeAndDate(curTime);
+
+ // Header start
+ out->writeUint32LE(NEVERHOOD_SAVEGAME_VERSION);
+
+ byte descriptionLen = strlen(description);
+ out->writeByte(descriptionLen);
+ out->write(description, descriptionLen);
+
+ Graphics::saveThumbnail(*out);
+
+ // Not used yet, reserved for future usage
+ out->writeByte(0);
+ out->writeUint32LE(0);
+ uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
+ uint32 saveTime = ((curTime.tm_hour & 0xFF) << 16) | (((curTime.tm_min) & 0xFF) << 8) | ((curTime.tm_sec) & 0xFF);
+ uint32 playTime = g_engine->getTotalPlayTime() / 1000;
+ out->writeUint32LE(saveDate);
+ out->writeUint32LE(saveTime);
+ out->writeUint32LE(playTime);
+ // Header end
+
+ _gameVars->setGlobalVar(V_CURRENT_SCENE, _gameState.sceneNum);
+ _gameVars->setGlobalVar(V_CURRENT_SCENE_WHICH, _gameState.which);
+
+ _gameVars->saveState(out);
+
+ out->finalize();
+ delete out;
+}
+
+void NeverhoodEngine::loadgame(const char *filename) {
+ Common::InSaveFile *in;
+ if (!(in = g_system->getSavefileManager()->openForLoading(filename))) {
+ warning("Can't open file '%s', game not loaded", filename);
+ return;
+ }
+
+ SaveHeader header;
+
+ kReadSaveHeaderError errorCode = readSaveHeader(in, false, header);
+
+ if (errorCode != kRSHENoError) {
+ warning("Error loading savegame '%s'", filename);
+ delete in;
+ return;
+ }
+
+ g_engine->setTotalPlayTime(header.playTime * 1000);
+
+ _gameVars->loadState(in);
+
+ _gameState.sceneNum = _gameVars->getGlobalVar(V_CURRENT_SCENE);
+ _gameState.which = _gameVars->getGlobalVar(V_CURRENT_SCENE_WHICH);
+
+ _gameModule->requestRestoreGame();
+
+ delete in;
+
+}
+
+Common::Error NeverhoodEngine::loadGameState(int slot) {
+ const char *fileName = getSavegameFilename(slot);
+ loadgame(fileName);
+ return Common::kNoError;
+}
+
+Common::Error NeverhoodEngine::saveGameState(int slot, const Common::String &description) {
+ const char *fileName = getSavegameFilename(slot);
+ savegame(fileName, description.c_str());
+ return Common::kNoError;
+}
+
+Common::Error NeverhoodEngine::removeGameState(int slot) {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::String filename = Neverhood::NeverhoodEngine::getSavegameFilename(_targetName, slot);
+ saveFileMan->removeSavefile(filename.c_str());
+ return Common::kNoError;
+}
+
+const char *NeverhoodEngine::getSavegameFilename(int num) {
+ static Common::String filename;
+ filename = getSavegameFilename(_targetName, num);
+ return filename.c_str();
+}
+
+Common::String NeverhoodEngine::getSavegameFilename(const Common::String &target, int num) {
+ assert(num >= 0 && num <= 999);
+ return Common::String::format("%s.%03d", target.c_str(), num);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/scene.cpp b/engines/neverhood/scene.cpp
new file mode 100644
index 0000000000..80a2b69169
--- /dev/null
+++ b/engines/neverhood/scene.cpp
@@ -0,0 +1,596 @@
+/* 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 "neverhood/console.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+Scene::Scene(NeverhoodEngine *vm, Module *parentModule)
+ : Entity(vm, 0), _parentModule(parentModule), _dataResource(vm), _hitRects(NULL),
+ _mouseCursorWasVisible(true) {
+
+ _isKlaymenBusy = false;
+ _doConvertMessages = false;
+ _messageList = NULL;
+ _rectType = 0;
+ _mouseClickPos.x = 0;
+ _mouseClickPos.y = 0;
+ _mouseClicked = false;
+ _rectList = NULL;
+ _klaymen = NULL;
+ _mouseCursor = NULL;
+ _palette = NULL;
+ _background = NULL;
+ clearHitRects();
+ clearCollisionSprites();
+ _vm->_screen->setFps(24);
+ _vm->_screen->setSmackerDecoder(NULL);
+ _canAcceptInput = true;
+ _messageList2 = NULL;
+ _smackerPlayer = NULL;
+ _isMessageListBusy = false;
+ _messageValue = -1;
+
+ SetUpdateHandler(&Scene::update);
+ SetMessageHandler(&Scene::handleMessage);
+
+ _vm->_screen->clearRenderQueue();
+}
+
+Scene::~Scene() {
+
+ _vm->_screen->setSmackerDecoder(NULL);
+
+ if (_palette) {
+ removeEntity(_palette);
+ delete _palette;
+ }
+
+ // Delete all entities
+ for (Common::Array<Entity*>::iterator iter = _entities.begin(); iter != _entities.end(); iter++)
+ delete *iter;
+
+ // Don't delete surfaces since they always belong to an entity
+
+ // Purge the resources after each scene
+ _vm->_res->purgeResources();
+
+}
+
+void Scene::draw() {
+ if (_smackerPlayer) {
+ if (_smackerPlayer->getSurface())
+ _smackerPlayer->getSurface()->draw();
+ } else {
+ for (Common::Array<BaseSurface*>::iterator iter = _surfaces.begin(); iter != _surfaces.end(); iter++)
+ (*iter)->draw();
+ }
+}
+
+void Scene::addEntity(Entity *entity) {
+ int index = 0, insertIndex = -1;
+ for (Common::Array<Entity*>::iterator iter = _entities.begin(); iter != _entities.end(); iter++) {
+ if ((*iter)->getPriority() > entity->getPriority()) {
+ insertIndex = index;
+ break;
+ }
+ index++;
+ }
+ if (insertIndex >= 0)
+ _entities.insert_at(insertIndex, entity);
+ else
+ _entities.push_back(entity);
+}
+
+bool Scene::removeEntity(Entity *entity) {
+ for (uint index = 0; index < _entities.size(); index++)
+ if (_entities[index] == entity) {
+ _entities.remove_at(index);
+ return true;
+ }
+ return false;
+}
+
+void Scene::addSurface(BaseSurface *surface) {
+ if (surface) {
+ int index = 0, insertIndex = -1;
+ for (Common::Array<BaseSurface*>::iterator iter = _surfaces.begin(); iter != _surfaces.end(); iter++) {
+ if ((*iter)->getPriority() > surface->getPriority()) {
+ insertIndex = index;
+ break;
+ }
+ index++;
+ }
+ if (insertIndex >= 0)
+ _surfaces.insert_at(insertIndex, surface);
+ else
+ _surfaces.push_back(surface);
+ }
+}
+
+bool Scene::removeSurface(BaseSurface *surface) {
+ for (uint index = 0; index < _surfaces.size(); index++) {
+ if (_surfaces[index] == surface) {
+ _surfaces.remove_at(index);
+ return true;
+ }
+ }
+ return false;
+}
+
+void Scene::printSurfaces(Console *con) {
+ for (uint index = 0; index < _surfaces.size(); index++) {
+ NDrawRect drawRect = _surfaces[index]->getDrawRect();
+ NRect clipRect = _surfaces[index]->getClipRect();
+ int priority = _surfaces[index]->getPriority();
+ con->DebugPrintf("%d ('%s'): Priority %d, draw rect (%d, %d, %d, %d), clip rect (%d, %d, %d, %d)\n",
+ index, _surfaces[index]->getName().c_str(), priority,
+ drawRect.x, drawRect.y, drawRect.x2(), drawRect.y2(),
+ clipRect.x1, clipRect.y1, clipRect.x2, clipRect.y2);
+ }
+}
+
+Sprite *Scene::addSprite(Sprite *sprite) {
+ addEntity(sprite);
+ addSurface(sprite->getSurface());
+ return sprite;
+}
+
+void Scene::removeSprite(Sprite *sprite) {
+ removeSurface(sprite->getSurface());
+ removeEntity(sprite);
+}
+
+void Scene::setSurfacePriority(BaseSurface *surface, int priority) {
+ surface->setPriority(priority);
+ if (removeSurface(surface))
+ addSurface(surface);
+}
+
+void Scene::setSpriteSurfacePriority(Sprite *sprite, int priority) {
+ if (sprite)
+ setSurfacePriority(sprite->getSurface(), priority);
+}
+
+void Scene::deleteSprite(Sprite **sprite) {
+ removeCollisionSprite(*sprite);
+ removeSurface((*sprite)->getSurface());
+ removeEntity(*sprite);
+ delete *sprite;
+ *sprite = NULL;
+}
+
+Background *Scene::addBackground(Background *background) {
+ addEntity(background);
+ addSurface(background->getSurface());
+ return background;
+}
+
+void Scene::setBackground(uint32 fileHash) {
+ _background = addBackground(new Background(_vm, fileHash, 0, 0));
+}
+
+void Scene::changeBackground(uint32 fileHash) {
+ _background->load(fileHash);
+}
+
+void Scene::setPalette(uint32 fileHash) {
+ _palette = fileHash ? new Palette(_vm, fileHash) : new Palette(_vm);
+ _palette->usePalette();
+}
+
+void Scene::setHitRects(uint32 id) {
+ setHitRects(_vm->_staticData->getHitRectList(id));
+}
+
+void Scene::setHitRects(HitRectList *hitRects) {
+ _hitRects = hitRects;
+}
+
+Sprite *Scene::insertStaticSprite(uint32 fileHash, int surfacePriority) {
+ return addSprite(new StaticSprite(_vm, fileHash, surfacePriority));
+}
+
+void Scene::insertScreenMouse(uint32 fileHash, const NRect *mouseRect) {
+ NRect rect(-1, -1, -1, -1);
+ if (mouseRect)
+ rect = *mouseRect;
+ insertMouse(new Mouse(_vm, fileHash, rect));
+}
+
+void Scene::insertPuzzleMouse(uint32 fileHash, int16 x1, int16 x2) {
+ insertMouse(new Mouse(_vm, fileHash, x1, x2));
+}
+
+void Scene::insertNavigationMouse(uint32 fileHash, int type) {
+ insertMouse(new Mouse(_vm, fileHash, type));
+}
+
+void Scene::showMouse(bool visible) {
+ _mouseCursor->getSurface()->setVisible(visible);
+}
+
+void Scene::changeMouseCursor(uint32 fileHash) {
+ _mouseCursor->load(fileHash);
+ _mouseCursor->updateCursor();
+}
+
+SmackerPlayer *Scene::addSmackerPlayer(SmackerPlayer *smackerPlayer) {
+ addEntity(smackerPlayer);
+ addSurface(smackerPlayer->getSurface());
+ return smackerPlayer;
+}
+
+void Scene::update() {
+
+ if (_mouseClicked) {
+ if (_klaymen) {
+ if (_canAcceptInput &&
+ _klaymen->hasMessageHandler() &&
+ sendMessage(_klaymen, 0x1008, 0) != 0 &&
+ queryPositionSprite(_mouseClickPos.x, _mouseClickPos.y)) {
+ _mouseClicked = false;
+ } else if (_canAcceptInput &&
+ _klaymen->hasMessageHandler() &&
+ sendMessage(_klaymen, 0x1008, 0) != 0) {
+ _mouseClicked = !queryPositionRectList(_mouseClickPos.x, _mouseClickPos.y);
+ }
+ } else if (queryPositionSprite(_mouseClickPos.x, _mouseClickPos.y)) {
+ _mouseClicked = false;
+ }
+ }
+
+ processMessageList();
+
+ // Update all entities
+ for (Common::Array<Entity*>::iterator iter = _entities.begin(); iter != _entities.end(); iter++)
+ (*iter)->handleUpdate();
+
+}
+
+void Scene::leaveScene(uint32 result) {
+ sendMessage(_parentModule, 0x1009, result);
+}
+
+uint32 Scene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ switch (messageNum) {
+ case 0x0000: // mouse moved
+ if (_mouseCursor && _mouseCursor->hasMessageHandler())
+ sendMessage(_mouseCursor, 0x4002, param);
+ break;
+ case 0x0001: // mouse clicked
+ _mouseClicked = true;
+ _mouseClickPos = param.asPoint();
+ break;
+ case 0x0006:
+ sendMessage(_parentModule, 0x1009, param);
+ break;
+ case 0x1006:
+ // Sent by Klaymen when its animation sequence has finished
+ if (_isKlaymenBusy) {
+ _isKlaymenBusy = false;
+ if (_messageListIndex == _messageListCount) {
+ // If the current message list was processed completely,
+ // sent Klaymen into the idle state.
+ sendMessage(_klaymen, 0x4004, 0);
+ } else {
+ // Else continue with the next message in the current message list
+ processMessageList();
+ }
+ }
+ break;
+ case 0x1007:
+ // This isn't sent by any code, check if it's in a message list
+ // This cancels the current message list and sets Klaymen into the idle state.
+ if (_isKlaymenBusy) {
+ _isKlaymenBusy = false;
+ _messageList = NULL;
+ sendMessage(_klaymen, 0x4004, 0);
+ }
+ break;
+ case 0x101D:
+ // Hide the mouse cursor
+ if (_mouseCursor) {
+ _mouseCursorWasVisible = _mouseCursor->getSurface()->getVisible();
+ _mouseCursor->getSurface()->setVisible(false);
+ }
+ break;
+ case 0x101E:
+ // Show the mouse cursor
+ if (_mouseCursorWasVisible && _mouseCursor) {
+ _mouseCursor->getSurface()->setVisible(true);
+ }
+ break;
+ case 0x1022:
+ // Set the sender's surface priority
+ setSurfacePriority(((Sprite*)sender)->getSurface(), param.asInteger());
+ break;
+ }
+ return 0;
+}
+
+bool Scene::queryPositionSprite(int16 mouseX, int16 mouseY) {
+ for (uint i = 0; i < _collisionSprites.size(); i++) {
+ Sprite *sprite = _collisionSprites[i];
+ if (sprite->hasMessageHandler() && sprite->isPointInside(mouseX, mouseY) &&
+ sendPointMessage(sprite, 0x1011, _mouseClickPos) != 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool Scene::queryPositionRectList(int16 mouseX, int16 mouseY) {
+ int16 klaymenX = _klaymen->getX();
+ int16 klaymenY = _klaymen->getY();
+ if (_rectType == 1) {
+ RectList &rectList = *_rectList;
+ for (uint i = 0; i < rectList.size(); i++) {
+ debug(2, "(%d, %d) ? (%d, %d, %d, %d)", klaymenX, klaymenY, rectList[i].rect.x1, rectList[i].rect.y1, rectList[i].rect.x2, rectList[i].rect.y2);
+ if (rectList[i].rect.contains(klaymenX, klaymenY)) {
+ for (uint j = 0; j < rectList[i].subRects.size(); j++) {
+ debug(2, " (%d, %d) ? (%d, %d, %d, %d)", mouseX, mouseY, rectList[i].subRects[j].rect.x1, rectList[i].subRects[j].rect.y1, rectList[i].subRects[j].rect.x2, rectList[i].subRects[j].rect.y2);
+ if (rectList[i].subRects[j].rect.contains(mouseX, mouseY)) {
+ return setMessageList2(rectList[i].subRects[j].messageListId);
+ }
+ }
+ }
+ }
+ } else if (_rectType == 2) {
+ MessageList *messageList = _dataResource.getMessageListAtPos(klaymenX, klaymenY, mouseX, mouseY);
+ if (messageList && messageList->size())
+ setMessageList2(messageList, true, true);
+ }
+ return true;
+}
+
+void Scene::setMessageList(uint32 id, bool canAcceptInput, bool doConvertMessages) {
+ setMessageList(_vm->_staticData->getMessageList(id), canAcceptInput, doConvertMessages);
+}
+
+void Scene::setMessageList(MessageList *messageList, bool canAcceptInput, bool doConvertMessages) {
+ _messageList = messageList;
+ _messageListCount = _messageList ? _messageList->size() : 0;
+ _messageListIndex = 0;
+ _isKlaymenBusy = false;
+ _canAcceptInput = canAcceptInput;
+ _doConvertMessages = doConvertMessages;
+ _messageListStatus = 1;
+ sendMessage(_klaymen, 0x101C, 0);
+}
+
+bool Scene::setMessageList2(uint32 id, bool canAcceptInput, bool doConvertMessages) {
+ return setMessageList2(_vm->_staticData->getMessageList(id), canAcceptInput, doConvertMessages);
+}
+
+bool Scene::setMessageList2(MessageList *messageList, bool canAcceptInput, bool doConvertMessages) {
+ if (_messageListStatus == 0 ||
+ (_messageListStatus == 1 && messageList != _messageList2) ||
+ (_messageListStatus == 2 && messageList == _messageList2)) {
+ // NOTE Skipped unneeded resource preloading code
+ _messageValue = -1;
+ _messageList2 = messageList;
+ setMessageList(messageList, canAcceptInput, doConvertMessages);
+ return true;
+ }
+ return false;
+}
+
+bool Scene::isMessageList2(uint32 id) {
+ return _messageList2 == _vm->_staticData->getMessageList(id);
+}
+
+void Scene::processMessageList() {
+ debug(7, "Scene::processMessageList() _isMessageListBusy = %d; _isKlaymenBusy = %d", _isMessageListBusy, _isKlaymenBusy);
+
+ if (_isMessageListBusy || _isKlaymenBusy)
+ return;
+
+ _isMessageListBusy = true;
+
+ if (!_messageList) {
+ _messageList2 = NULL;
+ _messageListStatus = 0;
+ }
+
+ if (_messageList && _klaymen) {
+
+#if 0
+ debug("MessageList: %p, %d", (void*)_messageList, _messageList->size());
+ for (uint i = 0; i < _messageList->size(); ++i) {
+ if (i == _messageListIndex) debugN("**"); else debugN(" ");
+ debug("(%08X, %08X)", (*_messageList)[i].messageNum, (*_messageList)[i].messageValue);
+ }
+ debug("--------------------------------");
+#endif
+
+ while (_messageList && _messageListIndex < _messageListCount && !_isKlaymenBusy) {
+ uint32 messageNum = (*_messageList)[_messageListIndex].messageNum;
+ uint32 messageParam = (*_messageList)[_messageListIndex].messageValue;
+
+ ++_messageListIndex;
+ if (_messageListIndex == _messageListCount)
+ sendMessage(_klaymen, 0x1021, 0);
+ if (_doConvertMessages)
+ messageNum = convertMessageNum(messageNum);
+ if (messageNum == 0x1009 || messageNum == 0x1024) {
+ sendMessage(_parentModule, messageNum, messageParam);
+ } else if (messageNum == 0x100A) {
+ _messageValue = messageParam;
+ sendMessage(_parentModule, messageNum, messageParam);
+ } else if (messageNum == 0x4001) {
+ _isKlaymenBusy = true;
+ sendPointMessage(_klaymen, 0x4001, _mouseClickPos);
+ } else if (messageNum == 0x100D) {
+ if (this->hasMessageHandler() && sendMessage(this, 0x100D, messageParam) != 0)
+ continue;
+ } else if (messageNum == 0x101A) {
+ _messageListStatus = 0;
+ } else if (messageNum == 0x101B) {
+ _messageListStatus = 2;
+ } else if (messageNum == 0x1020) {
+ _canAcceptInput = false;
+ } else if (messageNum >= 0x2000 && messageNum <= 0x2FFF) {
+ if (this->hasMessageHandler() && sendMessage(this, messageNum, messageParam) != 0) {
+ _isMessageListBusy = false;
+ return;
+ }
+ } else if (messageNum != 0x4003) {
+ _isKlaymenBusy = true;
+ if (_klaymen->hasMessageHandler() && sendMessage(_klaymen, messageNum, messageParam) != 0) {
+ _isKlaymenBusy = false;
+ }
+ }
+ if (_messageListIndex == _messageListCount) {
+ _canAcceptInput = true;
+ _messageList = NULL;
+ }
+ }
+ }
+
+ _isMessageListBusy = false;
+
+}
+
+void Scene::cancelMessageList() {
+ _isKlaymenBusy = false;
+ _messageList = NULL;
+ _canAcceptInput = true;
+ sendMessage(_klaymen, 0x4004, 0);
+}
+
+void Scene::setRectList(uint32 id) {
+ setRectList(_vm->_staticData->getRectList(id));
+}
+
+void Scene::setRectList(RectList *rectList) {
+ _rectList = rectList;
+ _rectType = 1;
+}
+
+void Scene::clearRectList() {
+ _rectList = NULL;
+ _rectType = 0;
+}
+
+void Scene::loadHitRectList() {
+ HitRectList *hitRectList = _dataResource.getHitRectList();
+ if (hitRectList) {
+ _hitRectList = *hitRectList;
+ setHitRects(&_hitRectList);
+ }
+}
+
+void Scene::loadDataResource(uint32 fileHash) {
+ _dataResource.load(fileHash);
+ _rectType = 2;
+ if (_klaymen)
+ _klaymen->loadDataResource(fileHash);
+}
+
+uint16 Scene::convertMessageNum(uint32 messageNum) {
+ switch (messageNum) {
+ case 0x00004004:
+ return 0x4001;
+ case 0x00000083:
+ return 0x100A;
+ case 0x044001C8:
+ return 0x481C;
+ case 0x02420480:
+ return 0x4818;
+ case 0x08004025:
+ return 0x100D;
+ case 0x04404281:
+ return 0x4824;
+ case 0x08400880:
+ return 0x4825;
+ case 0x08209081:
+ return 0x4823;
+ case 0x24000060:
+ return 0x1009;
+ case 0x42002200:
+ return 0x4004;
+ case 0x428D4894:
+ return 0x101A;
+ }
+ return 0x1000;
+}
+
+void Scene::clearHitRects() {
+ _hitRects = NULL;
+}
+
+HitRect *Scene::findHitRectAtPos(int16 x, int16 y) {
+ static HitRect kDefaultHitRect = {NRect(), 0x5000};
+ if (_hitRects)
+ for (HitRectList::iterator it = _hitRects->begin(); it != _hitRects->end(); it++)
+ if ((*it).rect.contains(x, y))
+ return &(*it);
+ return &kDefaultHitRect;
+}
+
+void Scene::addCollisionSprite(Sprite *sprite) {
+ int index = 0, insertIndex = -1;
+ for (Common::Array<Sprite*>::iterator iter = _collisionSprites.begin(); iter != _collisionSprites.end(); iter++) {
+ if ((*iter)->getPriority() > sprite->getPriority()) {
+ insertIndex = index;
+ break;
+ }
+ index++;
+ }
+ if (insertIndex >= 0)
+ _collisionSprites.insert_at(insertIndex, sprite);
+ else
+ _collisionSprites.push_back(sprite);
+}
+
+void Scene::removeCollisionSprite(Sprite *sprite) {
+ for (uint index = 0; index < _collisionSprites.size(); index++) {
+ if (_collisionSprites[index] == sprite) {
+ _collisionSprites.remove_at(index);
+ break;
+ }
+ }
+}
+
+void Scene::clearCollisionSprites() {
+ _collisionSprites.clear();
+}
+
+void Scene::checkCollision(Sprite *sprite, uint16 flags, int messageNum, uint32 messageParam) {
+ for (Common::Array<Sprite*>::iterator iter = _collisionSprites.begin(); iter != _collisionSprites.end(); iter++) {
+ Sprite *collSprite = *iter;
+ if ((sprite->getFlags() & flags) && collSprite->checkCollision(sprite->getCollisionBounds())) {
+ sprite->sendMessage(collSprite, messageNum, messageParam);
+ }
+ }
+}
+
+void Scene::insertMouse(Mouse *mouseCursor) {
+ if (_mouseCursor)
+ deleteSprite((Sprite**)&_mouseCursor);
+ _mouseCursor = mouseCursor;
+ addEntity(_mouseCursor);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h
new file mode 100644
index 0000000000..813ffba0bb
--- /dev/null
+++ b/engines/neverhood/scene.h
@@ -0,0 +1,229 @@
+/* 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 NEVERHOOD_SCENE_H
+#define NEVERHOOD_SCENE_H
+
+#include "common/array.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/background.h"
+#include "neverhood/entity.h"
+#include "neverhood/graphics.h"
+#include "neverhood/klaymen.h"
+#include "neverhood/module.h"
+#include "neverhood/palette.h"
+#include "neverhood/smackerplayer.h"
+#include "neverhood/sprite.h"
+#include "neverhood/staticdata.h"
+
+namespace Neverhood {
+
+class Console;
+
+class Scene : public Entity {
+public:
+ Scene(NeverhoodEngine *vm, Module *parentModule);
+ virtual ~Scene();
+ virtual void draw();
+ void addEntity(Entity *entity);
+ bool removeEntity(Entity *entity);
+ void addSurface(BaseSurface *surface);
+ bool removeSurface(BaseSurface *surface);
+ void printSurfaces(Console *con);
+ Sprite *addSprite(Sprite *sprite);
+ void removeSprite(Sprite *sprite);
+ void setSurfacePriority(BaseSurface *surface, int priority);
+ void setSpriteSurfacePriority(Sprite *sprite, int priority);
+ void deleteSprite(Sprite **sprite);
+ Background *addBackground(Background *background);
+ void setBackground(uint32 fileHash);
+ void changeBackground(uint32 fileHash);
+ void setBackgroundY(int16 y) { _background->getSurface()->getDrawRect().y = y; }
+ int16 getBackgroundY() { return _background->getSurface()->getDrawRect().y; }
+ void setPalette(uint32 fileHash = 0);
+ void setHitRects(uint32 id);
+ Sprite *insertStaticSprite(uint32 fileHash, int surfacePriority);
+ void insertScreenMouse(uint32 fileHash, const NRect *mouseRect = NULL);
+ void insertPuzzleMouse(uint32 fileHash, int16 x1, int16 x2);
+ void insertNavigationMouse(uint32 fileHash, int type);
+ void showMouse(bool visible);
+ void changeMouseCursor(uint32 fileHash);
+ SmackerPlayer *addSmackerPlayer(SmackerPlayer *smackerPlayer);
+ void update();
+ void leaveScene(uint32 result);
+ HitRect *findHitRectAtPos(int16 x, int16 y);
+ void addCollisionSprite(Sprite *sprite);
+ void removeCollisionSprite(Sprite *sprite);
+ void checkCollision(Sprite *sprite, uint16 flags, int messageNum, uint32 messageParam);
+ // Some crazy templated functions to make the logic code smaller/simpler (imo!)
+ // insertKlaymen
+ template<class T>
+ void insertKlaymen() {
+ _klaymen = (T*)addSprite(new T(_vm, this));
+ }
+ template<class T, class Arg1>
+ void insertKlaymen(Arg1 arg1) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1));
+ }
+ template<class T, class Arg1, class Arg2>
+ void insertKlaymen(Arg1 arg1, Arg2 arg2) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3>
+ void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4>
+ void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+ void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4, arg5));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+ void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) {
+ _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4, arg5, arg6));
+ }
+ // insertSprite
+ template<class T>
+ T* insertSprite() {
+ return (T*)addSprite(new T(_vm));
+ }
+ template<class T, class Arg1>
+ T* insertSprite(Arg1 arg1) {
+ return (T*)addSprite(new T(_vm, arg1));
+ }
+ template<class T, class Arg1, class Arg2>
+ T* insertSprite(Arg1 arg1, Arg2 arg2) {
+ return (T*)addSprite(new T(_vm, arg1, arg2));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3>
+ T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3) {
+ return (T*)addSprite(new T(_vm, arg1, arg2, arg3));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4>
+ T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) {
+ return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+ T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) {
+ return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4, arg5));
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+ T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) {
+ return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4, arg5, arg6));
+ }
+ // createSprite
+ template<class T>
+ T* createSprite() {
+ return new T(_vm);
+ }
+ template<class T, class Arg1>
+ T* createSprite(Arg1 arg1) {
+ return new T(_vm, arg1);
+ }
+ template<class T, class Arg1, class Arg2>
+ T* createSprite(Arg1 arg1, Arg2 arg2) {
+ return new T(_vm, arg1, arg2);
+ }
+ template<class T, class Arg1, class Arg2, class Arg3>
+ T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3) {
+ return new T(_vm, arg1, arg2, arg3);
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4>
+ T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) {
+ return new T(_vm, arg1, arg2, arg3, arg4);
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
+ T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) {
+ return new T(_vm, arg1, arg2, arg3, arg4, arg5);
+ }
+ template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6>
+ T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) {
+ return new T(_vm, arg1, arg2, arg3, arg4, arg5, arg6);
+ }
+protected:
+ Module *_parentModule;
+ Common::Array<Entity*> _entities;
+ Common::Array<BaseSurface*> _surfaces;
+
+ Klaymen *_klaymen;
+ Background *_background;
+ Palette *_palette;
+ SmackerPlayer *_smackerPlayer;
+
+ MessageList *_messageList;
+ MessageList *_messageList2;
+ int _messageListStatus;
+ uint _messageListCount;
+ uint _messageListIndex;
+ bool _doConvertMessages;
+
+ bool _canAcceptInput;
+ bool _isKlaymenBusy;
+ bool _isMessageListBusy;
+
+ Mouse *_mouseCursor;
+ NPoint _mouseClickPos;
+ bool _mouseClicked;
+ bool _mouseCursorWasVisible;
+
+ int _rectType;
+ RectList *_rectList;
+ DataResource _dataResource;
+
+ HitRectList _hitRectList;
+
+ HitRectList *_hitRects;
+ Common::Array<Sprite*> _collisionSprites;
+
+ void (Entity::*_savedUpdateHandlerCb)();
+ uint32 (Entity::*_savedMessageHandlerCb)(int messageNum, const MessageParam &param, Entity *sender);
+ int _messageValue;
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ bool queryPositionSprite(int16 mouseX, int16 mouseY);
+ bool queryPositionRectList(int16 mouseX, int16 mouseY);
+ void setMessageList(uint32 id, bool canAcceptInput = true, bool doConvertMessages = false);
+ void setMessageList(MessageList *messageList, bool canAcceptInput = true, bool doConvertMessages = false);
+ bool setMessageList2(uint32 id, bool canAcceptInput = true, bool doConvertMessages = false);
+ bool setMessageList2(MessageList *messageList, bool canAcceptInput = true, bool doConvertMessages = false);
+ bool isMessageList2(uint32 id);
+ void processMessageList();
+ void setRectList(uint32 id);
+ void setRectList(RectList *rectList);
+ void clearRectList();
+ void loadHitRectList();
+ void cancelMessageList();
+ void loadDataResource(uint32 fileHash);
+ uint16 convertMessageNum(uint32 messageNum);
+
+ void setHitRects(HitRectList *hitRects);
+ void clearHitRects();
+ void clearCollisionSprites();
+
+ void insertMouse(Mouse *mouseCursor);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SCENE_H */
diff --git a/engines/neverhood/screen.cpp b/engines/neverhood/screen.cpp
new file mode 100644
index 0000000000..5a748cfab4
--- /dev/null
+++ b/engines/neverhood/screen.cpp
@@ -0,0 +1,420 @@
+/* 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/palette.h"
+#include "neverhood/screen.h"
+
+namespace Neverhood {
+
+Screen::Screen(NeverhoodEngine *vm)
+ : _vm(vm), _paletteData(NULL), _paletteChanged(false), _smackerDecoder(NULL),
+ _yOffset(0), _fullRefresh(false) {
+
+ _ticks = _vm->_system->getMillis();
+
+ _backScreen = new Graphics::Surface();
+ _backScreen->create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
+
+ _renderQueue = new RenderQueue();
+ _prevRenderQueue = new RenderQueue();
+ _microTiles = new MicroTileArray(640, 480);
+
+}
+
+Screen::~Screen() {
+ delete _microTiles;
+ delete _renderQueue;
+ delete _prevRenderQueue;
+ _backScreen->free();
+ delete _backScreen;
+}
+
+void Screen::update() {
+ _ticks = _vm->_system->getMillis();
+ updatePalette();
+
+ if (_fullRefresh) {
+ // NOTE When playing a fullscreen/doubled Smacker video usually a full screen refresh is needed
+ _vm->_system->copyRectToScreen((const byte*)_backScreen->pixels, _backScreen->pitch, 0, 0, 640, 480);
+ _fullRefresh = false;
+ return;
+ }
+
+ _microTiles->clear();
+
+ for (RenderQueue::iterator it = _renderQueue->begin(); it != _renderQueue->end(); ++it) {
+ RenderItem &renderItem = (*it);
+ renderItem._refresh = true;
+ for (RenderQueue::iterator jt = _prevRenderQueue->begin(); jt != _prevRenderQueue->end(); ++jt) {
+ RenderItem &prevRenderItem = (*jt);
+ if (prevRenderItem == renderItem) {
+ prevRenderItem._refresh = false;
+ renderItem._refresh = false;
+ }
+ }
+ }
+
+ for (RenderQueue::iterator jt = _prevRenderQueue->begin(); jt != _prevRenderQueue->end(); ++jt) {
+ RenderItem &prevRenderItem = (*jt);
+ if (prevRenderItem._refresh)
+ _microTiles->addRect(Common::Rect(prevRenderItem._destX, prevRenderItem._destY, prevRenderItem._destX + prevRenderItem._width, prevRenderItem._destY + prevRenderItem._height));
+ }
+
+ for (RenderQueue::iterator it = _renderQueue->begin(); it != _renderQueue->end(); ++it) {
+ RenderItem &renderItem = (*it);
+ if (renderItem._refresh)
+ _microTiles->addRect(Common::Rect(renderItem._destX, renderItem._destY, renderItem._destX + renderItem._width, renderItem._destY + renderItem._height));
+ renderItem._refresh = true;
+ }
+
+ RectangleList *updateRects = _microTiles->getRectangles();
+
+ for (RenderQueue::iterator it = _renderQueue->begin(); it != _renderQueue->end(); ++it) {
+ RenderItem &renderItem = (*it);
+ for (RectangleList::iterator ri = updateRects->begin(); ri != updateRects->end(); ++ri)
+ blitRenderItem(renderItem, *ri);
+ }
+
+ SWAP(_renderQueue, _prevRenderQueue);
+ _renderQueue->clear();
+
+ for (RectangleList::iterator ri = updateRects->begin(); ri != updateRects->end(); ++ri) {
+ Common::Rect &r = *ri;
+ _vm->_system->copyRectToScreen((const byte*)_backScreen->getBasePtr(r.left, r.top), _backScreen->pitch, r.left, r.top, r.width(), r.height());
+ }
+
+ delete updateRects;
+
+}
+
+uint32 Screen::getNextFrameTime() {
+ int32 frameDelay = _frameDelay;
+ if (_smackerDecoder && _smackerDecoder->isVideoLoaded() && !_smackerDecoder->endOfVideo())
+ frameDelay = _smackerDecoder->getTimeToNextFrame();
+ int32 waitTicks = frameDelay - (_vm->_system->getMillis() - _ticks);
+ return _vm->_system->getMillis() + waitTicks;
+}
+
+void Screen::saveParams() {
+ _savedSmackerDecoder = _smackerDecoder;
+ _savedFrameDelay = _frameDelay;
+ _savedYOffset = _yOffset;
+}
+
+void Screen::restoreParams() {
+ _smackerDecoder = _savedSmackerDecoder;
+ _frameDelay = _savedFrameDelay;
+ _yOffset = _savedYOffset;
+}
+
+void Screen::setFps(int fps) {
+ _frameDelay = 1000 / fps;
+}
+
+int Screen::getFps() {
+ return 1000 / _frameDelay;
+}
+
+void Screen::setYOffset(int16 yOffset) {
+ _yOffset = yOffset;
+}
+
+int16 Screen::getYOffset() {
+ return _yOffset;
+}
+
+void Screen::setPaletteData(byte *paletteData) {
+ _paletteChanged = true;
+ _paletteData = paletteData;
+}
+
+void Screen::unsetPaletteData(byte *paletteData) {
+ if (_paletteData == paletteData) {
+ _paletteChanged = false;
+ _paletteData = NULL;
+ }
+}
+
+void Screen::testPalette(byte *paletteData) {
+ if (_paletteData == paletteData)
+ _paletteChanged = true;
+}
+
+void Screen::updatePalette() {
+ if (_paletteChanged && _paletteData) {
+ byte *tempPalette = new byte[768];
+ for (int i = 0; i < 256; i++) {
+ tempPalette[i * 3 + 0] = _paletteData[i * 4 + 0];
+ tempPalette[i * 3 + 1] = _paletteData[i * 4 + 1];
+ tempPalette[i * 3 + 2] = _paletteData[i * 4 + 2];
+ }
+ _vm->_system->getPaletteManager()->setPalette(tempPalette, 0, 256);
+ delete[] tempPalette;
+ _paletteChanged = false;
+ }
+}
+
+void Screen::clear() {
+ memset(_backScreen->pixels, 0, _backScreen->pitch * _backScreen->h);
+ _fullRefresh = true;
+ clearRenderQueue();
+}
+
+void Screen::clearRenderQueue() {
+ _renderQueue->clear();
+ _prevRenderQueue->clear();
+}
+
+void Screen::drawSurface2(const Graphics::Surface *surface, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version,
+ const Graphics::Surface *shadowSurface) {
+
+ int16 destX, destY;
+ NRect ddRect;
+
+ if (drawRect.x + drawRect.width >= clipRect.x2)
+ ddRect.x2 = clipRect.x2 - drawRect.x;
+ else
+ ddRect.x2 = drawRect.width;
+
+ if (drawRect.x < clipRect.x1) {
+ destX = clipRect.x1;
+ ddRect.x1 = clipRect.x1 - drawRect.x;
+ } else {
+ destX = drawRect.x;
+ ddRect.x1 = 0;
+ }
+
+ if (drawRect.y + drawRect.height >= clipRect.y2)
+ ddRect.y2 = clipRect.y2 - drawRect.y;
+ else
+ ddRect.y2 = drawRect.height;
+
+ if (drawRect.y < clipRect.y1) {
+ destY = clipRect.y1;
+ ddRect.y1 = clipRect.y1 - drawRect.y;
+ } else {
+ destY = drawRect.y;
+ ddRect.y1 = 0;
+ }
+
+ queueBlit(surface, destX, destY, ddRect, transparent, version, shadowSurface);
+
+}
+
+void Screen::drawSurface3(const Graphics::Surface *surface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version) {
+
+ int16 destX, destY;
+ NRect ddRect;
+
+ if (x + drawRect.width >= clipRect.x2)
+ ddRect.x2 = clipRect.x2 - drawRect.x - x;
+ else
+ ddRect.x2 = drawRect.x + drawRect.width;
+
+ if (x < clipRect.x1) {
+ destX = clipRect.x1;
+ ddRect.x1 = clipRect.x1 + drawRect.x - x;
+ } else {
+ destX = x;
+ ddRect.x1 = drawRect.x;
+ }
+
+ if (y + drawRect.height >= clipRect.y2)
+ ddRect.y2 = clipRect.y2 + drawRect.y - y;
+ else
+ ddRect.y2 = drawRect.y + drawRect.height;
+
+ if (y < clipRect.y1) {
+ destY = clipRect.y1;
+ ddRect.y1 = clipRect.y1 + drawRect.y - y;
+ } else {
+ destY = y;
+ ddRect.y1 = drawRect.y;
+ }
+
+ queueBlit(surface, destX, destY, ddRect, transparent, version);
+
+}
+
+void Screen::drawDoubleSurface2(const Graphics::Surface *surface, NDrawRect &drawRect) {
+
+ const byte *source = (const byte*)surface->getBasePtr(0, 0);
+ byte *dest = (byte*)_backScreen->getBasePtr(drawRect.x, drawRect.y);
+
+ for (int16 yc = 0; yc < surface->h; yc++) {
+ byte *row = dest;
+ for (int16 xc = 0; xc < surface->w; xc++) {
+ *row++ = *source;
+ *row++ = *source++;
+ }
+ memcpy(dest + _backScreen->pitch, dest, surface->w * 2);
+ dest += _backScreen->pitch;
+ dest += _backScreen->pitch;
+ }
+
+ _fullRefresh = true; // See Screen::update
+
+}
+
+void Screen::drawUnk(const Graphics::Surface *surface, NDrawRect &drawRect, NDrawRect &sysRect, NRect &clipRect, bool transparent, byte version) {
+
+ int16 x, y;
+ bool xflag, yflag;
+ NDrawRect newDrawRect;
+
+ x = sysRect.x;
+ if (sysRect.width <= x || -sysRect.width >= x)
+ x = x % sysRect.width;
+ if (x < 0)
+ x += sysRect.width;
+
+ y = sysRect.y;
+ if (y >= sysRect.height || -sysRect.height >= y)
+ y = y % sysRect.height;
+ if (y < 0)
+ y += sysRect.height;
+
+ xflag = x <= 0;
+ yflag = y <= 0;
+
+ newDrawRect.x = x;
+ newDrawRect.width = sysRect.width - x;
+ if (drawRect.width < newDrawRect.width) {
+ xflag = true;
+ newDrawRect.width = drawRect.width;
+ }
+
+ newDrawRect.y = y;
+ newDrawRect.height = sysRect.height - y;
+ if (drawRect.height < newDrawRect.height) {
+ yflag = true;
+ newDrawRect.height = drawRect.height;
+ }
+
+ drawSurface3(surface, drawRect.x, drawRect.y, newDrawRect, clipRect, transparent, version);
+
+ if (!xflag) {
+ newDrawRect.x = 0;
+ newDrawRect.y = y;
+ newDrawRect.width = x + drawRect.width - sysRect.width;
+ newDrawRect.height = sysRect.height - y;
+ if (drawRect.height < newDrawRect.height)
+ newDrawRect.height = drawRect.height;
+ drawSurface3(surface, sysRect.width + drawRect.x - x, drawRect.y, newDrawRect, clipRect, transparent, version);
+ }
+
+ if (!yflag) {
+ newDrawRect.x = x;
+ newDrawRect.y = 0;
+ newDrawRect.width = sysRect.width - x;
+ newDrawRect.height = y + drawRect.height - sysRect.height;
+ if (drawRect.width < newDrawRect.width)
+ newDrawRect.width = drawRect.width;
+ drawSurface3(surface, drawRect.x, sysRect.height + drawRect.y - y, newDrawRect, clipRect, transparent, version);
+ }
+
+ if (!xflag && !yflag) {
+ newDrawRect.x = 0;
+ newDrawRect.y = 0;
+ newDrawRect.width = x + drawRect.width - sysRect.width;
+ newDrawRect.height = y + drawRect.height - sysRect.height;
+ drawSurface3(surface, sysRect.width + drawRect.x - x, sysRect.height + drawRect.y - y, newDrawRect, clipRect, transparent, version);
+ }
+
+}
+
+void Screen::drawSurfaceClipRects(const Graphics::Surface *surface, NDrawRect &drawRect, NRect *clipRects, uint clipRectsCount, bool transparent, byte version) {
+ NDrawRect clipDrawRect(0, 0, drawRect.width, drawRect.height);
+ for (uint i = 0; i < clipRectsCount; i++)
+ drawSurface3(surface, drawRect.x, drawRect.y, clipDrawRect, clipRects[i], transparent, version);
+}
+
+void Screen::queueBlit(const Graphics::Surface *surface, int16 destX, int16 destY, NRect &ddRect, bool transparent, byte version,
+ const Graphics::Surface *shadowSurface) {
+
+ const int width = ddRect.x2 - ddRect.x1;
+ const int height = ddRect.y2 - ddRect.y1;
+
+ if (width <= 0 || height <= 0)
+ return;
+
+ RenderItem renderItem;
+ renderItem._surface = surface;
+ renderItem._shadowSurface = shadowSurface;
+ renderItem._destX = destX;
+ renderItem._destY = destY;
+ renderItem._srcX = ddRect.x1;
+ renderItem._srcY = ddRect.y1;
+ renderItem._width = width;
+ renderItem._height = height;
+ renderItem._transparent = transparent;
+ renderItem._version = version;
+ _renderQueue->push_back(renderItem);
+
+}
+
+void Screen::blitRenderItem(const RenderItem &renderItem, const Common::Rect &clipRect) {
+
+ const Graphics::Surface *surface = renderItem._surface;
+ const Graphics::Surface *shadowSurface = renderItem._shadowSurface;
+ const int16 x0 = MAX<int16>(clipRect.left, renderItem._destX);
+ const int16 y0 = MAX<int16>(clipRect.top, renderItem._destY);
+ const int16 x1 = MIN<int16>(clipRect.right, renderItem._destX + renderItem._width);
+ const int16 y1 = MIN<int16>(clipRect.bottom, renderItem._destY + renderItem._height);
+ const int16 width = x1 - x0;
+ int16 height = y1 - y0;
+
+ if (width < 0 || height < 0)
+ return;
+
+ const byte *source = (const byte*)surface->getBasePtr(renderItem._srcX + x0 - renderItem._destX, renderItem._srcY + y0 - renderItem._destY);
+ byte *dest = (byte*)_backScreen->getBasePtr(x0, y0);
+
+ if (shadowSurface) {
+ const byte *shadowSource = (const byte*)shadowSurface->getBasePtr(x0, y0);
+ while (height--) {
+ for (int xc = 0; xc < width; xc++)
+ if (source[xc] != 0)
+ dest[xc] = shadowSource[xc];
+ source += surface->pitch;
+ shadowSource += shadowSurface->pitch;
+ dest += _backScreen->pitch;
+ }
+ } else if (!renderItem._transparent) {
+ while (height--) {
+ memcpy(dest, source, width);
+ source += surface->pitch;
+ dest += _backScreen->pitch;
+ }
+ } else {
+ while (height--) {
+ for (int xc = 0; xc < width; xc++)
+ if (source[xc] != 0)
+ dest[xc] = source[xc];
+ source += surface->pitch;
+ dest += _backScreen->pitch;
+ }
+ }
+
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/screen.h b/engines/neverhood/screen.h
new file mode 100644
index 0000000000..c778066152
--- /dev/null
+++ b/engines/neverhood/screen.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 NEVERHOOD_SCREEN_H
+#define NEVERHOOD_SCREEN_H
+
+#include "common/array.h"
+#include "graphics/surface.h"
+#include "video/smk_decoder.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/microtiles.h"
+#include "neverhood/graphics.h"
+
+namespace Neverhood {
+
+struct RenderItem {
+ const Graphics::Surface *_surface;
+ const Graphics::Surface *_shadowSurface;
+ int16 _destX, _destY;
+ int16 _srcX, _srcY, _width, _height;
+ bool _transparent;
+ byte _version;
+ bool _refresh;
+ bool operator==(const RenderItem &second) const {
+ return
+ _surface == second._surface &&
+ _shadowSurface == second._shadowSurface &&
+ _destX == second._destX &&
+ _destY == second._destY &&
+ _srcX == second._srcX &&
+ _srcY == second._srcY &&
+ _width == second._width &&
+ _height == second._height &&
+ _transparent == second._transparent &&
+ _version == second._version;
+ }
+};
+
+typedef Common::Array<RenderItem> RenderQueue;
+
+class Screen {
+public:
+ Screen(NeverhoodEngine *vm);
+ ~Screen();
+ void update();
+ uint32 getNextFrameTime();
+ void saveParams();
+ void restoreParams();
+ void setFps(int fps);
+ int getFps();
+ void setYOffset(int16 yOffset);
+ int16 getYOffset();
+ void setPaletteData(byte *paletteData);
+ void unsetPaletteData(byte *paletteData);
+ byte *getPaletteData() { return _paletteData; }
+ void testPalette(byte *paletteData);
+ void updatePalette();
+ void clear();
+ void clearRenderQueue();
+ void drawSurface2(const Graphics::Surface *surface, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version,
+ const Graphics::Surface *shadowSurface = NULL);
+ void drawSurface3(const Graphics::Surface *surface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect, bool transparent, byte version);
+ void drawShadowSurface(const Graphics::Surface *surface, const Graphics::Surface *shadowSurface, int16 x, int16 y, NDrawRect &drawRect, NRect &clipRect);
+ void drawDoubleSurface2(const Graphics::Surface *surface, NDrawRect &drawRect);
+ void drawUnk(const Graphics::Surface *surface, NDrawRect &drawRect, NDrawRect &sysRect, NRect &clipRect, bool transparent, byte version);
+ void drawSurfaceClipRects(const Graphics::Surface *surface, NDrawRect &drawRect, NRect *clipRects, uint clipRectsCount, bool transparent, byte version);
+ void setSmackerDecoder(Video::SmackerDecoder *smackerDecoder) { _smackerDecoder = smackerDecoder; }
+ void queueBlit(const Graphics::Surface *surface, int16 destX, int16 destY, NRect &ddRect, bool transparent, byte version,
+ const Graphics::Surface *shadowSurface = NULL);
+ void blitRenderItem(const RenderItem &renderItem, const Common::Rect &clipRect);
+protected:
+ NeverhoodEngine *_vm;
+ MicroTileArray *_microTiles;
+ Graphics::Surface *_backScreen;
+ Video::SmackerDecoder *_smackerDecoder, *_savedSmackerDecoder;
+ int32 _ticks;
+ int32 _frameDelay, _savedFrameDelay;
+ byte *_paletteData;
+ bool _paletteChanged;
+ int16 _yOffset, _savedYOffset;
+ bool _fullRefresh;
+ RenderQueue *_renderQueue, *_prevRenderQueue;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SCREEN_H */
diff --git a/engines/neverhood/smackerplayer.cpp b/engines/neverhood/smackerplayer.cpp
new file mode 100644
index 0000000000..21d8851f48
--- /dev/null
+++ b/engines/neverhood/smackerplayer.cpp
@@ -0,0 +1,257 @@
+/* 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/palette.h"
+#include "neverhood/smackerplayer.h"
+#include "neverhood/palette.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+// SmackerSurface
+
+SmackerSurface::SmackerSurface(NeverhoodEngine *vm)
+ : BaseSurface(vm, 0, 0, 0, "smacker"), _smackerFrame(NULL) {
+}
+
+void SmackerSurface::draw() {
+ if (_smackerFrame && _visible && _drawRect.width > 0 && _drawRect.height > 0)
+ _vm->_screen->drawSurface2(_smackerFrame, _drawRect, _clipRect, false, ++_version);
+}
+
+void SmackerSurface::setSmackerFrame(const Graphics::Surface *smackerFrame) {
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = smackerFrame->w;
+ _drawRect.height = smackerFrame->h;
+ _sysRect.x = 0;
+ _sysRect.y = 0;
+ _sysRect.width = (smackerFrame->w + 3) & 0xFFFC; // align by 4 bytes
+ _sysRect.height = smackerFrame->h;
+ _smackerFrame = smackerFrame;
+}
+
+void SmackerSurface::unsetSmackerFrame() {
+ _drawRect.x = 0;
+ _drawRect.y = 0;
+ _drawRect.width = 0;
+ _drawRect.height = 0;
+ _sysRect.x = 0;
+ _sysRect.y = 0;
+ _sysRect.width = 0;
+ _sysRect.height = 0;
+ _smackerFrame = NULL;
+}
+
+// SmackerDoubleSurface
+
+SmackerDoubleSurface::SmackerDoubleSurface(NeverhoodEngine *vm)
+ : SmackerSurface(vm) {
+}
+
+void SmackerDoubleSurface::draw() {
+ if (_smackerFrame && _visible && _drawRect.width > 0 && _drawRect.height > 0)
+ _vm->_screen->drawDoubleSurface2(_smackerFrame, _drawRect);
+}
+
+// NeverhoodSmackerDecoder
+
+void NeverhoodSmackerDecoder::forceSeekToFrame(uint frame) {
+ if (!isVideoLoaded())
+ return;
+
+ if (frame >= getFrameCount())
+ error("Can't force Smacker seek to invalid frame %d", frame);
+
+ if (_header.audioInfo[0].hasAudio)
+ error("Can't force Smacker frame seek with audio");
+ if (!rewind())
+ error("Failed to rewind");
+
+ SmackerVideoTrack *videoTrack = (SmackerVideoTrack *)getTrack(0);
+ uint32 offset = 0;
+ for (uint32 i = 0; i < frame; i++) {
+ videoTrack->increaseCurFrame();
+ offset += _frameSizes[i] & ~3;
+ }
+
+ _fileStream->seek(offset, SEEK_CUR);
+}
+
+// SmackerPlayer
+
+SmackerPlayer::SmackerPlayer(NeverhoodEngine *vm, Scene *scene, uint32 fileHash, bool doubleSurface, bool flag, bool paused)
+ : Entity(vm, 0), _scene(scene), _doubleSurface(doubleSurface), _videoDone(false), _paused(paused),
+ _palette(NULL), _smackerDecoder(NULL), _smackerSurface(NULL), _stream(NULL), _smackerFirst(true),
+ _drawX(-1), _drawY(-1) {
+
+ SetUpdateHandler(&SmackerPlayer::update);
+
+ if (_doubleSurface) {
+ _smackerSurface = new SmackerDoubleSurface(_vm);
+ } else {
+ _smackerSurface = new SmackerSurface(_vm);
+ }
+
+ open(fileHash, flag);
+}
+
+SmackerPlayer::~SmackerPlayer() {
+ close();
+ delete _smackerSurface;
+ _smackerSurface = NULL;
+}
+
+void SmackerPlayer::open(uint32 fileHash, bool keepLastFrame) {
+ debug(0, "SmackerPlayer::open(%08X)", fileHash);
+
+ _fileHash = fileHash;
+ _keepLastFrame = keepLastFrame;
+
+ close();
+
+ _smackerFirst = true;
+
+ _stream = _vm->_res->createStream(fileHash);
+
+ _smackerDecoder = new NeverhoodSmackerDecoder();
+ _smackerDecoder->loadStream(_stream);
+
+ _palette = new Palette(_vm);
+ _palette->usePalette();
+
+ if (!_paused)
+ _smackerDecoder->start();
+
+}
+
+void SmackerPlayer::close() {
+ if (_smackerDecoder)
+ _smackerDecoder->stop();
+ delete _smackerDecoder;
+ delete _palette;
+ // NOTE The SmackerDecoder deletes the _stream
+ _smackerDecoder = NULL;
+ _palette = NULL;
+ _stream = NULL;
+ _smackerSurface->unsetSmackerFrame();
+}
+
+void SmackerPlayer::gotoFrame(int frameNumber) {
+ if (_smackerDecoder) {
+ _smackerDecoder->forceSeekToFrame(frameNumber);
+ _smackerDecoder->decodeNextFrame();
+ }
+}
+
+uint32 SmackerPlayer::getFrameCount() {
+ return _smackerDecoder ? _smackerDecoder->getFrameCount() : 0;
+}
+
+uint32 SmackerPlayer::getFrameNumber() {
+ return _smackerDecoder ? _smackerDecoder->getCurFrame() : 0;
+}
+
+uint SmackerPlayer::getStatus() {
+ return 0;
+}
+
+void SmackerPlayer::setDrawPos(int16 x, int16 y) {
+ _drawX = x;
+ _drawY = y;
+ if (_smackerSurface) {
+ _smackerSurface->getDrawRect().x = _drawX;
+ _smackerSurface->getDrawRect().y = _drawY;
+ }
+}
+
+void SmackerPlayer::rewind() {
+ if (_smackerDecoder)
+ _smackerDecoder->rewind();
+}
+
+void SmackerPlayer::update() {
+
+ if (!_smackerDecoder)
+ return;
+
+ if (_paused) {
+ if (_smackerFirst)
+ updateFrame();
+ } else {
+ if (!_smackerDecoder->endOfVideo()) {
+ updateFrame();
+ } else if (!_keepLastFrame) {
+ // Inform the scene about the end of the video playback
+ if (_scene)
+ sendMessage(_scene, 0x3002, 0);
+ _videoDone = true;
+ } else {
+ rewind();
+ updateFrame();
+ _videoDone = false;
+ }
+ }
+
+}
+
+void SmackerPlayer::updateFrame() {
+
+ if (!_smackerDecoder || !_smackerSurface)
+ return;
+
+ const Graphics::Surface *smackerFrame = _smackerDecoder->decodeNextFrame();
+
+ if (_smackerFirst) {
+ _smackerSurface->setSmackerFrame(smackerFrame);
+ if (_drawX < 0 || _drawY < 0) {
+ if (_doubleSurface) {
+ _drawX = 320 - _smackerDecoder->getWidth();
+ _drawY = 240 - _smackerDecoder->getHeight();
+ } else {
+ _drawX = (640 - _smackerDecoder->getWidth()) / 2;
+ _drawY = (480 - _smackerDecoder->getHeight()) / 2;
+ }
+ }
+ _smackerSurface->getDrawRect().x = _drawX;
+ _smackerSurface->getDrawRect().y = _drawY;
+ _smackerFirst = false;
+ }
+
+ if (_smackerDecoder->hasDirtyPalette())
+ updatePalette();
+
+}
+
+void SmackerPlayer::updatePalette() {
+ byte tempPalette[1024];
+ const byte *smackerPalette = _smackerDecoder->getPalette();
+ for (int i = 0; i < 256; i++) {
+ tempPalette[i * 4 + 0] = smackerPalette[i * 3 + 0];
+ tempPalette[i * 4 + 1] = smackerPalette[i * 3 + 1];
+ tempPalette[i * 4 + 2] = smackerPalette[i * 3 + 2];
+ }
+ _palette->copyPalette(tempPalette, 0, 256, 0);
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/smackerplayer.h b/engines/neverhood/smackerplayer.h
new file mode 100644
index 0000000000..f13b653757
--- /dev/null
+++ b/engines/neverhood/smackerplayer.h
@@ -0,0 +1,91 @@
+/* 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 NEVERHOOD_SMACKERPLAYER_H
+#define NEVERHOOD_SMACKERPLAYER_H
+
+#include "video/smk_decoder.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/entity.h"
+
+namespace Neverhood {
+
+class Scene;
+class Palette;
+
+class SmackerSurface : public BaseSurface {
+public:
+ SmackerSurface(NeverhoodEngine *vm);
+ virtual void draw();
+ void setSmackerFrame(const Graphics::Surface *smackerFrame);
+ void unsetSmackerFrame();
+protected:
+ const Graphics::Surface *_smackerFrame;
+};
+
+class SmackerDoubleSurface : public SmackerSurface {
+public:
+ SmackerDoubleSurface(NeverhoodEngine *vm);
+ virtual void draw();
+};
+
+class NeverhoodSmackerDecoder : public Video::SmackerDecoder {
+public:
+ void forceSeekToFrame(uint frame);
+};
+
+class SmackerPlayer : public Entity {
+public:
+ SmackerPlayer(NeverhoodEngine *vm, Scene *scene, uint32 fileHash, bool doubleSurface, bool flag, bool paused = false);
+ ~SmackerPlayer();
+ BaseSurface *getSurface() { return _smackerSurface; }
+ void open(uint32 fileHash, bool keepLastFrame);
+ void close();
+ void gotoFrame(int frameNumber);
+ uint32 getFrameCount();
+ uint32 getFrameNumber();
+ uint getStatus();
+ void setDrawPos(int16 x, int16 y);
+ void rewind();
+ bool isDone() { return getFrameNumber() + 1 == getFrameCount(); }
+ NeverhoodSmackerDecoder *getSmackerDecoder() const { return _smackerDecoder; }
+protected:
+ Scene *_scene;
+ Palette *_palette;
+ NeverhoodSmackerDecoder *_smackerDecoder;
+ SmackerSurface *_smackerSurface;
+ uint32 _fileHash;
+ bool _smackerFirst;
+ bool _doubleSurface;
+ Common::SeekableReadStream *_stream;
+ bool _keepLastFrame;
+ bool _videoDone;
+ bool _paused;
+ int _drawX, _drawY;
+ void update();
+ void updateFrame();
+ void updatePalette();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SMACKERPLAYER_H */
diff --git a/engines/neverhood/smackerscene.cpp b/engines/neverhood/smackerscene.cpp
new file mode 100644
index 0000000000..115aafe5be
--- /dev/null
+++ b/engines/neverhood/smackerscene.cpp
@@ -0,0 +1,122 @@
+/* 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 "neverhood/smackerscene.h"
+
+namespace Neverhood {
+
+SmackerScene::SmackerScene(NeverhoodEngine *vm, Module *parentModule, bool doubleSurface, bool canSkip, bool canAbort)
+ : Scene(vm, parentModule), _doubleSurface(doubleSurface), _canSkip(canSkip), _canAbort(canAbort), _videoPlayedBefore(false),
+ _fileHashListIndex(-1), _fileHashList(NULL), _playNextVideoFlag(false) {
+
+ debug(0, "SmackerScene::SmackerScene(%d, %d, %d)", doubleSurface, canSkip, canAbort);
+
+ // NOTE: Merged from SmackerScene::init, maybe split again if needed (incl. parameter flags)
+
+ if (getGlobalVar(V_SMACKER_CAN_ABORT)) {
+ _canSkip = true;
+ _canAbort = true;
+ }
+
+ if (!_doubleSurface)
+ _vm->_screen->clear();
+
+ _fileHash[0] = 0;
+ _fileHash[1] = 0;
+
+ SetUpdateHandler(&SmackerScene::update);
+ SetMessageHandler(&SmackerScene::handleMessage);
+
+}
+
+SmackerScene::~SmackerScene() {
+
+}
+
+void SmackerScene::setFileHash(uint32 fileHash) {
+ debug(0, "SmackerScene::setFileHash(%08X)", fileHash);
+ _fileHash[0] = fileHash;
+ _fileHashList = _fileHash;
+}
+
+void SmackerScene::setFileHashList(const uint32 *fileHashList) {
+ debug(0, "SmackerScene::setFileHashList(...)");
+ _fileHashList = fileHashList;
+}
+
+void SmackerScene::nextVideo() {
+ debug(0, "SmackerScene::nextVideo()");
+
+ _fileHashListIndex++;
+
+ if (_fileHashList && _fileHashList[_fileHashListIndex] != 0) {
+ uint32 smackerFileHash = _fileHashList[_fileHashListIndex];
+ ResourceHandle resourceHandle;
+ _vm->_res->queryResource(smackerFileHash, resourceHandle);
+ if (resourceHandle.type() != kResTypeVideo) {
+ // Not a Smacker file
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, 0);
+ return;
+ }
+ _videoPlayedBefore = getSubVar(VA_SMACKER_PLAYED, smackerFileHash);
+ if (!_videoPlayedBefore)
+ setSubVar(VA_SMACKER_PLAYED, smackerFileHash, 1);
+ if (_fileHashListIndex == 0)
+ _smackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, smackerFileHash, _doubleSurface, false));
+ else
+ _smackerPlayer->open(smackerFileHash, false);
+ _vm->_screen->setSmackerDecoder(_smackerPlayer->getSmackerDecoder());
+ } else {
+ _vm->_screen->setSmackerDecoder(NULL);
+ sendMessage(_parentModule, 0x1009, 0);
+ }
+
+}
+
+void SmackerScene::update() {
+ if (_playNextVideoFlag) {
+ nextVideo();
+ _playNextVideoFlag = false;
+ }
+ Scene::update();
+}
+
+uint32 SmackerScene::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ uint32 messageResult = Scene::handleMessage(messageNum, param, sender);
+ switch (messageNum) {
+ case 0x0009:
+ if ((_videoPlayedBefore && _canSkip) || (_canAbort && _canSkip))
+ _playNextVideoFlag = true;
+ break;
+ case 0x000C:
+ if (_canAbort)
+ sendMessage(_parentModule, 0x1009, 0);
+ break;
+ case 0x3002:
+ _playNextVideoFlag = true;
+ break;
+ }
+ return messageResult;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/smackerscene.h b/engines/neverhood/smackerscene.h
new file mode 100644
index 0000000000..7ed2e0262b
--- /dev/null
+++ b/engines/neverhood/smackerscene.h
@@ -0,0 +1,54 @@
+/* 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 NEVERHOOD_SMACKERSCENE_H
+#define NEVERHOOD_SMACKERSCENE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/resourceman.h"
+#include "neverhood/scene.h"
+
+namespace Neverhood {
+
+class SmackerScene : public Scene {
+public:
+ SmackerScene(NeverhoodEngine *vm, Module *parentModule, bool doubleSurface, bool canSkip, bool canAbort);
+ virtual ~SmackerScene();
+ void setFileHash(uint32 fileHash);
+ void setFileHashList(const uint32 *fileHashList);
+ void nextVideo();
+protected:
+ bool _doubleSurface;
+ bool _canSkip;
+ bool _canAbort;
+ bool _videoPlayedBefore;
+ bool _playNextVideoFlag;
+ int _fileHashListIndex;
+ const uint32 *_fileHashList;
+ uint32 _fileHash[2];
+ void update();
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SMACKERSCENE_H */
diff --git a/engines/neverhood/sound.cpp b/engines/neverhood/sound.cpp
new file mode 100644
index 0000000000..46ec8007b0
--- /dev/null
+++ b/engines/neverhood/sound.cpp
@@ -0,0 +1,818 @@
+/* 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/memstream.h"
+#include "graphics/palette.h"
+#include "neverhood/sound.h"
+#include "neverhood/resourceman.h"
+
+namespace Neverhood {
+
+SoundResource::SoundResource(NeverhoodEngine *vm)
+ : _vm(vm), _soundIndex(-1) {
+}
+
+SoundResource::~SoundResource() {
+ unload();
+}
+
+bool SoundResource::isPlaying() {
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ return soundItem ? soundItem->isPlaying() : false;
+}
+
+void SoundResource::load(uint32 fileHash) {
+ unload();
+ _soundIndex = _vm->_audioResourceMan->addSound(fileHash);
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ if (soundItem)
+ soundItem->loadSound();
+}
+
+void SoundResource::unload() {
+ if (_soundIndex >= 0) {
+ _vm->_audioResourceMan->removeSound(_soundIndex);
+ _soundIndex = -1;
+ }
+}
+
+void SoundResource::play(uint32 fileHash) {
+ load(fileHash);
+ play();
+}
+
+void SoundResource::play() {
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ if (soundItem)
+ soundItem->playSound(false);
+}
+
+void SoundResource::stop() {
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ if (soundItem)
+ soundItem->stopSound();
+}
+
+void SoundResource::setVolume(int16 volume) {
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ if (soundItem)
+ soundItem->setVolume(volume);
+}
+
+void SoundResource::setPan(int16 pan) {
+ AudioResourceManSoundItem *soundItem = getSoundItem();
+ if (soundItem)
+ soundItem->setPan(pan);
+}
+
+AudioResourceManSoundItem *SoundResource::getSoundItem() {
+ return _vm->_audioResourceMan->getSoundItem(_soundIndex);
+}
+
+MusicResource::MusicResource(NeverhoodEngine *vm)
+ : _vm(vm), _musicIndex(-1) {
+}
+
+bool MusicResource::isPlaying() {
+ AudioResourceManMusicItem *musicItem = getMusicItem();
+ return musicItem && musicItem->isPlaying();
+}
+
+void MusicResource::load(uint32 fileHash) {
+ unload();
+ _musicIndex = _vm->_audioResourceMan->loadMusic(fileHash);
+}
+
+void MusicResource::unload() {
+ AudioResourceManMusicItem *musicItem = getMusicItem();
+ if (musicItem) {
+ musicItem->unloadMusic();
+ _musicIndex = -1;
+ }
+}
+
+void MusicResource::play(int16 fadeVolumeStep) {
+ AudioResourceManMusicItem *musicItem = getMusicItem();
+ if (musicItem)
+ musicItem->playMusic(fadeVolumeStep);
+}
+
+void MusicResource::stop(int16 fadeVolumeStep) {
+ AudioResourceManMusicItem *musicItem = getMusicItem();
+ if (musicItem)
+ musicItem->stopMusic(fadeVolumeStep);
+}
+
+void MusicResource::setVolume(int16 volume) {
+ AudioResourceManMusicItem *musicItem = getMusicItem();
+ if (musicItem)
+ musicItem->setVolume(volume);
+}
+
+AudioResourceManMusicItem *MusicResource::getMusicItem() {
+ return _vm->_audioResourceMan->getMusicItem(_musicIndex);
+}
+
+MusicItem::MusicItem(NeverhoodEngine *vm, uint32 groupNameHash, uint32 musicFileHash)
+ : _vm(vm), _musicResource(NULL) {
+
+ _groupNameHash = groupNameHash;
+ _fileHash = musicFileHash;
+ _play = false;
+ _stop = false;
+ _fadeVolumeStep = 0;
+ _countdown = 24;
+ _musicResource = new MusicResource(_vm);
+ _musicResource->load(musicFileHash);
+}
+
+MusicItem::~MusicItem() {
+ if (_musicResource)
+ _musicResource->unload();
+ delete _musicResource;
+}
+
+void MusicItem::startMusic(int16 countdown, int16 fadeVolumeStep) {
+ _play = true;
+ _stop = false;
+ _countdown = countdown;
+ _fadeVolumeStep = fadeVolumeStep;
+}
+
+void MusicItem::stopMusic(int16 countdown, int16 fadeVolumeStep) {
+ _play = false;
+ _stop = true;
+ _countdown = countdown;
+ _fadeVolumeStep = fadeVolumeStep;
+}
+
+void MusicItem::update() {
+ if (_countdown) {
+ --_countdown;
+ } else if (_play && !_musicResource->isPlaying()) {
+ debug(1, "MusicItem: play music %08X (fade %d)", _fileHash, _fadeVolumeStep);
+ _musicResource->play(_fadeVolumeStep);
+ _fadeVolumeStep = 0;
+ } else if (_stop) {
+ debug(1, "MusicItem: stop music %08X (fade %d)", _fileHash, _fadeVolumeStep);
+ _musicResource->stop(_fadeVolumeStep);
+ _fadeVolumeStep = 0;
+ _stop = false;
+ }
+}
+
+SoundItem::SoundItem(NeverhoodEngine *vm, uint32 groupNameHash, uint32 soundFileHash,
+ bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown,
+ bool playOnceAfterCountdown, int16 initialCountdown, bool playLooping, int16 currCountdown)
+ : _vm(vm), _soundResource(NULL), _groupNameHash(groupNameHash), _fileHash(soundFileHash),
+ _playOnceAfterRandomCountdown(false), _minCountdown(0), _maxCountdown(0),
+ _playOnceAfterCountdown(playOnceAfterCountdown), _initialCountdown(initialCountdown),
+ _playLooping(false), _currCountdown(currCountdown) {
+
+ _soundResource = new SoundResource(vm);
+ _soundResource->load(soundFileHash);
+}
+
+SoundItem::~SoundItem() {
+ if (_soundResource)
+ _soundResource->unload();
+ delete _soundResource;
+}
+
+void SoundItem::setSoundParams(bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown,
+ int16 firstMinCountdown, int16 firstMaxCountdown) {
+
+ _playOnceAfterCountdown = false;
+ _playLooping = false;
+ _playOnceAfterRandomCountdown = playOnceAfterRandomCountdown;
+ if (minCountdown > 0)
+ _minCountdown = minCountdown;
+ if (maxCountdown > 0)
+ _maxCountdown = maxCountdown;
+ if (firstMinCountdown >= firstMaxCountdown)
+ _currCountdown = firstMinCountdown;
+ else if (firstMinCountdown > 0 && firstMaxCountdown > 0 && firstMinCountdown < firstMaxCountdown)
+ _currCountdown = _vm->_rnd->getRandomNumberRng(firstMinCountdown, firstMaxCountdown);
+}
+
+void SoundItem::playSoundLooping() {
+ _playOnceAfterRandomCountdown = false;
+ _playOnceAfterCountdown = false;
+ _playLooping = true;
+}
+
+void SoundItem::stopSound() {
+ _playOnceAfterRandomCountdown = false;
+ _playOnceAfterCountdown = false;
+ _playLooping = false;
+ _soundResource->stop();
+}
+
+void SoundItem::setVolume(int volume) {
+ _soundResource->setVolume(volume);
+}
+
+void SoundItem::update() {
+ if (_playOnceAfterCountdown) {
+ if (_currCountdown == 0)
+ _currCountdown = _initialCountdown;
+ else if (--_currCountdown == 0)
+ _soundResource->play();
+ } else if (_playOnceAfterRandomCountdown) {
+ if (_currCountdown == 0) {
+ if (_minCountdown > 0 && _maxCountdown > 0 && _minCountdown < _maxCountdown)
+ _currCountdown = _vm->_rnd->getRandomNumberRng(_minCountdown, _maxCountdown);
+ } else if (--_currCountdown == 0)
+ _soundResource->play();
+ } else if (_playLooping && !_soundResource->isPlaying())
+ _soundResource->play();
+}
+
+// SoundMan
+
+SoundMan::SoundMan(NeverhoodEngine *vm)
+ : _vm(vm), _soundIndex1(-1), _soundIndex2(-1), _soundIndex3(-1) {
+}
+
+SoundMan::~SoundMan() {
+ stopAllSounds();
+}
+
+void SoundMan::stopAllSounds() {
+ for (uint i = 0; i < _soundItems.size(); ++i) {
+ if (_soundItems[i]) {
+ _soundItems[i]->stopSound();
+ delete _soundItems[i];
+ _soundItems[i] = NULL;
+ }
+ }
+ for (uint i = 0; i < _musicItems.size(); ++i) {
+ if (_musicItems[i]) {
+ _musicItems[i]->stopMusic(0, 0);
+ delete _musicItems[i];
+ _musicItems[i] = NULL;
+ }
+ }
+
+ _soundIndex1 = _soundIndex2 = _soundIndex3 = -1;
+}
+
+void SoundMan::addMusic(uint32 groupNameHash, uint32 musicFileHash) {
+ addMusicItem(new MusicItem(_vm, groupNameHash, musicFileHash));
+}
+
+void SoundMan::deleteMusic(uint32 musicFileHash) {
+ MusicItem *musicItem = getMusicItemByHash(musicFileHash);
+ if (musicItem) {
+ delete musicItem;
+ for (uint i = 0; i < _musicItems.size(); ++i)
+ if (_musicItems[i] == musicItem) {
+ _musicItems[i] = NULL;
+ break;
+ }
+ }
+}
+
+void SoundMan::startMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep) {
+ MusicItem *musicItem = getMusicItemByHash(musicFileHash);
+ if (musicItem)
+ musicItem->startMusic(countdown, fadeVolumeStep);
+}
+
+void SoundMan::stopMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep) {
+ MusicItem *musicItem = getMusicItemByHash(musicFileHash);
+ if (musicItem)
+ musicItem->stopMusic(countdown, fadeVolumeStep);
+}
+
+void SoundMan::addSound(uint32 groupNameHash, uint32 soundFileHash) {
+ addSoundItem(new SoundItem(_vm, groupNameHash, soundFileHash, false, 50, 600, false, 0, false, 0));
+}
+
+void SoundMan::addSoundList(uint32 groupNameHash, const uint32 *soundFileHashList) {
+ while (*soundFileHashList)
+ addSound(groupNameHash, *soundFileHashList++);
+}
+
+void SoundMan::deleteSound(uint32 soundFileHash) {
+ SoundItem *soundItem = getSoundItemByHash(soundFileHash);
+ if (soundItem) {
+ delete soundItem;
+ for (uint i = 0; i < _soundItems.size(); ++i)
+ if (_soundItems[i] == soundItem) {
+ _soundItems[i] = NULL;
+ break;
+ }
+ }
+}
+
+void SoundMan::setSoundParams(uint32 soundFileHash, bool playOnceAfterRandomCountdown,
+ int16 minCountdown, int16 maxCountdown, int16 firstMinCountdown, int16 firstMaxCountdown) {
+
+ SoundItem *soundItem = getSoundItemByHash(soundFileHash);
+ if (soundItem)
+ soundItem->setSoundParams(playOnceAfterRandomCountdown, minCountdown, maxCountdown,
+ firstMinCountdown, firstMaxCountdown);
+}
+
+void SoundMan::setSoundListParams(const uint32 *soundFileHashList, bool playOnceAfterRandomCountdown,
+ int16 minCountdown, int16 maxCountdown, int16 firstMinCountdown, int16 firstMaxCountdown) {
+
+ while (*soundFileHashList)
+ setSoundParams(*soundFileHashList++, playOnceAfterRandomCountdown,
+ minCountdown, maxCountdown, firstMinCountdown, firstMaxCountdown);
+}
+
+void SoundMan::playSoundLooping(uint32 soundFileHash) {
+ SoundItem *soundItem = getSoundItemByHash(soundFileHash);
+ if (soundItem)
+ soundItem->playSoundLooping();
+}
+
+void SoundMan::stopSound(uint32 soundFileHash) {
+ SoundItem *soundItem = getSoundItemByHash(soundFileHash);
+ if (soundItem)
+ soundItem->stopSound();
+}
+
+void SoundMan::setSoundVolume(uint32 soundFileHash, int volume) {
+ SoundItem *soundItem = getSoundItemByHash(soundFileHash);
+ if (soundItem)
+ soundItem->setVolume(volume);
+}
+
+void SoundMan::update() {
+
+ for (uint i = 0; i < _soundItems.size(); ++i) {
+ SoundItem *soundItem = _soundItems[i];
+ if (soundItem)
+ soundItem->update();
+ }
+
+ for (uint i = 0; i < _musicItems.size(); ++i) {
+ MusicItem *musicItem = _musicItems[i];
+ if (musicItem)
+ musicItem->update();
+ }
+
+}
+
+void SoundMan::deleteGroup(uint32 groupNameHash) {
+ deleteMusicGroup(groupNameHash);
+ deleteSoundGroup(groupNameHash);
+}
+
+void SoundMan::deleteMusicGroup(uint32 groupNameHash) {
+ for (uint index = 0; index < _musicItems.size(); ++index) {
+ MusicItem *musicItem = _musicItems[index];
+ if (musicItem && musicItem->getGroupNameHash() == groupNameHash) {
+ delete musicItem;
+ _musicItems[index] = NULL;
+ }
+ }
+}
+
+void SoundMan::deleteSoundGroup(uint32 groupNameHash) {
+
+ if (_soundIndex1 != -1 && _soundItems[_soundIndex1]->getGroupNameHash() == groupNameHash) {
+ deleteSoundByIndex(_soundIndex1);
+ _soundIndex1 = -1;
+ }
+
+ if (_soundIndex2 != -1 && _soundItems[_soundIndex2]->getGroupNameHash() == groupNameHash) {
+ deleteSoundByIndex(_soundIndex2);
+ _soundIndex2 = -1;
+ }
+
+ for (uint index = 0; index < _soundItems.size(); ++index)
+ if (_soundItems[index] && _soundItems[index]->getGroupNameHash() == groupNameHash)
+ deleteSoundByIndex(index);
+
+}
+
+void SoundMan::playTwoSounds(uint32 groupNameHash, uint32 soundFileHash1, uint32 soundFileHash2, int16 initialCountdown) {
+
+ int16 currCountdown1 = _initialCountdown;
+ int16 currCountdown2 = _initialCountdown / 2;
+
+ if (_soundIndex1 != -1) {
+ currCountdown1 = _soundItems[_soundIndex1]->getCurrCountdown();
+ deleteSoundByIndex(_soundIndex1);
+ _soundIndex1 = -1;
+ }
+
+ if (_soundIndex2 != -1) {
+ currCountdown2 = _soundItems[_soundIndex2]->getCurrCountdown();
+ deleteSoundByIndex(_soundIndex2);
+ _soundIndex2 = -1;
+ }
+
+ if (initialCountdown > 0)
+ _initialCountdown = initialCountdown;
+
+ if (soundFileHash1 != 0) {
+ SoundItem *soundItem = new SoundItem(_vm, groupNameHash, soundFileHash1, false, 0, 0,
+ _playOnceAfterCountdown, _initialCountdown, false, currCountdown1);
+ soundItem->setVolume(80);
+ _soundIndex1 = addSoundItem(soundItem);
+ }
+
+ if (soundFileHash2 != 0) {
+ SoundItem *soundItem = new SoundItem(_vm, groupNameHash, soundFileHash2, false, 0, 0,
+ _playOnceAfterCountdown, _initialCountdown, false, currCountdown2);
+ soundItem->setVolume(80);
+ _soundIndex2 = addSoundItem(soundItem);
+ }
+
+}
+
+void SoundMan::playSoundThree(uint32 groupNameHash, uint32 soundFileHash) {
+
+ if (_soundIndex3 != -1) {
+ deleteSoundByIndex(_soundIndex3);
+ _soundIndex3 = -1;
+ }
+
+ if (soundFileHash != 0) {
+ SoundItem *soundItem = new SoundItem(_vm, groupNameHash, soundFileHash, false, 0, 0, false, _initialCountdown3, false, 0);
+ _soundIndex3 = addSoundItem(soundItem);
+ }
+
+}
+
+void SoundMan::setTwoSoundsPlayFlag(bool playOnceAfterCountdown) {
+ if (_soundIndex1 != -1)
+ _soundItems[_soundIndex1]->setPlayOnceAfterCountdown(playOnceAfterCountdown);
+ if (_soundIndex2 != -1)
+ _soundItems[_soundIndex2]->setPlayOnceAfterCountdown(playOnceAfterCountdown);
+ _playOnceAfterCountdown = playOnceAfterCountdown;
+}
+
+void SoundMan::setSoundThreePlayFlag(bool playOnceAfterCountdown) {
+ if (_soundIndex3 != -1)
+ _soundItems[_soundIndex3]->setPlayOnceAfterCountdown(playOnceAfterCountdown);
+ _playOnceAfterCountdown3 = playOnceAfterCountdown;
+}
+
+MusicItem *SoundMan::getMusicItemByHash(uint32 musicFileHash) {
+ for (uint i = 0; i < _musicItems.size(); ++i)
+ if (_musicItems[i] && _musicItems[i]->getFileHash() == musicFileHash)
+ return _musicItems[i];
+ return NULL;
+}
+
+SoundItem *SoundMan::getSoundItemByHash(uint32 soundFileHash) {
+ for (uint i = 0; i < _soundItems.size(); ++i)
+ if (_soundItems[i] && _soundItems[i]->getFileHash() == soundFileHash)
+ return _soundItems[i];
+ return NULL;
+}
+
+int16 SoundMan::addMusicItem(MusicItem *musicItem) {
+ for (uint i = 0; i < _musicItems.size(); ++i)
+ if (!_musicItems[i]) {
+ _musicItems[i] = musicItem;
+ return i;
+ }
+ int16 musicIndex = _musicItems.size();
+ _musicItems.push_back(musicItem);
+ return musicIndex;
+}
+
+int16 SoundMan::addSoundItem(SoundItem *soundItem) {
+ for (uint i = 0; i < _soundItems.size(); ++i)
+ if (!_soundItems[i]) {
+ _soundItems[i] = soundItem;
+ return i;
+ }
+ int16 soundIndex = _soundItems.size();
+ _soundItems.push_back(soundItem);
+ return soundIndex;
+}
+
+void SoundMan::deleteSoundByIndex(int index) {
+ delete _soundItems[index];
+ _soundItems[index] = NULL;
+}
+
+// NeverhoodAudioStream
+
+NeverhoodAudioStream::NeverhoodAudioStream(int rate, byte shiftValue, bool isLooping, DisposeAfterUse::Flag disposeStream, Common::SeekableReadStream *stream)
+ : _rate(rate), _shiftValue(shiftValue), _isLooping(isLooping), _isStereo(false), _stream(stream, disposeStream), _endOfData(false), _buffer(0),
+ _isCompressed(_shiftValue != 0xFF), _prevValue(0) {
+ // Setup our buffer for readBuffer
+ _buffer = new byte[kSampleBufferLength * (_isCompressed ? 1 : 2)];
+ assert(_buffer);
+}
+
+NeverhoodAudioStream::~NeverhoodAudioStream() {
+ delete[] _buffer;
+}
+
+int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) {
+ int samplesLeft = numSamples;
+
+ while (samplesLeft > 0 && !_endOfData) {
+
+ const int maxSamples = MIN<int>(kSampleBufferLength, samplesLeft);
+ const int bytesToRead = maxSamples * (_isCompressed ? 1 : 2);
+ int bytesRead = _stream->read(_buffer, bytesToRead);
+ int samplesRead = bytesRead / (_isCompressed ? 1 : 2);
+
+ samplesLeft -= samplesRead;
+
+ const byte *src = _buffer;
+ if (_isCompressed) {
+ while (samplesRead--) {
+ _prevValue += (int8)(*src++);
+ *buffer++ = _prevValue << _shiftValue;
+ }
+ } else {
+ memcpy(buffer, _buffer, bytesRead);
+ buffer += bytesRead;
+ }
+
+ if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) {
+ if (_isLooping)
+ _stream->seek(0);
+ else
+ _endOfData = true;
+ }
+
+ }
+
+ return numSamples - samplesLeft;
+}
+
+AudioResourceManSoundItem::AudioResourceManSoundItem(NeverhoodEngine *vm, uint32 fileHash)
+ : _vm(vm), _fileHash(fileHash), _data(NULL), _isLoaded(false), _isPlaying(false),
+ _volume(100), _panning(50) {
+
+ _vm->_res->queryResource(_fileHash, _resourceHandle);
+}
+
+void AudioResourceManSoundItem::loadSound() {
+ if (!_data && _resourceHandle.isValid() &&
+ (_resourceHandle.type() == kResTypeSound || _resourceHandle.type() == kResTypeMusic)) {
+ _vm->_res->loadResource(_resourceHandle);
+ _data = _resourceHandle.data();
+ }
+}
+
+void AudioResourceManSoundItem::unloadSound() {
+ if (_vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->stopHandle(_soundHandle);
+ _vm->_res->unloadResource(_resourceHandle);
+ _data = NULL;
+}
+
+void AudioResourceManSoundItem::setVolume(int16 volume) {
+ _volume = MIN<int16>(volume, 100);
+ if (_isPlaying && _vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->setChannelVolume(_soundHandle, VOLUME(_volume));
+}
+
+void AudioResourceManSoundItem::setPan(int16 pan) {
+ _panning = MIN<int16>(pan, 100);
+ if (_isPlaying && _vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->setChannelVolume(_soundHandle, PANNING(_panning));
+}
+
+void AudioResourceManSoundItem::playSound(bool looping) {
+ if (!_data)
+ loadSound();
+ if (_data) {
+ const byte *shiftValue = _resourceHandle.extData();
+ Common::MemoryReadStream *stream = new Common::MemoryReadStream(_data, _resourceHandle.size(), DisposeAfterUse::NO);
+ NeverhoodAudioStream *audioStream = new NeverhoodAudioStream(22050, *shiftValue, false, DisposeAfterUse::YES, stream);
+ _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle,
+ audioStream, -1, VOLUME(_volume), PANNING(_panning));
+ debug(1, "playing sound %08X", _fileHash);
+ _isPlaying = true;
+ }
+}
+
+void AudioResourceManSoundItem::stopSound() {
+ if (_vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->stopHandle(_soundHandle);
+ _isPlaying = false;
+}
+
+bool AudioResourceManSoundItem::isPlaying() {
+ return _vm->_mixer->isSoundHandleActive(_soundHandle);
+}
+
+AudioResourceManMusicItem::AudioResourceManMusicItem(NeverhoodEngine *vm, uint32 fileHash)
+ : _vm(vm), _fileHash(fileHash), _terminate(false), _canRestart(false),
+ _volume(100), _panning(50), _start(false), _isFadingIn(false), _isFadingOut(false), _isPlaying(false) {
+
+}
+
+void AudioResourceManMusicItem::playMusic(int16 fadeVolumeStep) {
+ if (!_isPlaying) {
+ _isFadingIn = false;
+ _isFadingOut = false;
+ if (fadeVolumeStep != 0) {
+ _isFadingIn = true;
+ _fadeVolume = 0;
+ _fadeVolumeStep = fadeVolumeStep;
+ }
+ _start = true;
+ _terminate = false;
+ }
+}
+
+void AudioResourceManMusicItem::stopMusic(int16 fadeVolumeStep) {
+ if (_vm->_mixer->isSoundHandleActive(_soundHandle)) {
+ if (fadeVolumeStep != 0) {
+ if (_isFadingIn)
+ _isFadingIn = false;
+ else
+ _fadeVolume = _volume;
+ _isFadingOut = true;
+ _fadeVolumeStep = fadeVolumeStep;
+ } else {
+ _vm->_mixer->stopHandle(_soundHandle);
+ }
+ _isPlaying = false;
+ }
+}
+
+void AudioResourceManMusicItem::unloadMusic() {
+ if (_isFadingOut) {
+ _canRestart = true;
+ } else {
+ if (_vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->stopHandle(_soundHandle);
+ _isPlaying = false;
+ _terminate = true;
+ }
+}
+
+void AudioResourceManMusicItem::setVolume(int16 volume) {
+ _volume = MIN<int16>(volume, 100);
+ if (_isPlaying && _vm->_mixer->isSoundHandleActive(_soundHandle))
+ _vm->_mixer->setChannelVolume(_soundHandle, VOLUME(_volume));
+}
+
+void AudioResourceManMusicItem::restart() {
+ _canRestart = false;
+ _isFadingOut = false;
+ _isFadingIn = true;
+}
+
+void AudioResourceManMusicItem::update() {
+
+ if (_start && !_vm->_mixer->isSoundHandleActive(_soundHandle)) {
+ ResourceHandle resourceHandle;
+ _vm->_res->queryResource(_fileHash, resourceHandle);
+ Common::SeekableReadStream *stream = _vm->_res->createStream(_fileHash);
+ const byte *shiftValue = resourceHandle.extData();
+ NeverhoodAudioStream *audioStream = new NeverhoodAudioStream(22050, *shiftValue, true, DisposeAfterUse::YES, stream);
+ _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle,
+ audioStream, -1, VOLUME(_isFadingIn ? _fadeVolume : _volume),
+ PANNING(_panning));
+ _start = false;
+ _isPlaying = true;
+ }
+
+ if (_vm->_mixer->isSoundHandleActive(_soundHandle)) {
+ if (_isFadingIn) {
+ _fadeVolume += _fadeVolumeStep;
+ if (_fadeVolume >= _volume) {
+ _fadeVolume = _volume;
+ _isFadingIn = false;
+ }
+ _vm->_mixer->setChannelVolume(_soundHandle, VOLUME(_fadeVolume));
+ }
+ if (_isFadingOut) {
+ _fadeVolume -= _fadeVolumeStep;
+ if (_fadeVolume < 0)
+ _fadeVolume = 0;
+ _vm->_mixer->setChannelVolume(_soundHandle, VOLUME(_fadeVolume));
+ if (_fadeVolume == 0) {
+ _isFadingOut = false;
+ stopMusic(0);
+ if (_canRestart)
+ unloadMusic();
+ }
+ }
+ }
+
+}
+
+AudioResourceMan::AudioResourceMan(NeverhoodEngine *vm)
+ : _vm(vm) {
+}
+
+void AudioResourceMan::stopAllSounds() {
+ for (uint i = 0; i < _soundItems.size(); ++i) {
+ if (_soundItems[i]) {
+ _soundItems[i]->stopSound();
+ delete _soundItems[i];
+ _soundItems[i] = NULL;
+ }
+ }
+ for (uint i = 0; i < _musicItems.size(); ++i) {
+ if (_musicItems[i]) {
+ _musicItems[i]->stopMusic(0);
+ delete _musicItems[i];
+ _musicItems[i] = NULL;
+ }
+ }
+}
+
+AudioResourceMan::~AudioResourceMan() {
+ stopAllSounds();
+}
+
+int16 AudioResourceMan::addSound(uint32 fileHash) {
+ AudioResourceManSoundItem *soundItem = new AudioResourceManSoundItem(_vm, fileHash);
+
+ for (uint i = 0; i < _soundItems.size(); ++i)
+ if (!_soundItems[i]) {
+ _soundItems[i] = soundItem;
+ return i;
+ }
+
+ int16 soundIndex = (int16)_soundItems.size();
+ _soundItems.push_back(soundItem);
+ return soundIndex;
+}
+
+void AudioResourceMan::removeSound(int16 soundIndex) {
+ AudioResourceManSoundItem *soundItem = getSoundItem(soundIndex);
+ if (soundItem) {
+ soundItem->unloadSound();
+ delete soundItem;
+ _soundItems[soundIndex] = NULL;
+ }
+}
+
+int16 AudioResourceMan::loadMusic(uint32 fileHash) {
+ AudioResourceManMusicItem *musicItem;
+
+ for (uint i = 0; i < _musicItems.size(); ++i) {
+ musicItem = _musicItems[i];
+ if (musicItem && musicItem->getFileHash() == fileHash && musicItem->canRestart()) {
+ musicItem->restart();
+ return i;
+ }
+ }
+
+ musicItem = new AudioResourceManMusicItem(_vm, fileHash);
+
+ for (uint i = 0; i < _musicItems.size(); ++i) {
+ if (!_musicItems[i]) {
+ _musicItems[i] = musicItem;
+ return i;
+ }
+ }
+
+ int16 musicIndex = _musicItems.size();
+ _musicItems.push_back(musicItem);
+ return musicIndex;
+
+}
+
+void AudioResourceMan::updateMusic() {
+ for (uint musicIndex = 0; musicIndex < _musicItems.size(); ++musicIndex) {
+ AudioResourceManMusicItem *musicItem = _musicItems[musicIndex];
+ if (musicItem) {
+ musicItem->update();
+ if (musicItem->isTerminated()) {
+ delete musicItem;
+ _musicItems[musicIndex] = NULL;
+ }
+ }
+ }
+}
+
+AudioResourceManSoundItem *AudioResourceMan::getSoundItem(int16 index) {
+ return (index >= 0 && index < (int16)_soundItems.size()) ? _soundItems[index] : NULL;
+}
+
+AudioResourceManMusicItem *AudioResourceMan::getMusicItem(int16 index) {
+ return (index >= 0 && index < (int16)_musicItems.size()) ? _musicItems[index] : NULL;
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/sound.h b/engines/neverhood/sound.h
new file mode 100644
index 0000000000..aa5da284ea
--- /dev/null
+++ b/engines/neverhood/sound.h
@@ -0,0 +1,290 @@
+/* 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 NEVERHOOD_SOUND_H
+#define NEVERHOOD_SOUND_H
+
+#include "audio/audiostream.h"
+#include "common/array.h"
+#include "graphics/surface.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/resource.h"
+
+namespace Neverhood {
+
+// Convert volume from percent to 0..255
+#define VOLUME(volume) (Audio::Mixer::kMaxChannelVolume / 100 * (volume))
+
+// Convert panning from percent (50% equals center) to -127..0..+127
+#define PANNING(panning) (254 / 100 * (panning) - 127)
+
+class AudioResourceManSoundItem;
+class AudioResourceManMusicItem;
+class AudioResourceMan;
+
+class SoundResource {
+public:
+ SoundResource(NeverhoodEngine *vm);
+ ~SoundResource();
+ bool isPlaying();
+ void load(uint32 fileHash);
+ void unload();
+ void play(uint32 fileHash);
+ void play();
+ void stop();
+ void setVolume(int16 volume);
+ void setPan(int16 pan);
+protected:
+ NeverhoodEngine *_vm;
+ int16 _soundIndex;
+ AudioResourceManSoundItem *getSoundItem();
+};
+
+class MusicResource {
+public:
+ MusicResource(NeverhoodEngine *vm);
+ bool isPlaying();
+ void load(uint32 fileHash);
+ void unload();
+ void play(int16 fadeVolumeStep);
+ void stop(int16 fadeVolumeStep);
+ void setVolume(int16 volume);
+protected:
+ NeverhoodEngine *_vm;
+ int16 _musicIndex;
+ AudioResourceManMusicItem *getMusicItem();
+};
+
+class MusicItem {
+public:
+ MusicItem(NeverhoodEngine *vm, uint32 groupNameHash, uint32 musicFileHash);
+ ~MusicItem();
+ void startMusic(int16 countdown, int16 fadeVolumeStep);
+ void stopMusic(int16 countdown, int16 fadeVolumeStep);
+ void update();
+ uint32 getGroupNameHash() const { return _groupNameHash; }
+ uint32 getFileHash() const { return _fileHash; }
+protected:
+ NeverhoodEngine *_vm;
+ uint32 _groupNameHash;
+ uint32 _fileHash;
+ bool _play;
+ bool _stop;
+ int16 _fadeVolumeStep;
+ int16 _countdown;
+ MusicResource *_musicResource;
+};
+
+class SoundItem {
+public:
+ SoundItem(NeverhoodEngine *vm, uint32 groupNameHash, uint32 soundFileHash,
+ bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown,
+ bool playOnceAfterCountdown, int16 initialCountdown, bool playLooping, int16 currCountdown);
+ ~SoundItem();
+ void setSoundParams(bool playOnceAfterRandomCountdown, int16 minCountdown, int16 maxCountdown,
+ int16 firstMinCountdown, int16 firstMaxCountdown);
+ void playSoundLooping();
+ void stopSound();
+ void setVolume(int volume);
+ void update();
+ void setPlayOnceAfterCountdown(bool playOnceAfterCountdown) { _playOnceAfterCountdown = playOnceAfterCountdown; }
+ uint32 getGroupNameHash() const { return _groupNameHash; }
+ uint32 getFileHash() const { return _fileHash; }
+ int16 getCurrCountdown() const { return _currCountdown; }
+protected:
+ NeverhoodEngine *_vm;
+ uint32 _groupNameHash;
+ uint32 _fileHash;
+ bool _playOnceAfterRandomCountdown;
+ int16 _minCountdown;
+ int16 _maxCountdown;
+ bool _playOnceAfterCountdown;
+ int16 _initialCountdown;
+ bool _playLooping;
+ int16 _currCountdown;
+ SoundResource *_soundResource;
+};
+
+class SoundMan {
+public:
+ SoundMan(NeverhoodEngine *vm);
+ ~SoundMan();
+
+ void stopAllSounds();
+
+ // Music
+ void addMusic(uint32 groupNameHash, uint32 musicFileHash);
+ void deleteMusic(uint32 musicFileHash);
+ void startMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep);
+ void stopMusic(uint32 musicFileHash, int16 countdown, int16 fadeVolumeStep);
+
+ // Sound
+ void addSound(uint32 groupNameHash, uint32 soundFileHash);
+ void addSoundList(uint32 groupNameHash, const uint32 *soundFileHashList);
+ void deleteSound(uint32 soundFileHash);
+ void setSoundParams(uint32 soundFileHash, bool playOnceAfterRandomCountdown,
+ int16 minCountdown, int16 maxCountdown, int16 firstMinCountdown, int16 firstMaxCountdown);
+ void setSoundListParams(const uint32 *soundFileHashList, bool playOnceAfterRandomCountdown,
+ int16 minCountdown, int16 maxCountdown, int16 firstMinCountdown, int16 firstMaxCountdown);
+ void playSoundLooping(uint32 soundFileHash);
+ void stopSound(uint32 soundFileHash);
+ void setSoundVolume(uint32 soundFileHash, int volume);
+
+ // Misc
+ void update();
+ void deleteGroup(uint32 groupNameHash);
+ void deleteMusicGroup(uint32 groupNameHash);
+ void deleteSoundGroup(uint32 groupNameHash);
+ void playTwoSounds(uint32 groupNameHash, uint32 soundFileHash1, uint32 soundFileHash2, int16 initialCountdown);
+ void playSoundThree(uint32 groupNameHash, uint32 soundFileHash);
+ void setTwoSoundsPlayFlag(bool playOnceAfterCountdown);
+ void setSoundThreePlayFlag(bool playOnceAfterCountdown);
+
+protected:
+ NeverhoodEngine *_vm;
+
+ // TODO Find out what these special sounds are used for (door sounds?)
+ int _soundIndex1, _soundIndex2;
+ int16 _initialCountdown;
+ bool _playOnceAfterCountdown;
+
+ int _soundIndex3;
+ int16 _initialCountdown3;
+ bool _playOnceAfterCountdown3;
+
+ Common::Array<MusicItem*> _musicItems;
+ Common::Array<SoundItem*> _soundItems;
+
+ MusicItem *getMusicItemByHash(uint32 musicFileHash);
+ SoundItem *getSoundItemByHash(uint32 soundFileHash);
+ int16 addMusicItem(MusicItem *musicItem);
+ int16 addSoundItem(SoundItem *soundItem);
+ void deleteSoundByIndex(int index);
+
+};
+
+class NeverhoodAudioStream : public Audio::AudioStream {
+public:
+ NeverhoodAudioStream(int rate, byte shiftValue, bool isLooping, DisposeAfterUse::Flag disposeStream, Common::SeekableReadStream *stream);
+ ~NeverhoodAudioStream();
+ int readBuffer(int16 *buffer, const int numSamples);
+ bool isStereo() const { return _isStereo; }
+ bool endOfData() const { return _endOfData; }
+ int getRate() const { return _rate; }
+private:
+ const int _rate;
+ const bool _isLooping;
+ const bool _isStereo;
+ const byte _shiftValue;
+ const bool _isCompressed;
+ int16 _prevValue;
+ Common::DisposablePtr<Common::SeekableReadStream> _stream;
+ bool _endOfData;
+ byte *_buffer;
+ enum {
+ kSampleBufferLength = 2048
+ };
+ int fillBuffer(int maxSamples);
+};
+
+// TODO Rename these
+
+class AudioResourceManSoundItem {
+public:
+ AudioResourceManSoundItem(NeverhoodEngine *vm, uint32 fileHash);
+ void loadSound();
+ void unloadSound();
+ void setVolume(int16 volume);
+ void setPan(int16 pan);
+ void playSound(bool looping);
+ void stopSound();
+ bool isPlaying();
+protected:
+ NeverhoodEngine *_vm;
+ uint32 _fileHash;
+ ResourceHandle _resourceHandle;
+ const byte *_data;
+ bool _isLoaded;
+ bool _isPlaying;
+ int16 _volume;
+ int16 _panning;
+ Audio::SoundHandle _soundHandle;
+};
+
+class AudioResourceManMusicItem {
+public:
+ AudioResourceManMusicItem(NeverhoodEngine *vm, uint32 fileHash);
+ void playMusic(int16 fadeVolumeStep);
+ void stopMusic(int16 fadeVolumeStep);
+ void unloadMusic();
+ void setVolume(int16 volume);
+ void restart();
+ void update();
+ bool isPlaying() const { return _isPlaying; }
+ bool canRestart() const { return _canRestart; }
+ bool isTerminated() const { return _terminate; }
+ uint32 getFileHash() const { return _fileHash; }
+protected:
+ NeverhoodEngine *_vm;
+ uint32 _fileHash;
+ bool _isPlaying;
+ bool _canRestart;
+ bool _terminate;
+ int16 _volume;
+ int16 _panning;
+ bool _start;
+ bool _isFadingIn;
+ bool _isFadingOut;
+ int16 _fadeVolume;
+ int16 _fadeVolumeStep;
+ Audio::SoundHandle _soundHandle;
+};
+
+class AudioResourceMan {
+public:
+ AudioResourceMan(NeverhoodEngine *vm);
+ ~AudioResourceMan();
+
+ void stopAllSounds();
+
+ int16 addSound(uint32 fileHash);
+ void removeSound(int16 soundIndex);
+
+ int16 loadMusic(uint32 fileHash);
+ void updateMusic();
+
+ AudioResourceManSoundItem *getSoundItem(int16 index);
+ AudioResourceManMusicItem *getMusicItem(int16 index);
+
+protected:
+ NeverhoodEngine *_vm;
+
+ Common::Array<AudioResourceManMusicItem*> _musicItems;
+ Common::Array<AudioResourceManSoundItem*> _soundItems;
+
+ int16 addSoundItem(AudioResourceManSoundItem *soundItem);
+
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SOUND_H */
diff --git a/engines/neverhood/sprite.cpp b/engines/neverhood/sprite.cpp
new file mode 100644
index 0000000000..50880089f9
--- /dev/null
+++ b/engines/neverhood/sprite.cpp
@@ -0,0 +1,486 @@
+/* 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 "neverhood/sprite.h"
+#include "neverhood/screen.h"
+
+namespace Neverhood {
+
+// Sprite
+
+Sprite::Sprite(NeverhoodEngine *vm, int objectPriority)
+ : Entity(vm, objectPriority), _x(0), _y(0), _spriteUpdateCb(NULL), _filterXCb(NULL), _filterYCb(NULL),
+ _dataResource(vm), _doDeltaX(false), _doDeltaY(false), _needRefresh(false), _flags(0), _surface(NULL) {
+
+ SetMessageHandler(&Sprite::handleMessage);
+
+}
+
+Sprite::~Sprite() {
+ delete _surface;
+}
+
+void Sprite::updateBounds() {
+ if (_doDeltaX) {
+ _collisionBounds.x1 = _x - _collisionBoundsOffset.x - _collisionBoundsOffset.width + 1;
+ _collisionBounds.x2 = _x - _collisionBoundsOffset.x;
+ } else {
+ _collisionBounds.x1 = _x + _collisionBoundsOffset.x;
+ _collisionBounds.x2 = _x + _collisionBoundsOffset.x + _collisionBoundsOffset.width - 1;
+ }
+ if (_doDeltaY) {
+ _collisionBounds.y1 = _y - _collisionBoundsOffset.y - _collisionBoundsOffset.height + 1;
+ _collisionBounds.y2 = _y - _collisionBoundsOffset.y;
+ } else {
+ _collisionBounds.y1 = _y + _collisionBoundsOffset.y;
+ _collisionBounds.y2 = _y + _collisionBoundsOffset.y + _collisionBoundsOffset.height - 1;
+ }
+}
+
+void Sprite::setDoDeltaX(int type) {
+ // Clear, set or toggle
+ _doDeltaX = type == 2 ? !_doDeltaX : type == 1;
+}
+
+void Sprite::setDoDeltaY(int type) {
+ // Clear, set or toggle
+ _doDeltaY = type == 2 ? !_doDeltaY : type == 1;
+}
+
+bool Sprite::isPointInside(int16 x, int16 y) {
+ return x >= _collisionBounds.x1 && x <= _collisionBounds.x2 && y >= _collisionBounds.y1 && y <= _collisionBounds.y2;
+}
+
+bool Sprite::checkCollision(NRect &rect) {
+ return (_collisionBounds.x1 < rect.x2) && (rect.x1 < _collisionBounds.x2) && (_collisionBounds.y1 < rect.y2) && (rect.y1 < _collisionBounds.y2);
+}
+
+uint32 Sprite::handleMessage(int messageNum, const MessageParam &param, Entity *sender) {
+ return 0;
+}
+
+void Sprite::loadDataResource(uint32 fileHash) {
+ _dataResource.load(fileHash);
+}
+
+void Sprite::createSurface(int surfacePriority, int16 width, int16 height) {
+ _surface = new BaseSurface(_vm, surfacePriority, width, height, "sprite");
+}
+
+int16 Sprite::defFilterY(int16 y) {
+ return y - _vm->_screen->getYOffset();
+}
+
+void Sprite::setClipRect(int16 x1, int16 y1, int16 x2, int16 y2) {
+ NRect &clipRect = _surface->getClipRect();
+ clipRect.x1 = x1;
+ clipRect.y1 = y1;
+ clipRect.x2 = x2;
+ clipRect.y2 = y2;
+}
+
+void Sprite::setClipRect(NRect& clipRect) {
+ _surface->getClipRect() = clipRect;
+}
+
+void Sprite::setClipRect(NDrawRect& drawRect) {
+ setClipRect(drawRect.x, drawRect.y, drawRect.x2(), drawRect.y2());
+}
+
+// StaticSprite
+
+StaticSprite::StaticSprite(NeverhoodEngine *vm, int objectPriority)
+ : Sprite(vm, objectPriority), _spriteResource(vm) {
+
+}
+
+StaticSprite::StaticSprite(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority, int16 x, int16 y)
+ : Sprite(vm, 0), _spriteResource(vm) {
+
+ _spriteResource.load(fileHash, true);
+ createSurface(surfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ _x = x == kDefPosition ? _spriteResource.getPosition().x : x;
+ _y = y == kDefPosition ? _spriteResource.getPosition().y : y;
+ _drawOffset.set(0, 0, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ _needRefresh = true;
+ updatePosition();
+}
+
+void StaticSprite::loadSprite(uint32 fileHash, uint flags, int surfacePriority, int16 x, int16 y) {
+ _spriteResource.load(fileHash, true);
+ if (!_surface)
+ createSurface(surfacePriority, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ if (flags & kSLFDefDrawOffset)
+ _drawOffset.set(0, 0, _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ else if (flags & kSLFCenteredDrawOffset)
+ _drawOffset.set(-(_spriteResource.getDimensions().width / 2), -(_spriteResource.getDimensions().height / 2),
+ _spriteResource.getDimensions().width, _spriteResource.getDimensions().height);
+ if (flags & kSLFDefPosition) {
+ _x = _spriteResource.getPosition().x;
+ _y = _spriteResource.getPosition().y;
+ } else if (flags & kSLFSetPosition) {
+ _x = x;
+ _y = y;
+ }
+ if (flags & kSLFDefCollisionBoundsOffset) {
+ _collisionBoundsOffset = _drawOffset;
+ updateBounds();
+ }
+ _needRefresh = true;
+ updatePosition();
+}
+
+void StaticSprite::updatePosition() {
+
+ if (!_surface)
+ return;
+
+ if (_doDeltaX) {
+ _surface->getDrawRect().x = filterX(_x - _drawOffset.x - _drawOffset.width + 1);
+ } else {
+ _surface->getDrawRect().x = filterX(_x + _drawOffset.x);
+ }
+
+ if (_doDeltaY) {
+ _surface->getDrawRect().y = filterY(_y - _drawOffset.y - _drawOffset.height + 1);
+ } else {
+ _surface->getDrawRect().y = filterY(_y + _drawOffset.y);
+ }
+
+ if (_needRefresh) {
+ _surface->drawSpriteResourceEx(_spriteResource, _doDeltaX, _doDeltaY, _drawOffset.width, _drawOffset.height);
+ _needRefresh = false;
+ }
+
+}
+
+// AnimatedSprite
+
+AnimatedSprite::AnimatedSprite(NeverhoodEngine *vm, int objectPriority)
+ : Sprite(vm, objectPriority), _animResource(vm) {
+
+ init();
+}
+
+AnimatedSprite::AnimatedSprite(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority, int16 x, int16 y)
+ : Sprite(vm, 1100), _animResource(vm) {
+
+ init();
+ SetUpdateHandler(&AnimatedSprite::update);
+ createSurface1(fileHash, surfacePriority);
+ _x = x;
+ _y = y;
+ startAnimation(fileHash, 0, -1);
+}
+
+void AnimatedSprite::init() {
+ _currFrameTicks = 0;
+ _newAnimFileHash = 0;
+ _deltaX = 0;
+ _deltaY = 0;
+ _nextAnimFileHash = 0;
+ _plFirstFrameIndex = 0;
+ _currFrameIndex = 0;
+ _currStickFrameIndex = -1;
+ _finalizeStateCb = NULL;
+ _currStateCb = NULL;
+ _nextStateCb = NULL;
+ _newStickFrameIndex = -1;
+ _newStickFrameHash = 0;
+ _frameChanged = false;
+ _replOldColor = 0;
+ _replNewColor = 0;
+ _animResource.setReplEnabled(false);
+ _playBackwards = false;
+}
+
+void AnimatedSprite::update() {
+ updateAnim();
+ handleSpriteUpdate();
+ updatePosition();
+}
+
+void AnimatedSprite::updateDeltaXY() {
+ if (_doDeltaX) {
+ _x -= _deltaX;
+ } else {
+ _x += _deltaX;
+ }
+ if (_doDeltaY) {
+ _y -= _deltaY;
+ } else {
+ _y += _deltaY;
+ }
+ _deltaX = 0;
+ _deltaY = 0;
+ updateBounds();
+}
+
+void AnimatedSprite::setRepl(byte oldColor, byte newColor) {
+ _replOldColor = oldColor;
+ _replNewColor = newColor;
+ _animResource.setReplEnabled(true);
+}
+
+void AnimatedSprite::clearRepl() {
+ _replOldColor = 0;
+ _replNewColor = 0;
+ _animResource.setReplEnabled(false);
+}
+
+void AnimatedSprite::updateAnim() {
+
+ _frameChanged = false;
+
+ if (_newAnimFileHash == 0) {
+ if (_newStickFrameIndex != -1) {
+ _currStickFrameIndex = _newStickFrameIndex == STICK_LAST_FRAME ? _animResource.getFrameCount() - 1 : _newStickFrameIndex;
+ _newStickFrameIndex = -1;
+ } else if (_newStickFrameHash != 0) {
+ _currStickFrameIndex = MAX<int16>(0, _animResource.getFrameIndex(_newStickFrameHash));
+ _newStickFrameHash = 0;
+ }
+ if (_newAnimFileHash == 0 && _currFrameIndex != _currStickFrameIndex) {
+ if (_currFrameTicks != 0 && (--_currFrameTicks == 0) && _animResource.getFrameCount() != 0) {
+
+ if (_nextAnimFileHash != 0) {
+ if (_animResource.load(_nextAnimFileHash)) {
+ _currAnimFileHash = _nextAnimFileHash;
+ } else {
+ _animResource.load(calcHash("sqDefault"));
+ _currAnimFileHash = 0;
+ }
+ if (_replOldColor != _replNewColor) {
+ _animResource.setRepl(_replOldColor, _replNewColor);
+ }
+ _nextAnimFileHash = 0;
+ if (_animStatus != 0) {
+ _currFrameIndex = _plFirstFrameHash != 0 ? MAX<int16>(0, _animResource.getFrameIndex(_plFirstFrameHash)) : 0;
+ _lastFrameIndex = _plLastFrameHash != 0 ? MAX<int16>(0, _animResource.getFrameIndex(_plLastFrameHash)) : _animResource.getFrameCount() - 1;
+ } else {
+ _currFrameIndex = _plFirstFrameIndex != -1 ? _plFirstFrameIndex : _animResource.getFrameCount() - 1;
+ _lastFrameIndex = _plLastFrameIndex != -1 ? _plLastFrameIndex : _animResource.getFrameCount() - 1;
+ }
+ } else {
+ updateFrameIndex();
+ }
+ if (_newAnimFileHash == 0)
+ updateFrameInfo();
+ }
+ }
+ }
+
+ if (_newAnimFileHash != 0) {
+ if (_animStatus == 2) {
+ _currStickFrameIndex = _currFrameIndex;
+ } else {
+ if (_animStatus == 1) {
+ if (_animResource.load(_newAnimFileHash)) {
+ _currAnimFileHash = _newAnimFileHash;
+ } else {
+ _animResource.load(calcHash("sqDefault"));
+ _currAnimFileHash = 0;
+ }
+ if (_replOldColor != _replNewColor) {
+ _animResource.setRepl(_replOldColor, _replNewColor);
+ }
+ _newAnimFileHash = 0;
+ _currFrameIndex = _plFirstFrameHash != 0 ? MAX<int16>(0, _animResource.getFrameIndex(_plFirstFrameHash)) : 0;
+ _lastFrameIndex = _plLastFrameHash != 0 ? MAX<int16>(0, _animResource.getFrameIndex(_plLastFrameHash)) : _animResource.getFrameCount() - 1;
+ } else {
+ if (_animResource.load(_newAnimFileHash)) {
+ _currAnimFileHash = _newAnimFileHash;
+ } else {
+ _animResource.load(calcHash("sqDefault"));
+ _currAnimFileHash = 0;
+ }
+ if (_replOldColor != _replNewColor) {
+ _animResource.setRepl(_replOldColor, _replNewColor);
+ }
+ _newAnimFileHash = 0;
+ _currFrameIndex = _plFirstFrameIndex != -1 ? _plFirstFrameIndex : _animResource.getFrameCount() - 1;
+ _lastFrameIndex = _plLastFrameIndex != -1 ? _plLastFrameIndex : _animResource.getFrameCount() - 1;
+ }
+ updateFrameInfo();
+ }
+
+ if (_newStickFrameIndex != -1) {
+ _currStickFrameIndex = _newStickFrameIndex == STICK_LAST_FRAME ? _animResource.getFrameCount() - 1 : _newStickFrameIndex;
+ _newStickFrameIndex = -1;
+ } else if (_newStickFrameHash != 0) {
+ _currStickFrameIndex = MAX<int16>(0, _animResource.getFrameIndex(_newStickFrameHash));
+ _newStickFrameHash = 0;
+ }
+
+ }
+
+}
+
+void AnimatedSprite::updatePosition() {
+
+ if (!_surface)
+ return;
+
+ if (_doDeltaX) {
+ _surface->getDrawRect().x = filterX(_x - _drawOffset.x - _drawOffset.width + 1);
+ } else {
+ _surface->getDrawRect().x = filterX(_x + _drawOffset.x);
+ }
+
+ if (_doDeltaY) {
+ _surface->getDrawRect().y = filterY(_y - _drawOffset.y - _drawOffset.height + 1);
+ } else {
+ _surface->getDrawRect().y = filterY(_y + _drawOffset.y);
+ }
+
+ if (_needRefresh) {
+ _surface->drawAnimResource(_animResource, _currFrameIndex, _doDeltaX, _doDeltaY, _drawOffset.width, _drawOffset.height);
+ _needRefresh = false;
+ }
+
+}
+
+void AnimatedSprite::updateFrameIndex() {
+ if (!_playBackwards) {
+ if (_currFrameIndex < _lastFrameIndex) {
+ _currFrameIndex++;
+ } else {
+ // Inform self about end of current animation
+ // The caller can then e.g. set a new animation fileHash
+ sendMessage(this, 0x3002, 0);
+ if (_newAnimFileHash == 0)
+ _currFrameIndex = 0;
+ }
+ } else {
+ if (_currFrameIndex > 0) {
+ _currFrameIndex--;
+ } else {
+ sendMessage(this, 0x3002, 0);
+ if (_newAnimFileHash == 0)
+ _currFrameIndex = _lastFrameIndex;
+ }
+ }
+}
+
+void AnimatedSprite::updateFrameInfo() {
+ debug(8, "AnimatedSprite::updateFrameInfo()");
+ const AnimFrameInfo &frameInfo = _animResource.getFrameInfo(_currFrameIndex);
+ _frameChanged = true;
+ _drawOffset = frameInfo.drawOffset;
+ _deltaX = frameInfo.deltaX;
+ _deltaY = frameInfo.deltaY;
+ _collisionBoundsOffset = frameInfo.collisionBoundsOffset;
+ _currFrameTicks = frameInfo.counter;
+ updateBounds();
+ _needRefresh = true;
+ if (frameInfo.frameHash != 0)
+ sendMessage(this, 0x100D, frameInfo.frameHash);
+}
+
+void AnimatedSprite::createSurface1(uint32 fileHash, int surfacePriority) {
+ NDimensions dimensions = _animResource.loadSpriteDimensions(fileHash);
+ _surface = new BaseSurface(_vm, surfacePriority, dimensions.width, dimensions.height, "animated sprite");
+}
+
+void AnimatedSprite::createShadowSurface1(BaseSurface *shadowSurface, uint32 fileHash, int surfacePriority) {
+ NDimensions dimensions = _animResource.loadSpriteDimensions(fileHash);
+ _surface = new ShadowSurface(_vm, surfacePriority, dimensions.width, dimensions.height, shadowSurface);
+}
+
+void AnimatedSprite::createShadowSurface(BaseSurface *shadowSurface, int16 width, int16 height, int surfacePriority) {
+ _surface = new ShadowSurface(_vm, surfacePriority, width, height, shadowSurface);
+}
+
+void AnimatedSprite::startAnimation(uint32 fileHash, int16 plFirstFrameIndex, int16 plLastFrameIndex) {
+ debug(2, "AnimatedSprite::startAnimation(%08X, %d, %d)", fileHash, plFirstFrameIndex, plLastFrameIndex);
+ _newAnimFileHash = fileHash;
+ _plFirstFrameIndex = plFirstFrameIndex;
+ _plLastFrameIndex = plLastFrameIndex;
+ _newStickFrameHash = 0;
+ _animStatus = 0;
+ _playBackwards = false;
+ _newStickFrameIndex = -1;
+ _currStickFrameIndex = -1;
+}
+
+void AnimatedSprite::stopAnimation() {
+ _newAnimFileHash = 1;
+ _animStatus = 2;
+}
+
+void AnimatedSprite::startAnimationByHash(uint32 fileHash, uint32 plFirstFrameHash, uint32 plLastFrameHash) {
+ debug(2, "AnimatedSprite::startAnimationByHash(%08X, %08X, %08X)", fileHash, plFirstFrameHash, plLastFrameHash);
+ _newAnimFileHash = fileHash;
+ _plFirstFrameHash = plFirstFrameHash;
+ _plLastFrameHash = plLastFrameHash;
+ _newStickFrameHash = 0;
+ _animStatus = 1;
+ _playBackwards = false;
+ _newStickFrameIndex = -1;
+ _currStickFrameIndex = -1;
+}
+
+void AnimatedSprite::nextAnimationByHash(uint32 fileHash2, uint32 plFirstFrameHash, uint32 plLastFrameHash) {
+ _nextAnimFileHash = fileHash2;
+ _plFirstFrameHash = plFirstFrameHash;
+ _plLastFrameHash = plLastFrameHash;
+ _newStickFrameHash = 0;
+ _animStatus = 1;
+ _playBackwards = false;
+ _newStickFrameIndex = -1;
+ _currStickFrameIndex = -1;
+}
+
+void AnimatedSprite::setFinalizeState(AnimationCb finalizeStateCb) {
+ if (_finalizeStateCb)
+ (this->*_finalizeStateCb)();
+ _finalizeStateCb = finalizeStateCb;
+}
+
+void AnimatedSprite::gotoState(AnimationCb currStateCb) {
+ if (_finalizeStateCb) {
+ AnimationCb cb = _finalizeStateCb;
+ _finalizeStateCb = NULL;
+ (this->*cb)();
+ }
+ _nextStateCb = NULL;
+ _currStateCb = currStateCb;
+ if (_currStateCb)
+ (this->*_currStateCb)();
+}
+
+void AnimatedSprite::gotoNextState() {
+ if (_finalizeStateCb) {
+ AnimationCb cb = _finalizeStateCb;
+ _finalizeStateCb = NULL;
+ (this->*cb)();
+ }
+ if (_nextStateCb) {
+ _currStateCb = _nextStateCb;
+ _nextStateCb = NULL;
+ (this->*_currStateCb)();
+ } else {
+ _currStateCb = NULL;
+ }
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/sprite.h b/engines/neverhood/sprite.h
new file mode 100644
index 0000000000..1d17bf0e70
--- /dev/null
+++ b/engines/neverhood/sprite.h
@@ -0,0 +1,192 @@
+/* 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 NEVERHOOD_SPRITE_H
+#define NEVERHOOD_SPRITE_H
+
+#include "neverhood/neverhood.h"
+#include "neverhood/entity.h"
+#include "neverhood/graphics.h"
+#include "neverhood/resource.h"
+
+namespace Neverhood {
+
+#define SetSpriteUpdate(callback) \
+ do { \
+ _spriteUpdateCb = static_cast <void (Sprite::*)(void)> (callback); \
+ debug(2, "SetSpriteUpdate(" #callback ")"); \
+ _spriteUpdateCbName = #callback; \
+ } while (0)
+
+#define SetFilterX(callback) \
+ do { \
+ _filterXCb = static_cast <int16 (Sprite::*)(int16)> (callback); \
+ debug(2, "SetFilterX(" #callback ")"); \
+ } while (0)
+
+#define SetFilterY(callback) \
+ do { \
+ _filterYCb = static_cast <int16 (Sprite::*)(int16)> (callback); \
+ debug(2, "SetFilterY(" #callback ")"); \
+ } while (0)
+
+const int16 kDefPosition = -32768;
+
+class Sprite : public Entity {
+public:
+ Sprite(NeverhoodEngine *vm, int objectPriority);
+ ~Sprite();
+ void init() {}
+ BaseSurface *getSurface() { return _surface; }
+ void updateBounds();
+ void setDoDeltaX(int type);
+ void setDoDeltaY(int type);
+ bool isPointInside(int16 x, int16 y);
+ bool checkCollision(NRect &rect);
+ int16 getX() const { return _x; }
+ int16 getY() const { return _y; }
+ void setX(int16 value) { _x = value; }
+ void setY(int16 value) { _y = value; }
+ uint16 getFlags() const { return _flags; }
+ bool isDoDeltaX() const { return _doDeltaX; }
+ bool isDoDeltaY() const { return _doDeltaY; }
+ NRect& getCollisionBounds() { return _collisionBounds; }
+ uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
+ void loadDataResource(uint32 fileHash);
+ int16 defFilterY(int16 y);
+ bool getVisible() const { return _surface->getVisible(); }
+ void setVisible(bool value) { _surface->setVisible(value); }
+ NDrawRect& getDrawRect() { return _surface->getDrawRect(); }
+ // Some shortcuts to set the clipRect
+ NRect& getClipRect() { return _surface->getClipRect(); }
+ void setClipRect(int16 x1, int16 y1, int16 x2, int16 y2);
+ void setClipRect(NRect& clipRect);
+ void setClipRect(NDrawRect& drawRect);
+protected:
+ void (Sprite::*_spriteUpdateCb)();
+ Common::String _spriteUpdateCbName; // For debugging purposes
+ int16 (Sprite::*_filterXCb)(int16);
+ int16 (Sprite::*_filterYCb)(int16);
+ BaseSurface *_surface;
+ int16 _x, _y;
+ bool _doDeltaX, _doDeltaY;
+ bool _needRefresh;
+ NDrawRect _drawOffset;
+ NRect _collisionBounds;
+ NDrawRect _collisionBoundsOffset;
+ uint16 _flags;
+ DataResource _dataResource;
+ void createSurface(int surfacePriority, int16 width, int16 height);
+ void handleSpriteUpdate() {
+ if (_spriteUpdateCb)
+ (this->*_spriteUpdateCb)();
+ }
+ int16 filterX(int16 x) {
+ return _filterXCb ? (this->*_filterXCb)(x) : x;
+ }
+ int16 filterY(int16 y) {
+ return _filterYCb ? (this->*_filterYCb)(y) : y;
+ }
+};
+
+enum {
+ kSLFDefDrawOffset = 1 << 0,
+ kSLFCenteredDrawOffset = 1 << 1,
+ kSLFDefPosition = 1 << 2,
+ kSLFSetPosition = 1 << 3,
+ kSLFDefCollisionBoundsOffset = 1 << 4
+};
+
+class StaticSprite : public Sprite {
+public:
+ StaticSprite(NeverhoodEngine *vm, int objectPriority);
+ StaticSprite(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority, int16 x = kDefPosition, int16 y = kDefPosition);
+ void loadSprite(uint32 fileHash, uint flags = 0, int surfacePriority = 0, int16 x = kDefPosition, int16 y = kDefPosition);
+ void updatePosition();
+protected:
+ SpriteResource _spriteResource;
+};
+
+#define AnimationCallback(callback) static_cast <void (AnimatedSprite::*)()> (callback)
+#define GotoState(callback) gotoState(static_cast <void (AnimatedSprite::*)()> (callback))
+#define NextState(callback) \
+ do { \
+ _nextStateCb = static_cast <void (AnimatedSprite::*)(void)> (callback); \
+ debug(2, "NextState(" #callback ")"); _nextStateCbName = #callback; \
+ } while (0)
+#define FinalizeState(callback) setFinalizeState(static_cast <void (AnimatedSprite::*)()> (callback));
+
+const int STICK_LAST_FRAME = -2;
+
+class AnimatedSprite : public Sprite {
+public:
+ AnimatedSprite(NeverhoodEngine *vm, int objectPriority);
+ AnimatedSprite(NeverhoodEngine *vm, uint32 fileHash, int surfacePriority, int16 x, int16 y);
+ void update();
+ void updateDeltaXY();
+ void setRepl(byte oldColor, byte newColor);
+ void clearRepl();
+ uint32 getCurrAnimFileHash() const { return _currAnimFileHash; }
+ int16 getFrameIndex() const { return _currFrameIndex; }
+ int16 getFrameIndex(uint32 frameHash) { return _animResource.getFrameIndex(frameHash); }
+ void setNewHashListIndex(int value) { _newStickFrameIndex = value; }
+ void startAnimation(uint32 fileHash, int16 plFirstFrameIndex, int16 plLastFrameIndex);
+protected:
+ typedef void (AnimatedSprite::*AnimationCb)();
+ AnimResource _animResource;
+ uint32 _currAnimFileHash, _newAnimFileHash, _nextAnimFileHash;
+ int16 _currFrameIndex, _lastFrameIndex;
+ int16 _plFirstFrameIndex, _plLastFrameIndex;
+ uint32 _plFirstFrameHash, _plLastFrameHash;
+ int16 _animStatus;
+ int16 _currFrameTicks;
+ int _currStickFrameIndex, _newStickFrameIndex;
+ uint32 _newStickFrameHash;
+ int16 _deltaX, _deltaY;
+ byte _replOldColor, _replNewColor;
+ bool _playBackwards, _frameChanged;
+ AnimationCb _finalizeStateCb;
+ AnimationCb _currStateCb;
+ AnimationCb _nextStateCb;
+ // For debugging purposes
+ Common::String _finalizeStateCbName;
+ Common::String _currStateCbName;
+ Common::String _nextStateCbName;
+ void init();
+ void updateAnim();
+ void updatePosition();
+ void updateFrameIndex();
+ void updateFrameInfo();
+ void createSurface1(uint32 fileHash, int surfacePriority);
+ void createShadowSurface1(BaseSurface *shadowSurface, uint32 fileHash, int surfacePriority);
+ void createShadowSurface(BaseSurface *shadowSurface, int16 width, int16 height, int surfacePriority);
+ void stopAnimation();
+ void startAnimationByHash(uint32 fileHash, uint32 plFirstFrameHash, uint32 plLastFrameHash);
+ void nextAnimationByHash(uint32 fileHash2, uint32 plFirstFrameHash, uint32 plLastFrameHash);
+ void setFinalizeState(AnimationCb finalizeStateCb);
+ void gotoState(AnimationCb currStateCb);
+ void gotoNextState();
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_SPRITE_H */
diff --git a/engines/neverhood/staticdata.cpp b/engines/neverhood/staticdata.cpp
new file mode 100644
index 0000000000..3f89c2236f
--- /dev/null
+++ b/engines/neverhood/staticdata.cpp
@@ -0,0 +1,200 @@
+/* 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 "neverhood/staticdata.h"
+
+namespace Neverhood {
+
+StaticData::StaticData() {
+}
+
+StaticData::~StaticData() {
+}
+
+void StaticData::load(const char *filename) {
+
+ Common::File fd;
+
+ if (!fd.open(filename))
+ error("StaticData::load() Could not open %s", filename);
+
+ fd.readUint32LE(); // magic
+ fd.readUint32LE(); // version
+
+ // Load message lists
+ uint32 messageListsCount = fd.readUint32LE();
+ debug(3, "messageListsCount: %d", messageListsCount);
+ for (uint32 i = 0; i < messageListsCount; i++) {
+ MessageList *messageList = new MessageList();
+ uint32 id = fd.readUint32LE();
+ uint32 itemCount = fd.readUint32LE();
+ for (uint32 itemIndex = 0; itemIndex < itemCount; itemIndex++) {
+ MessageItem messageItem;
+ messageItem.messageNum = fd.readUint16LE();
+ messageItem.messageValue = fd.readUint32LE();
+ messageList->push_back(messageItem);
+ }
+ _messageLists[id] = messageList;
+ }
+
+ // Load rect lists
+ uint32 rectListsCount = fd.readUint32LE();
+ debug(3, "rectListsCount: %d", rectListsCount);
+ for (uint32 i = 0; i < rectListsCount; i++) {
+ RectList *rectList = new RectList();
+ uint32 id = fd.readUint32LE();
+ uint32 itemCount = fd.readUint32LE();
+ for (uint32 itemIndex = 0; itemIndex < itemCount; itemIndex++) {
+ RectItem rectItem;
+ rectItem.rect.x1 = fd.readUint16LE();
+ rectItem.rect.y1 = fd.readUint16LE();
+ rectItem.rect.x2 = fd.readUint16LE();
+ rectItem.rect.y2 = fd.readUint16LE();
+ uint32 subItemCount = fd.readUint32LE();
+ rectItem.subRects.reserve(subItemCount);
+ for (uint32 subItemIndex = 0; subItemIndex < subItemCount; subItemIndex++) {
+ SubRectItem subRectItem;
+ subRectItem.rect.x1 = fd.readUint16LE();
+ subRectItem.rect.y1 = fd.readUint16LE();
+ subRectItem.rect.x2 = fd.readUint16LE();
+ subRectItem.rect.y2 = fd.readUint16LE();
+ subRectItem.messageListId = fd.readUint32LE();
+ rectItem.subRects.push_back(subRectItem);
+ }
+ rectList->push_back(rectItem);
+ }
+ _rectLists[id] = rectList;
+ }
+
+ // Load hit rects
+ uint32 hitRectListsCount = fd.readUint32LE();
+ debug(3, "hitRectListsCount: %d", hitRectListsCount);
+ for (uint32 i = 0; i < hitRectListsCount; i++) {
+ HitRectList *hitRectList = new HitRectList();
+ uint32 id = fd.readUint32LE();
+ uint32 itemCount = fd.readUint32LE();
+ for (uint32 itemIndex = 0; itemIndex < itemCount; itemIndex++) {
+ HitRect hitRect;
+ hitRect.rect.x1 = fd.readUint16LE();
+ hitRect.rect.y1 = fd.readUint16LE();
+ hitRect.rect.x2 = fd.readUint16LE();
+ hitRect.rect.y2 = fd.readUint16LE();
+ hitRect.type = fd.readUint16LE();
+ hitRectList->push_back(hitRect);
+ }
+ _hitRectLists[id] = hitRectList;
+ }
+
+ // Load navigation lists
+ uint32 navigationListsCount = fd.readUint32LE();
+ debug(3, "navigationListsCount: %d", navigationListsCount);
+ for (uint32 i = 0; i < navigationListsCount; i++) {
+ NavigationList *navigationList = new NavigationList();
+ uint32 id = fd.readUint32LE();
+ uint32 itemCount = fd.readUint32LE();
+ for (uint32 itemIndex = 0; itemIndex < itemCount; itemIndex++) {
+ NavigationItem navigationItem;
+ navigationItem.fileHash = fd.readUint32LE();
+ navigationItem.leftSmackerFileHash = fd.readUint32LE();
+ navigationItem.rightSmackerFileHash = fd.readUint32LE();
+ navigationItem.middleSmackerFileHash = fd.readUint32LE();
+ navigationItem.interactive = fd.readByte();
+ navigationItem.middleFlag = fd.readByte();
+ navigationItem.mouseCursorFileHash = fd.readUint32LE();
+ navigationList->push_back(navigationItem);
+ }
+ _navigationLists[id] = navigationList;
+ }
+
+ // Load HallOfRecordsInfo items
+ uint32 hallOfRecordsInfoItemsCount = fd.readUint32LE();
+ debug(3, "hallOfRecordsInfoItemsCount: %d", hallOfRecordsInfoItemsCount);
+ for (uint32 i = 0; i < hallOfRecordsInfoItemsCount; i++) {
+ HallOfRecordsInfo *hallOfRecordsInfo = new HallOfRecordsInfo();
+ uint32 id = fd.readUint32LE();
+ hallOfRecordsInfo->bgFilename1 = fd.readUint32LE();
+ hallOfRecordsInfo->bgFilename2 = fd.readUint32LE();
+ hallOfRecordsInfo->txFilename = fd.readUint32LE();
+ hallOfRecordsInfo->bgFilename3 = fd.readUint32LE();
+ hallOfRecordsInfo->xPosIndex = fd.readByte();
+ hallOfRecordsInfo->count = fd.readByte();
+ _hallOfRecordsInfoItems[id] = hallOfRecordsInfo;
+ }
+
+ // Load TrackInfo items
+ uint32 trackInfoItemsCount = fd.readUint32LE();
+ debug(3, "trackInfoItemsCount: %d", trackInfoItemsCount);
+ for (uint32 i = 0; i < trackInfoItemsCount; i++) {
+ TrackInfo *trackInfo = new TrackInfo();
+ uint32 id = fd.readUint32LE();
+ trackInfo->bgFilename = fd.readUint32LE();
+ trackInfo->bgShadowFilename = fd.readUint32LE();
+ trackInfo->dataResourceFilename = fd.readUint32LE();
+ trackInfo->trackPointsName = fd.readUint32LE();
+ trackInfo->rectListName = fd.readUint32LE();
+ trackInfo->exPaletteFilename2 = fd.readUint32LE();
+ trackInfo->exPaletteFilename1 = fd.readUint32LE();
+ trackInfo->mouseCursorFilename = fd.readUint32LE();
+ trackInfo->which1 = fd.readUint16LE();
+ trackInfo->which2 = fd.readUint16LE();
+ _trackInfoItems[id] = trackInfo;
+ }
+
+}
+
+HitRectList *StaticData::getHitRectList(uint32 id) {
+ if (!_hitRectLists[id])
+ error("StaticData::getHitRectList() HitRectList with id %08X not found", id);
+ return _hitRectLists[id];
+}
+
+RectList *StaticData::getRectList(uint32 id) {
+ if (!_rectLists[id])
+ error("StaticData::getRectList() RectList with id %08X not found", id);
+ return _rectLists[id];
+}
+
+MessageList *StaticData::getMessageList(uint32 id) {
+ if (!_messageLists[id])
+ error("StaticData::getMessageList() MessageList with id %08X not found", id);
+ return _messageLists[id];
+}
+
+NavigationList *StaticData::getNavigationList(uint32 id) {
+ if (!_navigationLists[id])
+ error("StaticData::getNavigationList() NavigationList with id %08X not found", id);
+ return _navigationLists[id];
+}
+
+HallOfRecordsInfo *StaticData::getHallOfRecordsInfoItem(uint32 id) {
+ if (!_hallOfRecordsInfoItems[id])
+ error("StaticData::getHallOfRecordsInfoItem() HallOfRecordsInfo with id %08X not found", id);
+ return _hallOfRecordsInfoItems[id];
+}
+
+TrackInfo *StaticData::getTrackInfo(uint32 id) {
+ if (!_trackInfoItems[id])
+ error("StaticData::getTrackInfo() TrackInfo with id %08X not found", id);
+ return _trackInfoItems[id];
+}
+
+} // End of namespace Neverhood
diff --git a/engines/neverhood/staticdata.h b/engines/neverhood/staticdata.h
new file mode 100644
index 0000000000..b1cab3bfcd
--- /dev/null
+++ b/engines/neverhood/staticdata.h
@@ -0,0 +1,116 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NEVERHOOD_STATICDATA_H
+#define NEVERHOOD_STATICDATA_H
+
+#include "common/array.h"
+#include "common/hashmap.h"
+#include "neverhood/neverhood.h"
+#include "neverhood/graphics.h"
+
+namespace Neverhood {
+
+struct HitRect {
+ NRect rect;
+ uint16 type;
+};
+
+typedef Common::Array<HitRect> HitRectList;
+
+struct SubRectItem {
+ NRect rect;
+ uint32 messageListId;
+};
+
+struct RectItem {
+ NRect rect;
+ Common::Array<SubRectItem> subRects;
+};
+
+typedef Common::Array<RectItem> RectList;
+
+struct MessageItem {
+ uint32 messageNum;
+ uint32 messageValue;
+};
+
+typedef Common::Array<MessageItem> MessageList;
+
+struct NavigationItem {
+ uint32 fileHash;
+ uint32 leftSmackerFileHash;
+ uint32 rightSmackerFileHash;
+ uint32 middleSmackerFileHash;
+ byte interactive;
+ byte middleFlag;
+ uint32 mouseCursorFileHash;
+};
+
+typedef Common::Array<NavigationItem> NavigationList;
+
+struct HallOfRecordsInfo {
+ uint32 bgFilename1;
+ uint32 bgFilename2;
+ uint32 txFilename;
+ uint32 bgFilename3;
+ byte xPosIndex;
+ byte count;
+};
+
+struct TrackInfo {
+ uint32 id;
+ uint32 bgFilename;
+ uint32 bgShadowFilename;
+ uint32 dataResourceFilename;
+ uint32 trackPointsName;
+ uint32 rectListName;
+ uint32 exPaletteFilename2;
+ uint32 exPaletteFilename1;
+ uint32 mouseCursorFilename;
+ int16 which1;
+ int16 which2;
+};
+
+class StaticData {
+public:
+ StaticData();
+ ~StaticData();
+ void load(const char *filename);
+ HitRectList *getHitRectList(uint32 id);
+ RectList *getRectList(uint32 id);
+ MessageList *getMessageList(uint32 id);
+ NavigationList *getNavigationList(uint32 id);
+ HallOfRecordsInfo *getHallOfRecordsInfoItem(uint32 id);
+ TrackInfo *getTrackInfo(uint32 id);
+protected:
+ Common::HashMap<uint32, HitRectList*> _hitRectLists;
+ Common::HashMap<uint32, RectList*> _rectLists;
+ Common::HashMap<uint32, MessageList*> _messageLists;
+ Common::HashMap<uint32, NavigationList*> _navigationLists;
+ Common::HashMap<uint32, HallOfRecordsInfo*> _hallOfRecordsInfoItems;
+ Common::HashMap<uint32, TrackInfo*> _trackInfoItems;
+};
+
+} // End of namespace Neverhood
+
+#endif /* NEVERHOOD_STATICDATA_H */
diff --git a/engines/neverhood/todo.txt b/engines/neverhood/todo.txt
new file mode 100644
index 0000000000..9d781e06ec
--- /dev/null
+++ b/engines/neverhood/todo.txt
@@ -0,0 +1,45 @@
+NOTE:
+-------
+Some of the TODOs should be done AFTER the whole game logic is implemented
+else the game disasm and reimplemtation code become even more different
+(unless I decide it's ok to do it :)
+
+TODOs which can be done any time:
+-----------------------------------
+- Cleanup
+- Clean up staticdata structs to look more like the ones in create_neverhood
+ (e.g. by using template classes etc.)
+ - Or use a common base class and manage all stuff in one single table and cast stuff accordingly
+
+TODOs which should be done only after the game logic is finished:
+-------------------------------------------------------------------
+- Maybe rework organization of files (e.g. put ALL Sprites into one separate file, same with Modules and Scenes)
+ - This would solve the problem of how to organize stuff which is used several times, and less headers would have to be included
+ - The move special scenes (SmackerScene) into the scenes file
+
+DONE:
+-------
+- Implement game menus
+- Rework sound system (I don't like that SoundResources need to be explicitly initialized in Scene constructors)
+ - Should be just a handle object which initializes itself
+ - Play routine should fill the handle so it can be stopped/queried later
+ - Basically like ScummVM own sound handles
+- RE and implement yet unknown music/sound stuff
+- Implement clever sprite redrawing code (dirty rectangles, microtiles etc.), only redraw what's neccessary
+- Rework the resource system
+ - The current system can be simplified a lot
+ - Also resource purging needs to be implemented
+- Maybe merge CollisionMan with Scene (since it's so far never used independently)
+- Give placeholder stuff (e.g. sub?????, _flag??? etc.) better fitting names
+- Use CursorMan for the mouse cursor (instead of using it like a normal sprite)
+ - This whould make it neccessary to call _system->updateScreen more often else
+ the mouse movement would be choppy
+
+TODOs which are experimental:
+-------------------------------
+NOTE: Since they affect the whole game, they really should be only implemented once the full game logic is implemented.
+These are nothing more than wild ideas for now, any might never be implemented.
+- Use states instead of separate callback methods
+- Try to move more stuff to neverhood.dat
+- Try to use more template functions instead of manually creating functions
+ (Can be coupled with the above to move parameters to the dat and only use IDs)
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp
index 1ddd401b20..2a7e0ce375 100644
--- a/engines/parallaction/balloons.cpp
+++ b/engines/parallaction/balloons.cpp
@@ -727,7 +727,7 @@ void BalloonManager_br::cacheAnims() {
BalloonManager_br::BalloonManager_br(Parallaction_br *vm, Font *font) : _vm(vm), _numBalloons(0),
_leftBalloon(0), _rightBalloon(0), _sw(font), _se(font) {
- if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
_textColors[kSelectedColor] = 12;
_textColors[kUnselectedColor] = 0;
_textColors[kNormalColor] = 0;
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index c1720a1a8e..04642aa632 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -439,7 +439,7 @@ void Parallaction_ns::_c_closeMusic(void *) {
void Parallaction_ns::_c_startIntro(void *parm) {
_rightHandAnim = _location.findAnimation("righthand");
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_soundManI->setMusicFile("intro");
_soundManI->playMusic();
}
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index 43176a0759..fb892c44b2 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -70,7 +70,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -153,7 +153,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -170,7 +170,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSPEECH)
},
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 78cc23311f..06ffd0b89b 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -238,7 +238,7 @@ int16 DialogueManager::selectAnswerN() {
_selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y);
- VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection];
+ VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection];
VisibleAnswer *answer = &_visAnswers[_selection];
if (_selection != _oldSelection) {
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..4c4893ec61 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);
@@ -392,7 +394,7 @@ Frames* DosDisk_ns::loadFrames(const char* name) {
- path data [bit 8] (walkable areas)
*/
void DosDisk_ns::unpackBackground(Common::ReadStream *stream, byte *screen, byte *mask, byte *path) {
- byte storage[127];
+ byte storage[128];
uint32 storageLen = 0, len = 0;
uint32 j = 0;
@@ -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/font.cpp b/engines/parallaction/font.cpp
index 3b40960381..03b1ced8e1 100644
--- a/engines/parallaction/font.cpp
+++ b/engines/parallaction/font.cpp
@@ -668,7 +668,7 @@ GfxObj* DosDisk_br::createInventoryObjects(Common::SeekableReadStream &stream) {
void Parallaction_ns::initFonts() {
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_dialogueFont = _disk->loadFont("comic");
_labelFont = _disk->loadFont("topaz");
_menuFont = _disk->loadFont("slide");
@@ -683,7 +683,7 @@ void Parallaction_ns::initFonts() {
}
void Parallaction_br::initFonts() {
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_menuFont = _disk->loadFont("russia");
_dialogueFont = _disk->loadFont("comic");
_labelFont = _menuFont;
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index a9889cc7af..e2d9532c8a 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -31,7 +31,7 @@
namespace Parallaction {
GfxObj::GfxObj(uint objType, Frames *frames, const char* name) :
- _frames(frames), _keep(true), x(0), y(0), z(0), _prog(0), _flags(0),
+ _frames(frames), x(0), y(0), z(0), _prog(0), _flags(0),
type(objType), frame(0), layer(3), scale(100), _hasMask(false), _hasPath(false) {
if (name) {
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 59cd02e6ef..b8a8ceb61f 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -746,7 +746,7 @@ Gfx::Gfx(Parallaction* vm) :
_unpackedBitmap = new byte[MAXIMUM_UNPACKED_BITMAP_SIZE];
assert(_unpackedBitmap);
- if ((_gameType == GType_BRA) && (_vm->getPlatform() == Common::kPlatformPC)) {
+ if ((_gameType == GType_BRA) && (_vm->getPlatform() == Common::kPlatformDOS)) {
// this loads the backup palette needed by the PC version of BRA (see setBackground()).
BackgroundInfo paletteInfo;
_disk->loadSlide(paletteInfo, "pointer");
@@ -834,7 +834,7 @@ void Gfx::setBackground(uint type, BackgroundInfo *info) {
// The PC version of BRA needs the entries 20-31 of the palette to be constant, but
// the background resource files are screwed up. The right colors come from an unused
// bitmap (pointer.bmp). Nothing is known about the Amiga version so far.
- if ((_gameType == GType_BRA) && (_vm->getPlatform() == Common::kPlatformPC)) {
+ if ((_gameType == GType_BRA) && (_vm->getPlatform() == Common::kPlatformDOS)) {
int r, g, b;
for (uint i = 16; i < 32; i++) {
_backupPal.getEntry(i, r, g, b);
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index e9daabb194..55c1c0c04e 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -289,8 +289,6 @@ class GfxObj {
char *_name;
Frames *_frames;
- bool _keep;
-
public:
int16 x, y;
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 5bc5acf630..ddbc31d730 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -120,7 +120,7 @@ class MainMenuInputState_BR : public MenuInputState {
memset(data, 0, MENUITEM_WIDTH * MENUITEM_HEIGHT * 2);
// build first frame to be displayed when item is not selected
- if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
_vm->_menuFont->setColor(0);
} else {
_vm->_menuFont->setColor(23);
@@ -238,7 +238,7 @@ public:
virtual void enter() {
_vm->_gfx->clearScreen();
int x = 0, y = 0, i = 0;
- if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
x = 20;
y = 50;
}
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index 4fbd9b99cc..bf7cdc439d 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -478,7 +478,7 @@ void Input::initCursors() {
break;
case GType_BRA:
- if (_vm->getPlatform() == Common::kPlatformPC) {
+ if (_vm->getPlatform() == Common::kPlatformDOS) {
_dinoCursor = _vm->_disk->loadPointer("pointer1");
_dougCursor = _vm->_disk->loadPointer("pointer2");
_donnaCursor = _vm->_disk->loadPointer("pointer3");
@@ -551,8 +551,12 @@ void Input::setInventoryCursor(ItemName name) {
case GType_BRA: {
byte *src = _mouseArrow->getData(0);
byte *dst = _comboArrow->getData(0);
- memcpy(dst, src, _comboArrow->getSize(0));
// FIXME: destination offseting is not clear
+ Common::Rect srcRect, dstRect;
+ _mouseArrow->getRect(0, srcRect);
+ _comboArrow->getRect(0, dstRect);
+ for (uint y = 0; y < (uint)srcRect.height(); y++)
+ memcpy(dst + y * dstRect.width(), src + y * srcRect.width(), srcRect.width());
_vm->_inventoryRenderer->drawItem(name, dst + _mouseComboProps_BR._yOffset * _mouseComboProps_BR._width + _mouseComboProps_BR._xOffset, _mouseComboProps_BR._width);
CursorMan.replaceCursor(dst, _mouseComboProps_BR._width, _mouseComboProps_BR._height, 0, 0, 0);
break;
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/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index e6ef53aa78..f868abfbf4 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -583,7 +583,10 @@ void Parallaction::runZone(ZonePtr z) {
// ZONE TYPE: DOOR
void Parallaction::updateDoor(ZonePtr z, bool close) {
- z->_flags = close ? (z->_flags |= kFlagsClosed) : (z->_flags &= ~kFlagsClosed);
+ if (close)
+ z->_flags |= kFlagsClosed;
+ else
+ z->_flags &= ~kFlagsClosed;
if (z->u._gfxobj) {
uint frame = (close ? 0 : 1);
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 07755fac5f..f9df9d85db 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -52,7 +52,7 @@ Common::Error Parallaction_br::init() {
_screenWidth = 640;
_screenHeight = 400;
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
if (getFeatures() & GF_DEMO) {
_disk = new DosDemoDisk_br(this);
} else {
@@ -297,7 +297,7 @@ void Parallaction_br::changeLocation() {
// TODO: maybe handle this into Disk
delete _objects;
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_objects = _disk->loadObjects("icone.ico");
} else {
_objects = _disk->loadObjects("icons.ico", _part);
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index d33be0aa47..49b63dcac3 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -152,7 +152,7 @@ Common::Error Parallaction_ns::init() {
_screenWidth = 320;
_screenHeight = 200;
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_disk = new DosDisk_ns(this);
} else {
if (getFeatures() & GF_DEMO) {
@@ -163,7 +163,7 @@ Common::Error Parallaction_ns::init() {
_disk->init();
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_soundManI = new DosSoundMan_ns(this);
_soundManI->setMusicVolume(ConfMan.getInt("music_volume"));
} else {
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index e7f1b1b1ed..e60349ffa8 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -325,6 +325,7 @@ DECLARE_LOCATION_PARSER(location) {
nextToken = 2;
}
+ debugC(7, kDebugParser, "flip: %d", flip);
// TODO: handle background horizontal flip (via a context parameter)
if (_tokens[nextToken][0] != '\0') {
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 41ff74f0b4..ac5e7c7135 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -292,7 +292,7 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) {
AnimationPtr a(new Animation);
_zoneProg++;
- strncpy(a->_name, name, ZONENAME_LENGTH);
+ Common::strlcpy(a->_name, name, ZONENAME_LENGTH);
a->_flags |= kFlagsIsAnimation;
list.push_front(AnimationPtr(a));
@@ -1312,7 +1312,7 @@ void LocationParser_ns::parseZone(ZoneList &list, char *name) {
ZonePtr z(new Zone);
_zoneProg++;
- strncpy(z->_name, name, ZONENAME_LENGTH);
+ Common::strlcpy(z->_name, name, ZONENAME_LENGTH);
ctxt.z = z;
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index ad510eb1f1..4a643aaf1d 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -507,10 +507,14 @@ void SoundMan_br::execute(int command, const char *parm) {
stopMusic();
break;
case SC_SETMUSICFILE:
+ if (!parm)
+ error("no parameter passed to SC_SETMUSICFILE");
setMusicFile(parm);
break;
case SC_PLAYSFX:
+ if (!parm)
+ error("no parameter passed to SC_PLAYSFX");
playSfx(parm, _sfxChannel, _sfxLooping, _sfxVolume);
break;
case SC_STOPSFX:
diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp
index f09b1241bc..32404037f0 100644
--- a/engines/parallaction/staticres.cpp
+++ b/engines/parallaction/staticres.cpp
@@ -396,7 +396,7 @@ void Parallaction_ns::initResources() {
_localFlagNames = new FixedTable(NUM_LOCATIONS, 1);
_localFlagNames->addData("visited");
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_callables = _dosCallables;
} else {
_callables = _amigaCallables;
@@ -412,7 +412,7 @@ void Parallaction_br::initResources() {
_localFlagNames->addData("visited");
_localFlagNames->addData("testtrue");
- if (getPlatform() == Common::kPlatformPC) {
+ if (getPlatform() == Common::kPlatformDOS) {
_callables = _dosCallables;
} else {
_callables = _amigaCallables;
diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp
index 5babdf34af..897d31d7bd 100644
--- a/engines/pegasus/cursor.cpp
+++ b/engines/pegasus/cursor.cpp
@@ -82,8 +82,14 @@ void Cursor::setCurrentFrameIndex(int32 index) {
_index = index;
if (index != -1) {
loadCursorImage(_info[index]);
- CursorMan.replaceCursorPalette(_info[index].palette, 0, _info[index].colorCount);
- CursorMan.replaceCursor((byte *)_info[index].surface->pixels, _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, 0);
+
+ if (_info[index].surface->format.bytesPerPixel == 1) {
+ CursorMan.replaceCursorPalette(_info[index].palette, 0, _info[index].colorCount);
+ CursorMan.replaceCursor(_info[index].surface->pixels, _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, 0);
+ } else {
+ CursorMan.replaceCursor(_info[index].surface->pixels, _info[index].surface->w, _info[index].surface->h, _info[index].hotspot.x, _info[index].hotspot.y, _info[index].surface->format.RGBToColor(0xFF, 0xFF, 0xFF), false, &_info[index].surface->format);
+ }
+
((PegasusEngine *)g_engine)->_gfx->markCursorAsDirty();
}
}
@@ -135,9 +141,25 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) {
if (cursorInfo.surface)
return;
+ PegasusEngine *vm = (PegasusEngine *)g_engine;
+
+ if (vm->isDVD()) {
+ // The DVD version has some higher color PICT images for its cursors
+ Common::SeekableReadStream *pictStream = vm->_resFork->getResource(MKTAG('P', 'I', 'C', 'T'), cursorInfo.tag + 1000);
+
+ if (pictStream) {
+ Graphics::PICTDecoder pict;
+ if (!pict.loadStream(*pictStream))
+ error("Failed to decode cursor PICT %d", cursorInfo.tag + 1000);
+
+ cursorInfo.surface = pict.getSurface()->convertTo(g_system->getScreenFormat());
+ delete pictStream;
+ return;
+ }
+ }
+
cursorInfo.surface = new Graphics::Surface();
- PegasusEngine *vm = (PegasusEngine *)g_engine;
Common::SeekableReadStream *cicnStream = vm->_resFork->getResource(MKTAG('c', 'i', 'c', 'n'), cursorInfo.tag);
if (!cicnStream)
diff --git a/engines/pegasus/detection.cpp b/engines/pegasus/detection.cpp
index 908005b665..721c382d4f 100644
--- a/engines/pegasus/detection.cpp
+++ b/engines/pegasus/detection.cpp
@@ -35,6 +35,10 @@ struct PegasusGameDescription {
ADGameDescription desc;
};
+enum {
+ GF_DVD = (1 << 1)
+};
+
bool PegasusEngine::hasFeature(EngineFeature f) const {
return
(f == kSupportsRTL)
@@ -46,6 +50,22 @@ bool PegasusEngine::isDemo() const {
return (_gameDescription->desc.flags & ADGF_DEMO) != 0;
}
+bool PegasusEngine::isDVD() const {
+ return (_gameDescription->desc.flags & GF_DVD) != 0;
+}
+
+bool PegasusEngine::isDVDDemo() const {
+ return isDemo() && isDVD();
+}
+
+bool PegasusEngine::isOldDemo() const {
+ return isDemo() && !isDVD();
+}
+
+bool PegasusEngine::isWindows() const {
+ return _gameDescription->desc.platform == Common::kPlatformWindows;
+}
+
} // End of namespace Pegasus
static const PlainGameDescriptor pegasusGames[] = {
@@ -76,7 +96,31 @@ static const PegasusGameDescription gameDescriptions[] = {
AD_ENTRY1s("JMP PP Resources", "d13a602d2498010d720a6534f097f88b", 360129),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_MACRESFORK|ADGF_DEMO,
+ ADGF_MACRESFORK | ADGF_DEMO,
+ GUIO1(GUIO_NOLAUNCHLOAD)
+ },
+ },
+
+ {
+ {
+ "pegasus",
+ "DVD Demo",
+ AD_ENTRY1s("JMP PP Resources", "d0fcda50dc75c7a81ae314e6a813f4d2", 93495),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_MACRESFORK | ADGF_DEMO | GF_DVD,
+ GUIO1(GUIO_NOLAUNCHLOAD)
+ },
+ },
+
+ {
+ {
+ "pegasus",
+ "DVD Demo",
+ AD_ENTRY1s("JMP PP Resources", "d0fcda50dc75c7a81ae314e6a813f4d2", 93495),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_MACRESFORK | ADGF_DEMO | GF_DVD,
GUIO1(GUIO_NOLAUNCHLOAD)
},
},
@@ -119,12 +163,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 +180,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/interface.cpp b/engines/pegasus/interface.cpp
index d9d3865192..f2429bf36a 100644
--- a/engines/pegasus/interface.cpp
+++ b/engines/pegasus/interface.cpp
@@ -186,6 +186,11 @@ void Interface::validateInventoryPanel() {
_inventoryLid.setDisplayOrder(kInventoryLidOrder);
_inventoryLid.startDisplaying();
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryOpenSound.initFromAIFFFile("Sounds/Items/Inventory Panel Open.aif");
+ _inventoryCloseSound.initFromAIFFFile("Sounds/Items/Inventory Panel Close.aif");
+ }
+
_inventoryPushCallBack.initCallBack(&_inventoryPush, kCallBackAtExtremes);
_inventoryLidCallBack.initCallBack(&_inventoryLid, kCallBackAtExtremes);
@@ -231,6 +236,11 @@ void Interface::validateBiochipPanel() {
_biochipLid.setDisplayOrder(kBiochipLidOrder);
_biochipLid.startDisplaying();
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipOpenSound.initFromAIFFFile("Sounds/Items/Biochip Panel Open.aif");
+ _biochipCloseSound.initFromAIFFFile("Sounds/Items/Biochip Panel Close.aif");
+ }
+
_biochipPushCallBack.initCallBack(&_biochipPush, kCallBackAtExtremes);
_biochipLidCallBack.initCallBack(&_biochipLid, kCallBackAtExtremes);
@@ -385,6 +395,11 @@ void Interface::raiseInventoryDrawer(const bool doCallBacks) {
_inventoryLid.show();
_inventoryPush.show();
_inventoryLid.start();
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryCloseSound.stopSound();
+ _inventoryOpenSound.playSound();
+ }
}
void Interface::playEndMessage() {
@@ -446,6 +461,11 @@ void Interface::lowerInventoryDrawer(const bool doCallBacks) {
FaderMoveSpec moveSpec;
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 15, 0);
_inventoryPush.startFader(moveSpec);
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _inventoryOpenSound.stopSound();
+ _inventoryCloseSound.playSound();
+ }
}
}
@@ -487,6 +507,11 @@ void Interface::raiseBiochipDrawer(const bool doCallBacks) {
_biochipLid.show();
_biochipPush.show();
_biochipLid.start();
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipCloseSound.stopSound();
+ _biochipOpenSound.playSound();
+ }
}
void Interface::biochipLidOpen(const bool doCallBacks) {
@@ -521,6 +546,11 @@ void Interface::lowerBiochipDrawer(const bool doCallBacks) {
FaderMoveSpec moveSpec;
moveSpec.makeTwoKnotFaderSpec(60, 0, 1000, 9, 0);
_biochipPush.startFader(moveSpec);
+
+ if (((PegasusEngine *)g_engine)->isDVD()) {
+ _biochipOpenSound.stopSound();
+ _biochipCloseSound.playSound();
+ }
}
}
diff --git a/engines/pegasus/interface.h b/engines/pegasus/interface.h
index a65d9a595a..5f04f98df0 100644
--- a/engines/pegasus/interface.h
+++ b/engines/pegasus/interface.h
@@ -29,6 +29,7 @@
#include "pegasus/hotspot.h"
#include "pegasus/input.h"
#include "pegasus/notification.h"
+#include "pegasus/sound.h"
#include "pegasus/surface.h"
#include "pegasus/transition.h"
#include "pegasus/items/inventorypicture.h"
@@ -125,6 +126,7 @@ protected:
NotificationCallBack _inventoryLidCallBack;
InventoryItemsPicture _inventoryPanel;
bool _inventoryUp, _inventoryRaised;
+ Sound _inventoryOpenSound, _inventoryCloseSound;
Push _biochipPush;
SpriteSequence _biochipLid;
@@ -132,6 +134,7 @@ protected:
NotificationCallBack _biochipLidCallBack;
BiochipPicture _biochipPanel;
bool _biochipUp, _biochipRaised;
+ Sound _biochipOpenSound, _biochipCloseSound;
Hotspot _currentItemSpot;
Hotspot _currentBiochipSpot;
diff --git a/engines/pegasus/items/inventorypicture.h b/engines/pegasus/items/inventorypicture.h
index 88a4a4ba75..9eba25bc3a 100644
--- a/engines/pegasus/items/inventorypicture.h
+++ b/engines/pegasus/items/inventorypicture.h
@@ -106,7 +106,6 @@ protected:
virtual TimeValue getItemPanelTime(Item *);
void loopCurrentItem();
- InputHandler *_previousHandler;
bool _isLooping;
};
diff --git a/engines/pegasus/menu.cpp b/engines/pegasus/menu.cpp
index deaa460188..e55c006f86 100644
--- a/engines/pegasus/menu.cpp
+++ b/engines/pegasus/menu.cpp
@@ -149,10 +149,14 @@ MainMenu::MainMenu() : GameMenu(kMainMenuID), _menuBackground(0), _overviewButto
bool isDemo = ((PegasusEngine *)g_engine)->isDemo();
- if (isDemo)
- _menuBackground.initFromPICTFile("Images/Demo/DemoMenu.pict");
- else
+ if (isDemo) {
+ if (((PegasusEngine *)g_engine)->isWindows())
+ _menuBackground.initFromPICTFile("Images/Demo/DemoMenuPC.pict");
+ else
+ _menuBackground.initFromPICTFile("Images/Demo/DemoMenu.pict");
+ } else {
_menuBackground.initFromPICTFile("Images/Main Menu/MainMenu.mac");
+ }
_menuBackground.setDisplayOrder(0);
_menuBackground.startDisplaying();
_menuBackground.show();
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp
index 75c287c7a6..59814a753d 100644
--- a/engines/pegasus/movie.cpp
+++ b/engines/pegasus/movie.cpp
@@ -161,9 +161,10 @@ void Movie::setTime(const TimeValue time, const TimeScale scale) {
}
void Movie::setRate(const Common::Rational rate) {
- if (rate != 1 && rate != 0) {
- warning("Cannot set movie rate");
- start();
+ if (_video) {
+ _video->setRate(rate);
+
+ TimeBase::setRate(_video->getRate());
return;
}
diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
index 140e6e8093..9a378a6728 100644
--- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp
+++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp
@@ -1291,6 +1291,7 @@ void Caldoria::activateHotspots() {
_vm->getAllHotspots().deactivateOneHotspot(kCaldoriaRightDrawerNoKeysCloseSpotID);
}
}
+ break;
case kCaldoriaReplicator:
if (GameState.getCaldoriaMadeOJ())
_vm->getAllHotspots().deactivateOneHotspot(kCaldoriaMakeOJSpotID);
@@ -1640,10 +1641,12 @@ void Caldoria::takeElevator(uint startFloor, uint endFloor) {
break;
case 2:
_croppedMovie.setTime(k1To2Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 3:
_croppedMovie.setTime(k1To3Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 4:
@@ -1670,10 +1673,12 @@ void Caldoria::takeElevator(uint startFloor, uint endFloor) {
break;
case 2:
_croppedMovie.setTime(k4To2Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 3:
_croppedMovie.setTime(k4To3Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 4:
@@ -1697,10 +1702,12 @@ void Caldoria::takeElevator(uint startFloor, uint endFloor) {
break;
case 2:
_croppedMovie.setTime(k5To2Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 3:
_croppedMovie.setTime(k5To3Time);
+ _croppedMovie.redrawMovieWorld();
requestSpotSound(kCaldoriaNoOtherDestinationIn, kCaldoriaNoOtherDestinationOut, kFilterNoInput, kSpotSoundCompletedFlag);
break;
case 4:
diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp
index 34c9e3d0f8..775221589a 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;
@@ -2459,6 +2470,7 @@ void Mars::doCanyonChase() {
playSpotSoundSync(kShuttleCockpitIn, kShuttleCockpitOut);
_centerShuttleMovie.setTime(kShuttleCenterCheckTime);
+ _centerShuttleMovie.redrawMovieWorld();
playSpotSoundSync(kShuttleOnboardIn, kShuttleOnboardOut);
_shuttleEnergyMeter.initShuttleEnergyMeter();
@@ -2643,7 +2655,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/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp
index 07be62c957..38366c4ba2 100644
--- a/engines/pegasus/neighborhood/neighborhood.cpp
+++ b/engines/pegasus/neighborhood/neighborhood.cpp
@@ -1761,10 +1761,10 @@ void Neighborhood::pauseTimer() {
}
void Neighborhood::resumeTimer() {
- // NOTE: Yes, this function calls pauseFuse!
- // Looks like an original game bug, will need
- // to investigate how this affects gameplay.
- _eventTimer.pauseFuse();
+ // NOTE: The original calls pauseFuse() here, which causes a bug with the robot
+ // in WSC on the catwalk, causing him never to come after you if you don't act
+ // against him.
+ _eventTimer.resumeFuse();
}
bool Neighborhood::timerPaused() {
diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.cpp b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
index 06e40c2b3a..1416c51c8d 100644
--- a/engines/pegasus/neighborhood/norad/delta/globegame.cpp
+++ b/engines/pegasus/neighborhood/norad/delta/globegame.cpp
@@ -64,6 +64,10 @@ void GlobeTracker::setTrackParameters(const Hotspot *trackSpot, GlobeTrackDirect
_globeMovie->setSegment(start, start + kDurationPerRow);
+ // Clip new time so we don't go past the end of the segment
+ if (newTime >= start + kDurationPerRow)
+ newTime = start + kDurationPerRow - 1;
+
if (newTime != time) {
_globeMovie->setTime(newTime);
_globeMovie->redrawMovieWorld();
@@ -84,6 +88,10 @@ void GlobeTracker::setTrackParameters(const Hotspot *trackSpot, GlobeTrackDirect
_globeMovie->setSegment(start, start + kDurationPerRow);
+ // Clip new time so we don't go past the end of the segment
+ if (newTime >= start + kDurationPerRow)
+ newTime = start + kDurationPerRow - 1;
+
if (newTime != time) {
_globeMovie->setTime(newTime);
_globeMovie->redrawMovieWorld();
@@ -621,6 +629,7 @@ void GlobeGame::receiveNotification(Notification *notification, const Notificati
_monitorMovie.stop();
_monitorMovie.setSegment(0, _monitorMovie.getDuration());
_monitorMovie.setTime(kSplash2End * scale - 1);
+ _monitorMovie.redrawMovieWorld();
_monitorMovie.setFlags(0);
_owner->requestDelay(1, 2, kFilterNoInput, 0);
@@ -643,6 +652,7 @@ void GlobeGame::receiveNotification(Notification *notification, const Notificati
_monitorMovie.stop();
_monitorMovie.setSegment(0, _monitorMovie.getDuration());
_monitorMovie.setTime(kNewLaunchSiloTime * scale);
+ _monitorMovie.redrawMovieWorld();
_owner->requestSpotSound(kNewLaunchSiloIn, kNewLaunchSiloOut, kFilterNoInput,
kSpotSoundCompletedFlag);
_gameState = kPlayingNewSilo1;
diff --git a/engines/pegasus/neighborhood/norad/pressuredoor.cpp b/engines/pegasus/neighborhood/norad/pressuredoor.cpp
index d1378567d3..a12e971d10 100644
--- a/engines/pegasus/neighborhood/norad/pressuredoor.cpp
+++ b/engines/pegasus/neighborhood/norad/pressuredoor.cpp
@@ -323,7 +323,8 @@ void PressureDoor::receiveNotification(Notification *notification, const Notific
_robotState = kRobotDead;
_levelsMovie.stop();
_levelsMovie.setSegment((kNormalSubRoomPressure + kPressureBase) * _levelsScale,
- (GameState.getNoradSubRoomPressure() + kPressureBase) * _levelsScale);
+ (GameState.getNoradSubRoomPressure() + kPressureBase) * _levelsScale + 1);
+ _levelsMovie.setTime((GameState.getNoradSubRoomPressure() + kPressureBase) * _levelsScale);
_pressureCallBack.setCallBackFlag(kPressureDroppingFlag);
_pressureCallBack.scheduleCallBack(kTriggerAtStart, 0, 0);
_typeMovie.stop();
@@ -335,7 +336,7 @@ void PressureDoor::receiveNotification(Notification *notification, const Notific
_downButton.setCurrentFrameIndex(1);
_gameState = kGameOver;
allowInput(false);
- _levelsMovie.setRate(Common::Rational(0x5555, 0x10000) - 1); // Should match door tracker.
+ _levelsMovie.setRate(Common::Rational(-4, 3)); // Should match door tracker.
break;
case kRobotDead:
allowInput(true);
diff --git a/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp b/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp
index 814d7717de..d62b069e46 100644
--- a/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp
+++ b/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp
@@ -125,6 +125,13 @@ void Prehistoric::setUpAIRules() {
AIRule *rule = new AIRule(hasLogCondition, doneAction);
g_AIArea->addAIRule(rule);
} else {
+ AIPlayMessageAction *messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP25W", false);
+ AIHasItemCondition *hasLogCondition = new AIHasItemCondition(kHistoricalLog);
+ AIRule *rule = new AIRule(hasLogCondition, messageAction);
+ g_AIArea->addAIRule(rule);
+ }
+
+ if (!_vm->isOldDemo()) {
AIPlayMessageAction *messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP1NB", false);
AILocationCondition *locCondition = new AILocationCondition(1);
locCondition->addLocation(MakeRoomView(kPrehistoric16, kNorth));
@@ -159,11 +166,6 @@ void Prehistoric::setUpAIRules() {
AITimerCondition *timerCondition = new AITimerCondition(kPrehistoricWarningTimeLimit, 1, true);
rule = new AIRule(timerCondition, messageAction);
g_AIArea->addAIRule(rule);
-
- messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP25W", false);
- AIHasItemCondition *hasLogCondition = new AIHasItemCondition(kHistoricalLog);
- rule = new AIRule(hasLogCondition, messageAction);
- g_AIArea->addAIRule(rule);
}
}
}
@@ -402,9 +404,10 @@ void Prehistoric::loadAmbientLoops() {
switch (room) {
case kPrehistoric02:
// 1/4 volume.
- if (GameState.getPrehistoricSeenTimeStream())
- loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 64);
- break;
+ if (!GameState.getPrehistoricSeenTimeStream())
+ break;
+
+ // Fall through
case kPrehistoric01:
case kPrehistoric03:
case kPrehistoric04:
@@ -419,7 +422,10 @@ void Prehistoric::loadAmbientLoops() {
case kPrehistoric19:
case kPrehistoric20:
// 1/4 volume.
- loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 64);
+ if (_vm->isDVD()) // Updated sound for the DVD version
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.32k.AIFF", 64);
+ else
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 64);
break;
case kPrehistoric08:
case kPrehistoric10:
@@ -429,11 +435,17 @@ void Prehistoric::loadAmbientLoops() {
case kPrehistoric18:
case kPrehistoric21:
// 3/16 volume.
- loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 48);
+ if (_vm->isDVD()) // Updated sound for the DVD version
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.32k.AIFF", 48);
+ else
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 48);
break;
case kPrehistoric25:
// 1/8 volume.
- loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 32);
+ if (_vm->isDVD()) // Updated sound for the DVD version
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.32k.AIFF", 32);
+ else
+ loadLoopSound1("Sounds/Prehistoric/P02SAL00.22k.AIFF", 32);
break;
case kPrehistoric22:
case kPrehistoric22North:
@@ -470,19 +482,29 @@ void Prehistoric::loadAmbientLoops() {
break;
case kPrehistoric01:
case kPrehistoric25:
- loadLoopSound2("Sounds/Prehistoric/VolcLoop.22K.AIFF", 64);
+ if (_vm->isDVD())
+ loadLoopSound2("Sounds/Prehistoric/VolcLoop.32K.AIFF", 64);
+ else
+ loadLoopSound2("Sounds/Prehistoric/VolcLoop.22K.AIFF", 64);
break;
case kPrehistoric18:
- if (_privateFlags.getFlag(kPrehistoricPrivateExtendedBridgeFlag))
- loadLoopSound2("Sounds/Prehistoric/P18EAL00.22k.AIFF", 0x100, 0, 0);
- else
+ if (_privateFlags.getFlag(kPrehistoricPrivateExtendedBridgeFlag)) {
+ if (_vm->isDVD()) // Updated sound for the DVD version
+ loadLoopSound2("Sounds/Prehistoric/P18EAL00.44K.aiff", 0x100, 0, 0);
+ else
+ loadLoopSound2("Sounds/Prehistoric/P18EAL00.22k.AIFF", 0x100, 0, 0);
+ } else {
loadLoopSound2("");
+ }
break;
case kPrehistoric23:
case kPrehistoric24:
case kPrehistoric22:
case kPrehistoric22North:
- loadLoopSound2("Sounds/Prehistoric/P24NAL00.22k.AIFF", 64);
+ if (_vm->isDVD()) // Updated sound for the DVD version
+ loadLoopSound2("Sounds/Prehistoric/P24NAL00.32k.AIFF", 64);
+ else
+ loadLoopSound2("Sounds/Prehistoric/P24NAL00.22k.AIFF", 64);
break;
}
}
@@ -575,7 +597,7 @@ Common::String Prehistoric::getEnvScanMovie() {
Common::String movieName = Neighborhood::getEnvScanMovie();
if (movieName.empty()) {
- if (!_vm->isDemo()) {
+ if (!_vm->isOldDemo()) {
switch (GameState.getCurrentRoom()) {
case kPrehistoric16:
case kPrehistoric23:
diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
index b598841b45..9b843da5d6 100644
--- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp
+++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp
@@ -622,6 +622,13 @@ void RipTimer::draw(const Common::Rect &updateRect) {
}
void RipTimer::timeChanged(const TimeValue newTime) {
+ // WORKAROUND: If the timer isn't running, don't run the following code.
+ // Fixes use of the code when it shouldn't be running (since this is an
+ // IdlerAnimation, this is called on useIdleTime() but this specific
+ // timer only makes sense when used as an actual timer).
+ if (!isRunning())
+ return;
+
Common::Rect bounds;
getBounds(bounds);
diff --git a/engines/pegasus/neighborhood/wsc/wsc.cpp b/engines/pegasus/neighborhood/wsc/wsc.cpp
index f3bf113333..50b7774da4 100644
--- a/engines/pegasus/neighborhood/wsc/wsc.cpp
+++ b/engines/pegasus/neighborhood/wsc/wsc.cpp
@@ -646,11 +646,13 @@ uint WSC::getNumHints() {
return 1;
break;
case MakeRoomView(kWSC03, kNorth):
- if (inSynthesizerGame() || (_vm->getEnergyDeathReason() == kDeathDidntStopPoison &&
- !_privateFlags.getFlag(kWSCPrivateInMoleculeGameFlag) &&
- !GameState.getWSCDesignedAntidote()))
- return 3;
- break;
+ // WORKAROUND: The original game is missing the first two hint movies and
+ // just plays nothing in its stead. We'll just return that we have one
+ // hint available.
+ if (inSynthesizerGame())
+ return 1;
+
+ // fall through
case MakeRoomView(kWSC01, kNorth):
case MakeRoomView(kWSC01, kSouth):
case MakeRoomView(kWSC01, kEast):
@@ -779,10 +781,12 @@ Common::String WSC::getHintMovie(uint hintNum) {
}
break;
case MakeRoomView(kWSC03, kNorth):
+ // WORKAROUND: The original game is missing the first two hint movies and
+ // just plays nothing in its stead. We just make it the first hint.
if (inSynthesizerGame())
- return Common::String::format("Images/AI/WSC/XW03NH%d", hintNum);
+ return "Images/AI/WSC/XW03NH3";
- return Common::String::format("Images/AI/WSC/XWPH%d", hintNum);
+ // fall through
case MakeRoomView(kWSC01, kNorth):
case MakeRoomView(kWSC01, kSouth):
case MakeRoomView(kWSC01, kEast):
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index 81e8058628..463e81e52e 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -33,9 +33,11 @@
#include "common/textconsole.h"
#include "common/translation.h"
#include "common/random.h"
+#include "backends/keymapper/keymapper.h"
#include "base/plugins.h"
#include "base/version.h"
#include "gui/saveload.h"
+#include "video/theora_decoder.h"
#include "video/qt_decoder.h"
#include "pegasus/console.h"
@@ -151,6 +153,7 @@ Common::Error PegasusEngine::run() {
}
// Set up input
+ initKeymap();
InputHandler::setInputHandler(this);
allowInput(true);
@@ -237,6 +240,9 @@ bool PegasusEngine::detectOpeningClosingDirectory() {
void PegasusEngine::createItems() {
Common::SeekableReadStream *res = _resFork->getResource(MKTAG('N', 'I', 't', 'm'), 0x80);
+ if (!res)
+ error("Couldn't find neighborhood items resource");
+
uint16 entryCount = res->readUint16BE();
for (uint16 i = 0; i < entryCount; i++) {
@@ -614,7 +620,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);
@@ -637,9 +643,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;
@@ -649,7 +661,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)
@@ -667,19 +695,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:
@@ -818,7 +862,8 @@ void PegasusEngine::doGameMenuCommand(const GameMenuCommand command) {
case kMenuCmdDeathQuitDemo:
if (isDemo())
showTempScreen("Images/Demo/NGquitScrn.pict");
- _system->quit();
+ _gfx->doFadeOutSync();
+ quitGame();
break;
case kMenuCmdOverview:
stopIntroTimer();
@@ -1132,10 +1177,15 @@ void PegasusEngine::doInterfaceOverview() {
controllerHighlight.hide();
}
- overviewText.setTime(time * 3 + 2, 15);
- overviewText.redrawMovieWorld();
+ // The original just constantly redraws the frame, but that
+ // doesn't actually need to be done.
+ if ((time * 3 + 2) * 40 != overviewText.getTime()) {
+ overviewText.setTime(time * 3 + 2, 15);
+ overviewText.redrawMovieWorld();
+ }
refreshDisplay();
+ _system->delayMillis(10);
}
if (shouldQuit())
@@ -1313,8 +1363,14 @@ bool PegasusEngine::playMovieScaled(Video::VideoDecoder *video, uint16 x, uint16
if (video->needsUpdate()) {
const Graphics::Surface *frame = video->decodeNextFrame();
- if (frame)
- drawScaledFrame(frame, x, y);
+ if (frame) {
+ if (frame->w <= 320 && frame->h <= 240) {
+ drawScaledFrame(frame, x, y);
+ } else {
+ _system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h);
+ _system->updateScreen();
+ }
+ }
}
Input input;
@@ -1338,6 +1394,19 @@ void PegasusEngine::die(const DeathReason reason) {
}
void PegasusEngine::doDeath() {
+#ifdef USE_THEORADEC
+ // The updated demo has a new Theora video for the closing
+ if (isDVDDemo() && _deathReason == kPlayerWonGame) {
+ Video::TheoraDecoder decoder;
+
+ if (decoder.loadFile("Images/Demo TSA/DemoClosing.ogg")) {
+ throwAwayEverything();
+ decoder.start();
+ playMovieScaled(&decoder, 0, 0);
+ }
+ }
+#endif
+
_gfx->doFadeOutSync();
throwAwayEverything();
useMenu(new DeathMenu(_deathReason));
@@ -1420,6 +1489,10 @@ void PegasusEngine::switchGameMode(const GameMode newMode, const GameMode oldMod
}
bool PegasusEngine::canSwitchGameMode(const GameMode newMode, const GameMode oldMode) {
+ // WORKAROUND: Don't allow game mode switches when the interface is not set up.
+ // Prevents segfaults when pressing 'i' when in the space chase.
+ if (!g_interface)
+ return false;
if (newMode == kModeInventoryPick && oldMode == kModeBiochipPick)
return false;
if (newMode == kModeBiochipPick && oldMode == kModeInventoryPick)
@@ -1538,6 +1611,18 @@ void PegasusEngine::startNewGame() {
GameState.setPrehistoricSeenFlyer2(false);
GameState.setPrehistoricSeenBridgeZoom(false);
GameState.setPrehistoricBreakerThrown(false);
+
+#ifdef USE_THEORADEC
+ if (isDVD()) {
+ // The updated demo has a new Theora video for the closing
+ Video::TheoraDecoder decoder;
+
+ if (decoder.loadFile("Images/Demo TSA/DemoOpening.ogg")) {
+ decoder.start();
+ playMovieScaled(&decoder, 0, 0);
+ }
+ }
+#endif
} else {
jumpToNewEnvironment(kCaldoriaID, kCaldoria00, kEast);
}
@@ -2343,4 +2428,41 @@ uint PegasusEngine::getNeighborhoodCD(const NeighborhoodID neighborhood) const {
return 1;
}
+void PegasusEngine::initKeymap() {
+#ifdef ENABLE_KEYMAPPER
+ static const char *const kKeymapName = "pegasus";
+ Common::Keymapper *const mapper = _eventMan->getKeymapper();
+
+ // Do not try to recreate same keymap over again
+ if (mapper->getKeymap(kKeymapName) != 0)
+ return;
+
+ Common::Keymap *const engineKeyMap = new Common::Keymap(kKeymapName);
+
+ // Since the game has multiple built-in keys for each of these anyway,
+ // this just attempts to remap one of them.
+ const Common::KeyActionEntry keyActionEntries[] = {
+ { Common::KEYCODE_UP, "UP", _("Up/Zoom In/Move Forward/Open Doors") },
+ { Common::KEYCODE_DOWN, "DWN", _("Down/Zoom Out") },
+ { Common::KEYCODE_LEFT, "TL", _("Turn Left") },
+ { Common::KEYCODE_RIGHT, "TR", _("Turn Right") },
+ { Common::KEYCODE_BACKQUOTE, "TIV", _("Display/Hide Inventory Tray") },
+ { Common::KEYCODE_BACKSPACE, "TBI", _("Display/Hide Biochip Tray") },
+ { Common::KEYCODE_RETURN, "ENT", _("Action/Select") },
+ { Common::KEYCODE_t, "TMA", _("Toggle Center Data Display") },
+ { Common::KEYCODE_i, "TIN", _("Display/Hide Info Screen") },
+ { Common::KEYCODE_ESCAPE, "PM", _("Display/Hide Pause Menu") },
+ { Common::KEYCODE_e, "WTF", _("???") } // easter egg key (without being completely upfront about it)
+ };
+
+ for (uint i = 0; i < ARRAYSIZE(keyActionEntries); i++) {
+ Common::Action *const act = new Common::Action(engineKeyMap, keyActionEntries[i].id, keyActionEntries[i].description);
+ act->addKeyEvent(keyActionEntries[i].ks);
+ }
+
+ mapper->addGameKeymap(engineKeyMap);
+ mapper->pushKeymap(kKeymapName, true);
+#endif
+}
+
} // End of namespace Pegasus
diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h
index 2a8ba22470..07e6d8f761 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"
@@ -94,6 +95,10 @@ public:
// Misc.
bool isDemo() const;
+ bool isDVD() const;
+ bool isDVDDemo() const;
+ bool isOldDemo() const;
+ bool isWindows() const;
void addIdler(Idler *idler);
void removeIdler(Idler *idler);
void addTimeBase(TimeBase *timeBase);
@@ -195,6 +200,7 @@ public:
bool saveRequested() const { return _saveRequested; }
void requestLoad() { _loadRequested = true; }
bool loadRequested() const { return _loadRequested; }
+ static Common::StringArray listSaveFiles();
protected:
Common::Error run();
@@ -265,6 +271,7 @@ private:
void doSubChase();
uint getNeighborhoodCD(const NeighborhoodID neighborhood) const;
uint _currentCD;
+ void initKeymap();
// Menu
GameMenu *_gameMenu;
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/surface.cpp b/engines/pegasus/surface.cpp
index e9e0958f9d..cdcb3c6e79 100644
--- a/engines/pegasus/surface.cpp
+++ b/engines/pegasus/surface.cpp
@@ -85,7 +85,8 @@ void Surface::getImageFromPICTFile(const Common::String &fileName) {
if (!pict.open(fileName))
error("Could not open picture '%s'", fileName.c_str());
- getImageFromPICTStream(&pict);
+ if (!getImageFromPICTStream(&pict))
+ error("Failed to load PICT '%s'", fileName.c_str());
}
void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id) {
@@ -93,19 +94,22 @@ void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id
if (!res)
error("Could not open PICT resource %d from '%s'", id, resFork->getBaseFileName().c_str());
- getImageFromPICTStream(res);
+ if (!getImageFromPICTStream(res))
+ error("Failed to load PICT resource %d from '%s'", id, resFork->getBaseFileName().c_str());
+
delete res;
}
-void Surface::getImageFromPICTStream(Common::SeekableReadStream *stream) {
+bool Surface::getImageFromPICTStream(Common::SeekableReadStream *stream) {
Graphics::PICTDecoder pict;
if (!pict.loadStream(*stream))
- error("Failed to load PICT image");
+ return false;
_surface = pict.getSurface()->convertTo(g_system->getScreenFormat(), pict.getPalette());
_ownsSurface = true;
_bounds = Common::Rect(0, 0, _surface->w, _surface->h);
+ return true;
}
void Surface::getImageFromMovieFrame(Video::VideoDecoder *video, TimeValue time) {
diff --git a/engines/pegasus/surface.h b/engines/pegasus/surface.h
index 4588146fb4..47e3ef538c 100644
--- a/engines/pegasus/surface.h
+++ b/engines/pegasus/surface.h
@@ -84,7 +84,7 @@ protected:
Common::Rect _bounds;
private:
- void getImageFromPICTStream(Common::SeekableReadStream *stream);
+ bool getImageFromPICTStream(Common::SeekableReadStream *stream);
uint32 getGlowColor(uint32 color) const;
bool isTransparent(uint32 color) const;
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 5097c87a9d..edc94eb0d3 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
@@ -56,6 +59,9 @@ LINK_PLUGIN(MADE)
#if PLUGIN_ENABLED_STATIC(MOHAWK)
LINK_PLUGIN(MOHAWK)
#endif
+#if PLUGIN_ENABLED_STATIC(NEVERHOOD)
+LINK_PLUGIN(NEVERHOOD)
+#endif
#if PLUGIN_ENABLED_STATIC(PARALLACTION)
LINK_PLUGIN(PARALLACTION)
#endif
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp
index de54b7e33c..1e53c00564 100644
--- a/engines/queen/cutaway.cpp
+++ b/engines/queen/cutaway.cpp
@@ -515,7 +515,7 @@ const byte *Cutaway::getCutawayAnim(const byte *ptr, int header, CutawayAnim &an
anim.scale = (int16)READ_BE_INT16(ptr);
ptr += 2;
- if ((_vm->resource()->isDemo() && _vm->resource()->getPlatform() == Common::kPlatformPC) ||
+ if ((_vm->resource()->isDemo() && _vm->resource()->getPlatform() == Common::kPlatformDOS) ||
(_vm->resource()->isInterview() && _vm->resource()->getPlatform() == Common::kPlatformAmiga)) {
anim.song = 0;
} else {
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index cd9a1075fa..7437bab974 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"
@@ -166,7 +167,7 @@ void Display::palSet(const uint8 *pal, int start, int end, bool updateScreen) {
}
void Display::palSetJoeDress() {
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
memcpy(_pal.room + 144 * 3, _palJoeDress, 16 * 3);
memcpy(_pal.screen + 144 * 3, _palJoeDress, 16 * 3);
palSet(_pal.screen, 144, 159, true);
@@ -174,7 +175,7 @@ void Display::palSetJoeDress() {
}
void Display::palSetJoeNormal() {
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
memcpy(_pal.room + 144 * 3, _palJoeClothes, 16 * 3);
memcpy(_pal.screen + 144 * 3, _palJoeClothes, 16 * 3);
palSet(_pal.screen, 144, 159, true);
@@ -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/graphics.cpp b/engines/queen/graphics.cpp
index fbb72fde44..70f7d7c94b 100644
--- a/engines/queen/graphics.cpp
+++ b/engines/queen/graphics.cpp
@@ -214,7 +214,7 @@ Graphics::~Graphics() {
}
void Graphics::unpackControlBank() {
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
_vm->bankMan()->load("CONTROL.BBK",17);
// unpack mouse pointer frame
@@ -231,7 +231,7 @@ void Graphics::unpackControlBank() {
}
void Graphics::setupArrows() {
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
int scrollX = _vm->display()->horizontalScroll();
BobSlot *arrow;
arrow = bob(ARROW_BOB_UP);
@@ -1250,7 +1250,7 @@ void BamScene::updateFightAnimation() {
break;
case 99: // end of BAM data
_lastSoundIndex = _index = 0;
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
_fightData = fightDataBlocks[_vm->randomizer.getRandomNumber(2)];
}
if (_flag == F_REQ_STOP) {
diff --git a/engines/queen/input.cpp b/engines/queen/input.cpp
index 30bf681e63..dd10e7ad46 100644
--- a/engines/queen/input.cpp
+++ b/engines/queen/input.cpp
@@ -50,12 +50,12 @@ const Verb Input::_verbKeys[] = {
VERB_USE
};
-Input::Input(Common::Language language, OSystem *system, QueenEngine *vm) :
+Input::Input(Common::Language language, OSystem *system) :
_system(system), _eventMan(system->getEventManager()), _fastMode(false),
_keyVerb(VERB_NONE), _cutawayRunning(false), _canQuit(false),
_cutawayQuit(false), _dialogueRunning(false), _talkQuit(false),
_quickSave(false), _quickLoad(false), _debugger(false), _inKey(Common::KEYCODE_INVALID),
- _mouseButton(0), _idleTime(0) , _vm(vm) {
+ _mouseButton(0), _idleTime(0) {
switch (language) {
case Common::EN_ANY:
diff --git a/engines/queen/input.h b/engines/queen/input.h
index b3bf811cd1..f04ecb24f7 100644
--- a/engines/queen/input.h
+++ b/engines/queen/input.h
@@ -46,7 +46,7 @@ public:
MOUSE_RBUTTON = 2
};
- Input(Common::Language language, OSystem *system, QueenEngine *vm);
+ Input(Common::Language language, OSystem *system);
void delay(uint amount);
@@ -96,8 +96,6 @@ private:
Common::EventManager *_eventMan;
- QueenEngine *_vm;
-
//! some cutaways require update() run faster
bool _fastMode;
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index 704019641b..474f72eca5 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -400,7 +400,7 @@ static void removeLeadingAndTrailingSpaces(char *dst, size_t dstSize, const char
while (src[lastNonSpaceIndex] == ' ')
--lastNonSpaceIndex;
- size_t newLen = lastNonSpaceIndex - firstNonSpaceIndex + 1;
+ uint newLen = lastNonSpaceIndex - firstNonSpaceIndex + 1;
assert(newLen < dstSize);
for (size_t i = 0; i < newLen; ++i) {
dst[i] = src[firstNonSpaceIndex + i];
@@ -559,7 +559,7 @@ void Journal::updateTextField(uint16 ascii, int keycode) {
}
break;
default:
- if (isprint((char)ascii) &&
+ if (Common::isPrint((char)ascii) &&
_textField.textCharsCount < (sizeof(_textField.text) - 1) &&
_vm->display()->textWidth(_textField.text) < _textField.w) {
_textField.text[_textField.textCharsCount] = (char)ascii;
diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp
index 6d90254608..ea13e5973e 100644
--- a/engines/queen/logic.cpp
+++ b/engines/queen/logic.cpp
@@ -101,7 +101,7 @@ void Logic::readQueenJas() {
}
_roomData[_numRooms + 1] = _numObjects;
- if ((_vm->resource()->isDemo() && _vm->resource()->getPlatform() == Common::kPlatformPC) ||
+ if ((_vm->resource()->isDemo() && _vm->resource()->getPlatform() == Common::kPlatformDOS) ||
(_vm->resource()->isInterview() && _vm->resource()->getPlatform() == Common::kPlatformAmiga)) {
_sfxName = NULL;
} else {
@@ -1798,7 +1798,7 @@ void Logic::asmScaleBlimp() {
int16 x = bob->x;
int16 y = bob->y;
bob->scale = 100;
- while (bob->x > 150) {
+ while (bob->x > 150 && !_vm->shouldQuit()) {
bob->x = x * 256 / z + 150;
bob->y = y * 256 / z + 112;
if (_vm->resource()->getPlatform() != Common::kPlatformAmiga) {
@@ -2088,7 +2088,7 @@ bool LogicDemo::changeToSpecialRoom() {
void LogicDemo::setupSpecialMoveTable() {
_specialMoves[4] = &LogicDemo::asmMakeJoeUseUnderwear;
_specialMoves[14] = &LogicDemo::asmEndDemo;
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
_specialMoves[5] = &LogicDemo::asmSwitchToDressPalette;
}
}
@@ -2185,7 +2185,7 @@ void LogicGame::setupSpecialMoveTable() {
_specialMoves[31] = &LogicGame::asmWaitForCarPosition;
_specialMoves[33] = &LogicGame::asmAttemptPuzzle;
_specialMoves[34] = &LogicGame::asmScrollTitle;
- if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformDOS) {
_specialMoves[5] = &LogicGame::asmSwitchToDressPalette;
_specialMoves[6] = &LogicGame::asmSwitchToNormalPalette;
_specialMoves[13] = &LogicGame::asmShrinkRobot;
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index c403536e22..08fc594560 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -500,7 +500,7 @@ Common::Error QueenEngine::run() {
_display = new Display(this, _system);
_graphics = new Graphics(this);
_grid = new Grid(this);
- _input = new Input(_resource->getLanguage(), _system, this);
+ _input = new Input(_resource->getLanguage(), _system);
if (_resource->isDemo()) {
_logic = new LogicDemo(this);
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index 84043fa3af..6a55929d65 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -204,11 +204,11 @@ bool Resource::detectVersion(DetectedGameVersion *ver, Common::File *f) {
switch (ver->str[0]) {
case 'P':
ver->features |= GF_FLOPPY;
- ver->platform = Common::kPlatformPC;
+ ver->platform = Common::kPlatformDOS;
break;
case 'C':
ver->features |= GF_TALKIE;
- ver->platform = Common::kPlatformPC;
+ ver->platform = Common::kPlatformDOS;
break;
case 'a':
ver->features |= GF_FLOPPY;
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/queen/talk.cpp b/engines/queen/talk.cpp
index 94bc105bb0..1531510ba4 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -96,7 +96,6 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
}
int16 oldLevel = 0;
- bool personWalking = false; // FIXME: unused
// Lines 828-846 in talk.c
for (i = 1; i <= 4; i++) {
@@ -174,8 +173,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
if (1 == choicesLeft) {
// Automatically run the final dialogue option
- if (speak(_talkString[0], &person, otherVoiceFilePrefix))
- personWalking = true;
+ speak(_talkString[0], &person, otherVoiceFilePrefix);
if (_vm->input()->talkQuit())
break;
@@ -251,8 +249,7 @@ void Talk::talk(const char *filename, int personInRoom, char *cutawayFilename) {
findDialogueString(_person1PtrOff, head, _pMax, _talkString[0]);
if (_talkString[0][0] != '\0') {
sprintf(otherVoiceFilePrefix, "%2d%4xP", _talkKey, head);
- if (speak(_talkString[0], &person, otherVoiceFilePrefix))
- personWalking = true;
+ speak(_talkString[0], &person, otherVoiceFilePrefix);
}
}
}
diff --git a/engines/queen/talk.h b/engines/queen/talk.h
index 68196784b1..cba77cc255 100644
--- a/engines/queen/talk.h
+++ b/engines/queen/talk.h
@@ -88,8 +88,6 @@ private:
QueenEngine *_vm;
- bool _wasFullscren;
-
//! Raw .dog file data (without 20 byte header)
byte *_fileData;
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 06ce335518..0548da9ee5 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -1030,6 +1030,8 @@ bool Actor::getSpriteParams(CommonObjectData *commonObjectData, int &frameNumber
} else if (validObjId(commonObjectData->_id)) {
spriteList = &_vm->_sprite->_mainSprites;
frameNumber = commonObjectData->_spriteListResourceId;
+ } else {
+ return false;
}
if (spriteList->empty()) {
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 9c178559f2..f6872c41ad 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -156,7 +156,8 @@ bool SagaMetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsDeleteSave) ||
(f == kSavesSupportMetaInfo) ||
(f == kSavesSupportThumbnail) ||
- (f == kSavesSupportCreationDate);
+ (f == kSavesSupportCreationDate) ||
+ (f == kSavesSupportPlayTime);
}
bool Saga::SagaEngine::hasFeature(EngineFeature f) const {
@@ -270,7 +271,10 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s
desc.setSaveTime(hour, minutes);
- // TODO: played time
+ if (version >= 8) {
+ uint32 playTime = in->readUint32BE();
+ desc.setPlayTime(playTime * 1000);
+ }
}
delete in;
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 234a10acfe..30cb13a031 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -188,7 +188,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOSPEECH)
},
@@ -434,7 +434,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -458,7 +458,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -482,7 +482,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -507,7 +507,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -534,7 +534,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -558,7 +558,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -582,7 +582,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -615,7 +615,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
@@ -647,7 +647,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -677,7 +677,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -705,7 +705,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -734,7 +734,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -762,7 +762,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
@@ -817,7 +817,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
@@ -847,7 +847,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{ NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO1(GUIO_NOASPECT)
},
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index ec3ef2f6f9..c5842f4998 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -332,13 +332,22 @@ int Events::handleOneShot(Event *event) {
#ifdef ENABLE_IHNM
if (_vm->getGameId() == GID_IHNM) {
+ PalEntry portraitBgColor = _vm->_interface->_portraitBgColor;
+ byte portraitColor = (_vm->getLanguage() == Common::ES_ESP) ? 253 : 254;
+
+ // Set the portrait bg color, in case a saved state is restored from the
+ // launcher. In this case, sfSetPortraitBgColor is not called, thus the
+ // portrait color will always be 0 (black).
+ if (portraitBgColor.red == 0 && portraitBgColor.green == 0 && portraitBgColor.blue == 0)
+ portraitBgColor.green = 255;
+
if (_vm->_spiritualBarometer > 255)
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
+ _vm->_gfx->setPaletteColor(portraitColor, 0xff, 0xff, 0xff);
else
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.red / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.green / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.blue / 256);
+ _vm->_gfx->setPaletteColor(portraitColor,
+ _vm->_spiritualBarometer * portraitBgColor.red / 256,
+ _vm->_spiritualBarometer * portraitBgColor.green / 256,
+ _vm->_spiritualBarometer * portraitBgColor.blue / 256);
}
#endif
@@ -524,6 +533,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
#ifdef ENABLE_IHNM
case kCutawayEvent:
switch (event->op) {
@@ -536,6 +546,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
#endif
case kActorEvent:
switch (event->op) {
@@ -545,6 +556,7 @@ int Events::handleOneShot(Event *event) {
default:
break;
}
+ break;
default:
break;
}
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index a7bd7edbe5..b105e34487 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -723,7 +723,7 @@ void Interface::setStatusText(const char *text, int statusColor) {
if (_vm->_render->getFlags() & RF_MAP || _vm->_interface->getMode() == kPanelPlacard)
return;
- strncpy(_statusText, text, STATUS_TEXT_LEN);
+ Common::strlcpy(_statusText, text, STATUS_TEXT_LEN);
_statusOnceColor = statusColor;
drawStatusBar();
}
@@ -2420,7 +2420,7 @@ bool Interface::converseAddText(const char *text, int strId, int replyId, byte r
assert(strlen(text) < CONVERSE_MAX_WORK_STRING);
- strncpy(_converseWorkString, text, CONVERSE_MAX_WORK_STRING);
+ Common::strlcpy(_converseWorkString, text, CONVERSE_MAX_WORK_STRING);
while (1) {
len = strlen(_converseWorkString);
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 13850a0b6d..812d967b9f 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -30,6 +30,7 @@
#include "audio/audiostream.h"
#include "audio/mididrv.h"
#include "audio/midiparser.h"
+#include "audio/midiparser_qt.h"
#include "audio/decoders/raw.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -76,19 +77,14 @@ void MusicDriver::play(SagaEngine *vm, ByteArray *buffer, bool loop) {
}
// Check if the game is using XMIDI or SMF music
- if (vm->getGameId() == GID_IHNM && vm->isMacResources()) {
- // Just set an XMIDI parser for Mac IHNM for now
+ if (!memcmp(buffer->getBuffer(), "FORM", 4)) {
_parser = MidiParser::createParser_XMIDI();
+ // ITE had MT32 mapped instruments
+ _isGM = (vm->getGameId() != GID_ITE);
} else {
- if (!memcmp(buffer->getBuffer(), "FORM", 4)) {
- _parser = MidiParser::createParser_XMIDI();
- // ITE had MT32 mapped instruments
- _isGM = (vm->getGameId() != GID_ITE);
- } else {
- _parser = MidiParser::createParser_SMF();
- // ITE with standalone MIDI files is General MIDI
- _isGM = (vm->getGameId() == GID_ITE);
- }
+ _parser = MidiParser::createParser_SMF();
+ // ITE with standalone MIDI files is General MIDI
+ _isGM = (vm->getGameId() == GID_ITE);
}
if (!_parser->loadMusic(buffer->getBuffer(), buffer->size()))
@@ -107,6 +103,27 @@ void MusicDriver::play(SagaEngine *vm, ByteArray *buffer, bool loop) {
_isPlaying = true;
}
+void MusicDriver::playQuickTime(const Common::String &musicName, bool loop) {
+ // IHNM Mac uses QuickTime MIDI
+ _parser = MidiParser::createParser_QT();
+ _isGM = true;
+
+ if (!((MidiParser_QT *)_parser)->loadFromContainerFile(musicName))
+ error("MusicDriver::playQuickTime(): Failed to load file '%s'", musicName.c_str());
+
+ _parser->setTrack(0);
+ _parser->setMidiDriver(this);
+ _parser->setTimerRate(_driver->getBaseTempo());
+ _parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1);
+ _parser->property(MidiParser::mpSendSustainOffOnNotesOff, 1);
+
+ // Handle music looping
+ _parser->property(MidiParser::mpAutoLoop, loop);
+// _isLooping = loop;
+
+ _isPlaying = true;
+}
+
void MusicDriver::pause() {
_isPlaying = false;
}
@@ -159,6 +176,10 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer) {
}
}
+ _trackNumber = 0;
+ _targetVolume = 0;
+ _currentVolumePercent = 0;
+
_digitalMusic = false;
}
@@ -343,31 +364,19 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
// Load MIDI/XMI resource data
if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
- // Load the external music file for Mac IHNM
-#if 0
- Common::File musicFile;
- char musicFileName[40];
- sprintf(musicFileName, "Music/Music%02x", resourceId);
- musicFile.open(musicFileName);
- resourceSize = musicFile.size();
- resourceData = new byte[resourceSize];
- musicFile.read(resourceData, resourceSize);
- musicFile.close();
-
- // TODO: The Mac music format is unsupported (QuickTime MIDI)
- // so stop here
-#endif
- return;
+ // Load the external music file for Mac IHNM
+ _player->playQuickTime(Common::String::format("Music/Music%02x", resourceId), flags & MUSIC_LOOP);
} else {
if (_currentMusicBuffer == &_musicBuffer[1]) {
_currentMusicBuffer = &_musicBuffer[0];
} else {
_currentMusicBuffer = &_musicBuffer[1];
}
+
_vm->_resource->loadResource(_musicContext, resourceId, *_currentMusicBuffer);
+ _player->play(_vm, _currentMusicBuffer, (flags & MUSIC_LOOP));
}
- _player->play(_vm, _currentMusicBuffer, (flags & MUSIC_LOOP));
setVolume(_vm->_musicVolume);
}
diff --git a/engines/saga/music.h b/engines/saga/music.h
index 5a4e662af4..081fab21f6 100644
--- a/engines/saga/music.h
+++ b/engines/saga/music.h
@@ -46,6 +46,7 @@ public:
MusicDriver();
void play(SagaEngine *vm, ByteArray *buffer, bool loop);
+ void playQuickTime(const Common::String &musicName, bool loop);
virtual void pause();
virtual void resume();
diff --git a/engines/saga/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/saga.cpp b/engines/saga/saga.cpp
index 6e272d37c0..239a3be9db 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -202,6 +202,8 @@ SagaEngine::~SagaEngine() {
}
Common::Error SagaEngine::run() {
+ setTotalPlayTime(0);
+
// Assign default values to the config manager, in case settings are missing
ConfMan.registerDefault("talkspeed", "255");
ConfMan.registerDefault("subtitles", "true");
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 829425aeaf..01cab21f5d 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -395,9 +395,7 @@ enum ColorId {
kITEColorBlue = 0x93,
kITEColorLightBlue94 = 0x94,
kITEColorLightBlue96 = 0x96,
- kITEColorGreen = 0xba,
-
- kIHNMColorPortrait = 0xfe
+ kITEColorGreen = 0xba
};
enum KnownColor {
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 6a5a7d8e14..9784cf4e33 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -34,7 +34,7 @@
#include "saga/scene.h"
#include "saga/script.h"
-#define CURRENT_SAGA_VER 7
+#define CURRENT_SAGA_VER 8
namespace Saga {
@@ -176,7 +176,7 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
// Note that IHNM has a smaller save title size than ITE
// We allocate the ITE save title size here, to preserve
// savegame backwards compatibility
- strncpy(_saveHeader.name, saveName, SAVE_TITLE_SIZE);
+ Common::strlcpy(_saveHeader.name, saveName, SAVE_TITLE_SIZE);
out->writeUint32BE(_saveHeader.type);
out->writeUint32LE(_saveHeader.size);
@@ -204,10 +204,11 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
+ uint32 playTime = g_engine->getTotalPlayTime() / 1000;
out->writeUint32BE(saveDate);
out->writeUint16BE(saveTime);
- // TODO: played time
+ out->writeUint32BE(playTime);
// Surrounding scene
out->writeSint32LE(_scene->getOutsetSceneNumber());
@@ -299,7 +300,11 @@ void SagaEngine::load(const char *fileName) {
in->readUint32BE(); // save date
in->readUint16BE(); // save time
- // TODO: played time
+
+ if (_saveHeader.version >= 8) {
+ uint32 playTime = in->readUint32BE();
+ g_engine->setTotalPlayTime(playTime * 1000);
+ }
}
// Clear pending events here, and don't process queued music events
diff --git a/engines/saga/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/saga/sfuncs_ihnm.cpp b/engines/saga/sfuncs_ihnm.cpp
index 3fbf3b6e67..fdfd0fdf2c 100644
--- a/engines/saga/sfuncs_ihnm.cpp
+++ b/engines/saga/sfuncs_ihnm.cpp
@@ -168,17 +168,25 @@ void Script::sfSetChapterPoints(SCRIPTFUNC_PARAMS) {
_vm->_ethicsPoints[chapter] = thread->pop();
int16 barometer = thread->pop();
static PalEntry cur_pal[PAL_ENTRIES];
+ PalEntry portraitBgColor = _vm->_interface->_portraitBgColor;
+ byte portraitColor = (_vm->getLanguage() == Common::ES_ESP) ? 253 : 254;
_vm->_spiritualBarometer = _vm->_ethicsPoints[chapter] * 256 / barometer;
_vm->_scene->setChapterPointsChanged(true); // don't save this music when saving in IHNM
+ // Set the portrait bg color, in case a saved state is restored from the
+ // launcher. In this case, sfSetPortraitBgColor is not called, thus the
+ // portrait color will always be 0 (black).
+ if (portraitBgColor.red == 0 && portraitBgColor.green == 0 && portraitBgColor.blue == 0)
+ portraitBgColor.green = 255;
+
if (_vm->_spiritualBarometer > 255)
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait, 0xff, 0xff, 0xff);
+ _vm->_gfx->setPaletteColor(portraitColor, 0xff, 0xff, 0xff);
else
- _vm->_gfx->setPaletteColor(kIHNMColorPortrait,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.red / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.green / 256,
- _vm->_spiritualBarometer * _vm->_interface->_portraitBgColor.blue / 256);
+ _vm->_gfx->setPaletteColor(portraitColor,
+ _vm->_spiritualBarometer * portraitBgColor.red / 256,
+ _vm->_spiritualBarometer * portraitBgColor.green / 256,
+ _vm->_spiritualBarometer * portraitBgColor.blue / 256);
_vm->_gfx->getCurrentPal(cur_pal);
_vm->_gfx->setPalette(cur_pal);
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 69c27b6a6b..619ffc243e 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -196,11 +196,13 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
break;
case kTypeS16LH:
flags |= Audio::FLAG_LITTLE_ENDIAN;
+ // fallthrough
case kTypeS16HL:
flags |= Audio::FLAG_16BITS;
break;
case kTypeU16LH:
flags |= Audio::FLAG_LITTLE_ENDIAN;
+ // fallthrough
case kTypeU16HL:
flags |= Audio::FLAG_16BITS;
flags |= Audio::FLAG_UNSIGNED;
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 71044034d7..49d24753a1 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -104,6 +104,15 @@ SndRes::SndRes(SagaEngine *vm) : _vm(vm), _sfxContext(NULL), _voiceContext(NULL)
}
}
+SndRes::~SndRes() {
+#ifdef ENABLE_IHNM
+ if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
+ // Delete the dummy voice context. See setVoiceBank()
+ delete _voiceContext;
+ }
+#endif
+}
+
void SndRes::setVoiceBank(int serial) {
Common::File *file;
if (_voiceSerial == serial)
diff --git a/engines/saga/sndres.h b/engines/saga/sndres.h
index bc38bed431..979c0288f6 100644
--- a/engines/saga/sndres.h
+++ b/engines/saga/sndres.h
@@ -39,6 +39,7 @@ class SndRes {
public:
SndRes(SagaEngine *vm);
+ ~SndRes();
void playSound(uint32 resourceId, int volume, bool loop);
void playVoice(uint32 resourceId);
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 5ae8245e5a..50fae61de0 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -284,6 +284,7 @@ void Console::postEnter() {
#endif
VideoState emptyState;
+ emptyState.reset();
emptyState.fileName = _videoFile;
emptyState.flags = kDoubled; // always allow the videos to be double sized
playVideo(videoDecoder, emptyState);
@@ -2226,6 +2227,7 @@ bool Console::cmdIsSample(int argc, const char **argv) {
DebugPrintf("Sample size: %d, sample rate: %d, channels: %d, digital channel number: %d\n",
track->digitalSampleSize, track->digitalSampleRate, track->channelCount, track->digitalChannelNr);
+ delete soundRes;
return true;
}
@@ -2349,8 +2351,7 @@ bool Console::cmdVMVarlist(int argc, const char **argv) {
for (int i = 0; i < 4; i++) {
DebugPrintf("%s vars at %04x:%04x ", varnames[i], PRINT_REG(make_reg(s->variablesSegment[i], s->variables[i] - s->variablesBase[i])));
- if (s->variablesMax)
- DebugPrintf(" total %d", s->variablesMax[i]);
+ DebugPrintf(" total %d", s->variablesMax[i]);
DebugPrintf("\n");
}
@@ -2407,7 +2408,7 @@ bool Console::cmdVMVars(int argc, const char **argv) {
return true;
}
- if ((s->variablesMax) && (s->variablesMax[varType] <= varIndex)) {
+ if (s->variablesMax[varType] <= varIndex) {
DebugPrintf("Maximum variable number for this type is %d (0x%x)\n", s->variablesMax[varType], s->variablesMax[varType]);
return true;
}
@@ -2507,6 +2508,7 @@ bool Console::cmdValueType(int argc, const char **argv) {
break;
case SIG_TYPE_INTEGER:
DebugPrintf("Integer");
+ break;
case SIG_TYPE_INTEGER | SIG_TYPE_NULL:
DebugPrintf("Null");
break;
@@ -3633,6 +3635,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 +3768,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 +3842,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/console.h b/engines/sci/console.h
index 1c54748842..37cf35a471 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -175,7 +175,6 @@ private:
SciEngine *_engine;
DebugState &_debugState;
- bool _mouseVisible;
Common::String _videoFile;
int _videoFrameDelay;
};
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.cpp b/engines/sci/detection.cpp
index 58ac5f1fa6..09c348f273 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -103,6 +103,7 @@ static const PlainGameDescriptor s_sciGameTitles[] = {
{"pq4", "Police Quest IV: Open Season"}, // floppy is SCI2, CD SCI2.1
{"qfg4", "Quest for Glory IV: Shadows of Darkness"}, // floppy is SCI2, CD SCI2.1
// === SCI2.1 games ========================================================
+ {"chest", "Inside the Chest"}, // aka Behind the Developer's Shield
{"gk2", "The Beast Within: A Gabriel Knight Mystery"},
// TODO: Inside The Chest/Behind the Developer's Shield
{"kq7", "King's Quest VII: The Princeless Bride"},
@@ -132,6 +133,7 @@ static const GameIdStrToEnum s_gameIdStrToEnum[] = {
{ "astrochicken", GID_ASTROCHICKEN },
{ "camelot", GID_CAMELOT },
{ "castlebrain", GID_CASTLEBRAIN },
+ { "chest", GID_CHEST },
{ "christmas1988", GID_CHRISTMAS1988 },
{ "christmas1990", GID_CHRISTMAS1990 },
{ "christmas1992", GID_CHRISTMAS1992 },
@@ -208,6 +210,7 @@ struct OldNewIdTableEntry {
};
static const OldNewIdTableEntry s_oldNewTable[] = {
+ { "archive", "chest", SCI_VERSION_NONE },
{ "arthur", "camelot", SCI_VERSION_NONE },
{ "brain", "castlebrain", SCI_VERSION_1_MIDDLE }, // Amiga
{ "brain", "castlebrain", SCI_VERSION_1_LATE },
@@ -449,7 +452,7 @@ static ADGameDescription s_fallbackDesc = {
"",
AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
Common::UNK_LANG,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)
};
@@ -511,7 +514,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
s_fallbackDesc.extra = "";
s_fallbackDesc.language = Common::EN_ANY;
s_fallbackDesc.flags = ADGF_NO_FLAGS;
- s_fallbackDesc.platform = Common::kPlatformPC; // default to PC platform
+ s_fallbackDesc.platform = Common::kPlatformDOS; // default to PC platform
s_fallbackDesc.gameid = "sci";
s_fallbackDesc.guioptions = GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI);
@@ -834,12 +837,16 @@ Common::Error SciEngine::saveGameState(int slot, const Common::String &desc) {
return Common::kNoError;
}
+// Before enabling the load option in the ScummVM menu, the main game loop must
+// have run at least once. When the game loop runs, kGameIsRestarting is invoked,
+// thus the speed throttler is initialized. Hopefully fixes bug #3565505.
+
bool SciEngine::canLoadGameStateCurrently() {
- return !_gamestate->executionStackBase;
+ return !_gamestate->executionStackBase && (_gamestate->_throttleLastTime > 0 || _gamestate->_throttleTrigger);
}
bool SciEngine::canSaveGameStateCurrently() {
- return !_gamestate->executionStackBase;
+ return !_gamestate->executionStackBase && (_gamestate->_throttleLastTime > 0 || _gamestate->_throttleTrigger);
}
} // End of namespace Sci
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index b978f40aba..66164a1937 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -37,7 +37,7 @@ namespace Sci {
{"sci-fanmade", name, { \
{"resource.map", 0, resMapMd5, resMapSize}, \
{"resource.001", 0, resMd5, resSize}, \
- AD_LISTEND}, lang, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) \
+ AD_LISTEND}, lang, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) \
}
#define FANMADE(name, resMapMd5, resMapSize, resMd5, resSize) FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY)
@@ -50,7 +50,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f3d1be7752d30ba60614533d531e2e98", 474},
{"resource.001", 0, "6fd05926c2199af0af6f72f90d0d7260", 126895},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.005.000"
@@ -93,7 +93,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "9780f040d58182994e22d2e34fab85b0", 67367},
{"resource.001", 0, "2af49dbd8f2e1db4ab09f9310dc91259", 570553},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English DOS 5.25" Floppy EGA (from omer_mor, bug report #3035349)
{"castlebrain", "EGA", {
@@ -106,7 +106,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "8a5ed3ba96e2eaf18e36fedfaab89419", 297838},
{"resource.006", 0, "dceed92e709cad1bd9582809a235b0a0", 266682},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English DOS 3.5" Floppy EGA (from nozomi77, bug report #3405307)
{"castlebrain", "EGA", {
@@ -116,7 +116,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "de2f182529efaad2c4b510b452ab77ac", 633662},
{"resource.003", 0, "38b4b37febc6b4f5061c461a283df148", 430388},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English DOS Floppy (from jvprat)
// Executable scanning reports "1.000.044", Floppy label reports "1.0, 10.30.91", VERSION file reports "1.000"
@@ -127,7 +127,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "d2f5a1be74ed963fa849a76892be5290", 794832},
{"resource.002", 0, "c0c29c51af66d65cb53f49e785a2d978", 1280907},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Castle of Dr. Brain - English DOS 5.25" Floppy VGA 1.1 (from rnjacobs, bug report #3578286)
+ {"castlebrain", "", {
+ {"resource.map", 0, "a1deac2647ad09472c63656bfb950a4d", 2739},
+ {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 347071},
+ {"resource.001", 0, "13e81e1839cd7b216d2bb5615c1ca160", 356812},
+ {"resource.002", 0, "583d348c908f89f94f8551d7fe0a2eca", 991752},
+ {"resource.003", 0, "6c3d1bb26ad532c94046bc9ac49b5ff4", 728315},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English DOS Floppy 1.1
{"castlebrain", "", {
@@ -136,7 +146,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "13e81e1839cd7b216d2bb5615c1ca160", 796776},
{"resource.002", 0, "930e416bec196b9703a331d81b3d66f2", 1283812},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - English DOS Floppy 1.000
// Reported by graxer in bug report #3037942
@@ -151,7 +161,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "1d778a0c65cac9ddbab65495e50a94ee", 335281},
{"resource.007", 0, "063bb8ce4157c778cf30d1c912c006f1", 335631},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Castle of Dr. Brain - Spanish DOS (also includes english language)
// SCI interpreter version 1.000.510
@@ -160,7 +170,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 1197694},
{"resource.001", 0, "735be4e58957180cfc807d5e18fdffcd", 1433302},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+#ifdef ENABLE_SCI32
+ // Inside the Chest / Behind the Developer's Shield
+ // SCI interpreter version 2.000.000
+ {"chest", "", {
+ {"resource.map", 0, "9dd015e79cac4f91e7de805448f39775", 1912},
+ {"resource.000", 0, "e4efcd042f86679dd4e1834bb3a38edb", 3770943},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO3(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_FB01_MIDI) },
+#endif
// Christmas Card 1988 - English DOS
// SCI interpreter version 0.000.294
@@ -168,7 +188,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "39485580d34a72997f3d5b3aba4d24f1", 426},
{"resource.001", 0, "11391434f41c834090d7a1e9488ce936", 129739},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Christmas Card 1990: The Seasoned Professional - English DOS (16 Colors)
// SCI interpreter version 1.000.172
@@ -176,7 +196,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8f656714a05b94423ac6eb10ee8797d0", 600},
{"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 272629},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Christmas Card 1990: The Seasoned Professional - English DOS (256 Colors)
// SCI interpreter version 1.000.174
@@ -184,7 +204,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "44b8f45b841b9b5e17e939a35e443988", 600},
{"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 335362},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Christmas Card 1992 - English DOS
// SCI interpreter version 1.001.055
@@ -192,7 +212,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f1f8c8a8443f523422af70b4ec85b71c", 318},
{"resource.000", 0, "62fb9256f8e7e6e65a6875efdb7939ac", 203396},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Codename: Iceman - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.002.031"
@@ -214,7 +234,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "782974f29d8a824782d2d4aea39964e3", 1056},
{"resource.001", 0, "d4b75e280d1c3a97cfef1b0bebff387c", 573647},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Codename: Iceman - English DOS (from jvprat)
// Executable scanning reports "0.000.685", Floppy label reports "1.033, 6.8.90", VERSION file reports "1.033"
@@ -227,7 +247,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 624303},
{"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 670883},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Codename: Iceman - English DOS (from FRG)
// SCI interpreter version 0.000.668
@@ -239,7 +259,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "dc7c5280e7acfaffe6ef2a6c963c5f94", 622118},
{"resource.004", 0, "64f342463f6f35ba71b3509ef696ae3f", 669188},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Codename: Iceman - English DOS (supplied by ssburnout in bug report #3049193)
// 1.022 9x5.25" (label: Int#0.000.668)
@@ -254,7 +274,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "08050329aa113a9f14ed99cbfe3536ec", 232942},
{"resource.007", 0, "64f342463f6f35ba71b3509ef696ae3f", 267811},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Codename: Iceman - English DOS 1.023 (from abevi, bug report #2612718)
{"iceman", "", {
@@ -268,7 +288,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "08050329aa113a9f14ed99cbfe3536ec", 232942},
{"resource.007", 0, "64f342463f6f35ba71b3509ef696ae3f", 267702},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of Camelot - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.002.030"
@@ -291,7 +311,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f4cd75c15be75e04cdca3acda2c0b0ea", 468},
{"resource.001", 0, "4930708722f34bfbaa4945fb08f55f61", 232523},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of Camelot - English DOS (from jvprat)
// Executable scanning reports "0.000.685", Floppy label reports "1.001, 0.000.685", VERSION file reports "1.001.000"
@@ -303,7 +323,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 723712},
{"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 729143},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of Camelot - English DOS
// SCI interpreter version 0.000.685
@@ -317,7 +337,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "8e1a3a8c588007404b532b8dfacc1460", 332446},
{"resource.007", 0, "8e1a3a8c588007404b532b8dfacc1460", 358182},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.005.001"
@@ -346,7 +366,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1154950},
{"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1042966},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow - English DOS Floppy (from jvprat)
// Executable scanning reports "1.000.168", Floppy label reports "1.1, 1.13.92", VERSION file reports "1.1"
@@ -360,7 +380,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1261462},
{"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284720},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow - English DOS
// SCI interpreter version 1.000.510
@@ -373,7 +393,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1260237},
{"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284609},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow EGA - English DOS
// SCI interpreter version 1.000.510
@@ -386,7 +406,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "b7bb35c027bb424ecefcd122768e5e60", 705631},
{"resource.005", 0, "58942b1aa6d6ffeb66e9f8897fd4435f", 469243},
{"resource.006", 0, "8c767b3939add63d11274065e46aad04", 713158},
- AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow DOS 1.0 EGA (4 x 5.25" disks)
// Provided by ssburnout in bug report #3046802
@@ -396,7 +416,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "76c729e563809170e6cc8b2f3f6cf0a4", 1196133},
{"resource.002", 0, "8c767b3939add63d11274065e46aad04", 1152478},
{"resource.003", 0, "7025b87e735b1df3f0e9488a621f4333", 1171439},
- AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ AD_LISTEND}, Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow - English DOS Non-Interactive Demo
// SCI interpreter version 1.000.510
@@ -404,7 +424,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "cbc5cb73341de1bff1b1e20a640af220", 588},
{"resource.001", 0, "f05a20cc07eee85da8e999d0ac0f596b", 869916},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Conquests of the Longbow - German DOS (suplied by markcoolio in bug report #2727681, also includes english language)
// SCI interpreter version 1.000.510
@@ -418,7 +438,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1176914},
{"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1123585},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - English DOS Non-Interactive Demo (from FRG)
// Executable scanning reports "x.yyy.zzz"
@@ -427,7 +447,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "c819e171359b7c95f4c13b846d5c034e", 873},
{"resource.001", 0, "baf9393a9bfa73098adb501e5bc5487b", 657518},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - English DOS CD 1.1
// SCI interpreter version 1.001.064
@@ -435,7 +455,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a4b73d5d2b55bdb6e44345e99c8fbdd0", 4804},
{"resource.000", 0, "d908dbef56816ac6c60dd145fdeafb2b", 3536046},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - English DOS CD 1.1
// SCI interpreter version 1.001.064
@@ -456,7 +476,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816},
{"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - English DOS Floppy
// SCI interpreter version 1.000.510
@@ -467,7 +487,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316},
{"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - German DOS Floppy (supplied by markcoolio in bug report #2723744, also includes english language)
// SCI interpreter version 1.000.510
@@ -478,7 +498,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - Spanish DOS Floppy (from jvprat, also includes english language)
// Executable scanning reports "1.ECO.013", VERSION file reports "1.000, 11.12.92"
@@ -490,7 +510,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest - French DOS Floppy (from Strangerke, also includes english language)
// SCI interpreter version 1.ECO.013
@@ -501,7 +521,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "b836c6ee9de67d814ac5d1b05f5b9858", 1173872},
{"resource.003", 0, "f8f767f9d6351432621c6e54c1b2ba8c", 1141520},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest 2 - English DOS Non-Interactive Demo
// SCI interpreter version 1.001.055
@@ -509,7 +529,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "607cfa0d8a03b7d348c06ee727e3d939", 1321},
{"resource.000", 0, "dd6f614c43c029f063e93cd243af90a4", 525992},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest 2 - English DOS Floppy (supplied by markcoolio in bug report #2723761)
// SCI interpreter version 1.001.065
@@ -517,7 +537,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "28fb7b6abb9fc1cb8882d7c2e701b63f", 5658},
{"resource.000", 0, "cc1d17e5637528dbe4a812699e1cbfc6", 4208192},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest 2 - French DOS Floppy (from Strangerke)
// SCI interpreter version 1.001.081
@@ -525,7 +545,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "c22ab8b33c339c138b6b1697b77b9e79", 5588},
{"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4231946},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Eco Quest 2 - Spanish DOS Floppy (supplied by umbrio in bug report #3313962)
{"ecoquest2", "Floppy", {
@@ -533,7 +553,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4209150},
{"resource.msg", 0, "eff8be1925d42288de55e405983e9314", 117810},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - English DOS demo (from FRG)
// SCI interpreter version 1.001.069
@@ -541,7 +561,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "97aa9fcfe84c9993a64debd28c32393a", 1909},
{"resource.000", 0, "5ea8e7a3ea10cce6efd5c106dc62fd8c", 867724},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - English CD DOS (from FRG)
// SCI interpreter version 1.001.132
@@ -549,7 +569,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d46b282f228a67ba13bd4b4009e95f8f", 6058},
{"resource.000", 0, "ee3c64ffff0ba9fb08bea2624631c598", 5490246},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - English DOS Floppy (updated information from markcoolio in bug reports #2723773 and #2724720)
// Executable scanning reports "1.cfs.081"
@@ -559,7 +579,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "554f65315d851184f6e38211489fdd8f", -1},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Freddy Pharkas - French DOS Floppy (supplied by misterhands in bug report #3589449)
+ // Executable scanning reports "1.cfs.081"
+ {"freddypharkas", "Floppy", {
+ {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816},
+ {"resource.000", 0, "fed4808fdb72486908ac7ad0044b14d8", 5233230},
+ {"resource.msg", 0, "4dc478f5c73b57e5d690bdfffdcf1c44", 816518},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - Windows (supplied by abevi in bug report #2612718)
// Executable scanning reports "1.cfs.081"
@@ -578,7 +607,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "304b5a5781800affd2235152a5794fa8", -1},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - Spanish DOS (from jvprat)
// Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995"
@@ -591,7 +620,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "05acdc256c742e79c50b9fe7ec2cc898", 863310},
{"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - Spanish DOS (from jvprat)
// Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995"
@@ -601,7 +630,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - English DOS CD Demo
// SCI interpreter version 1.001.095
@@ -609,7 +638,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a62a7eae85dd1e6b07f39662b278437e", 1918},
{"resource.000", 0, "4962a3c4dd44e36e78ea4a7a374c2220", 957382},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Freddy Pharkas - English Macintosh
{"freddypharkas", "", {
@@ -624,7 +653,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7ee6859ef74314f6d91938c3595348a9", 282},
{"resource.001", 0, "f1e680095424e31f7fae1255d36bacba", 40692},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - English DOS CD Demo
// SCI interpreter version 1.001.092
@@ -632,7 +661,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "39645952ae0ed8072c7e838f31b75464", 2490},
{"resource.000", 0, "eb3ed7477ca4110813fe1fcf35928561", 1718450},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Gabriel Knight - English DOS CD Demo (from DrMcCoy)
+ // SCI interpreter version 1.001.092
+ {"gk1", "CD Demo", {
+ {"resource.map", 0, "8cad2a256f41463030cbb7ea1bfb2857", 2490},
+ {"resource.000", 0, "eb3ed7477ca4110813fe1fcf35928561", 1718450},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Gabriel Knight - English DOS Floppy
@@ -641,7 +678,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - English DOS Floppy (supplied my markcoolio in bug report #2723777)
// SCI interpreter version 2.000.000
@@ -649,7 +686,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "65e8c14092e4c9b3b3538b7602c8c5ec", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - English DOS Floppy
// SCI interpreter version 2.000.000, VERSION file reports "1.0\nGabriel Knight\n11/22/10:33 pm\n\x1A"
@@ -657,7 +694,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ef41df08cf2c1f680216cdbeed0f8311", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - German DOS Floppy (supplied my markcoolio in bug report #2723775)
// SCI interpreter version 2.000.000
@@ -665,7 +702,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ad6508b0296b25c07b1f58828dc33696", 10789},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13077029},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Gabriel Knight - French DOS Floppy (supplied my kervala in bug report #3611487)
+ // SCI interpreter version 2.000.000
+ {"gk1", "", {
+ {"resource.map", 0, "236e36cc847cdeafdd5e5fa8cba916ed", 10801},
+ {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13033072},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - English DOS CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "01.100.000"
@@ -673,7 +718,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10996},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 12581736},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - English Windows CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "01.100.000"
@@ -689,7 +734,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a7d3e55114c65647310373cb390815ba", 11392},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13400497},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - Spanish DOS CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "1.000.000, April 13, 1995"
@@ -697,7 +742,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7cb6e9bba15b544ec7a635c45bde9953", 11404},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13381599},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - French DOS CD (from Hkz)
// VERSION file reports "1.000.000, May 3, 1994"
@@ -705,7 +750,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "55f909ba93a2515042a08d8a2da8414e", 11392},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13325145},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight - German Windows CD (from Tobis87)
// SCI interpreter version 2.000.000
@@ -746,7 +791,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "b996fa1e57389a1e179a00a0049de1f4", 8110},
{"ressci.000", 0, "a19fc3604c6e5407abcf03d59ee87217", 168522221},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight 2 - English DOS (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.1"
@@ -764,7 +809,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977},
{"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight 2 - French DOS (6-CDs Sierra Originals reedition)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -782,7 +827,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.006", 0, "11b2e722170b8c93fdaa5428e2c7676f", 3001},
{"ressci.006", 0, "4037d941aec39d2e654e20960429aefc", 60568486},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Gabriel Knight 2 - English Macintosh
// NOTE: This only contains disc 1 files (as well as the persistent file:
@@ -806,7 +851,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342149},
{"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328925},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 1 - English DOS (supplied by wibble92 in bug report #2644547)
// SCI interpreter version 0.000.530
@@ -816,7 +861,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342309},
{"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328912},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 1 - English DOS (supplied by merkur in bug report #2719227)
// SCI interpreter version 0.000.530
@@ -824,14 +869,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1034a218943d12f1f36e753fa10c95b8", 4386},
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518308},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 1 3.5' - English DOS (supplied by eddydrama in bug report #3052366 and dinnerx in bug report #3090841)
{"hoyle1", "", {
{"resource.map", 0, "0af9a3dcd72a091960de070432e1f524", 4386},
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518127},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#if 0 // TODO: unknown if these files are corrupt
// Hoyle 1 - English Amiga (from www.back2roots.org)
@@ -851,7 +896,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 98138},
{"resource.002", 0, "8f2dd70abe01112eca464cda818b5eb6", 196631},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 2 - English DOS (supplied by ssburnout in bug report #3049193)
// 1.000.011 1x3.5" (label:Int#6.21.90)
@@ -859,7 +904,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "db0ba08b953e9904a4960ad99cd29c20", 1356},
{"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 216315},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 2 - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.002.032"
@@ -897,7 +942,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0d06cacc87dc21a08cd017e73036f905", 735},
{"resource.001", 0, "24db2bccda0a3c43ac4a7b5edb116c7e", 797678},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 3 - English DOS Floppy (from jvprat)
// Executable scanning reports "x.yyy.zzz", Floppy label reports "1.0, 11.2.91", VERSION file reports "1.000"
@@ -907,7 +952,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6ef28cac094dcd97fdb461662ead6f92", 541845},
{"resource.001", 0, "0a98a268ee99b92c233a0d7187c1f0fa", 845795},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 3 - English DOS Floppy (supplied by eddydrama in bug report #3038837)
{"hoyle3", "", {
@@ -918,7 +963,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "97cfd72633f8f9b2a0b1d4116cf3ee81", 346116},
{"resource.004", 0, "2884fb91b225fabd9ca87ea231293b48", 351218},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 3 EGA - English DOS Floppy 1.0 (supplied by abevi in bug report #2612718)
{"hoyle3", "EGA", {
@@ -926,14 +971,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6ef28cac094dcd97fdb461662ead6f92", 319905},
{"resource.001", 0, "0a98a268ee99b92c233a0d7187c1f0fa", 526438},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 4 (Hoyle Classic Card Games) - English DOS Demo
{"hoyle4", "Demo", {
{"resource.map", 0, "60f764020a6b788bbbe415dbc2ccb9f3", 931},
{"resource.000", 0, "5fe3670e3ddcd4f85c10013b5453141a", 615522},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 4 (Hoyle Classic Card Games) - English DOS Demo
// SCI interpreter version 1.001.200 (just a guess)
@@ -942,7 +987,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "662087cb383e52e3cc4ae7ecb10e20aa", 938},
{"resource.000", 0, "24c10844792c54d476d272213cbac300", 675252},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 4 (Hoyle Classic Card Games) - English DOS/Win
// Supplied by abevi in bug report #3039291
@@ -950,7 +995,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2b577c975cc8d8d43f61b6a756129fe3", 4352},
{"resource.000", 0, "43e2c15ce436aab611a462ad0603e12d", 2000132},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Hoyle 4 (Hoyle Classic Card Games) - English Macintosh Floppy
// VERSION file reports "2.0"
@@ -967,14 +1012,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 202105},
{"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 341771},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Jones in the Fast Lane EGA - English DOS (supplied by EddyDrama in bug report #3038761)
{"jones", "EGA", {
{"resource.map", 0, "8e92cf319180cc8b5b87b2ce93a4fe22", 1602},
{"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 511528},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Jones in the Fast Lane VGA - English DOS
// SCI interpreter version 1.000.172
@@ -983,7 +1028,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 313476},
{"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 719747},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Jones in the Fast Lane VGA - English DOS (supplied by omer_mor in bug report #3037054)
// VERSION file reports "1.000.060"
@@ -991,14 +1036,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "db175ab494ab0666f19ab8f2597a8e49", 1602},
{"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 994487},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Jones in the Fast Lane - English DOS CD
{"jones", "CD", {
{"resource.map", 0, "459f5b04467bc2107aec02f5c4b71b37", 4878},
{"resource.001", 0, "3876da2ce16fb7dea2f5d943d946fa84", 1652150},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO1(GAMEOPTION_JONES_CDAUDIO) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO1(GAMEOPTION_JONES_CDAUDIO) },
// Jones in the Fast Lane - English DOS CD
// Same entry as the DOS version above. This one is used for the alternate
@@ -1027,7 +1072,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954},
{"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection)
// Executable scanning reports "S.old.010", VERSION file reports "1.000.051"
@@ -1038,7 +1083,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "fed9e0072ffd511d248674e60dee2099", 714062},
{"resource.003", 0, "fed9e0072ffd511d248674e60dee2099", 717478},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 1 SCI Remake - English DOS (supplied by ssburnout in bug report #3049193)
// 1.000.051 9x5.25" (label: INT#9.19.90)
@@ -1052,7 +1097,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "fed9e0072ffd511d248674e60dee2099", 351062},
{"resource.007", 0, "fed9e0072ffd511d248674e60dee2099", 330472},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.002.032"
@@ -1073,7 +1118,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "992ac7cc31d3717fe53818a9bb6d1dae", 594},
{"resource.001", 0, "143e1c14f15ad0fbfc714f648a65f661", 205330},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English DOS (original boxed release, 3 1/2" disks)
// SCI interpreter version 0.000.247
@@ -1084,7 +1129,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "851a62d00972dc4002f472cc0d84e71d", 683145},
{"resource.004", 0, "851a62d00972dc4002f472cc0d84e71d", 649441},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English DOS (from the King's Quest Collection)
// Executable scanning reports "0.000.502"
@@ -1096,7 +1141,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "77615c595388acf3d1df8e107bfb6b52", 707591},
{"resource.004", 0, "77615c595388acf3d1df8e107bfb6b52", 479562},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English DOS (supplied by ssburnout in bug report #3049193)
// 1.006.003 8x5.25" (label: Int.#0.000.502)
@@ -1110,7 +1155,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "6db7de6f93c6ea62dca78abee677f8c0", 324789},
{"resource.007", 0, "6db7de6f93c6ea62dca78abee677f8c0", 334441},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English DOS
// SCI interpreter version 0.000.274
@@ -1124,7 +1169,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "851a62d00972dc4002f472cc0d84e71d", 333777},
{"resource.007", 0, "851a62d00972dc4002f472cc0d84e71d", 341038},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English DOS
// SCI interpreter version 0.000.253
@@ -1138,7 +1183,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "0c8566848a76eea19a6d6220914030a7", 337288},
{"resource.007", 0, "0c8566848a76eea19a6d6220914030a7", 343882},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 4 - English Atari ST (double-sided diskettes)
// Game version 1.003.006 (January 12, 1989)
@@ -1209,7 +1254,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368},
{"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - English DOS CD (from the King's Quest Collection)
// Executable scanning reports "x.yyy.zzz", VERSION file reports "1.000.052"
@@ -1236,7 +1281,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "672ede1136e9e401658538e51bd5dc22", 1172619},
{"resource.007", 0, "2f48faf27666b58c276dda20f91f4a93", 1240456},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - English DOS Floppy
// VERSION file reports "0.000.051"
@@ -1254,7 +1299,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456},
{"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - English DOS Floppy (supplied by omer_mor in bug report #3036996)
// VERSION file reports "0.000.051"
@@ -1269,7 +1314,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "06cb3f689836086ebe08b1efc0126592", 921113},
{"resource.007", 0, "252249753c6e850eacceb8af634986d3", 1133608},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 EGA (supplied by markcoolio in bug report #2829470)
// SCI interpreter version 1.000.060
@@ -1285,7 +1330,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "698c698570cde9015e4d51eb8d2e9db1", 666527},
{"resource.007", 0, "703d8df30e89541af337d7706540d5c4", 541743},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 EGA 1.2M disk version (from LordHoto)
// VERSION file reports "0.000.055"
@@ -1297,7 +1342,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "53206afb4fd73871a484e83acab80f31", 7608},
{"resource.004", 0, "83568edf7fde18b3eed988bc5d22ceb1", 1188053},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 EGA (supplied by omer_mor in bug report #3035421)
// VERSION file reports "0.000.062"
@@ -1312,7 +1357,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "698c698570cde9015e4d51eb8d2e9db1", 666541},
{"resource.007", 0, "703d8df30e89541af337d7706540d5c4", 541762},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest V DOS 0.000.062 EGA (5 x 5.25" disks)
// Supplied by ssburnout in bug report #3046780
@@ -1324,7 +1369,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "3cca5b2dae8afe94532edfdc98d7edbe", 1092325},
{"resource.004", 0, "8e5c1bc4d738cf7316ff506f59d265e2", 1187803},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 DOS Spanish Floppy 0.000.062 VGA (5 x 3.5" disks)
// Supplied by dianiu in bug report #3555646
@@ -1339,7 +1384,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "65b520e60c4217e6a6572d9edf77193b", 1141985},
{"resource.007", 0, "f42b0100f0a1c30806814f8648b6bc28", 1145583},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - German DOS Floppy (supplied by markcoolio in bug report #2727101, also includes english language)
// SCI interpreter version 1.000.060
@@ -1354,7 +1399,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "d1a75fdc01840664d00366cff6919366", 1208972},
{"resource.007", 0, "c07494f0cce7c05210893938786a955b", 1337361},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - French DOS Floppy (from the King's Quest Collector's Edition 1994, also includes english language)
// Supplied by aroenai in bug report #2812611
@@ -1370,7 +1415,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f7dc85307632ef657ceb1651204f6f51", 1210081},
{"resource.007", 0, "7db4d0a1d8d547c0019cb7d2a6acbdd4", 1338473},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - Italian DOS Floppy (from glorifindel, includes english language)
// SCI interpreter version 1.000.060
@@ -1385,7 +1430,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "8eeabd92af71e766e323db2100879102", 1209325},
{"resource.007", 0, "dc10c107e0923b902326a040b9c166b9", 1337859},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722)
// SCI interpreter version 1.000.060
@@ -1403,7 +1448,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176},
{"text.000", 0, "601aa35a3ddeb558e1280e0963e955a2", 1517},
AD_LISTEND},
- Common::PL_POL, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::PL_POL, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 5 - English Macintosh
// VERSION file reports "1.000.055"
@@ -1454,7 +1499,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "535b1b920441ec73f42eaa4ccfd47b89", 264116},
{"resource.msg", 0, "54d1fdc936f98c81f9e4c19e04fb1510", 8260},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 6 - English DOS Floppy
// SCI interpreter version 1.001.054
@@ -1463,7 +1508,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324},
{"resource.msg", 0, "3cf5de44de36191f109d425b8450efc8", 258590},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 6 - French DOS Floppy (supplied by misterhands in bug #3503425)
// SCI interpreter version ???
@@ -1472,7 +1517,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324},
{"resource.msg", 0, "adc2aa8adbdcc97507d44a6f492fbd77", 265194},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 6 - German DOS Floppy (supplied by markcoolio in bug report #2727156)
// SCI interpreter version 1.001.054
@@ -1481,7 +1526,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324},
{"resource.msg", 0, "756297b2155db9e43f621c6f6fb763c3", 282822},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 6 - Spanish DOS Floppy (from jvprat)
// Executable scanning reports "1.cfs.158", VERSION file reports "1.000.000, July 5, 1994"
@@ -1491,7 +1536,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260},
{"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 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::kPlatformDOS, 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"
@@ -1500,7 +1553,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7a550ebfeae2575ca00d47703a6a774c", 9215},
{"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 6 - English Windows 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"
@@ -1544,7 +1597,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 7 - English Windows (from FRG)
// SCI interpreter version 2.100.002, VERSION file reports "2.00b"
@@ -1560,7 +1613,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "838b9ff132bd6962026fee832e8a7ddb", 18697},
{"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 206626576},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 7 - Spanish DOS (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "2.00"
@@ -1568,7 +1621,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0b62693cbe87e3aaca3e8655a437f27f", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// King's Quest 7 - English DOS Non-Interactive Demo
// SCI interpreter version 2.100.002
@@ -1576,7 +1629,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "b44f774108d63faa1d021101221c5a54", 1690},
{"resource.000", 0, "d9659d2cf0c269c6a9dc776707f5bea0", 2433827},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // King's Quest 7 - English Windows Demo (from DrMcCoy)
+ // SCI interpreter version 2.100.002
+ {"kq7", "Demo", {
+ {"resource.map", 0, "38e627a37a975aea40cc72b0518b0709", 18412},
+ {"resource.000", 0, "bad61d50aaa64298fa57a7c6ccd3bccf", 84020382},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#endif // ENABLE_SCI32
@@ -1612,7 +1673,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e625726268ff4e123ada11f31f0249f3", 768},
{"resource.001", 0, "0c8912290af0890f8d95faeb4ddb2d68", 333031},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow - English DOS 3.5" Floppy (from "The Roberta Williams Anthology"/1996)
// SCI interpreter version 0.000.631
@@ -1623,7 +1684,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667468},
{"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683807},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow - English DOS (from FRG)
// SCI interpreter version 0.000.631
@@ -1637,7 +1698,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390},
{"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 - English DOS Non-Interactive Demo (from FRG)
// Executable scanning reports "x.yyy.zzz"
@@ -1646,7 +1707,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "24dffc5db1d88c7999f13e8767ed7346", 855},
{"resource.000", 0, "2b2b1b4f7584f9b38fd13f6ab95634d1", 781912},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 - English DOS Floppy
// Executable scanning reports "2.000.274"
@@ -1655,7 +1716,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "610bfd9a852004222f0faaf5fc9e630a", 6489},
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5035964},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 - English DOS CD (from "The Roberta Williams Antology"/1996)
// Executable scanning reports "1.001.072", VERSION file reports "1.1" (from jvprat)
@@ -1664,7 +1725,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a70945e61ba7ac7bfea6b7bd72c6aec5", 7274},
{"resource.000", 0, "82578b8d5a7e09c4c58891ca49fae35b", 5598672},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 v1.1 - French DOS Floppy (from Hkz)
{"laurabow2", "", {
@@ -1672,7 +1733,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766},
{"resource.msg", 0, "0fceedfbdd85a4bc7851fdd9dd2d2f19", 278253},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 v1.1 - German DOS Floppy (from Tobis87, updated info from markcoolio in bug report #2723787, updated info from #2797962))
// Executable scanning reports "2.000.274"
@@ -1681,7 +1742,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766},
{"resource.msg", 0, "795c928cd00dfec9fbc62ebcd12e1f65", 303185},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Laura Bow 2 - Spanish DOS CD (from jvprat)
// Executable scanning reports "2.000.274", VERSION file reports "1.000.000, May 10, 1994"
@@ -1690,7 +1751,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766},
{"resource.msg", 0, "71f1f0cd9f082da2e750c793a8ed9d84", 286141},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 EGA Remake - English DOS (from spookypeanut)
// SCI interpreter version 0.000.510 (or 0.000.577?)
@@ -1701,7 +1762,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230},
{"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#if 0
// The resource.002 file, contained in disk 3, is broken in this version
@@ -1730,7 +1791,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "ec20246209d7b19f38989261e5c8f5b8", 1111226},
{"resource.002", 0, "85d6935ef77e6b0e16bc307640a0d913", 1088312},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 VGA Remake - English DOS (from FRG)
// SCI interpreter version 1.000.510
@@ -1740,7 +1801,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "d34cadb11e1aefbb497cf91bc1d3baa7", 1114688},
{"resource.002", 0, "85b030bb66d5342b0a068f1208c431a8", 1078443},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 VGA Remake - English Macintosh (from omer_mor, bug report #3328262)
{"lsl1sci", "SCI", {
@@ -1757,7 +1818,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "434e1f6c39d71647b34f0ee57b2bbd68", 444},
{"resource.001", 0, "0c0768215c562d9dace4a5ca53696cf3", 359913},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 VGA Remake - Spanish DOS (from the Leisure Suit Larry Collection, also includes english language)
// Executable scanning reports "1.SQ4.057", VERSION file reports "1.000"
@@ -1770,7 +1831,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "3fe2a3aec0ed53c7d6db1845a67e3aa2", 1095908},
{"resource.003", 0, "ac175df0ea9a2cba57f0248651856d27", 376556},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 VGA Remake - Russian DOS (also includes english language?!)
// Executable scanning reports "1.000.510", VERSION file reports "2.0"
@@ -1781,7 +1842,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "bc8ca10c807515d959cbd91f9ba47735", 1123759},
{"resource.002", 0, "b7409ab32bc3bee2d6cce887cd33f2b6", 1092160},
AD_LISTEND},
- Common::RU_RUS, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::RU_RUS, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 1 VGA Remake - Polish DOS (from Polish Leisure Suit Larry Collection, official release)
// SCI interpreter version 1.000.577, VERSION file reports "2.1" (this release does NOT include english text)
@@ -1789,7 +1850,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "58330a85767e42a2487129913283ab5b", 3228},
{"resource.000", 0, "b6097ff35cdc8469f02150fe2f824198", 4781210},
AD_LISTEND},
- Common::PL_POL, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::PL_POL, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 2 - English Amiga (from www.back2roots.org)
// Executable scanning reports "x.yyy.zzz"
@@ -1810,7 +1871,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "03dba704bb77da55a91ad27b5a3cac09", 528},
{"resource.001", 0, "9f5520f0297206928df0b0b36493cd33", 127532},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 2 - English DOS
// SCI interpreter version 0.000.409
@@ -1823,7 +1884,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732},
{"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 2 - English DOS
// SCI interpreter version 0.000.343
@@ -1838,7 +1899,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
//{"resource.006", 0, "96033f57accfca903750413fd09193c8", 345818},
{"resource.006", 0, "96033f57accfca903750413fd09193c8", -1}, // 345818 or 208739
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 2 - English DOS (supplied by ssburnout in bug report #3049193)
// 1.000.011 3x3.5" (label: Int. #0.000.343)
@@ -1848,7 +1909,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "96033f57accfca903750413fd09193c8", 407014},
{"resource.003", 0, "96033f57accfca903750413fd09193c8", 592834},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 2 - English DOS (supplied by ssburnout in bug report #3049193)
// 1.002.000 3x3.5" (label: INT#0.000.409)
@@ -1858,7 +1919,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 406935},
{"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 592533},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.002.032"
@@ -1874,17 +1935,6 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
- // Larry 3 - English DOS
- // SCI interpreter version 0.000.572
- {"lsl3", "", {
- {"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916},
- {"resource.001", 0, "f18441027154292836b973c655fa3175", 456722},
- {"resource.002", 0, "f18441027154292836b973c655fa3175", 578024},
- {"resource.003", 0, "f18441027154292836b973c655fa3175", 506807},
- {"resource.004", 0, "f18441027154292836b973c655fa3175", 513651},
- AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
-
// Larry 3 - English DOS (supplied by ssburnout in bug report #3049193)
// 1.021 8x5.25" (label: Int#5.15.90)
{"lsl3", "", {
@@ -1897,7 +1947,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f18441027154292836b973c655fa3175", 282649},
{"resource.007", 0, "f18441027154292836b973c655fa3175", 257178},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 - English DOS
// SCI interpreter version 0.000.572
@@ -1911,7 +1961,28 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f18441027154292836b973c655fa3175", 282465},
{"resource.007", 0, "f18441027154292836b973c655fa3175", 257174},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Larry 3 - English DOS
+ // SCI interpreter version 0.000.572
+ {"lsl3", "", {
+ {"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916},
+ {"resource.001", 0, "f18441027154292836b973c655fa3175", 456722},
+ {"resource.002", 0, "f18441027154292836b973c655fa3175", 578024},
+ {"resource.003", 0, "f18441027154292836b973c655fa3175", 506807},
+ {"resource.004", 0, "f18441027154292836b973c655fa3175", 513651},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Larry 3 - English DOS (supplied by kervala in bug report #3611488)
+ {"lsl3", "", {
+ {"resource.map", 0, "534d8946f10bc71a71b5bf89a84c31be", 5916},
+ {"resource.001", 0, "f18441027154292836b973c655fa3175", 456265},
+ {"resource.002", 0, "f18441027154292836b973c655fa3175", 577059},
+ {"resource.003", 0, "f18441027154292836b973c655fa3175", 506817},
+ {"resource.004", 0, "f18441027154292836b973c655fa3175", 513337},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 - English DOS Non-Interactive Demo
// SCI interpreter version 0.000.530
@@ -1920,7 +1991,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 76525},
{"resource.002", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 268299},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723832, also includes english language)
// Executable scanning reports "S.old.123"
@@ -1932,7 +2003,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "3827a9b17b926e12dcc336860f50612a", 587036},
{"resource.004", 0, "3827a9b17b926e12dcc336860f50612a", 691932},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 - French DOS (provided by richiefs in bug report #2670691, also includes english language)
// Executable scanning reports "S.old.123"
@@ -1944,7 +2015,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "65f1bdaa20f6d0470e9d969f22473873", 586921},
{"resource.004", 0, "65f1bdaa20f6d0470e9d969f22473873", 690826},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 3 1.050 Fr/En (9 x 5.25" disks)
// Provided by ssburnout in bug report #3046779
@@ -1958,7 +2029,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "65f1bdaa20f6d0470e9d969f22473873", 325292},
{"resource.007", 0, "65f1bdaa20f6d0470e9d969f22473873", 308982},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - English Amiga
// Executable scanning reports "1.004.023"
@@ -1997,7 +2068,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "efe8d3f45ce4f6bd9a6643e0ac8d2a97", 504},
{"resource.001", 0, "8bd8d9c0b5f455ee1269d63ce86c50dd", 531380},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - English DOS (from spookypeanut)
// SCI interpreter version 1.000.510
@@ -2012,7 +2083,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1024810},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 1030656},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - English Macintosh (from omer_mor, bug report #3328257)
{"lsl5", "", {
@@ -2041,7 +2112,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1021774},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 993408},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - French DOS (provided by richiefs in bug report #2670691)
// Executable scanning reports "1.lsl5.019"
@@ -2057,7 +2128,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 946540},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 958842},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - Spanish DOS (from the Leisure Suit Larry Collection)
// Executable scanning reports "1.ls5.006", VERSION file reports "1.000, 4/21/92"
@@ -2073,7 +2144,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1015136},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 987222},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 - Italian DOS Floppy (from glorifindel)
// SCI interpreter version 1.000.510 (just a guess)
@@ -2081,7 +2152,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a99776df795127f387cb35dae872d4e4", 5919},
{"resource.000", 0, "a8989a5a89e7d4f702b26b378c7a357a", 7001981},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 1.0 EGA DOS (8 x 3.5" disks)
// Provided by ssburnout in bug report #3046806
@@ -2096,7 +2167,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f6046a8445422f17d40b1b10ab21ebf3", 568551},
{"resource.007", 0, "640ee65595d40372ef95462f2c1ae28a", 593429},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 5 EGA
// Supplied by omer_mor in bug report #3049771
@@ -2107,7 +2178,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "5a55af4e40728b1a8103dc47ad2afa8d", 1100539},
{"resource.003", 0, "16f4d8fb1b526125edaca4fc6cbb7530", 1064563},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - English DOS (from spookypeanut)
// SCI interpreter version 1.001.113
@@ -2115,7 +2186,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "bb8a39d9e2a77ba449a1e591109ad9a8", 6973},
{"resource.000", 0, "4462fe48c7452d98fddcec327a3e738d", 5789138},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - English/German/French DOS CD - LOWRES
// SCI interpreter version 1.001.115
@@ -2123,7 +2194,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0b91234b7112782962cb480b7791b6e2", 7263},
{"resource.000", 0, "57d5fe8bb9e044158514476ea7678eb0", 5754790},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - German DOS CD - LOWRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 1.001.115
@@ -2131,7 +2202,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "bafe85f32738854135991d4324ad147e", 7268},
{"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5773160},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - French DOS CD - LOWRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 1.001.115
@@ -2139,7 +2210,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "97797ea775baaf18a1907d357d3c0ea6", 7268},
{"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5776092},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - Spanish DOS - LOWRES (from the Leisure Suit Larry Collection)
// Executable scanning reports "1.001.113", VERSION file reports "1.000, 11.06.93, FIVE PATCHES ADDED TO DISK 6 ON 11-18-93"
@@ -2147,7 +2218,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "633bf8f42170b6271019917c8009989b", 6943},
{"resource.000", 0, "7884a8db9253e29e6b37a2651fd90ba3", 5733116},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Crazy Nick's Software Picks: Leisure Suit Larry's Casino - English DOS (from the Leisure Suit Larry Collection)
// Executable scanning reports "1.001.029", VERSION file reports "1.000"
@@ -2155,35 +2226,35 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "194f1578f2624db813c9072359ad1639", 783},
{"resource.001", 0, "3733433b517ec3d14a3331d9ab3842ae", 344830},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Crazy Nick's Software Picks: King Graham's Board Game Challenge
{"cnick-kq", "", {
{"resource.map", 0, "44bc538a5cd24b39ffccc967c0ebf84d", 1137},
{"resource.001", 0, "470e7a4a3504635e70b623c44461e1ac", 451272},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Crazy Nick's Software Picks: Parlor Games with Laura Bow
{"cnick-laurabow", "", {
{"resource.map", 0, "3b826bfe64f8ff1ccf30eef93cd2f727", 999},
{"resource.001", 0, "985ac8db6f636f2b4334c04b0fbb44fb", 336698},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Crazy Nick's Software Picks: Robin Hood's Game of Skill and Chance
{"cnick-longbow", "", {
{"resource.map", 0, "4a5c81f485a2416bde12978506f2fb5f", 897},
{"resource.001", 0, "ef16dc9e867eb8eeb5b13e110b90bd4b", 571466},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Crazy Nick's Software Picks: Roger Wilco's Spaced Out Game Pack
{"cnick-sq", "", {
{"resource.map", 0, "b4d95b02d84e297441bd999d34eaa6b1", 879},
{"resource.001", 0, "82ff2b64a60117886fbcd6a3a8c977c6", 364921},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Larry 6 - English/German DOS CD - HIRES
@@ -2192,7 +2263,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872},
{"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2200,7 +2271,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2208,7 +2279,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2216,7 +2287,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "5cc6159688b2dc03790a67c90ccc67f9", 10195878},
{"resmap.000", 0, "6a2b2811eef82e87cde91cf1de845af8", 2695},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI3_GAMES
// Larry 7 - English DOS CD (from spookypeanut)
@@ -2225,7 +2296,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188},
{"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 7 - German DOS (from Tobis87)
// SCI interpreter version 3.000.000
@@ -2233,7 +2304,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188},
{"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 7 - French DOS (provided by richiefs in bug report #2670691)
// SCI interpreter version 3.000.000
@@ -2241,7 +2312,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206},
{"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 7 - Italian DOS CD (from glorifindel)
// SCI interpreter version 3.000.000
@@ -2249,7 +2320,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212},
{"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection)
// Executable scanning reports "3.000.000", VERSION file reports "1.0s"
@@ -2257,7 +2328,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188},
{"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#endif
// Lighthouse - English Windows Demo (from jvprat)
@@ -2266,7 +2337,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "543124606352bfa5e07696ddf2a669be", 64},
{"resource.000", 0, "5d7714416b612463d750fb9c5690c859", 28952},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI3_GAMES
// Lighthouse - English Windows Demo
@@ -2275,7 +2346,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "3bdee7a16926975a4729f75cf6b80a92", 1525},
{"ressci.000", 0, "3c585827fa4a82f4c04a56a0bc52ccee", 11494351},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Lighthouse - English DOS (from jvprat)
// Executable scanning reports "3.000.000", VERSION file reports "1.1"
@@ -2285,7 +2356,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573},
{"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Lighthouse - Spanish DOS (from jvprat)
// Executable scanning reports "3.000.000", VERSION file reports "1.1"
@@ -2295,7 +2366,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630},
{"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#endif // ENABLE_SCI3_GAMES
#endif // ENABLE_SCI32
@@ -2306,7 +2377,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "8be56a3a88c065ee00c02c0e29199f3a", 14643},
{"resource.001", 0, "9e33566515b18bee7915db448063bba2", 871853},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Fairy Tales - English DOS Floppy EGA (from omer_mor, bug report #3035350)
{"fairytales", "EGA", {
@@ -2317,7 +2388,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "509b2467ba779100d5933ed51a9ae32f", 560255},
{"resource.004", 0, "93afc85d5ffa60ea555d6cc336d22c03", 651109},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Fairy Tales v1.000 - English DOS (supplied by markcoolio in bug report #2723791)
// Executable scanning reports "1.000.145"
@@ -2329,7 +2400,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "b1288e0821ee358d1ffe877e5900c8ec", 1047565},
{"resource.004", 0, "f79daa70390d73746742ffcfc3dc4471", 937580},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Fairy Tales - English DOS Floppy (from jvprat)
// Executable scanning reports "1.000.145", Floppy label reports "1.0, 11.13.91", VERSION file reports "1.000"
@@ -2340,7 +2411,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "564f516d991032e781492592a4eaa275", 1414142},
{"resource.003", 0, "dd6cef0c592eadb7e6be9a25307c57a2", 1344719},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose - English Amiga (from www.back2roots.org)
// Executable scanning reports "1.003.009"
@@ -2358,7 +2429,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "d893892d62b3f061357291d66775e360", 239906},
{"resource.002", 0, "d893892d62b3f061357291d66775e360", 719398},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose - English DOS Floppy EGA (supplied by ssburnout in bug report #3049193)
// 1.011 5x5.25" (label: Int#8.2.90)
@@ -2371,7 +2442,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "dbbc22f124533ce308bc386b08956326", 146251},
{"resource.005", 0, "2ba5348e7fad641b9c4c7ff7c7cf4e68", 110979},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose v2.000 - English DOS Floppy (supplied by markcoolio in bug report #2723795)
// Executable scanning reports "1.001.031"
@@ -2379,7 +2450,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "52aae15e493cafd1da7e1c9b657a5bb9", 7026},
{"resource.000", 0, "b7ecd8ae9e254e80310b5a668b276e6e", 2948975},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose - English DOS CD (from jvprat)
// Executable scanning reports "x.yyy.zzz"
@@ -2388,7 +2459,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1c7f311b0a2c927b2fbe81ae341fb2f6", 5790},
{"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 4369438},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose - English Windows Interactive Demo
// Executable scanning reports "x.yyy.zzz"
@@ -2417,7 +2488,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741},
{"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Mixed-Up Mother Goose Deluxe - Multilingual Windows CD (English/French/German/Spanish)
// Executable scanning reports "2.100.002"
@@ -2425,7 +2496,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "ef611af561898dcfea87846919ebf3eb", 4969},
{"ressci.000", 0, "227685bc59d90821978d330713e44a7a", 17205800},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#endif // ENABLE_SCI32
// Ms. Astro Chicken - English DOS
@@ -2434,7 +2505,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5b457cbe5042f557e5b610148171f6c0", 1158},
{"resource.001", 0, "453ea81ef66a50cbe33ce06302afe47f", 229737},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Phantasmagoria - English DOS (from jvprat)
@@ -2455,7 +2526,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972},
//{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Phantasmagoria - English DOS Demo
// Executable scanning reports "2.100.002"
@@ -2463,7 +2534,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.001", 0, "416138651ea828219ca454cae18341a3", 11518},
{"ressci.001", 0, "3aae6559aa1df273bc542d5ac6330d75", 65844612},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Phantasmagoria - English DOS/Windows (GOG version) - ressci.* merged in ressci.000
// Windows executable scanning reports "2.100.002" - "Sep 19 1995 15:09:43"
@@ -2474,7 +2545,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "cd5967f9b9586e3380645961c0765be3", 116822037},
{"resmap.000", 0, "3cafc1c6a53945c1f3babbfd6380c64c", 16468},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Phantasmagoria - English Macintosh
// NOTE: This only contains disc 1 files (as well as the two persistent files:
@@ -2528,7 +2599,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179},
{"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Pepper - English DOS Non-Interactive Demo
// Executable scanning reports "1.001.060", VERSION file reports "1.000"
@@ -2536,7 +2607,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "379bb4fb896630b14f2d91ed21e36ba1", 984},
{"resource.000", 0, "118f6c31a93ec7fd9a231c61125229e3", 645494},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Pepper - English DOS/Windows Interactive Demo
// Executable scanning reports "1.001.069", VERSION file reports ".001"
@@ -2544,7 +2615,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "975e8df76106a5c13d12ab674f906a02", 2514},
{"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1698164},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Pepper - English DOS Interactive Demo
// Executable scanning reports "1.001.072", VERSION file reports "1.000"
@@ -2552,7 +2623,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9c9b7b900651a370dd3fb38d478b1798", 2524},
{"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1713544},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 1 VGA Remake - English DOS (from the Police Quest Collection)
// Executable scanning reports "1.001.029", VERSION file reports "2.000"
@@ -2560,7 +2631,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "35efa814fb994b1cbdac9611e401da67", 5013},
{"resource.000", 0, "e0d5ddf34eda903a38f0837e2aa7145b", 6401433},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 - English Amiga (from www.back2roots.org)
// SCI interpreter version 0.000.685 (just a guess)
@@ -2579,7 +2650,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8b77d0d4650c2052b356cece28294b58", 576},
{"resource.001", 0, "376ef6d6eaaeed66e1424bd219c4b9ab", 215398},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 - English DOS (provided by richiefs in bug report #2670691)
// SCI interpreter version 0.000.395
@@ -2592,7 +2663,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "77f02def3094af804fd2371db25b7100", 349899},
{"resource.006", 0, "77f02def3094af804fd2371db25b7100", 354991},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 - English DOS (from the Police Quest Collection)
// Executable scanning reports "0.000.490"
@@ -2602,7 +2673,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 - English DOS (from FRG)
// SCI interpreter version 0.000.395
@@ -2612,7 +2683,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 542897},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 586857},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 English DOS 1.001.006 (supplied by merkur-kun in bug report #3028479)
{"pq2", "", {
@@ -2621,7 +2692,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 541261},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 587511},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 2 - Japanese PC-98 (also includes english language)
// SCI interpreter version unknown
@@ -2671,7 +2742,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "8791b9eef53edf77c2dac950142221d3", 1159791},
{"resource.004", 0, "1b91e891a3c60a941dac0eecdf83375b", 1143606},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 3 - English DOS Non-Interactive Demo
// Executable scanning reports "T.A00.052"
@@ -2681,7 +2752,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "277f97771f7a6d89677141f02da313d6", 65150},
{"resource.001", 0, "5c5a551b6c86cce2ee75becb90e0b586", 624411},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 3 - German DOS (supplied by markcoolio in bug report #2723837, also includes english language)
// Executable scanning reports "T.A00.178"
@@ -2694,14 +2765,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "4836f460f4cfc8de61e2df4c45775504", 1180956},
{"resource.004", 0, "0c3eb84b9755852d9e795e0d5c9373c7", 1171760},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 3 - Spanish DOS v1.000 - Supplied by dianiu in bug report #3555647
{"pq3", "", {
{"resource.map", 0, "ffa0b4631c4e36d69631256d19ba29e7", 5421},
{"resource.000", 0, "5ee460af3d70c06a745cc482b6c783ba", 5410263},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 3 EGA
// Reported by musiclyinspired in bug report #3046573
@@ -2714,7 +2785,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "b96a86ab681769e4cbb439670d967ca6", 449682},
{"resource.005", 0, "9e6c53a0e7eef53694d260fade8b1fc7", 724000},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 4 - English DOS Non-Interactive Demo (from FRG)
// SCI interpreter version 1.001.096
@@ -2722,7 +2793,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "be56f87a1c4a13062a30a362df860c2f", 1472},
{"resource.000", 0, "527d5684016e6816157cd15d9071b11b", 1121310},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Police Quest 4 - English DOS CD (from the Police Quest Collection)
@@ -2731,7 +2802,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "379dfe80ed6bd16c47e4b950c4722eac", 11374},
{"resource.000", 0, "fd316a09b628b7032248139003369022", 18841068},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 4 - German DOS CD (German text, English speech)
// Supplied by markcoolio in bug report #3392955
@@ -2739,7 +2810,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a398076371ed0e1e706c8f9fb9fc7ac5", 11386},
{"resource.000", 0, "6ff21954e0a2c5992279e7eb787c8d56", 18918747},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 4 - English DOS
// SCI interpreter version 2.000.000 (a guess?)
@@ -2747,7 +2818,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aed9643158ccf01b71f359db33137f82", 9895},
{"resource.000", 0, "da383857b3be1e4514daeba2524359e0", 15141432},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 4 - French DOS (supplied by abevi in bug report #2612718)
// SCI interpreter version 2.000.000
@@ -2755,7 +2826,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "008030846edcc7c5c7a812c7f4ae4ceb", 9256},
{"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730153},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest 4 - German DOS (supplied by markcoolio in bug report #2723840)
// SCI interpreter version 2.000.000 (a guess?)
@@ -2763,7 +2834,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2393ee728ab930b2762cb5889f9b5aff", 9256},
{"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730155},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest: SWAT - English DOS/Windows Demo (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "0.001.200"
@@ -2771,7 +2842,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8c96733ef94c21526792f7ca4e3f2120", 1648},
{"resource.000", 0, "d8892f1b8c56c8f7704325460f49b300", 3676175},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest: SWAT - English DOS (from GOG.com)
// Executable scanning reports "2.100.002", VERSION file reports "1.0c"
@@ -2779,7 +2850,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "1c2563fee189885e29d9348f37306d94", 12175},
{"ressci.000", 0, "b2e1826ca81ce2e7e764587f5a14eee9", 127149181},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Police Quest: SWAT - English Windows (from the Police Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.0c"
@@ -2807,7 +2878,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203},
{"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by alonzotg in bug report #3206006)
{"qfg1", "", {
@@ -2818,7 +2889,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203},
{"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy v1.102 Int#0.000.629 (suppled by digitoxin1 in bug report #3554611)
{"qfg1", "", {
@@ -2829,7 +2900,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "f0af87c60ec869946da442833aa5afa8", 640502},
{"resource.004", 0, "f0af87c60ec869946da442833aa5afa8", 644575},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy v1.102 Int#0.000.629 (suppled by digitoxin1 in bug report #3554611)
{"qfg1", "", {
@@ -2843,7 +2914,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "48b2b3c964dcbeccb68e984e6d4e97db", 278473},
{"resource.007", 0, "f0af87c60ec869946da442833aa5afa8", 269237},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by markcoolio in bug report #2723843)
// Executable scanning reports "0.000.566"
@@ -2858,7 +2929,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852},
{"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by ssburnout in bug report #3049193)
// 1.001 10x5.25" (label: INT.#0.000.566)
@@ -2873,7 +2944,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852},
{"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by ssburnout in bug report #3049193)
// 1.200 10x5.25" (label: INT#9.10.90)
@@ -2888,7 +2959,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f46690dca714abc8c89357d30e363dd3", 278387},
{"resource.007", 0, "951299a82a8134ed12c5c18118d45c2f", 269173},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 / Hero's Quest - English DOS Demo
// Executable scanning reports "0.000.685"
@@ -2896,7 +2967,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "df34c758cbb9026da175793ff686b0e6", 882},
{"resource.001", 0, "73fbaafdd313b39aeedb80fbf85ecef1", 389884},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 - Japanese PC-98 5.25" Floppy (also includes English language)
// Executable scanning reports "S.old.201"
@@ -2942,7 +3013,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "951299a82a8134ed12c5c18118d45c2f", 640483},
{"resource.004", 0, "951299a82a8134ed12c5c18118d45c2f", 644443},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 VGA Remake - English DOS
// Executable scanning reports "2.000.411"
@@ -2950,7 +3021,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a731fb6c9c0b282443f7027bc8694d4c", 8469},
{"resource.000", 0, "ecace1a2771846b1a8aa1afdd44111a0", 6570147},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 VGA Remake - English DOS Non-Interactive Demo (from FRG)
// SCI interpreter version 1.001.029
@@ -2958,7 +3029,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ac0257051c95a59c0cdc0be24d9b11fa", 729},
{"resource.000", 0, "ec6f5cf369054dd3e5392995e9975b9e", 768218},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 1 VGA Remake - English Macintosh Floppy
// VERSION file reports "2.0"
@@ -2994,7 +3065,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "0790f67d87642132be515cab05026baa", 972144},
{"resource.004", 0, "2ac1e6fea9aa1f5b91a06693a67b9766", 982830},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 2 - English (supplied by ssburnout in bug report #3049193)
// 1.000 9x3.5" (label: INT#10.31.90)
@@ -3009,7 +3080,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "5e9deacbdb17198ad844988e04833520", 498593},
{"resource.007", 0, "2ac1e6fea9aa1f5b91a06693a67b9766", 490151},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 2 - English (from FRG)
// Executable scanning reports "1.000.072"
@@ -3021,7 +3092,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "b192607c42f6960ecdf2ad2e4f90e9bc", 972804},
{"resource.004", 0, "cd2de58e27665d5853530de93fae7cd6", 983617},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 2 - English DOS
// Executable scanning reports "1.000.072"
@@ -3036,7 +3107,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489},
{"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 2 - English DOS (supplied by digitoxin1 in bug report #3554614)
// v1.102 9x3.5" (label: Int#11.20.90)
@@ -3051,7 +3122,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489},
{"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 2 - English DOS Non-Interactive Demo
// Executable scanning reports "1.000.046"
@@ -3059,7 +3130,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e75eb86bdd517b3ef709058249986a87", 906},
{"resource.001", 0, "9b098f9e1008abe30e56c93b896494e6", 362123},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG)
// Executable scanning reports "1.001.021", VERSION file reports "1.000, 0.001.059, 6.12.92"
@@ -3067,7 +3138,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "fd71de9b588a45f085317caacf050e91", 687},
{"resource.000", 0, "b6c69bf6c18bf177492249fe81fc6a6d", 648702},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - English DOS
// SCI interpreter version 1.001.050
@@ -3075,7 +3146,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - English DOS (supplied by abevi in bug report #2612718)
// SCI interpreter version 1.001.050
@@ -3083,7 +3154,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "62c185d190363d7df06330fa0cc45b36", 5958},
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5867442},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - English DOS (supplied by dknute in bug report #3125559)
{"qfg3", "", {
@@ -3091,7 +3162,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868042},
{"resource.msg", 0, "27e5419c98ce444253f88c95dced14a9", 246888},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - German DOS (supplied by markcoolio in bug report #2723846)
// Executable scanning reports "L.rry.083"
@@ -3099,7 +3170,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868042},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+
+ // Quest for Glory 3 - French DOS v1.1 (supplied by misterhands in bug report #3586214)
+ // Executable scanning reports "L.rry.083"
+ {"qfg3", "", {
+ {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
+ {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000},
+ {"resource.msg", 0, "0fa1047002df904b8d1807bb7bab4fab", 267210},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - Spanish DOS CD (from jvprat)
// Executable scanning reports "L.rry.083", VERSION file reports "1.000.000, June 30, 1994"
@@ -3108,7 +3188,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "ba7ac86155e4c531e46cd73c86daa80a", 5884098},
{"resource.msg", 0, "a63974730d294dec0bea10057c36e506", 256014},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 3 - Italian DOS
// Supplied by ghoost in bug report #3053457
@@ -3117,7 +3197,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000},
{"resource.msg", 0, "5a0a896ff3e4a628db38a75eb6c84114", 259018},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 4 - English DOS Non-Interactive Demo (from FRG)
// SCI interpreter version 1.001.069 (just a guess)
@@ -3125,7 +3205,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1ba7c7ae1efb315326d45cb931569b1b", 922},
{"resource.000", 0, "41ba03f0b188b029132daa3ece0d3e14", 623154},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Quest for Glory 4 1.1 Floppy - English DOS (supplied by markcool in bug report #2723852)
@@ -3134,7 +3214,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "685bdb1ed47bbbb0e5e25db392da83ce", 9301},
{"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11004993},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 4 1.1 Floppy - English DOS (supplied by abevi in bug report #2612718)
// SCI interpreter version 2.000.000
@@ -3142,7 +3222,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d10a4cc177d2091d744e2ad8c049b0ae", 9295},
{"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11003589},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 4 1.1 Floppy - German DOS (supplied by markcool in bug report #2723850)
// Executable scanning reports "2.000.000", VERSION file reports "1.1"
@@ -3150,7 +3230,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301},
{"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_UNSTABLE, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Quest for Glory 4 CD - English DOS/Windows (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -3158,7 +3238,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246},
{"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// RAMA - English DOS/Windows Demo
// Executable scanning reports "2.100.002", VERSION file reports "000.000.008"
@@ -3261,7 +3341,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.msg", 0, "1aeafe2b495de288d002109650b66614", 1364},
{"resource.000", 0, "8e10d4f05c1fd9f883384fa38a898489", 377394},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English DOS/Windows
{"slater", "", {
@@ -3269,7 +3349,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044},
{"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English DOS/Windows (Sierra Originals)
@@ -3278,7 +3358,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044},
{"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Slater & Charlie Go Camping - English Macintosh
{"slater", "", {
@@ -3311,7 +3391,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "c47600e50c6fc591957ae0c5020ee7b8", 1213262},
{"resource.004", 0, "e19ea4ad131472f9238590f2e1d40289", 1203051},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 1 VGA Remake - English Mac (from Fingolfin)
{"sq1sci", "SCI", {
@@ -3330,7 +3410,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5af709ac5e0e923e0b8174f49978c30e", 636},
{"resource.001", 0, "fd99ea43f57576ded7c86036996346cf", 507642},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 1 VGA Remake - Spanish DOS Floppy (from jvprat)
// Executable scanning reports "T.A00.081", VERSION file reports "2.000"
@@ -3344,7 +3424,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9b78228ad4f9f335fedf74f1812dcfca", 513325},
{"resource.005", 0, "7d4ebcb745c0bf8fc42e4013f52ecd49", 1101812},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest I 2.0 EGA DOS (6 x 3.5" disks)
// Provided by ssburnout in bug report #3046805
@@ -3357,7 +3437,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "975c6e81194ae6b65e960a248129ecaa", 684119},
{"resource.005", 0, "13d96f7905637552c0647175ff816145", 695589},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 - English Amiga (from www.back2roots.org)
// SCI interpreter version 0.000.453 (just a guess)
@@ -3389,7 +3469,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ec66ac2b1ce58b2575ba00b65058de1a", 612},
{"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 180245},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 - English DOS (provided by richiefs in bug report #2670691)
// SCI interpreter version 0.000.453
@@ -3399,7 +3479,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720244},
{"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688367},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 - English DOS (from the Space Quest Collection)
// Executable scanning reports "0.000.685", VERSION file reports "1.018"
@@ -3409,7 +3489,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 715777},
{"resource.003", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 703370},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 - English DOS (from abevi, bug report #2612718)
{"sq3", "", {
@@ -3421,7 +3501,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 328278},
{"resource.006", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 356702},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 - English Mac (from Fingolfin)
{"sq3", "", {
@@ -3444,7 +3524,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "9107c2aa5398e28b5c5406df13491f85", 320643},
{"resource.007", 0, "9107c2aa5398e28b5c5406df13491f85", 344287},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 3 v1.052 - German DOS (supplied by markcoolio in bug report #2723860, also includes english language)
// Executable scanning reports "S.old.114"
@@ -3454,7 +3534,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 596768},
{"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 693573},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - English Amiga
// Executable scanning reports "1.004.024"
@@ -3492,7 +3572,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a18088c8aceb06025dbc945f29e02935", 5124},
{"resource.000", 0, "e1f46832cd2458796028e054a0466031", 5502009},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_PIRATED, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_PIRATED, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - English DOS
// Executable scanning reports "1.000.753"
@@ -3501,7 +3581,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "71ccf4f82ac4efb588731acfb7bf2603", 5646},
{"resource.000", 0, "e1f46832cd2458796028e054a0466031", 933928},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 1.052 - English DOS Floppy (supplied by markcoolio in bug report #2723865)
// Executable scanning reports "1.000.753"
@@ -3515,7 +3595,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "ff9c87da3bc53473fdee8b9d3edbc93c", 1200631},
{"resource.005", 0, "e33019ac19f755ae33fbf49b4fc9066c", 1053294},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 1.000 - French DOS Floppy (supplied by misterhands in bug report #3515247)
{"sq4", "", {
@@ -3528,7 +3608,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "b2cca3afcf2e013b8ce86b64155af766", 1254353},
{"resource.005", 0, "9e520577e035547c4b5149a6d12ef85b", 1098814},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 1.000 - English DOS Floppy (from abevi, bug report #2612718)
{"sq4", "", {
@@ -3540,7 +3620,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "c06350184a490c10eb4585fff0aa3192", 1254368},
{"resource.005", 0, "b8d6efbd3235329bfe844c794097b2c9", 1098717},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest IV DOS 1.060 EGA (6 x 3.5" disks)
// Supplied by ssburnout in bug report #3046781
@@ -3553,7 +3633,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9a673e33c3f6dd560b993ffed77eeb49", 534994},
{"resource.005", 0, "3c4841d0a3ebba4404af588c93620c22", 595465},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - German DOS (from Tobis87, also includes english language)
// SCI interpreter version 1.000.200 (just a guess)
@@ -3567,7 +3647,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "47ee647b5b12232d27e63cc627c25899", 1156765},
{"resource.006", 0, "dfb023e4e2a1e7a00fa18f9ede72a91b", 924059},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - Italian DOS Floppy (from glorifindel, also includes english language)
// SCI interpreter version 1.000.200 (just a guess)
@@ -3580,7 +3660,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "4277c61bed40a50dadc4b5a344520af2", 1251000},
{"resource.005", 0, "5f885abd335978e2fd4e5f886d7676c8", 1102880},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - Japanese PC-98 5.25" Floppy (also includes english language)
// SCI interpreter version 1.000.1068
@@ -3608,7 +3688,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::kPlatformDOS, 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"
@@ -3632,7 +3712,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "776fba81c110d1908776232cbe190e20", 1253752},
{"resource.005", 0, "55fae26c2a92f16ef72c1e216e827c0f", 1098328},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - Spanish DOS Floppy (from jvprat, also includes english language)
// Executable scanning reports "1.SQ4.056", VERSION file reports "1.000"
@@ -3644,7 +3724,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "74c62fa2146ff3b3b2ea2b3fb95b9af9", 1140801},
{"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1088408},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 1.000 - German DOS Floppy (supplied by markcoolio in bug report #2723862, also includes english language)
// Executable scanning reports "1.SQ4.030"
@@ -3658,7 +3738,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "c06350184a490c10eb4585fff0aa3192", 1254368},
{"resource.005", 0, "b8d6efbd3235329bfe844c794097b2c9", 1098717},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 4 - English Macintosh
// Executable scanning reports "x.yyy.zzz"
@@ -3686,7 +3766,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "2763fe4f0cb74df716ec8b0c464b0988", 1217428},
{"resource.005", 0, "d608713197c5ba1cd8c6ed46299c3069", 1057924},
AD_LISTEND},
- Common::RU_RUS, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::RU_RUS, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 - English DOS (from the Space Quest Collection)
// Executable scanning reports "1.001.068", VERSION file reports "1.04"
@@ -3695,16 +3775,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486},
{"resource.msg", 0, "bb8ad78793c26bdb3f77498b1d6515a9", 125988},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 - English DOS - THIS IS THE UNOFFICIAL BETA VERSION, WHICH IS OBVIOUSLY PIRATED AND CONTAINS MANY BUGS
- // ffs. http://www.akril15.com/sr/sq5alt/sq5alt.html =DO NOT RE-ADD=
+ // refer to http://www.akril15.com/sr/sq5alt/sq5alt.html =DO NOT RE-ADD=
// SCI interpreter version 1.001.067
{"sq5", "", {
{"resource.map", 0, "8bde0a9adb9a3e9aaa861826874c9834", 6473},
{"resource.000", 0, "f4a48705764544d7cc64a7bb22a610df", 6025184},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_PIRATED, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_PIRATED, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 v1.04 - German DOS (from Tobis87, updated information by markcool from bug reports #2723935 and #2724762)
// SCI interpreter version 1.001.068
@@ -3713,7 +3793,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486},
{"resource.msg", 0, "7c71cfc36153cfe07b450423a51f7e68", 146282},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 v1.04 - French DOS (from Hkz, Included in Space Quest Collector's Edition, with chapters I-V)
{"sq5", "", {
@@ -3721,7 +3801,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486},
{"resource.msg", 0, "877c42380320eb1db7dad83ccd261214", 140374},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 - Italian DOS Floppy (from glorifindel)
// SCI interpreter version 1.001.068 (just a guess)
@@ -3729,7 +3809,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "5040026519f37199f3616fb1d4704dff", 6047170},
{"resource.map", 0, "5b09168baa2f6e2e22787429b2d72f54", 6492},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::IT_ITA, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 - Spanish DOS Floppy (from mirir, bug report #3090664)
{"sq5", "", {
@@ -3737,7 +3817,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5714a899033bdebf2d61ad333c8c6637", 6492},
{"resource.msg", 0, "46deca7ef9cf057f7d442df98c1a2ae2", 134612},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::ES_ESP, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 5 - Russian DOS
// Executable scanning reports "1.001.068", VERSION file reports "1.994"
@@ -3746,7 +3826,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6f9ed21e1001526b4137f6703ed476af", 6103778},
{"resource.msg", 0, "0a8931990cd2eac1691602391c68ab85", 147580},
AD_LISTEND},
- Common::RU_RUS, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::RU_RUS, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Space Quest 6 - English DOS/Win3.11 CD (from the Space Quest Collection)
@@ -3755,7 +3835,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "6dddfa3a8f3a3a513ec9dfdfae955005", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 6 - English DOS/Win3.11 CD ver 1.11 (from FRG)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3763,7 +3843,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e0615d6e4e10e37ae42e6a2a95aaf145", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 6 - French DOS/Win3.11 CD (from French magazine Joystick - September 1997)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -3771,7 +3851,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "3c831625931d5079b73ae8c275f52c95", 10534},
{"resource.000", 0, "4195ca940f759424f62b90e262cc1737", 40932397},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 6 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723884)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3779,7 +3859,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "664d797415484f85c90b1b45aedc7686", 10534},
{"resource.000", 0, "ba87ba91e5bdabb4169dd0df75777722", 40933685},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_CD | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// Space Quest 6 - English DOS/Win3.11 Interactive Demo (from FRG)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3787,7 +3867,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "368f07b07433db3f819fa3fa0e5efee5", 2572},
{"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2272050},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#endif // ENABLE_SCI32
// The Island of Dr. Brain - English DOS CD (from jvprat)
@@ -3796,7 +3876,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2388efef8430b041b0f3b00b9050e4a2", 3281},
{"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 2103560},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// The Island of Dr. Brain - English DOS (from Quietust)
// Executable scanning reports "1.001.053", VERSION file reports "1.1 2.3.93"
@@ -3804,7 +3884,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "3c07da06bdd1689f9d07af78fb94d0ec", 3101},
{"resource.000", 0, "ecc686e0034fb4d41de077ac7167b3cf", 1947866},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
// The Island of Dr. Brain - English DOS Non-Interactive Demo
// SCI interpreter version 1.001.053 (just a guess)
@@ -3812,7 +3892,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a8e5ca8ed1996974afa59f4c45e06195", 986},
{"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 586560},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) },
#ifdef ENABLE_SCI32
// Torin's Passage - English Windows Interactive Demo
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 22c0a1479d..6005ac50be 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -466,6 +466,14 @@ bool GameFeatures::autoDetectSci21KernelType() {
// This case doesn't occur in early SCI2.1 games, and we've only
// seen it happen in the RAMA demo, thus we can assume that the
// game is using a SCI2.1 table
+
+ // HACK: The Inside the Chest Demo doesn't have sounds at all, but
+ // it's using a SCI2 kernel
+ if (g_sci->getGameId() == GID_CHEST) {
+ _sci21KernelType = SCI_VERSION_2;
+ return true;
+ }
+
warning("autoDetectSci21KernelType(): Sound object not loaded, assuming a SCI2.1 table");
_sci21KernelType = SCI_VERSION_2_1;
return true;
@@ -488,7 +496,9 @@ bool GameFeatures::autoDetectSci21KernelType() {
opcode = extOpcode >> 1;
// Check for end of script
- if (opcode == op_ret || offset >= script->getBufSize())
+ // We don't check for op_ret here because the Phantasmagoria Mac script
+ // has an op_ret early on in its script (controlled by a branch).
+ if (offset >= script->getBufSize())
break;
if (opcode == op_callk) {
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 46051ef145..8d55790ad2 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -132,7 +132,7 @@ void Kernel::loadSelectorNames() {
return;
}
- int count = isBE ? READ_BE_UINT16(r->data) : READ_LE_UINT16(r->data) + 1; // Counter is slightly off
+ int count = (isBE ? READ_BE_UINT16(r->data) : READ_LE_UINT16(r->data)) + 1; // Counter is slightly off
for (int i = 0; i < count; i++) {
int offset = isBE ? READ_BE_UINT16(r->data + 2 + i * 2) : READ_LE_UINT16(r->data + 2 + i * 2);
@@ -536,7 +536,7 @@ void Kernel::mapFunctions() {
SciVersion myVersion = getSciVersion();
switch (g_sci->getPlatform()) {
- case Common::kPlatformPC:
+ case Common::kPlatformDOS:
case Common::kPlatformFMTowns:
platformMask = SIGFOR_DOS;
break;
@@ -585,6 +585,17 @@ void Kernel::mapFunctions() {
continue;
}
+#ifdef ENABLE_SCI32
+ // HACK: Phantasmagoria Mac uses a modified kDoSound (which *nothing*
+ // else seems to use)!
+ if (g_sci->getPlatform() == Common::kPlatformMacintosh && g_sci->getGameId() == GID_PHANTASMAGORIA && kernelName == "DoSound") {
+ _kernelFuncs[id].function = kDoSoundPhantasmagoriaMac;
+ _kernelFuncs[id].signature = parseKernelSignature("DoSoundPhantasmagoriaMac", "i.*");
+ _kernelFuncs[id].name = "DoSoundPhantasmagoriaMac";
+ continue;
+ }
+#endif
+
// If the name is known, look it up in s_kernelMap. This table
// maps kernel func names to actual function (pointers).
SciKernelMapEntry *kernelMap = s_kernelMap;
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index f985a69ebc..8a021073fc 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);
@@ -466,6 +471,9 @@ reg_t kAddLine(EngineState *s, int argc, reg_t *argv);
reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv);
reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv);
+// Phantasmagoria Mac Special Kernel Function
+reg_t kDoSoundPhantasmagoriaMac(EngineState *s, int argc, reg_t *argv);
+
// SCI3 Kernel functions
reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv);
#endif
@@ -513,7 +521,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 b6b36c47e7..d7858180f1 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -94,7 +94,7 @@ static const SciKernelMapSubEntry kDoSound_subops[] = {
{ SIG_SOUNDSCI0, 7, MAP_CALL(DoSoundResumeAfterRestore), "", NULL },
{ SIG_SOUNDSCI0, 8, MAP_CALL(DoSoundMasterVolume), "(i)", NULL },
{ SIG_SOUNDSCI0, 9, MAP_CALL(DoSoundUpdate), "o", NULL },
- { SIG_SOUNDSCI0, 10, MAP_CALL(DoSoundFade), "o", kDoSoundFade_workarounds },
+ { SIG_SOUNDSCI0, 10, MAP_CALL(DoSoundFade), "[o0]", kDoSoundFade_workarounds },
{ SIG_SOUNDSCI0, 11, MAP_CALL(DoSoundGetPolyphony), "", NULL },
{ SIG_SOUNDSCI0, 12, MAP_CALL(DoSoundStopAll), "", NULL },
{ SIG_SOUNDSCI1EARLY, 0, MAP_CALL(DoSoundMasterVolume), NULL, NULL },
@@ -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/kevent.cpp b/engines/sci/engine/kevent.cpp
index 34477cc23b..11ef18c0c2 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -87,10 +87,11 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
g_sci->getVocabulary()->parser_event = NULL_REG; // Invalidate parser event
if (s->_cursorWorkaroundActive) {
- // ffs: GfxCursor::setPosition()
- // we check, if actual cursor position is inside given rect
- // if that's the case, we switch ourself off. Otherwise
- // we simulate the original set position to the scripts
+ // We check if the actual cursor position is inside specific rectangles
+ // where the cursor itself should be moved to. If this is the case, we
+ // set the mouse cursor's position to be within the rectangle in
+ // question. Check GfxCursor::setPosition(), for a more detailed
+ // explanation and a list of cursor position workarounds.
if (s->_cursorWorkaroundRect.contains(mousePos.x, mousePos.y)) {
s->_cursorWorkaroundActive = false;
} else {
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index e977f15c0c..c6635f2f27 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;
@@ -964,7 +978,7 @@ reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) {
char *saveNamePtr = saveNames;
for (uint i = 0; i < totalSaves; i++) {
- *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID ffs. see above
+ *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID (see above)
strcpy(saveNamePtr, saves[i].name);
saveNamePtr += SCI_MAX_SAVENAME_LENGTH;
}
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index da377319c0..e4b3028bcd 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -185,10 +185,12 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) {
hotspot = new Common::Point(argv[3].toSint16(), argv[4].toSint16());
// Fallthrough
case 3:
- if (g_sci->getPlatform() == Common::kPlatformMacintosh)
- g_sci->_gfxCursor->kernelSetMacCursor(argv[0].toUint16(), argv[1].toUint16(), argv[2].toUint16(), hotspot);
- else
+ if (g_sci->getPlatform() == Common::kPlatformMacintosh) {
+ delete hotspot; // Mac cursors have their own hotspot, so ignore any we get here
+ g_sci->_gfxCursor->kernelSetMacCursor(argv[0].toUint16(), argv[1].toUint16(), argv[2].toUint16());
+ } else {
g_sci->_gfxCursor->kernelSetView(argv[0].toUint16(), argv[1].toUint16(), argv[2].toUint16(), hotspot);
+ }
break;
case 10:
// Freddy pharkas, when using the whiskey glass to read the prescription (bug #3034973)
@@ -722,11 +724,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/klists.cpp b/engines/sci/engine/klists.cpp
index 342fa95eda..7e6c112b9f 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -801,7 +801,8 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) {
#endif
return NULL_REG;
}
- if (s->_segMan->getSegmentObj(argv[1].getSegment())->getType() != SEG_TYPE_ARRAY)
+ SegmentObj *sobj = s->_segMan->getSegmentObj(argv[1].getSegment());
+ if (!sobj || sobj->getType() != SEG_TYPE_ARRAY)
error("kArray(Dup): Request to duplicate a segment which isn't an array");
reg_t arrayHandle;
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/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 4061795f82..64793efa6c 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1366,7 +1366,16 @@ static void AStar(PathfindingState *s) {
// other, while we apply a penalty to paths traversing it.
// This difference might lead to problems, but none are
// known at the time of writing.
- if (s->pointOnScreenBorder(vertex->v))
+
+ // WORKAROUND: This check fails in QFG1VGA, room 81 (bug report #3568452).
+ // However, it is needed in other SCI1.1 games, such as LB2. Therefore, we
+ // add this workaround for that scene in QFG1VGA, until our algorithm matches
+ // better what SSCI is doing. With this workaround, QFG1VGA no longer freezes
+ // in that scene.
+ bool qfg1VgaWorkaround = (g_sci->getGameId() == GID_QFG1VGA &&
+ g_sci->getEngineState()->currentRoomNumber() == 81);
+
+ if (s->pointOnScreenBorder(vertex->v) && !qfg1VgaWorkaround)
new_dist += 10000;
if (new_dist < vertex->costG) {
@@ -2379,6 +2388,8 @@ reg_t kMergePoly(EngineState *s, int argc, reg_t *argv) {
debugN("\n");
#endif
}
+
+ delete polygon;
}
node = s->_segMan->lookupNode(node->succ);
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 0633267db4..2879b7f45d 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -193,6 +193,7 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) {
} else
#endif
mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, volume * 2);
+ break;
}
case kSciAudioLanguage:
// In SCI1.1: tests for digital audio support
@@ -308,6 +309,33 @@ reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv) {
return s->r_acc;
}
+reg_t kDoSoundPhantasmagoriaMac(EngineState *s, int argc, reg_t *argv) {
+ // Phantasmagoria Mac (and seemingly no other game (!)) uses this
+ // cutdown version of kDoSound.
+
+ switch (argv[0].toUint16()) {
+ case 0:
+ return g_sci->_soundCmd->kDoSoundMasterVolume(argc - 1, argv + 1, s->r_acc);
+ case 2:
+ return g_sci->_soundCmd->kDoSoundInit(argc - 1, argv + 1, s->r_acc);
+ case 3:
+ return g_sci->_soundCmd->kDoSoundDispose(argc - 1, argv + 1, s->r_acc);
+ case 4:
+ return g_sci->_soundCmd->kDoSoundPlay(argc - 1, argv + 1, s->r_acc);
+ case 5:
+ return g_sci->_soundCmd->kDoSoundStop(argc - 1, argv + 1, s->r_acc);
+ case 8:
+ return g_sci->_soundCmd->kDoSoundSetVolume(argc - 1, argv + 1, s->r_acc);
+ case 9:
+ return g_sci->_soundCmd->kDoSoundSetLoop(argc - 1, argv + 1, s->r_acc);
+ case 10:
+ return g_sci->_soundCmd->kDoSoundUpdateCues(argc - 1, argv + 1, s->r_acc);
+ }
+
+ error("Unknown kDoSound Phantasmagoria Mac subop %d", argv[0].toUint16());
+ return s->r_acc;
+}
+
#endif
} // End of namespace Sci
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index c4db0b891c..15a9f54996 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);
}
@@ -471,9 +488,9 @@ enum kMessageFunc {
K_MESSAGE_GET,
K_MESSAGE_NEXT,
K_MESSAGE_SIZE,
- K_MESSAGE_REFCOND,
- K_MESSAGE_REFVERB,
K_MESSAGE_REFNOUN,
+ K_MESSAGE_REFVERB,
+ K_MESSAGE_REFCOND,
K_MESSAGE_PUSH,
K_MESSAGE_POP,
K_MESSAGE_LASTMESSAGE
@@ -489,20 +506,15 @@ 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) {
// In complete weirdness, SCI32 bumps up subops 3-8 to 4-9 and stubs off subop 3.
- // In addition, SCI32 reorders the REF* subops.
if (func == 3)
error("SCI32 kMessage(3)");
- else if (func > 3) {
+ else if (func > 3)
func--;
- if (func == K_MESSAGE_REFCOND)
- func = K_MESSAGE_REFNOUN;
- else if (func == K_MESSAGE_REFNOUN || func == K_MESSAGE_REFVERB)
- func--;
- }
}
#endif
@@ -518,19 +530,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 +582,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 +593,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 +604,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..8c5741f8b0 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -56,7 +56,7 @@ public:
protected:
MessageReader(const byte *data, uint size, uint headerSize, uint recordSize)
- : _data(data), _size(size), _headerSize(headerSize), _recordSize(recordSize) { }
+ : _data(data), _size(size), _headerSize(headerSize), _recordSize(recordSize), _messageCount(0) { }
const byte *_data;
const uint _size;
@@ -203,6 +203,45 @@ 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 = "";
+ delete reader;
+ return true;
+ }
+
if (!reader->findRecord(t, record)) {
// Tuple not found
if (recurse && (stack.size() > 1)) {
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index 4444ede3bb..5bead82efe 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -60,7 +60,7 @@ typedef Common::Stack<CursorStack> CursorStackStack;
class MessageState {
public:
- MessageState(SegManager *segMan) : _segMan(segMan) { }
+ MessageState(SegManager *segMan) : _segMan(segMan), _lastReturnedModule(0) { }
int getMessage(int module, MessageTuple &t, reg_t buf);
int nextMessage(reg_t buf);
int messageSize(int module, MessageTuple &t);
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index ff3f19b53d..c8076ec819 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -678,7 +678,7 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
// We need to save intensity of the _sysPalette at least for kq6 when entering the dark cave (room 390)
// from room 340. scripts will set intensity to 60 for this room and restore them when leaving.
// Sierra SCI is also doing this (although obviously not for SCI0->SCI01 games, still it doesn't hurt
- // to save it everywhere). ffs. bug #3072868
+ // to save it everywhere). Refer to bug #3072868
s.syncBytes(_sysPalette.intensity, 256);
}
if (s.getVersion() >= 24) {
@@ -696,8 +696,9 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(_palVaryPaused);
}
+ _palVarySignal = 0;
+
if (s.isLoading() && _palVaryResourceId != -1) {
- _palVarySignal = 0;
palVaryInstallTimer();
}
}
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 8454be514a..20c5c52178 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -23,6 +23,7 @@
#include "sci/sci.h"
#include "sci/engine/script.h"
#include "sci/engine/state.h"
+#include "sci/engine/features.h"
#include "common/util.h"
@@ -62,7 +63,7 @@ struct SciScriptSignature {
// boundaries of room 660. Normally a textbox is supposed to get on screen
// but the call is wrong, so not only do we get an error message the script
// is also hanging because the cue won't get sent out
-// This also happens in sierra sci - ffs. bug #3038387
+// This also happens in sierra sci - refer to bug #3038387
const byte ecoquest1SignatureStayAndHelp[] = {
40,
0x3f, 0x01, // link 01
@@ -128,7 +129,7 @@ const SciScriptSignature ecoquest1Signatures[] = {
// ecorder. This is done by reusing temp-space, that was filled on state 1.
// this worked in sierra sci just by accident. In our sci, the temp space
// is resetted every time, which means the previous text isn't available
-// anymore. We have to patch the code because of that ffs. bug #3035386
+// anymore. We have to patch the code because of that - bug #3035386
const byte ecoquest2SignatureEcorder[] = {
35,
0x31, 0x22, // bnt [next state]
@@ -363,10 +364,42 @@ const uint16 freddypharkasPatchLadderEvent[] = {
PATCH_END
};
+// In the Macintosh version of Freddy Pharkas, kRespondsTo is broken for
+// property selectors. They hacked the script to work around the issue,
+// so we revert the script back to using the values of the DOS script.
+const byte freddypharkasSignatureMacInventory[] = {
+ 10,
+ 0x39, 0x23, // pushi 23
+ 0x39, 0x74, // pushi 74
+ 0x78, // push1
+ 0x38, 0x01, 0x74, // pushi 0174
+ 0x85, 0x15, // lat 15
+ 0
+};
+
+const uint16 freddypharkasPatchMacInventory[] = {
+ 0x39, 0x02, // pushi 02 (now matches the DOS version)
+ 0x39, 0x74, // pushi 74
+ 0x78, // push1
+ 0x38, 0x01, 0x74, // pushi 0174
+ 0x85, 0x15, // lat 15
+ 0x4a, 0x06, // send 06
+ 0x31, 0x08, // bnt 08
+ 0x38, 0x01, 0x74, // pushi 0174
+ 0x76, // push0
+ 0x85, 0x15, // lat 15
+ 0x4a, 0x04, // send 04
+ 0x02, // add
+ 0xa5, 0x12, // sat 12
+ 0x39, 0x04, // pushi 04 (now matches the DOS version)
+ PATCH_END
+};
+
// script, description, magic DWORD, adjust
const SciScriptSignature freddypharkasSignatures[] = {
{ 0, "CD: score early disposal", 1, PATCH_MAGICDWORD(0x39, 0x0d, 0x43, 0x75), -3, freddypharkasSignatureScoreDisposal, freddypharkasPatchScoreDisposal },
- { 235, "CD: canister pickup hang", 3, PATCH_MAGICDWORD(0x39, 0x07, 0x39, 0x08), -4, freddypharkasSignatureCanisterHang, freddypharkasPatchCanisterHang },
+ { 15, "Mac: broken inventory", 1, PATCH_MAGICDWORD(0x39, 0x23, 0x39, 0x74), 0, freddypharkasSignatureMacInventory, freddypharkasPatchMacInventory },
+ { 235, "CD: canister pickup hang", 3, PATCH_MAGICDWORD(0x39, 0x07, 0x39, 0x08), -4, freddypharkasSignatureCanisterHang, freddypharkasPatchCanisterHang },
{ 320, "ladder event issue", 2, PATCH_MAGICDWORD(0x6d, 0x76, 0x38, 0xf5), -1, freddypharkasSignatureLadderEvent, freddypharkasPatchLadderEvent },
SCI_SIGNATUREENTRY_TERMINATOR
};
@@ -590,6 +623,34 @@ const uint16 kq5PatchWitchCageInit[] = {
PATCH_END
};
+
+// In the final battle, the DOS version uses signals in the music to handle
+// timing, while in the Windows version another method is used and the GM
+// tracks do not contain these signals.
+// The original kq5 interpreter used global 400 to distinguish between
+// Windows (1) and DOS (0) versions.
+// We replace the 4 relevant checks for global 400 by a fixed true when
+// we use these GM tracks.
+//
+// Instead, we could have set global 400, but this has the possibly unwanted
+// side effects of switching to black&white cursors (which also needs complex
+// changes to GameFeatures::detectsetCursorType() ) and breaking savegame
+// compatibilty between the DOS and Windows CD versions of KQ5.
+// TODO: Investigate these side effects more closely.
+const byte kq5SignatureWinGMSignals[] = {
+ 9,
+ 0x80, 0x90, 0x01, // lag 0x190
+ 0x18, // not
+ 0x30, 0x1b, 0x00, // bnt +0x001B
+ 0x89, 0x57, // lsg 0x57
+ 0
+};
+
+const uint16 kq5PatchWinGMSignals[] = {
+ 0x34, 0x01, 0x00, // ldi 0x0001
+ PATCH_END
+};
+
// script, description, magic DWORD, adjust
const SciScriptSignature kq5Signatures[] = {
{ 0, "CD: harpy volume change", 1, PATCH_MAGICDWORD(0x80, 0x91, 0x01, 0x18), 0, kq5SignatureCdHarpyVolume, kq5PatchCdHarpyVolume },
@@ -597,6 +658,13 @@ const SciScriptSignature kq5Signatures[] = {
SCI_SIGNATUREENTRY_TERMINATOR
};
+const SciScriptSignature kq5WinGMSignatures[] = {
+ { 0, "CD: harpy volume change", 1, PATCH_MAGICDWORD(0x80, 0x91, 0x01, 0x18), 0, kq5SignatureCdHarpyVolume, kq5PatchCdHarpyVolume },
+ { 200, "CD: witch cage init", 1, PATCH_MAGICDWORD(0x7a, 0x00, 0xc8, 0x00), -10, kq5SignatureWitchCageInit, kq5PatchWitchCageInit },
+ { 124, "Win: GM Music signal checks", 4, PATCH_MAGICDWORD(0x80, 0x90, 0x01, 0x18), 0, kq5SignatureWinGMSignals, kq5PatchWinGMSignals },
+ SCI_SIGNATUREENTRY_TERMINATOR
+};
+
// ===========================================================================
// When giving the milk bottle to one of the babies in the garden in KQ6 (room
// 480), script 481 starts a looping baby cry sound. However, that particular
@@ -848,10 +916,73 @@ const uint16 qfg1vgaPatchFightEvents[] = {
PATCH_END
};
+// Script 814 of QFG1VGA is responsible for showing dialogs. However, the death
+// screen message shown when the hero dies in room 64 (ghost room) is too large
+// (254 chars long). Since the window header and main text are both stored in
+// temp space, this is an issue, as the scripts read the window header, then the
+// window text, which erases the window header text because of its length. To
+// fix that, we allocate more temp space and move the pointer used for the
+// window header a little bit, wherever it's used in script 814.
+// Fixes bug #3568431.
+
+// Patch 1: Increase temp space
+const byte qfg1vgaSignatureTempSpace[] = {
+ 4,
+ 0x3f, 0xba, // link 0xba
+ 0x87, 0x00, // lap 0
+ 0
+};
+
+const uint16 qfg1vgaPatchTempSpace[] = {
+ 0x3f, 0xca, // link 0xca
+ PATCH_END
+};
+
+// Patch 2: Move the pointer used for the window header a little bit
+const byte qfg1vgaSignatureDialogHeader[] = {
+ 4,
+ 0x5b, 0x04, 0x80, // lea temp[0x80]
+ 0x36, // push
+ 0
+};
+
+const uint16 qfg1vgaPatchDialogHeader[] = {
+ 0x5b, 0x04, 0x90, // lea temp[0x90]
+ 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
};
@@ -971,7 +1102,7 @@ const SciScriptSignature qfg3Signatures[] = {
// adds it to nest::x. The problem is that the script also checks if x exceeds
// we never reach that of course, so the pterodactyl-flight will go endlessly
// we could either calculate property count differently somehow fixing this
-// but I think just patching it out is cleaner (ffs. bug #3037938)
+// but I think just patching it out is cleaner (bug #3037938)
const byte sq4FloppySignatureEndlessFlight[] = {
8,
0x39, 0x04, // pushi 04 (selector x)
@@ -982,7 +1113,7 @@ const byte sq4FloppySignatureEndlessFlight[] = {
0
};
-// Similar to the above, for the German version (ffs. bug #3110215)
+// Similar to the above, for the German version (bug #3110215)
const byte sq4FloppySignatureEndlessFlightGerman[] = {
8,
0x39, 0x04, // pushi 04 (selector x)
@@ -1254,7 +1385,11 @@ void Script::matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uin
signatureTable = gk1Signatures;
break;
case GID_KQ5:
- signatureTable = kq5Signatures;
+ // See the explanation in the kq5SignatureWinGMSignals comment
+ if (g_sci->_features->useAltWinGMSound())
+ signatureTable = kq5WinGMSignatures;
+ else
+ signatureTable = kq5Signatures;
break;
case GID_KQ6:
signatureTable = kq6Signatures;
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/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 04c1dab158..97e33f256b 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -36,6 +36,9 @@ SegManager::SegManager(ResourceManager *resMan) {
_nodesSegId = 0;
_hunksSegId = 0;
+ _saveDirPtr = NULL_REG;
+ _parserPtr = NULL_REG;
+
#ifdef ENABLE_SCI32
_arraysSegId = 0;
_stringSegId = 0;
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 81090876c7..25110ce0ca 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -58,7 +58,7 @@ enum AbortGameState {
};
// We assume that scripts give us savegameId 0->99 for creating a new save slot
-// and savegameId 100->199 for existing save slots ffs. kfile.cpp
+// and savegameId 100->199 for existing save slots. Refer to kfile.cpp
enum {
SAVEGAMEID_OFFICIALRANGE_START = 100,
SAVEGAMEID_OFFICIALRANGE_END = 199
@@ -133,7 +133,7 @@ public:
uint _chosenQfGImportItem; // Remembers the item selected in QfG import rooms
- bool _cursorWorkaroundActive; // ffs. GfxCursor::setPosition()
+ bool _cursorWorkaroundActive; // Refer to GfxCursor::setPosition()
Common::Point _cursorWorkaroundPoint;
Common::Rect _cursorWorkaroundRect;
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 9fa0368784..6f0b34b457 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
@@ -243,12 +245,11 @@ const SciWorkaroundEntry kDisposeScript_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
- { GID_CAMELOT, -1, 989, 0, "rmMusic", "fade", -1, 0, { WORKAROUND_IGNORE, 0 } }, // gets called frequently with a NULL reference (i.e. 0:0) - bug #3035149
- { GID_KQ1, -1, 989, 0, "gameSound", "fade", -1, 0, { WORKAROUND_IGNORE, 0 } }, // gets called in several scenes (e.g. graham cracker) with 0:0
- { GID_KQ4, -1, 989, 0, "mySound", "", -1, 0, { WORKAROUND_IGNORE, 0 } }, // gets called in the demo when trying to open the non-existent menu with 0:0 - bug #3036942
{ 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)
+ { GID_SQ5, 800, 989, 0, "sq5Music1", "fade", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when cutting the wrong part of Goliath with the laser - bug #3614145
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.cpp b/engines/sci/graphics/animate.cpp
index ee28c5ca31..53715613fc 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -528,7 +528,7 @@ void GfxAnimate::addToPicDrawCels() {
it->priority = _ports->kernelCoordinateToPriority(it->y);
if (!view->isScaleable()) {
- // Laura Bow 2 specific - ffs. fill()
+ // Laura Bow 2 specific - Check fill() below
it->scaleSignal = 0;
it->scaleY = it->scaleX = 128;
}
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/compare.cpp b/engines/sci/graphics/compare.cpp
index 70dff15a86..b42063b119 100644
--- a/engines/sci/graphics/compare.cpp
+++ b/engines/sci/graphics/compare.cpp
@@ -37,8 +37,8 @@
namespace Sci {
-GfxCompare::GfxCompare(SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxScreen *screen, GfxCoordAdjuster *coordAdjuster)
- : _segMan(segMan), _kernel(kernel), _cache(cache), _screen(screen), _coordAdjuster(coordAdjuster) {
+GfxCompare::GfxCompare(SegManager *segMan, GfxCache *cache, GfxScreen *screen, GfxCoordAdjuster *coordAdjuster)
+ : _segMan(segMan), _cache(cache), _screen(screen), _coordAdjuster(coordAdjuster) {
}
GfxCompare::~GfxCompare() {
diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h
index 91e3b90fdb..0080406a3b 100644
--- a/engines/sci/graphics/compare.h
+++ b/engines/sci/graphics/compare.h
@@ -34,7 +34,7 @@ class Screen;
*/
class GfxCompare {
public:
- GfxCompare(SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxScreen *screen, GfxCoordAdjuster *coordAdjuster);
+ GfxCompare(SegManager *segMan, GfxCache *cache, GfxScreen *screen, GfxCoordAdjuster *coordAdjuster);
~GfxCompare();
uint16 kernelOnControl(byte screenMask, const Common::Rect &rect);
@@ -47,7 +47,6 @@ public:
private:
SegManager *_segMan;
- Kernel *_kernel;
GfxCache *_cache;
GfxScreen *_screen;
GfxCoordAdjuster *_coordAdjuster;
diff --git a/engines/sci/graphics/controls16.cpp b/engines/sci/graphics/controls16.cpp
index 7c09969717..0098f7b9ef 100644
--- a/engines/sci/graphics/controls16.cpp
+++ b/engines/sci/graphics/controls16.cpp
@@ -42,16 +42,13 @@ namespace Sci {
GfxControls16::GfxControls16(SegManager *segMan, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen)
: _segMan(segMan), _ports(ports), _paint16(paint16), _text16(text16), _screen(screen) {
- init();
+ _texteditBlinkTime = 0;
+ _texteditCursorVisible = false;
}
GfxControls16::~GfxControls16() {
}
-void GfxControls16::init() {
- _texteditCursorVisible = false;
-}
-
const char controlListUpArrow[2] = { 0x18, 0 };
const char controlListDownArrow[2] = { 0x19, 0 };
diff --git a/engines/sci/graphics/controls16.h b/engines/sci/graphics/controls16.h
index 90bd7beacb..2cde86d4b1 100644
--- a/engines/sci/graphics/controls16.h
+++ b/engines/sci/graphics/controls16.h
@@ -63,7 +63,6 @@ public:
void kernelTexteditChange(reg_t controlObject, reg_t eventObject);
private:
- void init();
void texteditSetBlinkTime();
void drawListControl(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 upperPos, int16 cursorPos, bool isAlias);
diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp
index 5535a7408a..5b61e1a86a 100644
--- a/engines/sci/graphics/controls32.cpp
+++ b/engines/sci/graphics/controls32.cpp
@@ -35,8 +35,8 @@
namespace Sci {
-GfxControls32::GfxControls32(SegManager *segMan, GfxCache *cache, GfxScreen *screen, GfxText32 *text)
- : _segMan(segMan), _cache(cache), _screen(screen), _text(text) {
+GfxControls32::GfxControls32(SegManager *segMan, GfxCache *cache, GfxText32 *text)
+ : _segMan(segMan), _cache(cache), _text(text) {
}
GfxControls32::~GfxControls32() {
diff --git a/engines/sci/graphics/controls32.h b/engines/sci/graphics/controls32.h
index 68dca59462..1b705988c2 100644
--- a/engines/sci/graphics/controls32.h
+++ b/engines/sci/graphics/controls32.h
@@ -34,7 +34,7 @@ class GfxText32;
*/
class GfxControls32 {
public:
- GfxControls32(SegManager *segMan, GfxCache *cache, GfxScreen *screen, GfxText32 *text);
+ GfxControls32(SegManager *segMan, GfxCache *cache, GfxText32 *text);
~GfxControls32();
void kernelTexteditChange(reg_t controlObject);
@@ -42,7 +42,6 @@ public:
private:
SegManager *_segMan;
GfxCache *_cache;
- GfxScreen *_screen;
GfxText32 *_text;
};
diff --git a/engines/sci/graphics/coordadjuster.h b/engines/sci/graphics/coordadjuster.h
index 63f608be6b..25279b34b1 100644
--- a/engines/sci/graphics/coordadjuster.h
+++ b/engines/sci/graphics/coordadjuster.h
@@ -71,8 +71,6 @@ public:
private:
GfxPorts *_ports;
-
- Port *backuppedPort;
};
#ifdef ENABLE_SCI32
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index ce77cf6ed3..a9c741670f 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -69,6 +69,10 @@ GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *sc
_useSilverSQ4CDCursors = ConfMan.getBool("silver_cursors");
else
_useSilverSQ4CDCursors = false;
+
+ // _coordAdjuster and _event will be initialized later on
+ _coordAdjuster = NULL;
+ _event = NULL;
}
GfxCursor::~GfxCursor() {
@@ -277,16 +281,16 @@ void GfxCursor::kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Co
delete cursorHotspot;
}
-// this list contains all mandatory set cursor changes, that need special handling
-// ffs. GfxCursor::setPosition (below)
-// Game, newPosition, validRect
+// This list contains all mandatory set cursor changes, that need special handling
+// Refer to GfxCursor::setPosition() below
+// Game, newPosition, validRect
static const SciCursorSetPositionWorkarounds setPositionWorkarounds[] = {
- { GID_ISLANDBRAIN, 84, 109, 46, 76, 174, 243 }, // island of dr. brain / game menu
- { GID_ISLANDBRAIN,143, 135, 57, 102, 163, 218 },// island of dr. brain / pause menu within copy protection
- { GID_LSL5, 23, 171, 0, 0, 26, 320 }, // larry 5 / skip forward helper
- { GID_QFG1VGA, 64, 174, 40, 37, 74, 284 }, // Quest For Glory 1 VGA / run/walk/sleep sub-menu
- { GID_QFG3, 70, 170, 40, 61, 81, 258 }, // Quest For Glory 3 / run/walk/sleep sub-menu
- { (SciGameId)0, -1, -1, -1, -1, -1, -1 }
+ { GID_ISLANDBRAIN, 84, 109, 46, 76, 174, 243 }, // Island of Dr. Brain, game menu
+ { GID_ISLANDBRAIN, 143, 135, 57, 102, 163, 218 }, // Island of Dr. Brain, pause menu within copy protection
+ { GID_LSL5, 23, 171, 0, 0, 26, 320 }, // Larry 5, skip forward helper pop-up
+ { GID_QFG1VGA, 64, 174, 40, 37, 74, 284 }, // Quest For Glory 1 VGA, run/walk/sleep sub-menu
+ { GID_QFG3, 70, 170, 40, 61, 81, 258 }, // Quest For Glory 3, run/walk/sleep sub-menu
+ { (SciGameId)0, -1, -1, -1, -1, -1, -1 }
};
void GfxCursor::setPosition(Common::Point pos) {
@@ -306,16 +310,24 @@ void GfxCursor::setPosition(Common::Point pos) {
g_system->warpMouse(pos.x, pos.y);
}
+ // WORKAROUNDS for games with windows that are hidden when the mouse cursor
+ // is moved outside them - also check setPositionWorkarounds above.
+ //
// Some games display a new menu, set mouse position somewhere within and
- // expect it to be in there. This is fine for a real mouse, but on wii using
- // wii-mote or touch interfaces this won't work. In fact on those platforms
- // the menus will close immediately because of that behavior.
- // We identify those cases and set a reaction-rect. If the mouse it outside
- // of that rect, we won't report the position back to the scripts.
- // As soon as the mouse was inside once, we will revert to normal behavior
- // Currently this code is enabled for all platforms, especially because we can't
- // differentiate between e.g. Windows used via mouse and Windows used via touchscreen
- // The workaround won't hurt real-mouse platforms
+ // expect it to be in there. This is fine for a real mouse, but on platforms
+ // without a mouse, such as a Wii with a Wii Remote, or touch interfaces,
+ // this won't work. In these platforms, the affected menus will close
+ // immediately, because the mouse cursor's position won't be what the game
+ // scripts expect.
+ // We identify these cases via the cursor position set. If the mouse position
+ // is outside the expected rectangle, we report back to the game scripts that
+ // it's actually inside it, the first time that the mouse position is polled,
+ // as the scripts expect. In subsequent mouse position poll attempts, we
+ // return back the actual mouse coordinates.
+ // Currently this code is enabled for all platforms, as we can't differentiate
+ // between ones that have normal mouse input, and platforms that have
+ // alternative mouse input methods, like a touch screen. Platforms that have
+ // a normal mouse for input won't be affected by this workaround.
const SciGameId gameId = g_sci->getGameId();
const SciCursorSetPositionWorkarounds *workaround;
workaround = setPositionWorkarounds;
@@ -481,7 +493,7 @@ void GfxCursor::kernelMoveCursor(Common::Point pos) {
_event->getSciEvent(SCI_EVENT_PEEK);
}
-void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot) {
+void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNum) {
// Here we try to map the view number onto the cursor. What they did was keep the
// kSetCursor calls the same, but perform remapping on the cursors. They also took
// it a step further and added a new kPlatform sub-subop that handles remapping
@@ -532,6 +544,7 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
if (!macCursor->readFromStream(resStream)) {
warning("Failed to load Mac cursor %d", viewNum);
+ delete macCursor;
return;
}
diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h
index ac928f50bb..369bd22a0b 100644
--- a/engines/sci/graphics/cursor.h
+++ b/engines/sci/graphics/cursor.h
@@ -60,7 +60,7 @@ public:
bool isVisible();
void kernelSetShape(GuiResourceId resourceId);
void kernelSetView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot);
- void kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot);
+ void kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNum);
void setPosition(Common::Point pos);
Common::Point getPosition();
void refreshPosition();
diff --git a/engines/sci/graphics/fontsjis.h b/engines/sci/graphics/fontsjis.h
index c4ae4ab580..ae5eaa43f9 100644
--- a/engines/sci/graphics/fontsjis.h
+++ b/engines/sci/graphics/fontsjis.h
@@ -50,9 +50,6 @@ private:
GuiResourceId _resourceId;
Graphics::FontSJIS *_commonFont;
-
- byte _lastForDoubleByteWidth;
- byte _lastForDoubleByteDraw;
};
} // End of namespace Sci
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 8b7fa2c384..bf1ce6da64 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,15 @@ 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) &&
+ itemEntry->scaleX != 128)
+ 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 +763,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 +770,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..d2416ab4e0 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -46,6 +46,7 @@ GfxMenu::GfxMenu(EventManager *event, SegManager *segMan, GfxPorts *ports, GfxPa
_menuSaveHandle = NULL_REG;
_barSaveHandle = NULL_REG;
_oldPort = NULL;
+ _mouseOldState = false;
reset();
}
@@ -314,7 +315,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/paint16.cpp b/engines/sci/graphics/paint16.cpp
index d20aa80c77..940a1ac3cf 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -41,8 +41,14 @@
namespace Sci {
-GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio)
- : _resMan(resMan), _segMan(segMan), _kernel(kernel), _cache(cache), _ports(ports), _coordAdjuster(coordAdjuster), _screen(screen), _palette(palette), _transitions(transitions), _audio(audio) {
+GfxPaint16::GfxPaint16(ResourceManager *resMan, SegManager *segMan, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio)
+ : _resMan(resMan), _segMan(segMan), _cache(cache), _ports(ports),
+ _coordAdjuster(coordAdjuster), _screen(screen), _palette(palette),
+ _transitions(transitions), _audio(audio), _EGAdrawingVisualize(false) {
+
+ // _animate and _text16 will be initialized later on
+ _animate = NULL;
+ _text16 = NULL;
}
GfxPaint16::~GfxPaint16() {
@@ -51,8 +57,6 @@ GfxPaint16::~GfxPaint16() {
void GfxPaint16::init(GfxAnimate *animate, GfxText16 *text16) {
_animate = animate;
_text16 = text16;
-
- _EGAdrawingVisualize = false;
}
void GfxPaint16::debugSetEGAdrawingVisualize(bool state) {
diff --git a/engines/sci/graphics/paint16.h b/engines/sci/graphics/paint16.h
index 46df203200..e06021c3e7 100644
--- a/engines/sci/graphics/paint16.h
+++ b/engines/sci/graphics/paint16.h
@@ -38,7 +38,7 @@ class GfxView;
*/
class GfxPaint16 : public GfxPaint {
public:
- GfxPaint16(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio);
+ GfxPaint16(ResourceManager *resMan, SegManager *segMan, GfxCache *cache, GfxPorts *ports, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette, GfxTransitions *transitions, AudioPlayer *audio);
~GfxPaint16();
void init(GfxAnimate *animate, GfxText16 *text16);
@@ -89,7 +89,6 @@ public:
private:
ResourceManager *_resMan;
SegManager *_segMan;
- Kernel *_kernel;
AudioPlayer *_audio;
GfxAnimate *_animate;
GfxCache *_cache;
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index a9590c829a..a03e77dfa6 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -34,8 +34,8 @@
namespace Sci {
-GfxPaint32::GfxPaint32(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCoordAdjuster *coordAdjuster, GfxCache *cache, GfxScreen *screen, GfxPalette *palette)
- : _resMan(resMan), _segMan(segMan), _kernel(kernel), _coordAdjuster(coordAdjuster), _cache(cache), _screen(screen), _palette(palette) {
+GfxPaint32::GfxPaint32(ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette)
+ : _resMan(resMan), _coordAdjuster(coordAdjuster), _screen(screen), _palette(palette) {
}
GfxPaint32::~GfxPaint32() {
diff --git a/engines/sci/graphics/paint32.h b/engines/sci/graphics/paint32.h
index 66b31de282..81e355f77f 100644
--- a/engines/sci/graphics/paint32.h
+++ b/engines/sci/graphics/paint32.h
@@ -34,7 +34,7 @@ class GfxPorts;
*/
class GfxPaint32 : public GfxPaint {
public:
- GfxPaint32(ResourceManager *resMan, SegManager *segMan, Kernel *kernel, GfxCoordAdjuster *coordAdjuster, GfxCache *cache, GfxScreen *screen, GfxPalette *palette);
+ GfxPaint32(ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxScreen *screen, GfxPalette *palette);
~GfxPaint32();
void fillRect(Common::Rect rect, byte color);
@@ -44,10 +44,7 @@ public:
private:
ResourceManager *_resMan;
- SegManager *_segMan;
- Kernel *_kernel;
GfxCoordAdjuster *_coordAdjuster;
- GfxCache *_cache;
GfxScreen *_screen;
GfxPalette *_palette;
};
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 53d69cdcca..d8d788b00a 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -386,9 +386,9 @@ void GfxPalette::setRemappingPercentGray(byte color, byte percent) {
// Note: This is not what the original does, but the results are the same visually
for (int i = 0; i < 256; i++) {
- byte rComponent = _sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100;
- byte gComponent = _sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100;
- byte bComponent = _sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100;
+ byte rComponent = (byte)(_sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100);
+ byte gComponent = (byte)(_sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100);
+ byte bComponent = (byte)(_sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100);
byte luminosity = rComponent + gComponent + bComponent;
_remappingByPercent[i] = kernelFindColor(luminosity, luminosity, luminosity);
}
@@ -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) {
@@ -856,7 +851,7 @@ int16 GfxPalette::kernelPalVaryReverse(int16 ticks, uint16 stepStop, int16 direc
if (!_palVaryTicks) {
_palVaryDirection = _palVaryStepStop - _palVaryStep;
- // ffs. see palVaryInit right above, we fix the code here as well
+ // see palVaryInit above, we fix the code here as well
// just in case
palVaryProcess(1, true);
} else {
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index bb326b1d2f..af372640da 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -605,7 +605,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
case PIC_OP_MEDIUM_LINES: // medium line
vectorGetAbsCoords(data, curPos, x, y);
if (icemanDrawFix) {
- // WORKAROUND: remove certain lines in iceman ffs. see above
+ // WORKAROUND: remove certain lines in iceman - see above
if ((pic_color == 1) && (pic_priority == 14)) {
if ((y < 100) || (!(y & 1))) {
pic_color = 255;
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/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index 8acdeed763..6d9dc03195 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -116,7 +116,7 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te
setPort(_wmgrPort);
// SCI0 games till kq4 (.502 - not including) did not adjust against _wmgrPort in kNewWindow
// We leave _wmgrPort top at 0, so the adjustment wont get done
- if (!g_sci->_features->usesOldGfxFunctions()) {
+ if (!_usesOldGfxFunctions) {
setOrigin(0, offTop);
_wmgrPort->rect.bottom = _screen->getHeight() - offTop;
} else {
@@ -131,7 +131,7 @@ void GfxPorts::init(bool usesOldGfxFunctions, GfxPaint16 *paint16, GfxText16 *te
_picWind = addWindow(Common::Rect(0, offTop, _screen->getWidth(), _screen->getHeight()), 0, 0, SCI_WINDOWMGR_STYLE_TRANSPARENT | SCI_WINDOWMGR_STYLE_NOFRAME, 0, true);
// For SCI0 games till kq4 (.502 - not including) we set _picWind top to offTop instead
// Because of the menu/status bar
- if (g_sci->_features->usesOldGfxFunctions())
+ if (_usesOldGfxFunctions)
_picWind->top = offTop;
kernelInitPriorityBands();
@@ -537,7 +537,7 @@ void GfxPorts::freeWindow(Window *pWnd) {
if (!pWnd->hSaved1.isNull())
_segMan->freeHunkEntry(pWnd->hSaved1);
if (!pWnd->hSaved2.isNull())
- _segMan->freeHunkEntry(pWnd->hSaved1);
+ _segMan->freeHunkEntry(pWnd->hSaved2);
_windowsById[pWnd->id] = NULL;
delete pWnd;
}
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 246b6bfff9..74503c0c77 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -115,6 +115,8 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_controlScreen = (byte *)calloc(_pixels, 1);
_displayScreen = (byte *)calloc(_displayPixels, 1);
+ memset(&_ditheredPicColors, 0, sizeof(_ditheredPicColors));
+
// Sets display screen to be actually displayed
_activeScreen = _displayScreen;
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 7eaa0168b8..56e9ea8b69 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -36,8 +36,8 @@
namespace Sci {
-GfxText16::GfxText16(ResourceManager *resMan, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen)
- : _resMan(resMan), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen) {
+GfxText16::GfxText16(GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen)
+ : _cache(cache), _ports(ports), _paint16(paint16), _screen(screen) {
init();
}
diff --git a/engines/sci/graphics/text16.h b/engines/sci/graphics/text16.h
index b33c2c4df0..321c7fc25e 100644
--- a/engines/sci/graphics/text16.h
+++ b/engines/sci/graphics/text16.h
@@ -40,7 +40,7 @@ class GfxFont;
*/
class GfxText16 {
public:
- GfxText16(ResourceManager *_resMan, GfxCache *fonts, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen);
+ GfxText16(GfxCache *fonts, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen);
~GfxText16();
GuiResourceId GetFontId();
@@ -75,7 +75,6 @@ private:
void init();
bool SwitchToFont900OnSjis(const char *text);
- ResourceManager *_resMan;
GfxCache *_cache;
GfxPorts *_ports;
GfxPaint16 *_paint16;
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index 6e02eb75e3..26e3ec9238 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -386,8 +386,10 @@ ParseRuleList *Vocabulary::buildGNF(bool verbose) {
for (uint i = 1; i < _parserBranches.size(); i++) { // branch rule 0 is treated specially
ParseRule *rule = _vbuild_rule(&_parserBranches[i]);
- if (!rule)
+ if (!rule) {
+ freeRuleList(ntlist);
return NULL;
+ }
ntlist = _vocab_add_rule(ntlist, rule);
}
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index e56158ecc1..f5b79d6c5e 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -494,8 +494,6 @@ void Vocabulary::debugDecipherSaidBlock(const byte *addr) {
case 0xf9:
debugN(">");
break;
- case 0xff:
- break;
}
}
} while (nextItem != 0xff);
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index c9c0d25bc6..d14c965ebb 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -158,24 +158,24 @@ static const ResourceType s_resTypeMapSci21[] = {
ResourceType ResourceManager::convertResType(byte type) {
type &= 0x7f;
- if (_mapVersion < kResVersionSci2) {
+ bool forceSci0 = false;
+
+ // LSL6 hires doesn't have the chunk resource type, to match
+ // the resource types of the lowres version, thus we use the
+ // older resource types here.
+ // PQ4 CD and QFG4 CD are SCI2.1, but use the resource types of the
+ // corresponding SCI2 floppy disk versions.
+ if (g_sci && (g_sci->getGameId() == GID_LSL6HIRES ||
+ g_sci->getGameId() == GID_QFG4 || g_sci->getGameId() == GID_PQ4))
+ forceSci0 = true;
+
+ if (_mapVersion < kResVersionSci2 || forceSci0) {
// SCI0 - SCI2
if (type < ARRAYSIZE(s_resTypeMapSci0))
return s_resTypeMapSci0[type];
} else {
- // SCI2.1+
- if (type < ARRAYSIZE(s_resTypeMapSci21)) {
- // LSL6 hires doesn't have the chunk resource type, to match
- // the resource types of the lowres version, thus we use the
- // older resource types here.
- // PQ4 CD and QFG4 CD are SCI2.1, but use the resource types of the
- // corresponding SCI2 floppy disk versions.
- if (g_sci && (g_sci->getGameId() == GID_LSL6HIRES ||
- g_sci->getGameId() == GID_QFG4 || g_sci->getGameId() == GID_PQ4))
- return s_resTypeMapSci0[type];
- else
- return s_resTypeMapSci21[type];
- }
+ if (type < ARRAYSIZE(s_resTypeMapSci21))
+ return s_resTypeMapSci21[type];
}
return kResourceTypeInvalid;
@@ -1152,7 +1152,6 @@ ResVersion ResourceManager::detectMapVersion() {
}
break;
} else if (rsrc->getSourceType() == kSourceMacResourceFork) {
- delete fileStream;
return kResVersionSci11Mac;
}
}
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 684e1a1d0d..744f05f2b9 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -75,6 +75,10 @@ AudioVolumeResourceSource::AudioVolumeResourceSource(ResourceManager *resMan, co
delete fileStream;
}
+AudioVolumeResourceSource::~AudioVolumeResourceSource() {
+ delete[] _audioCompressionOffsetMapping;
+}
+
bool Resource::loadFromWaveFile(Common::SeekableReadStream *file) {
data = new byte[size];
diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h
index e8e66503d8..c256c9d156 100644
--- a/engines/sci/resource_intern.h
+++ b/engines/sci/resource_intern.h
@@ -149,6 +149,8 @@ protected:
public:
AudioVolumeResourceSource(ResourceManager *resMan, const Common::String &name, ResourceSource *map, int volNum);
+ virtual ~AudioVolumeResourceSource();
+
virtual void loadResource(ResourceManager *resMan, Resource *res);
virtual uint32 getAudioCompressionType() const;
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 15b18ce8e6..c1aadc3622 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -385,7 +385,7 @@ bool SciEngine::gameHasFanMadePatch() {
{ GID_PQ3, 994, 4686, 1291, 0x78 }, // English
{ GID_PQ3, 994, 4734, 1283, 0x78 }, // German
{ GID_QFG1VGA, 994, 4388, 0, 0x00 },
- { GID_QFG3, 33, 260, 0, 0x00 },
+ { GID_QFG3, 994, 4714, 2, 0x48 },
// TODO: Disabled, as it fixes a whole lot of bugs which can't be tested till SCI2.1 support is finished
//{ GID_QFG4, 710, 11477, 0, 0x00 },
{ GID_SQ1, 994, 4740, 0, 0x00 },
@@ -455,10 +455,19 @@ static byte patchGameRestoreSaveSci21[] = {
static void patchGameSaveRestoreCode(SegManager *segMan, reg_t methodAddress, byte id) {
Script *script = segMan->getScript(methodAddress.getSegment());
byte *patchPtr = const_cast<byte *>(script->getBuf(methodAddress.getOffset()));
- if (getSciVersion() <= SCI_VERSION_1_1)
+
+ if (getSciVersion() <= SCI_VERSION_1_1) {
memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave));
- else // SCI2+
+ } else { // SCI2+
memcpy(patchPtr, patchGameRestoreSaveSci2, sizeof(patchGameRestoreSaveSci2));
+
+ if (g_sci->isBE()) {
+ // LE -> BE
+ patchPtr[9] = 0x00;
+ patchPtr[10] = 0x06;
+ }
+ }
+
patchPtr[8] = id;
}
@@ -466,8 +475,16 @@ static void patchGameSaveRestoreCodeSci21(SegManager *segMan, reg_t methodAddres
Script *script = segMan->getScript(methodAddress.getSegment());
byte *patchPtr = const_cast<byte *>(script->getBuf(methodAddress.getOffset()));
memcpy(patchPtr, patchGameRestoreSaveSci21, sizeof(patchGameRestoreSaveSci21));
+
if (doRestore)
patchPtr[2] = 0x78; // push1
+
+ if (g_sci->isBE()) {
+ // LE -> BE
+ patchPtr[10] = 0x00;
+ patchPtr[11] = 0x08;
+ }
+
patchPtr[9] = id;
}
@@ -627,11 +644,11 @@ void SciEngine::initGraphics() {
// SCI32 graphic objects creation
_gfxCoordAdjuster = new GfxCoordAdjuster32(_gamestate->_segMan);
_gfxCursor->init(_gfxCoordAdjuster, _eventMan);
- _gfxCompare = new GfxCompare(_gamestate->_segMan, _kernel, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
- _gfxPaint32 = new GfxPaint32(_resMan, _gamestate->_segMan, _kernel, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette);
+ _gfxCompare = new GfxCompare(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
+ _gfxPaint32 = new GfxPaint32(_resMan, _gfxCoordAdjuster, _gfxScreen, _gfxPalette);
_gfxPaint = _gfxPaint32;
_gfxText32 = new GfxText32(_gamestate->_segMan, _gfxCache, _gfxScreen);
- _gfxControls32 = new GfxControls32(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxText32);
+ _gfxControls32 = new GfxControls32(_gamestate->_segMan, _gfxCache, _gfxText32);
_robotDecoder = new RobotDecoder(getPlatform() == Common::kPlatformMacintosh);
_gfxFrameout = new GfxFrameout(_gamestate->_segMan, _resMan, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32);
} else {
@@ -640,24 +657,24 @@ void SciEngine::initGraphics() {
_gfxPorts = new GfxPorts(_gamestate->_segMan, _gfxScreen);
_gfxCoordAdjuster = new GfxCoordAdjuster16(_gfxPorts);
_gfxCursor->init(_gfxCoordAdjuster, _eventMan);
- _gfxCompare = new GfxCompare(_gamestate->_segMan, _kernel, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
+ _gfxCompare = new GfxCompare(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxCoordAdjuster);
_gfxTransitions = new GfxTransitions(_gfxScreen, _gfxPalette);
- _gfxPaint16 = new GfxPaint16(_resMan, _gamestate->_segMan, _kernel, _gfxCache, _gfxPorts, _gfxCoordAdjuster, _gfxScreen, _gfxPalette, _gfxTransitions, _audio);
+ _gfxPaint16 = new GfxPaint16(_resMan, _gamestate->_segMan, _gfxCache, _gfxPorts, _gfxCoordAdjuster, _gfxScreen, _gfxPalette, _gfxTransitions, _audio);
_gfxPaint = _gfxPaint16;
_gfxAnimate = new GfxAnimate(_gamestate, _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen, _gfxPalette, _gfxCursor, _gfxTransitions);
- _gfxText16 = new GfxText16(_resMan, _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen);
+ _gfxText16 = new GfxText16(_gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen);
_gfxControls16 = new GfxControls16(_gamestate->_segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen);
_gfxMenu = new GfxMenu(_eventMan, _gamestate->_segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen, _gfxCursor);
_gfxMenu->reset();
-#ifdef ENABLE_SCI32
- }
-#endif
- if (_gfxPorts) {
_gfxPorts->init(_features->usesOldGfxFunctions(), _gfxPaint16, _gfxText16);
_gfxPaint16->init(_gfxAnimate, _gfxText16);
+
+#ifdef ENABLE_SCI32
}
+#endif
+
// Set default (EGA, amiga or resource 999) palette
_gfxPalette->setDefault();
}
@@ -699,9 +716,11 @@ void SciEngine::runGame() {
patchGameSaveRestore();
setLauncherLanguage();
_gamestate->gameIsRestarting = GAMEISRESTARTING_RESTART;
+ _gamestate->_throttleLastTime = 0;
if (_gfxMenu)
_gfxMenu->reset();
_gamestate->abortScriptProcessing = kAbortNone;
+ _gamestate->_syncedAudioOptions = false;
} else if (_gamestate->abortScriptProcessing == kAbortLoadGame) {
_gamestate->abortScriptProcessing = kAbortNone;
_gamestate->_executionStack.clear();
@@ -713,6 +732,7 @@ void SciEngine::runGame() {
syncSoundSettings();
syncIngameAudioOptions();
+ // Games do not set their audio settings when loading
} else {
break; // exit loop
}
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 3441e26c01..3b9844b326 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -110,6 +110,7 @@ enum SciGameId {
GID_ASTROCHICKEN,
GID_CAMELOT,
GID_CASTLEBRAIN,
+ GID_CHEST,
GID_CHRISTMAS1988,
GID_CHRISTMAS1990,
GID_CHRISTMAS1992,
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index 528bb51393..8f405b0fa5 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -324,7 +324,10 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32
// Calculate samplelen from WAVE header
int waveSize = 0, waveRate = 0;
byte waveFlags = 0;
- Audio::loadWAVFromStream(*waveStream, waveSize, waveRate, waveFlags);
+ bool ret = Audio::loadWAVFromStream(*waveStream, waveSize, waveRate, waveFlags);
+ if (!ret)
+ error("Failed to load WAV from stream");
+
*sampleLen = (waveFlags & Audio::FLAG_16BITS ? waveSize >> 1 : waveSize) * 60 / waveRate;
waveStream->seek(0, SEEK_SET);
@@ -336,7 +339,10 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32
// Calculate samplelen from AIFF header
int waveSize = 0, waveRate = 0;
byte waveFlags = 0;
- Audio::loadAIFFFromStream(*waveStream, waveSize, waveRate, waveFlags);
+ bool ret = Audio::loadAIFFFromStream(*waveStream, waveSize, waveRate, waveFlags);
+ if (!ret)
+ error("Failed to load AIFF from stream");
+
*sampleLen = (waveFlags & Audio::FLAG_16BITS ? waveSize >> 1 : waveSize) * 60 / waveRate;
waveStream->seek(0, SEEK_SET);
@@ -347,6 +353,9 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32
Common::SeekableReadStream *sndStream = new Common::MemoryReadStream(audioRes->data, audioRes->size, DisposeAfterUse::NO);
audioSeekStream = Audio::makeMacSndStream(sndStream, DisposeAfterUse::YES);
+ if (!audioSeekStream)
+ error("Failed to load Mac sound stream");
+
} else {
// SCI1 raw audio
size = audioRes->size;
diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp
index 191e13db0a..3229fd7071 100644
--- a/engines/sci/sound/drivers/adlib.cpp
+++ b/engines/sci/sound/drivers/adlib.cpp
@@ -512,7 +512,7 @@ int MidiDriver_AdLib::findVoiceBasic(int channel) {
}
if (voice == -1) {
- if (oldestVoice != -1) {
+ if (oldestVoice >= 0) {
voiceOff(oldestVoice);
voice = oldestVoice;
} else {
@@ -550,7 +550,7 @@ int MidiDriver_AdLib::findVoice(int channel) {
}
if (voice == -1) {
- if (oldestVoice != -1) {
+ if (oldestVoice >= 0) {
voiceOff(oldestVoice);
voice = oldestVoice;
} else {
diff --git a/engines/sci/sound/drivers/cms.cpp b/engines/sci/sound/drivers/cms.cpp
index dbcbf3d431..fd60863177 100644
--- a/engines/sci/sound/drivers/cms.cpp
+++ b/engines/sci/sound/drivers/cms.cpp
@@ -422,7 +422,7 @@ int MidiDriver_CMS::findVoiceBasic(int channel) {
}
if (voice == -1) {
- if (oldestVoice != -1) {
+ if (oldestVoice >= 0) {
voiceOff(oldestVoice);
voice = oldestVoice;
} else {
diff --git a/engines/sci/sound/drivers/fb01.cpp b/engines/sci/sound/drivers/fb01.cpp
index 9f3945bbec..b16473e62e 100644
--- a/engines/sci/sound/drivers/fb01.cpp
+++ b/engines/sci/sound/drivers/fb01.cpp
@@ -250,7 +250,7 @@ int MidiPlayer_Fb01::findVoice(int channel) {
}
if (voice == -1) {
- if (oldestVoice != -1) {
+ if (oldestVoice >= 0) {
voiceOff(oldestVoice);
voice = oldestVoice;
} else {
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 37eb37b292..a31d5f9a81 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;
@@ -922,7 +913,8 @@ int MidiPlayer_Midi::open(ResourceManager *resMan) {
if (res) {
if (isMt32GmPatch(res->data, res->size)) {
readMt32GmPatch(res->data, res->size);
- strncpy((char *)_goodbyeMsg, " ScummVM ", 20);
+ // Note that _goodbyeMsg is not zero-terminated
+ memcpy(_goodbyeMsg, " ScummVM ", 20);
} else {
readMt32Patch(res->data, res->size);
}
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 4e54797960..9546b1503f 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -251,15 +251,14 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
if (curChannel != 0xF)
containsMidiData = true;
- if (command != kEndOfTrack) {
- // Write delta
- while (delta > 240) {
- *outData++ = 0xF8;
- delta -= 240;
- }
- *outData++ = (byte)delta;
- delta = 0;
+ // Write delta
+ while (delta > 240) {
+ *outData++ = 0xF8;
+ delta -= 240;
}
+ *outData++ = (byte)delta;
+ delta = 0;
+
// Write command
switch (command) {
case 0xF0: // sysEx
@@ -302,7 +301,7 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
}
// Insert stop event
- *outData++ = 0; // Delta
+ // (Delta is already output above)
*outData++ = 0xFF; // Meta event
*outData++ = 0x2F; // End of track (EOT)
*outData++ = 0x00;
@@ -532,8 +531,11 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
// Check if the hold ID marker is the same as the hold ID
// marker set for that song by cmdSetSoundHold.
// If it is, loop back, but don't stop notes when jumping.
- if (info.basic.param2 == _pSnd->hold)
+ if (info.basic.param2 == _pSnd->hold) {
+ uint32 extraDelta = info.delta;
jumpToTick(_loopTick, false, false);
+ _nextEvent.delta += extraDelta;
+ }
break;
case kUpdateCue:
_dataincAdd = true;
@@ -636,7 +638,9 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
// treats this case as an infinite loop (bug #3311911).
if (_pSnd->loop || _pSnd->hold > 0) {
// We need to play it again...
+ uint32 extraDelta = info.delta;
jumpToTick(_loopTick);
+ _nextEvent.delta += extraDelta;
} else {
_pSnd->status = kSoundStopped;
_pSnd->setSignal(SIGNAL_OFFSET);
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 5d32f40f18..b0102a002b 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
@@ -189,6 +189,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 +259,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);
}
@@ -340,6 +344,12 @@ reg_t SoundCommandParser::kDoSoundMasterVolume(int argc, reg_t *argv, reg_t acc)
reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
reg_t obj = argv[0];
+ // The object can be null in several SCI0 games (e.g. Camelot, KQ1, KQ4, MUMG).
+ // Check bugs #3035149, #3036942 and #3578335.
+ // In this case, we just ignore the call.
+ if (obj.isNull() && argc == 1)
+ return acc;
+
MusicEntry *musicSlot = _music->getSlot(obj);
if (!musicSlot) {
debugC(kDebugLevelSound, "kDoSound(fade): Slot not found (%04x:%04x)", PRINT_REG(obj));
@@ -367,44 +377,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, so fix the value (refer to workarounds.cpp)
+ 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;
@@ -435,7 +428,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;
@@ -495,12 +488,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) {
@@ -509,6 +505,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);
@@ -532,17 +530,21 @@ void SoundCommandParser::processUpdateCues(reg_t obj) {
}
reg_t SoundCommandParser::kDoSoundSendMidi(int argc, reg_t *argv, reg_t acc) {
+ // The 4 parameter variant of this call is used in at least LSL1VGA, room
+ // 110 (Lefty's bar), to distort the music when Larry is drunk and stands
+ // up - bug #3614447.
reg_t obj = argv[0];
byte channel = argv[1].toUint16() & 0xf;
- byte midiCmd = argv[2].toUint16() & 0xff;
+ byte midiCmd = (argc == 5) ? argv[2].toUint16() & 0xff : 0xB0; // 0xB0: controller
+ uint16 controller = (argc == 5) ? argv[3].toUint16() : argv[2].toUint16();
+ uint16 param = (argc == 5) ? argv[4].toUint16() : argv[3].toUint16();
- // TODO: first there is a 4-parameter variant of this call which needs to get reversed
- // second the current code isn't 100% accurate, sierra sci does checks on the 4th parameter
- if (argc == 4)
- return acc;
-
- uint16 controller = argv[3].toUint16();
- uint16 param = argv[4].toUint16();
+ if (argc == 4 && controller == 0xFF) {
+ midiCmd = 0xE0; // 0xE0: pitch wheel
+ uint16 pitch = CLIP<uint16>(argv[3].toSint16() + 0x2000, 0x0000, 0x3FFF);
+ controller = pitch & 0x7F;
+ param = pitch >> 7;
+ }
debugC(kDebugLevelSound, "kDoSound(sendMidi): %04x:%04x, %d, %d, %d, %d", PRINT_REG(obj), channel, midiCmd, controller, param);
if (channel)
@@ -739,7 +741,7 @@ void SoundCommandParser::updateSci0Cues() {
}
if (noOnePlaying && pWaitingForPlay) {
- // If there is a queued entry, play it now ffs: SciMusic::soundPlay()
+ // If there is a queued entry, play it now - check SciMusic::soundPlay()
pWaitingForPlay->isQueued = false;
_music->soundPlay(pWaitingForPlay);
}
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 0c375efcdd..5c148a7b57 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1880,7 +1880,7 @@ bool Actor::actorHitTest(int x, int y) {
#endif
void Actor::startAnimActor(int f) {
- if (_vm->_game.version >= 7 && !((_vm->_game.id == GID_FT) && (_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (_vm->_game.version >= 7 && !((_vm->_game.id == GID_FT) && (_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
switch (f) {
case 1001:
f = _initFrame;
@@ -1968,7 +1968,7 @@ void Actor_v0::startAnimActor(int f) {
void Actor::animateActor(int anim) {
int cmd, dir;
- if (_vm->_game.version >= 7 && !((_vm->_game.id == GID_FT) && (_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (_vm->_game.version >= 7 && !((_vm->_game.id == GID_FT) && (_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
if (anim == 0xFF)
anim = 2000;
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index dc5acbdb7d..9b6dd1e687 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -741,10 +741,6 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
"Silence", "Shaping", "Unmaking",
"Transcendence"
};
- int odds[] = {
- 15162, 15676, 16190, 64, 16961, 17475, 17989, 18503,
- 73, 19274, 76, 77, 20302, 20816, 21330, 84
- };
const char *notes = "cdefgabC";
int i, base, draft;
@@ -754,9 +750,9 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
return true;
}
- // There are 16 drafts, stored from variable 50 or 100 and upwards.
- // Each draft occupies two variables. Even-numbered variables contain
- // the notes for each draft, and a number of flags:
+ // There are 16 drafts, stored from variable 50, 55 or 100 and upwards.
+ // Each draft occupies two variables, the first of which contains the
+ // notes for the draft and a number of flags.
//
// +---+---+---+---+-----+-----+-----+-----+
// | A | B | C | D | 444 | 333 | 222 | 111 |
@@ -771,13 +767,16 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
// 222 The second note
// 111 The first note
//
- // I don't yet know what the odd-numbered variables are used for.
- // Possibly they store information on where and/or how the draft can
- // be used. They appear to remain constant throughout the game.
+ // I don't yet know what the second variable is used for. Possibly to
+ // store information on where and/or how the draft can be used. They
+ // appear to remain constant throughout the game.
if (_vm->_game.version == 4 || _vm->_game.platform == Common::kPlatformPCEngine) {
// DOS CD version / PC-Engine version
base = 100;
+ } else if (_vm->_game.platform == Common::kPlatformMacintosh) {
+ // Macintosh version
+ base = 55;
} else {
// All (?) other versions
base = 50;
@@ -801,28 +800,13 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
DebugPrintf("Learned all drafts and notes.\n");
return true;
}
-
- // During the testing of EGA Loom we had some trouble with the
- // drafts data structure being overwritten. I don't expect
- // this command is particularly useful any more, but it will
- // attempt to repair the (probably) static part of it.
-
- if (strcmp(argv[1], "fix") == 0) {
- for (i = 0; i < 16; i++)
- _vm->_scummVars[base + 2 * i + 1] = odds[i];
- DebugPrintf(
- "An attempt has been made to repair\n"
- "the internal drafts data structure.\n"
- "Continue on your own risk.\n");
- return true;
- }
}
// Probably the most useful command for ordinary use: list the drafts.
for (i = 0; i < 16; i++) {
draft = _vm->_scummVars[base + i * 2];
- DebugPrintf("%d %-13s %c%c%c%c %c%c %5d %c\n",
+ DebugPrintf("%d %-13s %c%c%c%c %c%c\n",
base + 2 * i,
names[i],
notes[draft & 0x0007],
@@ -830,9 +814,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
notes[(draft & 0x01c0) >> 6],
notes[(draft & 0x0e00) >> 9],
(draft & 0x2000) ? 'K' : ' ',
- (draft & 0x4000) ? 'U' : ' ',
- _vm->_scummVars[base + 2 * i + 1],
- (_vm->_scummVars[base + 2 * i + 1] != odds[i]) ? '!' : ' ');
+ (draft & 0x4000) ? 'U' : ' ');
}
return true;
diff --git a/engines/scumm/debugger.h b/engines/scumm/debugger.h
index a9b340d691..b60a1a2f03 100644
--- a/engines/scumm/debugger.h
+++ b/engines/scumm/debugger.h
@@ -35,7 +35,6 @@ public:
private:
ScummEngine *_vm;
- bool _old_soundsPaused;
// Commands
bool Cmd_Room(int argc, const char **argv);
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index e5c3023380..170ca0993c 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -963,7 +963,7 @@ static Common::String generatePreferredTarget(const DetectorResult &x) {
}
// Append the platform, if a non-standard one has been specified.
- if (x.game.platform != Common::kPlatformPC && x.game.platform != Common::kPlatformUnknown) {
+ if (x.game.platform != Common::kPlatformDOS && x.game.platform != Common::kPlatformUnknown) {
// HACK: For CoMI, it's pointless to encode the fact that it's for Windows
if (x.game.id != GID_CMI)
res = res + "-" + Common::getPlatformAbbrev(x.game.platform);
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 3120017db6..cb807997e9 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -205,11 +205,11 @@ static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = {
static const GameSettings gameVariantsTable[] = {
{"maniac", "Apple II", 0, GID_MANIAC, 0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"maniac", "C64", 0, GID_MANIAC, 0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI) },
- {"maniac", "V1", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
- {"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"maniac", "V1", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"maniac", "NES", 0, GID_MANIAC, 1, 0, MDT_NONE, 0, Common::kPlatformNES, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_NOASPECT)},
{"maniac", "V2", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
- {"maniac", "V2 Demo", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"maniac", "V2 Demo", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"zak", "V1", "v1", GID_ZAK, 1, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"zak", "V2", "v2", GID_ZAK, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
@@ -220,7 +220,7 @@ static const GameSettings gameVariantsTable[] = {
{"indy3", "EGA", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
- {"indy3", "VGA", "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"indy3", "VGA", "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"indy3", "FM-TOWNS", 0, GID_INDY3, 3, 0, MDT_TOWNS, GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
{"loom", "EGA", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
@@ -229,14 +229,14 @@ static const GameSettings gameVariantsTable[] = {
{"loom", "PC-Engine", 0, GID_LOOM, 3, 0, MDT_NONE, GF_AUDIOTRACKS | GF_OLD256 | GF_16BIT_COLOR, Common::kPlatformPCEngine, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
#endif
{"loom", "FM-TOWNS", 0, GID_LOOM, 3, 0, MDT_TOWNS, GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
- {"loom", "VGA", "vga", GID_LOOM, 4, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"loom", "VGA", "vga", GID_LOOM, 4, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
- {"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"monkey", "VGA", "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
- {"monkey", "EGA", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR, Common::kPlatformPC, GUIO1(GUIO_NOSPEECH)},
+ {"monkey", "EGA", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR, Common::kPlatformDOS, GUIO1(GUIO_NOSPEECH)},
{"monkey", "No AdLib", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR, GF_16COLOR, Common::kPlatformAtariST, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
- {"monkey", "Demo", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformPC, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"monkey", "Demo", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"monkey", "CD", 0, GID_MONKEY, 5, 0, MDT_ADLIB, GF_AUDIOTRACKS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"monkey", "FM-TOWNS", 0, GID_MONKEY, 5, 0, MDT_TOWNS, GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
{"monkey", "SEGA", 0, GID_MONKEY, 5, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
@@ -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/animation_he.h b/engines/scumm/he/animation_he.h
index 7fa31a195d..e17c1b9a39 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -55,7 +55,6 @@ private:
Video::VideoDecoder *_video;
- char baseName[40];
uint32 _flags;
uint32 _wizResNum;
};
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index fc5e4bcdf0..a674288775 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -628,7 +628,6 @@ public:
void parseEvents();
- bool _quit;
OSystem *_syst;
GameSettings _game;
diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp
index b405d634a4..ea990ca86b 100644
--- a/engines/scumm/he/logic/football.cpp
+++ b/engines/scumm/he/logic/football.cpp
@@ -218,10 +218,10 @@ int LogicHEfootball::nextPoint(int32 *args) {
if (res >= (double)args[6]) {
var8 = (double)args[6] * var8 / res;
var10 = (double)args[6] * var10 / res;
- res = (double)args[6] * var6 / res;
+ var6 = (double)args[6] * var6 / res;
}
- writeScummVar(108, (int32)res);
+ writeScummVar(108, (int32)var6);
writeScummVar(109, (int32)var10);
writeScummVar(110, (int32)var8);
@@ -297,6 +297,15 @@ private:
int initScreenTranslations();
int getPlaybookFiles(int32 *args);
int largestFreeBlock();
+
+ float _var0;
+ float _var1;
+ float _var2;
+ float _var3;
+ float _var4;
+ float _angle;
+ int32 _maxX;
+ int32 _minX;
};
int32 LogicHEfootball2002::dispatch(int op, int numArgs, int32 *args) {
@@ -325,8 +334,16 @@ int32 LogicHEfootball2002::dispatch(int op, int numArgs, int32 *args) {
res = 1;
break;
+ case 1030:
+ // Get Computer Name (online play only)
+ break;
+
+ case 1515:
+ // Initialize Session (online play only)
+ break;
+
case 1516:
- // Start auto LAN game
+ // Start auto LAN game (online play only)
break;
default:
@@ -338,13 +355,74 @@ int32 LogicHEfootball2002::dispatch(int op, int numArgs, int32 *args) {
}
int LogicHEfootball2002::translateWorldToScreen(int32 *args) {
- // TODO: Implement modified 2002 version
- return LogicHEfootball::translateWorldToScreen(args);
+ // While this performs the same task as football's 1006 opcode,
+ // the implementation is different. Note that this is also the
+ // same as basketball's 1006 opcode with different constants!
+
+ double v9;
+ if (args[1] >= _minX) {
+ if (args[1] < _maxX) {
+ v9 = (sqrt(_var1 + args[1]) - sqrt(_var1)) / sqrt(_var0);
+ } else {
+ double v10 = sqrt(_var0 * (_maxX + _var1));
+ v9 = 1.0 / (v10 + v10) * (args[1] - _maxX) + 451.0;
+ }
+ } else {
+ double v8 = sqrt(_var0 * (_minX + _var1));
+ v9 = 1.0 / (v8 + v8) * (args[1] - _minX) - 29.0;
+ }
+
+ double v11 = tan(_angle);
+ double v12, v13;
+
+ if (v9 >= -29.0) {
+ if (v9 >= 451.0) {
+ v12 = 1517.0 - (451.0 / v11 + 451.0 / v11);
+ v13 = tan(1.570796326794895 - _angle) * 451.0;
+ } else {
+ v12 = 1517.0 - (v9 / v11 + v9 / v11);
+ v13 = tan(1.570796326794895 - _angle) * v9;
+ }
+ } else {
+ v12 = 1517.0 - (-29.0 / v11 + -29.0 / v11);
+ v13 = tan(1.570796326794895 - _angle) * -29.0;
+ }
+
+ writeScummVar(108, scummRound(v12 * args[0] / 12200.0 + v13 + 41.0));
+ writeScummVar(109, scummRound(611.0 - v9 - v12 * args[2] / 12200.0));
+
+ return 1;
}
int LogicHEfootball2002::translateScreenToWorld(int32 *args) {
- // TODO: Implement modified 2002 version
- return LogicHEfootball::translateScreenToWorld(args);
+ // While this performs the same task as football's 1010 opcode,
+ // the implementation is different. Note that this is also the
+ // same as basketball's 1010 opcode with different constants!
+
+ double v15 = 611.0 - args[1];
+ double v5 = tan(_angle);
+ double v4, v6, v7;
+
+ if (v15 >= -29.0) {
+ if (v15 >= 451.0) {
+ v4 = (_var2 * 902.0 + _var3) * (v15 - 451.0) + _maxX;
+ v6 = 1517.0 - (451.0 / v5 + 451.0 / v5);
+ v7 = tan(1.570796326794895 - _angle) * 451.0;
+ } else {
+ v4 = (v15 * _var2 + _var3) * v15 + _var4;
+ v6 = 1517.0 - (v15 / v5 + v15 / v5);
+ v7 = tan(1.570796326794895 - _angle) * v15;
+ }
+ } else {
+ v4 = (_var3 - _var2 * 58.0) * (v15 - -29.0) + _minX;
+ v6 = 1517.0 - (-29.0 / v5 + -29.0 / v5);
+ v7 = tan(1.570796326794895 - _angle) * -29.0;
+ }
+
+ writeScummVar(108, scummRound((args[0] - (v7 + 41.0)) * (12200.0 / v6)));
+ writeScummVar(109, scummRound(v4));
+
+ return 1;
}
int LogicHEfootball2002::getDayOfWeek() {
@@ -358,7 +436,14 @@ int LogicHEfootball2002::getDayOfWeek() {
}
int LogicHEfootball2002::initScreenTranslations() {
- // TODO: Set values used by translateWorldToScreen/translateScreenToWorld
+ // Set values used by translateWorldToScreen/translateScreenToWorld
+ _var0 = _var2 = 0.0029172597f;
+ _var1 = 4896.3755f;
+ _var3 = 7.5588355f;
+ _var4 = 0.0f;
+ _angle = (float)atan(2.899280575539569);
+ _maxX = 4002;
+ _minX = -217;
return 1;
}
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index a2eb42214b..b024154c7f 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -2237,7 +2237,10 @@ void ScummEngine_v100he::o100_videoOps() {
switch (subOp) {
case 0:
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
+ _videoParams.status = 0;
+ _videoParams.flags = 0;
_videoParams.unk2 = pop();
+ _videoParams.wizResNum = 0;
break;
case 19:
_videoParams.status = 19;
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 5e359385b6..bbd8725904 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -804,7 +804,7 @@ void ScummEngine_v60he::o60_readFile() {
int val;
// Fatty Bear uses positive values
- if (_game.platform == Common::kPlatformPC && _game.id == GID_FBEAR)
+ if (_game.platform == Common::kPlatformDOS && _game.id == GID_FBEAR)
size = -size;
assert(_hInFileTable[slot]);
@@ -834,7 +834,7 @@ void ScummEngine_v60he::o60_writeFile() {
int slot = pop();
// Fatty Bear uses positive values
- if (_game.platform == Common::kPlatformPC && _game.id == GID_FBEAR)
+ if (_game.platform == Common::kPlatformDOS && _game.id == GID_FBEAR)
size = -size;
assert(_hOutFileTable[slot]);
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/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 798f703db6..ca360803bd 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1548,12 +1548,18 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int
if (rScreen.intersects(clip)) {
rScreen.clip(clip);
} else {
+ if (flags & kWIFBlitToMemBuffer)
+ free(dst);
+
return 0;
}
} else if (_rectOverrideEnabled) {
if (rScreen.intersects(_rectOverride)) {
rScreen.clip(_rectOverride);
} else {
+ if (flags & kWIFBlitToMemBuffer)
+ free(dst);
+
return 0;
}
}
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 016ba89e7b..12ebfef9b7 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -46,7 +46,6 @@ namespace Scumm {
IMuseInternal::IMuseInternal() :
_native_mt32(false),
_enable_gs(false),
- _sc55(false),
_midi_adlib(NULL),
_midi_native(NULL),
_sysex(NULL),
@@ -363,7 +362,7 @@ void IMuseInternal::pause(bool paused) {
_paused = paused;
}
-int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
+int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm, bool fixAfterLoad) {
Common::StackLock lock(_mutex, "IMuseInternal::save_or_load()");
const SaveLoadEntry mainEntries[] = {
MKLINE(IMuseInternal, _queue_end, sleUint8, VER(8)),
@@ -440,7 +439,16 @@ int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
for (i = 0; i < 8; ++i)
ser->saveLoadEntries(0, volumeFaderEntries);
- if (ser->isLoading()) {
+ // Normally, we have to fix up the data structures after loading a
+ // saved game. But there are cases where we don't. For instance, The
+ // Macintosh version of Monkey Island 1 used to convert the Mac0 music
+ // resources to General MIDI and play it through iMUSE as a rough
+ // approximation. Now it has its own player, but old savegame still
+ // have the iMUSE data in them. We have to skip that data, using a
+ // dummy iMUSE object, but since the resource is no longer recognizable
+ // to iMUSE, the fixup fails hard. So yes, this is a bit of a hack.
+
+ if (ser->isLoading() && fixAfterLoad) {
// Load all sounds that we need
fix_players_after_load(scumm);
fix_parts_after_load();
@@ -486,12 +494,9 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
case IMuse::PROP_GS:
_enable_gs = (value > 0);
- // If True Roland MT-32 is not selected, run in GM or GS mode.
- // If it is selected, change the Roland GS synth to MT-32 mode.
- if (_midi_native && !_native_mt32)
- initGM(_midi_native);
- else if (_midi_native && _native_mt32 && _enable_gs) {
- _sc55 = true;
+ // GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
+ if (_midi_native && _enable_gs) {
+ _native_mt32 = true;
initGM(_midi_native);
}
break;
@@ -1490,7 +1495,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
if (_enable_gs) {
// All GS devices recognize the GS Reset command,
- // even with Roland's ID. It is impractical to
+ // even using Roland's ID. It is impractical to
// support other manufacturers' devices for
// further GS settings, as there are limitless
// numbers of them out there that would each
@@ -1504,30 +1509,28 @@ void IMuseInternal::initGM(MidiDriver *midi) {
midi->sysEx(buffer, 9);
debug(2, "GS SysEx: GS Reset");
_system->delayMillis(200);
+
+ // Set global Master Tune to 442.0kHz, as on the MT-32
+ memcpy(&buffer[4], "\x40\x00\x00\x00\x04\x04\x0F\x29", 8);
+ midi->sysEx(buffer, 12);
+ debug(2, "GS SysEx: Master Tune set to 442.0kHz");
- if (_sc55) {
- // This mode is for GS devices that support an MT-32-compatible
- // Map, such as the Roland Sound Canvas line of modules. It
- // will allow them to work with True MT-32 mode, but will
- // obviously still ignore MT-32 SysEx (and thus custom
- // instruments).
-
- // Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
- for (i = 0; i < 16; ++i) {
- midi->send((127 << 16) | (0 << 8) | (0xB0 | i));
- midi->send((1 << 16) | (32 << 8) | (0xB0 | i));
- midi->send((0 << 16) | (0 << 8) | (0xC0 | i));
- }
- debug(2, "GS Program Change: CM-64/32L Map Selected");
-
- // Set Percussion Channel to SC-55 Map (CC#32, 01H), then
- // Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
- midi->getPercussionChannel()->controlChange(0, 0);
- midi->getPercussionChannel()->controlChange(32, 1);
- midi->send(127 << 8 | 0xC0 | 9);
- debug(2, "GS Program Change: Drum Map is CM-64/32L");
+ // Note: All Roland GS devices support CM-64/32L maps
+ // Set Channels 1-16 to SC-55 Map, then CM-64/32L Variation
+ for (i = 0; i < 16; ++i) {
+ midi->send((127 << 16) | (0 << 8) | (0xB0 | i));
+ midi->send((1 << 16) | (32 << 8) | (0xB0 | i));
+ midi->send((0 << 16) | (0 << 8) | (0xC0 | i));
}
+ debug(2, "GS Program Change: CM-64/32L Map Selected");
+
+ // Set Percussion Channel to SC-55 Map (CC#32, 01H), then
+ // Switch Drum Map to CM-64/32L (MT-32 Compatible Drums)
+ midi->getPercussionChannel()->controlChange(0, 0);
+ midi->getPercussionChannel()->controlChange(32, 1);
+ midi->send(127 << 8 | 0xC0 | 9);
+ debug(2, "GS Program Change: Drum Map is CM-64/32L");
// Set Master Chorus to 0. The MT-32 has no chorus capability.
memcpy(&buffer[4], "\x40\x01\x3A\x00\x05", 5);
@@ -1732,10 +1735,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/imuse/imuse.h b/engines/scumm/imuse/imuse.h
index 23449e470b..cce5309229 100644
--- a/engines/scumm/imuse/imuse.h
+++ b/engines/scumm/imuse/imuse.h
@@ -62,7 +62,7 @@ public:
public:
virtual void on_timer(MidiDriver *midi) = 0;
virtual void pause(bool paused) = 0;
- virtual int save_or_load(Serializer *ser, ScummEngine *scumm) = 0;
+ virtual int save_or_load(Serializer *ser, ScummEngine *scumm, bool fixAfterLoad = true) = 0;
virtual bool get_sound_active(int sound) const = 0;
virtual int32 doCommand(int numargs, int args[]) = 0;
virtual int clear_queue() = 0;
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 846e2d7545..d17d4ed28b 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -390,7 +390,6 @@ class IMuseInternal : public IMuse {
protected:
bool _native_mt32;
bool _enable_gs;
- bool _sc55;
MidiDriver *_midi_adlib;
MidiDriver *_midi_native;
TimerCallbackInfo _timer_info_adlib;
@@ -518,7 +517,7 @@ protected:
public:
// IMuse interface
void pause(bool paused);
- int save_or_load(Serializer *ser, ScummEngine *scumm);
+ int save_or_load(Serializer *ser, ScummEngine *scumm, bool fixAfterLoad = true);
bool get_sound_active(int sound) const;
int32 doCommand(int numargs, int args[]);
uint32 property(int prop, uint32 value);
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 89c16a8bb5..5e928f3d44 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -111,8 +111,19 @@ void Part::saveLoadWithSerializer(Serializer *ser) {
}
void Part::set_detune(int8 detune) {
- _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
- sendPitchBend();
+ // Sam&Max does not have detune, so we just ignore this here. We still get
+ // this called, since Sam&Max uses the same controller for a different
+ // purpose.
+ if (_se->_game_id == GID_SAMNMAX) {
+#if 0
+ if (_mc) {
+ _mc->controlChange(17, detune + 0x40);
+ }
+#endif
+ } else {
+ _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
+ sendPitchBend();
+ }
}
void Part::pitchBend(int16 value) {
diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index eb3717494f..a737539c44 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -275,9 +275,12 @@ void IMuseDigital::callback() {
feedSize &= ~1;
if (channels == 2)
feedSize &= ~3;
- } else {
+ } else if (bits == 8) {
if (channels == 2)
feedSize &= ~1;
+ } else {
+ warning("IMuseDigita::callback: Unexpected sample width, %d bits", bits);
+ continue;
}
if (feedSize == 0)
diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index b8089ff226..44528e5bac 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -54,7 +54,7 @@ Insane::Insane(ScummEngine_v7 *scumm) {
initvars();
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
readFileToMem("roadrash.rip", &_smush_roadrashRip);
readFileToMem("roadrsh2.rip", &_smush_roadrsh2Rip);
readFileToMem("roadrsh3.rip", &_smush_roadrsh3Rip);
@@ -173,7 +173,7 @@ void Insane::initvars() {
_iactBits[i] = 0;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
init_enemyStruct(EN_ROTT1, EN_ROTT1, 0, 0, 60, 0, INV_MACE, 63, "endcrshr.san",
25, 15, 16, 26, 13, 3);
} else {
@@ -356,7 +356,7 @@ void Insane::initvars() {
init_scenePropStruct(138, 57, 0, 59, 134, 0xFF, 0xFF, 0xFF, 0, 30, 0);
_actor[0].damage = 0;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
_actor[0].maxdamage = 60;
else
_actor[0].maxdamage = 80;
@@ -466,7 +466,7 @@ void Insane::init_enemyStruct(int n, int32 handler, int32 initializer,
_enemy[n].isEmpty = isEmpty;
_enemy[n].weapon = weapon;
_enemy[n].sound = sound;
- strncpy(_enemy[n].filename, filename, 20);
+ Common::strlcpy(_enemy[n].filename, filename, 20);
_enemy[n].costume4 = costume4;
_enemy[n].costume6 = costume6;
_enemy[n].costume5 = costume5;
@@ -632,7 +632,7 @@ void Insane::putActors() {
void Insane::readState() { // PATCH
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
_actor[0].inventory[INV_CHAIN] = 0;
_actor[0].inventory[INV_CHAINSAW] = 0;
_actor[0].inventory[INV_MACE] = 0;
@@ -801,7 +801,7 @@ void Insane::prepareScenePropScene(int32 scenePropNum, bool arg_4, bool arg_8) {
debugC(DEBUG_INSANE, "Insane::prepareScenePropScene(%d, %d, %d)", scenePropNum, arg_4, arg_8);
- if (((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) || !loadScenePropSounds(idx))
+ if (((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) || !loadScenePropSounds(idx))
return;
_actor[0].defunct = arg_4;
@@ -898,7 +898,7 @@ int32 Insane::weaponDamage(int32 actornum) {
}
void Insane::reinitActors() {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -966,7 +966,7 @@ void Insane::escapeKeyHandler() {
debugC(DEBUG_INSANE, "scene: %d", _currSceneId);
switch (_currSceneId) {
case 1:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
} else {
queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0, _continueFrame1, 1300);
@@ -979,7 +979,7 @@ void Insane::escapeKeyHandler() {
break;
case 2:
flu = &_fluConf[14 + _iactSceneId2];
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(4, 0, "tovista.san", 64, 0, 0, 0);
else
queueSceneSwitch(flu->sceneId, *flu->fluPtr, flu->filenamePtr, 64, 0,
@@ -1033,7 +1033,7 @@ void Insane::escapeKeyHandler() {
break;
case 8:
flu = &_fluConf[7 + _iactSceneId2];
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
else
queueSceneSwitch(flu->sceneId, *flu->fluPtr, flu->filenamePtr, 64, 0,
@@ -1041,7 +1041,7 @@ void Insane::escapeKeyHandler() {
break;
case 7:
flu = &_fluConf[0 + _iactSceneId2];
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
else
queueSceneSwitch(flu->sceneId, *flu->fluPtr, flu->filenamePtr, 64, 0,
@@ -1060,7 +1060,7 @@ void Insane::escapeKeyHandler() {
queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0, _continueFrame1, 1300);
break;
case 13:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
else
queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0, _continueFrame, 1300);
@@ -1195,7 +1195,7 @@ void Insane::smlayer_setActorLayer(int actornum, int actnum, int layer) {
}
void Insane::smlayer_setFluPalette(byte *pal, int shut_flag) {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
return;
// if (shut_flag)
@@ -1311,7 +1311,7 @@ void Insane::procSKIP(int32 subSize, Common::SeekableReadStream &b) {
int16 par1, par2;
_player->_skipNext = false;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
assert(subSize >= 2);
par1 = b.readUint16LE();
par2 = 0;
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index 48aaab505a..a7fa72c417 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -125,7 +125,7 @@ int32 Insane::actionBen() {
bool doDamage = false;
int sound;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
sound = 59;
else
sound = 95;
@@ -558,7 +558,7 @@ void Insane::actor02Reaction(int32 buttons) {
_actor[0].weaponClass = 1;
_actor[0].act[2].state = 3;
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt);
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)))
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)))
smlayer_startSfx(63);
break;
case 3:
@@ -567,7 +567,7 @@ void Insane::actor02Reaction(int32 buttons) {
if (_actor[0].act[2].frame == 2) {
if (_currEnemy != EN_CAVEFISH) {
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(50);
} else {
@@ -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;
@@ -890,7 +890,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(52);
if (tmp == 1000)
@@ -1015,7 +1015,7 @@ void Insane::actor02Reaction(int32 buttons) {
smlayer_setActorFacing(0, 2, 19, 180);
_actor[0].act[2].state = 27;
_actor[0].act[2].tilt = calcTilt(_actor[0].tilt);
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)))
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)))
smlayer_startSfx(72);
break;
case 27:
@@ -1058,7 +1058,7 @@ void Insane::actor02Reaction(int32 buttons) {
case INV_BOOT:
case INV_DUST:
tmp = calcEnemyDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(58);
if (tmp == 1000)
@@ -1170,14 +1170,15 @@ 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))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(17));
else
smlayer_setActorCostume(0, 2, readArray(18));
@@ -1213,7 +1214,7 @@ void Insane::actor02Reaction(int32 buttons) {
smlayer_setActorLayer(0, 2, 25);
_actor[0].cursorX = 0;
_actor[0].kicking = false;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (_actor[0].act[2].frame >= 28) {
queueSceneSwitch(9, 0, "bencrshe.san", 64, 0, 0, 0);
_actor[0].act[2].state = 38;
@@ -1228,7 +1229,7 @@ void Insane::actor02Reaction(int32 buttons) {
case EN_ROTT1:
case EN_ROTT2:
case EN_ROTT3:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(9, 0, "bencrshe.san", 64, 0, 0, 0);
else
queueSceneSwitch(9, 0, "wr2_benr.san", 64, 0, 0, 0);
@@ -1901,7 +1902,7 @@ void Insane::switchBenWeapon() {
switch (_actor[0].weapon) {
case INV_CHAIN:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(19));
else
smlayer_setActorCostume(0, 2, readArray(20));
@@ -1910,7 +1911,7 @@ void Insane::switchBenWeapon() {
_actor[0].act[2].state = 34;
break;
case INV_CHAINSAW:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(23));
else
smlayer_setActorCostume(0, 2, readArray(24));
@@ -1919,7 +1920,7 @@ void Insane::switchBenWeapon() {
_actor[0].act[2].state = 34;
break;
case INV_MACE:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(22));
else
smlayer_setActorCostume(0, 2, readArray(23));
@@ -1928,7 +1929,7 @@ void Insane::switchBenWeapon() {
_actor[0].act[2].state = 34;
break;
case INV_2X4:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_setActorCostume(0, 2, readArray(18));
} else {
if (_currEnemy == EN_CAVEFISH)
@@ -1941,7 +1942,7 @@ void Insane::switchBenWeapon() {
_actor[0].act[2].state = 34;
break;
case INV_WRENCH:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(24));
else
smlayer_setActorCostume(0, 2, readArray(25));
@@ -1952,7 +1953,7 @@ void Insane::switchBenWeapon() {
case INV_BOOT:
case INV_HAND:
case INV_DUST:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(11));
else
smlayer_setActorCostume(0, 2, readArray(12));
@@ -2003,7 +2004,7 @@ int32 Insane::setBenState() {
void Insane::ouchSoundBen() {
_actor[0].act[3].state = 52;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_startVoice(54);
return;
}
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index 913f761f31..fa6d4264ec 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) {
@@ -1234,7 +1244,7 @@ void Insane::ouchSoundEnemy() {
_actor[1].act[3].state = 52;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_startVoice(55);
return;
}
@@ -1661,7 +1671,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].weaponClass = 1;
_actor[1].act[2].state = 3;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)))
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)))
smlayer_startSfx(63);
break;
case 3:
@@ -1669,7 +1679,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].weaponClass = 1;
if (_actor[1].act[2].frame >= 6) {
tmp = calcBenDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(50);
} else if (tmp == 1)
@@ -1841,7 +1851,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorFacing(1, 2, 19, 180);
_actor[1].act[2].state = 19;
_actor[1].act[2].tilt = calcTilt(_actor[1].tilt);
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
smlayer_startSfx(69);
if (!_actor[1].field_54) {
tmp = _vm->_rnd.getRandomNumber(4);
@@ -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:
@@ -1905,7 +1916,7 @@ void Insane::actor12Reaction(int32 buttons) {
case INV_2X4:
case INV_BOOT:
tmp = calcBenDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(52);
else if (tmp == 1000)
@@ -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);
@@ -2023,7 +2034,7 @@ void Insane::actor12Reaction(int32 buttons) {
_actor[1].kicking = true;
if (_actor[1].act[2].frame >= 3) {
tmp = calcBenDamage(1, 1);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
if (tmp == 1)
smlayer_startSfx(57);
} else if (tmp == 1)
@@ -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:
@@ -2079,7 +2088,7 @@ void Insane::actor12Reaction(int32 buttons) {
smlayer_setActorLayer(1, 2, 25);
_actor[1].act[2].state = 37;
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
smlayer_startSfx(96);
switch (_currEnemy) {
case EN_ROTT1:
@@ -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/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp
index 48c96b537c..9c395beea6 100644
--- a/engines/scumm/insane/insane_iact.cpp
+++ b/engines/scumm/insane/insane_iact.cpp
@@ -171,7 +171,7 @@ void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
}
void Insane::chooseEnemy() {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
_currEnemy = EN_ROTT1;
return;
}
diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp
index db0b0171bc..06d5d7ac68 100644
--- a/engines/scumm/insane/insane_scenes.cpp
+++ b/engines/scumm/insane/insane_scenes.cpp
@@ -61,7 +61,7 @@ void Insane::runScene(int arraynum) {
case 1:
initScene(1);
setupValues();
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(9));
else
smlayer_setActorCostume(0, 2, readArray(10));
@@ -70,14 +70,14 @@ void Insane::runScene(int arraynum) {
break;
case 2:
setupValues();
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_putActor(0, 2, _actor[0].x, _actor[0].y1 + 190, _smlayer_room2);
_mainRoadPos = readArray(2);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
initScene(5);
startVideo("tovista.san", 1, 32, 12, 0);
} else if (_mainRoadPos == _posBrokenTruck) {
@@ -93,7 +93,7 @@ void Insane::runScene(int arraynum) {
break;
case 3:
setupValues();
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
@@ -148,7 +148,7 @@ void Insane::runScene(int arraynum) {
_insaneIsRunning = false;
_player->insanity(false);
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
writeArray(50, _actor[0].inventory[INV_CHAIN]);
writeArray(51, _actor[0].inventory[INV_CHAINSAW]);
writeArray(52, _actor[0].inventory[INV_MACE]);
@@ -243,7 +243,7 @@ void Insane::stopSceneSounds(int sceneId) {
_actor[1].defunct = 0;
_actor[1].scenePropSubIdx = 0;
_actor[1].field_54 = 0;
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_stopSound(59);
smlayer_stopSound(63);
} else {
@@ -319,7 +319,7 @@ void Insane::shutCurrentScene() {
// insane_loadSceneData1 & insane_loadSceneData2
int Insane::loadSceneData(int scene, int flag, int phase) {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
return 1;
int retvalue = 1;
@@ -621,7 +621,7 @@ void Insane::setSceneCostumes(int sceneId) {
switch (sceneId) {
case 1:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(9));
else
smlayer_setActorCostume(0, 2, readArray(10));
@@ -634,7 +634,7 @@ void Insane::setSceneCostumes(int sceneId) {
setupValues();
return;
case 2:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(9));
else
smlayer_setActorCostume(0, 2, readArray(10));
@@ -653,7 +653,7 @@ void Insane::setSceneCostumes(int sceneId) {
case 4:
case 5:
case 6:
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
smlayer_setActorCostume(0, 2, readArray(10));
else
smlayer_setActorCostume(0, 2, readArray(11));
@@ -672,7 +672,7 @@ void Insane::setEnemyCostumes() {
debugC(DEBUG_INSANE, "setEnemyCostumes(%d)", _currEnemy);
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
smlayer_setActorCostume(0, 2, readArray(11));
smlayer_setActorCostume(0, 0, readArray(13));
smlayer_setActorCostume(0, 1, readArray(12));
@@ -1000,7 +1000,7 @@ void Insane::postCase11(byte *renderBitmap, int32 codecparam, int32 setupsan12,
if (_firstBattle) {
smush_setToFinish();
} else {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
else
queueSceneSwitch(1, _smush_minedrivFlu, "minedriv.san", 64, 0,
@@ -1096,7 +1096,7 @@ void Insane::postCase1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
if ((curFrame >= maxFrame) && !_needSceneSwitch) {
flu = &_fluConf[14 + _iactSceneId2];
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(4, 0, "tovista.san", 64, 0, 0, 0);
else
queueSceneSwitch(flu->sceneId, *flu->fluPtr, flu->filenamePtr, 64, 0,
@@ -1224,7 +1224,7 @@ void Insane::postCase6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
else
flu = &_fluConf[0 + _iactSceneId2];
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
else
queueSceneSwitch(flu->sceneId, *flu->fluPtr, flu->filenamePtr, 64, 0,
@@ -1243,7 +1243,7 @@ void Insane::postCase8(byte *renderBitmap, int32 codecparam, int32 setupsan12,
queueSceneSwitch(13, _smush_minefiteFlu, "minefite.san", 64, 0,
_continueFrame, 1300);
} else {
- if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)) {
+ if ((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)) {
queueSceneSwitch(1, 0, "minedriv.san", 64, 0, 0, 0);
} else {
if (_currSceneId == 23) {
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index 8499c9bad3..28884d7f78 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -36,6 +36,7 @@ MODULE_OBJS := \
object.o \
palette.o \
player_apple2.o \
+ player_mac.o \
player_mod.o \
player_nes.o \
player_pce.o \
@@ -47,7 +48,9 @@ MODULE_OBJS := \
player_v2base.o \
player_v2cms.o \
player_v3a.o \
+ player_v3m.o \
player_v4a.o \
+ player_v5m.o \
resource_v2.o \
resource_v3.o \
resource_v4.o \
diff --git a/engines/scumm/music.h b/engines/scumm/music.h
index a527c77b72..9fd14d830e 100644
--- a/engines/scumm/music.h
+++ b/engines/scumm/music.h
@@ -24,6 +24,7 @@
#define SCUMM_MUSIC_H
#include "common/scummsys.h"
+#include "engines/scumm/saveload.h"
namespace Scumm {
@@ -78,6 +79,11 @@ public:
* @return the music timer
*/
virtual int getMusicTimer() { return 0; }
+
+ /**
+ * Save or load the music state.
+ */
+ virtual void saveLoadWithSerializer(Serializer *ser) {}
};
} // End of namespace Scumm
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 77c75c4ad6..ed77a863cd 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -433,10 +433,14 @@ void ScummEngine::getObjectXYPos(int object, int &x, int &y, int &dir) {
y = od.y_pos + (int16)READ_LE_UINT16(&imhd->old.hotspot[state].y);
}
} else if (_game.version <= 2) {
- if (od.actordir) {
- x = od.walk_x;
- y = od.walk_y;
- } else {
+ x = od.walk_x;
+ y = od.walk_y;
+
+ // Adjust x, y when no actor direction is set, but only perform this
+ // adjustment for V0 games (e.g. MM C64), otherwise certain scenes in
+ // newer games are affected as well (e.g. the interior of the Shuttle
+ // Bus scene in Zak V2, where no actor is present). Refer to bug #3526089.
+ if (!od.actordir && _game.version == 0) {
x = od.x_pos + od.width / 2;
y = od.y_pos + od.height / 2;
}
diff --git a/engines/scumm/player_mac.cpp b/engines/scumm/player_mac.cpp
new file mode 100644
index 0000000000..c16c85bff3
--- /dev/null
+++ b/engines/scumm/player_mac.cpp
@@ -0,0 +1,415 @@
+/* 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/macresman.h"
+#include "common/translation.h"
+#include "engines/engine.h"
+#include "gui/message.h"
+#include "scumm/player_mac.h"
+#include "scumm/resource.h"
+#include "scumm/scumm.h"
+#include "scumm/imuse/imuse.h"
+
+namespace Scumm {
+
+Player_Mac::Player_Mac(ScummEngine *scumm, Audio::Mixer *mixer, int numberOfChannels, int channelMask, bool fadeNoteEnds)
+ : _vm(scumm),
+ _mixer(mixer),
+ _sampleRate(_mixer->getOutputRate()),
+ _soundPlaying(-1),
+ _numberOfChannels(numberOfChannels),
+ _channelMask(channelMask),
+ _fadeNoteEnds(fadeNoteEnds) {
+ assert(scumm);
+ assert(mixer);
+}
+
+void Player_Mac::init() {
+ _channel = new Player_Mac::Channel[_numberOfChannels];
+
+ int i;
+
+ for (i = 0; i < _numberOfChannels; i++) {
+ _channel[i]._looped = false;
+ _channel[i]._length = 0;
+ _channel[i]._data = NULL;
+ _channel[i]._pos = 0;
+ _channel[i]._pitchModifier = 0;
+ _channel[i]._velocity = 0;
+ _channel[i]._remaining = 0;
+ _channel[i]._notesLeft = false;
+ _channel[i]._instrument._data = NULL;
+ _channel[i]._instrument._size = 0;
+ _channel[i]._instrument._rate = 0;
+ _channel[i]._instrument._loopStart = 0;
+ _channel[i]._instrument._loopEnd = 0;
+ _channel[i]._instrument._baseFreq = 0;
+ _channel[i]._instrument._pos = 0;
+ _channel[i]._instrument._subPos = 0;
+ }
+
+ _pitchTable[116] = 1664510;
+ _pitchTable[117] = 1763487;
+ _pitchTable[118] = 1868350;
+ _pitchTable[119] = 1979447;
+ _pitchTable[120] = 2097152;
+ _pitchTable[121] = 2221855;
+ _pitchTable[122] = 2353973;
+ _pitchTable[123] = 2493948;
+ _pitchTable[124] = 2642246;
+ _pitchTable[125] = 2799362;
+ _pitchTable[126] = 2965820;
+ _pitchTable[127] = 3142177;
+ for (i = 115; i >= 0; --i) {
+ _pitchTable[i] = _pitchTable[i + 12] / 2;
+ }
+
+ setMusicVolume(255);
+
+ if (!checkMusicAvailable()) {
+ return;
+ }
+
+ _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
+}
+
+Player_Mac::~Player_Mac() {
+ Common::StackLock lock(_mutex);
+ _mixer->stopHandle(_soundHandle);
+ stopAllSounds_Internal();
+ delete[] _channel;
+}
+
+void Player_Mac::saveLoadWithSerializer(Serializer *ser) {
+ Common::StackLock lock(_mutex);
+ if (ser->getVersion() < VER(94)) {
+ if (_vm->_game.id == GID_MONKEY && ser->isLoading()) {
+ IMuse *dummyImuse = IMuse::create(_vm->_system, NULL, NULL);
+ dummyImuse->save_or_load(ser, _vm, false);
+ delete dummyImuse;
+ }
+ } else {
+ static const SaveLoadEntry musicEntries[] = {
+ MKLINE(Player_Mac, _sampleRate, sleUint32, VER(94)),
+ MKLINE(Player_Mac, _soundPlaying, sleInt16, VER(94)),
+ MKEND()
+ };
+
+ static const SaveLoadEntry channelEntries[] = {
+ MKLINE(Channel, _pos, sleUint16, VER(94)),
+ MKLINE(Channel, _pitchModifier, sleInt32, VER(94)),
+ MKLINE(Channel, _velocity, sleUint8, VER(94)),
+ MKLINE(Channel, _remaining, sleUint32, VER(94)),
+ MKLINE(Channel, _notesLeft, sleUint8, VER(94)),
+ MKEND()
+ };
+
+ static const SaveLoadEntry instrumentEntries[] = {
+ MKLINE(Instrument, _pos, sleUint32, VER(94)),
+ MKLINE(Instrument, _subPos, sleUint32, VER(94)),
+ MKEND()
+ };
+
+ uint32 mixerSampleRate = _sampleRate;
+ int i;
+
+ ser->saveLoadEntries(this, musicEntries);
+
+ if (ser->isLoading() && _soundPlaying != -1) {
+ const byte *ptr = _vm->getResourceAddress(rtSound, _soundPlaying);
+ assert(ptr);
+ loadMusic(ptr);
+ }
+
+ ser->saveLoadArrayOf(_channel, _numberOfChannels, sizeof(Channel), channelEntries);
+ for (i = 0; i < _numberOfChannels; i++) {
+ ser->saveLoadEntries(&_channel[i], instrumentEntries);
+ }
+
+ if (ser->isLoading()) {
+ // If necessary, adjust the channel data to fit the
+ // current sample rate.
+ if (_soundPlaying != -1 && _sampleRate != mixerSampleRate) {
+ double mult = (double)_sampleRate / (double)mixerSampleRate;
+ for (i = 0; i < _numberOfChannels; i++) {
+ _channel[i]._pitchModifier = (int)((double)_channel[i]._pitchModifier * mult);
+ _channel[i]._remaining = (int)((double)_channel[i]._remaining / mult);
+ }
+ }
+ _sampleRate = mixerSampleRate;
+ }
+ }
+}
+
+void Player_Mac::setMusicVolume(int vol) {
+ debug(5, "Player_Mac::setMusicVolume(%d)", vol);
+}
+
+void Player_Mac::stopAllSounds_Internal() {
+ if (_soundPlaying != -1) {
+ _vm->_res->unlock(rtSound, _soundPlaying);
+ }
+ _soundPlaying = -1;
+ for (int i = 0; i < _numberOfChannels; i++) {
+ // The channel data is managed by the resource manager, so
+ // don't delete that.
+ delete[] _channel[i]._instrument._data;
+ _channel[i]._instrument._data = NULL;
+
+ _channel[i]._remaining = 0;
+ _channel[i]._notesLeft = false;
+ }
+}
+
+void Player_Mac::stopAllSounds() {
+ Common::StackLock lock(_mutex);
+ debug(5, "Player_Mac::stopAllSounds()");
+ stopAllSounds_Internal();
+}
+
+void Player_Mac::stopSound(int nr) {
+ Common::StackLock lock(_mutex);
+ debug(5, "Player_Mac::stopSound(%d)", nr);
+
+ if (nr == _soundPlaying) {
+ stopAllSounds();
+ }
+}
+
+void Player_Mac::startSound(int nr) {
+ Common::StackLock lock(_mutex);
+ debug(5, "Player_Mac::startSound(%d)", nr);
+
+ stopAllSounds_Internal();
+
+ const byte *ptr = _vm->getResourceAddress(rtSound, nr);
+ assert(ptr);
+
+ if (!loadMusic(ptr)) {
+ return;
+ }
+
+ _vm->_res->lock(rtSound, nr);
+ _soundPlaying = nr;
+}
+
+bool Player_Mac::Channel::loadInstrument(Common::SeekableReadStream *stream) {
+ uint16 soundType = stream->readUint16BE();
+ if (soundType != 1) {
+ warning("Player_Mac::loadInstrument: Unsupported sound type %d", soundType);
+ return false;
+ }
+ uint16 typeCount = stream->readUint16BE();
+ if (typeCount != 1) {
+ warning("Player_Mac::loadInstrument: Unsupported data type count %d", typeCount);
+ return false;
+ }
+ uint16 dataType = stream->readUint16BE();
+ if (dataType != 5) {
+ warning("Player_Mac::loadInstrument: Unsupported data type %d", dataType);
+ return false;
+ }
+
+ stream->readUint32BE(); // initialization option
+
+ uint16 cmdCount = stream->readUint16BE();
+ if (cmdCount != 1) {
+ warning("Player_Mac::loadInstrument: Unsupported command count %d", cmdCount);
+ return false;
+ }
+ uint16 command = stream->readUint16BE();
+ if (command != 0x8050 && command != 0x8051) {
+ warning("Player_Mac::loadInstrument: Unsupported command 0x%04X", command);
+ return false;
+ }
+
+ stream->readUint16BE(); // 0
+ uint32 soundHeaderOffset = stream->readUint32BE();
+
+ stream->seek(soundHeaderOffset);
+
+ uint32 soundDataOffset = stream->readUint32BE();
+ uint32 size = stream->readUint32BE();
+ uint32 rate = stream->readUint32BE() >> 16;
+ uint32 loopStart = stream->readUint32BE();
+ uint32 loopEnd = stream->readUint32BE();
+ byte encoding = stream->readByte();
+ byte baseFreq = stream->readByte();
+
+ if (encoding != 0) {
+ warning("Player_Mac::loadInstrument: Unsupported encoding %d", encoding);
+ return false;
+ }
+
+ stream->skip(soundDataOffset);
+
+ byte *data = new byte[size];
+ stream->read(data, size);
+
+ _instrument._data = data;
+ _instrument._size = size;
+ _instrument._rate = rate;
+ _instrument._loopStart = loopStart;
+ _instrument._loopEnd = loopEnd;
+ _instrument._baseFreq = baseFreq;
+
+ return true;
+}
+
+int Player_Mac::getMusicTimer() {
+ return 0;
+}
+
+int Player_Mac::getSoundStatus(int nr) const {
+ return _soundPlaying == nr;
+}
+
+uint32 Player_Mac::durationToSamples(uint16 duration) {
+ // The correct formula should be:
+ //
+ // (duration * 473 * _sampleRate) / (4 * 480 * 480)
+ //
+ // But that's likely to cause integer overflow, so we do it in two
+ // steps and hope that the rounding error won't be noticeable.
+ //
+ // The original code is a bit unclear on if it should be 473 or 437,
+ // but since the comments indicated 473 I'm assuming 437 was a typo.
+ uint32 samples = (duration * _sampleRate) / (4 * 480);
+ samples = (samples * 473) / 480;
+ return samples;
+}
+
+int Player_Mac::noteToPitchModifier(byte note, Instrument *instrument) {
+ if (note > 0) {
+ const int pitchIdx = note + 60 - instrument->_baseFreq;
+ // I don't want to use floating-point arithmetics here, but I
+ // ran into overflow problems with the church music in Monkey
+ // Island. It's only once per note, so it should be ok.
+ double mult = (double)instrument->_rate / (double)_sampleRate;
+ return (int)(mult * _pitchTable[pitchIdx]);
+ } else {
+ return 0;
+ }
+}
+
+int Player_Mac::readBuffer(int16 *data, const int numSamples) {
+ Common::StackLock lock(_mutex);
+
+ memset(data, 0, numSamples * 2);
+ if (_soundPlaying == -1) {
+ return numSamples;
+ }
+
+ bool notesLeft = false;
+
+ for (int i = 0; i < _numberOfChannels; i++) {
+ if (!(_channelMask & (1 << i))) {
+ continue;
+ }
+
+ uint samplesLeft = numSamples;
+ int16 *ptr = data;
+
+ while (samplesLeft > 0) {
+ int generated;
+ if (_channel[i]._remaining == 0) {
+ uint32 samples;
+ int pitchModifier;
+ byte velocity;
+ if (getNextNote(i, samples, pitchModifier, velocity)) {
+ _channel[i]._remaining = samples;
+ _channel[i]._pitchModifier = pitchModifier;
+ _channel[i]._velocity = velocity;
+
+ } else {
+ _channel[i]._pitchModifier = 0;
+ _channel[i]._velocity = 0;
+ _channel[i]._remaining = samplesLeft;
+ }
+ }
+ generated = MIN<uint32>(_channel[i]._remaining, samplesLeft);
+ if (_channel[i]._velocity != 0) {
+ _channel[i]._instrument.generateSamples(ptr, _channel[i]._pitchModifier, _channel[i]._velocity, generated, _channel[i]._remaining, _fadeNoteEnds);
+ }
+ ptr += generated;
+ samplesLeft -= generated;
+ _channel[i]._remaining -= generated;
+ }
+
+ if (_channel[i]._notesLeft) {
+ notesLeft = true;
+ }
+ }
+
+ if (!notesLeft) {
+ stopAllSounds_Internal();
+ }
+
+ return numSamples;
+}
+
+void Player_Mac::Instrument::generateSamples(int16 *data, int pitchModifier, int volume, int numSamples, int remainingSamplesOnNote, bool fadeNoteEnds) {
+ int samplesLeft = numSamples;
+ while (samplesLeft) {
+ _subPos += pitchModifier;
+ while (_subPos >= 0x10000) {
+ _subPos -= 0x10000;
+ _pos++;
+ if (_pos >= _loopEnd) {
+ _pos = _loopStart;
+ }
+ }
+
+ int newSample = (((int16)((_data[_pos] << 8) ^ 0x8000)) * volume) / 255;
+
+ if (fadeNoteEnds) {
+ // Fade out the last 100 samples on each note. Even at
+ // low output sample rates this is just a fraction of a
+ // second, but it gets rid of distracting "pops" at the
+ // end when the sample would otherwise go abruptly from
+ // something to nothing. This was particularly
+ // noticeable on the distaff notes in Loom.
+ //
+ // The reason it's conditional is that Monkey Island
+ // appears to have a "hold current note" command, and
+ // if we fade out the current note in that case we
+ // will actually introduce new "pops".
+
+ remainingSamplesOnNote--;
+ if (remainingSamplesOnNote < 100) {
+ newSample = (newSample * remainingSamplesOnNote) / 100;
+ }
+ }
+
+ int sample = *data + newSample;
+ if (sample > 32767) {
+ sample = 32767;
+ } else if (sample < -32768) {
+ sample = -32768;
+ }
+
+ *data++ = sample;
+ samplesLeft--;
+ }
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/player_mac.h b/engines/scumm/player_mac.h
new file mode 100644
index 0000000000..09307b4e57
--- /dev/null
+++ b/engines/scumm/player_mac.h
@@ -0,0 +1,133 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SCUMM_PLAYER_MAC_H
+#define SCUMM_PLAYER_MAC_H
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "common/mutex.h"
+#include "scumm/music.h"
+#include "scumm/saveload.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+
+#define RES_SND MKTAG('s', 'n', 'd', ' ')
+
+class Mixer;
+
+namespace Scumm {
+
+class ScummEngine;
+
+/**
+ * Scumm Macintosh music driver, base class.
+ */
+class Player_Mac : public Audio::AudioStream, public MusicEngine {
+public:
+ Player_Mac(ScummEngine *scumm, Audio::Mixer *mixer, int numberOfChannels, int channelMask, bool fadeNoteEnds);
+ virtual ~Player_Mac();
+
+ void init();
+
+ // MusicEngine API
+ virtual void setMusicVolume(int vol);
+ virtual void startSound(int sound);
+ virtual void stopSound(int sound);
+ virtual void stopAllSounds();
+ virtual int getMusicTimer();
+ virtual int getSoundStatus(int sound) const;
+
+ // AudioStream API
+ virtual int readBuffer(int16 *buffer, const int numSamples);
+ virtual bool isStereo() const { return false; }
+ virtual bool endOfData() const { return false; }
+ virtual int getRate() const { return _sampleRate; }
+
+ virtual void saveLoadWithSerializer(Serializer *ser);
+
+private:
+ Common::Mutex _mutex;
+ Audio::Mixer *const _mixer;
+ Audio::SoundHandle _soundHandle;
+ uint32 _sampleRate;
+ int _soundPlaying;
+
+ void stopAllSounds_Internal();
+
+ struct Instrument {
+ byte *_data;
+ uint32 _size;
+ uint32 _rate;
+ uint32 _loopStart;
+ uint32 _loopEnd;
+ byte _baseFreq;
+
+ uint _pos;
+ uint _subPos;
+
+ void newNote() {
+ _pos = 0;
+ _subPos = 0;
+ }
+
+ void generateSamples(int16 *data, int pitchModifier, int volume, int numSamples, int remainingSamplesOnNote, bool fadeNoteEnds);
+ };
+
+ int _pitchTable[128];
+ int _numberOfChannels;
+ int _channelMask;
+ bool _fadeNoteEnds;
+
+ virtual bool checkMusicAvailable() { return false; }
+ virtual bool loadMusic(const byte *ptr) { return false; }
+ virtual bool getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &velocity) { return false; }
+
+protected:
+ struct Channel {
+ virtual ~Channel() {}
+
+ Instrument _instrument;
+ bool _looped;
+ uint32 _length;
+ const byte *_data;
+
+ uint _pos;
+ int _pitchModifier;
+ byte _velocity;
+ uint32 _remaining;
+
+ bool _notesLeft;
+
+ bool loadInstrument(Common::SeekableReadStream *stream);
+ };
+
+ ScummEngine *const _vm;
+ Channel *_channel;
+
+ uint32 durationToSamples(uint16 duration);
+ int noteToPitchModifier(byte note, Instrument *instrument);
+};
+
+} // End of namespace Scumm
+
+#endif
diff --git a/engines/scumm/player_v3m.cpp b/engines/scumm/player_v3m.cpp
new file mode 100644
index 0000000000..0f222d84fe
--- /dev/null
+++ b/engines/scumm/player_v3m.cpp
@@ -0,0 +1,214 @@
+/* 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.
+ *
+ */
+
+/*
+ We have the following information from Lars Christensen (lechimp) and
+ Jamieson Christian (jamieson630):
+
+ RESOURCE DATA
+ LE 2 bytes Resource size
+ 2 bytes Unknown
+ 2 bytes 'so'
+ 14 bytes Unknown
+ BE 2 bytes Instrument for Stream 1
+ BE 2 bytes Instrument for Stream 2
+ BE 2 bytes Instrument for Stream 3
+ BE 2 bytes Instrument for Stream 4
+ BE 2 bytes Instrument for Stream 5
+ BE 2 bytes Offset to Stream 1
+ BE 2 bytes Offset to Stream 2
+ BE 2 bytes Offset to Stream 3
+ BE 2 bytes Offset to Stream 4
+ BE 2 bytes Offset to Stream 5
+ ? bytes The streams
+
+ STREAM DATA
+ BE 2 bytes Unknown (always 1?)
+ 2 bytes Unknown (always 0?)
+ BE 2 bytes Number of events in stream
+ ? bytes Stream data
+
+ Each stream event is exactly 3 bytes, therefore one can
+ assert that numEvents == (streamSize - 6) / 3. The
+ polyphony of a stream appears to be 1; in other words, only
+ one note at a time can be playing in each stream. The next
+ event is not executed until the current note (or rest) is
+ finished playing; therefore, note duration also serves as the
+ time delta between events.
+
+ FOR EACH EVENTS
+ BE 2 bytes Note duration
+ 1 byte Note number to play (0 = rest/silent)
+
+ Oh, and quick speculation -- Stream 1 may be used for a
+ single-voice interleaved version of the music, where Stream 2-
+ 5 represent a version of the music in up to 4-voice
+ polyphony, one voice per stream. I postulate thus because
+ the first stream of the Mac Loom theme music contains
+ interleaved voices, whereas the second stream seemed to
+ contain only the pizzicato bottom-end harp. Stream 5, in this
+ example, is empty, so if my speculation is correct, this
+ particular musical number supports 3-voice polyphony at
+ most. I must check out Streams 3 and 4 to see what they
+ contain.
+
+ ==========
+
+ The instruments appear to be identified by their resource IDs:
+
+ 1000 Dual Harp
+ 10895 harp1
+ 11445 strings1
+ 11548 silent
+ 13811 staff1
+ 15703 brass1
+ 16324 flute1
+ 25614 accordian 1
+ 28110 f horn1
+ 29042 bassoon1
+*/
+
+#include "common/macresman.h"
+#include "common/translation.h"
+#include "engines/engine.h"
+#include "gui/message.h"
+#include "scumm/player_v3m.h"
+#include "scumm/scumm.h"
+
+namespace Scumm {
+
+Player_V3M::Player_V3M(ScummEngine *scumm, Audio::Mixer *mixer)
+ : Player_Mac(scumm, mixer, 5, 0x1E, true) {
+ assert(_vm->_game.id == GID_LOOM);
+
+ // Channel 0 seems to be what was played on low-end macs, that couldn't
+ // handle multi-channel music and play the game at the same time. I'm
+ // not sure if stream 4 is ever used, but let's use it just in case.
+}
+
+// \xAA is a trademark glyph in Mac OS Roman. We try that, but also the Windows
+// version, the UTF-8 version, and just plain without in case the file system
+// can't handle exotic characters like that.
+
+static const char *loomFileNames[] = {
+ "Loom\xAA",
+ "Loom\x99",
+ "Loom\xE2\x84\xA2",
+ "Loom"
+};
+
+bool Player_V3M::checkMusicAvailable() {
+ Common::MacResManager resource;
+
+ for (int i = 0; i < ARRAYSIZE(loomFileNames); i++) {
+ if (resource.exists(loomFileNames[i])) {
+ return true;
+ }
+ }
+
+ GUI::MessageDialog dialog(_(
+ "Could not find the 'Loom' Macintosh executable to read the\n"
+ "instruments from. Music will be disabled."), _("OK"));
+ dialog.runModal();
+ return false;
+}
+
+bool Player_V3M::loadMusic(const byte *ptr) {
+ Common::MacResManager resource;
+ bool found = false;
+
+ for (int i = 0; i < ARRAYSIZE(loomFileNames); i++) {
+ if (resource.open(loomFileNames[i])) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ return false;
+ }
+
+ 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++) {
+ int instrument = READ_BE_UINT16(ptr + 20 + 2 * i);
+ int offset = READ_BE_UINT16(ptr + 30 + 2 * i);
+
+ _channel[i]._looped = false;
+ _channel[i]._length = READ_BE_UINT16(ptr + offset + 4) * 3;
+ _channel[i]._data = ptr + offset + 6;
+ _channel[i]._pos = 0;
+ _channel[i]._pitchModifier = 0;
+ _channel[i]._velocity = 0;
+ _channel[i]._remaining = 0;
+ _channel[i]._notesLeft = true;
+
+ Common::SeekableReadStream *stream = resource.getResource(RES_SND, instrument);
+ if (_channel[i].loadInstrument(stream)) {
+ debug(6, "Player_V3M::loadMusic: Channel %d - Loaded Instrument %d (%s)", i, instrument, resource.getResName(RES_SND, instrument).c_str());
+ } else {
+ resource.close();
+ return false;
+ }
+ }
+
+ resource.close();
+ return true;
+}
+
+bool Player_V3M::getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &velocity) {
+ _channel[ch]._instrument.newNote();
+ if (_channel[ch]._pos >= _channel[ch]._length) {
+ if (!_channel[ch]._looped) {
+ _channel[ch]._notesLeft = false;
+ return false;
+ }
+ _channel[ch]._pos = 0;
+ }
+ uint16 duration = READ_BE_UINT16(&_channel[ch]._data[_channel[ch]._pos]);
+ byte note = _channel[ch]._data[_channel[ch]._pos + 2];
+ samples = durationToSamples(duration);
+ if (note > 0) {
+ pitchModifier = noteToPitchModifier(note, &_channel[ch]._instrument);
+ velocity = 127;
+ } else {
+ pitchModifier = 0;
+ velocity = 0;
+ }
+ _channel[ch]._pos += 3;
+ return true;
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/player_v3m.h b/engines/scumm/player_v3m.h
new file mode 100644
index 0000000000..359bab32a9
--- /dev/null
+++ b/engines/scumm/player_v3m.h
@@ -0,0 +1,54 @@
+/* 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 SCUMM_PLAYER_V3M_H
+#define SCUMM_PLAYER_V3M_H
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "common/mutex.h"
+#include "scumm/music.h"
+#include "scumm/player_mac.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+
+class Mixer;
+
+namespace Scumm {
+
+class ScummEngine;
+
+/**
+ * Scumm V3 Macintosh music driver.
+ */
+class Player_V3M : public Player_Mac {
+public:
+ Player_V3M(ScummEngine *scumm, Audio::Mixer *mixer);
+
+ virtual bool checkMusicAvailable();
+ virtual bool loadMusic(const byte *ptr);
+ virtual bool getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &velocity);
+};
+
+} // End of namespace Scumm
+
+#endif
diff --git a/engines/scumm/player_v5m.cpp b/engines/scumm/player_v5m.cpp
new file mode 100644
index 0000000000..500f3bbc40
--- /dev/null
+++ b/engines/scumm/player_v5m.cpp
@@ -0,0 +1,246 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ From Markus Magnuson (superqult) we got this information:
+ Mac0
+ ---
+ 4 bytes - 'SOUN'
+ BE 4 bytes - block length
+
+ 4 bytes - 'Mac0'
+ BE 4 bytes - (blockLength - 27)
+ 28 bytes - ???
+
+ do this three times (once for each channel):
+ 4 bytes - 'Chan'
+ BE 4 bytes - channel length
+ 4 bytes - instrument name (e.g. 'MARI')
+
+ do this for ((chanLength-24)/4) times:
+ 2 bytes - note duration
+ 1 byte - note value
+ 1 byte - note velocity
+
+ 4 bytes - ???
+ 4 bytes - 'Loop'/'Done'
+ 4 bytes - ???
+
+ 1 byte - 0x09
+ ---
+
+ The instruments presumably correspond to the snd resource names in the
+ Monkey Island executable:
+
+ Instruments
+ "MARI" - MARIMBA
+ "PLUC" - PLUCK
+ "HARM" - HARMONIC
+ "PIPE" - PIPEORGAN
+ "TROM" - TROMBONE
+ "STRI" - STRINGS
+ "HORN" - HORN
+ "VIBE" - VIBES
+ "SHAK" - SHAKUHACHI
+ "PANP" - PANPIPE
+ "WHIS" - WHISTLE
+ "ORGA" - ORGAN3
+ "BONG" - BONGO
+ "BASS" - BASS
+
+ ---
+
+ Note values <= 1 are silent.
+*/
+
+#include "common/macresman.h"
+#include "common/translation.h"
+#include "engines/engine.h"
+#include "gui/message.h"
+#include "scumm/player_v5m.h"
+#include "scumm/scumm.h"
+
+namespace Scumm {
+
+Player_V5M::Player_V5M(ScummEngine *scumm, Audio::Mixer *mixer)
+ : Player_Mac(scumm, mixer, 3, 0x07, false) {
+ assert(_vm->_game.id == GID_MONKEY);
+}
+
+// Try both with and without underscore in the filename, because hfsutils may
+// turn the space into an underscore. At least, it did for me.
+
+static const char *monkeyIslandFileNames[] = {
+ "Monkey Island",
+ "Monkey_Island"
+};
+
+bool Player_V5M::checkMusicAvailable() {
+ Common::MacResManager resource;
+
+ for (int i = 0; i < ARRAYSIZE(monkeyIslandFileNames); i++) {
+ if (resource.exists(monkeyIslandFileNames[i])) {
+ return true;
+ }
+ }
+
+ GUI::MessageDialog dialog(_(
+ "Could not find the 'Monkey Island' Macintosh executable to read the\n"
+ "instruments from. Music will be disabled."), _("OK"));
+ dialog.runModal();
+ return false;
+}
+
+bool Player_V5M::loadMusic(const byte *ptr) {
+ Common::MacResManager resource;
+ bool found = false;
+ uint i;
+
+ for (i = 0; i < ARRAYSIZE(monkeyIslandFileNames); i++) {
+ if (resource.open(monkeyIslandFileNames[i])) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ return false;
+ }
+
+ ptr += 8;
+ // TODO: Decipher the unknown bytes in the header. For now, skip 'em
+ ptr += 28;
+
+ Common::MacResIDArray idArray = resource.getResIDArray(RES_SND);
+
+ // Load the three channels and their instruments
+ for (i = 0; i < 3; i++) {
+ assert(READ_BE_UINT32(ptr) == MKTAG('C', 'h', 'a', 'n'));
+ uint32 len = READ_BE_UINT32(ptr + 4);
+ uint32 instrument = READ_BE_UINT32(ptr + 8);
+
+ _channel[i]._length = len - 20;
+ _channel[i]._data = ptr + 12;
+ _channel[i]._looped = (READ_BE_UINT32(ptr + len - 8) == MKTAG('L', 'o', 'o', 'p'));
+ _channel[i]._pos = 0;
+ _channel[i]._pitchModifier = 0;
+ _channel[i]._velocity = 0;
+ _channel[i]._remaining = 0;
+ _channel[i]._notesLeft = true;
+
+ for (uint j = 0; j < idArray.size(); j++) {
+ Common::String name = resource.getResName(RES_SND, idArray[j]);
+ if (instrument == READ_BE_UINT32(name.c_str())) {
+ debug(6, "Player_V5M::loadMusic: Channel %d: Loading instrument '%s'", i, name.c_str());
+ Common::SeekableReadStream *stream = resource.getResource(RES_SND, idArray[j]);
+
+ if (!_channel[i].loadInstrument(stream)) {
+ resource.close();
+ return false;
+ }
+
+ break;
+ }
+ }
+
+ ptr += len;
+ }
+
+ resource.close();
+
+ // The last note of each channel is just zeroes. We will adjust this
+ // note so that all the channels end at the same time.
+
+ uint32 samples[3];
+ uint32 maxSamples = 0;
+ for (i = 0; i < 3; i++) {
+ samples[i] = 0;
+ for (uint j = 0; j < _channel[i]._length; j += 4) {
+ samples[i] += durationToSamples(READ_BE_UINT16(&_channel[i]._data[j]));
+ }
+ if (samples[i] > maxSamples) {
+ maxSamples = samples[i];
+ }
+ }
+
+ for (i = 0; i < 3; i++) {
+ _lastNoteSamples[i] = maxSamples - samples[i];
+ }
+
+ return true;
+}
+
+bool Player_V5M::getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &velocity) {
+ if (_channel[ch]._pos >= _channel[ch]._length) {
+ if (!_channel[ch]._looped) {
+ _channel[ch]._notesLeft = false;
+ return false;
+ }
+ // FIXME: Jamieson630: The jump seems to be happening
+ // too quickly! There should maybe be a pause after
+ // the last Note Off? But I couldn't find one in the
+ // MI1 Lookout music, where I was hearing problems.
+ _channel[ch]._pos = 0;
+ }
+ uint16 duration = READ_BE_UINT16(&_channel[ch]._data[_channel[ch]._pos]);
+ byte note = _channel[ch]._data[_channel[ch]._pos + 2];
+ samples = durationToSamples(duration);
+
+ if (note != 1) {
+ _channel[ch]._instrument.newNote();
+ }
+
+ if (note > 1) {
+ pitchModifier = noteToPitchModifier(note, &_channel[ch]._instrument);
+ velocity = _channel[ch]._data[_channel[ch]._pos + 3];
+ } else if (note == 1) {
+ // This is guesswork, but Monkey Island uses two different
+ // "special" note values: 0, which is clearly a rest, and 1
+ // which is... I thought at first it was a "soft" key off, to
+ // fade out the note, but listening to the music in a Mac
+ // emulator (which unfortunately doesn't work all that well),
+ // I hear no trace of fading out.
+ //
+ // It could mean "change the volume on the current note", but
+ // I can't hear that either, and it always seems to use the
+ // exact same velocity on this note.
+ //
+ // So it appears it really just is a "hold the current note",
+ // but why? Couldn't they just have made the original note
+ // longer?
+
+ pitchModifier = _channel[ch]._pitchModifier;
+ velocity = _channel[ch]._velocity;
+ } else {
+ pitchModifier = 0;
+ velocity = 0;
+ }
+
+ _channel[ch]._pos += 4;
+
+ if (_channel[ch]._pos >= _channel[ch]._length) {
+ samples = _lastNoteSamples[ch];
+ }
+ return true;
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/player_v5m.h b/engines/scumm/player_v5m.h
new file mode 100644
index 0000000000..b2079ee331
--- /dev/null
+++ b/engines/scumm/player_v5m.h
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SCUMM_PLAYER_V5M_H
+#define SCUMM_PLAYER_V5M_H
+
+#include "common/scummsys.h"
+#include "common/util.h"
+#include "common/mutex.h"
+#include "scumm/music.h"
+#include "scumm/player_mac.h"
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+
+class Mixer;
+
+namespace Scumm {
+
+class ScummEngine;
+
+/**
+ * Scumm V5 Macintosh music driver.
+ */
+class Player_V5M : public Player_Mac {
+public:
+ Player_V5M(ScummEngine *scumm, Audio::Mixer *mixer);
+
+ virtual bool checkMusicAvailable();
+ virtual bool loadMusic(const byte *ptr);
+ virtual bool getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &velocity);
+
+private:
+ uint32 _lastNoteSamples[3];
+};
+
+} // End of namespace Scumm
+
+#endif
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index b2093e9c1a..7c42b40f58 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -1214,7 +1214,7 @@ void ScummEngine_v7::readMAXS(int blockSize) {
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
if ((_game.id == GID_FT) && (_game.features & GF_DEMO) &&
- (_game.platform == Common::kPlatformPC))
+ (_game.platform == Common::kPlatformDOS))
_numGlobalScripts = 300;
else
_numGlobalScripts = 2000;
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 72896e097a..3453e53a18 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1477,9 +1477,13 @@ void ScummEngine::saveOrLoad(Serializer *s) {
}
- // Save/load FM-Towns audio status
- if (_townsPlayer)
- _townsPlayer->saveLoadWithSerializer(s);
+ //
+ // Save/load music engine status
+ //
+ if (_musicEngine) {
+ _musicEngine->saveLoadWithSerializer(s);
+ }
+
//
// Save/load the charset renderer state
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index a640bc1e17..7b2ff91ad3 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -47,7 +47,7 @@ namespace Scumm {
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 93
+#define CURRENT_VER 94
/**
* An auxillary macro, used to specify savegame versions. We use this instead
@@ -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/script.cpp b/engines/scumm/script.cpp
index d8c4948ea8..c8eabdd61c 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -49,6 +49,8 @@ void ScummEngine::runScript(int script, bool freezeResistant, bool recursive, in
if (!recursive)
stopScript(script);
+ uint16 number = (_currentScript != 0xFF) ? vm.slot[_currentScript].number : 0;
+
if (script < _numGlobalScripts) {
// Call getResourceAddress to ensure the resource is loaded & its usage count reset
/*scriptPtr =*/ getResourceAddress(rtScript, script);
@@ -56,7 +58,7 @@ void ScummEngine::runScript(int script, bool freezeResistant, bool recursive, in
scriptType = WIO_GLOBAL;
debugC(DEBUG_SCRIPTS, "runScript(Global-%d) from %d-%d", script,
- vm.slot[_currentScript].number, _roomResource);
+ number, _roomResource);
} else {
scriptOffs = _localScriptOffsets[script - _numGlobalScripts];
if (scriptOffs == 0)
@@ -64,7 +66,7 @@ void ScummEngine::runScript(int script, bool freezeResistant, bool recursive, in
scriptType = WIO_LOCAL;
debugC(DEBUG_SCRIPTS, "runScript(%d) from %d-%d", script,
- vm.slot[_currentScript].number, _roomResource);
+ number, _roomResource);
}
if (cycle == 0)
@@ -138,10 +140,10 @@ void ScummEngine::runObjectScript(int object, int entry, bool freezeResistant, b
void ScummEngine::initializeLocals(int slot, int *vars) {
int i;
if (!vars) {
- for (i = 0; i < 25; i++)
+ for (i = 0; i < NUM_SCRIPT_LOCAL; i++)
vm.localvar[slot][i] = 0;
} else {
- for (i = 0; i < 25; i++)
+ for (i = 0; i < NUM_SCRIPT_LOCAL; i++)
vm.localvar[slot][i] = vars[i];
}
}
@@ -755,13 +757,13 @@ void ScummEngine::stopObjectCode() {
}
void ScummEngine::runInventoryScript(int i) {
- int args[24];
- memset(args, 0, sizeof(args));
- args[0] = i;
if (VAR(VAR_INVENTORY_SCRIPT)) {
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
inventoryScriptIndy3Mac();
} else {
+ int args[NUM_SCRIPT_LOCAL];
+ memset(args, 0, sizeof(args));
+ args[0] = i;
runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args);
}
}
@@ -1060,7 +1062,7 @@ void ScummEngine::doSentence(int verb, int objectA, int objectB) {
void ScummEngine::checkAndRunSentenceScript() {
int i;
- int localParamList[24];
+ int localParamList[NUM_SCRIPT_LOCAL];
const ScriptSlot *ss;
int sentenceScript;
@@ -1308,7 +1310,7 @@ void ScummEngine_v0::runSentenceScript() {
}
void ScummEngine_v2::runInputScript(int clickArea, int val, int mode) {
- int args[24];
+ int args[NUM_SCRIPT_LOCAL];
int verbScript;
verbScript = 4;
@@ -1332,7 +1334,7 @@ void ScummEngine_v2::runInputScript(int clickArea, int val, int mode) {
}
void ScummEngine::runInputScript(int clickArea, int val, int mode) {
- int args[24];
+ int args[NUM_SCRIPT_LOCAL];
int verbScript;
verbScript = VAR(VAR_VERB_SCRIPT);
@@ -1366,9 +1368,15 @@ void ScummEngine::runInputScript(int clickArea, int val, int mode) {
// Clicks are handled differently in Indy3 mac: param 2 of the
// input script is set to 0 for normal clicks, and to 1 for double clicks.
+ // The EGA DOS version of Loom also checks that the second click happens
+ // close enough to the first one, but that seems like overkill.
uint32 time = _system->getMillis();
args[2] = (time < _lastInputScriptTime + 500); // 500 ms double click delay
_lastInputScriptTime = time;
+ } else if (_game.id == GID_LOOM && _game.platform == Common::kPlatformMacintosh) {
+ uint32 time = _system->getMillis();
+ VAR(52) = (time < _lastInputScriptTime + 500); // 500 ms double click delay
+ _lastInputScriptTime = time;
}
if (verbScript)
@@ -1484,7 +1492,7 @@ void ScummEngine::beginCutscene(int *args) {
void ScummEngine::endCutscene() {
ScriptSlot *ss = &vm.slot[_currentScript];
- int args[16];
+ int args[NUM_SCRIPT_LOCAL];
if (ss->cutsceneOverride > 0) // Only terminate if active
ss->cutsceneOverride--;
diff --git a/engines/scumm/script.h b/engines/scumm/script.h
index 7b2c625144..74ffaaf426 100644
--- a/engines/scumm/script.h
+++ b/engines/scumm/script.h
@@ -66,13 +66,15 @@ struct OpcodeEntry : Common::NonCopyable {
/**
* The number of script slots, which determines the maximal number
- * of concurrently running scripts.
- * WARNING: Do NOT changes this value unless you really have to, as
+ * of concurrently running scripts, and the number of local variables
+ * in a script.
+ * WARNING: Do NOT changes these values unless you really have to, as
* this will break savegame compatibility if done carelessly. If you
- * have to change it, make sure you update saveload.cpp accordingly!
+ * have to change them, make sure you update saveload.cpp accordingly!
*/
enum {
- NUM_SCRIPT_SLOT = 80
+ NUM_SCRIPT_SLOT = 80,
+ NUM_SCRIPT_LOCAL = 25
};
/* Script status type (slot.status) */
@@ -122,7 +124,8 @@ struct VirtualMachineState {
int16 cutSceneScriptIndex;
byte cutSceneStackPointer;
ScriptSlot slot[NUM_SCRIPT_SLOT];
- int32 localvar[NUM_SCRIPT_SLOT][26];
+ // Why does localvar have space for one extra local variable?
+ int32 localvar[NUM_SCRIPT_SLOT][NUM_SCRIPT_LOCAL + 1];
NestedScript nest[kMaxScriptNesting];
byte numNestedScripts;
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 1de9f08168..ec3ac4b00f 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -415,7 +415,7 @@ void ScummEngine_v4::o4_saveLoadGame() {
char* ptr;
int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1;
ptr = (char *)getStringAddress(slot + firstSlot - 1);
- strncpy(name, ptr, sizeof(name));
+ Common::strlcpy(name, ptr, sizeof(name));
}
if (savePreparedSavegame(slot, name))
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 0bf51a2816..2d4c326b68 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -630,7 +630,7 @@ void ScummEngine_v5::o5_breakHere() {
}
void ScummEngine_v5::o5_chainScript() {
- int vars[16];
+ int vars[NUM_SCRIPT_LOCAL];
int script;
int cur;
@@ -663,7 +663,7 @@ void ScummEngine_v5::o5_chainScript() {
void ScummEngine_v5::o5_cursorCommand() {
int i, j, k;
- int table[16];
+ int table[NUM_SCRIPT_LOCAL];
switch ((_opcode = fetchScriptByte()) & 0x1F) {
case 1: // SO_CURSOR_ON
_cursor.state = 1;
@@ -736,7 +736,7 @@ void ScummEngine_v5::o5_cursorCommand() {
}
void ScummEngine_v5::o5_cutscene() {
- int args[16];
+ int args[NUM_SCRIPT_LOCAL];
getWordVararg(args);
beginCutscene(args);
}
@@ -2083,14 +2083,14 @@ void ScummEngine_v5::o5_isSoundRunning() {
}
void ScummEngine_v5::o5_soundKludge() {
- int items[16];
+ int items[NUM_SCRIPT_LOCAL];
int num = getWordVararg(items);
_sound->soundKludge(items, num);
}
void ScummEngine_v5::o5_startObject() {
int obj, script;
- int data[16];
+ int data[NUM_SCRIPT_LOCAL];
obj = getVarOrDirectWord(PARAM_1);
script = getVarOrDirectByte(PARAM_2);
@@ -2101,7 +2101,7 @@ void ScummEngine_v5::o5_startObject() {
void ScummEngine_v5::o5_startScript() {
int op, script;
- int data[16];
+ int data[NUM_SCRIPT_LOCAL];
op = _opcode;
script = getVarOrDirectByte(PARAM_1);
@@ -2130,7 +2130,7 @@ void ScummEngine_v5::o5_startScript() {
// Method used by original games to skip copy protection scheme
if (!_copyProtection) {
// Copy protection was disabled in LucasArts Classic Adventures (PC Disk)
- if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPC && _game.version == 3 && _currentRoom == 69 && script == 201)
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformDOS && _game.version == 3 && _currentRoom == 69 && script == 201)
script = 205;
// Copy protection was disabled in KIXX XL release (Amiga Disk) and
// in LucasArts Classic Adventures (PC Disk)
@@ -2556,7 +2556,7 @@ void ScummEngine_v5::o5_walkActorToObject() {
int ScummEngine_v5::getWordVararg(int *ptr) {
int i;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < NUM_SCRIPT_LOCAL; i++)
ptr[i] = 0;
i = 0;
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index decd34222d..a75e864e7a 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2510,7 +2510,7 @@ void ScummEngine_v7::o6_kernelSetFunctions() {
_disableFadeInEffect = true;
}
} else if (_game.id == GID_FT && !_skipVideo) {
- const int insaneVarNum = ((_game.features & GF_DEMO) && (_game.platform == Common::kPlatformPC))
+ const int insaneVarNum = ((_game.features & GF_DEMO) && (_game.platform == Common::kPlatformDOS))
? 232 : 233;
_insane->setSmushParams(_smushFrameRate);
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index d4eefe8c28..db8da21bbc 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 Sun Jun 23 22:18:47 2013
DO NOT EDIT MANUALLY!
*/
@@ -17,7 +17,7 @@ static const MD5Table md5table[] = {
{ "008e76ec3ae58d0add637ea7aa299a2c", "freddi3", "", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "02cae0e7ff8504f73618391873d5781a", "freddi3", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "0305e850382b812fec6e5998ef88a966", "pajama", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
- { "035deab53b47bc43abc763560d0f8d4b", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "035deab53b47bc43abc763560d0f8d4b", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "037385a953789190298494d92b89b3d0", "catalog", "HE 72", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "03d3b18ee3fd68114e2a687c871e38d5", "freddi4", "HE 99", "Mini Game", -1, Common::EN_USA, Common::kPlatformWindows },
{ "0425954a9db5c340861672892c3e678d", "samnmax", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
@@ -33,7 +33,7 @@ static const MD5Table md5table[] = {
{ "07b810e37be7489263f7bc7627d4765d", "freddi4", "unenc", "Unencrypted", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "084ed0fa98a6d1e9368d67fe9cfbd417", "freddi", "HE 71", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "0855496dde35356b1a9691e22ba84cdc", "freddi", "HE 73", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
- { "08656dd9698ddf1023ba9bf8a195e37b", "monkey", "VGA", "VGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "08656dd9698ddf1023ba9bf8a195e37b", "monkey", "VGA", "VGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "08cc5c3eedaf72ebe12734eee94f7fa2", "balloon", "HE 80", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "09820417db26687bb7fe0c83cc4c553b", "ft", "", "Version A", 19697, Common::EN_ANY, Common::kPlatformUnknown },
{ "0a212fa35fa8421f31c1f3961272caf0", "monkey", "VGA", "VGA", -1, Common::DE_DEU, Common::kPlatformAmiga },
@@ -43,15 +43,15 @@ static const MD5Table md5table[] = {
{ "0aa050f4ad79402fbe9c4f78fb8ac494", "loom", "PC-Engine", "", 6532, Common::EN_ANY, Common::kPlatformPCEngine },
{ "0ab19be9e2a3f6938226638b2a3744fe", "PuttTime", "HE 100", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "0ac41e2e3d2174e5a042a6b565328dba", "puttrace", "HE 98", "Demo", 13110, Common::EN_USA, Common::kPlatformUnknown },
- { "0b3222aaa7efcf283eb621e0cefd26cc", "puttputt", "HE 60", "", -1, Common::RU_RUS, Common::kPlatformPC },
- { "0be88565f734b1e9e77ccaaf3bb14b29", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "0b3222aaa7efcf283eb621e0cefd26cc", "puttputt", "HE 60", "", -1, Common::RU_RUS, Common::kPlatformDOS },
+ { "0be88565f734b1e9e77ccaaf3bb14b29", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "0bf1a3eb198ca1bd2ebe104825cec770", "puttrace", "HE 99", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "0c331637580950aea2346e012ef2a868", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformAtariST },
{ "0c45eb4baff0c12c3d9dfa889c8070ab", "pajama3", "", "Demo", 13884, Common::DE_DEU, Common::kPlatformUnknown },
{ "0cccfa5223099a60e76cfcca57a1a141", "freddi3", "", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
- { "0d1b69471605201ef2fa9cec1f5f02d2", "maniac", "V2", "V2", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "0d1b69471605201ef2fa9cec1f5f02d2", "maniac", "V2", "V2", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "0ddf1174d0d097956ba10dd452ea65e6", "freddi3", "HE 99", "", -1, Common::HE_ISR, Common::kPlatformWindows },
- { "0e4c5d54a0ad4b26132e78b5ea76642a", "samnmax", "Floppy", "Demo", 6485, Common::EN_ANY, Common::kPlatformPC },
+ { "0e4c5d54a0ad4b26132e78b5ea76642a", "samnmax", "Floppy", "Demo", 6485, Common::EN_ANY, Common::kPlatformDOS },
{ "0e96ab45a4eb72acc1b46813976589fd", "activity", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "0e9b01430e31d9fcd94071d433bbc6bf", "loom", "No AdLib", "EGA", -1, Common::FR_FRA, Common::kPlatformAtariST },
{ "0f5935bd5e88ba6f09e558d64459746d", "thinker1", "", "Demo", 30919, Common::EN_USA, Common::kPlatformWindows },
@@ -62,7 +62,7 @@ static const MD5Table md5table[] = {
{ "1005456bfe351c1b679e1ff2dc2849e9", "puttzoo", "", "", -1, Common::UNK_LANG, Common::kPlatformWindows },
{ "100b4c8403ad6a83d4bf7dbf83e44dc4", "spyfox", "", "", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "10d8e66cd11049ce64815ebb9fd76eb3", "spyozon", "", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "114acdc2659a273c220f86ee9edb24c1", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "114acdc2659a273c220f86ee9edb24c1", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "11ddf1fde76e3156eb3a38da213f484e", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformAmiga },
{ "11e6e244078ff09b0f3832e35420e0a7", "catalog", "", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "132bff65e6367c09cc69318ce1b59333", "monkey2", "", "", 11155, Common::EN_ANY, Common::kPlatformAmiga },
@@ -74,20 +74,20 @@ static const MD5Table md5table[] = {
{ "15240c59d3681ed53f714f8d925cb2d6", "maniac", "V2", "V2", -1, Common::ES_ESP, Common::kPlatformAtariST },
{ "157367c3c21e0d03a0cba44361b4cf65", "indy3", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST },
{ "15878e3bee2e1e759184abee98589eaa", "spyfox", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformIOS },
- { "15e03ffbfeddb9c2aebc13dcb2a4a8f4", "monkey", "VGA", "VGA", 8357, Common::EN_ANY, Common::kPlatformPC },
+ { "15e03ffbfeddb9c2aebc13dcb2a4a8f4", "monkey", "VGA", "VGA", 8357, Common::EN_ANY, Common::kPlatformDOS },
{ "15f588e887e857e8c56fe6ade4956168", "atlantis", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformAmiga },
{ "16542a7342a918bfe4ba512007d36c47", "FreddisFunShop", "HE 99L", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "166553538ff320c69edafeee29525419", "samnmax", "", "CD", 199195304, Common::EN_ANY, Common::kPlatformMacintosh },
{ "16effd200aa6b8abe9c569c3e578814d", "freddi4", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "179879b6e35c1ead0d93aab26db0951b", "fbear", "HE 70", "", 13381, Common::EN_ANY, Common::kPlatformWindows },
- { "17b5d5e6af4ae89d62631641d66d5a05", "indy3", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "17b5d5e6af4ae89d62631641d66d5a05", "indy3", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "17f7296f63c78642724f057fd8e736a7", "maniac", "NES", "", 2082, Common::EN_GRB, Common::kPlatformNES },
- { "17fa250eb72dae2dad511ba79c0b6b0a", "tentacle", "", "Demo", -1, Common::FR_FRA, Common::kPlatformPC },
- { "182344899c2e2998fca0bebcd82aa81a", "atlantis", "", "CD", 12035, Common::EN_ANY, Common::kPlatformPC },
- { "183d7464902d40d00800e8ee1f04117c", "maniac", "V2", "V2", 1988, Common::DE_DEU, Common::kPlatformPC },
- { "1875b90fade138c9253a8e967007031a", "indy3", "VGA", "VGA", 6295, Common::EN_ANY, Common::kPlatformPC },
- { "187d315f6b5168f68680dfe8c3d76a3e", "loom", "EGA", "EGA", -1, Common::HE_ISR, Common::kPlatformPC },
- { "1900e501a52fbf55bde6e4196f6d2aa6", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "17fa250eb72dae2dad511ba79c0b6b0a", "tentacle", "", "Demo", -1, Common::FR_FRA, Common::kPlatformDOS },
+ { "182344899c2e2998fca0bebcd82aa81a", "atlantis", "", "CD", 12035, Common::EN_ANY, Common::kPlatformDOS },
+ { "183d7464902d40d00800e8ee1f04117c", "maniac", "V2", "V2", 1988, Common::DE_DEU, Common::kPlatformDOS },
+ { "1875b90fade138c9253a8e967007031a", "indy3", "VGA", "VGA", 6295, Common::EN_ANY, Common::kPlatformDOS },
+ { "187d315f6b5168f68680dfe8c3d76a3e", "loom", "EGA", "EGA", -1, Common::HE_ISR, Common::kPlatformDOS },
+ { "1900e501a52fbf55bde6e4196f6d2aa6", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "19263586f749a560c1adf8b3393a9593", "socks", "HE 85", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "19bf6938a94698296bcb0c99c31c91a7", "spyfox2", "", "Demo", -1, Common::EN_GRB, Common::kPlatformWindows },
{ "1a6e5ae2777a6a33f06ffc0226210934", "atlantis", "", "CD", -1, Common::EN_ANY, Common::kPlatformMacintosh },
@@ -96,13 +96,13 @@ static const MD5Table md5table[] = {
{ "1c792d28376d45e145cb916bca0400a2", "spyfox2", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "1c7e7db2cfab1ad62746ab680a634204", "maniac", "NES", "", -1, Common::FR_FRA, Common::kPlatformNES },
{ "1ca86e2cf9aaa2068738a1e5ba477e60", "zak", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
- { "1d05cd189e4908f79b57e78a4402f292", "monkey", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "1d05cd189e4908f79b57e78a4402f292", "monkey", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "1d7a2e1ddcade791e2de0cfceac86725", "pajama", "", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "1dd3c11ea4439adfe681e4e405b624e1", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "1dd3c11ea4439adfe681e4e405b624e1", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "1dd7aa088e09f96d06818aa9a9deabe0", "indy3", "No AdLib", "EGA", 5361, Common::EN_ANY, Common::kPlatformMacintosh },
{ "1ed22f601f8b3695804a6583cc3083f1", "puttrace", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "1f2e62b5a9c50589fc342285a6bb3a27", "freddi", "HE 73", "", -1, Common::HE_ISR, Common::kPlatformWindows },
- { "1fbebd7b2b692df5297870447a80cfed", "atlantis", "Floppy", "Floppy", 12030, Common::DE_DEU, Common::kPlatformPC },
+ { "1fbebd7b2b692df5297870447a80cfed", "atlantis", "Floppy", "Floppy", 12030, Common::DE_DEU, Common::kPlatformDOS },
{ "1ff5997c78fbd0a841a75ef15a05d9d5", "BluesBirthday", "Red", "Red", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "2012f854d83d9cc6f73b2b544cd8bbf8", "water", "HE 80", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "20176076d708bf14407bcc9bdcd7a418", "pajama3", "", "", -1, Common::RU_RUS, Common::kPlatformWindows },
@@ -115,22 +115,23 @@ static const MD5Table md5table[] = {
{ "225e18566e810c634bf7de63e7568e3e", "mustard", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "22de86b2f7ec6e5db745ed1123310b44", "spyfox2", "", "Demo", 15832, Common::FR_FRA, Common::kPlatformWindows },
- { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "23394c8d29cc63c61313959431a12476", "spyfox", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "254fede2f15dbb32a23760d601b01816", "zak", "V1", "", -1, Common::EN_ANY, Common::kPlatformC64 },
- { "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "Floppy", "Floppy", 7932, Common::EN_ANY, Common::kPlatformPC },
+ { "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "Floppy", "Floppy", 7932, Common::EN_ANY, Common::kPlatformDOS },
{ "27b2ef1653089fe5b897d9cc89ce784f", "balloon", "HE 80", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "27b3a4224ad63d5b04627595c1c1a025", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformAmiga },
{ "28d24a33448fab6795850bc9f159a4a2", "atlantis", "FM-TOWNS", "Demo", 11170, Common::JA_JPN, Common::kPlatformFMTowns },
- { "28ef68ee3ed76d7e2ee8ee13c15fbd5b", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformPC },
+ { "28ef68ee3ed76d7e2ee8ee13c15fbd5b", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformDOS },
{ "28f07458f1b6c24e118a1ea056827701", "lost", "HE 99", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
- { "2a208ffbcd0e83e86f4356e6f64aa6e1", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "291fb06071e65897f755846611f5ad40", "ft", "", "7-Wolf", 19697, Common::RU_RUS, Common::kPlatformUnknown },
+ { "2a208ffbcd0e83e86f4356e6f64aa6e1", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "2a41b53cf1a90b6e6f26c10cc6041084", "tentacle", "", "Demo", 2439158, Common::EN_ANY, Common::kPlatformMacintosh },
{ "2a446817ffcabfef8716e0c456ecaf81", "puttzoo", "", "Demo", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "2a8658dbd13d84d1bce64a71a35995eb", "pajama2", "HE 99", "Demo", -1, Common::HE_ISR, Common::kPlatformWindows },
- { "2c04aacffb8428f30ccf4f734fbe3adc", "activity", "", "", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "2c04aacffb8428f30ccf4f734fbe3adc", "activity", "", "", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "2ccd8891ce4d3f1a334d21bff6a88ca2", "monkey", "CD", "", 9455, Common::EN_ANY, Common::kPlatformMacintosh },
- { "2d1e891fe52df707c30185e52c50cd92", "monkey", "CD", "CD", 8955, Common::EN_ANY, Common::kPlatformPC },
+ { "2d1e891fe52df707c30185e52c50cd92", "monkey", "CD", "CD", 8955, Common::EN_ANY, Common::kPlatformDOS },
{ "2d388339d6050d8ccaa757b64633954e", "indyloom", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns },
{ "2d4536a56e01da4b02eb021e7770afa2", "zak", "FM-TOWNS", "", 7520, Common::EN_ANY, Common::kPlatformFMTowns },
{ "2d4acbdcfd8e374c9da8c2e7303a5cd0", "BluesBirthday", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
@@ -139,14 +140,14 @@ static const MD5Table md5table[] = {
{ "2e85f7aa054930c692a5b1bed1dfc295", "football2002", "", "Patched", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "2e8a1f76ea33bc5e04347646feee173d", "pajama3", "", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "2fe369ad70f52a8cf7ad6077ee64f81a", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformAmiga },
- { "305d3dd57c96c65b017bc70c8c7cfb5e", "monkey", "CD", "CD", 8955, Common::DE_DEU, Common::kPlatformPC },
+ { "305d3dd57c96c65b017bc70c8c7cfb5e", "monkey", "CD", "CD", 8955, Common::DE_DEU, Common::kPlatformDOS },
{ "30ba1e825d4ad2b448143ae8df18482a", "pajama2", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "30d1903b0715759af064be2127381cd0", "freddi", "HE 100", "", 34837, Common::DE_DEU, Common::kPlatformWii },
{ "319a4dde52c7960b5aae8a1ec348d918", "monkey", "VGA", "VGA", -1, Common::DE_DEU, Common::kPlatformAmiga },
- { "31aa57f460a3d12429f0552a46a90b39", "puttputt", "Demo", "Demo", 6150, Common::EN_ANY, Common::kPlatformPC },
+ { "31aa57f460a3d12429f0552a46a90b39", "puttputt", "Demo", "Demo", 6150, Common::EN_ANY, Common::kPlatformDOS },
{ "31b8fda4c8c7413fa6b39997e776eba4", "loom", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
{ "32709cbeeb3044b34129950860a83f14", "pajama2", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
- { "32a433dea56b86a55b59e4ff7d755711", "ft", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "32a433dea56b86a55b59e4ff7d755711", "ft", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "330f631502e381a4e199a3f7cb483c20", "indy3", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformAmiga },
{ "33e989f85da700e2014d00f345cab3d7", "puttrace", "HE 98.5", "", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "3433be9866ca4261b2d5d25374e3f243", "monkey", "VGA", "VGA", -1, Common::FR_FRA, Common::kPlatformAmiga },
@@ -154,16 +155,16 @@ static const MD5Table md5table[] = {
{ "356fb5f680b68251333016175935d126", "BluesABCTime", "HE CUP", "Preview", 4133436, Common::UNK_LANG, Common::kPlatformUnknown },
{ "35a2d3040fa512f8232d9e443319d84d", "dig", "", "", 659335495, Common::EN_ANY, Common::kPlatformMacintosh },
{ "362c1d281fb9899254cda66ad246c66a", "dig", "Demo", "Demo", 3472, Common::EN_ANY, Common::kPlatformUnknown },
- { "3686cf8f89e102ececf4366e1d2c8126", "monkey2", "", "", 11135, Common::EN_ANY, Common::kPlatformPC },
+ { "3686cf8f89e102ececf4366e1d2c8126", "monkey2", "", "", 11135, Common::EN_ANY, Common::kPlatformDOS },
{ "36a6750e03fb505fc19fc2bf3e4dbe91", "pajama2", "", "Demo", 58749, Common::EN_ANY, Common::kPlatformUnknown },
{ "3769b56c9a22f5521d74525ee459f88d", "puttrace", "HE 99", "Demo", 13108, Common::DE_DEU, Common::kPlatformWindows },
{ "37aed3f91c1ef959e0bd265f9b13781f", "pajama", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "37f56ceb13e401a7ac7d9e6b37fecaf7", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformPC },
+ { "37f56ceb13e401a7ac7d9e6b37fecaf7", "loom", "EGA", "EGA", 5748, Common::EN_ANY, Common::kPlatformDOS },
{ "37ff1b308999c4cca7319edfcc1280a0", "puttputt", "HE 70", "Demo", 8269, Common::EN_ANY, Common::kPlatformWindows },
- { "3824e60cdf639d22f6df92a03dc4b131", "fbear", "HE 62", "", 7732, Common::EN_ANY, Common::kPlatformPC },
- { "387a544b8b10b26912d8413bab63a853", "monkey2", "", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "3824e60cdf639d22f6df92a03dc4b131", "fbear", "HE 62", "", 7732, Common::EN_ANY, Common::kPlatformDOS },
+ { "387a544b8b10b26912d8413bab63a853", "monkey2", "", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "3938ee1aa4433fca9d9308c9891172b1", "indyzak", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns },
- { "399b217b0c8d65d0398076da486363a9", "indy3", "VGA", "VGA", 6295, Common::DE_DEU, Common::kPlatformPC },
+ { "399b217b0c8d65d0398076da486363a9", "indy3", "VGA", "VGA", 6295, Common::DE_DEU, Common::kPlatformDOS },
{ "39cb9dec16fa16f38d79acd80effb059", "loom", "EGA", "EGA", -1, Common::UNK_LANG, Common::kPlatformAmiga },
{ "39fd6db10d0222d817025c4d3346e3b4", "farm", "", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "3a03dab514e4038df192d8a8de469788", "atlantis", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformAmiga },
@@ -173,31 +174,32 @@ static const MD5Table md5table[] = {
{ "3a5ec90d556d4920976c5578bfbfaf79", "maniac", "NES", "", -1, Common::DE_DEU, Common::kPlatformNES },
{ "3ae7f002d9256b8bdf76aaf8a3a069f8", "freddi", "HE 100", "", 34837, Common::EN_GRB, Common::kPlatformWii },
{ "3af61c5edf8e15b43dbafd285b2e9777", "puttcircus", "", "Demo", -1, Common::HE_ISR, Common::kPlatformWindows },
- { "3b301b7892f883ce42ab4be6a274fea6", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "3b301b7892f883ce42ab4be6a274fea6", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "3b832f4a90740bf22e9b8ed42ca0128c", "freddi4", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformUnknown },
{ "3c4c471342bd95505a42334367d8f127", "puttmoon", "HE 70", "", 12161, Common::RU_RUS, Common::kPlatformWindows },
- { "3cce1913a3bc586b51a75c3892ff18dd", "indy3", "VGA", "VGA", -1, Common::RU_RUS, Common::kPlatformPC },
- { "3d219e7546039543307b55a91282bf18", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "3cce1913a3bc586b51a75c3892ff18dd", "indy3", "VGA", "VGA", -1, Common::RU_RUS, Common::kPlatformDOS },
+ { "3d219e7546039543307b55a91282bf18", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "3de99ef0523f8ca7958faa3afccd035a", "spyfox", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "3df6ead57930488bc61e6e41901d0e97", "fbear", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "3e48298920fab9b7aec5a971e1bd1fab", "pajama3", "", "Demo", -1, Common::EN_GRB, Common::kPlatformWindows },
{ "3e861421f494711bc6f619d4aba60285", "airport", "", "", 93231, Common::RU_RUS, Common::kPlatformWindows },
- { "40564ec47da48a67787d1f9bd043902a", "maniac", "V2 Demo", "V2 Demo", 1988, Common::EN_ANY, Common::kPlatformPC },
+ { "40564ec47da48a67787d1f9bd043902a", "maniac", "V2 Demo", "V2 Demo", 1988, Common::EN_ANY, Common::kPlatformDOS },
{ "4167a92a1d46baa4f4127d918d561f88", "tentacle", "", "CD", 7932, Common::EN_ANY, Common::kPlatformUnknown },
{ "41958e24d03181ff9a381a66d048a581", "ft", "", "", -1, Common::PT_BRA, Common::kPlatformUnknown },
{ "425205754fa749f4f0b0dd9d09fa45fd", "football", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "430bc518017b6fac046f58bab6baad5d", "monkey2", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
{ "439a7f4adf510489981ac52308e7d7a2", "maniac", "C64", "", -1, Common::DE_DEU, Common::kPlatformC64 },
{ "45082a5c9f42ba14dacfe1fdeeba819d", "freddicove", "HE 100", "Demo", 18422, Common::EN_ANY, Common::kPlatformUnknown },
- { "45152f7cf2ba8f43cf8a8ea2e740ae09", "monkey", "VGA", "VGA", 8357, Common::ES_ESP, Common::kPlatformPC },
+ { "45152f7cf2ba8f43cf8a8ea2e740ae09", "monkey", "VGA", "VGA", 8357, Common::ES_ESP, Common::kPlatformDOS },
{ "4521138d15d1fd7649c31fb981746231", "pajama2", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "4522564b3c31aaf218b6a96826a549fd", "maze", "HE 99", "", -1, Common::EN_USA, Common::kPlatformWindows },
- { "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 },
- { "47e75b1bdcb44c78cb94883d1731ccf8", "fbear", "HE 62", "Demo", 6203, Common::EN_ANY, Common::kPlatformPC },
+ { "46b53fd430adcfbed791b48a0d4b079f", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformDOS },
+ { "470c45b636139bb40716daa1c7edaad0", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformDOS },
+ { "477dbafbd66a53c98416dc01aef019ad", "monkey", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformDOS },
+ { "47e041521d35c7a801bb1c010d84da9d", "freddi4", "HE 99", "Demo", -1, Common::IT_ITA, Common::kPlatformWindows },
+ { "47e75b1bdcb44c78cb94883d1731ccf8", "fbear", "HE 62", "Demo", 6203, Common::EN_ANY, Common::kPlatformDOS },
{ "48b9f04b348bc5013327753f0d12a144", "loom", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformAmiga },
- { "49210e124e4c2b30f1290a9ef6306301", "monkey", "EGA", "EGA", 8357, Common::EN_ANY, Common::kPlatformPC },
+ { "49210e124e4c2b30f1290a9ef6306301", "monkey", "EGA", "EGA", 8357, Common::EN_ANY, Common::kPlatformDOS },
{ "499c958affc394f2a3868f1eb568c3ee", "freddi4", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "49a1739981a89066b1121fac04b710f4", "spyfox2", "HE CUP", "Preview", 5756234, Common::UNK_LANG, Common::kPlatformUnknown },
{ "4aa93cb30e485b728504ba3a693f12bf", "pajama", "HE 100", "", -1, Common::RU_RUS, Common::kPlatformWindows },
@@ -210,7 +212,7 @@ static const MD5Table md5table[] = {
{ "4c4820518e16e1a0e3616a3b021a04f3", "catalog", "HE CUP", "Preview", 10927456, Common::DE_DEU, Common::kPlatformUnknown },
{ "4cb9c3618f71668f8e4346c8f323fa82", "monkey2", "", "", 10700, Common::EN_ANY, Common::kPlatformMacintosh },
{ "4ce2d5b355964bbcb5e5ce73236ef868", "freddicove", "HE 100", "", -1, Common::RU_RUS, Common::kPlatformWindows },
- { "4cfd3fda4a4e6e64a1fc488eba973b7a", "fbpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "4cfd3fda4a4e6e64a1fc488eba973b7a", "fbpack", "", "", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "4d34042713958b971cb139fba4658586", "atlantis", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
{ "4d3fbc888de4e6565013f61dc83da6b6", "FreddisFunShop", "HE 99", "", 36245, Common::NL_NLD, Common::kPlatformUnknown },
{ "4dbff3787aedcd96b0b325f2d92d7ad9", "maze", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
@@ -220,7 +222,7 @@ static const MD5Table md5table[] = {
{ "4edbf9d03550f7ba01e7f34d69b678dd", "spyfox", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "4f04b321a95d4315ce6d65f8e1dd0368", "maze", "HE 80", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "4f138ac6f9b2ac5a41bc68b2c3296064", "freddi4", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformWindows },
- { "4f1d6f8b38343dba405472538b5037ed", "fbear", "HE 62", "", 7717, Common::EN_ANY, Common::kPlatformPC },
+ { "4f1d6f8b38343dba405472538b5037ed", "fbear", "HE 62", "", 7717, Common::EN_ANY, Common::kPlatformDOS },
{ "4f267a901719623de7dde83e47d5b474", "atlantis", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformAmiga },
{ "4f580a021eee026f3b4589e17d130d78", "freddi4", "", "", -1, Common::UNK_LANG, Common::kPlatformUnknown },
{ "4fa6870d9bc8c313b65d54b1da5a1891", "pajama", "", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
@@ -229,15 +231,15 @@ static const MD5Table md5table[] = {
{ "5057fb0e99e5aa29df1836329232f101", "freddi2", "HE 80", "", -1, Common::UNK_LANG, Common::kPlatformWindows },
{ "507bb360688dc4180fdf0d7597352a69", "freddi", "HE 73", "", 26402, Common::SE_SWE, Common::kPlatformWindows },
{ "50b831f11b8c4b83784cf81f4dcc69ea", "spyfox", "HE 101", "", -1, Common::EN_ANY, Common::kPlatformWii },
- { "50fcdc982a25063b78ad46bf389b8e8d", "tentacle", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "50fcdc982a25063b78ad46bf389b8e8d", "tentacle", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "51305e929e330e24a75a0351c8f9975e", "freddi2", "HE 99", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "513f91a9dbe8d5490b39e56a3ac5bbdf", "pajama2", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "5262a27afcaee04e5c4900220bd463e7", "PuttsFunShop", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "52a4bae0746a11d7b1e8554e91a6645c", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "52a4bae0746a11d7b1e8554e91a6645c", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "53e94115b55dd51d4b8ff0871aa1df1e", "spyfox", "", "Demo", 20103, Common::EN_ANY, Common::kPlatformUnknown },
{ "54a936ad06161ff7bfefcb96200f7bff", "monkey", "VGA", "VGA Demo", 7617, Common::EN_ANY, Common::kPlatformAmiga },
{ "55518cd73cf9c6d23ea29c51ee06bdfe", "ft", "", "", -1, Common::IT_ITA, Common::kPlatformUnknown },
- { "55e4cc866ff9046824e1c638ba2b8c7f", "ft", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
+ { "55e4cc866ff9046824e1c638ba2b8c7f", "ft", "", "Akella", -1, Common::RU_RUS, Common::kPlatformUnknown },
{ "55f4e9402bec2bded383843123f37c5c", "pajama2", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "566165a7338fa11029e7c14d94fa70d0", "freddi", "HE 73", "Demo", 9800, Common::EN_ANY, Common::kPlatformWindows },
{ "56b5922751be7ffd771b38dda56b028b", "freddi", "HE 100", "", 34837, Common::NL_NLD, Common::kPlatformWii },
@@ -245,53 +247,53 @@ static const MD5Table md5table[] = {
{ "5798972220cd458be2626d54c80f71d7", "atlantis", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformAmiga },
{ "57a17febe2183f521250e55d55b83e60", "PuttTime", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "57a5cfec9ef231a007043cc1917e8988", "freddi", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformWii },
- { "57b0d89af79befe1cabce3bece869e7f", "tentacle", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformPC },
+ { "57b0d89af79befe1cabce3bece869e7f", "tentacle", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "58436e634f4fae1d9973591c2ffa1fcb", "spyfox", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "589601b676c98b1c0c987bc031ab68b3", "chase", "HE 95", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "58fdf4c7ad13540a734e18f8584cad89", "puttzoo", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "590e6546aacd0d374b7f3a4f53013ab1", "freddicove", "", "", -1, Common::UNK_LANG, Common::kPlatformUnknown },
{ "59d5cfcc5e672a6e07baae01328b918b", "PuttTime", "HE 90", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "5a35e36fd777e9c37a49c5b2faca52f9", "loom", "EGA", "EGA Demo", 6108, Common::EN_ANY, Common::kPlatformPC },
+ { "5a35e36fd777e9c37a49c5b2faca52f9", "loom", "EGA", "EGA Demo", 6108, Common::EN_ANY, Common::kPlatformDOS },
{ "5b08000a9c47b2887df6506ac767ca68", "fbear", "HE 62", "", -1, Common::EN_ANY, Common::kPlatform3DO },
{ "5bd335265a61caa3d78956ad9f88ba23", "football", "", "Demo", 23135, Common::EN_ANY, Common::kPlatformUnknown },
{ "5c21fc49aee8f46e58fef21579e614a1", "thinker1", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "5c9cecbd2952ccec14c9ecebf5822a34", "puttzoo", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformIOS },
- { "5d88b9d6a88e6f8e90cded9d01b7f082", "loom", "VGA", "VGA", 8307, Common::EN_ANY, Common::kPlatformPC },
+ { "5d88b9d6a88e6f8e90cded9d01b7f082", "loom", "VGA", "VGA", 8307, Common::EN_ANY, Common::kPlatformDOS },
{ "5dda73606533d66a4c3f4f9ea6e842af", "farm", "", "", 87061, Common::RU_RUS, Common::kPlatformWindows },
{ "5e8fb66971a60e523e5afbc4c129c0e8", "socks", "HE 85", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "5ebb57234b2fe5c5dff641e00184ad81", "freddi", "HE 73", "", -1, Common::FR_FRA, Common::kPlatformWindows },
- { "5fbe557049892eb4b709d90916ec97ca", "indy3", "EGA", "EGA", 5361, Common::EN_ANY, Common::kPlatformPC },
+ { "5fbe557049892eb4b709d90916ec97ca", "indy3", "EGA", "EGA", 5361, Common::EN_ANY, Common::kPlatformDOS },
{ "5fdb2ac2483908b065c6e77988338a54", "freddi4", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "600abd3e9f47e63e670188b7e4e86ac7", "spyozon", "", "", 47128, Common::EN_USA, Common::kPlatformUnknown },
{ "6027e9ca9c35746d95dee2068cec17e5", "zak", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformAmiga },
{ "60ba818dc3bede86d40357e3913f8505", "ft", "", "Version B", 19697, Common::EN_ANY, Common::kPlatformUnknown },
{ "613f64f78ea26c7353b2a5940eb61d6a", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAtariST },
{ "62050da376483d8edcbd98cd26b6cb57", "puttrace", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
- { "624cdb93654667c869d204a64af7e57f", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformPC },
+ { "624cdb93654667c869d204a64af7e57f", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformDOS },
{ "6269b8fbf51a353e5b501e4ad98cdc67", "arttime", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "6271130f440066830eca9056c1d7926f", "water", "HE 80", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "62b8c16b6db226ba95aaa8be73f9885c", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformAmiga },
{ "632d2fddb8ba97723fa15334763ae857", "thinker1", "", "", 33270, Common::EN_ANY, Common::kPlatformWindows },
{ "63fdcdc95cdeea00060883aed38e5504", "PuttTime", "HE 85", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "6508fd55530e6915507e1cc37f7f045d", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "6508fd55530e6915507e1cc37f7f045d", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "65563295c3a06493351870f20a1630cf", "spyozon", "HE CUP", "Preview", 5235008, Common::UNK_LANG, Common::kPlatformUnknown },
{ "659942b9a6b519f123a13cca3c333a13", "jungle", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "65fa23d6884e8ca23d5d2406d70de7e8", "puttzoo", "", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
- { "66236cd1aec24e1d4aff4c4cc93b7e18", "indy3", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "66236cd1aec24e1d4aff4c4cc93b7e18", "indy3", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "663743c03ae0c007f3d665cf631c0e6b", "puttrace", "HE 99", "Demo", 13135, Common::DE_DEU, Common::kPlatformUnknown },
- { "66fd5ff9a810dfeb6d6bdada18221140", "monkey", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "66fd5ff9a810dfeb6d6bdada18221140", "monkey", "VGA", "VGA", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "672dec94b82f7f0877ebb5b5cf7f4bc1", "pajama", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "675d71151e9b5a968c8ce46d9fbf4cbf", "zak", "V2", "V2", 1916, Common::EN_ANY, Common::kPlatformPC },
+ { "675d71151e9b5a968c8ce46d9fbf4cbf", "zak", "V2", "V2", 1916, Common::EN_ANY, Common::kPlatformDOS },
{ "679855cf61932f9bf995c8f3677380ed", "pajama3", "", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "68155a6bf082221525f431c2cbdac8ab", "SamsFunShop", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "684732efb5799c0f78804c99d8de9aba", "puttputt", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "68530d2e15f339fbbf3150b78b4d2ffb", "freddi", "HE 73", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "688328c5bdc4c8ec4145688dfa077bf2", "freddi4", "HE 99", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
- { "6886e5d08cee329b1f2e743ae2e3ceed", "monkey2", "", "", 11135, Common::DE_DEU, Common::kPlatformPC },
+ { "6886e5d08cee329b1f2e743ae2e3ceed", "monkey2", "", "", 11135, Common::DE_DEU, Common::kPlatformDOS },
{ "695fe0b3963333b7e15b37514db3c745", "thinkerk", "", "Demo", 29789, Common::EN_USA, Common::kPlatformUnknown },
- { "697c9b7c55a05d8199c48b48e379d2c8", "puttmoon", "", "", -1, Common::HE_ISR, Common::kPlatformPC },
- { "69d70269fafc4445adbb0d223e4f9a3f", "indy3", "EGA", "EGA", 5361, Common::EN_ANY, Common::kPlatformPC },
- { "69ea626f1f87eecb78ea0d6c6b983a1d", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "697c9b7c55a05d8199c48b48e379d2c8", "puttmoon", "", "", -1, Common::HE_ISR, Common::kPlatformDOS },
+ { "69d70269fafc4445adbb0d223e4f9a3f", "indy3", "EGA", "EGA", 5361, Common::EN_ANY, Common::kPlatformDOS },
+ { "69ea626f1f87eecb78ea0d6c6b983a1d", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "69ffe29185b8d71f09f6199f8b2a87cb", "lost", "HE 100", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "6a30a07f353a75cdc602db27d73e1b42", "puttputt", "HE 70", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "6a60d395b78b205c93a956100b1bf5ae", "pajama2", "HE 98.5", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
@@ -299,7 +301,7 @@ static const MD5Table md5table[] = {
{ "6b19d0e25cbf720d05822379b8b90ed9", "PuttTime", "HE 90", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "6b257bb2827dd894b8109a50a1a18b5a", "freddicove", "HE 100", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "6b27dbcd8d5697d5c918eeca0f68ef6a", "puttrace", "HE CUP", "Preview", 3901484, Common::UNK_LANG, Common::kPlatformUnknown },
- { "6b3ec67da214f558dc5ceaa2acd47453", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "6b3ec67da214f558dc5ceaa2acd47453", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "6b5a3fef241e90d4b2e77f1e222773ee", "maniac", "NES", "", -1, Common::SE_SWE, Common::kPlatformNES },
{ "6bca7a1a96d16e52b8f3c42b50dbdca3", "fbear", "HE 62", "", -1, Common::JA_JPN, Common::kPlatform3DO },
{ "6bf70eee5de3d24d2403e0dd3d267e8a", "spyfox", "", "", 49221, Common::UNK_LANG, Common::kPlatformWindows },
@@ -310,36 +312,36 @@ static const MD5Table md5table[] = {
{ "6e959d65358eedf9b68b81e304b97fa4", "tentacle", "", "CD", 7932, Common::DE_DEU, Common::kPlatformUnknown },
{ "6ea966b4d660c870b9ee790d1fbfc535", "monkey2", "", "", -1, Common::ES_ESP, Common::kPlatformAmiga },
{ "6f0be328c64d689bb606d22a389e1b0f", "loom", "No AdLib", "EGA", 5748, Common::EN_ANY, Common::kPlatformMacintosh },
- { "6f6ef668c608c7f534fea6e6d3878dde", "indy3", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformPC },
- { "6f8a22bfa397be1f7ed4b74aba0e397e", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "6f6ef668c608c7f534fea6e6d3878dde", "indy3", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformDOS },
+ { "6f8a22bfa397be1f7ed4b74aba0e397e", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "701246819d1a70573f41bf33fc19214f", "soccer", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "7015b059ab72cff3a0ef9fb4d5e9889d", "spyozon", "", "", -1, Common::DE_DEU, Common::kPlatformWindows },
- { "7020931d5a2be0a49d68e7a1882363e4", "zak", "V1", "V1", 1896, Common::EN_ANY, Common::kPlatformPC },
+ { "7020931d5a2be0a49d68e7a1882363e4", "zak", "V1", "V1", 1896, Common::EN_ANY, Common::kPlatformDOS },
{ "70b0719ac3a5b47ae233c561823d5b96", "puttzoo", "", "", -1, Common::NL_NLD, Common::kPlatformMacintosh },
- { "71523b539491527d9860f4407faf0411", "monkey", "Demo", "EGA Demo", 7607, Common::EN_ANY, Common::kPlatformPC },
+ { "71523b539491527d9860f4407faf0411", "monkey", "Demo", "EGA Demo", 7607, Common::EN_ANY, Common::kPlatformDOS },
{ "71d384e7676c53d513ddd333eae1d82c", "Blues123time", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "71fe97c3108678cf604f14abe342341b", "spyfox2", "", "", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "7222f260253f325c21fcfa68b5bfab67", "spyfox2", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "72ac6bc980d5101c2142189d746bd62f", "spyfox", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "732845548b1d6c2da572cb6a1bf81b07", "spyfox2", "", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "73b8197e236da4bf49adc99fe8f5fa1b", "spyfox", "", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
- { "73e5ab7dbb9a8061cc6d25df02dbd1e7", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "73e5ab7dbb9a8061cc6d25df02dbd1e7", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "7410a8ba9795020cd42f171c4320659e", "pajama3", "", "", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "746e88c172a5b7a1ae89ac0ee3ee681a", "freddi", "HE 90", "Updated", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "74da3494fbe1a7d20213b0afe0954755", "catalog", "HE CUP", "Preview", 10841544, Common::FR_FRA, Common::kPlatformUnknown },
{ "754feb59d3bf86b8a00840df74fd7b26", "freddi3", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
- { "75ba23fff4fd63fa446c02864f2a5a4b", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "75ba23fff4fd63fa446c02864f2a5a4b", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "75bff95816b84672b877d22a911ab811", "freddi3", "HE 99", "Updated", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "76b66b43e593ad4d2f1dfb5cc8f19700", "spyfox", "HE 99", "", -1, Common::NL_NLD, Common::kPlatformWindows },
- { "771bc18ec6f93837b839c992b211904b", "monkey", "Demo", "EGA Demo", -1, Common::DE_DEU, Common::kPlatformPC },
- { "7766c9487f9d53a8cb0edabda5119c3d", "puttputt", "HE 60", "", 8022, Common::EN_ANY, Common::kPlatformPC },
+ { "771bc18ec6f93837b839c992b211904b", "monkey", "Demo", "EGA Demo", -1, Common::DE_DEU, Common::kPlatformDOS },
+ { "7766c9487f9d53a8cb0edabda5119c3d", "puttputt", "HE 60", "", 8022, Common::EN_ANY, Common::kPlatformDOS },
{ "77f5c9cc0986eb729c1a6b4c8823bbae", "zakloom", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns },
- { "780e4a0ae2ff17dc296f4a79543b44f8", "puttmoon", "", "", -1, Common::UNK_LANG, Common::kPlatformPC },
+ { "780e4a0ae2ff17dc296f4a79543b44f8", "puttmoon", "", "", -1, Common::UNK_LANG, Common::kPlatformDOS },
{ "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 101", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "784b499c98d07260a30952685758636b", "pajama3", "", "Demo", 13911, Common::DE_DEU, Common::kPlatformWindows },
{ "78bd5f036ea35a878b74e4f47941f784", "freddi4", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "78c07ca088526d8d4446a4c2cb501203", "freddi3", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "7974365d3dc0f43a2748c975f91ff042", "monkey2", "", "", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "7974365d3dc0f43a2748c975f91ff042", "monkey2", "", "", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "79b05f628586837e7166e82b2279bb50", "loom", "PC-Engine", "", -1, Common::JA_JPN, Common::kPlatformPCEngine },
{ "7bad72e332a59f9fcc1d437f4edad32a", "puttcircus", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
{ "7c2e76087027eeee9c8f8985f93a1cc5", "freddi4", "", "Demo", 13584, Common::EN_ANY, Common::kPlatformUnknown },
@@ -349,7 +351,7 @@ static const MD5Table md5table[] = {
{ "7e151c17adf624f1966c8fc5827c95e9", "puttputt", "HE 61", "", -1, Common::EN_ANY, Common::kPlatform3DO },
{ "7ea2da67ebabea4ac20cee9f4f9d2934", "airport", "", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "7edd665bbede7ea8b7233f8e650be6f8", "samnmax", "", "CD", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "7f45ddd6dbfbf8f80c0c0efea4c295bc", "maniac", "V1", "V1", 1972, Common::EN_ANY, Common::kPlatformPC },
+ { "7f45ddd6dbfbf8f80c0c0efea4c295bc", "maniac", "V1", "V1", 1972, Common::EN_ANY, Common::kPlatformDOS },
{ "7f945525abcd48015adf1632637a44a1", "pajama", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "7fc6cdb46b4c9d384c52327f4bca6416", "football", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "810a9da887aefa597b0cf3c77d262897", "BluesABCTime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
@@ -362,18 +364,18 @@ static const MD5Table md5table[] = {
{ "84e3c23a49ded8a6f9197735c8eb3de7", "PuttTime", "HE 85", "", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "8539c0ff89868e55a08e652ac44daaae", "water", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "861e59ed72a1cd0e6d454f7ee7e2bf3d", "comi", "", "", -1, Common::RU_RUS, Common::kPlatformWindows },
- { "86be8ada36371d4fdc35659d0e912a26", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "86be8ada36371d4fdc35659d0e912a26", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "86c9902b7bec1a17926d4dae85beaa45", "airport", "HE 71", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "870d1e3c86bc50846d808d14a36b4e08", "monkey", "VGA", "VGA", -1, Common::ES_ESP, Common::kPlatformAmiga },
{ "8776caed014c321272af407c1502a2df", "monkey", "CD", "", 8955, Common::EN_ANY, Common::kPlatformMacintosh },
{ "87df3e0074624040407764b7c5e710b9", "pajama", "", "Demo", 18354, Common::NL_NLD, Common::kPlatformWindows },
- { "87f6e8037b7cc996e13474b491a7a98e", "maniac", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "87f6e8037b7cc996e13474b491a7a98e", "maniac", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "8801fb4a1200b347f7a38523339526dd", "jungle", "", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "880c5ca5b944648b3f8b03feb41705a8", "freddi", "HE 100", "", 34837, Common::SE_SWE, Common::kPlatformWii },
{ "883af4b0af4f77a92f1dcf1d0a283140", "tentacle", "", "CD", -1, Common::ES_ESP, Common::kPlatformUnknown },
{ "898ce8eb1234a955ef75e87141902bb3", "freddi3", "", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "898eaa21f79cf8d4f08db856244689ff", "pajama", "HE 99", "Updated", 66505, Common::EN_ANY, Common::kPlatformWindows },
- { "89cfc425566003ff74b7dc7b3e6fd469", "indy3", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "89cfc425566003ff74b7dc7b3e6fd469", "indy3", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "8a484262363a8e18be87112454f1456b", "pjgames", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "8aa05d3cdb0e795436043f0546af2da2", "tentacle", "", "CD?", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "8aed489aba45d2b9fb8a04079c9c6e6a", "baseball", "HE CUP", "Preview", 12876596, Common::UNK_LANG, Common::kPlatformUnknown },
@@ -382,40 +384,41 @@ static const MD5Table md5table[] = {
{ "8d479e36f35e80257dfc102cf4b8a912", "farm", "HE 72", "Demo", 34333, Common::EN_ANY, Common::kPlatformWindows },
{ "8de13897f0121c79d29a2377159f9ad0", "socks", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "8e3241ddd6c8dadf64305e8740d45e13", "balloon", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "8e4ee4db46954bfe2912e259a16fad82", "monkey2", "", "", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "8e4ee4db46954bfe2912e259a16fad82", "monkey2", "", "", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "8e9417564f33790815445b2136efa667", "atlantis", "", "CD", 11915, Common::JA_JPN, Common::kPlatformMacintosh },
{ "8e9830a6f2702be5b22c8fa0a6aaf977", "freddi2", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformMacintosh },
{ "8eb84cee9b429314c7f0bdcf560723eb", "monkey", "FM-TOWNS", "", 9925, Common::EN_ANY, Common::kPlatformFMTowns },
{ "8ee63cafb1fe9d62aa0d5a23117e70e7", "freddi2", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "8f3758ff98c9c5d78e5d635222cad026", "atlantis", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "8f3758ff98c9c5d78e5d635222cad026", "atlantis", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "8fec68383202d38c0d25e9e3b757c5df", "comi", "Demo", "Demo", 18041, Common::UNK_LANG, Common::kPlatformWindows },
{ "8ffd618a776a4c0d8922bb28b09f8ce8", "airport", "", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
- { "90a329d8ad5b7ce0690429e98cfbb32f", "funpack", "", "", -1, Common::HE_ISR, Common::kPlatformPC },
+ { "90a329d8ad5b7ce0690429e98cfbb32f", "funpack", "", "", -1, Common::HE_ISR, Common::kPlatformDOS },
{ "90c755e1c9b9b8a4129d37b2259d0655", "chase", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "90e2f0af4f779629695c6394a65bb702", "spyfox2", "", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "910e31cffb28226bd68c569668a0d6b4", "monkey", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "910e31cffb28226bd68c569668a0d6b4", "monkey", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "91469353f7be1b122fa88d23480a1320", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAmiga },
{ "91d5db93187fab54d823f73bd6441cb6", "maniac", "NES", "", -1, Common::EN_USA, Common::kPlatformNES },
{ "927a764615c7fcdd72f591355e089d8c", "monkey", "No AdLib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST },
- { "92b078d9d6d9d751da9c26b8b3075779", "tentacle", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "92b078d9d6d9d751da9c26b8b3075779", "tentacle", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "92e7727e67f5cd979d8a1070e4eb8cb3", "puttzoo", "HE 98.5", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "92fc0073a4cf259ff36070ecb8628ba8", "thinkerk", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "94aaedbb8f26d71ed3ad6dd34490e29e", "tentacle", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "94aaedbb8f26d71ed3ad6dd34490e29e", "tentacle", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "94db6519da85b8d08c976d8e9a858ea7", "baseball", "HE CUP", "Preview", 10044774, Common::UNK_LANG, Common::kPlatformUnknown },
{ "95818b178d473c989ac753574e8892aa", "readtime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "95b3806e043be08668c54c3ffe98650f", "BluesABCTime", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "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 },
+ { "9708cf716ed8bcc9ff3fcfc69413b746", "puttputt", "HE 62", "", -1, Common::EN_ANY, Common::kPlatformDOS },
+ { "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 },
+ { "98744fe66ff730e8c2b3b1f58803ab0b", "atlantis", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "99128b6a5bdd9831d9682fb8b5cbf8d4", "BluesBirthday", "Yellow", "Yellow", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "99a3699f80b8f776efae592b44b9b991", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformPC },
- { "99b6f822b0b2612415407865438697d6", "atlantis", "", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "99a3699f80b8f776efae592b44b9b991", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS },
+ { "99b6f822b0b2612415407865438697d6", "atlantis", "", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "9b7452b5cd6d3ffb2b2f5118010af84f", "ft", "Demo", "Demo", 116463537, Common::EN_ANY, Common::kPlatformMacintosh },
{ "9bc548e179cdb0767009401c094d0895", "maniac", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformAmiga },
- { "9bd2a8f72613e715c199246dd511e10f", "atlantis", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "9bd2a8f72613e715c199246dd511e10f", "atlantis", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "9bda5fee51d2fda5253d02c642016bf4", "spyfox", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "9c0ee9c252785e9fca0143e42ac4b256", "freddi2", "HE 99", "Updated", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "9c0fee288ad564a7d25ec3e841810d79", "indy3", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformAmiga },
@@ -427,8 +430,8 @@ static const MD5Table md5table[] = {
{ "9dc02577bf50d4cfaf3de3fbac06fbe2", "puttmoon", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "9e5e0fb43bd22f4628719b7501adb717", "monkey", "No AdLib", "EGA", -1, Common::FR_FRA, Common::kPlatformAtariST },
{ "9fd66fb3b04703bd50da4356e4202558", "spyfox2", "", "", 51295, Common::EN_ANY, Common::kPlatformMacintosh },
- { "a00554c31d623fdb9fcb0f924b89b42b", "loom", "EGA", "EGA Demo", -1, Common::EN_ANY, Common::kPlatformPC },
- { "a01fab4a64d47b96e2e58e6b0f825cc7", "monkey", "VGA", "VGA", 8347, Common::FR_FRA, Common::kPlatformPC },
+ { "a00554c31d623fdb9fcb0f924b89b42b", "loom", "EGA", "EGA Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
+ { "a01fab4a64d47b96e2e58e6b0f825cc7", "monkey", "VGA", "VGA", 8347, Common::FR_FRA, Common::kPlatformDOS },
{ "a095616d2d23ccf43b8e257711202cba", "football2002", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "a095e33061606d231ff37dca4c64c8ac", "pajama", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST },
@@ -438,7 +441,7 @@ static const MD5Table md5table[] = {
{ "a2386da005672cbd5136f4f27a626c5f", "farm", "", "", 87061, Common::NL_NLD, Common::kPlatformWindows },
{ "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows },
- { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "a336134914eaab4892d35625aa15ad1d", "freddi4", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "a525c1753c1db5011c00417da37887ef", "PuttTime", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "a561d2e2413cc1c71d5a1bf87bf493ea", "lost", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
@@ -454,38 +457,38 @@ static const MD5Table md5table[] = {
{ "a9543ef0d79bcb47cd76ec197ad0a967", "puttmoon", "", "", -1, Common::EN_ANY, Common::kPlatform3DO },
{ "a99c39ba65b6086be28aef576da69595", "spyozon", "", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "a9f2f04b1ecaab9495b59befffe9bf88", "pajama3", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown },
- { "aa6a91b7f6f119d1b7b1f2a4c9e24d59", "puttmoon", "", "Demo", 6233, Common::EN_ANY, Common::kPlatformPC },
- { "aa7a07d94ae853f6460be4ce0a1bf530", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "aa6a91b7f6f119d1b7b1f2a4c9e24d59", "puttmoon", "", "Demo", 6233, Common::EN_ANY, Common::kPlatformDOS },
+ { "aa7a07d94ae853f6460be4ce0a1bf530", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "aa81aa6d5545ce172fdba81f2e2f9d36", "puttzoo", "", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows },
- { "aa8a0cb65f3afbbe2c14c3f9f92775a3", "monkey", "CD", "CD", 8955, Common::FR_FRA, Common::kPlatformPC },
+ { "aa8a0cb65f3afbbe2c14c3f9f92775a3", "monkey", "CD", "CD", 8955, Common::FR_FRA, Common::kPlatformDOS },
{ "aaa587701cde7e74692c68c1024b85eb", "puttrace", "HE 99", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "aaa7f36a253f277dd29dd1c051b0e4b9", "indy3", "No AdLib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST },
{ "ab0693e9324cfcf498fdcbb12acf8bb4", "puttcircus", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "ac1642b6edfb8521ca03760126f1c250", "tentacle", "", "Demo", -1, Common::DE_DEU, Common::kPlatformPC },
+ { "ac1642b6edfb8521ca03760126f1c250", "tentacle", "", "Demo", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "ac62d50e39492ee3738b4e83a5ac780f", "freddi2", "HE 80", "", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "acad97ab1c6fc2a5b2d98abf6db4a190", "tentacle", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "ae94f110a14ce71fc515d5b648827a8f", "tentacle", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "ae94f110a14ce71fc515d5b648827a8f", "tentacle", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "aeec382acef62e122bf0d5b14581cfa4", "zak", "V1", "", -1, Common::IT_ITA, Common::kPlatformC64 },
{ "aefa244ea034b7cd2041f0a44be7d9ba", "pajama3", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "af2bd1a43b50b55915d87994e093203d", "freddi", "HE 99", "Updated", 34829, Common::DE_DEU, Common::kPlatformWindows },
{ "b100abf7ff83146df50db78dbd5e9cfa", "freddicove", "HE 100", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
- { "b23f7cd7c304d7dff08e92a96120d5b4", "zak", "V1", "V1", -1, Common::EN_ANY, Common::kPlatformPC },
- { "b250d0f9cc83f80ced56fe11a4fb057c", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformPC },
- { "b289a2a8cbedbf45786e0b4ad2f510f1", "samnmax", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "b23f7cd7c304d7dff08e92a96120d5b4", "zak", "V1", "V1", -1, Common::EN_ANY, Common::kPlatformDOS },
+ { "b250d0f9cc83f80ced56fe11a4fb057c", "maniac", "V2", "V2", 1988, Common::EN_ANY, Common::kPlatformDOS },
+ { "b289a2a8cbedbf45786e0b4ad2f510f1", "samnmax", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "b47be81e39a9710f6f595f7b527b60f8", "puttrace", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformWindows },
{ "b5298a5c15ffbe8b381d51ea4e26d35c", "freddi4", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
- { "b597e0403cc0002f69170e6caba7edd9", "indy3", "EGA", "EGA Demo", 5361, Common::EN_ANY, Common::kPlatformPC },
+ { "b597e0403cc0002f69170e6caba7edd9", "indy3", "EGA", "EGA Demo", 5361, Common::EN_ANY, Common::kPlatformDOS },
{ "b628506f7def772e40de0aa5440fb8e1", "activity", "HE 70", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "b7d37d6b786b5a22deea3b038eca96ca", "maniac", "NES", "", -1, Common::ES_ESP, Common::kPlatformNES },
- { "b886b0a5d909c7158a914e1d7c1c6c65", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "b886b0a5d909c7158a914e1d7c1c6c65", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "b8955d7d23b4972229060d1592489fef", "freddicove", "HE 100", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "b9ba19ce376efc69be78ef3baef8d2b9", "monkey", "CD", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
- { "b9bb68c5d2c9b6e2d9c513a29a754a57", "puttmoon", "", "", 7828, Common::EN_ANY, Common::kPlatformPC },
+ { "b9bb68c5d2c9b6e2d9c513a29a754a57", "puttmoon", "", "", 7828, Common::EN_ANY, Common::kPlatformDOS },
{ "ba888e6831517597859e91aa173f945c", "spyfox", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "bab0fb81dcb12b8930c5d850b8f2a7de", "balloon", "HE 80", "", 12800, Common::DE_DEU, Common::kPlatformWindows },
{ "bbadf7309c4a2c2763e4bbba3c3be634", "freddi3", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "bc4700bc0e12879f6d25d14d6be6cfdd", "spyfox2", "", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
- { "bd126753de619a495f9f22adc951c8d5", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "bd126753de619a495f9f22adc951c8d5", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "bd5fd7835335dfce03064d5f77b7f0ae", "dog", "", "", 19681, Common::NL_NLD, Common::kPlatformWindows },
{ "be2abe172f58db170de3a037daa1dd27", "puttputt", "HE 61", "", -1, Common::JA_JPN, Common::kPlatform3DO },
{ "be39a5d4db60e8aa736b9086778cb45c", "spyozon", "", "", -1, Common::EN_GRB, Common::kPlatformWindows },
@@ -499,18 +502,18 @@ static const MD5Table md5table[] = {
{ "c24c490373aeb48fbd54caa8e7ae376d", "loom", "No AdLib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST },
{ "c25755b08a8d0d47695e05f1e2111bfc", "freddi4", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "c30ef068add4277104243c31ce46c12b", "monkey2", "", "", -1, Common::FR_FRA, Common::kPlatformAmiga },
- { "c3196c5349e53e387aaff1533d95e53a", "samnmax", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "c3196c5349e53e387aaff1533d95e53a", "samnmax", "Floppy", "Demo", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "c3b22fa4654bb580b20325ebf4174841", "puttzoo", "", "", -1, Common::NL_NLD, Common::kPlatformWindows },
- { "c3df37df9d3b481b45f75283a9907c47", "loom", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformPC },
- { "c4787c3e8b5e2dfda90850ee800af00f", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "c3df37df9d3b481b45f75283a9907c47", "loom", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformDOS },
+ { "c4787c3e8b5e2dfda90850ee800af00f", "zak", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "c4ffae9fac495475d6bc3343ccc8faf9", "Soccer2004", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "c5cc7cba02a2fbd539c4439e775b0536", "puttzoo", "HE 99", "Updated", 43470, Common::DE_DEU, Common::kPlatformWindows },
{ "c5d10e190d4b4d59114b824f2fdbd00e", "loom", "FM-TOWNS", "", 7540, Common::EN_ANY, Common::kPlatformFMTowns },
- { "c63ee46143ba65f9ce14cf539ca51bd7", "atlantis", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "c63ee46143ba65f9ce14cf539ca51bd7", "atlantis", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "c666a998af90d81db447eccba9f72c8d", "monkey", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST },
{ "c6907d44f1166941d982864cd42cdc89", "pajama2", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "c782fbbe74a987c3df8ac73cd3e289ed", "freddi", "HE 73", "", -1, Common::SE_SWE, Common::kPlatformMacintosh },
- { "c7890e038806df2bb5c0c8c6f1986ea2", "monkey", "VGA", "VGA", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "c7890e038806df2bb5c0c8c6f1986ea2", "monkey", "VGA", "VGA", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "c7be10f775404fd9785a8b92a06d240c", "atlantis", "FM-TOWNS", "", 12030, Common::EN_ANY, Common::kPlatformFMTowns },
{ "c7c492a107ec520d7a7943037d0ca54a", "freddi", "HE 71", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows },
{ "c8253da0f4626d2236b5291b99e33408", "puttcircus", "HE 99", "", -1, Common::HE_ISR, Common::kPlatformWindows },
@@ -522,15 +525,15 @@ static const MD5Table md5table[] = {
{ "cb1559e8405d17a5a278a6b5ad9338d1", "freddi3", "", "Demo", 22718, Common::EN_ANY, Common::kPlatformUnknown },
{ "cc04a076779379524ed4d9c5ee3c6fb1", "tentacle", "", "CD", 282467632, Common::EN_ANY, Common::kPlatformMacintosh },
{ "cc0c4111449054f1692bb3c0c5e04629", "BluesBirthday", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "cc8ba2b0df2f9c450bcf055fe2711979", "samnmax", "Floppy", "Demo", 7485, Common::DE_DEU, Common::kPlatformPC },
+ { "cc8ba2b0df2f9c450bcf055fe2711979", "samnmax", "Floppy", "Demo", 7485, Common::DE_DEU, Common::kPlatformDOS },
{ "cd424f143a141bc59226ad83a6e40f51", "maze", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
- { "cd46c9f122272d02bbf79332ff521898", "loom", "EGA", "EGA", 5748, Common::RU_RUS, Common::kPlatformPC },
+ { "cd46c9f122272d02bbf79332ff521898", "loom", "EGA", "EGA", 5748, Common::RU_RUS, Common::kPlatformDOS },
{ "cd9c05e755d7bf8e9b9590ad1ebe273e", "dig", "Demo", "Demo", 45156007, Common::EN_ANY, Common::kPlatformMacintosh },
- { "cdd760228cf1010c2903f37e788ea31c", "zak", "V2", "V2", 1916, Common::DE_DEU, Common::kPlatformPC },
+ { "cdd760228cf1010c2903f37e788ea31c", "zak", "V2", "V2", 1916, Common::DE_DEU, Common::kPlatformDOS },
{ "ce2304f3919e1dcfcc512a81d7b603e0", "SoccerMLS", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "ce6a4cef315b20fef58a95bc40a2d8d3", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "ce6a4cef315b20fef58a95bc40a2d8d3", "monkey", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "ce7733f185b838e248927c7ba1a04204", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAmiga },
- { "ce7fd0c382389a6791fc3e199c117ef4", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
+ { "ce7fd0c382389a6791fc3e199c117ef4", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformDOS },
{ "cea91e3dd47f2518ea418e41611aa77f", "spyfox2", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
{ "cf400d20769fb70eb21766582f4924f7", "moonbase", "", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "cf4ef315214c7d8cdab6302cdb7e50db", "freddi", "HE 73", "Demo", -1, Common::DE_DEU, Common::kPlatformWindows },
@@ -539,13 +542,13 @@ static const MD5Table md5table[] = {
{ "cf90b4db5486ef798db78fe6fbf897e5", "pajama3", "", "Demo", 13902, Common::EN_USA, Common::kPlatformWindows },
{ "d00ffc8c32d17e575fd985d435d2eb88", "arttime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "d0549508a06bbb9f99ed19c9e97891f3", "football2002", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "d06fbe28818fef7bfc45c2cdf0c0849d", "zak", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformPC },
+ { "d06fbe28818fef7bfc45c2cdf0c0849d", "zak", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "d0ad929def3e9cfe39dea55bd12098d4", "puttcircus", "", "", -1, Common::FR_FRA, Common::kPlatformWindows },
- { "d0b531227a27c6662018d2bd05aac52a", "monkey", "VGA", "VGA", 8357, Common::DE_DEU, Common::kPlatformPC },
+ { "d0b531227a27c6662018d2bd05aac52a", "monkey", "VGA", "VGA", 8357, Common::DE_DEU, Common::kPlatformDOS },
{ "d220d154aafbfa12bd6f3ab1b2dae420", "puttzoo", "", "Demo", -1, Common::DE_DEU, Common::kPlatformMacintosh },
{ "d2cc8e31bce61e6cf2951249e10638fe", "basketball", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "d37c55388294b66e53e7ced3af88fa68", "freddi2", "HE 100", "Updated Demo", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "d43352a805d78b5f4936c6d7779bf575", "samnmax", "", "CD", -1, Common::RU_RUS, Common::kPlatformPC },
+ { "d43352a805d78b5f4936c6d7779bf575", "samnmax", "", "CD", -1, Common::RU_RUS, Common::kPlatformDOS },
{ "d4aac997e2f4e15341f0bfbf905419bd", "PuttTime", "HE 99", "", 62698, Common::EN_GRB, Common::kPlatformWindows },
{ "d4b8ee426b1afd3e53bc0cf020418cf6", "dog", "HE 99", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "d4cccb5af88f3e77f370896e9ba8c5f9", "freddi", "HE 71", "", -1, Common::UNK_LANG, Common::kPlatformWindows },
@@ -553,7 +556,7 @@ static const MD5Table md5table[] = {
{ "d54622d31255619d207dd245d3f92327", "freddi4", "HE 99", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "d55eff37c2100f5065cde9de428621fa", "zak", "V2", "V2", -1, Common::EN_ANY, Common::kPlatformAtariST },
{ "d62047a6729349ab36f7ee065bf26509", "dig", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
- { "d62d248c3df6ec177405e2cb23d923b2", "indy3", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformPC },
+ { "d62d248c3df6ec177405e2cb23d923b2", "indy3", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformDOS },
{ "d6334a5a9b61afe18c368540fdf522ca", "airport", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "d6dd0646404768a63e963891a96daadd", "atlantis", "Floppy", "Floppy", 12035, Common::EN_ANY, Common::kPlatformMacintosh },
{ "d73c851b942af44deb9b6d5f416a0972", "freddi3", "HE 99", "Demo", -1, Common::HE_ISR, Common::kPlatformWindows },
@@ -562,9 +565,9 @@ static const MD5Table md5table[] = {
{ "d7b247c26bf1f01f8f7daf142be84de3", "balloon", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "d8323015ecb8b10bf53474f6e6b0ae33", "dig", "", "", 16304, Common::UNK_LANG, Common::kPlatformUnknown },
{ "d917f311a448e3cc7239c31bddb00dd2", "samnmax", "", "CD", 9080, Common::EN_ANY, Common::kPlatformUnknown },
- { "d9d0dd93d16ab4dec55cabc2b86bbd17", "samnmax", "", "Demo", 6478, Common::EN_ANY, Common::kPlatformPC },
+ { "d9d0dd93d16ab4dec55cabc2b86bbd17", "samnmax", "", "Demo", 6478, Common::EN_ANY, Common::kPlatformDOS },
{ "da09e666fc8f5b78d7b0ac65d1a3b56e", "monkey2", "FM-TOWNS", "", 11135, Common::EN_ANY, Common::kPlatformFMTowns },
- { "da6269b18fcb08189c0aa9c95533cce2", "monkey", "CD", "CD", 8955, Common::IT_ITA, Common::kPlatformPC },
+ { "da6269b18fcb08189c0aa9c95533cce2", "monkey", "CD", "CD", 8955, Common::IT_ITA, Common::kPlatformDOS },
{ "da669b20271b85182e9c17a2a37ea02e", "monkey2", "", "", -1, Common::DE_DEU, Common::kPlatformAmiga },
{ "db21a6e338fe3b70c2723b6530865bf2", "PuttTime", "HE 85", "", -1, Common::FR_FRA, Common::kPlatformUnknown },
{ "db74136c20557eca6ed3411bff39f7a1", "puttcircus", "", "", -1, Common::EN_GRB, Common::kPlatformWindows },
@@ -572,7 +575,7 @@ static const MD5Table md5table[] = {
{ "dcf0119a90451a7d6e0f1920931ba130", "freddi4", "HE 99", "Demo", -1, Common::FR_FRA, Common::kPlatformWindows },
{ "dd30a53035393baa5a5e222e716559af", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAtariST },
{ "de4efb910210736813c9a1185384bace", "puttzoo", "HE 72", "Demo", 14337, Common::EN_ANY, Common::kPlatformWindows },
- { "debe337f73d660e951ece7c1f1c81add", "zak", "V2", "V2", -1, Common::EN_ANY, Common::kPlatformPC },
+ { "debe337f73d660e951ece7c1f1c81add", "zak", "V2", "V2", -1, Common::EN_ANY, Common::kPlatformDOS },
{ "defb8cb9ec4b0f91acfb6b61c6129ad9", "PuttTime", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "df03ee021aa9b81d90cab9c26da07614", "indy3", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformAmiga },
{ "df047cc4792150f601290357566d36a6", "freddi", "HE 90", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
@@ -581,7 +584,7 @@ static const MD5Table md5table[] = {
{ "e144f5f49d9241d2a9dee2576b3d09cb", "airport", "", "Demo", 51152, Common::EN_ANY, Common::kPlatformWindows },
{ "e17db1ddf91b39ca6bbc8ad3ed19e883", "monkey", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
{ "e246e02db9630533a40d99c9f54a8e01", "monkey2", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
- { "e361a7058ed8e8ebb462663c0a3ae8d6", "puttputt", "HE 62", "", -1, Common::HE_ISR, Common::kPlatformPC },
+ { "e361a7058ed8e8ebb462663c0a3ae8d6", "puttputt", "HE 62", "", -1, Common::HE_ISR, Common::kPlatformDOS },
{ "e41de1c2a15abbcdbf9977e2d7e8a340", "freddi2", "HE 100", "Updated", -1, Common::RU_RUS, Common::kPlatformWindows },
{ "e44ea295a3f8fe4f41983080dab1e9ce", "freddi", "HE 90", "Updated", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "e534d29afb3c6e0ee9dc3d53c5956714", "atlantis", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformAmiga },
@@ -590,35 +593,36 @@ static const MD5Table md5table[] = {
{ "e62056ba675ad65d8854ab3c5ad4b3c0", "spyfox2", "", "Mini Game", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "e63a0b9249b5ca4cc4d3ac34305ae360", "freddi", "HE 99", "", -1, Common::NB_NOR, Common::kPlatformWindows },
{ "e689bdf67f98b1d760ce4487ec0e8d06", "indy3", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformAmiga },
- { "e6cd81b25ab1453a8a6d3482118c391e", "pass", "", "", 7857, Common::EN_ANY, Common::kPlatformPC },
+ { "e6cd81b25ab1453a8a6d3482118c391e", "pass", "", "", 7857, Common::EN_ANY, Common::kPlatformDOS },
{ "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 },
+ { "e8d0697906e53fee8b7e9f5652696da8", "atlantis", "", "CD", 11915, Common::JA_JPN, Common::kPlatformDOS },
+ { "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 },
+ { "e98b982ceaf9d253d730bde8903233d6", "monkey", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "eae95b2b3546d8ba86ae1d397c383253", "dog", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "eb700bb73ca1cc44a1ad5e4b1a4bdeaf", "indy3", "EGA", "EGA", 5361, Common::DE_DEU, Common::kPlatformPC },
+ { "eb700bb73ca1cc44a1ad5e4b1a4bdeaf", "indy3", "EGA", "EGA", 5361, Common::DE_DEU, Common::kPlatformDOS },
{ "ebd0b2c8a387f18887282afe6cad894a", "spyozon", "", "Demo", 15317, Common::EN_ANY, Common::kPlatformUnknown },
{ "ebd324dcf06a4c49e1ba5c231eee1060", "freddi4", "HE 99", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "ecc4340c2b801f5af8da4e00c0e432d9", "puttcircus", "", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "ed2b074bc3166087a747acb2a3c6abb0", "freddi3", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "ed361270102e355afe5236954216aba2", "lost", "", "", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "ede149fda3edfc1dbd7347e0737cb583", "tentacle", "", "CD", -1, Common::FR_FRA, Common::kPlatformMacintosh },
- { "edfdb24a499d92c59f824c52987c0eec", "atlantis", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "edfdb24a499d92c59f824c52987c0eec", "atlantis", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "ee41f6afbc5b26fa475754b56fe92048", "puttputt", "HE 61", "", 8032, Common::JA_JPN, Common::kPlatform3DO },
{ "ee785fe2569bc9965526e774f7ab86f1", "spyfox", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "eea4d9ac2fb6f145945a308e8866915b", "maniac", "C64", "", -1, Common::EN_ANY, Common::kPlatformC64 },
- { "ef347474f3c7be3b29584eaa133cca05", "samnmax", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
+ { "ef347474f3c7be3b29584eaa133cca05", "samnmax", "Floppy", "Floppy", -1, Common::FR_FRA, Common::kPlatformDOS },
{ "ef71a322b6530ac45b1a070f7c0795f7", "moonbase", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
- { "ef74d9071d4e564b037cb44bd6774de7", "fbear", "HE 62", "", -1, Common::HE_ISR, Common::kPlatformPC },
+ { "ef74d9071d4e564b037cb44bd6774de7", "fbear", "HE 62", "", -1, Common::HE_ISR, Common::kPlatformDOS },
{ "efe0a04a703e765ebebe92b6c8aa6b86", "baseball2003", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
- { "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformPC },
- { "f06e66fd45b2f8b0f4a2833ff4476050", "fbpack", "", "", -1, Common::HE_ISR, Common::kPlatformPC },
+ { "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformDOS },
+ { "f06e66fd45b2f8b0f4a2833ff4476050", "fbpack", "", "", -1, Common::HE_ISR, Common::kPlatformDOS },
{ "f08145577e4f13584cc90b3d6e9caa55", "pajama3", "", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "f1b0e0d587b85052de5534a3847e68fe", "water", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "f237bf8a5ef9af78b2a6a4f3901da341", "pajama", "", "Demo", 18354, Common::EN_ANY, Common::kPlatformUnknown },
- { "f27b1ba0eadaf2a6617b2b58192d1dbf", "samnmax", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformPC },
+ { "f27b1ba0eadaf2a6617b2b58192d1dbf", "samnmax", "Floppy", "Floppy", -1, Common::DE_DEU, Common::kPlatformDOS },
{ "f2ec78e50bdc63b70044e9758be10914", "spyfox", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformMacintosh },
{ "f3d55aea441e260e9e9c7d2a187097e0", "puttzoo", "", "Demo", 14337, Common::EN_ANY, Common::kPlatformWindows },
{ "f40a7f495f59188ca57a9d1d50301bb6", "puttputt", "HE 60", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh },
@@ -628,7 +632,7 @@ static const MD5Table md5table[] = {
{ "f7711f9264d4d43c2a1518ec7c10a607", "pajama3", "", "", 79382, Common::EN_USA, Common::kPlatformUnknown },
{ "f79e60c17cca601e411f1f75e8ee9b5a", "spyfox2", "", "", 51286, Common::UNK_LANG, Common::kPlatformUnknown },
{ "f8be685007a8b425ba2a455da732f59f", "pajama2", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
- { "fa127d7c4bb47d05bb1c33ddcaa9f767", "loom", "EGA", "EGA", 5748, Common::DE_DEU, Common::kPlatformPC },
+ { "fa127d7c4bb47d05bb1c33ddcaa9f767", "loom", "EGA", "EGA", 5748, Common::DE_DEU, Common::kPlatformDOS },
{ "fa30c4a7a806629626269b6dcab59a15", "BluesBirthday", "HE CUP", "Preview", 7819264, Common::UNK_LANG, Common::kPlatformUnknown },
{ "fa3cb1541f9d7cf99ccbae6249bc150c", "maniac", "NES", "", -1, Common::IT_ITA, Common::kPlatformNES },
{ "fa84cb1018103a4ee4e5fa8041c1d0d1", "freddi4", "", "Demo", 13609, Common::DE_DEU, Common::kPlatformWindows },
@@ -636,8 +640,8 @@ static const MD5Table md5table[] = {
{ "fbb697d89d2beca87360a145f467bdae", "PuttTime", "HE 90", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown },
{ "fbbbb38a81fc9d6a61d509278390a290", "farm", "", "", -1, Common::EN_ANY, Common::kPlatformMacintosh },
{ "fbdd947d21e8f5bac6d6f7a316af1c5a", "spyfox", "", "Demo", 15693, Common::EN_ANY, Common::kPlatformUnknown },
- { "fc53ce0e5f6562b1c1e1b4b8203acafb", "samnmax", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformPC },
- { "fc6b6148e80d67939d9a18697c0f626a", "monkey", "EGA", "EGA", 8367, Common::DE_DEU, Common::kPlatformPC },
+ { "fc53ce0e5f6562b1c1e1b4b8203acafb", "samnmax", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformDOS },
+ { "fc6b6148e80d67939d9a18697c0f626a", "monkey", "EGA", "EGA", 8367, Common::DE_DEU, Common::kPlatformDOS },
{ "fc8d197a22146e74766e9cb0cfcaf1da", "freddi2", "HE 80", "Demo", 27298, Common::EN_ANY, Common::kPlatformUnknown },
{ "fcb78ebecab2757264c590890c319cc5", "PuttTime", "HE 85", "", -1, Common::NL_NLD, Common::kPlatformUnknown },
{ "fce4b8010704b103acfeea9413788f32", "freddi2", "HE 80", "", -1, Common::DE_DEU, Common::kPlatformUnknown },
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 2c79fb8de0..2a14673855 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -61,7 +61,9 @@
#include "scumm/player_v2cms.h"
#include "scumm/player_v2a.h"
#include "scumm/player_v3a.h"
+#include "scumm/player_v3m.h"
#include "scumm/player_v4a.h"
+#include "scumm/player_v5m.h"
#include "scumm/resource.h"
#include "scumm/he/resource_he.h"
#include "scumm/scumm_v0.h"
@@ -1745,7 +1747,7 @@ void ScummEngine::setupMusic(int midi) {
}
if ((_game.id == GID_MONKEY_EGA || (_game.id == GID_LOOM && _game.version == 3))
- && (_game.platform == Common::kPlatformPC) && _sound->_musicType == MDT_MIDI) {
+ && (_game.platform == Common::kPlatformDOS) && _sound->_musicType == MDT_MIDI) {
Common::String fileName;
bool missingFile = false;
if (_game.id == GID_LOOM) {
@@ -1819,6 +1821,12 @@ void ScummEngine::setupMusic(int midi) {
#endif
} else if (_game.platform == Common::kPlatformAmiga && _game.version <= 4) {
_musicEngine = new Player_V4A(this, _mixer);
+ } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_LOOM) {
+ _musicEngine = new Player_V3M(this, _mixer);
+ ((Player_V3M *)_musicEngine)->init();
+ } else if (_game.platform == Common::kPlatformMacintosh && _game.id == GID_MONKEY) {
+ _musicEngine = new Player_V5M(this, _mixer);
+ ((Player_V5M *)_musicEngine)->init();
} else if (_game.id == GID_MANIAC && _game.version == 1) {
_musicEngine = new Player_V1(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK);
} else if (_game.version <= 2) {
@@ -1858,6 +1866,8 @@ void ScummEngine::setupMusic(int midi) {
if (_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS || multi_midi) {
adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_sound->_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
+ // Try to use OPL3 mode for Sam&Max when possible.
+ adlibMidiDriver->property(MidiDriver::PROP_SCUMM_OPL3, (_game.id == GID_SAMNMAX) ? 1 : 0);
} else if (_sound->_musicType == MDT_PCSPK) {
adlibMidiDriver = new PcSpkDriver(_mixer);
}
@@ -2114,7 +2124,7 @@ load_game:
// HACK as in game save stuff isn't supported currently
if (_game.id == GID_LOOM) {
- int args[16];
+ int args[NUM_SCRIPT_LOCAL];
uint var;
memset(args, 0, sizeof(args));
args[0] = 2;
@@ -2502,7 +2512,7 @@ void ScummEngine::restart() {
}
void ScummEngine::runBootscript() {
- int args[16];
+ int args[NUM_SCRIPT_LOCAL];
memset(args, 0, sizeof(args));
args[0] = _bootParam;
if (_game.id == GID_MANIAC && (_game.features & GF_DEMO))
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index a53b808ba1..ce098f07aa 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -920,7 +920,7 @@ void SmushPlayer::handleAnimHeader(int32 subSize, Common::SeekableReadStream &b)
void SmushPlayer::setupAnim(const char *file) {
if (_insanity) {
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC)))
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS)))
readString("mineroad.trs");
} else
readString(file);
@@ -933,7 +933,7 @@ SmushFont *SmushPlayer::getFont(int font) {
return _sf[font];
if (_vm->_game.id == GID_FT) {
- if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformPC))) {
+ if (!((_vm->_game.features & GF_DEMO) && (_vm->_game.platform == Common::kPlatformDOS))) {
const char *ft_fonts[] = {
"scummfnt.nut",
"techfnt.nut",
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index a1cecfa0b3..3f6290f8fc 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -346,29 +346,6 @@ void Sound::playSound(int soundID) {
warning("Scumm::Sound::playSound: encountered audio resoure with chunk type 'SOUN' and sound type %d", type);
}
}
- else if ((_vm->_game.id == GID_LOOM) && (_vm->_game.platform == Common::kPlatformMacintosh)) {
- // Mac version of Loom uses yet another sound format
- /*
- playSound #9 (room 70)
- 000000: 55 00 00 45 73 6f 00 64 01 00 00 00 00 00 00 00 |U..Eso.d........|
- 000010: 00 05 00 8e 2a 8f 2d 1c 2a 8f 2a 8f 2d 1c 00 28 |....*.-.*.*.-..(|
- 000020: 00 31 00 3a 00 43 00 4c 00 01 00 00 00 01 00 64 |.1.:.C.L.......d|
- 000030: 5a 00 01 00 00 00 01 00 64 00 00 01 00 00 00 01 |Z.......d.......|
- 000040: 00 64 5a 00 01 00 00 00 01 00 64 5a 00 01 00 00 |.dZ.......dZ....|
- 000050: 00 01 00 64 00 00 00 00 00 00 00 07 00 00 00 64 |...d...........d|
- 000060: 64 00 00 4e 73 6f 00 64 01 00 00 00 00 00 00 00 |d..Nso.d........|
- 000070: 00 05 00 89 3d 57 2d 1c 3d 57 3d 57 2d 1c 00 28 |....=W-.=W=W-..(|
- playSound #16 (room 69)
- 000000: dc 00 00 a5 73 6f 00 64 01 00 00 00 00 00 00 00 |....so.d........|
- 000010: 00 05 00 00 2a 8f 03 e8 03 e8 03 e8 03 e8 00 28 |....*..........(|
- 000020: 00 79 00 7f 00 85 00 d6 00 01 00 00 00 19 01 18 |.y..............|
- 000030: 2f 00 18 00 01 18 32 00 18 00 01 18 36 00 18 00 |/.....2.....6...|
- 000040: 01 18 3b 00 18 00 01 18 3e 00 18 00 01 18 42 00 |..;.....>.....B.|
- 000050: 18 00 01 18 47 00 18 00 01 18 4a 00 18 00 01 18 |....G.....J.....|
- 000060: 4e 00 10 00 01 18 53 00 10 00 01 18 56 00 10 00 |N.....S.....V...|
- 000070: 01 18 5a 00 10 00 02 28 5f 00 01 00 00 00 00 00 |..Z....(_.......|
- */
- }
else if ((_vm->_game.platform == Common::kPlatformMacintosh) && (_vm->_game.id == GID_INDY3) && READ_BE_UINT16(ptr + 8) == 0x1C) {
// Sound format as used in Indy3 EGA Mac.
// It seems to be closely related to the Amiga format, see player_v3a.cpp
@@ -414,8 +391,7 @@ void Sound::playSound(int soundID) {
}
else {
- if (_vm->_game.id == GID_MONKEY_VGA || _vm->_game.id == GID_MONKEY_EGA
- || (_vm->_game.id == GID_MONKEY && _vm->_game.platform == Common::kPlatformMacintosh)) {
+ if (_vm->_game.id == GID_MONKEY_VGA || _vm->_game.id == GID_MONKEY_EGA) {
// Works around the fact that in some places in MonkeyEGA/VGA,
// the music is never explicitly stopped.
// Rather it seems that starting a new music is supposed to
@@ -1086,9 +1062,6 @@ void Sound::saveLoadWithSerializer(Serializer *ser) {
#pragma mark --- Sound resource handling ---
#pragma mark -
-static void convertMac0Resource(ResourceManager *res, ResId idx, byte *src_ptr, int size);
-
-
/*
* TODO: The way we handle sound/music resources really is one huge hack.
* We probably should reconsider how we do this, and maybe come up with a
@@ -1208,11 +1181,9 @@ int ScummEngine::readSoundResource(ResId idx) {
case MKTAG('M','a','c','0'):
_fileHandle->seek(-12, SEEK_CUR);
total_size = _fileHandle->readUint32BE() - 8;
- ptr = (byte *)calloc(total_size, 1);
+ ptr = _res->createResource(rtSound, idx, total_size);
_fileHandle->read(ptr, total_size);
//dumpResource("sound-", idx, ptr);
- convertMac0Resource(_res, idx, ptr, total_size);
- free(ptr);
return 1;
case MKTAG('M','a','c','1'):
@@ -1445,219 +1416,6 @@ static byte *writeVLQ(byte *ptr, int value) {
return ptr;
}
-static byte Mac0ToGMInstrument(uint32 type, int &transpose) {
- transpose = 0;
- switch (type) {
- case MKTAG('M','A','R','I'): return 12;
- case MKTAG('P','L','U','C'): return 45;
- case MKTAG('H','A','R','M'): return 22;
- case MKTAG('P','I','P','E'): return 19;
- case MKTAG('T','R','O','M'): transpose = -12; return 57;
- case MKTAG('S','T','R','I'): return 48;
- case MKTAG('H','O','R','N'): return 60;
- case MKTAG('V','I','B','E'): return 11;
- case MKTAG('S','H','A','K'): return 77;
- case MKTAG('P','A','N','P'): return 75;
- case MKTAG('W','H','I','S'): return 76;
- case MKTAG('O','R','G','A'): return 17;
- case MKTAG('B','O','N','G'): return 115;
- case MKTAG('B','A','S','S'): transpose = -24; return 35;
- default:
- error("Unknown Mac0 instrument %s found", tag2str(type));
- }
-}
-
-static void convertMac0Resource(ResourceManager *res, ResId idx, byte *src_ptr, int size) {
- /*
- From Markus Magnuson (superqult) we got this information:
- Mac0
- ---
- 4 bytes - 'SOUN'
- BE 4 bytes - block length
-
- 4 bytes - 'Mac0'
- BE 4 bytes - (blockLength - 27)
- 28 bytes - ???
-
- do this three times (once for each channel):
- 4 bytes - 'Chan'
- BE 4 bytes - channel length
- 4 bytes - instrument name (e.g. 'MARI')
-
- do this for ((chanLength-24)/4) times:
- 2 bytes - note duration
- 1 byte - note value
- 1 byte - note velocity
-
- 4 bytes - ???
- 4 bytes - 'Loop'/'Done'
- 4 bytes - ???
-
- 1 byte - 0x09
- ---
-
- Instruments (General Midi):
- "MARI" - Marimba (12)
- "PLUC" - Pizzicato Strings (45)
- "HARM" - Harmonica (22)
- "PIPE" - Church Organ? (19) or Flute? (73) or Bag Pipe (109)
- "TROM" - Trombone (57)
- "STRI" - String Ensemble (48 or 49)
- "HORN" - French Horn? (60) or English Horn? (69)
- "VIBE" - Vibraphone (11)
- "SHAK" - Shakuhachi? (77)
- "PANP" - Pan Flute (75)
- "WHIS" - Whistle (78) / Bottle (76)
- "ORGA" - Drawbar Organ (16; but could also be 17-20)
- "BONG" - Woodblock? (115)
- "BASS" - Bass (32-39)
-
-
- Now the task could be to convert this into MIDI, to be fed into iMuse.
- Or we do something similiar to what is done in Player_V3, assuming
- we can identify SFX in the MI datafiles for each of the instruments
- listed above.
- */
-
-#if 0
- byte *ptr = _res->createResource(rtSound, idx, size);
- memcpy(ptr, src_ptr, size);
-#else
- const int ppqn = 480;
- byte *ptr, *start_ptr;
-
- int total_size = 0;
- total_size += kMIDIHeaderSize; // Header
- total_size += 7; // Tempo META
- total_size += 3 * 3; // Three program change mesages
- total_size += 22; // Possible jump SysEx
- total_size += 5; // EOT META
-
- int i, len;
- byte track_instr[3];
- byte *track_data[3];
- int track_len[3];
- int track_transpose[3];
- bool looped = false;
-
- src_ptr += 8;
- // TODO: Decipher the unknown bytes in the header. For now, skip 'em
- src_ptr += 28;
-
- // Parse the three channels
- for (i = 0; i < 3; i++) {
- assert(READ_BE_UINT32(src_ptr) == MKTAG('C','h','a','n'));
- len = READ_BE_UINT32(src_ptr + 4);
- track_len[i] = len - 24;
- track_instr[i] = Mac0ToGMInstrument(READ_BE_UINT32(src_ptr + 8), track_transpose[i]);
- track_data[i] = src_ptr + 12;
- src_ptr += len;
- looped = (READ_BE_UINT32(src_ptr - 8) == MKTAG('L','o','o','p'));
-
- // For each note event, we need up to 6 bytes for the
- // Note On (3 VLQ, 3 event), and 6 bytes for the Note
- // Off (3 VLQ, 3 event). So 12 bytes total.
- total_size += 12 * track_len[i];
- }
- assert(*src_ptr == 0x09);
-
- // Create sound resource
- start_ptr = res->createResource(rtSound, idx, total_size);
-
- // Insert MIDI header
- ptr = writeMIDIHeader(start_ptr, "GMD ", ppqn, total_size);
-
- // Write a tempo change Meta event
- // 473 / 4 Hz, convert to micro seconds.
- uint32 dw = 1000000 * 437 / 4 / ppqn; // 1000000 * ppqn * 4 / 473;
- memcpy(ptr, "\x00\xFF\x51\x03", 4); ptr += 4;
- *ptr++ = (byte)((dw >> 16) & 0xFF);
- *ptr++ = (byte)((dw >> 8) & 0xFF);
- *ptr++ = (byte)(dw & 0xFF);
-
- // Insert program change messages
- *ptr++ = 0; // VLQ
- *ptr++ = 0xC0;
- *ptr++ = track_instr[0];
- *ptr++ = 0; // VLQ
- *ptr++ = 0xC1;
- *ptr++ = track_instr[1];
- *ptr++ = 0; // VLQ
- *ptr++ = 0xC2;
- *ptr++ = track_instr[2];
-
- // And now, the actual composition. Please turn all cell phones
- // and pagers off during the performance. Thank you.
- uint16 nextTime[3] = { 1, 1, 1 };
- int stage[3] = { 0, 0, 0 };
-
- while (track_len[0] | track_len[1] | track_len[2]) {
- int best = -1;
- uint16 bestTime = 0xFFFF;
- for (i = 0; i < 3; ++i) {
- if (track_len[i] && nextTime[i] < bestTime) {
- bestTime = nextTime[i];
- best = i;
- }
- }
- assert (best != -1);
-
- if (!stage[best]) {
- // We are STARTING this event.
- if (track_data[best][2] > 1) {
- // Note On
- ptr = writeVLQ(ptr, nextTime[best]);
- *ptr++ = 0x90 | best;
- *ptr++ = track_data[best][2] + track_transpose[best];
- *ptr++ = track_data[best][3] * 127 / 100; // Scale velocity
- for (i = 0; i < 3; ++i)
- nextTime[i] -= bestTime;
- }
- nextTime[best] += READ_BE_UINT16 (track_data[best]);
- stage[best] = 1;
- } else {
- // We are ENDING this event.
- if (track_data[best][2] > 1) {
- // There was a Note On, so do a Note Off
- ptr = writeVLQ(ptr, nextTime[best]);
- *ptr++ = 0x80 | best;
- *ptr++ = track_data[best][2] + track_transpose[best];
- *ptr++ = track_data[best][3] * 127 / 100; // Scale velocity
- for (i = 0; i < 3; ++i)
- nextTime[i] -= bestTime;
- }
- track_data[best] += 4;
- track_len[best] -= 4;
- stage[best] = 0;
- }
- }
-
- // Is this a looped song? If so, effect a loop by
- // using the S&M maybe_jump SysEx command.
- // FIXME: Jamieson630: The jump seems to be happening
- // too quickly! There should maybe be a pause after
- // the last Note Off? But I couldn't find one in the
- // MI1 Lookout music, where I was hearing problems.
- if (looped) {
- memcpy(ptr, "\x00\xf0\x13\x7d\x30\00", 6); ptr += 6; // maybe_jump
- memcpy(ptr, "\x00\x00", 2); ptr += 2; // cmd -> 0 means always jump
- memcpy(ptr, "\x00\x00\x00\x00", 4); ptr += 4; // track -> 0 (only track)
- memcpy(ptr, "\x00\x00\x00\x01", 4); ptr += 4; // beat -> 1 (first beat)
- memcpy(ptr, "\x00\x00\x00\x01", 4); ptr += 4; // tick -> 1
- memcpy(ptr, "\x00\xf7", 2); ptr += 2; // SysEx end marker
- }
-
- // Insert end of song META
- memcpy(ptr, "\x00\xff\x2f\x00\x00", 5); ptr += 5;
-
- assert(ptr <= start_ptr + total_size);
-
- // Rewrite MIDI header, this time with true size
- total_size = ptr - start_ptr;
- ptr = writeMIDIHeader(start_ptr, "GMD ", ppqn, total_size);
-#endif
-}
-
static void convertADResource(ResourceManager *res, const GameSettings& game, ResId idx, byte *src_ptr, int size) {
// We will ignore the PPQN in the original resource, because
// it's invalid anyway. We use a constant PPQN of 480.
@@ -2057,7 +1815,7 @@ int ScummEngine::readSoundResourceSmallHeader(ResId idx) {
debug(4, "readSoundResourceSmallHeader(%d)", idx);
- if ((_game.id == GID_LOOM) && (_game.version == 3) && (_game.platform == Common::kPlatformPC) && VAR(VAR_SOUNDCARD) == 4) {
+ if ((_game.id == GID_LOOM) && (_game.version == 3) && (_game.platform == Common::kPlatformDOS) && VAR(VAR_SOUNDCARD) == 4) {
// Roland resources in Loom are tagless
// So we add an RO tag to allow imuse to detect format
byte *ptr, *src_ptr;
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 6d132c601f..77c7daa0df 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -741,7 +741,7 @@ void ScummEngine::resetScummVars() {
break;
default:
if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_LOOM && _game.version == 3))
- && (_game.platform == Common::kPlatformPC)) {
+ && (_game.platform == Common::kPlatformDOS)) {
VAR(VAR_SOUNDCARD) = 4;
} else {
VAR(VAR_SOUNDCARD) = 3;
@@ -770,7 +770,7 @@ void ScummEngine::resetScummVars() {
// Set screen size for the Macintosh version of Indy3/Loom
VAR(39) = 320;
}
- if (_game.platform == Common::kPlatformPC && _game.id == GID_LOOM && _game.version == 3) {
+ if (_game.platform == Common::kPlatformDOS && _game.id == GID_LOOM && _game.version == 3) {
// Set number of sound resources
VAR(39) = 80;
}
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/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index b388afdb13..944edb1fdc 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -44,9 +44,9 @@ MusicBase::~MusicBase() {
}
void MusicBase::loadSection(uint8 pSection) {
- Common::StackLock lock(_mutex);
if (_currentMusic)
stopMusicInternal();
+ Common::StackLock lock(_mutex);
free(_musicData);
_currentSection = pSection;
_musicData = _skyDisk->loadFile(_driverFileBase + FILES_PER_SECTION * pSection);
@@ -70,13 +70,14 @@ bool MusicBase::musicIsPlaying() {
}
void MusicBase::stopMusic() {
- Common::StackLock lock(_mutex);
stopMusicInternal();
}
void MusicBase::stopMusicInternal() {
_mixer->stopHandle(_musicHandle);
+ Common::StackLock lock(_mutex);
+
for (uint8 cnt = 0; cnt < _numberOfChannels; cnt++)
delete _channels[cnt];
_numberOfChannels = 0;
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index fd90015aa3..4c47dfafc7 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -187,9 +187,14 @@ Common::Error SkyEngine::go() {
}
if (!shouldQuit()) {
- _skyLogic->initScreen0();
+ // restartGame() takes us to the first scene, without showing the
+ // initial animation where Foster is being chased. initScreen0()
+ // shows the first scene together with that animation. We can't
+ // call both, as they both load the same scene.
if (introSkipped)
_skyControl->restartGame();
+ else
+ _skyLogic->initScreen0();
}
}
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index ff3c897dba..206bd68b07 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -98,7 +98,7 @@ static const char *const sequenceListPSX[20] = {
///////////////////////////////////////////////////////////////////////////////
MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, OSystem *system, Video::VideoDecoder *decoder, DecoderType decoderType)
- : _vm(vm), _textMan(textMan), _resMan(resMan), _system(system) {
+ : _vm(vm), _textMan(textMan), _resMan(resMan), _system(system), _textX(0), _textY(0), _textWidth(0), _textHeight(0), _textColor(1) {
_decoderType = decoderType;
_decoder = decoder;
diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp
index 603efd308e..4c55f8d990 100644
--- a/engines/sword1/console.cpp
+++ b/engines/sword1/console.cpp
@@ -26,6 +26,7 @@
namespace Sword1 {
SwordConsole::SwordConsole(SwordEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
SwordConsole::~SwordConsole() {
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 7cd85dff54..80d8edc1dd 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -856,10 +856,8 @@ bool Control::savegamesExist() {
void Control::checkForOldSaveGames() {
Common::InSaveFile *inf = _saveFileMan->openForLoading("SAVEGAME.INF");
- if (!inf) {
- delete inf;
+ if (!inf)
return;
- }
GUI::MessageDialog dialog0(
_("ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n"
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 5662e4672b..f3af04c81d 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -143,9 +143,24 @@ GameDescriptor SwordMetaEngine::findGame(const char *gameid) const {
return GameDescriptor();
}
-void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound) {
+void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound, bool recursion = false) {
for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
+ // The required game data files can be located in the game directory, or in
+ // a subdirectory called "clusters". In the latter case, we don't want to
+ // detect the game in that subdirectory, as this will detect the game twice
+ // when mass add is searching inside a directory. In this case, the first
+ // result (the game directory) will be correct, but the second result (the
+ // clusters subdirectory) will be wrong, as the optional speech, music and
+ // video data files will be ignored. Note that this fix will skip the game
+ // data files if the user has placed them inside a "clusters" subdirectory,
+ // or if he/she points ScummVM directly to the "clusters" directory of the
+ // game CD. Fixes bug #3049346.
+ Common::String directory = file->getParent().getName();
+ directory.toLowercase();
+ if (directory.hasPrefix("clusters") && directory.size() <= 9 && !recursion)
+ continue;
+
const char *fileName = file->getName().c_str();
for (int cnt = 0; cnt < NUM_FILES_TO_CHECK; cnt++)
if (scumm_stricmp(fileName, g_filesToCheck[cnt]) == 0)
@@ -155,7 +170,7 @@ void Sword1CheckDirectory(const Common::FSList &fslist, bool *filesFound) {
if (scumm_stricmp(file->getName().c_str(), g_dirNames[cnt]) == 0) {
Common::FSList fslist2;
if (file->getChildren(fslist2, Common::FSNode::kListFilesOnly))
- Sword1CheckDirectory(fslist2, filesFound);
+ Sword1CheckDirectory(fslist2, filesFound, true);
}
}
}
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index 878ba8eceb..7222965c9d 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -227,7 +227,10 @@ Header *ResMan::lockScript(uint32 scrID) {
#else
openScriptResourceLittleEndian(scrID);
#endif
- return (Header *)resHandle(scrID)->data;
+ MemHandle *handle = resHandle(scrID);
+ if (!handle)
+ error("Script resource handle %d not found", scrID);
+ return (Header *)handle->data;
}
void ResMan::unlockScript(uint32 scrID) {
@@ -343,8 +346,8 @@ MemHandle *ResMan::resHandle(uint32 id) {
uint8 cluster = (uint8)((id >> 24) - 1);
uint8 group = (uint8)(id >> 16);
- // There is a know case of reading beyond array boundaries when trying to use
- // portuguese subtitles (cluster file 2, group 6) with a version that do not
+ // There is a known case of reading beyond array boundaries when trying to use
+ // portuguese subtitles (cluster file 2, group 6) with a version that does not
// contain subtitles for this languages (i.e. has only 6 languages and not 7).
if (cluster >= _prj.noClu || group >= _prj.clu[cluster].noGrp)
return NULL;
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 61bf5257ab..268da74508 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -45,9 +45,8 @@ namespace Sword1 {
#define SOUND_SPEECH_ID 1
#define SPEECH_FLAGS (Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN)
-Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan)
+Sound::Sound(Audio::Mixer *mixer, ResMan *pResMan)
: _rnd("sword1sound") {
- strcpy(_filePath, searchPath);
_mixer = mixer;
_resMan = pResMan;
_bigEndianSpeech = false;
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index 4e1ac7ba34..b52d89f390 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -80,7 +80,7 @@ enum CowMode {
class Sound {
public:
- Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan);
+ Sound(Audio::Mixer *mixer, ResMan *pResMan);
~Sound();
void setSpeechVol(uint8 volL, uint8 volR) { _speechVolL = volL; _speechVolR = volR; }
void setSfxVol(uint8 volL, uint8 volR) { _sfxVolL = volL; _sfxVolR = volR; }
@@ -125,7 +125,6 @@ private:
Audio::Mixer *_mixer;
ResMan *_resMan;
bool _bigEndianSpeech;
- char _filePath[100];
static const char _musicList[270];
static const uint16 _roomsFixedFx[TOTAL_ROOMS][TOTAL_FX_PER_ROOM];
static const FxDef _fxList[312];
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index fa593b8df4..2d5452778d 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -104,7 +104,7 @@ Common::Error SwordEngine::init() {
_mouse = new Mouse(_system, _resMan, _objectMan);
_screen = new Screen(_system, _resMan, _objectMan);
_music = new Music(_mixer);
- _sound = new Sound("", _mixer, _resMan);
+ _sound = new Sound(_mixer, _resMan);
_menu = new Menu(_screen, _mouse);
_logic = new Logic(this, _objectMan, _resMan, _screen, _mouse, _sound, _music, _menu, _system, _mixer);
_mouse->useLogicAndMenu(_logic, _menu);
diff --git a/engines/sword2/console.cpp b/engines/sword2/console.cpp
index 28e2e8ce7b..4838bd15f6 100644
--- a/engines/sword2/console.cpp
+++ b/engines/sword2/console.cpp
@@ -173,7 +173,7 @@ bool Debugger::Cmd_Mem(int argc, const char **argv) {
int16 numBlocks = _vm->_memory->getNumBlocks();
MemBlock *memBlocks = _vm->_memory->getMemBlocks();
- MemBlock **blocks = (MemBlock **)malloc(numBlocks * sizeof(MemBlock));
+ MemBlock **blocks = (MemBlock **)malloc(numBlocks * sizeof(MemBlock *));
int i, j;
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index 3611294eb8..a4b540ac7b 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -117,8 +117,6 @@ private:
Glyph _glyph[SIZE_OF_CHAR_SET];
- int _fontId;
-
public:
enum {
kAlignLeft,
@@ -142,7 +140,7 @@ public:
};
FontRendererGui::FontRendererGui(Sword2Engine *vm, int fontId)
- : _vm(vm), _fontId(fontId) {
+ : _vm(vm) {
byte *font = _vm->_resman->openResource(fontId);
SpriteInfo sprite;
diff --git a/engines/sword2/memory.cpp b/engines/sword2/memory.cpp
index 5fd2d4e78e..391983930d 100644
--- a/engines/sword2/memory.cpp
+++ b/engines/sword2/memory.cpp
@@ -52,7 +52,7 @@
namespace Sword2 {
-MemoryManager::MemoryManager(Sword2Engine *vm) : _vm(vm) {
+MemoryManager::MemoryManager() {
// The id stack contains all the possible ids for the memory blocks.
// We use this to ensure that no two blocks ever have the same id.
diff --git a/engines/sword2/memory.h b/engines/sword2/memory.h
index 3f511dd5db..250da138c2 100644
--- a/engines/sword2/memory.h
+++ b/engines/sword2/memory.h
@@ -40,8 +40,6 @@ struct MemBlock {
class MemoryManager {
private:
- Sword2Engine *_vm;
-
MemBlock *_memBlocks;
MemBlock **_memBlockIndex;
int16 _numBlocks;
@@ -56,7 +54,7 @@ private:
int16 findInsertionPointInIndex(byte *ptr);
public:
- MemoryManager(Sword2Engine *vm);
+ MemoryManager();
~MemoryManager();
int16 getNumBlocks() { return _numBlocks; }
diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp
index c3a3d24075..9634d3af10 100644
--- a/engines/sword2/palette.cpp
+++ b/engines/sword2/palette.cpp
@@ -288,19 +288,17 @@ void Screen::fadeServer() {
}
void Screen::setSystemPalette(const byte *colors, uint start, uint num) {
- const byte *palette;
-
if (_dimPalette) {
byte pal[256 * 3];
for (uint i = start * 3; i < 3 * (start + num); i++)
pal[i] = colors[i] / 2;
- palette = pal;
- } else
- palette = colors;
+ _vm->_system->getPaletteManager()->setPalette(pal, start, num);
+ } else {
+ _vm->_system->getPaletteManager()->setPalette(colors, start, num);
+ }
- _vm->_system->getPaletteManager()->setPalette(palette, start, num);
}
} // End of namespace Sword2
diff --git a/engines/sword2/sound.h b/engines/sword2/sound.h
index 9a59ef27a8..e250707fb9 100644
--- a/engines/sword2/sound.h
+++ b/engines/sword2/sound.h
@@ -142,7 +142,6 @@ private:
bool _looping;
int32 _fading;
int32 _fadeSamples;
- bool _paused;
void refill();
diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index 91a5e2e86b..5e25a86d75 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -590,8 +590,11 @@ int32 Screen::drawSprite(SpriteInfo *s) {
s->w = (decompData / (s->h / 2));
sprite = (byte *)malloc(s->w * s->h);
- if (!sprite)
+ if (!sprite) {
+ free(tempBuf);
+
return RDERR_OUTOFMEMORY;
+ }
resizePsxSprite(sprite, tempBuf, s->w, s->h);
free(tempBuf);
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 458a2d33ed..3375dda312 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -144,22 +144,52 @@ GameDescriptor Sword2MetaEngine::findGame(const char *gameid) const {
return GameDescriptor(g->gameid, g->description);
}
-GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
+bool isFullGame(const Common::FSList &fslist) {
+ Common::FSList::const_iterator file;
+
+ // We distinguish between the two versions by the presense of paris.clu
+ for (file = fslist.begin(); file != fslist.end(); ++file) {
+ if (!file->isDirectory()) {
+ if (file->getName().equalsIgnoreCase("paris.clu"))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+GameList detectGamesImpl(const Common::FSList &fslist, bool recursion = false) {
GameList detectedGames;
const Sword2::GameSettings *g;
Common::FSList::const_iterator file;
-
- // TODO: It would be nice if we had code here which distinguishes
- // between the 'sword2' and 'sword2demo' targets. The current code
- // can't do that since they use the same detectname.
+ bool isFullVersion = isFullGame(fslist);
for (g = Sword2::sword2_settings; g->gameid; ++g) {
// Iterate over all files in the given directory
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (!file->isDirectory()) {
- const char *fileName = file->getName().c_str();
+ // The required game data files can be located in the game directory, or in
+ // a subdirectory called "clusters". In the latter case, we don't want to
+ // detect the game in that subdirectory, as this will detect the game twice
+ // when mass add is searching inside a directory. In this case, the first
+ // result (the game directory) will be correct, but the second result (the
+ // clusters subdirectory) will be wrong, as the optional speech, music and
+ // video data files will be ignored. Note that this fix will skip the game
+ // data files if the user has placed them inside a "clusters" subdirectory,
+ // or if he/she points ScummVM directly to the "clusters" directory of the
+ // game CD. Fixes bug #3049336.
+ Common::String directory = file->getParent().getName();
+ directory.toLowercase();
+ if (directory.hasPrefix("clusters") && directory.size() <= 9 && !recursion)
+ continue;
+
+ if (file->getName().equalsIgnoreCase(g->detectname)) {
+ // Make sure that the sword2 demo is not mixed up with the
+ // full version, since they use the same filename for detection
+ if ((g->features == Sword2::GF_DEMO && isFullVersion) ||
+ (g->features == 0 && !isFullVersion))
+ continue;
- if (0 == scumm_stricmp(g->detectname, fileName)) {
// Match found, add to list of candidates, then abort inner loop.
detectedGames.push_back(GameDescriptor(g->gameid, g->description, Common::UNK_LANG, Common::kPlatformUnknown, GUIO2(GUIO_NOMIDI, GUIO_NOASPECT)));
break;
@@ -174,12 +204,10 @@ GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
// present e.g. if the user copied the data straight from CD.
for (file = fslist.begin(); file != fslist.end(); ++file) {
if (file->isDirectory()) {
- const char *fileName = file->getName().c_str();
-
- if (0 == scumm_stricmp("clusters", fileName)) {
+ if (file->getName().equalsIgnoreCase("clusters")) {
Common::FSList recList;
if (file->getChildren(recList, Common::FSNode::kListAll)) {
- GameList recGames(detectGames(recList));
+ GameList recGames(detectGamesImpl(recList, true));
if (!recGames.empty()) {
detectedGames.push_back(recGames);
break;
@@ -194,6 +222,10 @@ GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
return detectedGames;
}
+GameList Sword2MetaEngine::detectGames(const Common::FSList &fslist) const {
+ return detectGamesImpl(fslist);
+}
+
SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Common::StringArray filenames;
@@ -282,7 +314,7 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst), _rnd("sword2") {
if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psx") || !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psxdemo"))
Sword2Engine::_platform = Common::kPlatformPSX;
else
- Sword2Engine::_platform = Common::kPlatformPC;
+ Sword2Engine::_platform = Common::kPlatformWindows;
_bootParam = ConfMan.getInt("boot_param");
_saveSlot = ConfMan.getInt("save_slot");
@@ -418,7 +450,7 @@ Common::Error Sword2Engine::run() {
_debugger = new Debugger(this);
- _memory = new MemoryManager(this);
+ _memory = new MemoryManager();
_resman = new ResourceManager(this);
if (!_resman->init())
diff --git a/engines/sword25/console.cpp b/engines/sword25/console.cpp
index 5d15f189ab..f1b91d2bc2 100644
--- a/engines/sword25/console.cpp
+++ b/engines/sword25/console.cpp
@@ -26,6 +26,7 @@
namespace Sword25 {
Sword25Console::Sword25Console(Sword25Engine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
Sword25Console::~Sword25Console() {
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp
index 22a4dfb71b..1660c393c0 100644
--- a/engines/sword25/gfx/animation.cpp
+++ b/engines/sword25/gfx/animation.cpp
@@ -170,7 +170,7 @@ void Animation::setFrame(uint nr) {
forceRefresh();
}
-bool Animation::doRender() {
+bool Animation::doRender(RectangleList *updateRects) {
AnimationDescription *animationDescriptionPtr = getAnimationDescription();
assert(animationDescriptionPtr);
assert(_currentFrame < animationDescriptionPtr->getFrameCount());
@@ -191,12 +191,14 @@ bool Animation::doRender() {
result = pBitmapResource->blit(_absoluteX, _absoluteY,
(animationDescriptionPtr->getFrame(_currentFrame).flipV ? BitmapResource::FLIP_V : 0) |
(animationDescriptionPtr->getFrame(_currentFrame).flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, _width, _height);
+ 0, _modulationColor, _width, _height,
+ updateRects);
} else {
result = pBitmapResource->blit(_absoluteX, _absoluteY,
(animationDescriptionPtr->getFrame(_currentFrame).flipV ? BitmapResource::FLIP_V : 0) |
(animationDescriptionPtr->getFrame(_currentFrame).flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, -1, -1);
+ 0, _modulationColor, -1, -1,
+ updateRects);
}
// Resource freigeben
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index 60070be214..44255e3b64 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -151,7 +151,7 @@ public:
void setCallbacks();
protected:
- virtual bool doRender();
+ virtual bool doRender(RectangleList *updateRects);
private:
enum Direction {
diff --git a/engines/sword25/gfx/bitmapresource.h b/engines/sword25/gfx/bitmapresource.h
index f1278f3885..72b8a3ea1f 100644
--- a/engines/sword25/gfx/bitmapresource.h
+++ b/engines/sword25/gfx/bitmapresource.h
@@ -123,9 +123,10 @@ public:
int flipping = FLIP_NONE,
Common::Rect *pSrcPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
- int width = -1, int height = -1) {
+ int width = -1, int height = -1,
+ RectangleList *updateRects = 0) {
assert(_pImage);
- return _pImage->blit(posX, posY, flipping, pSrcPartRect, color, width, height);
+ return _pImage->blit(posX, posY, flipping, pSrcPartRect, color, width, height, updateRects);
}
/**
@@ -202,6 +203,11 @@ public:
return _pImage->isColorModulationAllowed();
}
+ bool isSolid() {
+ assert(_pImage);
+ return _pImage->isSolid();
+ }
+
private:
Image *_pImage;
};
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp
index 137d943575..242508bf85 100644
--- a/engines/sword25/gfx/dynamicbitmap.cpp
+++ b/engines/sword25/gfx/dynamicbitmap.cpp
@@ -53,10 +53,13 @@ DynamicBitmap::DynamicBitmap(InputPersistenceBlock &reader, RenderObjectPtr<Rend
bool DynamicBitmap::createRenderedImage(uint width, uint height) {
bool result = false;
_image.reset(new RenderedImage(width, height, result));
-
+
_originalWidth = _width = width;
_originalHeight = _height = height;
+ _image->setIsTransparent(false);
+ _isSolid = true;
+
return result;
}
@@ -70,11 +73,11 @@ uint DynamicBitmap::getPixel(int x, int y) const {
return _image->getPixel(x, y);
}
-bool DynamicBitmap::doRender() {
+bool DynamicBitmap::doRender(RectangleList *updateRects) {
// Get the frame buffer object
GraphicEngine *pGfx = Kernel::getInstance()->getGfx();
assert(pGfx);
-
+
// Draw the bitmap
bool result;
if (_scaleFactorX == 1.0f && _scaleFactorY == 1.0f) {
@@ -85,7 +88,8 @@ bool DynamicBitmap::doRender() {
result = _image->blit(_absoluteX, _absoluteY,
(_flipV ? BitmapResource::FLIP_V : 0) |
(_flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, -1, -1);
+ 0, _modulationColor, -1, -1,
+ updateRects);
#else
// WIP: A bit faster code
@@ -103,13 +107,15 @@ bool DynamicBitmap::doRender() {
result = _image->blit(_absoluteX, _absoluteY,
(_flipV ? BitmapResource::FLIP_V : 0) |
(_flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, _width, _height);
+ 0, _modulationColor, _width, _height,
+ updateRects);
}
return result;
}
bool DynamicBitmap::setContent(const byte *pixeldata, uint size, uint offset, uint stride) {
+ ++_version; // Update version to display the new video image
return _image->setContent(pixeldata, size, offset, stride);
}
diff --git a/engines/sword25/gfx/dynamicbitmap.h b/engines/sword25/gfx/dynamicbitmap.h
index 35ed9a9341..ed53776577 100644
--- a/engines/sword25/gfx/dynamicbitmap.h
+++ b/engines/sword25/gfx/dynamicbitmap.h
@@ -59,7 +59,7 @@ public:
virtual bool unpersist(InputPersistenceBlock &reader);
protected:
- virtual bool doRender();
+ virtual bool doRender(RectangleList *updateRects);
private:
DynamicBitmap(RenderObjectPtr<RenderObject> parentPtr, uint width, uint height);
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 6f5da32bc4..bfdb51481b 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -216,7 +216,6 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
}
}
- g_system->copyRectToScreen(_backSurface.getBasePtr(rect.left, rect.top), _backSurface.pitch, rect.left, rect.top, rect.width(), rect.height());
}
return true;
@@ -376,10 +375,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/gfx/image/image.h b/engines/sword25/gfx/image/image.h
index f1934656da..9d7fc43251 100644
--- a/engines/sword25/gfx/image/image.h
+++ b/engines/sword25/gfx/image/image.h
@@ -46,6 +46,8 @@
namespace Sword25 {
+class RectangleList;
+
class Image {
public:
virtual ~Image() {}
@@ -129,7 +131,8 @@ public:
int flipping = FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
- int width = -1, int height = -1) = 0;
+ int width = -1, int height = -1,
+ RectangleList *updateRects = 0) = 0;
/**
@brief fills a rectangular section of the image with a color.
@@ -202,6 +205,8 @@ public:
@brief Returns true, if the content of the BS_Image is allowed to be replaced by call of SetContent().
*/
virtual bool isSetContentAllowed() const = 0;
+
+ virtual bool isSolid() const { return false; }
//@}
};
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index 27ee4ef182..c8a6666046 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -38,6 +38,8 @@
#include "sword25/gfx/image/imgloader.h"
#include "sword25/gfx/image/renderedimage.h"
+#include "sword25/gfx/renderobjectmanager.h"
+
#include "common/system.h"
namespace Sword25 {
@@ -99,7 +101,8 @@ static byte *readSavegameThumbnail(const Common::String &filename, uint &fileSiz
RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
_data(0),
_width(0),
- _height(0) {
+ _height(0),
+ _isTransparent(true) {
result = false;
PackageManager *pPackage = Kernel::getInstance()->getPackage();
@@ -142,6 +145,11 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
_doCleanup = true;
+#if defined(SCUMM_LITTLE_ENDIAN)
+ // Makes sense for LE only at the moment
+ checkForTransparency();
+#endif
+
return;
}
@@ -149,7 +157,8 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
RenderedImage::RenderedImage(uint width, uint height, bool &result) :
_width(width),
- _height(height) {
+ _height(height),
+ _isTransparent(true) {
_data = new byte[width * height * 4];
Common::fill(_data, &_data[width * height * 4], 0);
@@ -162,7 +171,7 @@ RenderedImage::RenderedImage(uint width, uint height, bool &result) :
return;
}
-RenderedImage::RenderedImage() : _width(0), _height(0), _data(0) {
+RenderedImage::RenderedImage() : _width(0), _height(0), _data(0), _isTransparent(true) {
_backSurface = Kernel::getInstance()->getGfx()->getSurface();
_doCleanup = false;
@@ -219,7 +228,7 @@ uint RenderedImage::getPixel(int x, int y) {
// -----------------------------------------------------------------------------
-bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height) {
+bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRect, uint color, int width, int height, RectangleList *updateRects) {
int ca = (color >> 24) & 0xff;
// Check if we need to draw anything at all
@@ -282,156 +291,175 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
img = &srcImage;
}
- // Handle off-screen clipping
- if (posY < 0) {
- img->h = MAX(0, (int)img->h - -posY);
- img->pixels = (byte *)img->pixels + img->pitch * -posY;
- posY = 0;
- }
-
- if (posX < 0) {
- img->w = MAX(0, (int)img->w - -posX);
- img->pixels = (byte *)img->pixels + (-posX * 4);
- posX = 0;
- }
-
- img->w = CLIP((int)img->w, 0, (int)MAX((int)_backSurface->w - posX, 0));
- img->h = CLIP((int)img->h, 0, (int)MAX((int)_backSurface->h - posY, 0));
-
- if ((img->w > 0) && (img->h > 0)) {
- int xp = 0, yp = 0;
-
- int inStep = 4;
- int inoStep = img->pitch;
- if (flipping & Image::FLIP_V) {
- inStep = -inStep;
- xp = img->w - 1;
+ for (RectangleList::iterator it = updateRects->begin(); it != updateRects->end(); ++it) {
+ const Common::Rect &clipRect = *it;
+
+ int skipLeft = 0, skipTop = 0;
+ int drawX = posX, drawY = posY;
+ int drawWidth = img->w;
+ int drawHeight = img->h;
+
+ // Handle clipping
+ if (drawX < clipRect.left) {
+ skipLeft = clipRect.left - drawX;
+ drawWidth -= skipLeft;
+ drawX = clipRect.left;
}
-
- if (flipping & Image::FLIP_H) {
- inoStep = -inoStep;
- yp = img->h - 1;
+
+ if (drawY < clipRect.top) {
+ skipTop = clipRect.top - drawY;
+ drawHeight -= skipTop;
+ drawY = clipRect.top;
}
- byte *ino = (byte *)img->getBasePtr(xp, yp);
- byte *outo = (byte *)_backSurface->getBasePtr(posX, posY);
- byte *in, *out;
-
- for (int i = 0; i < img->h; i++) {
- out = outo;
- in = ino;
- for (int j = 0; j < img->w; j++) {
- uint32 pix = *(uint32 *)in;
- int b = (pix >> 0) & 0xff;
- int g = (pix >> 8) & 0xff;
- int r = (pix >> 16) & 0xff;
- int a = (pix >> 24) & 0xff;
- in += inStep;
-
- if (ca != 255) {
- a = a * ca >> 8;
- }
+ if (drawX + drawWidth >= clipRect.right)
+ drawWidth = clipRect.right - drawX;
+
+ if (drawY + drawHeight >= clipRect.bottom)
+ drawHeight = clipRect.bottom - drawY;
+
+ if ((drawWidth > 0) && (drawHeight > 0)) {
+ int xp = 0, yp = 0;
+
+ int inStep = 4;
+ int inoStep = img->pitch;
+ if (flipping & Image::FLIP_V) {
+ inStep = -inStep;
+ xp = img->w - 1 - skipLeft;
+ } else {
+ xp = skipLeft;
+ }
+
+ if (flipping & Image::FLIP_H) {
+ inoStep = -inoStep;
+ yp = img->h - 1 - skipTop;
+ } else {
+ yp = skipTop;
+ }
+
+ byte *ino = (byte *)img->getBasePtr(xp, yp);
+ byte *outo = (byte *)_backSurface->getBasePtr(drawX, drawY);
- switch (a) {
- case 0: // Full transparency
- out += 4;
- break;
- case 255: // Full opacity
#if defined(SCUMM_LITTLE_ENDIAN)
- if (cb != 255)
- *out++ = (b * cb) >> 8;
- else
- *out++ = b;
-
- if (cg != 255)
- *out++ = (g * cg) >> 8;
- else
- *out++ = g;
-
- if (cr != 255)
- *out++ = (r * cr) >> 8;
- else
- *out++ = r;
-
- *out++ = a;
+ // Simple memcpy if the source bitmap doesn't have transparent pixels and the drawing transparency is 255
+ // NOTE Only possible with LE-machines at the moment, maybe it would be feasible to convert the bitmap pixels at loading time?
+ if (!_isTransparent && ca == 255) {
+ for (int i = 0; i < drawHeight; i++) {
+ memcpy(outo, ino, drawWidth * 4);
+ outo += _backSurface->pitch;
+ ino += inoStep;
+ }
+ } else
+#endif
+ {
+ byte *in, *out;
+ for (int i = 0; i < drawHeight; i++) {
+ out = outo;
+ in = ino;
+ for (int j = 0; j < drawWidth; j++) {
+ uint32 pix = *(uint32 *)in;
+ int a = (pix >> 24) & 0xff;
+ in += inStep;
+
+ if (ca != 255) {
+ a = a * ca >> 8;
+ }
+
+ if (a == 0) {
+ // Full transparency
+ out += 4;
+ continue;
+ }
+
+ int b = (pix >> 0) & 0xff;
+ int g = (pix >> 8) & 0xff;
+ int r = (pix >> 16) & 0xff;
+
+ if (a == 255) {
+#if defined(SCUMM_LITTLE_ENDIAN)
+ if (cb != 255)
+ b = (b * cb) >> 8;
+ if (cg != 255)
+ g = (g * cg) >> 8;
+ if (cr != 255)
+ r = (r * cr) >> 8;
+ *(uint32 *)out = (255 << 24) | (r << 16) | (g << 8) | b;
+ out += 4;
#else
- *out++ = a;
-
- if (cr != 255)
- *out++ = (r * cr) >> 8;
- else
- *out++ = r;
-
- if (cg != 255)
- *out++ = (g * cg) >> 8;
- else
- *out++ = g;
-
- if (cb != 255)
- *out++ = (b * cb) >> 8;
- else
- *out++ = b;
+ *out++ = a;
+ if (cr != 255)
+ *out++ = (r * cr) >> 8;
+ else
+ *out++ = r;
+ if (cg != 255)
+ *out++ = (g * cg) >> 8;
+ else
+ *out++ = g;
+ if (cb != 255)
+ *out++ = (b * cb) >> 8;
+ else
+ *out++ = b;
#endif
- break;
-
- default: // alpha blending
+ } else {
#if defined(SCUMM_LITTLE_ENDIAN)
- if (cb == 0)
- *out = 0;
- else if (cb != 255)
- *out += ((b - *out) * a * cb) >> 16;
- else
- *out += ((b - *out) * a) >> 8;
- out++;
- if (cg == 0)
- *out = 0;
- else if (cg != 255)
- *out += ((g - *out) * a * cg) >> 16;
- else
- *out += ((g - *out) * a) >> 8;
- out++;
- if (cr == 0)
- *out = 0;
- else if (cr != 255)
- *out += ((r - *out) * a * cr) >> 16;
- else
- *out += ((r - *out) * a) >> 8;
- out++;
- *out = 255;
- out++;
+ pix = *(uint32 *)out;
+ int outb = (pix >> 0) & 0xff;
+ int outg = (pix >> 8) & 0xff;
+ int outr = (pix >> 16) & 0xff;
+ if (cb == 0)
+ outb = 0;
+ else if (cb != 255)
+ outb += ((b - outb) * a * cb) >> 16;
+ else
+ outb += ((b - outb) * a) >> 8;
+ if (cg == 0)
+ outg = 0;
+ else if (cg != 255)
+ outg += ((g - outg) * a * cg) >> 16;
+ else
+ outg += ((g - outg) * a) >> 8;
+ if (cr == 0)
+ outr = 0;
+ else if (cr != 255)
+ outr += ((r - outr) * a * cr) >> 16;
+ else
+ outr += ((r - outr) * a) >> 8;
+ *(uint32 *)out = (255 << 24) | (outr << 16) | (outg << 8) | outb;
+ out += 4;
#else
- *out = 255;
- out++;
- if (cr == 0)
- *out = 0;
- else if (cr != 255)
- *out += ((r - *out) * a * cr) >> 16;
- else
- *out += ((r - *out) * a) >> 8;
- out++;
- if (cg == 0)
- *out = 0;
- else if (cg != 255)
- *out += ((g - *out) * a * cg) >> 16;
- else
- *out += ((g - *out) * a) >> 8;
- out++;
- if (cb == 0)
- *out = 0;
- else if (cb != 255)
- *out += ((b - *out) * a * cb) >> 16;
- else
- *out += ((b - *out) * a) >> 8;
- out++;
+ *out = 255;
+ out++;
+ if (cr == 0)
+ *out = 0;
+ else if (cr != 255)
+ *out += ((r - *out) * a * cr) >> 16;
+ else
+ *out += ((r - *out) * a) >> 8;
+ out++;
+ if (cg == 0)
+ *out = 0;
+ else if (cg != 255)
+ *out += ((g - *out) * a * cg) >> 16;
+ else
+ *out += ((g - *out) * a) >> 8;
+ out++;
+ if (cb == 0)
+ *out = 0;
+ else if (cb != 255)
+ *out += ((b - *out) * a * cb) >> 16;
+ else
+ *out += ((b - *out) * a) >> 8;
+ out++;
#endif
+ }
+ }
+ outo += _backSurface->pitch;
+ ino += inoStep;
}
}
- outo += _backSurface->pitch;
- ino += inoStep;
- }
- g_system->copyRectToScreen(_backSurface->getBasePtr(posX, posY), _backSurface->pitch, posX, posY,
- img->w, img->h);
+ }
+
}
if (imgScaled) {
@@ -467,6 +495,20 @@ void RenderedImage::copyDirectly(int posX, int posY) {
g_system->copyRectToScreen(data, _backSurface->pitch, posX, posY, w, h);
}
+void RenderedImage::checkForTransparency() {
+ // Check if the source bitmap has any transparent pixels at all
+ _isTransparent = false;
+ byte *data = _data;
+ for (int i = 0; i < _height; i++) {
+ for (int j = 0; j < _width; j++) {
+ _isTransparent = data[3] != 0xff;
+ if (_isTransparent)
+ return;
+ data += 4;
+ }
+ }
+}
+
/**
* Scales a passed surface, creating a new surface with the result
* @param srcImage Source image to scale
diff --git a/engines/sword25/gfx/image/renderedimage.h b/engines/sword25/gfx/image/renderedimage.h
index f92a5b39b4..a25b258592 100644
--- a/engines/sword25/gfx/image/renderedimage.h
+++ b/engines/sword25/gfx/image/renderedimage.h
@@ -75,7 +75,8 @@ public:
int flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
- int width = -1, int height = -1);
+ int width = -1, int height = -1,
+ RectangleList *updateRects = 0);
virtual bool fill(const Common::Rect *pFillRect, uint color);
virtual bool setContent(const byte *pixeldata, uint size, uint offset = 0, uint stride = 0);
void replaceContent(byte *pixeldata, int width, int height);
@@ -105,14 +106,19 @@ public:
static Graphics::Surface *scale(const Graphics::Surface &srcImage, int xSize, int ySize);
+ void setIsTransparent(bool isTransparent) { _isTransparent = isTransparent; }
+ virtual bool isSolid() const { return !_isTransparent; }
+
private:
byte *_data;
int _width;
int _height;
bool _doCleanup;
+ bool _isTransparent;
Graphics::Surface *_backSurface;
+ void checkForTransparency();
static int *scaleLine(int size, int srcSize);
};
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index 0b9cc11df2..7e4c3143f5 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -79,7 +79,8 @@ bool SWImage::blit(int posX, int posY,
int flipping,
Common::Rect *pPartRect,
uint color,
- int width, int height) {
+ int width, int height,
+ RectangleList *updateRects) {
error("Blit() is not supported.");
return false;
}
diff --git a/engines/sword25/gfx/image/swimage.h b/engines/sword25/gfx/image/swimage.h
index 5f348958b2..a35127a41d 100644
--- a/engines/sword25/gfx/image/swimage.h
+++ b/engines/sword25/gfx/image/swimage.h
@@ -58,7 +58,8 @@ public:
int flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
- int width = -1, int height = -1);
+ int width = -1, int height = -1,
+ RectangleList *updateRects = 0);
virtual bool fill(const Common::Rect *fillRectPtr, uint color);
virtual bool setContent(const byte *pixeldata, uint size, uint offset, uint stride);
virtual uint getPixel(int x, int y);
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index 81f4fc2ad5..ab895b5cef 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -190,6 +190,7 @@ Common::Rect CalculateBoundingBox(const VectorImageElement &vectorImageElement)
ArtVpath *vec = art_bez_path_to_vec(bez, 0.5);
if (vec[0].code == ART_END) {
+ free(vec);
continue;
} else {
x0 = x1 = vec[0].x;
@@ -602,7 +603,8 @@ bool VectorImage::blit(int posX, int posY,
int flipping,
Common::Rect *pPartRect,
uint color,
- int width, int height) {
+ int width, int height,
+ RectangleList *updateRects) {
static VectorImage *oldThis = 0;
static int oldWidth = -2;
static int oldHeight = -2;
@@ -623,7 +625,7 @@ bool VectorImage::blit(int posX, int posY,
RenderedImage *rend = new RenderedImage();
rend->replaceContent(_pixelData, width, height);
- rend->blit(posX, posY, flipping, pPartRect, color, width, height);
+ rend->blit(posX, posY, flipping, pPartRect, color, width, height, updateRects);
delete rend;
diff --git a/engines/sword25/gfx/image/vectorimage.h b/engines/sword25/gfx/image/vectorimage.h
index 959f251c14..d1760a433e 100644
--- a/engines/sword25/gfx/image/vectorimage.h
+++ b/engines/sword25/gfx/image/vectorimage.h
@@ -212,7 +212,8 @@ public:
int flipping = FLIP_NONE,
Common::Rect *pPartRect = NULL,
uint color = BS_ARGB(255, 255, 255, 255),
- int width = -1, int height = -1);
+ int width = -1, int height = -1,
+ RectangleList *updateRects = 0);
class SWFBitStream;
diff --git a/engines/sword25/gfx/microtiles.cpp b/engines/sword25/gfx/microtiles.cpp
new file mode 100644
index 0000000000..8dceed5348
--- /dev/null
+++ b/engines/sword25/gfx/microtiles.cpp
@@ -0,0 +1,164 @@
+/* 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 "sword25/gfx/microtiles.h"
+
+namespace Sword25 {
+
+MicroTileArray::MicroTileArray(int16 width, int16 height) {
+ _tilesW = (width / TileSize) + ((width % TileSize) > 0 ? 1 : 0);
+ _tilesH = (height / TileSize) + ((height % TileSize) > 0 ? 1 : 0);
+ _tiles = new BoundingBox[_tilesW * _tilesH];
+ clear();
+}
+
+MicroTileArray::~MicroTileArray() {
+ delete[] _tiles;
+}
+
+void MicroTileArray::addRect(Common::Rect r) {
+
+ int ux0, uy0, ux1, uy1;
+ int tx0, ty0, tx1, ty1;
+ int ix0, iy0, ix1, iy1;
+
+ r.clip(Common::Rect(0, 0, 799, 599));
+
+ ux0 = r.left / TileSize;
+ uy0 = r.top / TileSize;
+ ux1 = r.right / TileSize;
+ uy1 = r.bottom / TileSize;
+
+ tx0 = r.left % TileSize;
+ ty0 = r.top % TileSize;
+ tx1 = r.right % TileSize;
+ ty1 = r.bottom % TileSize;
+
+ for (int yc = uy0; yc <= uy1; yc++) {
+ for (int xc = ux0; xc <= ux1; xc++) {
+ ix0 = (xc == ux0) ? tx0 : 0;
+ ix1 = (xc == ux1) ? tx1 : TileSize - 1;
+ iy0 = (yc == uy0) ? ty0 : 0;
+ iy1 = (yc == uy1) ? ty1 : TileSize - 1;
+ updateBoundingBox(_tiles[xc + yc * _tilesW], ix0, iy0, ix1, iy1);
+ }
+ }
+
+}
+
+void MicroTileArray::clear() {
+ memset(_tiles, 0, _tilesW * _tilesH * sizeof(BoundingBox));
+}
+
+byte MicroTileArray::TileX0(const BoundingBox &boundingBox) {
+ return (boundingBox >> 24) & 0xFF;
+}
+
+byte MicroTileArray::TileY0(const BoundingBox &boundingBox) {
+ return (boundingBox >> 16) & 0xFF;
+}
+
+byte MicroTileArray::TileX1(const BoundingBox &boundingBox) {
+ return (boundingBox >> 8) & 0xFF;
+}
+
+byte MicroTileArray::TileY1(const BoundingBox &boundingBox) {
+ return boundingBox & 0xFF;
+}
+
+bool MicroTileArray::isBoundingBoxEmpty(const BoundingBox &boundingBox) {
+ return boundingBox == EmptyBoundingBox;
+}
+
+bool MicroTileArray::isBoundingBoxFull(const BoundingBox &boundingBox) {
+ return boundingBox == FullBoundingBox;
+}
+
+void MicroTileArray::setBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1) {
+ boundingBox = (x0 << 24) | (y0 << 16) | (x1 << 8) | y1;
+}
+
+void MicroTileArray::updateBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1) {
+ if (!isBoundingBoxEmpty(boundingBox)) {
+ x0 = MIN(TileX0(boundingBox), x0);
+ y0 = MIN(TileY0(boundingBox), y0);
+ x1 = MAX(TileX1(boundingBox), x1);
+ y1 = MAX(TileY1(boundingBox), y1);
+ }
+ setBoundingBox(boundingBox, x0, y0, x1, y1);
+}
+
+RectangleList *MicroTileArray::getRectangles() {
+
+ RectangleList *rects = new RectangleList();
+
+ int x, y;
+ int x0, y0, x1, y1;
+ int i = 0;
+
+ for (y = 0; y < _tilesH; ++y) {
+ for (x = 0; x < _tilesW; ++x) {
+
+ int start;
+ int finish = 0;
+ BoundingBox boundingBox = _tiles[i];
+
+ if (isBoundingBoxEmpty(boundingBox)) {
+ ++i;
+ continue;
+ }
+
+ x0 = (x * TileSize) + TileX0(boundingBox);
+ y0 = (y * TileSize) + TileY0(boundingBox);
+ y1 = (y * TileSize) + TileY1(boundingBox);
+
+ start = i;
+
+ if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
+ while (!finish) {
+ ++x;
+ ++i;
+ if (x == _tilesW || i >= _tilesW * _tilesH ||
+ TileY0(_tiles[i]) != TileY0(boundingBox) ||
+ TileY1(_tiles[i]) != TileY1(boundingBox) ||
+ TileX0(_tiles[i]) != 0)
+ {
+ --x;
+ --i;
+ finish = 1;
+ }
+ }
+ }
+
+ x1 = (x * TileSize) + TileX1(_tiles[i]);
+
+ rects->push_back(Common::Rect(x0, y0, x1 + 1, y1 + 1));
+
+ ++i;
+ }
+ }
+
+ return rects;
+}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/gfx/microtiles.h b/engines/sword25/gfx/microtiles.h
new file mode 100644
index 0000000000..454fc39f37
--- /dev/null
+++ b/engines/sword25/gfx/microtiles.h
@@ -0,0 +1,65 @@
+/* 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 SWORD25_MICROTILES_H
+#define SWORD25_MICROTILES_H
+
+#include "common/scummsys.h"
+#include "common/list.h"
+#include "common/util.h"
+#include "common/rect.h"
+
+namespace Sword25 {
+
+typedef uint32 BoundingBox;
+
+const BoundingBox FullBoundingBox = 0x00001F1F;
+const BoundingBox EmptyBoundingBox = 0x00000000;
+const int TileSize = 32;
+
+class RectangleList : public Common::List<Common::Rect> {
+};
+
+class MicroTileArray {
+public:
+ MicroTileArray(int16 width, int16 height);
+ ~MicroTileArray();
+ void addRect(Common::Rect r);
+ void clear();
+ RectangleList *getRectangles();
+protected:
+ BoundingBox *_tiles;
+ int16 _tilesW, _tilesH;
+ byte TileX0(const BoundingBox &boundingBox);
+ byte TileY0(const BoundingBox &boundingBox);
+ byte TileX1(const BoundingBox &boundingBox);
+ byte TileY1(const BoundingBox &boundingBox);
+ bool isBoundingBoxEmpty(const BoundingBox &boundingBox);
+ bool isBoundingBoxFull(const BoundingBox &boundingBox);
+ void setBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1);
+ void updateBoundingBox(BoundingBox &boundingBox, byte x0, byte y0, byte x1, byte y1);
+};
+
+} // namespace Sword25
+
+#endif // SWORD25_MICROTILES_H
diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp
index 6d5b2a623d..931b9cdbe7 100644
--- a/engines/sword25/gfx/panel.cpp
+++ b/engines/sword25/gfx/panel.cpp
@@ -36,6 +36,8 @@
#include "sword25/gfx/graphicengine.h"
#include "sword25/gfx/image/image.h"
+#include "sword25/gfx/renderobjectmanager.h"
+
namespace Sword25 {
Panel::Panel(RenderObjectPtr<RenderObject> parentPtr, int width, int height, uint color) :
@@ -67,7 +69,7 @@ Panel::Panel(InputPersistenceBlock &reader, RenderObjectPtr<RenderObject> parent
Panel::~Panel() {
}
-bool Panel::doRender() {
+bool Panel::doRender(RectangleList *updateRects) {
// Falls der Alphawert 0 ist, ist das Panel komplett durchsichtig und es muss nichts gezeichnet werden.
if (_color >> 24 == 0)
return true;
@@ -75,7 +77,15 @@ bool Panel::doRender() {
GraphicEngine *gfxPtr = Kernel::getInstance()->getGfx();
assert(gfxPtr);
- return gfxPtr->fill(&_bbox, _color);
+ for (RectangleList::iterator it = updateRects->begin(); it != updateRects->end(); ++it) {
+ const Common::Rect &clipRect = *it;
+ if (_bbox.intersects(clipRect)) {
+ Common::Rect intersectionRect = _bbox.findIntersectingRect(clipRect);
+ gfxPtr->fill(&intersectionRect, _color);
+ }
+ }
+
+ return true;
}
bool Panel::persist(OutputPersistenceBlock &writer) {
diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h
index cbf04ce40f..74a93247b6 100644
--- a/engines/sword25/gfx/panel.h
+++ b/engines/sword25/gfx/panel.h
@@ -51,15 +51,17 @@ public:
return _color;
}
void setColor(uint color) {
- _color = color;
- forceRefresh();
+ if (_color != color) {
+ _color = color;
+ forceRefresh();
+ }
}
virtual bool persist(OutputPersistenceBlock &writer);
virtual bool unpersist(InputPersistenceBlock &reader);
protected:
- virtual bool doRender();
+ virtual bool doRender(RectangleList *updateRects);
private:
uint _color;
diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp
index a977eb80ba..807c1eb64b 100644
--- a/engines/sword25/gfx/renderobject.cpp
+++ b/engines/sword25/gfx/renderobject.cpp
@@ -48,6 +48,8 @@
namespace Sword25 {
+int RenderObject::_nextGlobalVersion = 0;
+
RenderObject::RenderObject(RenderObjectPtr<RenderObject> parentPtr, TYPES type, uint handle) :
_managerPtr(0),
_parentPtr(parentPtr),
@@ -65,7 +67,9 @@ RenderObject::RenderObject(RenderObjectPtr<RenderObject> parentPtr, TYPES type,
_type(type),
_initSuccess(false),
_refreshForced(true),
- _handle(0) {
+ _handle(0),
+ _version(++_nextGlobalVersion),
+ _isSolid(false) {
// Renderobject registrieren, abhängig vom Handle-Parameter entweder mit beliebigem oder vorgegebenen Handle.
if (handle == 0)
@@ -106,13 +110,12 @@ RenderObject::~RenderObject() {
RenderObjectRegistry::instance().deregisterObject(this);
}
-bool RenderObject::render() {
+void RenderObject::preRender(RenderObjectQueue *renderQueue) {
// Objektänderungen validieren
validateObject();
- // Falls das Objekt nicht sichtbar ist, muss gar nichts gezeichnet werden
if (!_visible)
- return true;
+ return;
// Falls notwendig, wird die Renderreihenfolge der Kinderobjekte aktualisiert.
if (_childChanged) {
@@ -120,13 +123,36 @@ bool RenderObject::render() {
_childChanged = false;
}
+ renderQueue->add(this);
+
+ RENDEROBJECT_ITER it = _children.begin();
+ for (; it != _children.end(); ++it)
+ (*it)->preRender(renderQueue);
+
+}
+
+bool RenderObject::render(RectangleList *updateRects, const Common::Array<int> &updateRectsMinZ) {
+
+ // Falls das Objekt nicht sichtbar ist, muss gar nichts gezeichnet werden
+ if (!_visible)
+ return true;
+
// Objekt zeichnen.
- doRender();
+ bool needRender = false;
+ int index = 0;
+
+ // Only draw if the bounding box intersects any update rectangle and
+ // the object is in front of the minimum Z value.
+ for (RectangleList::iterator rectIt = updateRects->begin(); !needRender && rectIt != updateRects->end(); ++rectIt, ++index)
+ needRender = (_bbox.contains(*rectIt) || _bbox.intersects(*rectIt)) && getAbsoluteZ() >= updateRectsMinZ[index];
+
+ if (needRender)
+ doRender(updateRects);
// Dann müssen die Kinder gezeichnet werden
RENDEROBJECT_ITER it = _children.begin();
for (; it != _children.end(); ++it)
- if (!(*it)->render())
+ if (!(*it)->render(updateRects, updateRectsMinZ))
return false;
return true;
@@ -157,6 +183,8 @@ bool RenderObject::updateObjectState() {
// Die Bounding-Box neu berechnen und Update-Regions registrieren.
updateBoxes();
+
+ ++_version;
// Änderungen Validieren
validateObject();
@@ -191,9 +219,10 @@ Common::Rect RenderObject::calcBoundingBox() const {
return bbox;
}
-void RenderObject::calcAbsolutePos(int &x, int &y) const {
+void RenderObject::calcAbsolutePos(int &x, int &y, int &z) const {
x = calcAbsoluteX();
y = calcAbsoluteY();
+ z = calcAbsoluteZ();
}
int RenderObject::calcAbsoluteX() const {
@@ -210,6 +239,13 @@ int RenderObject::calcAbsoluteY() const {
return _y;
}
+int RenderObject::calcAbsoluteZ() const {
+ if (_parentPtr.isValid())
+ return _parentPtr->getAbsoluteZ() + _z;
+ else
+ return _z;
+}
+
void RenderObject::deleteAllChildren() {
// Es ist nicht notwendig die Liste zu iterieren, da jedes Kind für sich DetatchChildren an diesem Objekt aufruft und sich somit
// selber entfernt. Daher muss immer nur ein beliebiges Element (hier das letzte) gelöscht werden, bis die Liste leer ist.
@@ -253,7 +289,7 @@ void RenderObject::sortRenderObjects() {
}
void RenderObject::updateAbsolutePos() {
- calcAbsolutePos(_absoluteX, _absoluteY);
+ calcAbsolutePos(_absoluteX, _absoluteY, _absoluteZ);
RENDEROBJECT_ITER it = _children.begin();
for (; it != _children.end(); ++it)
@@ -285,8 +321,10 @@ void RenderObject::setY(int y) {
void RenderObject::setZ(int z) {
if (z < 0)
error("Tried to set a negative Z value (%d).", z);
- else
+ else {
_z = z;
+ updateAbsolutePos();
+ }
}
void RenderObject::setVisible(bool visible) {
diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h
index f963ccaeb3..7e0334ee88 100644
--- a/engines/sword25/gfx/renderobject.h
+++ b/engines/sword25/gfx/renderobject.h
@@ -53,6 +53,8 @@ namespace Sword25 {
class Kernel;
class RenderObjectManager;
+class RenderObjectQueue;
+class RectangleList;
class Bitmap;
class Animation;
class AnimationTemplate;
@@ -211,6 +213,9 @@ public:
// Interface
// ---------
+
+ void preRender(RenderObjectQueue *renderQueue);
+
/**
@brief Rendert des Objekt und alle seine Unterobjekte.
@return Gibt false zurück, falls beim Rendern ein Fehler aufgetreten ist.
@@ -218,7 +223,8 @@ public:
Dieses kann entweder direkt geschehen oder durch den Aufruf von UpdateObjectState() an einem Vorfahren-Objekt.<br>
Diese Methode darf nur von BS_RenderObjectManager aufgerufen werden.
*/
- bool render();
+ bool render(RectangleList *updateRects, const Common::Array<int> &updateRectsMinZ);
+
/**
@brief Bereitet das Objekt und alle seine Unterobjekte auf einen Rendervorgang vor.
Hierbei werden alle Dirty-Rectangles berechnet und die Renderreihenfolge aktualisiert.
@@ -230,7 +236,7 @@ public:
@brief Löscht alle Kinderobjekte.
*/
void deleteAllChildren();
-
+
// Accessor-Methoden
// -----------------
/**
@@ -299,6 +305,11 @@ public:
int getZ() const {
return _z;
}
+
+ int getAbsoluteZ() const {
+ return _absoluteZ;
+ }
+
/**
@brief Gibt die Breite des Objektes zurück.
*/
@@ -352,6 +363,15 @@ public:
return _handle;
}
+ // Get the RenderObjects current version
+ int getVersion() const {
+ return _version;
+ }
+
+ bool isSolid() const {
+ return _isSolid;
+ }
+
// Persistenz-Methoden
// -------------------
virtual bool persist(OutputPersistenceBlock &writer);
@@ -370,9 +390,10 @@ protected:
int _x; ///< Die X-Position des Objektes relativ zum Eltern-Objekt
int _y; ///< Die Y-Position des Objektes relativ zum Eltern-Objekt
+ int _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt
int _absoluteX; ///< Die absolute X-Position des Objektes
int _absoluteY; ///< Die absolute Y-Position des Objektes
- int _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt
+ int _absoluteZ;
int _width; ///< Die Breite des Objektes
int _height; ///< Die Höhe des Objektes
bool _visible; ///< Ist true, wenn das Objekt sichtbar ist
@@ -388,6 +409,13 @@ protected:
int _oldZ;
bool _oldVisible;
+ static int _nextGlobalVersion;
+
+ int _version;
+
+ // This should be set to true if the RenderObject is NOT alpha-blended to optimize drawing
+ bool _isSolid;
+
/// Ein Pointer auf den BS_RenderObjektManager, der das Objekt verwaltet.
RenderObjectManager *_managerPtr;
@@ -402,7 +430,7 @@ protected:
@return Gibt false zurück, falls das Rendern fehlgeschlagen ist.
@remark
*/
- virtual bool doRender() = 0; // { return true; }
+ virtual bool doRender(RectangleList *updateRects) = 0; // { return true; }
// RenderObject-Baum Variablen
// ---------------------------
@@ -472,7 +500,7 @@ private:
/**
@brief Berechnet die absolute Position des Objektes.
*/
- void calcAbsolutePos(int &x, int &y) const;
+ void calcAbsolutePos(int &x, int &y, int &z) const;
/**
@brief Berechnet die absolute Position des Objektes auf der X-Achse.
*/
@@ -481,6 +509,9 @@ private:
@brief Berechnet die absolute Position des Objektes.
*/
int calcAbsoluteY() const;
+
+ int calcAbsoluteZ() const;
+
/**
@brief Sortiert alle Kinderobjekte nach ihrem Renderang.
*/
diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp
index 38289991eb..994d9367ab 100644
--- a/engines/sword25/gfx/renderobjectmanager.cpp
+++ b/engines/sword25/gfx/renderobjectmanager.cpp
@@ -41,17 +41,37 @@
#include "sword25/gfx/timedrenderobject.h"
#include "sword25/gfx/rootrenderobject.h"
+#include "common/system.h"
+
namespace Sword25 {
+void RenderObjectQueue::add(RenderObject *renderObject) {
+ push_back(RenderObjectQueueItem(renderObject, renderObject->getBbox(), renderObject->getVersion()));
+}
+
+bool RenderObjectQueue::exists(const RenderObjectQueueItem &renderObjectQueueItem) {
+ for (RenderObjectQueue::iterator it = begin(); it != end(); ++it)
+ if ((*it)._renderObject == renderObjectQueueItem._renderObject &&
+ (*it)._version == renderObjectQueueItem._version)
+ return true;
+ return false;
+}
+
RenderObjectManager::RenderObjectManager(int width, int height, int framebufferCount) :
_frameStarted(false) {
// Wurzel des BS_RenderObject-Baumes erzeugen.
_rootPtr = (new RootRenderObject(this, width, height))->getHandle();
+ _uta = new MicroTileArray(width, height);
+ _currQueue = new RenderObjectQueue();
+ _prevQueue = new RenderObjectQueue();
}
RenderObjectManager::~RenderObjectManager() {
// Die Wurzel des Baumes löschen, damit werden alle BS_RenderObjects mitgelöscht.
_rootPtr.erase();
+ delete _uta;
+ delete _currQueue;
+ delete _prevQueue;
}
void RenderObjectManager::startFrame() {
@@ -76,7 +96,58 @@ bool RenderObjectManager::render() {
_frameStarted = false;
// Die Render-Methode der Wurzel aufrufen. Dadurch wird das rekursive Rendern der Baumelemente angestoßen.
- return _rootPtr->render();
+
+ _currQueue->clear();
+ _rootPtr->preRender(_currQueue);
+
+ _uta->clear();
+
+ // Add rectangles of objects which don't exist in this frame any more
+ for (RenderObjectQueue::iterator it = _prevQueue->begin(); it != _prevQueue->end(); ++it)
+ if (!_currQueue->exists(*it))
+ _uta->addRect((*it)._bbox);
+ // Add rectangles of objects which are different from the previous frame
+ for (RenderObjectQueue::iterator it = _currQueue->begin(); it != _currQueue->end(); ++it)
+ if (!_prevQueue->exists(*it))
+ _uta->addRect((*it)._bbox);
+
+ RectangleList *updateRects = _uta->getRectangles();
+ Common::Array<int> updateRectsMinZ;
+
+ updateRectsMinZ.reserve(updateRects->size());
+
+ // Calculate the minimum drawing Z value of each update rectangle
+ // Solid bitmaps with a Z order less than the value calculated here would be overdrawn again and
+ // so don't need to be drawn in the first place which speeds things up a bit.
+ for (RectangleList::iterator rectIt = updateRects->begin(); rectIt != updateRects->end(); ++rectIt) {
+ int minZ = 0;
+ for (RenderObjectQueue::iterator it = _currQueue->reverse_begin(); it != _currQueue->end(); --it) {
+ if ((*it)._renderObject->isVisible() && (*it)._renderObject->isSolid() &&
+ (*it)._renderObject->getBbox().contains(*rectIt)) {
+ minZ = (*it)._renderObject->getAbsoluteZ();
+ break;
+ }
+ }
+ updateRectsMinZ.push_back(minZ);
+ }
+
+ if (_rootPtr->render(updateRects, updateRectsMinZ)) {
+ // Copy updated rectangles to the video screen
+ Graphics::Surface *backSurface = Kernel::getInstance()->getGfx()->getSurface();
+ for (RectangleList::iterator rectIt = updateRects->begin(); rectIt != updateRects->end(); ++rectIt) {
+ const int x = (*rectIt).left;
+ const int y = (*rectIt).top;
+ const int width = (*rectIt).width();
+ const int height = (*rectIt).height();
+ g_system->copyRectToScreen(backSurface->getBasePtr(x, y), backSurface->pitch, x, y, width, height);
+ }
+ }
+
+ delete updateRects;
+
+ SWAP(_currQueue, _prevQueue);
+
+ return true;
}
void RenderObjectManager::attatchTimedRenderObject(RenderObjectPtr<TimedRenderObject> renderObjectPtr) {
diff --git a/engines/sword25/gfx/renderobjectmanager.h b/engines/sword25/gfx/renderobjectmanager.h
index 9e7efd8e60..1db91dfbe6 100644
--- a/engines/sword25/gfx/renderobjectmanager.h
+++ b/engines/sword25/gfx/renderobjectmanager.h
@@ -47,11 +47,28 @@
#include "sword25/gfx/renderobjectptr.h"
#include "sword25/kernel/persistable.h"
+#include "sword25/gfx/microtiles.h"
+
namespace Sword25 {
class Kernel;
class RenderObject;
class TimedRenderObject;
+class RenderObjectManager;
+
+struct RenderObjectQueueItem {
+ RenderObject *_renderObject;
+ Common::Rect _bbox;
+ int _version;
+ RenderObjectQueueItem(RenderObject *renderObject, const Common::Rect &bbox, int version)
+ : _renderObject(renderObject), _bbox(bbox), _version(version) {}
+};
+
+class RenderObjectQueue : public Common::List<RenderObjectQueueItem> {
+public:
+ void add(RenderObject *renderObject);
+ bool exists(const RenderObjectQueueItem &renderObjectQueueItem);
+};
/**
@brief Diese Klasse ist für die Verwaltung von BS_RenderObjects zuständig.
@@ -114,6 +131,9 @@ private:
typedef Common::Array<RenderObjectPtr<TimedRenderObject> > RenderObjectList;
RenderObjectList _timedRenderObjects;
+ MicroTileArray *_uta;
+ RenderObjectQueue *_currQueue, *_prevQueue;
+
// RenderObject-Tree Variablen
// ---------------------------
// Der Baum legt die hierachische Ordnung der BS_RenderObjects fest.
diff --git a/engines/sword25/gfx/rootrenderobject.h b/engines/sword25/gfx/rootrenderobject.h
index 4782fad175..f1b19d6bae 100644
--- a/engines/sword25/gfx/rootrenderobject.h
+++ b/engines/sword25/gfx/rootrenderobject.h
@@ -59,7 +59,7 @@ private:
}
protected:
- virtual bool doRender() {
+ virtual bool doRender(RectangleList *updateRects) {
return true;
}
};
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index 0ae07b36b5..91b93e8910 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -71,6 +71,8 @@ bool StaticBitmap::initBitmapResource(const Common::String &filename) {
// RenderObject Eigenschaften aktualisieren
_originalWidth = _width = bitmapPtr->getWidth();
_originalHeight = _height = bitmapPtr->getHeight();
+
+ _isSolid = bitmapPtr->isSolid();
// Bild-Resource freigeben
bitmapPtr->release();
@@ -81,7 +83,7 @@ bool StaticBitmap::initBitmapResource(const Common::String &filename) {
StaticBitmap::~StaticBitmap() {
}
-bool StaticBitmap::doRender() {
+bool StaticBitmap::doRender(RectangleList *updateRects) {
// Bitmap holen
Resource *resourcePtr = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename);
assert(resourcePtr);
@@ -98,12 +100,14 @@ bool StaticBitmap::doRender() {
result = bitmapResourcePtr->blit(_absoluteX, _absoluteY,
(_flipV ? BitmapResource::FLIP_V : 0) |
(_flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, -1, -1);
+ 0, _modulationColor, -1, -1,
+ updateRects);
} else {
result = bitmapResourcePtr->blit(_absoluteX, _absoluteY,
(_flipV ? BitmapResource::FLIP_V : 0) |
(_flipH ? BitmapResource::FLIP_H : 0),
- 0, _modulationColor, _width, _height);
+ 0, _modulationColor, _width, _height,
+ updateRects);
}
// Resource freigeben
diff --git a/engines/sword25/gfx/staticbitmap.h b/engines/sword25/gfx/staticbitmap.h
index e66ede02b4..90b92b4331 100644
--- a/engines/sword25/gfx/staticbitmap.h
+++ b/engines/sword25/gfx/staticbitmap.h
@@ -65,7 +65,7 @@ public:
virtual bool unpersist(InputPersistenceBlock &reader);
protected:
- virtual bool doRender();
+ virtual bool doRender(RectangleList *updateRects);
private:
Common::String _resourceFilename;
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index 82bb7cdff7..d4aaa90682 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -91,9 +91,11 @@ bool Text::setFont(const Common::String &font) {
}
void Text::setText(const Common::String &text) {
- _text = text;
- updateFormat();
- forceRefresh();
+ if (_text != text) {
+ _text = text;
+ updateFormat();
+ forceRefresh();
+ }
}
void Text::setColor(uint modulationColor) {
@@ -129,7 +131,7 @@ void Text::setAutoWrapThreshold(uint autoWrapThreshold) {
}
}
-bool Text::doRender() {
+bool Text::doRender(RectangleList *updateRects) {
// Font-Resource locken.
FontResource *fontPtr = lockFontResource();
if (!fontPtr)
@@ -171,7 +173,7 @@ bool Text::doRender() {
Common::Rect renderRect(curX, curY, curX + curRect.width(), curY + curRect.height());
renderRect.translate(curRect.left - curX, curRect.top - curY);
- result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor);
+ result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor, -1, -1, updateRects);
if (!result)
break;
diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h
index a0d668014f..94e7a30865 100644
--- a/engines/sword25/gfx/text.h
+++ b/engines/sword25/gfx/text.h
@@ -136,7 +136,7 @@ public:
virtual bool unpersist(InputPersistenceBlock &reader);
protected:
- virtual bool doRender();
+ virtual bool doRender(RectangleList *updateRects);
private:
Text(RenderObjectPtr<RenderObject> parentPtr);
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk
index e24a221244..234baec165 100644
--- a/engines/sword25/module.mk
+++ b/engines/sword25/module.mk
@@ -16,6 +16,7 @@ MODULE_OBJS := \
gfx/fontresource.o \
gfx/graphicengine.o \
gfx/graphicengine_script.o \
+ gfx/microtiles.o \
gfx/panel.o \
gfx/renderobject.o \
gfx/renderobjectmanager.o \
diff --git a/engines/sword25/util/lua/ldo.cpp b/engines/sword25/util/lua/ldo.cpp
index 5d9667f4f0..a230097f2a 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"
@@ -100,15 +98,23 @@ static void resetstack (lua_State *L, int status) {
}
+// 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"
+};
+
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 +135,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/llex.cpp b/engines/sword25/util/lua/llex.cpp
index f8433d3afa..423f0285ca 100644
--- a/engines/sword25/util/lua/llex.cpp
+++ b/engines/sword25/util/lua/llex.cpp
@@ -4,6 +4,8 @@
** See Copyright Notice in lua.h
*/
+// FIXME: Do not directly use iscntrl from ctype.h.
+#define FORBIDDEN_SYMBOL_EXCEPTION_iscntrl
#include "common/util.h"
diff --git a/engines/sword25/util/lua/lua.h b/engines/sword25/util/lua/lua.h
index 08ad80d70f..a3b7573ca5 100644
--- a/engines/sword25/util/lua/lua.h
+++ b/engines/sword25/util/lua/lua.h
@@ -48,7 +48,6 @@
#define LUA_ERRMEM 4
#define LUA_ERRERR 5
-
typedef struct lua_State lua_State;
typedef int (*lua_CFunction) (lua_State *L);
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/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index cb8c798fb6..d65a367309 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -22,47 +22,46 @@
#include "teenagent/actor.h"
#include "teenagent/objects.h"
#include "teenagent/resources.h"
+#include "teenagent/teenagent.h"
#include "common/random.h"
#include "common/textconsole.h"
namespace TeenAgent {
-Actor::Actor() : head_index(0), idle_type(0) {}
+Actor::Actor(TeenAgentEngine *vm) : _vm(vm), headIndex(0), idleType(0) {}
-//idle animation lists at dseg: 0x6540
-Common::Rect Actor::renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom, Common::RandomSource &rnd) {
+Common::Rect Actor::renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int deltaFrame, uint zoom, Common::RandomSource &rnd) {
if (index == 0) {
- idle_type = rnd.getRandomNumber(2);
- debug(0, "switched to idle animation %u", idle_type);
+ idleType = rnd.getRandomNumber(2);
+ debugC(kDebugActor, "switched to idle animation %u", idleType);
}
- Resources *res = Resources::instance();
- byte *frames_idle;
+ byte *framesIdle;
do {
- frames_idle = res->dseg.ptr(res->dseg.get_word(0x6540 + idle_type * 2)) + index;
- index += delta_frame;
- if (*frames_idle == 0) {
- idle_type = rnd.getRandomNumber(2);
- debug(0, "switched to idle animation %u[loop]", idle_type);
+ framesIdle = _vm->res->dseg.ptr(_vm->res->dseg.get_word(dsAddr_idleAnimationListPtr + idleType * 2)) + index;
+ index += deltaFrame;
+ if (*framesIdle == 0) {
+ idleType = rnd.getRandomNumber(2);
+ debugC(kDebugActor, "switched to idle animation %u[loop]", idleType);
index = 3; //put 4th frame (base 1) if idle animation loops
}
- } while (*frames_idle == 0);
+ } while (*framesIdle == 0);
bool mirror = orientation == kActorLeft;
- Surface *s = frames + *frames_idle - 1;
+ Surface *s = frames + *framesIdle - 1;
- ///\todo remove copy-paste here and below
+ //TODO: remove copy-paste here and below
int xp = position.x - s->w * zoom / 512 - s->x, yp = position.y - 62 * zoom / 256 - s->y; //hardcoded in original game
return s->render(surface, xp, yp, mirror, Common::Rect(), zoom);
}
-Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, bool render_head, uint zoom) {
- const uint8 frames_left_right[] = {0, 1, 2, 3, 4, 5, /* step */ 6, 7, 8, 9};
- const uint8 frames_up[] = {18, 19, 20, 21, 22, 23, 24, 25, };
- const uint8 frames_down[] = {10, 11, 12, 13, 14, 15, 16, 17, };
+Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int deltaFrame, bool renderHead, uint zoom) {
+ const uint8 framesLeftRight[] = {0, 1, 2, 3, 4, 5, /* step */ 6, 7, 8, 9};
+ const uint8 framesUp[] = {18, 19, 20, 21, 22, 23, 24, 25, };
+ const uint8 framesDown[] = {10, 11, 12, 13, 14, 15, 16, 17, };
- const uint8 frames_head_left_right[] = {
+ const uint8 framesHeadLeftRight[] = {
0x27, 0x1a, 0x1b,
0x27, 0x1c, 0x1d,
0x27, 0x1a,
@@ -73,14 +72,14 @@ Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &posi
0x27, 0x1a,
};
- const uint8 frames_head_up[] = {
+ const uint8 framesHeadUp[] = {
0x29, 0x25, 0x29, 0x29,
0x26, 0x29, 0x26, 0x29,
0x29, 0x25, 0x29, 0x25,
0x29, 0x29, 0x29, 0x25,
0x25, 0x29, 0x29, 0x26
};
- const uint8 frames_head_down[] = {
+ const uint8 framesHeadDown[] = {
0x20, 0x21, 0x22, 0x23,
0x28, 0x24, 0x28, 0x28,
0x24, 0x28, 0x20, 0x21,
@@ -91,45 +90,45 @@ Common::Rect Actor::render(Graphics::Surface *surface, const Common::Point &posi
Surface *s = NULL, *head = NULL;
bool mirror = orientation == kActorLeft;
- index += delta_frame;
+ index += deltaFrame;
switch (orientation) {
case kActorLeft:
case kActorRight:
- if (render_head) {
- if (head_index >= ARRAYSIZE(frames_head_left_right))
- head_index = 0;
- head = frames + frames_head_left_right[head_index];
- ++head_index;
+ if (renderHead) {
+ if (headIndex >= ARRAYSIZE(framesHeadLeftRight))
+ headIndex = 0;
+ head = frames + framesHeadLeftRight[headIndex];
+ ++headIndex;
}
- if (index >= ARRAYSIZE(frames_left_right))
+ if (index >= ARRAYSIZE(framesLeftRight))
index = 1;
- s = frames + frames_left_right[index];
+ s = frames + framesLeftRight[index];
break;
case kActorUp:
- if (render_head) {
- if (head_index >= ARRAYSIZE(frames_head_up))
- head_index = 0;
- head = frames + frames_head_up[head_index];
- ++head_index;
+ if (renderHead) {
+ if (headIndex >= ARRAYSIZE(framesHeadUp))
+ headIndex = 0;
+ head = frames + framesHeadUp[headIndex];
+ ++headIndex;
}
- if (index >= ARRAYSIZE(frames_up))
+ if (index >= ARRAYSIZE(framesUp))
index = 1;
- s = frames + frames_up[index];
+ s = frames + framesUp[index];
break;
case kActorDown:
- if (render_head) {
- if (head_index >= ARRAYSIZE(frames_head_down))
- head_index = 0;
- head = frames + frames_head_down[head_index];
- ++head_index;
+ if (renderHead) {
+ if (headIndex >= ARRAYSIZE(framesHeadDown))
+ headIndex = 0;
+ head = frames + framesHeadDown[headIndex];
+ ++headIndex;
}
- if (index >= ARRAYSIZE(frames_down))
+ if (index >= ARRAYSIZE(framesDown))
index = 1;
- s = frames + frames_down[index];
+ s = frames + framesDown[index];
break;
default:
return Common::Rect();
diff --git a/engines/teenagent/actor.h b/engines/teenagent/actor.h
index 9a7d395547..942397c636 100644
--- a/engines/teenagent/actor.h
+++ b/engines/teenagent/actor.h
@@ -28,13 +28,20 @@ class RandomSource;
namespace TeenAgent {
+class TeenAgentEngine;
+
class Actor : public Animation {
- uint head_index;
- uint idle_type;
+private:
+ TeenAgentEngine *_vm;
+
+ uint headIndex;
+ uint idleType;
+
public:
- Actor();
- Common::Rect render(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, bool head, uint zoom);
- Common::Rect renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int delta_frame, uint zoom, Common::RandomSource &rnd);
+ Actor(TeenAgentEngine *vm);
+
+ Common::Rect render(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int deltaFrame, bool renderHead, uint zoom);
+ Common::Rect renderIdle(Graphics::Surface *surface, const Common::Point &position, uint8 orientation, int deltaFrame, uint zoom, Common::RandomSource &rnd);
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/animation.cpp b/engines/teenagent/animation.cpp
index 56107b67ca..effafcaac6 100644
--- a/engines/teenagent/animation.cpp
+++ b/engines/teenagent/animation.cpp
@@ -19,24 +19,30 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include "teenagent/teenagent.h"
#include "teenagent/animation.h"
+
#include "common/endian.h"
#include "common/textconsole.h"
namespace TeenAgent {
-Animation::Animation() : id(0), x(0), y(0), loop(true), paused(false), ignore(false), data(0), data_size(0), frames_count(0), frames(0), index(0) {
+Animation::Animation() : id(0), x(0), y(0), loop(true), paused(false), ignore(false), data(0), dataSize(0), framesCount(0), frames(0), index(0) {
+}
+
+Animation::~Animation() {
+ free();
}
Surface *Animation::firstFrame() {
- if (frames == NULL || frames_count == 0)
+ if (frames == NULL || framesCount == 0)
return NULL;
Surface *r = frames;
uint16 pos = READ_LE_UINT16(data + 1);
if (pos != 0) {
- r->x = pos % 320;
- r->y = pos / 320;
+ r->x = pos % kScreenWidth;
+ r->y = pos / kScreenWidth;
}
return r;
}
@@ -45,38 +51,38 @@ Surface *Animation::currentFrame(int dt) {
if (paused)
return firstFrame();
- if (frames == NULL || frames_count == 0)
+ if (frames == NULL || framesCount == 0)
return NULL;
Surface *r;
if (data != NULL) {
uint32 frame = 3 * index;
- //debug(0, "%u/%u", index, data_size / 3);
+ debugC(2, kDebugAnimation, "%u/%u", index, dataSize / 3);
index += dt;
- if (!loop && index >= data_size / 3) {
+ if (!loop && index >= dataSize / 3) {
return NULL;
}
- if (data[frame] - 1 >= frames_count) {
- warning("invalid frame %u(0x%x) (max %u) index %u, mod %u", frame, frame, frames_count, index - 1, data_size / 3);
+ if (data[frame] - 1 >= framesCount) {
+ warning("invalid frame %u(0x%x) (max %u) index %u, mod %u", frame, frame, framesCount, index - 1, dataSize / 3);
return NULL;
}
r = frames + data[frame] - 1;
uint16 pos = READ_LE_UINT16(data + frame + 1);
- index %= (data_size / 3);
+ index %= (dataSize / 3);
if (pos != 0) {
- x = r->x = pos % 320;
- y = r->y = pos / 320;
+ x = r->x = pos % kScreenWidth;
+ y = r->y = pos / kScreenWidth;
}
} else {
- //debug(0, "index %u", index);
+ debugC(2, kDebugAnimation, "index %u", index);
r = frames + index;
index += dt;
- index %= frames_count;
+ index %= framesCount;
}
return r;
@@ -97,9 +103,9 @@ void Animation::free() {
delete[] data;
data = NULL;
- data_size = 0;
+ dataSize = 0;
- frames_count = 0;
+ framesCount = 0;
delete[] frames;
frames = NULL;
@@ -107,44 +113,42 @@ void Animation::free() {
}
void Animation::load(Common::SeekableReadStream &s, Type type) {
- //fixme: do not reload the same animation each time
+ //FIXME: do not reload the same animation each time
free();
if (s.size() <= 1) {
- debug(1, "empty animation");
+ debugC(1, kDebugAnimation, "empty animation");
return;
}
- //uint16 pos = 0;
+ uint16 pos = 0;
int off = 0;
switch (type) {
case kTypeLan:
- data_size = s.readUint16LE();
+ dataSize = s.readUint16LE();
if (s.eos()) {
- debug(1, "empty animation");
+ debugC(1, kDebugAnimation, "empty animation");
return;
}
- data_size -= 2;
- data = new byte[data_size];
- data_size = s.read(data, data_size);
- /* for (int i = 0; i < data_size; ++i) {
- debug(0, "%02x ", data[i]);
- }
- debug(0, ", %u frames", data_size / 3);
- */
- frames_count = s.readByte();
- debug(1, "%u physical frames", frames_count);
- if (frames_count == 0)
+ dataSize -= 2;
+ data = new byte[dataSize];
+ dataSize = s.read(data, dataSize);
+ for (int i = 0; i < dataSize; ++i)
+ debugC(2, kDebugAnimation, "%02x ", data[i]);
+ debugC(2, kDebugAnimation, ", %u frames", dataSize / 3);
+ framesCount = s.readByte();
+ debugC(1, kDebugAnimation, "%u physical frames", framesCount);
+ if (framesCount == 0)
return;
- frames = new Surface[frames_count];
+ frames = new Surface[framesCount];
- s.skip(frames_count * 2 - 2); //sizes
- /*pos = */s.readUint16LE();
- //debug(0, "pos?: %04x", pos);
+ s.skip(framesCount * 2 - 2); //sizes
+ pos = s.readUint16LE();
+ debugC(3, kDebugAnimation, "pos?: 0x%04x", pos);
- for (uint16 i = 0; i < frames_count; ++i) {
+ for (uint16 i = 0; i < framesCount; ++i) {
frames[i].load(s, Surface::kTypeLan);
frames[i].x = 0;
frames[i].y = 0;
@@ -152,43 +156,43 @@ void Animation::load(Common::SeekableReadStream &s, Type type) {
break;
case kTypeInventory: {
- data_size = 3 * s.readByte();
- data = new byte[data_size];
+ dataSize = 3 * s.readByte();
+ data = new byte[dataSize];
- frames_count = 0;
- for (byte i = 0; i < data_size / 3; ++i) {
+ framesCount = 0;
+ for (byte i = 0; i < dataSize / 3; ++i) {
int idx = i * 3;
- /* byte unk = */
- s.readByte();
+ byte unk = s.readByte();
+ debugC(3, kDebugAnimation, "unk?: 0x%02x", unk);
data[idx] = s.readByte();
if (data[idx] == 0)
data[idx] = 1; //fixme: investigate
- if (data[idx] > frames_count)
- frames_count = data[idx];
+ if (data[idx] > framesCount)
+ framesCount = data[idx];
data[idx + 1] = 0;
data[idx + 2] = 0;
- //debug(0, "frame #%u", data[idx]);
+ debugC(2, kDebugAnimation, "frame #%u", data[idx]);
}
- frames = new Surface[frames_count];
+ frames = new Surface[framesCount];
- for (uint16 i = 0; i < frames_count; ++i) {
+ for (uint16 i = 0; i < framesCount; ++i) {
frames[i].load(s, Surface::kTypeOns);
}
}
break;
case kTypeVaria:
- frames_count = s.readByte();
- debug(1, "loading varia resource, %u physical frames", frames_count);
+ framesCount = s.readByte();
+ debugC(1, kDebugAnimation, "loading varia resource, %u physical frames", framesCount);
uint16 offset[255];
- for (byte i = 0; i < frames_count; ++i) {
+ for (byte i = 0; i < framesCount; ++i) {
offset[i] = s.readUint16LE();
- //debug(0, "%u: %04x", i, offset[i]);
+ debugC(0, kDebugAnimation, "%u: %04x", i, offset[i]);
}
- frames = new Surface[frames_count];
- for (uint16 i = 0; i < frames_count; ++i) {
- //debug(0, "%04x", offset[i]);
+ frames = new Surface[framesCount];
+ for (uint16 i = 0; i < framesCount; ++i) {
+ debugC(0, kDebugAnimation, "%04x", offset[i]);
s.seek(offset[i] + off);
frames[i].load(s, Surface::kTypeOns);
}
@@ -196,11 +200,7 @@ void Animation::load(Common::SeekableReadStream &s, Type type) {
break;
}
- debug(0, "%u frames", data_size / 3);
-}
-
-Animation::~Animation() {
- free();
+ debugC(2, kDebugAnimation, "%u frames", dataSize / 3);
}
} // End of namespace TeenAgent
diff --git a/engines/teenagent/animation.h b/engines/teenagent/animation.h
index 6942cc74eb..9be21a4c3d 100644
--- a/engines/teenagent/animation.h
+++ b/engines/teenagent/animation.h
@@ -35,6 +35,8 @@ public:
enum Type {kTypeLan, kTypeVaria, kTypeInventory};
Animation();
+ ~Animation();
+
void load(Common::SeekableReadStream &, Type type = kTypeLan);
void free();
@@ -43,8 +45,6 @@ public:
uint16 currentIndex() const { return index; }
void resetIndex() { index = 0; }
- ~Animation();
-
bool empty() const { return frames == NULL; }
void restart();
@@ -53,9 +53,9 @@ public:
protected:
byte *data;
- uint16 data_size;
+ uint16 dataSize;
- uint16 frames_count;
+ uint16 framesCount;
Surface *frames;
uint16 index;
};
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index 934727a478..2de81abb37 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -19,8 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "teenagent/scene.h"
#include "teenagent/teenagent.h"
+#include "teenagent/scene.h"
+#include "teenagent/inventory.h"
#include "teenagent/resources.h"
#include "teenagent/dialog.h"
@@ -33,159 +34,536 @@ namespace TeenAgent {
#define GET_FLAG(addr) (res->dseg.get_byte(addr))
#define INC_FLAG(addr) (++*res->dseg.ptr(addr))
-void TeenAgentEngine::rejectMessage() {
- Resources *res = Resources::instance();
- //random reject message:
- uint i = _rnd.getRandomNumber(3);
- //debug(0, "reject message: %s", (const char *)res->dseg.ptr(res->dseg.get_word(0x339e + 2 * i)));
- displayMessage(res->dseg.get_word(0x339e + 2 * i));
+void TeenAgentEngine::fnIntro() {
+ hideActor();
+
+ loadScene(41, 139, 156, 3);
+ playSound(41, 12);
+ playAnimation(912, 1);
+ setOns(0, 108);
+ playSound(62, 8);
+ playSound(58, 40);
+ playAnimation(913, 1);
+ setOns(1, 109);
+ setLan(2, 1);
+ dialog->show(192, scene, 914, 915, textColorGoldDriver, textColorBankGuard, 2, 1);
+ displayCredits(dsAddr_introCredits1);
+
+ loadScene(42, 139, 156, 3);
+ playSound(15, 20);
+ playAnimation(916, 1);
+ playSound(40, 18);
+ playSound(40, 22);
+ for (byte i = 27; i < 37; i += 2)
+ playSound(40, i);
+ playSound(29, 44);
+ playAnimation(918, 0, true);
+ playAnimation(917, 1, true);
+ waitAnimation();
+ displayCredits(dsAddr_introCredits2);
+
+ loadScene(40, 139, 156, 3);
+ playMusic(3);
+ dialog->show(193, scene, 920, 924, textColorRGBBoss, textColorFortuneTeller, 1, 2);
+ playSound(26, 50);
+ playAnimation(925, 0, true);
+ playAnimation(926, 1, true);
+ waitAnimation();
+ dialog->show(194, scene, 927, 920, textColorFortuneTeller, textColorRGBBoss, 2, 1);
+ displayCredits(dsAddr_introCredits3);
+
+ loadScene(39, 139, 156, 3);
+ playMusic(11);
+ playSound(81, 2);
+ playSound(81, 8);
+ playSound(81, 11);
+ playSound(81, 14);
+ playSound(81, 16);
+ playSound(81, 18);
+ playSound(81, 20);
+ playSound(81, 21);
+ playAnimation(928, 1);
+ setOns(0, 112);
+ dialog->showMono(195, scene, 929, textColorMark, 1);
+ showActor();
+ moveTo(319, 150, 1, true);
+ moveTo(63, 150, 1);
+ displayAsyncMessage(dsAddr_HeyWtmQMsg, 4, 62, 18, 36); // hey, what's the matter?
+ playAnimation(851, 0, true);
+ playActorAnimation(930, true);
+ waitAnimation();
+ playSound(24, 11);
+ playActorAnimation(931);
+
+ displayCredits(dsAddr_introCredits4);
+
+ playMusic(3);
+ loadScene(40, 50, 186, 1);
+ setOns(0, 113);
+ dialog->show(196, scene, 919, 0, textColorRGBBoss, textColorMark, 1, 0);
+ moveTo(196, 186, 1);
+ dialog->show(197, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
+ playActorAnimation(932);
+ dialog->show(198, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
+ playActorAnimation(932);
+ dialog->show(199, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
+ playActorAnimation(932);
+ dialog->show(200, scene, 0, 922, textColorMark, textColorRGBBoss, 0, 1);
+ playActorAnimation(933);
+ dialog->show(201, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
+ moveTo(174, 186, 1);
+ playAnimation(851, 0, true);
+ playActorAnimation(934, true);
+ waitAnimation();
+ loadScene(10, 136, 153, 3);
}
+void TeenAgentEngine::fnPoleClimbFail() {
+ moveTo(86, 195, 1, true);
+ playActorAnimation(868);
+}
-bool TeenAgentEngine::processCallback(uint16 addr) {
- if (addr == 0)
- return false;
+void TeenAgentEngine::fnGotAnchor() {
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ setTimerCallback(0, 0);
+ scene->getActorAnimation()->free();
+ playSound(64, 7);
+ playActorAnimation(618);
+ disableObject(5);
+ setOns(0, 0);
+ playSound(31, 1);
+ playActorAnimation(619);
+ fnGetOutOfLake();
+ inventory->add(kInvItemAnchor);
+ displayMessage(dsAddr_hookedAnchorMsg); // "I was really hooked on this anchor!"
+}
- Resources *res = Resources::instance();
- debug(0, "processCallback(%04x)", addr);
- byte *code = res->cseg.ptr(addr);
-
- //try trivial callbacks first
- if (code[0] == 0xbb && code[3] == 0xe8 && code[6] == 0xc3) {
- //call display_message, r
- uint16 msg = READ_LE_UINT16(code + 1);
- uint16 func = 6 + addr + READ_LE_UINT16(code + 4);
- debug(0, "call %04x", func);
- //debug(0, "trivial callback, showing message %s", (const char *)res->dseg.ptr(addr));
- switch (func) {
- case 0xa055:
- displayMessage(msg);
- return true;
- }
+void TeenAgentEngine::fnGetOutOfLake() {
+ loadScene(15, 156, 180, 3);
+ playSound(5, 5);
+ playSound(38, 14);
+ playSound(38, 20);
+ playSound(5, 25);
+ playActorAnimation(616);
+}
+
+void TeenAgentEngine::fnGuardDrinking() {
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ setTimerCallback(0, 0);
+ scene->getAnimation(0)->free();
+ SET_FLAG(dsAddr_scaredGuardAlreadyFlag, 1);
+
+ displayAsyncMessage(dsAddr_BooMsg, 300, 130, 1, 5); // "Booo!"
+ setOns(0, 16);
+ enableObject(2);
+
+ playSound(17, 5);
+ playAnimation(545, 0);
+
+ dialog->show(5, scene, 0, 546, textColorMark, textColorMansionGuard, 0, 1);
+ SET_FLAG(dsAddr_spokenWithMansionGuardFlag, 1);
+ SET_FLAG(dsAddr_haveNotSpokenWithMansionGuardFlag, 0);
+}
+
+void TeenAgentEngine::fnEgoDefaultPosition() {
+ if (scene->getPosition().y <= 149)
+ moveTo(94, 115, 4);
+ else
+ moveTo(51, 149, 4);
+}
+
+void TeenAgentEngine::fnEnterCave() {
+ loadScene(24, 230, 170, 1);
+ playSound(52, 3);
+ playSound(52, 7);
+ playSound(52, 11);
+ playSound(52, 14);
+ playSound(52, 18);
+ playSound(52, 21);
+ playSound(52, 25);
+ playActorAnimation(601);
+ moveTo(230, 179, 3);
+ if (!CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ displayMessage(dsAddr_kindaDarkMsg); // "It's kinda dark here"
+}
+
+void TeenAgentEngine::fnEgoScaredBySpider() {
+ if (CHECK_FLAG(dsAddr_egoAlreadyScaredBySpiderFlag, 1)) {
+ fnMoveToLadderAndLeaveCellar();
+ dialog->showMark(75, scene);
+ } else {
+ dialog->showMark(73, scene);
+ fnMoveToLadderAndLeaveCellar();
+ wait(100);
+ dialog->showMark(74, scene);
+ SET_FLAG(dsAddr_egoAlreadyScaredBySpiderFlag, 1);
}
+}
- if (code[0] == 0xe8 && code[3] == 0xc3) {
- uint func = 3 + addr + READ_LE_UINT16(code + 1);
- debug(0, "call %04x and return", func);
- if (func == 0xa4d6) {
- rejectMessage();
+void TeenAgentEngine::fnMoveToLadderAndLeaveCellar() {
+ Object *objTemp = scene->getObject(3);
+ moveTo(objTemp);
+ fnLeaveCellar();
+ moveTo(48, 190, 3);
+}
+
+void TeenAgentEngine::fnLeaveCellar() {
+ playSound(52, 10);
+ playSound(52, 14);
+ playSound(52, 18);
+ playSound(52, 21);
+ playSound(52, 25);
+ playSound(52, 28);
+ playSound(52, 32);
+ playActorAnimation(600);
+ loadScene(21, 297, 178, 3);
+}
+
+void TeenAgentEngine::fnPutRockInHole() {
+ if (CHECK_FLAG(dsAddr_timedCallbackState, 0)) {
+ playSound(5, 2);
+ playSound(15, 12);
+ playActorAnimation(638);
+ inventory->remove(kInvItemMouse);
+ setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100);
+ SET_FLAG(dsAddr_timedCallbackState, 1);
+ } else if (CHECK_FLAG(dsAddr_timedCallbackState, 1)) {
+ playSound(5, 2);
+ playSound(52, 13);
+ playActorAnimation(648);
+ setOns(1, 46);
+ inventory->remove(kInvItemRock);
+ setTimerCallback(csAddr_mouseOutOfHoleTimeout, 100);
+ SET_FLAG(dsAddr_timedCallbackState, 2);
+ } else if (CHECK_FLAG(dsAddr_timedCallbackState, 2)) {
+ playActorAnimation(649);
+ setOns(1, 47);
+ wait(300);
+ for (byte i = 1; i <= 37; i += 4)
+ playSound(68, i);
+ playAnimation(639, 2);
+ setOns(0, 42);
+ enableObject(6);
+ disableObject(5);
+ SET_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1);
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ setTimerCallback(0, 0);
+ }
+}
+
+void TeenAgentEngine::fnEgoBottomRightTurn() {
+ Common::Point p = scene->getPosition();
+ if (p.x == 208 && p.y == 151)
+ moveRel(0, 0, 2);
+ else
+ moveTo(208, 151, 1);
+}
+
+bool TeenAgentEngine::fnCheckingDrawers() {
+ uint16 v = GET_FLAG(dsAddr_drawerPuzzleBookValue) - 1;
+ if (GET_FLAG(dsAddr_blueDrawerOpenFlag + v) != 1)
+ return false;
+ else {
+ uint16 sum = 0;
+ for (uint i = 0; i < 6; ++i)
+ sum += GET_FLAG(dsAddr_blueDrawerOpenFlag + i);
+ if (sum != 1)
+ return false;
+ else
return true;
- }
}
+}
- if (code[0] == 0xc7 && code[1] == 0x06 && code[2] == 0xf3 && code[3] == 0xb4 &&
- code[6] == 0xb8 && code[9] == 0xbb && code[12] == 0xbf &&
- code[22] == 0xe8 && code[25] == 0xc3) {
- loadScene(code[4], Common::Point(
- (READ_LE_UINT16(code + 7) + READ_LE_UINT16(code + 13) + 1) / 2 ,
- READ_LE_UINT16(code + 10)));
- scene->setOrientation(code[21]);
+void TeenAgentEngine::fnDrawerOpenMessage() {
+ if (CHECK_FLAG(dsAddr_drawerPuzzleHintGivenFlag, 1))
+ displayMessage(dsAddr_drawerOpenMsg); // "I cannot open the drawer if the next one is open!"
+ else {
+ displayMessage(dsAddr_strangeDrawerMsg); // "Strange, but the drawer is stuck if the next drawer is open"
+ displayMessage(dsAddr_notOrdinaryDrawersMsg); // "Maybe these are not just ordinary drawers!"
+ SET_FLAG(dsAddr_drawerPuzzleHintGivenFlag, 1);
+ }
+}
+
+bool TeenAgentEngine::fnRobotSafeAlreadyUnlockedCheck() {
+ if (CHECK_FLAG(dsAddr_MansionRobotSafeUnlockedFlag, 1)) {
return true;
+ } else {
+ displayMessage(dsAddr_noReasonMsg); // "There's no reason to do it"
+ return false;
}
+}
- switch (addr) {
+void TeenAgentEngine::fnRobotSafeUnlockCheck() {
+ if (CHECK_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1) &&
+ CHECK_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1) &&
+ CHECK_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1)) {
+ waitLanAnimationFrame(1, 1);
+ playSound(89, 2);
+ playActorAnimation(731);
+ setOns(0, 70);
+ setLan(1, 0);
+ disableObject(1);
+ enableObject(2);
+ enableObject(3);
+ }
+}
- case 0x024c: //intro
- hideActor();
+bool TeenAgentEngine::fnMansionIntrusionAttempt() {
+ wait(50);
+ byte attempts = res->dseg.get_byte(dsAddr_mansionEntryCount) + 1;
+ res->dseg.set_byte(dsAddr_mansionEntryCount, attempts);
+ debugC(0, kDebugCallbacks, "mansion intrusion attempt #%u", attempts);
+ if (attempts >= 7)
+ return false;
+ else {
+ byte id = scene->getId();
- loadScene(41, 139, 156, 3);
- playSound(41, 12);
- playAnimation(912, 1);
- setOns(0, 108);
- playSound(62, 8);
- playSound(58, 40);
- playAnimation(913, 1);
- setOns(1, 109);
- setLan(2, 1);
- Dialog::show(scene, 0x748e, 914, 915, 0xe7, 0xd7, 2, 1);
- displayCredits(0xe3c2);
-
- loadScene(42, 139, 156, 3);
- playSound(15, 20);
- playAnimation(916, 1);
- playSound(40, 18);
- playSound(40, 22);
- for (byte i = 27; i < 37; i += 2)
- playSound(40, i);
- playSound(29, 44);
- playAnimation(918, 0, true);
- playAnimation(917, 1, true);
- waitAnimation();
- displayCredits(0xe3e6);
+ playMusic(11);
+ displayCutsceneMessage(dsAddr_cutsceneMsg2, 84, 95); // "Meanwhile in the mansion"
+ switch (attempts) {
+ case 2:
+ fnSecondMansionIntrusion();
+ break;
+ case 3:
+ fnThirdMansionIntrusion();
+ break;
+ case 4:
+ fnFourthMansionIntrusion();
+ break;
+ case 5:
+ fnFifthMansionIntrusion();
+ break;
+ case 6:
+ fnSixthMansionIntrusion();
+ break;
+ default:
+ error("mansion intrusion attempts out of range!");
+ break;
+ }
+ playMusic(6);
+ if (getFlag(dsAddr_johnNotyOutsideMansionDoorFlag) != 1 || attempts != 6)
+ loadScene(id, scene->getPosition());
+ return true;
+ }
+}
- loadScene(40, 139, 156, 3);
- playMusic(3);
- Dialog::show(scene, 0x750d, 920, 924, 0xe7, 0xeb, 1, 2); //as i told you, our organization...
- playSound(26, 50);
- playAnimation(925, 0, true);
- playAnimation(926, 1, true);
- waitAnimation();
- Dialog::show(scene, 0x78a6, 927, 920, 0xeb, 0xe7, 2, 1);
- displayCredits(0xe3ff);
+void TeenAgentEngine::fnSecondMansionIntrusion() {
+ hideActor();
+ loadScene(34, scene->getPosition());
+ playAnimation(986, 0, true);
+ playAnimation(987, 1, true);
+ waitAnimation();
+ dialog->show(178, scene, 988, 989, textColorMansionGuard, textColorJohnNoty, 1, 2);
+ playAnimation(990, 0, true);
+ playAnimation(991, 1, true);
+ waitAnimation();
+ showActor();
+}
- loadScene(39, 139, 156, 3);
- playMusic(11);
- playSound(81, 2);
- playSound(81, 8);
- playSound(81, 11);
- playSound(81, 14);
- playSound(81, 16);
- playSound(81, 18);
- playSound(81, 20);
- playSound(81, 21);
- playAnimation(928, 1);
- setOns(0, 112);
- Dialog::showMono(scene, 0x78e1, 929, 0xd1, 1); //he's coming
- showActor();
- moveTo(319, 150, 1, true);
- moveTo(63, 150, 1);
- displayAsyncMessage(0x5da8, 19844, 18, 36); //hey, what's the matter?
- playAnimation(851, 0, true);
- playActorAnimation(930, true);
- waitAnimation();
- playSound(24, 11);
- playActorAnimation(931);
+void TeenAgentEngine::fnThirdMansionIntrusion() {
+ hideActor();
+ loadScene(30, scene->getPosition());
+ playAnimation(887, 1);
+ playAnimation(888, 2, true, true, true);
+ //waitAnimation();
+ dialog->showMono(179, scene, 889, textColorMansionGuard, 2);
+ playSound(26, 3);
+ playAnimation(891, 1, true, true, true);
+ playAnimation(892, 2);
+ waitAnimation();
+ dialog->show(180, scene, 890, 889, textColorJohnNoty, textColorMansionGuard, 3, 2);
+ showActor();
+}
- displayCredits(0xe42f);
+void TeenAgentEngine::fnFourthMansionIntrusion() {
+ hideActor();
+ loadScene(32, scene->getPosition());
+ playAnimation(894, 1, true, true, true);
+ playAnimation(893, 2, true);
+ waitAnimation();
+ dialog->showMono(181, scene, 895, textColorMansionGuard, 3);
+ playSound(75, 9);
+ playAnimation(898, 1, true);
+ playAnimation(897, 2, true);
+ dialog->show(182, scene, 896, 895, textColorJohnNoty, textColorMansionGuard, 2, 3);
+ showActor();
+}
- playMusic(3);
- loadScene(40, 50, 186, 1);
- setOns(0, 113);
- Dialog::show(scene, 0x78f1, 919, 0, 0xe7, 0xd1, 1, 0);
- moveTo(196, 186, 1);
- Dialog::show(scene, 0x7958, 0, 920, 0xd1, 0xe7, 0, 1);
- playActorAnimation(932);
- Dialog::show(scene, 0x7e07, 0, 920, 0xd1, 0xe7, 0, 1);
- playActorAnimation(932);
- Dialog::show(scene, 0x7e1a, 0, 920, 0xd1, 0xe7, 0, 1);
- playActorAnimation(932);
- Dialog::show(scene, 0x7e2c, 0, 922, 0xd1, 0xe7, 0, 1);
- playActorAnimation(933);
- Dialog::show(scene, 0x7e70, 0, 920, 0xd1, 0xe7, 0, 1);
- moveTo(174, 186, 1);
- playAnimation(851, 0, true);
- playActorAnimation(934, true);
- waitAnimation();
- loadScene(10, 136, 153, 3);
+void TeenAgentEngine::fnFifthMansionIntrusion() {
+ hideActor();
+ loadScene(29, scene->getPosition());
+ playActorAnimation(901, true);
+ playAnimation(900, 1, true);
+ waitAnimation();
+ dialog->show(183, scene, 903, 902, textColorJohnNoty, textColorMansionGuard, 2, 3);
+ for (byte i = 3; i <= 9; i += 2)
+ playSound(56, i);
+
+ playActorAnimation(905, true);
+ playAnimation(904, 1, true);
+ dialog->show(184, scene, 903, 902, textColorJohnNoty, textColorMansionGuard, 2, 3);
+ showActor();
+}
+
+void TeenAgentEngine::fnSixthMansionIntrusion() {
+ hideActor();
+ loadScene(35, scene->getPosition());
+ playAnimation(907, 2, true);
+ playAnimation(906, 3, true);
+ waitAnimation();
+ dialog->show(185, scene, 908, 909, textColorMansionGuard, textColorJohnNoty, 2, 3);
+ dialog->show(186, scene, 910, 908, textColorJohnNoty, textColorMansionGuard, 3, 2);
+ loadScene(11, scene->getPosition());
+ showActor();
+ setOns(3, 51);
+ playAnimation(911, 1);
+ playAnimation(899, 1);
+ setFlag(dsAddr_johnNotyOutsideMansionDoorFlag, 1);
+ reloadLan();
+ wait(200);
+ enableObject(8);
+ setLan(2, 8);
+}
+void TeenAgentEngine::fnTooDark() {
+ displayMessage(dsAddr_TooDarkMsg); // "It's too dark to see clearly"
+}
+
+bool TeenAgentEngine::fnIsCookGone() {
+ if (CHECK_FLAG(dsAddr_MansionCookGoneFlag, 1)) {
return true;
+ } else {
+ displayMessage(dsAddr_cookAroundMsg); // "I can't do anything with this cook around"
+ return false;
+ }
+}
+
+void TeenAgentEngine::fnEgoSuspiciousPosition() {
+ Common::Point p = scene->getPosition();
+ if (p.x != 203 && p.y != 171)
+ moveTo(203, 169, 2);
+ else
+ moveTo(203, 169, 1);
+}
+
+void TeenAgentEngine::fnGivingFlowerToOldLady() {
+ playSound(5, 2);
+ dialog->show(37, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
+ playActorAnimation(537, true);
+ playAnimation(538, 0, true);
+ waitAnimation();
+ wait(100);
+ dialog->show(38, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
+}
+
+void TeenAgentEngine::fnGiveAnotherFlowerToOldLady() {
+ dialog->pop(scene, dsAddr_dialogStackOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
+}
+
+void TeenAgentEngine::fnGivingFlowerToAnne() {
+ dialog->show(53, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ playSound(5, 10);
+ playActorAnimation(540, true);
+ playAnimation(539, 1, true);
+ waitAnimation();
+ wait(100);
+ dialog->show(54, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ wait(50);
+ dialog->show(55, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ dialog->show(56, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ wait(50);
+ moveRel(0, 1, 0);
+ dialog->show(57, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ moveRel(0, -1, 0);
+ wait(50);
+}
+
+void TeenAgentEngine::fnGiveAnotherFlowerToAnne() {
+ dialog->pop(scene, dsAddr_dialogStackAnotherFlowerToAnne, 0, 524, textColorMark, textColorAnne, 0, 2);
+}
+
+void TeenAgentEngine::rejectMessage() {
+ uint i = _rnd.getRandomNumber(3);
+ switch (i) {
+ case 0:
+ displayMessage(dsAddr_rejectMsg0); // "I have no idea what to do with it"
+ break;
+ case 1:
+ displayMessage(dsAddr_rejectMsg1); // "I can't imagine what I could do with this"
+ break;
+ case 2:
+ displayMessage(dsAddr_rejectMsg2); // "I can't figure out what I should do with this"
+ break;
+ case 3:
+ displayMessage(dsAddr_rejectMsg3); // "I can't find any reason to mess with it"
+ break;
+ default:
+ error("rejectMessage() index out of range");
+ break;
+ }
+}
+
+bool TeenAgentEngine::processCallback(uint16 addr) {
+ if (addr == 0)
+ return false;
+
+ debugC(0, kDebugCallbacks, "processCallback(%04x)", addr);
+
+ bool retVal = true;
+ switch (addr) {
+ case csAddr_intro: // intro
+ fnIntro();
+ break;
+
+ case 0x3fed:
+ loadScene(3, Common::Point(305, 104));
+ scene->setOrientation(4);
+ break;
+
+ case 0x4007:
+ loadScene(5, Common::Point(300, 131));
+ scene->setOrientation(3);
+ break;
case 0x4021:
- //pulling out mysterious object
- if (CHECK_FLAG(0xdbe1, 1)) {
+ // pulling out mysterious object
+ if (CHECK_FLAG(dsAddr_cutFenceFlag, 1)) {
playActorAnimation(844);
playActorAnimation(846);
playActorAnimation(845);
- displayMessage(0x5696);
+ displayMessage(dsAddr_pullObjMsg1); // "I can't pull it out"
} else {
- displayMessage(0x570f);
+ displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
}
- return true;
-
- case 0x4094: //climbing to the pole near mudpool
- if (CHECK_FLAG(0xDBE4, 1)) {
- displayMessage(0x57b2);
- return true;
+ break;
+
+ case 0x4048:
+ displayMessage(dsAddr_dontWantToTouchMsg); // "I don't want to touch it - I might get hurt"
+ break;
+
+ case 0x404f:
+ displayMessage(dsAddr_notWantToSleepMsg); // "I don't want to sleep"
+ break;
+
+ case 0x4056:
+ // FIXME - This is the bird use callback in the first act at
+ // the mudpool. Current Code based on behaviour. Need to analyse cseg data.
+ dialog->popMark(scene, dsAddr_dialogStackMudpoolBird);
+ break;
+
+ case 0x4060:
+ loadScene(2, Common::Point(28, 180));
+ scene->setOrientation(2);
+ break;
+
+ case 0x407a:
+ loadScene(4, Common::Point(297, 128));
+ scene->setOrientation(4);
+ break;
+
+ case 0x4094: // climbing to the pole near mudpool
+ if (CHECK_FLAG(dsAddr_gotMugOfMudFlag, 1)) {
+ displayMessage(dsAddr_poleClimbDoneMsg); // "Never Again!"
} else {
for (byte i = 11; i <= 27; i += 4)
playSound(76, i);
@@ -196,39 +574,49 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(865, 1);
playActorAnimation(866);
//InventoryObject *obj = inventory->selectedObject();
- //if (obj != NULL && obj->id == 0x55) {
+ //if (obj != NULL && obj->id == kInvItemMug) {
- //implement pause and using real object:
- if (inventory->has(0x55)) {
+ // FIXME: implement pause in mudpool and using of Mug object, as per original interpreter
+ if (inventory->has(kInvItemMug)) {
playSound(5, 4);
playSound(5, 19);
playSound(64, 11);
playActorAnimation(867);
- inventory->remove(0x55);
- inventory->add(0x56);
+ inventory->remove(kInvItemMug);
+ inventory->add(kInvItemMugOfMud);
moveTo(86, 195, 1, true);
playActorAnimation(868);
- SET_FLAG(0xDBE4, 1);
+ SET_FLAG(dsAddr_gotMugOfMudFlag, 1);
} else {
- processCallback(0x4173);
- Dialog::pop(scene, 0xDB72, 0, 0, 0xd1, 0xd1, 0, 0);
+ fnPoleClimbFail();
+ dialog->popMark(scene, dsAddr_dialogStackFallIntoMudpool);
}
- return true;
}
- case 0x4173:
- //fail!
- moveTo(86, 195, 1, true);
- playActorAnimation(868);
- return true;
+ break;
+
+ case csAddr_poleClimbFail:
+ fnPoleClimbFail();
+ break;
- case 0x419c: //getting the bird
+ case 0x4195:
+ displayMessage(dsAddr_preferWaterMsg); // "I prefer water"
+ break;
+
+ case 0x419c: // getting the bird
setOns(0, 0);
playSound(56, 10);
playActorAnimation(875);
disableObject(6);
- inventory->add(0x5c);
- return true;
+ inventory->add(kInvItemBird);
+ break;
+ case 0x41c3:
+ displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
+ break;
+
+ case 0x41ca:
+ rejectMessage();
+ break;
case 0x41ce:
moveTo(197, 159, 4);
@@ -236,9 +624,23 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(71, 8);
playActorAnimation(833);
moveTo(225, 159, 4);
- inventory->add(0x4e);
+ inventory->add(kInvItemDelicatePlant);
disableObject(3);
- return true;
+ break;
+
+ case 0x422c:
+ displayMessage(dsAddr_tooWeakToClimbMsg); // "I'm too weak to climb it"
+ break;
+
+ case 0x4233:
+ loadScene(3, Common::Point(216, 199));
+ scene->setOrientation(1);
+ break;
+
+ case 0x424d:
+ loadScene(5, Common::Point(18, 174));
+ scene->setOrientation(2);
+ break;
case 0x4267:
hideActor();
@@ -252,92 +654,111 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 26);
playActorAnimation(842);
wait(100);
- //shown in different positions
- displayMessage(0x5656, 0xd1, 0x5510);
+ // shown in different positions
+ displayMessage(dsAddr_fnMsg2, textColorMark, 16, 68); // "And how am I supposed to get back?"
wait(50);
- displayMessage(0x567a, 0xd1, 0x555c);
+ displayMessage(dsAddr_fnMsg3, textColorMark, 92, 68); // "Great"
wait(50);
- displayMessage(0x5682, 0xd1, 0x553e);
+ displayMessage(dsAddr_fnMsg4, textColorMark, 62, 68); // "Oh, yeah, right"
wait(50);
playActorAnimation(843);
showActor();
moveTo(223, 149, 0, true);
disableObject(7);
disableObject(1);
- inventory->add(0x51);
- displayMessage(0x5646);
- return true;
+ inventory->add(kInvItemShovelAct1);
+ displayMessage(dsAddr_fnMsg1); // "Piece of cake"
+ break;
+
+ case 0x433a:
+ loadScene(10, Common::Point(294, 183));
+ scene->setOrientation(4);
+ break;
+
+ case 0x4354:
+ loadScene(4, Common::Point(300, 185));
+ scene->setOrientation(4);
+ break;
+
+ case 0x436e:
+ loadScene(2, Common::Point(219, 199));
+ scene->setOrientation(1);
+ break;
case 0x4388:
playSound(80, 4);
playActorAnimation(961);
loadScene(8, 155, 199, 1);
- return true;
+ break;
- case 0x43b5: //HQ, first trial - prison
+ case 0x43b5: // HQ, first trial - prison
playSound(70, 6);
playActorAnimation(962);
loadScene(7, 30, 184, 2);
- if (res->dseg.get_byte(0xDBDF) < 2) {
+ if (res->dseg.get_byte(dsAddr_FirstActTrialState) < 2) {
wait(150);
moveTo(134, 167, 2);
- displayMessage(0x54f7);
+ displayMessage(dsAddr_firstTrialMsg); // "Sir, I'm Mark. A rookie"
setLan(1, 0);
playAnimation(812, 0, true);
playActorAnimation(811);
- Dialog::show(scene, 0x6117, 0, 813, 0xd1, 0xec, 0, 1);
+ dialog->show(148, scene, 0, 813, textColorMark, textColorCaptain, 0, 1);
loadScene(6, 230, 184);
playMusic(5);
- Dialog::show(scene, 0x626a, 0, 814, 0xd1, 0xec, 0, 1);
+ dialog->show(149, scene, 0, 814, textColorMark, textColorCaptain, 0, 1);
playSound(4, 14);
playAnimation(815, 0);
setOns(1, 0);
- Dialog::showMono(scene, 0x62dc, 0, 0xd1, 0);
+ dialog->showMono(150, scene, 0, textColorMark, 0);
- SET_FLAG(0xDBDF, 1);
+ SET_FLAG(dsAddr_FirstActTrialState, 1);
}
- return true;
+ break;
case 0x4482:
- if (CHECK_FLAG(0xDBDF, 0)) {
+ if (CHECK_FLAG(dsAddr_FirstActTrialState, 0)) {
playActorAnimation(968);
- displayMessage(0x5511);
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
} else {
playSound(80, 3);
playSound(79, 4);
playActorAnimation(968);
loadScene(6, 280, 186, 4);
}
- return true;
+ break;
- case 0x44fc: //pull out spring from bed
+ case 0x44fc: // pull out spring from bed
playSound(53, 25);
playSound(24, 27);
playSound(5, 36);
playActorAnimation(839);
moveTo(278, scene->getPosition().y, 0, true);
- inventory->add(0x50);
+ inventory->add(kInvItemSpring);
disableObject(1);
- return true;
+ break;
case 0x44cb:
- if (CHECK_FLAG(0xDBE5, 1)) {
- displayMessage(0x57c0);
+ if (CHECK_FLAG(dsAddr_gotRopeAct1Flag, 1)) {
+ displayMessage(dsAddr_vacMsg); // "What am I? A vacuum cleaner?!"
} else {
playSound(49, 14);
playSound(5, 21);
playActorAnimation(869);
- inventory->add(0x58);
- SET_FLAG(0xDBE5, 1);
+ inventory->add(kInvItemRopeAct1);
+ SET_FLAG(dsAddr_gotRopeAct1Flag, 1);
}
- return true;
+ break;
+
+ case 0x4532:
+ displayMessage(dsAddr_springPrickMsg); // "The springs would prick my back"
+ break;
- case 0x4539: //prison cell: use crates
- if (CHECK_FLAG(0xdbdd, 2)) {
- //finished the meal - trap
- displayMessage(0x55c0);
+ case 0x4539: // prison cell: use crates
+ if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 2)) {
+ // finished the meal - trap
+ displayMessage(dsAddr_mealFinishedMsg); // "Hey! I finished my meal."
moveTo(306, 196, 2);
wait(50);
//playAnimation(825, 1); //very long empty animation. what for?
@@ -354,66 +775,65 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
loadScene(6, scene->getPosition());
setOns(3, 0x5b);
wait(50);
- displayMessage(0x55db);
- SET_FLAG(0xdbdd, 3);
+ displayMessage(dsAddr_bowlWeldedMsg); // "Wow. He got welded to the bowl"
+ SET_FLAG(dsAddr_JailCableAndBowlState, 3);
scene->getObject(4)->setName("body");
} else {
- if (Dialog::pop(scene, 0xdb5c, 0, 0, 0xd1, 0xd1, 0, 0) != 0x636b) //not 'im getting hungry'
- return true;
-
- wait(100);
- playSound(52, 8);
- playSound(52, 13);
- playAnimation(820, 1);
- setOns(3, 0x59);
- wait(50);
- moveTo(scene->getPosition().x, scene->getPosition().y + 1, 3);
- wait(150);
- moveTo(scene->getPosition().x, scene->getPosition().y - 1, 2);
- wait(100);
- displayMessage(0x551f);
- enableObject(4);
- SET_FLAG(0xdbdc, 1);
+ if (dialog->pop(scene, dsAddr_dialogStackJailDoorGrates, 0, 0, textColorMark, textColorMark, 0, 0) == 0x636b) { // 'im getting hungry'
+ wait(100);
+ playSound(52, 8);
+ playSound(52, 13);
+ playAnimation(820, 1);
+ setOns(3, 0x59);
+ wait(50);
+ moveTo(scene->getPosition().x, scene->getPosition().y + 1, 3);
+ wait(150);
+ moveTo(scene->getPosition().x, scene->getPosition().y - 1, 2);
+ wait(100);
+ displayMessage(dsAddr_ThanksMsg); // "Thanks."
+ enableObject(4);
+ SET_FLAG(dsAddr_GotFoodBowlInJailFlag, 1);
+ }
}
- return true;
+ break;
case 0x4662:
- if (CHECK_FLAG(0xDBDD, 3)) {
- if (CHECK_FLAG(0xDBDE, 1)) {
- displayMessage(0x5608);
+ if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 3)) {
+ if (CHECK_FLAG(dsAddr_GotJailKeyFlag, 1)) {
+ displayMessage(dsAddr_noPocketMsg); // "I don't want to touch his pockets again."
} else {
moveTo(280, 179, 2);
playSound(49, 7);
playSound(5, 17);
playActorAnimation(827);
- inventory->add(0x4d);
- SET_FLAG(0xDBDE, 1);
+ inventory->add(kInvItemJailKey);
+ SET_FLAG(dsAddr_GotJailKeyFlag, 1);
}
} else
- displayMessage(0x5905);
- return true;
+ displayMessage(dsAddr_foodAliveMsg); // "No, thanks. This food seems still alive"
+ break;
- case 0x46af: //prison cell: use live cable
- if (CHECK_FLAG(0xdbdc, 1)) {
- displayMessage(0x555d);
+ case 0x46af: // prison cell: use live cable
+ if (CHECK_FLAG(dsAddr_GotFoodBowlInJailFlag, 1)) {
+ displayMessage(dsAddr_ideaMsg); // "That gives me an idea"
setOns(2, 0);
playActorAnimation(821);
setOns(2, 0x5a);
setOns(3, 0);
playSound(22, 2);
playActorAnimation(822);
- displayMessage(0x5577);
+ displayMessage(dsAddr_checkWorksMsg); // "Now I got to check if it works"
disableObject(5);
- SET_FLAG(0xdbdd, 1);
+ SET_FLAG(dsAddr_JailCableAndBowlState, 1);
} else
- displayMessage(0x5528);
- return true;
+ displayMessage(dsAddr_unkUsageMsg); // "I don't have any idea what to do with it right now"
+ break;
- case 0x4705: //prison: getting lamp bulb
+ case 0x4705: // prison: getting lamp bulb
wait(50);
moveTo(144, 185, 4);
playSound(56, 15);
- setOns(0, 86); //hiding lamp
+ setOns(0, 86); // hiding lamp
playActorAnimation(816, true);
playAnimation(817, 0, true);
waitAnimation();
@@ -430,69 +850,102 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
disableObject(6);
enableObject(5);
- inventory->add(0x4c);
- return true;
+ inventory->add(kInvItemBulb);
+ break;
- case 0x4794: //prison cell door
- if (res->dseg.get_byte(0xDBDF) >= 2) {
+ case 0x4794: // prison cell door
+ if (res->dseg.get_byte(dsAddr_FirstActTrialState) >= 2) {
loadScene(5, 287, 143);
} else {
- displayMessage(0x592f);
+ displayMessage(dsAddr_doorClosedMsg); // "The door is closed. What a surprise."
}
- return true;
+ break;
- case 0x47bc: //prison: examining trash can
+ case 0x47bc: // prison: examining trash can
playSound(79, 5);
playSound(1, 14);
playActorAnimation(966);
- displayMessage(0x5955);
- return true;
+ displayMessage(dsAddr_emptyMsg); // "It's Empty"
+ break;
- case 0x47db: //prison: use switch
- if (CHECK_FLAG(0xDBDF, 1)) {
+ case 0x47db: // prison: use switch
+ if (CHECK_FLAG(dsAddr_FirstActTrialState, 1)) {
playSound(71, 4);
playActorAnimation(823);
- if (CHECK_FLAG(0xDBDD, 0)) {
- displayMessage(0x4d80);
+ if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 0)) {
+ displayMessage(dsAddr_NotHappenMsg); // "Nothing happened"
} else {
playSound(74, 1);
playAnimation(824, 1);
- if (CHECK_FLAG(0xDBDD, 1)) {
+ if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 1)) {
wait(100);
- displayMessage(0x559a);
- SET_FLAG(0xDBDD, 2);
+ displayMessage(dsAddr_timeToCallMsg); // "I think it is time to call captain"
+ SET_FLAG(dsAddr_JailCableAndBowlState, 2);
}
}
} else {
- displayMessage(0x52f6);
+ displayMessage(dsAddr_nahMsg); // "Nah"
}
- return true;
+ break;
+
+ case 0x4836:
+ rejectMessage();
+ break;
case 0x4871:
playActorAnimation(965);
- displayMessage(0x5511);
- return true;
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
+ break;
+
+ case 0x487e:
+ displayMessage(dsAddr_geographyClassMsg); // "I should have paid more attention in geography classes."
+ break;
+
+ case 0x4885:
+ displayMessage(dsAddr_dontNeedMessMsg); // "I don't need this mess"
+ break;
+
+ case 0x488c:
+ displayMessage(dsAddr_seenSofterRocksMsg); // "Thanks, but I've seen softer rocks"
+ break;
- case 0x4893: //taking pills
- if (CHECK_FLAG(0xDBE6, 1)) {
- SET_FLAG(0xDBE6, 2);
+ case 0x4893: // taking pills
+ if (CHECK_FLAG(dsAddr_captainDrawerState, 1)) {
+ SET_FLAG(dsAddr_captainDrawerState, 2);
setOns(1, 0x67);
playSound(5, 9);
playActorAnimation(872);
- inventory->add(0x5a);
+ inventory->add(kInvItemMedicine);
disableObject(7);
} else {
playActorAnimation(964);
- displayMessage(0x5511);
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
}
- return true;
+ break;
+
+ case 0x48d4:
+ displayMessage(dsAddr_tooBluntMsg); // "They are too blunt to be of any use"
+ break;
+
+ case 0x48db:
+ displayMessage(dsAddr_uselessModelsMsg); // "What's the use of the models?"
+ break;
+
+ case 0x48e2:
+ case 0x48e6:
+ rejectMessage();
+ break;
+
+ case 0x4911:
+ displayMessage(dsAddr_barmanWillNoticeMsg); // "The barman will surely notice its disappearing"
+ break;
- case 0x4918: //talking with barmen
- if (CHECK_FLAG(0xDBE7, 1)) {
+ case 0x4918: // talking with barmen
+ if (CHECK_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1)) {
moveTo(140, 152, 1);
- if (CHECK_FLAG(0xDBE8, 1)) {
- Dialog::showMono(scene, 0x6f20, 0, 0xd1, 0); //aren't you thirsty?
- displayMessage(0x5883, 0xef, 21472);
+ if (CHECK_FLAG(dsAddr_swappedBarmanMugFlag, 1)) {
+ dialog->showMono(177, scene, 0, textColorMark, 0);
+ displayMessage(dsAddr_yeahRightMsg, textColorBarman, 32, 67); // "Yeah right!"
//reloadLan();
setLan(1, 0);
playAnimation(882, 0);
@@ -504,86 +957,145 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
shakeScreen();
disableObject(1);
disableObject(2);
- SET_FLAG(0xDBE9, 1);
+ SET_FLAG(dsAddr_barmanPassedOutFlag, 1);
} else
- displayMessage(0x5855);
+ displayMessage(dsAddr_talkNotNowMsg); // "I've got no reason to talk to him right now."
} else {
- if (CHECK_FLAG(0xDBDF, 3)) {
- if (CHECK_FLAG(0xDBE3, 1)) {
- Dialog::show(scene, 0x6BD6, 0, 857, 0xd1, 0xef, 0, 1);
+ if (CHECK_FLAG(dsAddr_FirstActTrialState, 3)) {
+ if (CHECK_FLAG(dsAddr_spokeToBarmanAboutThirdTrialFlag, 1)) {
+ dialog->show(168, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
} else {
- Dialog::show(scene, 0x69B5, 0, 857, 0xd1, 0xef, 0, 1); //taking mug
+ dialog->show(166, scene, 0, 857, textColorMark, textColorBarman, 0, 1); // taking mug
playActorAnimation(859, true);
playAnimation(858, 0, true);
waitAnimation();
playSound(75, 6);
playActorAnimation(860);
- Dialog::show(scene, 0x69C2, 0, 857, 0xd1, 0xef, 0, 1);
- inventory->add(0x55);
- SET_FLAG(0xDBE3, 1);
- SET_FLAG(0xDBF0, 0);
+ dialog->show(167, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
+ inventory->add(kInvItemMug);
+ SET_FLAG(dsAddr_spokeToBarmanAboutThirdTrialFlag, 1);
+ SET_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 0);
}
} else {
- Dialog::pop(scene, 0xDB68, 0, 857, 0xd1, 0xef, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackBarman, 0, 857, textColorMark, textColorBarman, 0, 1);
}
}
- return true;
+ break;
- case 0x4f14: //use the hollow
- displayMessage(CHECK_FLAG(0xDBA1, 1) ? 0x370f : 0x36c2);
- return true;
+ case 0x4d7d:
+ case 0x4d81:
+ rejectMessage();
+ break;
+
+ case 0x4d89:
+ displayMessage(dsAddr_getRidOfGuardFirstMsg); // "If I want to get inside I must get rid of this guard first..."
+ break;
+
+ case 0x4d90:
+ rejectMessage();
+ break;
+
+ case 0x4e47:
+ loadScene(13, Common::Point(9, 172));
+ scene->setOrientation(2);
+ break;
+
+ case 0x4e85:
+ loadScene(15, Common::Point(291, 162));
+ scene->setOrientation(4);
+ break;
+
+ case 0x4e9f:
+ loadScene(12, Common::Point(310, 152));
+ scene->setOrientation(4);
+ break;
+
+ case 0x4f14: // use the hollow
+ if (CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1))
+ displayMessage(dsAddr_totalEmptyMsg); // "I can see it's totally empty"
+ else
+ displayMessage(dsAddr_noHandsMsg); // "I'd better not put my hands in there..."
+ break;
case 0x4a64:
- if (CHECK_FLAG(0xDBF0, 1)) {
- displayMessage(0x5e25);
- } else {
+ if (CHECK_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 1))
+ displayMessage(dsAddr_firstBusinessMsg); // "First I've got some business to take care of"
+ else
loadScene(5, 35, 162);
- }
- return true;
+ break;
case 0x4bf5:
playActorAnimation(959);
loadScene(8, 40, 152, 3);
- return true;
+ break;
+
+ case 0x4c18:
+ rejectMessage();
+ break;
+
+ case 0x4c29:
+ displayMessage(dsAddr_tooManyToSearchMsg); // "There are too many of them to search"
+ break;
+
+ case 0x4c30:
+ case 0x4c37:
+ displayMessage(dsAddr_captainWouldNotFitMsg); // "Captain surely wouldn't fit them. I must look elsewhere"
+ break;
case 0x483a:
- Dialog::pop(scene, 0xdb82, 0, 0, 0xd1, 0xd1, 0, 0);
- return true;
+ dialog->popMark(scene, dsAddr_dialogStackInterrogateCaptain);
+ break;
case 0x4844:
playSound(80, 4);
playActorAnimation(963);
loadScene(5, 166, 158);
- return true;
+ break;
case 0x48ea:
setOns(0, 0);
playSound(5, 9);
playActorAnimation(836);
- inventory->add(0x4f);
+ inventory->add(kInvItemSwissArmyKnife);
disableObject(12);
- return true;
+ break;
case 0x4a8c:
- if (CHECK_FLAG(0xDBE9, 1)) {
+ if (CHECK_FLAG(dsAddr_barmanPassedOutFlag, 1)) {
playSound(89, 5);
playActorAnimation(958);
loadScene(9, 240, 182, 4);
- } else if (CHECK_FLAG(0xDBE7, 1)) {
- displayMessage(0x5894);
+ } else if (CHECK_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1)) {
+ displayMessage(dsAddr_barmanTooCloseMsg); // "The barman is too close"
} else {
- Dialog::pop(scene, 0xDB8A, 0, 857, 0xd1, 0xef, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackBarCellarDoor, 0, 857, textColorMark, textColorBarman, 0, 1);
}
- return true;
+ break;
- case 0x4af4: //taking the crumbs
+ case 0x4aed:
+ displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
+ break;
+
+ case 0x4af4: // taking the crumbs
setOns(0, 0);
playSound(49, 6);
playSound(5, 13);
playActorAnimation(861);
- inventory->add(0x57);
+ inventory->add(kInvItemCrumbs);
disableObject(6);
- return true;
+ break;
+
+ case 0x4b23:
+ rejectMessage();
+ break;
+
+ case 0x4b27:
+ displayMessage(dsAddr_tooMuchToDrinkMsg); // "It'd take too much time to drink it..."
+ break;
+
+ case 0x4b2e:
+ displayMessage(dsAddr_notThiefMsg); // "I'm not a thief. And it's empty, by the way."
+ break;
case 0x4b35:
playSound(15, 7);
@@ -591,140 +1103,149 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(55, 1);
playSound(24, 12);
playAnimation(885, 0);
- Dialog::show(scene, 0x67e5, 886, 0, 0xd0, 0xd1, 1, 0);
+ dialog->show(164, scene, 886, 0, textColorJohnNoty, textColorMark, 1, 0);
playMusic(3);
loadScene(40, 198, 186, 1);
- Dialog::show(scene, 0x7f20, 0, 920, 0xd1, 0xe7, 0, 1);
+ dialog->show(202, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
inventory->clear();
- inventory->add(0x1d);
- displayCredits(0xe45c);
+ inventory->add(kInvItemSuperGlue);
+ displayCredits(dsAddr_credits5);
loadScene(1, 198, 186);
hideActor();
playActorAnimation(956);
- Dialog::showMono(scene, 0x8bc4, 957, 0xd1, 1);
+ dialog->showMono(212, scene, 957, textColorMark, 1);
waitAnimation();
loadScene(15, 157, 199, 1);
playMusic(6);
- return true;
+ break;
- case 0x4c3e: //get the grenade
+ case 0x4c3e: // get the grenade
playSound(32, 24);
playActorAnimation(862);
reloadLan();
playAnimation(863, 1);
- inventory->add(0x54);
+ inventory->add(kInvItemGrenade);
disableObject(1);
- SET_FLAG(0xDBE2, 2);
- return true;
+ SET_FLAG(dsAddr_act1GuardState, 2);
+ break;
case 0x4c70:
- if (CHECK_FLAG(0xDBE2, 0)) {
- if (CHECK_FLAG(0xDBDA, 1)) { //papers are shown
- Dialog::pop(scene, 0xDB4C, 0, 809, 0xd1, 0xd0, 0, 1);
+ if (CHECK_FLAG(dsAddr_act1GuardState, 0)) {
+ if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) { // papers are shown
+ dialog->pop(scene, dsAddr_dialogStackCampGuardReadingNews, 0, 809, textColorMark, textColorCampGuard, 0, 1);
} else {
- Dialog::pop(scene, 0xDB40, 0, 809, 0xd1, 0xd0, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackCampGuardWantsDocuments, 0, 809, textColorMark, textColorCampGuard, 0, 1);
}
} else {
- displayMessage(0x5722);
+ displayMessage(dsAddr_helloQMsg); // "Hello?"
wait(100);
- displayMessage(0x572a);
+ displayMessage(dsAddr_totallyAddictedMsg); // "He's totally addicted"
}
- return true;
+ break;
case 0x4c1c:
playActorAnimation(960);
- displayMessage(0x5511);
- return true;
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
+ break;
+
+ case 0x4ca5:
+ displayMessage(dsAddr_chickenNeverMsg); // "Chickening? Me? Never!"
+ break;
case 0x4cac:
- if (CHECK_FLAG(0xdbda, 1)) { //papers are shown
+ if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) { // papers are shown
loadScene(5, 124, 199);
} else {
- Dialog::show(scene, 0x5FE9, 0, 809, 0xd1, 0xd0, 0, 1);
+ dialog->show(144, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
moveTo(269, 175, 4);
- Dialog::pop(scene, 0xDB56, 0, 809, 0xd1, 0xd0, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackCampGuardShowPass, 0, 809, textColorMark, textColorCampGuard, 0, 1);
}
- return true;
-
- case 0x4cf1: { //talking with mansion guard
- SET_FLAG(0xda96, 1);
- if (Dialog::pop(scene, 0xdaa6, 0, 529, 0xd1, 0xd9, 0, 1) != 0x1b4)
- return true;
+ break;
- Common::Point p = scene->getPosition();
- moveTo(189, 159, 0);
- //waitLanAnimationFrame(1, 1);
+ case 0x4cf1: // talking with mansion guard
+ SET_FLAG(dsAddr_spokenWithMansionGuardFlag, 1);
+ if (dialog->pop(scene, dsAddr_dialogStackPleadingToMansionGuard, 0, 529, textColorMark, textColorMansionGuard, 0, 1) == 0x01b4) { // 2nd try
+ Common::Point p = scene->getPosition();
+ moveTo(189, 159, 0);
+ //waitLanAnimationFrame(1, 1);
- playSound(5, 2);
- playSound(5, 19);
- playActorAnimation(550, true);
- playAnimation(551, 0, true);
- waitAnimation();
+ playSound(5, 2);
+ playSound(5, 19);
+ playActorAnimation(550, true);
+ playAnimation(551, 0, true);
+ waitAnimation();
- moveTo(p, 2);
- inventory->add(0x13);
- Dialog::pop(scene, 0xdaa6, 0, 529, 0xd1, 0xd9, 0, 1);
- }
- return true;
+ moveTo(p, 2);
+ inventory->add(kInvItemChocCandy);
+ dialog->pop(scene, dsAddr_dialogStackPleadingToMansionGuard, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
+ }
+ break;
- case 0x4d94: //talking with fatso
- Dialog::show(scene, 0x33bd, 0, 666, 0xd1, 0xd0, 0, 2);
- displayAsyncMessage(0x49ae, /*25060*/ 35000, 1, 10, 0xd0);
+ case 0x4d94: // talking with fatso
+ dialog->show(87, scene, 0, 666, textColorMark, textColorJohnNoty, 0, 2);
+ displayAsyncMessage(dsAddr_BribeMsg, 120, 109, 1, 10, textColorJohnNoty); // FIXME: Original (x,y) was (100, 78), rather than (120, 109)?
playSound(5, 3);
playAnimation(667, 1);
playAnimation(668, 1);
setOns(2, 50);
- Dialog::show(scene, 0x36c7, 0, 666, 0xd1, 0xd0, 0, 2);
+ dialog->show(88, scene, 0, 666, textColorMark, textColorJohnNoty, 0, 2);
setOns(3, 0);
- setFlag(0xDBEC, 0);
+ setFlag(dsAddr_johnNotyOutsideMansionDoorFlag, 0);
reloadLan();
playSound(82, 19);
playAnimation(669, 1);
- Dialog::showMark(scene, 0x3779);
+ dialog->showMark(89, scene);
enableObject(15);
disableObject(8);
- return true;
+ break;
case 0x4e61:
loadScene(14, 280, 198);
- return true;
+ break;
case 0x4ee5:
setOns(2, 0);
playSound(5, 12);
playActorAnimation(676);
- displayMessage(0x4ab0);
+ displayMessage(dsAddr_WimpMsg); // "I'm a pathetic little wimp"
disableObject(15);
- inventory->add(51);
- return true;
+ inventory->add(kInvItemBanknote);
+ break;
case 0x4d56:
- inventory->add(16);
+ inventory->add(kInvItemWhisky);
disableObject(2);
setOns(0, 0);
playSound(5, 12);
playActorAnimation(547);
- return true;
+ break;
+ case 0x4d85:
+ rejectMessage();
+ break;
- case 0x4eb9://Pick up wrapper
+ case 0x4eb9: // Pick up wrapper
playSound(5, 12);
playSound(5, 18);
- inventory->add(0x12);
+ inventory->add(kInvItemWrapper);
setOns(1, 0);
playActorAnimation(549);
disableObject(13);
- return true;
+ break;
+
+ case 0x4ee1:
+ rejectMessage();
+ break;
case 0x4f25:
playActorAnimation(967);
- displayMessage(0x3542);
- return true;
+ displayMessage(dsAddr_tooHardWoodMsg); // "This wood is too hard to break"
+ break;
- case 0x4f32: //use tree near the mansion
- if (CHECK_FLAG(0xDBA1, 1)) {
- if (CHECK_FLAG(0xDBA2, 1)) {
- displayMessage(0x3766);
+ case 0x4f32: // use tree near the mansion
+ if (CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_climbedMansionTreeAlreadyFlag, 1)) {
+ displayMessage(dsAddr_noChanceMsg); // "I won't take my chances a second time"
} else {
playSound(26, 13);
playSound(26, 15);
@@ -739,95 +1260,126 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(60, 16);
playActorAnimation(591);
wait(50);
- displayMessage(0x372e);
- SET_FLAG(0xDBA2, 1);
- processCallback(0x9d45);
+ displayMessage(dsAddr_oneSmallStepMsg); // "One small step for man, one big pain in the head"
+ SET_FLAG(dsAddr_climbedMansionTreeAlreadyFlag, 1);
+ fnMansionIntrusionAttempt();
}
} else {
playActorAnimation(49);
playSound(56, 8);
playSound(56, 12);
playSound(49, 10);
- displayAsyncMessage(0x4652, 31579, 16, 24);
+ displayAsyncMessage(dsAddr_laughterMsg, 219, 98, 16, 24); // "(laughter)"
playActorAnimation(587);
moveRel(0, 0, 2);
wait(100);
- displayMessage(0x3668);
+ displayMessage(dsAddr_tickledMsg); // "Something tickled me!"
}
- return true;
+ break;
- case 0x500d: //picking up wild plant
- if (CHECK_FLAG(0xDB9E, 1)) {
- displayMessage(0x35E8); //there are no more
+ case 0x500d: // picking up wild plant
+ if (CHECK_FLAG(dsAddr_gotPotatoAlreadyFlag, 1)) {
+ displayMessage(dsAddr_noPotatoMsg); // "There are no more potatoes"
} else {
- SET_FLAG(0xDB9E, 1);
+ SET_FLAG(dsAddr_gotPotatoAlreadyFlag, 1);
setOns(2, 0);
playSound(21, 9);
playSound(34, 21);
playSound(26, 30);
playActorAnimation(552);
setOns(2, 0x12);
- inventory->add(0x14);
+ inventory->add(kInvItemPotato);
}
- return true;
+ break;
+
+ case 0x505f:
+ displayMessage(dsAddr_wallTooSmoothMsg); // "The wall surface is too smooth to climb"
+ break;
+
+ case 0x5066:
+ loadScene(11, Common::Point(183, 109));
+ scene->setOrientation(3);
+ break;
+
+ case 0x5080:
+ loadScene(13, Common::Point(290, 181));
+ scene->setOrientation(4);
+ break;
+
+ case 0x50f6:
+ displayMessage(dsAddr_tooMuchResinToClimbMsg); // "I could climb it if there wasn't so much resin"
+ break;
+
+ case 0x50fd:
+ displayMessage(dsAddr_onlyGreenRectMsg); // "The only green stuff that I like is that rectangular piece of paper with..."
+ break;
case 0x5104:
loadScene(11, 319, 198, 4);
- if (CHECK_FLAG(0xDB9C, 1))
- return true;
-
- //guard's drinking
- SET_FLAG(0, 3);
- setTimerCallback(0x516d, 40);
- playAnimation(544, 0, true, true); //ignore busy flag for this animation
- return true;
+ if (!CHECK_FLAG(dsAddr_scaredGuardAlreadyFlag, 1)) {
+ // guard is drinking
+ SET_FLAG(dsAddr_timedCallbackState, 3);
+ setTimerCallback(csAddr_guardScareTimeout, 40);
+ playAnimation(544, 0, true, true); // ignore busy flag for this animation
+ }
+ break;
- case 0x516d: //too late to scare guard, resetting
- SET_FLAG(0, 0);
- return true;
+ case csAddr_guardScareTimeout: // too late to scare guard, resetting
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ break;
- case 0x5189: //guard's drinking, boo!
- SET_FLAG(0, 0);
- setTimerCallback(0, 0);
- scene->getAnimation(0)->free();
- SET_FLAG(0xDB9C, 1);
+ case csAddr_guardDrinking:
+ fnGuardDrinking();
+ break;
- displayAsyncMessage(0x3563, 320 * 130 + 300, 1, 5);
- setOns(0, 16);
- enableObject(2);
+ case 0x51c8:
+ displayMessage(dsAddr_wallTooSmoothMsg); // "The wall surface is too smooth to climb"
+ break;
- playSound(17, 5);
- playAnimation(545, 0);
+ case 0x51cf:
+ loadScene(12, Common::Point(15, 189));
+ scene->setOrientation(2);
+ break;
- Dialog::show(scene, 0x0917, 0, 546, 0xd1, 0xd9, 0, 1);
- SET_FLAG(0xDA96, 1);
- SET_FLAG(0xDA97, 0);
- return true;
+ case 0x51e9:
+ displayMessage(dsAddr_dontWannaTouchHedgehogMsg); // "I don't wanna touch it. Its spines could hurt my delicate hands"
+ break;
case 0x51f0:
setOns(0, 0);
playSound(5, 11);
playActorAnimation(637);
disableObject(7);
- inventory->add(49);
- return true;
+ inventory->add(kInvItemRock);
+ break;
case 0x5217:
- displayMessage(CHECK_FLAG(0xDB9F, 1) ? 0x402e : 0x34e1);
- return true;
+ if (CHECK_FLAG(dsAddr_beesGoneFlag, 1))
+ displayMessage(dsAddr_notHungryMsg); // "Thanks, I'm not hungry"
+ else
+ displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
+ break;
+
+ case 0x522c:
+ displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
+ break;
+
+ case 0x5233:
+ rejectMessage();
+ break;
case 0x5237:
- if (!CHECK_FLAG(0xDB9F, 1)) {
- displayMessage(0x34e1);
- } else if (CHECK_FLAG(0xDBA0, 1))
- displayMessage(0x3E31);
+ if (!CHECK_FLAG(dsAddr_beesGoneFlag, 1)) {
+ displayMessage(dsAddr_avoidBeesMsg); // "I'm going to stay at least five meters away from these bees!"
+ } else if (CHECK_FLAG(dsAddr_mansionTunnelDoneFlag, 1))
+ displayMessage(dsAddr_roadNowhereMsg); // "Nah. It's a road to nowhere"
else {
moveTo(173, 138, 2);
playSound(28, 5);
playActorAnimation(583);
playActorAnimation(584);
- loadScene(0, 0, 0, 0); //clear background
+ loadScene(0, 0, 0, 0); // clear background
playSound(72, 18);
playSound(73, 39);
@@ -837,82 +1389,257 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(28, 2);
playActorAnimation(586);
moveTo(138, 163, 3);
- displayMessage(0x3650);
- SET_FLAG(0xDBA0, 1);
- processCallback(0x9d45); //another mansion try
+ displayMessage(dsAddr_lifeBrutalMsg); // "Life is really brutal"
+ SET_FLAG(dsAddr_mansionTunnelDoneFlag, 1);
+ fnMansionIntrusionAttempt();
}
- return true;
-
- case 0x55a8: {
- uint16 d = Dialog::pop(scene, 0xdb08, 0, 0, 0xd1, 0xd1, 0, 0);
- if (d == 0x2c5d) {
- waitLanAnimationFrame(1, 0x23);
- setOns(0, 0);
- playSound(52, 9);
- playSound(52, 11);
- playSound(52, 13);
- playSound(53, 32);
- playAnimation(570, 0);
- wait(50);
- displayMessage(0x551f);
- disableObject(5);
- SET_FLAG(0xDBB0, 1);
- } else if (d != 0x2c9b) {
- waitLanAnimationFrame(1, 0x23);
- playSound(52, 9);
- playSound(52, 11);
- playSound(52, 13);
- playAnimation(569, 0);
+ break;
+
+ case 0x5320:
+ loadScene(11, Common::Point(30, 124));
+ scene->setOrientation(2);
+ break;
+
+ case 0x533a:
+ displayMessage(dsAddr_noLongHandsMsg); // "I really don't have such long hands"
+ break;
+
+ case 0x5341:
+ displayMessage(dsAddr_tooFarToSwimMsg); // "It's too far to swim there"
+ break;
+
+ case 0x5403:
+ displayMessage(dsAddr_noBucketMsg); // "It's not a barrel-organ. And there's no bucket."
+ break;
+
+ case 0x540a:
+ loadScene(20, Common::Point(10, 185));
+ scene->setOrientation(2);
+ break;
+
+ case 0x5424:
+ loadScene(11, Common::Point(30, 170));
+ scene->setOrientation(2);
+ break;
+
+ case 0x543e:
+ loadScene(18, Common::Point(224, 199));
+ scene->setOrientation(4);
+ break;
+
+ case 0x5547:
+ loadScene(15, Common::Point(15, 172));
+ scene->setOrientation(2);
+ break;
+
+ case 0x55a8:
+ {
+ uint16 d = dialog->popMark(scene, dsAddr_dialogStackSquirrel);
+ if (d == 0x2c5d) { // 4th try - Throw Nut
+ waitLanAnimationFrame(1, 0x23);
+ setOns(0, 0);
+ playSound(52, 9);
+ playSound(52, 11);
+ playSound(52, 13);
+ playSound(53, 32);
+ playAnimation(570, 0);
+ wait(50);
+ displayMessage(dsAddr_ThanksMsg); // "Thanks."
+ disableObject(5);
+ SET_FLAG(dsAddr_squirrelNutState, 1);
+ } else if (d != 0x2c9b) { // 5th (last) try
+ waitLanAnimationFrame(1, 0x23);
+ playSound(52, 9);
+ playSound(52, 11);
+ playSound(52, 13);
+ playAnimation(569, 0);
+ }
}
- }
- return true;
+ break;
case 0x5663:
- displayMessage(CHECK_FLAG(0xDBB0, 1) ? 0x41b1 : 0x417e);
- return true;
+ if (CHECK_FLAG(dsAddr_squirrelNutState, 1))
+ displayMessage(dsAddr_findNutMsg); // "I won't find the nut just like that. The grass is too dense"
+ else
+ displayMessage(dsAddr_hmmGrassMsg); // "Hmmm. Grass..."
+ break;
+
+ case 0x5674:
+ loadScene(18, Common::Point(94, 115));
+ scene->setOrientation(3);
+ break;
+
+ case 0x568e:
+ displayMessage(dsAddr_notHornyMsg); // "I'm not horny"
+ break;
+
+ case 0x5695:
+ displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
+ break;
case 0x569c:
playSound(67, 5);
playActorAnimation(983);
- displayMessage(0x5955);
- return true;
+ displayMessage(dsAddr_emptyMsg); // "It's Empty"
+ break;
+
+ case 0x56b3:
+ rejectMessage();
+ break;
case 0x56b7:
playSound(66, 5);
playSound(67, 11);
playActorAnimation(984);
- displayMessage(0x5955);
- return true;
+ displayMessage(dsAddr_emptyMsg); // "It's Empty"
+ break;
+
+ case 0x56d6:
+ displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
+ break;
+
+ case 0x56dd:
+ displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
+ break;
+
+ case 0x56e4:
+ displayMessage(dsAddr_notSantaClausMsg); // "I'm not Santa Claus"
+ break;
+
+ case 0x56eb:
+ displayMessage(dsAddr_noPlasticImitationsMsg); // "I don't need plastic imitations"
+ break;
+
+ case 0x56f2:
+ rejectMessage();
+ break;
+
+ case 0x5721:
+ displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
+ break;
case 0x5728:
- inventory->add(0x0d);
+ inventory->add(kInvItemChainsaw);
disableObject(14);
setOns(0, 0);
playSound(5, 10);
playActorAnimation(566);
- return true;
+ break;
+
+ case 0x574f:
+ displayMessage(dsAddr_tooFragileMsg); // "It's too fragile to carry around"
+ break;
case 0x5793:
- if (!CHECK_FLAG(0xDB94, 1)) {
- displayMessage(0x3e63);
- } else if (CHECK_FLAG(0xDB95, 1)) {
- displayMessage(0x3e75);
+ if (!CHECK_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1)) {
+ displayMessage(dsAddr_shutTightMsg); // "It's shut tight"
+ } else if (CHECK_FLAG(dsAddr_carTrunkEmptyFlag, 1)) {
+ displayMessage(dsAddr_bootEmptyMsg); // "There's nothing else in the boot"
} else {
- SET_FLAG(0xDB95, 1);
+ SET_FLAG(dsAddr_carTrunkEmptyFlag, 1);
moveTo(188, 179, 0);
playSound(7, 16);
playActorAnimation(519);
wait(150);
moveTo(168, 179, 2);
- inventory->add(3);
+ inventory->add(kInvItemToolboxFull);
}
- return true;
+ break;
+
+ case 0x57fa:
+ displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
+ break;
+
+ case 0x5801:
+ rejectMessage();
+ break;
+
+ case 0x583f:
+ case 0x5846:
+ displayMessage(dsAddr_dontNeedToOpenMsg);
+ break;
+
+ case 0x584d:
+ displayMessage(dsAddr_pullObjMsg2);
+ break;
+
+ case 0x5854:
+ loadScene(15, Common::Point(157, 199));
+ scene->setOrientation(1);
+ break;
+
+ case 0x586e:
+ loadScene(21, Common::Point(24, 187));
+ scene->setOrientation(2);
+ break;
+
+ case 0x5888:
+ loadScene(27, Common::Point(108, 199));
+ scene->setOrientation(2);
+ break;
+
+ case 0x5903:
+ displayMessage(dsAddr_keepItOpenMsg); // "I'd like to keep it open"
+ break;
+
+ case 0x590a:
+ loadScene(20, Common::Point(304, 190));
+ scene->setOrientation(4);
+ break;
+
+ case 0x5924:
+ loadScene(25, Common::Point(298, 146));
+ scene->setOrientation(4);
+ break;
+
+ case 0x5978:
+ displayMessage(dsAddr_notTakingSocksMsg); // "I really don't want to walk around with someone else's socks"
+ break;
+
+ case 0x597f:
+ case 0x5986:
+ case 0x598d:
+ displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
+ break;
+
+ case 0x5b44:
+ // FIXME - This is the doorbell use callback on House #2
+ // i.e. Granny and Anne's House. Need to analyse cseg data properly.
+ // Current code inferred from behaviour.
+ // FIXME - Add animation call for Ego pushing doorbell.
+ displayMessage(dsAddr_ItsOpenMsg);
+ break;
+
+ case 0x5c72:
+ displayMessage(dsAddr_notTiredMsg); // "Thanks, I'm not tired"
+ break;
+
+ case 0x5c79:
+ displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
+ break;
+
+ case 0x5c80:
+ rejectMessage();
+ break;
+
+ case 0x5cdb:
+ case 0x5ce2:
+ displayMessage(dsAddr_dontNeedItMsg); // "I don't need it"
+ break;
+
+ case 0x5ce9:
+ displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
+ break;
+
+ case 0x5d1d:
+ displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
+ break;
case 0x5d88:
- if (CHECK_FLAG(0xDBA5, 1)) { //dry laundry
- SET_FLAG(0xDBA5, 2);
- Dialog::show(scene, 0x1F4F, 0, 523, 0xd1, 0xe5, 0, 1);
- //waitLanAnimationFrame(1, 1); //another long waiting
+ if (CHECK_FLAG(dsAddr_laundryState, 1)) { // dry laundry
+ SET_FLAG(dsAddr_laundryState, 2);
+ dialog->show(46, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
+ //waitLanAnimationFrame(1, 1); // another long waiting
playAnimation(604, 0);
loadScene(21, scene->getPosition());
@@ -924,184 +1651,393 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(0, 33);
loadScene(23, scene->getPosition());
playAnimation(605, 0);
- Dialog::show(scene, 0x2002, 0, 523, 0xd1, 0xe5, 0, 1);
+ dialog->show(47, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
} else {
- uint16 d = Dialog::pop(scene, 0xdada, 0, 523, 0xd1, 0xe5, 0, 1);
- if (d == 0x1913) {
+ uint16 d = dialog->pop(scene, dsAddr_dialogStackAskOldLadyOK, 0, 523, textColorMark, textColorOldLady, 0, 1);
+ if (d == 0x1913) { // 3rd time
wait(100);
moveRel(0, 0, 3);
wait(50);
- displayMessage(0x34d5); //I give up
+ displayMessage(dsAddr_giveUpMsg); // "I give up"
wait(50);
}
}
- return true;
+ break;
+
+ case 0x5f9a:
+ case 0x5fa1:
+ displayMessage(dsAddr_dontNeedToOpenMsg); // "I don't need to open it"
+ break;
- case 0x5ff3: //get duster
- if (CHECK_FLAG(0xDB9A, 0)) {
- Dialog::pop(scene, 0xdaf6, 0, 523, 0xd1, 0xe5, 0, 1);
+ case 0x5fa8:
+ displayMessage(dsAddr_CantJumpMsg); // "No way I can jump so high, cause, err, white men can't jump"
+ break;
+
+ case 0x5faf:
+ displayMessage(dsAddr_noSecretPassageMsg); // "I don't think there's any secret passage inside"
+ break;
+
+ case 0x5fe5:
+ displayMessage(dsAddr_jugMeMsg); // "They can jug me if I steal this"
+ break;
+
+ case 0x5fec:
+ displayMessage(dsAddr_leaveFlowersAloneMsg); // "I'd better leave it. Women are really oversensitive about flowers."
+ break;
+
+ case 0x5ff3: // get duster
+ if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 0)) {
+ dialog->pop(scene, dsAddr_dialogStackBorrowDusterFromOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
} else {
- Dialog::show(scene, 0x1e1e, 0, 523, 0xd1, 0xe5, 0, 1);
+ dialog->show(43, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
wait(50);
- inventory->add(12);
+ inventory->add(kInvItemFeatherDusterClean);
disableObject(12);
setOns(0, 0);
playSound(5, 6);
playActorAnimation(541);
}
- return true;
+ break;
+
+ case 0x603a:
+ rejectMessage();
+ break;
case 0x603e:
- if (CHECK_FLAG(0xDBB3, 1)) {
- displayMessage(0x44a7);
+ if (CHECK_FLAG(dsAddr_spokenToMirrorFlag, 1)) {
+ displayMessage(dsAddr_busyThinkingMsg); // "I'd better not interrupt it's thought process"
} else {
- displayMessage(0x4412);
+ displayMessage(dsAddr_mirrorMirrorMsg); // "Mirror, Mirror on the wall...."
wait(150);
- displayMessage(0x444f);
+ displayMessage(dsAddr_thinkTooLongMsg); // "Hey, don't think too long"
wait(150);
- displayMessage(0x446b);
+ displayMessage(dsAddr_HintMaleMsg); // "A hint: Someone in this room, a male"
wait(150);
- displayMessage(0x4492);
+ displayMessage(dsAddr_okWaitMsg); // "OK, take your time"
wait(150);
- SET_FLAG(0xDBB3, 1);
+ SET_FLAG(dsAddr_spokenToMirrorFlag, 1);
}
- return true;
+ break;
+
+ case 0x6074:
+ rejectMessage();
+ break;
+
+ case 0x6078:
+ displayMessage(dsAddr_tooBigMsg); // "It's too big and I doubt if I'll ever need it"
+ break;
case 0x6205:
- if (CHECK_FLAG(0xDBA4, 1))
- displayMessage(0x450e);
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ displayMessage(dsAddr_tooHeavyMsg); // "It's too heavy. Not that I'm wimp"
else
- processCallback(0x61fe);
- return true;
+ fnTooDark();
+ break;
case 0x6217:
- if (CHECK_FLAG(0xDBA4, 1))
- displayMessage(0x44d6);
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ displayMessage(dsAddr_noDentistsMsg); // "I don't want to have anything in common with dentists"
else
- processCallback(0x61fe);
- return true;
+ fnTooDark();
+ break;
case 0x62c1:
- if (CHECK_FLAG(0xDBA4, 1))
- return false;
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ retVal = false;
+ else
+ fnTooDark();
+ break;
- processCallback(0x61fe);
- return true;
+ case 0x634a:
+ displayMessage(dsAddr_noHandsSharpThornsMsg); // "I can't remove it with my hands. these thorns look really sharp"
+ break;
+
+ case 0x637f:
+ loadScene(21, Common::Point(201, 199));
+ scene->setOrientation(1);
+ break;
+
+ case 0x6399:
+ displayMessage(dsAddr_rockWalkingGeeMsg); // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..."
+ break;
+
+ case 0x63a0:
+ case 0x63a7:
+ displayMessage(dsAddr_butterflyMsg); // "I'd better leave them alone, they make this place beautiful"
+ break;
+
+ case 0x63ae:
+ displayMessage(dsAddr_notSureIfAliveMsg); // "I'm not sure if it's alive"
+ break;
case 0x63bc:
playMusic(6);
loadScene(25, 151, 156, 2);
- return true;
+ break;
case 0x63dc:
- Dialog::showMono(scene, 0x3375, 0, 0xd1, 0);
- return true;
+ dialog->showMono(86, scene, 0, textColorMark, 0);
+ break;
+
+ case 0x63e3:
+ displayMessage(dsAddr_holeTooNarrowMsg); // "The hole is too narrow to fit my hand"
+ break;
case 0x646e:
case 0x6475:
- Dialog::showMono(scene, 0x32C1, 0, 0xd1, 0);
- return true;
+ dialog->showMono(85, scene, 0, textColorMark, 0);
+ break;
case 0x6479:
- Dialog::showMono(scene, 0x325e, 0, 0xd1, 0);
- return true;
+ dialog->showMono(84, scene, 0, textColorMark, 0);
+ break;
case 0x6507:
- if (CHECK_FLAG(0xDB96, 1)) {
+ if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1))
rejectMessage();
- } else
- displayMessage(0x47e7);
- return true;
+ else
+ displayMessage(dsAddr_birdAttackMsg); // "Hey You! Wake up! Bird attack!"
+ break;
+
+ case 0x6541:
+ loadScene(20, Common::Point(10, 131));
+ scene->setOrientation(3);
+ break;
+
+ case 0x6635:
+ displayMessage(dsAddr_uninterestingHaystackMsg); // "I don't see anything interesting about this haystack"
+ break;
+
+ case 0x666a:
+ displayMessage(dsAddr_moreComplicatedMsg); // "It's more complicated than that"
+ break;
case 0x65c3:
- if (CHECK_FLAG(0xDBA9, 1)) {
+ if (CHECK_FLAG(dsAddr_mouseHoleState, 1)) {
playActorAnimation(635);
setOns(5, 0);
playSound(63, 11);
playSound(15, 20);
playSound(32, 31);
playActorAnimation(636);
- inventory->add(47);
- inventory->add(48);
+ inventory->add(kInvItemHandkerchief);
+ inventory->add(kInvItemMouse);
moveTo(scene->getPosition().x - 1, 139, 1, true);
- displayMessage(0x3b83);
- SET_FLAG(0xDBA9, 2);
- SET_FLAG(0xDBA8, 0);
+ displayMessage(dsAddr_yikesMsg); // "Yikes!"
+ SET_FLAG(dsAddr_mouseHoleState, 2);
+ SET_FLAG(dsAddr_HankerchiefInMouseholeFlag, 0);
} else
- displayMessage(0x4808);
- return true;
+ displayMessage(dsAddr_noSearchWarrantMsg); // "I don't have a search-warrant"
+ break;
+
+ case 0x6671:
+ displayMessage(dsAddr_cantOpenItMsg); // "I can't open it"
+ break;
+
+ case 0x6678:
+ rejectMessage();
+ break;
+
+ case 0x670f:
+ displayMessage(dsAddr_dontNeedThemMsg); // "I don't need them"
+ break;
+
+ case 0x6716:
+ displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
+ break;
+
+ case 0x6772:
+ loadScene(31, Common::Point(20, 188));
+ scene->setOrientation(2);
+ break;
+
+ case 0x678c:
+ loadScene(28, Common::Point(189, 153));
+ scene->setOrientation(4);
+ break;
+
+ case 0x67fa:
+ rejectMessage();
+ break;
+
+ case 0x67fe:
+ displayMessage(dsAddr_troubleWithStairsMsg); // "If I put it on I might have trouble walking up the stairs"
+ break;
+
+ case 0x6911:
+ displayMessage(dsAddr_9LivesToReadMsg); // "I'd need 9 lives to read them all"
+ break;
+
+ case 0x6954:
+ displayMessage(dsAddr_thanksNotTiredMsg); // "Thanks, I'm not so tired"
+ break;
+
+ case 0x695b:
+ displayMessage(dsAddr_noNeedToTurnOnMsg); // "There's no need to turn it on"
+ break;
+
+ case 0x6ba6:
+ displayMessage(dsAddr_wontBearWeightMsg); // "It won't bear my weight"
+ break;
+
+ case 0x6bda:
+ displayMessage(dsAddr_peepingTomMsg); // "What am I? A Peeping Tom?"
+ break;
+
+ case 0x6c1c:
+ case 0x6c20:
+ rejectMessage();
+ break;
+
+ case 0x6c24:
+ displayMessage(dsAddr_dontNeedThemMsg); // "I don't need them"
+ break;
+
+ case 0x6c2b:
+ loadScene(29, Common::Point(300, 188));
+ scene->setOrientation(4);
+ break;
+
+ case 0x6c7c:
+ displayMessage(dsAddr_bigPocketsMsg); // "I have big pockets, but there are limits"
+ break;
+
+ case 0x724e:
+ displayMessage(dsAddr_soSharpMsg); // "They're so sharp they'd rip my trousers!"
+ break;
+
+ case 0x72be:
+ rejectMessage();
+ break;
+
+ case 0x7305:
+ rejectMessage();
+ break;
+
+ case 0x7328:
+ displayMessage(dsAddr_noTimeForPleasuresMsg); // "I don't have time for pleasures"
+ break;
+
+ case 0x732f:
+ displayMessage(dsAddr_notSocksWithBareHandsMsg); // "I won't touch these socks with my bare hands!"
+ break;
+
+ case 0x739c:
+ displayMessage(dsAddr_notHalloweenMsg); // "It's not Halloween"
+ break;
+
+ case 0x7401:
+ displayMessage(dsAddr_NotManualMsg); // "It can't be controlled manually! I hate it!"
+ break;
+
+ case 0x746f:
+ displayMessage(dsAddr_nothingToPlayMsg); // "I have nothing to play"
+ break;
+
+ case 0x74b3:
+ loadScene(29, Common::Point(256, 171));
+ scene->setOrientation(3);
+ break;
+
+ case 0x74cd:
+ rejectMessage();
+ break;
+
+ case 0x74f9:
+ loadScene(38, Common::Point(160, 199));
+ scene->setOrientation(1);
+ break;
+
+ case 0x784a:
+ displayMessage(dsAddr_notMineMsg); // "I can't take it. It's not mine."
+ break;
+
+ case 0x7851:
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
+ break;
+
+ case 0x7858:
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
+ break;
+
+ case 0x785f:
+ displayMessage(dsAddr_pullObjMsg2); // "I can't reach it"
+ break;
case 0x7866:
- if (CHECK_FLAG(0xdbdd, 3)) {
- displayMessage(0x55ff);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_JailCableAndBowlState, 3))
+ displayMessage(dsAddr_gotchaMsg); // "Gotcha"
+ else
+ retVal = false;
+ break;
- case 0x7878: {
- byte v = res->dseg.get_byte(0xDBDB) + 1;
- if (v <= 6)
- SET_FLAG(0xDBDB, v);
+ case 0x7878:
+ {
+ byte v = res->dseg.get_byte(dsAddr_graffitiMsgId) + 1;
+ if (v <= 6)
+ SET_FLAG(dsAddr_graffitiMsgId, v);
- switch (v) {
- case 1:
- displayMessage(0x5411);
- return true;
- case 2:
- displayMessage(0x5463);
- return true;
- case 3:
- displayMessage(0x5475);
- return true;
- case 4:
- displayMessage(0x5484);
- return true;
- case 5:
- displayMessage(0x54c4);
- return true;
- default:
- displayMessage(0x54d5);
- return true;
+ switch (v) {
+ case 1:
+ displayMessage(dsAddr_SavingFineMsg); // "Saving is a very fine thing..."
+ break;
+ case 2:
+ displayMessage(dsAddr_loveCaptainMsg); // "I love captain"
+ break;
+ case 3:
+ displayMessage(dsAddr_soccerRulzMsg); // "Soccer rulz"
+ break;
+ case 4:
+ displayMessage(dsAddr_treeCutMsg); // "Don't cut the trees..."
+ break;
+ case 5:
+ displayMessage(dsAddr_visaAcceptedMsg); // "VISA Accepted"
+ break;
+ default:
+ displayMessage(dsAddr_otherGraffitiMsg); // "The rest of graffiti is obscene"
+ break;
+ }
}
- }
+ break;
case 0x78a9:
- if (CHECK_FLAG(0xDBE6, 1)) {
- displayMessage(0x5827);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_captainDrawerState, 1))
+ displayMessage(dsAddr_nowOpenMsg); // "Now it's open"
+ else
+ retVal = false;
+ break;
case 0x78bb:
- if (CHECK_FLAG(0xDBE8, 1)) {
- displayMessage(0x58b0);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_swappedBarmanMugFlag, 1))
+ displayMessage(dsAddr_yuckMsg); // "Yuck!"
+ else
+ retVal = false;
+ break;
case 0x78ce:
- if (!CHECK_FLAG(0xDBA1, 1)) {
- displayMessage(0x3694);
- return true;
- } else
- return false;
+ if (!CHECK_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1))
+ displayMessage(dsAddr_monstersMsg); // "Who knows what monsters live in there"
+ else
+ retVal = false;
+ break;
- case 0x792b: //left click on ann
+ case 0x792b: // left click on ann
moveTo(245, 198, 1);
- if (CHECK_FLAG(0xDBAF, 1))
- return false;
-
- Dialog::showMono(scene, 0x2193, 0, 0xd1, 0);
- SET_FLAG(0xDBAF, 1);
- return true;
+ if (!CHECK_FLAG(dsAddr_alreadySaidAnneBeautifulFlag, 1)) {
+ dialog->showMono(50, scene, 0, textColorMark, 0);
+ SET_FLAG(dsAddr_alreadySaidAnneBeautifulFlag, 1);
+ } else
+ retVal = false;
+ break;
case 0x79c3:
- if (CHECK_FLAG(0xDBA4, 1))
- return false;
- processCallback(0x61fe);
- return true;
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ retVal = false;
+ else
+ fnTooDark();
+ break;
- case 0x7b26: //cutting the fence
+ case 0x7b26: // cutting the fence
setOns(0, 0);
playSound(5, 2);
playSound(51, 11);
@@ -1114,11 +2050,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(0, 0x60);
moveTo(281, scene->getPosition().y, 0, true);
disableObject(4);
- SET_FLAG(0xDBE1, 1);
- return true;
+ SET_FLAG(dsAddr_cutFenceFlag, 1);
+ break;
- case 0x7b89: //digging mysterious object
- if (CHECK_FLAG(0xDBE1, 1)) {
+ case 0x7b89: // digging mysterious object
+ if (CHECK_FLAG(dsAddr_cutFenceFlag, 1)) {
playActorAnimation(844);
setOns(1, 0);
playSound(5, 5);
@@ -1130,11 +2066,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(1, 0x64);
playActorAnimation(845);
disableObject(3);
- inventory->add(0x52);
- inventory->remove(0x51);
+ inventory->add(kInvItemKaleidoscope);
+ inventory->remove(kInvItemShovelAct1);
} else
- displayMessage(0x56da);
- return true;
+ displayMessage(dsAddr_fenceBlocksMsg); // "The fence blocks the way"
+ break;
+
+ case 0x7bf6:
+ displayMessage(dsAddr_noDiggingKnifeMsg); // "Digging it out with the knife could take a hundred years"
+ break;
case 0x7bfd:
playSound(76, 18);
@@ -1149,7 +2089,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(76, 63);
playActorAnimation(873);
moveTo(240, 163, 4);
- displayMessage(0x5837);
+ displayMessage(dsAddr_cmonBabyMsg); // "C'mon baby, it's all yours!"
waitLanAnimationFrame(1, 0x22);
playSound(77, 2);
playSound(77, 12);
@@ -1164,23 +2104,36 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setLan(1, 0);
playAnimation(874, 1);
setOns(0, 0x68);
- inventory->remove(0x5b);
+ inventory->remove(kInvItemDruggedFood);
enableObject(6);
disableObject(1);
- return true;
+ break;
+
+ case 0x7cc9:
+ case 0x7cd0:
+ displayMessage(dsAddr_throwCrumbsToBirdQMsg); // "Should I throw the crumbs to the bird?"
+ break;
+
+ case 0x7cd7:
+ displayMessage(dsAddr_dontWasteCrumbs); // "I don't want to waste these tasty crumbs"
+ break;
- case 0x7ce5: //put spring on the solid ground
+ case 0x7cde:
+ displayMessage(dsAddr_mightSlipFallInMsg); // "Better not... I might slip and fall in..."
+ break;
+
+ case 0x7ce5: // put spring on the solid ground
playSound(5, 2);
playSound(19, 11);
playActorAnimation(840);
setOns(1, 0x61);
- inventory->remove(0x50);
+ inventory->remove(kInvItemSpring);
disableObject(2);
enableObject(7);
- return true;
+ break;
- case 0x7d1a: //captain's key + door
- if (res->dseg.get_byte(0xDBDF) <= 1) {
+ case 0x7d1a: // captain's key + door
+ if (res->dseg.get_byte(dsAddr_FirstActTrialState) <= 1) {
playSound(5, 2);
playSound(57, 12);
playSound(70, 19);
@@ -1198,24 +2151,23 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(200);
playAnimation(0, 1);
setOns(0, 0);
- Dialog::showMono(scene, 0x63a5, 830, 0xd0, 1);
+ dialog->showMono(156, scene, 830, textColorShockedCaptain, 1);
loadScene(7, 130, 195, 2);
playMusic(4);
setLan(1, 1);
wait(100);
- Dialog::show(scene, 0x6406, 0, 832, 0xd1, 0xec, 0, 1);
+ dialog->show(157, scene, 0, 832, textColorMark, textColorCaptain, 0, 1);
//playAnimation(831, 1);
- SET_FLAG(0xDBDF, 2);
-
+ SET_FLAG(dsAddr_FirstActTrialState, 2);
} else
- displayMessage(0x52f6);
- return true;
+ displayMessage(dsAddr_nahMsg); // "Nah"
+ break;
- case 0x7e02: //tickling the captain
- if (CHECK_FLAG(0xdbe0, 1)) {
- displayMessage(0x5632);
+ case 0x7e02: // tickling the captain
+ if (CHECK_FLAG(dsAddr_AlreadyTickledCaptainFlag, 1)) {
+ displayMessage(dsAddr_doesNotWorkMsg); // "That doesn't work"
} else {
playSound(5, 6);
playSound(27, 49);
@@ -1224,37 +2176,37 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
setOns(0, 94);
- Dialog::show(scene, 0x65e9, 0, 832, 0xd1, 0xec, 0, 1);
+ dialog->show(161, scene, 0, 832, textColorMark, textColorCaptain, 0, 1);
enableObject(12);
- SET_FLAG(0xdbe0, 1);
+ SET_FLAG(dsAddr_AlreadyTickledCaptainFlag, 1);
}
- return true;
+ break;
- case 0x7e4f: //giving magazine to captain
- Dialog::show(scene, 0x66c0, 0, 856, 0xd1, 0xec, 0, 1);
+ case 0x7e4f: // giving magazine to captain
+ dialog->show(162, scene, 0, 856, textColorMark, textColorCaptain, 0, 1);
playSound(5, 3);
playActorAnimation(852, true);
playActorAnimation(853, true);
- displayMessage(0x5742);
- displayMessage(0x5757);
- displayMessage(0x5770);
- displayMessage(0x5782);
- displayMessage(0x5799);
+ displayMessage(dsAddr_whatAboutMsg); // "What about a new"
+ displayMessage(dsAddr_hotOffMsg); // "hot off the press"
+ displayMessage(dsAddr_fullColorMsg); // "full-color"
+ displayMessage(dsAddr_specialEdMsg); // "special edition"
+ displayMessage(dsAddr_soldierNewsMsg); // "of Soldier News?!"
playAnimation(856, 1);
playSound(5, 3);
//playActorAnimation(854);
- Dialog::show(scene, 0x66fe, 0, 856, 0xd1, 0xec, 0, 1);
+ dialog->show(163, scene, 0, 856, textColorMark, textColorCaptain, 0, 1);
playAnimation(855, 1);
wait(200);
moveTo(30, 181, 0);
disableObject(1);
setLan(1, 0);
- SET_FLAG(0xDBDF, 3);
- SET_FLAG(0xDBF0, 1);
+ SET_FLAG(dsAddr_FirstActTrialState, 3);
+ SET_FLAG(dsAddr_gotPasswordNeedSpeakBarmanFlag, 1);
loadScene(8, 155, 199);
- return true;
+ break;
- case 0x7fbd: //using bird & bartender
+ case 0x7fbd: // using bird & bartender
playSound(5, 3);
playActorAnimation(876);
setOns(1, 0);
@@ -1263,15 +2215,15 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(877, 1);
playAnimation(880, 1, true);
- Dialog::show(scene, 0x6f0e, 0, 857, 0xd1, 0xef, 0, 1);
+ dialog->show(176, scene, 0, 857, textColorMark, textColorBarman, 0, 1);
setOns(2, 0x6a);
reloadLan();
playAnimation(878, 0);
- //playAnimation(879, 0); //background bartender animation
- inventory->remove(0x5c);
+ //playAnimation(879, 0); // background bartender animation
+ inventory->remove(kInvItemBird);
enableObject(1);
- SET_FLAG(0xDBE7, 1);
- return true;
+ SET_FLAG(dsAddr_birdOnBarRadioAntennaFlag, 1);
+ break;
case 0x8047:
playSound(32, 5);
@@ -1279,27 +2231,26 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(52, 23);
playActorAnimation(881);
setOns(2, 0x6b);
- inventory->remove(0x56);
- inventory->add(0x55);
- SET_FLAG(0xDBE8, 1);
- return true;
+ inventory->remove(kInvItemMugOfMud);
+ inventory->add(kInvItemMug);
+ SET_FLAG(dsAddr_swappedBarmanMugFlag, 1);
+ break;
case 0x808b:
- if (CHECK_FLAG(0xDBDA, 1)) {
- //alredy shown
- displayMessage(0x53F2);
+ if (CHECK_FLAG(dsAddr_ShownPassToGuardFlag, 1)) {
+ displayMessage(dsAddr_gotPermissionMsg); // "I already got the permission"
} else {
- displayMessage(0x53DD);
+ displayMessage(dsAddr_showPapersMsg); // "Here are my papers"
playSound(5, 2);
playSound(5, 18);
playActorAnimation(810);
- Dialog::show(scene, 0x60BF, 0, 809, 0xd1, 0xd0, 0, 1);
- SET_FLAG(0xDBDA, 1);
+ dialog->show(147, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
+ SET_FLAG(dsAddr_ShownPassToGuardFlag, 1);
}
- return true;
+ break;
- case 0x80c3: //show kaleydoscope to the guard
- Dialog::show(scene, 0x6811, 0, 809, 0xd1, 0xd0, 0, 1);
+ case 0x80c3: // show kaleidoscope to the guard
+ dialog->show(165, scene, 0, 809, textColorMark, textColorCampGuard, 0, 1);
playSound(5, 3);
playSound(5, 30);
playSound(26, 14);
@@ -1309,124 +2260,146 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(851, 0);
playAnimation(850, 0);
reloadLan();
- inventory->add(0x53);
- inventory->remove(0x52);
+ inventory->add(kInvItemSoldierNews);
+ inventory->remove(kInvItemKaleidoscope);
enableObject(1);
- SET_FLAG(0xDBE2, 1);
- return true;
+ SET_FLAG(dsAddr_act1GuardState, 1);
+ break;
+
+ case 0x8398:
+ displayMessage(dsAddr_trySomewhereElseMsg); // "I'd better try somewhere else - I suppose this side is heavily guarded"
+ break;
+
+ case 0x85dd:
+ displayMessage(dsAddr_branchNotPaddleMsg); // "This branch is not a paddle. It doesn't even look like one"
+ break;
+
+ case 0x85e4:
+ displayMessage(dsAddr_sharpenNotPulverizeMsg); // "I needed to sharpen it, not pulverize"
+ break;
+
+ case 0x8d42:
+ displayMessage(dsAddr_bluntSickleMsg); // "The sickle is too blunt"
+ break;
- //Shore
+ case 0x8d49:
+ displayMessage(dsAddr_noChainsawFuelMsg); // "There's no fuel in the chainsaw"
+ break;
+
+ case 0x8d50:
+ displayMessage(dsAddr_thornsTooThinMsg); // "Thorns are too thin, the chainsaw is useless here"
+ break;
+
+ // Shore
case 0x5348:
- if (CHECK_FLAG(0xdb99, 1)) { //got broken paddle from boat
- displayMessage(0x351f);
+ if (CHECK_FLAG(dsAddr_alreadyGotBrokenPaddleFlag, 1)) { // got broken paddle from boat
+ displayMessage(dsAddr_boatEmptyMsg); // "There's nothing else in the boat"
} else {
- SET_FLAG(0xDB99, 1);
+ SET_FLAG(dsAddr_alreadyGotBrokenPaddleFlag, 1);
playSound(57, 6);
playActorAnimation(536);
- Dialog::showMono(scene, 0x30c3, 0, 0xd1, 0);
- inventory->add(0x8);
+ dialog->showMono(77, scene, 0, textColorMark, 0);
+ inventory->add(kInvItemBrokenPaddle);
}
- return true;
+ break;
case 0x53a1:
- if (CHECK_FLAG(0xdbb2, 1)) { //spoken to man in well
- displayMessage(0x411d);
+ if (CHECK_FLAG(dsAddr_spokenToManInWellFlag, 1)) { // spoken to man in well
+ displayMessage(dsAddr_stillThereMsg); // "Are you still there?"
} else {
- displayMessage(0x408a);
- displayMessage(0x4091, 0xe5, 52728);
- displayMessage(0x4098);
- displayMessage(0x40a7, 0xe5, 52705);
- displayMessage(0x40b6);
- displayMessage(0x40ce, 0xe5, 52652);
- displayMessage(0x40e8);
- displayMessage(0x410f, 0xe5, 52712);
+ displayMessage(dsAddr_echoMsg); // "Echo!"
+ displayMessage(dsAddr_loudEchoMsg, textColorWellEcho, 248, 164); // "ECHO!"
+ displayMessage(dsAddr_whoThereMsg); // "Who's there?!"
+ displayMessage(dsAddr_loudWhoThereMsg, textColorWellEcho, 225, 164); // "WHO'S THERE?!"
+ displayMessage(dsAddr_dontCopyMsg); // "DON'T COPY ME!"
+ displayMessage(dsAddr_loudDontCopyMsg, textColorWellEcho, 172, 164); // "DON'T COPY ME!!!"
+ displayMessage(dsAddr_throwRockMsg); // "OR I WILL THROW A ROCK DOWN THERE!"
+ displayMessage(dsAddr_orIWillMsg, textColorWellEcho, 232, 164); // "OR I WILL"
wait(100);
- displayMessage(0x4091, 0xe5, 52728);
- SET_FLAG(0xDBB2, 1);
+ displayMessage(dsAddr_loudEchoMsg, textColorWellEcho, 248, 164);
+ SET_FLAG(dsAddr_spokenToManInWellFlag, 1);
}
- return true;
+ break;
+ case 0x5458:
+ {
+ setOns(2, 0);
+ playSound(34, 7);
+ playActorAnimation(535);
+ inventory->add(kInvItemSecondFlower);
+ disableObject(1);
- case 0x5458: {
- setOns(2, 0);
- playSound(34, 7);
- playActorAnimation(535);
- inventory->add(11);
- disableObject(1);
-
- byte *scene_15_ons = scene->getOns(15); //patch ons for the scene 15
- scene_15_ons[0] = 0;
+ byte *scene_15_ons = scene->getOns(15); // patch ons for the scene 15
+ scene_15_ons[0] = 0;
- byte f = GET_FLAG(0xDB98) + 1;
- SET_FLAG(0xDB98, f);
- if (f >= 2) {
- //disable object boat for scene 15!!
- disableObject(1, 15);
+ byte f = GET_FLAG(dsAddr_flowerIsleState) + 1;
+ SET_FLAG(dsAddr_flowerIsleState, f);
+ if (f >= 2) {
+ // disable object boat for scene 15!!
+ disableObject(1, 15);
+ }
}
- }
- return true;
+ break;
- case 0x54b3: {
- setOns(1, 0);
- setOns(3, 0);
- playSound(33, 6);
- playActorAnimation(534);
- inventory->add(10);
- disableObject(2);
- setOns(1, 10);
- setOns(1, 0, 15);
- byte f = GET_FLAG(0xDB98) + 1;
- SET_FLAG(0xDB98, f);
- if (f >= 2) {
- //disable object boat for scene 15!!
- disableObject(1, 15);
+ case 0x54b3:
+ {
+ setOns(1, 0);
+ setOns(3, 0);
+ playSound(33, 6);
+ playActorAnimation(534);
+ inventory->add(kInvItemFirstFlower);
+ disableObject(2);
+ setOns(1, 10);
+ setOns(1, 0, 15);
+ byte f = GET_FLAG(dsAddr_flowerIsleState) + 1;
+ SET_FLAG(dsAddr_flowerIsleState, f);
+ if (f >= 2) {
+ // disable object boat for scene 15!!
+ disableObject(1, 15);
+ }
}
- }
- return true;
+ break;
case 0x5502:
setOns(0, 0);
loadScene(15, 115, 180, 1);
playMusic(6);
playActorAnimation(568);
- return true;
+ break;
- case 0x5561://Enter lakeside house
- moveTo(94, 115, 4); //call 557e, but it's not needed I guess
+ case 0x5561: // Enter lakeside house
+ fnEgoDefaultPosition();
loadScene(19, 223, 199, 1);
- return true;
+ break;
case 0x55a1:
- processCallback(0x557e);
+ fnEgoDefaultPosition();
rejectMessage();
- return true;
+ break;
- case 0x557e:
- if (scene->getPosition().y <= 149)
- moveTo(94, 115, 4);
- else
- moveTo(51, 149, 4);
- return true;
+ case csAddr_egoDefaultPosition:
+ fnEgoDefaultPosition();
+ break;
case 0x563b:
playSound(5, 10);
setOns(1, 0);
playActorAnimation(561);
- inventory->add(26);
+ inventory->add(kInvItemNut);
disableObject(6);
- return true;
+ break;
case 0x56f6:
playSound(32, 7);
setOns(1, 0);
playActorAnimation(626);
disableObject(12);
- inventory->add(45);
- displayMessage(0x3b04);
- return true;
+ inventory->add(kInvItemCheese);
+ displayMessage(dsAddr_foundFoodMsg); // "People leave food in unbelievable places"
+ break;
- case 0x5756://Open car door
+ case 0x5756: // Open car door
playSound(11, 4);
playActorAnimation(514);
setOns(4, 8);
@@ -1435,106 +2408,94 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
enableObject(15);
enableObject(16);
disableObject(1);
- return true;
+ break;
- case 0x5805://Enter basketball house
+ case 0x5805: // Enter basketball house
playSound(70, 6);
playActorAnimation(513);
loadScene(22, 51, 180, 2);
- return true;
+ break;
- case 0x5832://Ring doorbell
+ case 0x5832: // Ring doorbell
playActorAnimation(509);
- displayMessage(0x5dce);
- return true;
+ displayMessage(dsAddr_outOfOrderMsg); // "It's out of order"
+ break;
case 0x58a2:
- Dialog::pop(scene, 0xdaba, 0, 502, 0xd1, 0xe5, 0, 1);
- scene->getObject(13)->setName((const char *)res->dseg.ptr(0x92e5));
- return true;
+ dialog->pop(scene, dsAddr_dialogStackSonny, 0, 502, textColorMark, textColorSonny, 0, 1);
+ scene->getObject(13)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameSonny));
+ break;
- case 0x58b7://Get comb from car
+ case 0x58b7: // Get comb from car
disableObject(14);
setOns(4, 0);
playSound(5, 7);
playActorAnimation(521);
setOns(4, 0);
- inventory->add(0x6);
- return true;
+ inventory->add(kInvItemComb);
+ break;
- case 0x58df://Pull trunk lever in car
- SET_FLAG(0xDB94, 1);
+ case 0x58df: // Pull trunk lever in car
+ SET_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1);
playSound(6, 1);
setOns(3, 6);
playActorAnimation(515);
- return true;
+ break;
- case 0x593e://Enter annes house
+ case 0x593e: // Enter annes house
playSound(89, 4);
playActorAnimation(980);
loadScene(23, 76, 199, 1);
- if (CHECK_FLAG(0xDBEE, 1))
+ if (CHECK_FLAG(dsAddr_lovestruckByAnneFlag, 1))
playMusic(7);
- return true;
+ break;
case 0x5994:
- processCallback(0x599b);
- processCallback(0x5a21);
- return true;
+ fnEnterCave();
+ break;
- case 0x599b:
- return true;
+ case csAddr_caveNOP:
+ break;
- case 0x5a21:
- loadScene(24, 230, 170, 1);
- playSound(52, 3);
- playSound(52, 7);
- playSound(52, 11);
- playSound(52, 14);
- playSound(52, 18);
- playSound(52, 21);
- playSound(52, 25);
- playActorAnimation(601);
- moveTo(230, 179, 3);
- if (!CHECK_FLAG(0xDBA4, 1))
- displayMessage(0x37ea); //it's kinda dark here
- return true;
+ case csAddr_enterCave:
+ fnEnterCave();
+ break;
case 0x5a8b:
- if (!CHECK_FLAG(0xDBAD, 1)) {
- playSound(43, 4); //grrrrrr
+ if (!CHECK_FLAG(dsAddr_dogHasBoneFlag, 1)) {
+ playSound(43, 4); // grrrrrr
playSound(42, 15);
playSound(42, 17);
playSound(42, 19);
playAnimation(656, 0);
wait(50);
- displayMessage(0x3c16);
- } else if (!CHECK_FLAG(0xDBA3, 1)) {//Dog has bone
+ displayMessage(dsAddr_goodDoggyMsg); // "I understand. Good doggy"
+ } else if (!CHECK_FLAG(dsAddr_cellarDoorOpenFlag, 1)) { // Dog has bone
playSound(28, 3);
playActorAnimation(596);
setOns(1, 30);
- SET_FLAG(0xDBA3, 1);
+ SET_FLAG(dsAddr_cellarDoorOpenFlag, 1);
enableObject(8);
} else {
setOns(1, 0);
playSound(4, 4);
playActorAnimation(597);
- SET_FLAG(0xDBA3, 0);
+ SET_FLAG(dsAddr_cellarDoorOpenFlag, 0);
disableObject(8);
- displayMessage(0x37b8);
+ displayMessage(dsAddr_wallShakenMsg); // "Wow! This must have shaken all the nearby walls!"
setOns(1, 32, 24);
enableObject(4, 24);
}
- return true;
+ break;
- case 0x5b3a://Click on dog
- Dialog::popMark(scene, 0xDB14);
- return true;
+ case 0x5b3a: // Click on dog
+ dialog->popMark(scene, dsAddr_dialogStackDog);
+ break;
- case 0x5b59: //picking up the rope
- Dialog::showMark(scene, 0x2cbd);
+ case 0x5b59: // picking up the rope
+ dialog->showMark(70, scene);
wait(150);
- Dialog::showMark(scene, 0x2dc2);
+ dialog->showMark(71, scene);
moveRel(0, -12, 0);
playSound(34, 5);
playActorAnimation(607);
@@ -1545,81 +2506,81 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 25);
playActorAnimation(611);
moveTo(16, scene->getPosition().y, 4, true);
- inventory->add(38);
+ inventory->add(kInvItemRopeAct2);
disableObject(12);
- return true;
+ break;
- case 0x5be1://Talk to grandpa
- Dialog::pop(scene, 0xDAC4, 0, 522, 0xd1, 0xd8, 0, 1);
- return true;
+ case 0x5be1: // Talk to grandpa
+ dialog->pop(scene, dsAddr_dialogStackGrandpa, 0, 522, textColorMark, textColorGrandpa, 0, 1);
+ break;
case 0x5bee:
playSound(89, 5);
playSound(67, 11);
playActorAnimation(982);
- displayMessage(0x5955);
- return true;
+ displayMessage(dsAddr_emptyMsg); // "It's Empty"
+ break;
- case 0x5c0d: //grandpa - drawers
- if (CHECK_FLAG(0xDBA7, 1)) {
- displayMessage(0x3bac);
+ case 0x5c0d: // grandpa - drawers
+ if (CHECK_FLAG(dsAddr_SearchedGrandpaDrawersFlag, 1)) {
+ displayMessage(dsAddr_drawersEmptyMsg); // "There's nothing else in the drawers"
} else {
- if (!CHECK_FLAG(0xDB92, 1))
- Dialog::show(scene, 0x15a0, 0, 522, 0xd1, 0xd8, 0, 1); //can I search your drawers?
+ if (!CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1))
+ dialog->show(24, scene, 0, 522, textColorMark, textColorGrandpa, 0, 1);
playSound(66, 5);
playSound(67, 20);
playSound(5, 23);
playActorAnimation(631);
- inventory->add(47);
- SET_FLAG(0xDBA7, 1);
+ inventory->add(kInvItemHandkerchief);
+ SET_FLAG(dsAddr_SearchedGrandpaDrawersFlag, 1);
}
- return true;
+ break;
case 0x5c84:
- if (CHECK_FLAG(0xDB92, 1)) {
- inventory->add(2);
+ if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
+ inventory->add(kInvItemShotgun);
disableObject(7);
playSound(32, 7);
setOns(0, 0);
playActorAnimation(520);
} else {
- Dialog::pop(scene, 0xDACE, 0, 522, 0xd1, 0xd8, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackGrandpaShotgun, 0, 522, textColorMark, textColorGrandpa, 0, 1);
}
- return true;
+ break;
- case 0x5cf0://Exit basketball house
+ case 0x5cf0:// Exit basketball house
playSound(88, 5);
playActorAnimation(981);
loadScene(20, 161, 165);
- return true;
+ break;
- case 0x5d24: //getting the fan
- if (CHECK_FLAG(0xDB92, 1)) {
+ case 0x5d24: // getting the fan
+ if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
setLan(2, 0);
playSound(32, 7);
playActorAnimation(508);
disableObject(13);
- inventory->add(7);
+ inventory->add(kInvItemFan);
} else {
- Dialog::pop(scene, 0xDAD4, 0, 522, 0xd1, 0xd8, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackGrandpaFan, 0, 522, textColorMark, textColorGrandpa, 0, 1);
}
- return true;
+ break;
- case 0x5e4d: //right click on ann
- if (!CHECK_FLAG(0xDB97, 0)) {
- displayMessage(0x3d59);
+ case 0x5e4d: // right click on ann
+ if (!CHECK_FLAG(dsAddr_alreadySpokenToAnneFlag, 0)) {
+ displayMessage(dsAddr_girlTalkMsg); // "I really don't know how to talk to girls"
} else {
moveTo(245, 198, 1);
- Dialog::show(scene, 0x21d7, 0, 524, 0xd1, 0xe5, 0, 2);
- //waitLanAnimationFrame(2, 1); //too long, about 200 frames! seems to be present in original game (sic)
- SET_FLAG(0xDB97, 1);
+ dialog->show(51, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ //waitLanAnimationFrame(2, 1); // too long, about 200 frames! seems to be present in original game (sic)
+ SET_FLAG(dsAddr_alreadySpokenToAnneFlag, 1);
for (byte i = 10; i <= 20; i += 2)
playSound(13, i);
playAnimation(528, 1);
wait(50);
playMusic(7);
- SET_FLAG(0xDBEE, 1);
+ SET_FLAG(dsAddr_lovestruckByAnneFlag, 1);
for (byte i = 3; i <= 17; i += 2)
playSound(56, i);
playActorAnimation(525);
@@ -1633,163 +2594,146 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(55, 5);
playActorAnimation(527);
wait(50);
- Dialog::show(scene, 0x2219, 0, 524, 0xd1, 0xe5, 0, 2);
- scene->getObject(2)->setName((const char *)res->dseg.ptr(0x9820));
+ dialog->show(52, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ scene->getObject(2)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameAnne));
}
- return true;
+ break;
- case 0x5f73: //exiting ann's house
- if (CHECK_FLAG(0xDBEE, 1))
+ case 0x5f73: // exiting ann's house
+ if (CHECK_FLAG(dsAddr_lovestruckByAnneFlag, 1))
playMusic(6);
loadScene(21, 99, 180, 3);
- return true;
+ break;
case 0x5fba:
- if (CHECK_FLAG(0xDBB1, 1)) {
- displayMessage(0x4380);
+ if (CHECK_FLAG(dsAddr_nutSwappedForAppleFlag, 1)) {
+ displayMessage(dsAddr_noFruitMsg); // "There are no more interesting fruits here"
} else {
- Dialog::pop(scene, 0xDAFC, 0, 523, 0xd1, 0xe5, 0, 1);
+ dialog->pop(scene, dsAddr_dialogStackGetAppleOldLady, 0, 523, textColorMark, textColorOldLady, 0, 1);
}
- return true;
+ break;
case 0x607f:
- return processCallback(0x60b5);
+ fnEgoScaredBySpider();
+ break;
case 0x6083:
- if (CHECK_FLAG(0xDBA4, 1)) {
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
setOns(0, 0);
playSound(56, 10);
playActorAnimation(599);
- inventory->add(37);
+ inventory->add(kInvItemShovelAct2);
disableObject(2);
} else
- processCallback(0x60b5);
- return true;
+ fnEgoScaredBySpider();
+ break;
- case 0x60b5:
- if (CHECK_FLAG(0xDBAE, 1)) {
- processCallback(0x60d9);
- Dialog::showMark(scene, 0x2fdd);
- } else {
- Dialog::showMark(scene, 0x2e41);
- processCallback(0x60d9);
- wait(100);
- Dialog::showMark(scene, 0x2e6d);
- }
- return true;
+ case csAddr_egoScaredBySpider:
+ fnEgoScaredBySpider();
+ break;
- case 0x60d9: {
- Object *obj = scene->getObject(3);
- moveTo(obj);
- processCallback(0x612b);
- moveTo(48, 190, 3);
- }
- return true;
+ case csAddr_moveToLadderAndLeaveCellar:
+ fnMoveToLadderAndLeaveCellar();
+ break;
- case 0x612b:
- playSound(52, 10);
- playSound(52, 14);
- playSound(52, 18);
- playSound(52, 21);
- playSound(52, 25);
- playSound(52, 28);
- playSound(52, 32);
- playActorAnimation(600);
- loadScene(21, 297, 178, 3);
- return true;
+ case csAddr_leaveCellar:
+ fnLeaveCellar();
+ break;
case 0x6176:
- if (CHECK_FLAG(0xDBA4, 1)) {
- displayMessage(0x3801);
- return true;
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
+ displayMessage(dsAddr_notInDarkMsg); // "I'm not going to wander here in the dark again"
+ } else {
+ playSound(71, 6);
+ playActorAnimation(598);
+ loadScene(24, scene->getPosition());
+ setOns(2, 0);
+ setLan(1, 0);
+ playAnimation(660, 0);
+ disableObject(1);
+ SET_FLAG(dsAddr_lightOnFlag, 1);
+ loadScene(24, scene->getPosition());
}
- playSound(71, 6);
- playActorAnimation(598);
- loadScene(24, scene->getPosition());
- setOns(2, 0);
- setLan(1, 0);
- playAnimation(660, 0);
- disableObject(1);
- SET_FLAG(0xDBA4, 1);
- loadScene(24, scene->getPosition());
-
- return true;
+ break;
case 0x61e9:
- if (CHECK_FLAG(0xDBA4, 1)) {
- Dialog::popMark(scene, 0xdb1e);
- } else
- processCallback(0x61fe);
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ dialog->popMark(scene, dsAddr_dialogStackTakeAxe);
+ else
+ fnTooDark();
+ break;
- return true;
+ case csAddr_TooDark:
+ displayMessage(dsAddr_TooDarkMsg); // "It's too dark to see clearly"
+ break;
- case 0x6229: //shelves in cellar
- if (CHECK_FLAG(0xDBA4, 1)) {
+ case 0x6229: // shelves in cellar
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1)) {
Common::Point p = scene->getPosition();
- byte v = GET_FLAG(0xDBB4);
+ byte v = GET_FLAG(dsAddr_cellarShelfExamineCount);
switch (v) {
case 0:
- displayMessage(0x4532);
+ displayMessage(dsAddr_whatGotMsg); // "Let's look what we've got here"
moveRel(-34, 0, 1);
- displayMessage(0x4555);
+ displayMessage(dsAddr_strawberryJamMsg); // "Strawberry jam"
moveRel(20, 0, 1);
- displayMessage(0x4568);
+ displayMessage(dsAddr_gooseberryJamMsg); // "Gooseberry jam"
moveRel(20, 0, 1);
- displayMessage(0x457b);
+ displayMessage(dsAddr_blackberryJamMsg); // "Blackberry jam"
moveRel(20, 0, 1);
- displayMessage(0x458e);
+ displayMessage(dsAddr_bilberryJamMsg); // "Bilberry jam"
moveTo(p, 3);
- displayMessage(0x459f);
- SET_FLAG(0xDBB4, 1);
+ displayMessage(dsAddr_getMeOutJamMsg); // "Get me out of this jam!"
+ SET_FLAG(dsAddr_cellarShelfExamineCount, 1);
break;
case 1:
- displayMessage(0x45b8);
+ displayMessage(dsAddr_rosemaryJamMsg); // "Oh, and there is Rosemary jam"
wait(100);
- displayMessage(0x45da);
- SET_FLAG(0xDBB4, 2);
+ displayMessage(dsAddr_knowRosemaryMsg); // "I used to know someone called Rosemary"
+ SET_FLAG(dsAddr_cellarShelfExamineCount, 2);
break;
default:
- displayMessage(0x4603);
+ displayMessage(dsAddr_unwantedJamsMsg); // "I don't want those jams"
+ break;
}
} else
- processCallback(0x61fe);
-
- return true;
+ fnTooDark();
+ break;
- case 0x6480: //dive mask
- if (CHECK_FLAG(0xDB96, 1)) {
+ case 0x6480: // dive mask
+ if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1)) {
playSound(56, 7);
playSound(5, 15);
playActorAnimation(613);
setOns(3, 36);
- inventory->add(39);
+ inventory->add(kInvItemMask);
disableObject(5);
- displayMessage(0x387c);
+ displayMessage(dsAddr_needSunglassesMsg); // "Sorry buddy, but I need your sunglasses"
} else
- displayMessage(0x3eb2);
- return true;
+ displayMessage(dsAddr_crowKillMsg); // "I'm sure these crows will kill me"
+ break;
- case 0x64c4: //flippers
- if (CHECK_FLAG(0xDB96, 1)) {
+ case 0x64c4: // flippers
+ if (CHECK_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1)) {
setOns(2, 35);
playSound(63, 8);
playSound(24, 10);
playActorAnimation(612);
- inventory->add(40);
+ inventory->add(kInvItemFins);
disableObject(6);
} else
- displayMessage(0x3eb2);
- return true;
+ displayMessage(dsAddr_crowKillMsg); // "I'm sure these crows will kill me"
+ break;
- case 0x7907://Describe car lever
- if (CHECK_FLAG(0xdb94, 1)) {//Already pulled lever?
- displayMessage(0x3e4f);
- return true;
+ case 0x7907: // Describe car lever
+ if (CHECK_FLAG(dsAddr_alreadyPulledTrunkReleaseLeverFlag, 1)) { // Already pulled lever?
+ displayMessage(dsAddr_openBootMsg); // "It opens the boot"
} else
- return false;
+ retVal = false;
+ break;
- case 0x62d0://Get bone from under rock
- displayAsyncMessage(0x463c, 30938, 16, 24);
+ case 0x62d0: // Get bone from under rock
+ displayAsyncMessage(dsAddr_yeowMsg, 218, 96, 16, 24); // "YEEEOOOWWWW!"
playSound(26, 6);
playSound(26, 10);
playSound(24, 13);
@@ -1798,35 +2742,34 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(594);
setOns(0, 29);
disableObject(1);
- inventory->add(36);
+ inventory->add(kInvItemBone);
playSound(5, 2);
playActorAnimation(595);
- displayMessage(0x3790);
- return true;
+ displayMessage(dsAddr_dinoBoneMsg); // "I really hope this is DINOSAUR bone"
+ break;
case 0x6351:
- if (CHECK_FLAG(0xdaca, 1)) { //cave bush is cut down
+ if (CHECK_FLAG(dsAddr_caveThornsCutDownFlag, 1)) { // cave bush is cut down
playMusic(8);
loadScene(26, 319, 169, 4);
} else
- displayMessage(0x3bd2);
- return true;
+ displayMessage(dsAddr_ridBushMsg); // "I must get rid of this bush first"
+ break;
case 0x63ea:
playSound(5, 10);
setOns(0, 0);
playActorAnimation(640);
- inventory->add(50);
+ inventory->add(kInvItemNugget);
disableObject(6);
- return true;
+ break;
- case 0x6411://Kick hen
- if (CHECK_FLAG(0xdb93, 1)) { //already kicked hen
- displayMessage(0x3e08);
- return true;
+ case 0x6411: // Kick hen
+ if (CHECK_FLAG(dsAddr_alreadyKickedHenFlag, 1)) { // already kicked hen
+ displayMessage(dsAddr_ridFrustationsMsg); // "I'd already got rid of my frustrations"
} else {
- SET_FLAG(0xdb93, 1);
- displayMessage(0x3dc6);
+ SET_FLAG(dsAddr_alreadyKickedHenFlag, 1);
+ displayMessage(dsAddr_henFlyMsg); // "I wonder if hens can fly. Come here, baby"
waitLanAnimationFrame(1, 87);
playSound(30, 26);
playSound(29, 49);
@@ -1835,198 +2778,191 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
setOns(0, 1);
enableObject(14);
- displayMessage(0x3df4);
- return true;
+ displayMessage(dsAddr_firstTestFailMsg); // "First test failed"
}
+ break;
- case 0x6592: //Rake
+ case 0x6592: // Rake
setOns(1, 0);
playSound(18, 10);
playActorAnimation(553);
- inventory->add(0x15);
+ inventory->add(kInvItemRakeBroken);
wait(50);
- displayMessage(0x3605);
+ displayMessage(dsAddr_trousersMsg); // "Good I always asked mum for trousers with BIG pockets"
disableObject(11);
- return true;
+ break;
case 0x66b5:
playSound(89, 5);
playActorAnimation(969);
loadScene(33, 319, 181, 4);
- return true;
+ break;
- case 0x6519://Sickle
+ case 0x6519: // Sickle
setOns(4, 0);
playSound(5, 11);
playActorAnimation(625);
- inventory->add(0x2c);
+ inventory->add(kInvItemSickleBlunt);
disableObject(8);
- return true;
+ break;
- case 0x655b://Get needle from haystack
- if (CHECK_FLAG(0xdb9d, 1)) { //already have needle
- displayMessage(0x356a);
- return true;
+ case 0x655b: // Get needle from haystack
+ if (CHECK_FLAG(dsAddr_gotNeedleAlreadyFlag, 1)) { // already have needle
+ displayMessage(dsAddr_dontPushLuckMsg); // "I don't think I should push my luck"
} else {
- SET_FLAG(0xdb9d, 1);
+ SET_FLAG(dsAddr_gotNeedleAlreadyFlag, 1);
playSound(49, 3);
playActorAnimation(548);
- inventory->add(0x11);
- displayMessage(0x35b2);
- return true;
+ inventory->add(kInvItemNeedle);
+ displayMessage(dsAddr_needleHaystackMsg); // "And they say you can't find a needle in a haystack"
}
+ break;
- case 0x663c://Feather
+ case 0x663c: // Feather
setOns(0, 0);
playSound(5, 9);
playActorAnimation(511);
- inventory->add(1);
+ inventory->add(kInvItemFeather);
disableObject(15);
- return true;
+ break;
case 0x667c:
playSound(70, 4);
playActorAnimation(972);
loadScene(29, 160, 199, 1);
- return true;
+ break;
case 0x66a9:
- displayMessage(0x4a7e);
+ displayMessage(dsAddr_dontLeaveMansionMsg); // "I don't want to leave the mansion, I want blood!"
disableObject(4);
- return true;
+ break;
case 0x66e2:
playSound(88, 4);
playActorAnimation(970);
loadScene(35, 160, 199, 1);
- return true;
+ break;
case 0x70bb:
- Dialog::pop(scene, 0xdb24, 0, 709, 0xd1, 0xef, 0, 1);
- return true;
+ dialog->pop(scene, dsAddr_dialogStackBusyCook, 0, 709, textColorMark, textColorCook, 0, 1);
+ break;
case 0x71ae:
- if (CHECK_FLAG(0xDBCD, 1)) {
- if (CHECK_FLAG(0xDBCE, 1)) {
- displayMessage(0x4f9b);
+ if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_MansionGotRadioBatteriesFlag, 1)) {
+ displayMessage(dsAddr_restUselessMsg); // "The rest is useless"
} else {
- displayMessage(0x4fb1);
+ displayMessage(dsAddr_twoBatteriesMsg); // "Wow! Two 1.5V batteries!"
playSound(32, 6);
playActorAnimation(717);
- inventory->add(66);
- SET_FLAG(0xDBCE, 1);
+ inventory->add(kInvItemBatteries);
+ SET_FLAG(dsAddr_MansionGotRadioBatteriesFlag, 1);
}
} else
- Dialog::showMark(scene, 0x3c9d);
- return true;
+ dialog->showMark(97, scene);
+ break;
case 0x70c8:
- if (!processCallback(0x70e0))
- return true;
- moveTo(81, 160, 4);
- displayMessage(0x5cac);
- return true;
-
- case 0x70e0:
- if (!CHECK_FLAG(0xDBCC, 1)) {
- displayMessage(0x4ece);
- return false;
+ if (fnIsCookGone()) {
+ moveTo(81, 160, 4);
+ displayMessage(dsAddr_cognacMsg); // "Pfui! The cognac really didn't do any good"
}
- return true;
+ break;
+
+ case csAddr_isCookGone:
+ retVal = fnIsCookGone();
+ break;
case 0x70ef:
- if (!processCallback(0x70e0))
- return true;
- displayMessage(0x5046);
- return true;
+ if (fnIsCookGone())
+ displayMessage(dsAddr_tooHotMsg); // "It's too hot to touch!"
+ break;
case 0x70f9:
- if (inventory->has(68)) {
- inventory->remove(68);
+ if (inventory->has(kInvItemBurningPaper)) {
+ inventory->remove(kInvItemBurningPaper);
loadScene(29, 40, 176, 2);
- displayMessage(0x500a);
+ displayMessage(dsAddr_paperBurntMsg); // "The paper burnt out completely!"
} else
loadScene(29, 40, 176, 2);
- return true;
+ break;
case 0x712c:
- if (!processCallback(0x70e0))
- return true;
-
- if (CHECK_FLAG(0xDBCF, 1)) {
- playSound(89, 4);
- playActorAnimation(719);
- setOns(4, 67);
- ++ *res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(0x6746 + (scene->getId() - 1) * 2)));
- disableObject(5);
- enableObject(12);
- } else {
- playSound(89, 4);
- playSound(89, 4);
- playSound(87, 45);
- displayAsyncMessage(0x4fcb, 34672, 11, 35, 0xe5);
- playActorAnimation(718);
- wait(100);
- displayMessage(0x4fe2);
- SET_FLAG(0xDBCF, 1);
+ if (fnIsCookGone()) {
+ if (CHECK_FLAG(dsAddr_MansionHaveOpenedFridgeBeforeFlag, 1)) {
+ playSound(89, 4);
+ playActorAnimation(719);
+ setOns(4, 67);
+ ++ *res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(dsAddr_sceneWalkboxTablePtr + (scene->getId() - 1) * 2)));
+ disableObject(5);
+ enableObject(12);
+ } else {
+ playSound(89, 4);
+ playSound(89, 4);
+ playSound(87, 45);
+ displayAsyncMessage(dsAddr_oneTakenMsg, 112, 108, 11, 35, textColorEskimo); // "This one's taken, OK?"
+ playActorAnimation(718);
+ wait(100);
+ displayMessage(dsAddr_slightMadMsg); // "It finally happened. I'm slightly mad"
+ SET_FLAG(dsAddr_MansionHaveOpenedFridgeBeforeFlag, 1);
+ }
}
- return true;
+ break;
case 0x71eb:
setOns(2, 0);
playSound(32, 7);
playActorAnimation(710);
- inventory->add(62);
+ inventory->add(kInvItemChilliWithLabel);
disableObject(7);
enableObject(8);
- return true;
+ break;
case 0x7244:
- if (!processCallback(0x70e0))
- return true;
- displayMessage(0x5c60);
- return true;
+ if (fnIsCookGone())
+ displayMessage(dsAddr_neverLearntMsg); // "I never learnt to how use one"
+ break;
case 0x7255:
- if (CHECK_FLAG(0xDBD0, 1)) {
+ if (CHECK_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1)) {
setOns(4, 69);
playSound(32, 5);
playActorAnimation(725);
disableObject(12);
- inventory->add(69);
+ inventory->add(kInvItemMeat);
} else {
playActorAnimation(721);
- displayMessage(0x505e);
+ displayMessage(dsAddr_frozenShelfMsg); // "It has frozen hard onto the shelf!"
}
- return true;
+ break;
case 0x721c:
setOns(3, 0);
playSound(32, 7);
playActorAnimation(715);
- inventory->add(63);
+ inventory->add(kInvItemPastryRoller);
disableObject(9);
- return true;
+ break;
case 0x7336:
setOns(1, 0);
playSound(5, 42);
- displayAsyncMessage(0x4d02, 32642, 20, 38);
+ displayAsyncMessage(dsAddr_noDepraveMsg, 2, 102, 20, 38); // "Nah, I don't want to deprave the kids"
playActorAnimation(697);
- inventory->add(56);
+ inventory->add(kInvItemCognac);
disableObject(1);
- return true;
+ break;
case 0x7381:
playSound(5, 12);
playActorAnimation(704);
disableObject(2);
- inventory->add(58);
- return true;
+ inventory->add(kInvItemIceTongs);
+ break;
case 0x7408:
- if (CHECK_FLAG(0xDBC4, 1)) {
- displayMessage(0x4d2a);
+ if (CHECK_FLAG(dsAddr_mansionReadNewspaperFlag, 1)) {
+ displayMessage(dsAddr_noReadAgainMsg); // "I don't want to read it again. I might like it."
} else {
setOns(0, 0);
playSound(26, 17);
@@ -2038,45 +2974,45 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(698);
setOns(0, 52);
setOns(2, 61);
- Dialog::showMark(scene, 0x38b6);
+ dialog->showMark(92, scene);
enableObject(11);
- SET_FLAG(0xDBC4, 1);
+ SET_FLAG(dsAddr_mansionReadNewspaperFlag, 1);
}
- return true;
+ break;
case 0x7476:
- if (CHECK_FLAG(0xDBC9, 1)) {
- displayMessage(0x4dbb);
+ if (CHECK_FLAG(dsAddr_mansionExaminedCouchBeforeFlag, 1)) {
+ displayMessage(dsAddr_noSleepMsg); // "I don't want to sleep"
} else {
- SET_FLAG(0xDBC9, 1);
- Dialog::showMark(scene, 0x3aca);
+ SET_FLAG(dsAddr_mansionExaminedCouchBeforeFlag, 1);
+ dialog->showMark(94, scene);
playSound(61, 5);
playSound(5, 14);
playActorAnimation(705);
- displayMessage(0x4dd3);
- inventory->add(59);
+ displayMessage(dsAddr_justCorkMsg); // "It's just a cork"
+ inventory->add(kInvItemCork);
}
- return true;
+ break;
case 0x74d1:
setOns(2, 0);
playSound(5, 12);
playActorAnimation(699);
- inventory->add(57);
+ inventory->add(kInvItemRemoteControl);
disableObject(11);
- return true;
+ break;
- case 0x7513: //fatso + doctor: pre-final
- if (CHECK_FLAG(0xDBD7, 1)) {
- if (CHECK_FLAG(0xDBD8, 1)) {
+ case 0x7513: // fatso + doctor: pre-final
+ if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1)) {
playSound(88, 4);
playActorAnimation(979);
loadScene(37, 51, 183);
- Dialog::show(scene, 0x54ea, 768, 769, 0xd9, 0xe5, 1, 2);
+ dialog->show(125, scene, 768, 769, textColorMansionGuard, textColorProfessor, 1, 2);
playAnimation(770, 0, true, true, true);
playAnimation(771, 1, true, true, true);
- Dialog::showMono(scene, 0x5523, 0, 0xd1, 0);
+ dialog->showMono(126, scene, 0, textColorMark, 0);
playAnimation(770, 0, true, true, true);
playAnimation(771, 1, true, true, true);
playSound(5, 3);
@@ -2090,11 +3026,11 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
setOns(0, 74);
hideActor();
- Dialog::showMono(scene, 0x5556, 775, 0xd0, 1);
+ dialog->showMono(127, scene, 775, textColorJohnNoty, 1);
playAnimation(771, 1, true, true, true);
playAnimation(776, 0);
- Dialog::show(scene, 0x55f7, 777, 778, 0xd0, 0xe5, 1, 2); //i have to kill you anyway
+ dialog->show(128, scene, 777, 778, textColorJohnNoty, textColorProfessor, 1, 2);
playAnimation(779, 0, true, true, true);
playAnimation(780, 1, true, true, true);
@@ -2151,7 +3087,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(0, 80);
playAnimation(792, 3, true, true, true);
- Dialog::show(scene, 0x5665, 0, 791, 0xd1, 0xd0, 0, 4);
+ dialog->show(129, scene, 0, 791, textColorMark, textColorJohnNoty, 0, 4);
playAnimation(792, 3, true, true, true);
moveTo(40, 171, 4);
@@ -2161,43 +3097,47 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(0, 3);
loadScene(31, 298, 177, 4);
- SET_FLAG(0xDBD9, 1);
- } else {
- displayMessage(0x52fe);
- }
+ SET_FLAG(dsAddr_MansionJohnNotyEscapingFlag, 1);
+ } else
+ displayMessage(dsAddr_ventFirstMsg); // "I'd better stop this ventilator first"
} else
- displayMessage(0x52cb);
- return true;
+ displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
+ break;
case 0x783d:
- Dialog::pop(scene, 0xdb36, 0, 797, 0xd1, 0xd0, 0, 1);
- return true;
+ dialog->pop(scene, dsAddr_dialogStackJohnNotyEndgame, 0, 797, textColorMark, textColorJohnNoty, 0, 1);
+ break;
case 0x7966:
- if (CHECK_FLAG(0xDBA4, 1))
- return false;
- return processCallback(0x60b5);
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ retVal = false;
+ else
+ fnEgoScaredBySpider();
+ break;
case 0x7ad0:
case 0x7ad7:
- return !processCallback(0x70e0);
+ retVal = !fnIsCookGone();
+ break;
case 0x7ab9:
- if (CHECK_FLAG(0xDBB6, 1))
- return false;
- Dialog::showMono(scene, 0x37d0, 0, 0xd1, 0);
- SET_FLAG(0xDBB6, 1);
- return true;
+ if (CHECK_FLAG(dsAddr_vgaArtistQuipAlreadySaidFlag, 1))
+ retVal = false;
+ else {
+ dialog->showMono(90, scene, 0, textColorMark, 0);
+ SET_FLAG(dsAddr_vgaArtistQuipAlreadySaidFlag, 1);
+ }
+ break;
case 0x7ade:
- if (CHECK_FLAG(0xdbcd, 1)) {
- displayMessage(0x4f69);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1))
+ displayMessage(dsAddr_whatInsideMsg); // "I was always curious what's inside these things"
+ else
+ retVal = false;
+ break;
- case 0x7f23://Use grenade on captains drawer
- if (CHECK_FLAG(0xDBDF, 3)) {
+ case 0x7f23: // Use grenade on captains drawer
+ if (CHECK_FLAG(dsAddr_FirstActTrialState, 3)) {
enableOn(false);
playSound(5, 3);
playSound(58, 11);
@@ -2207,123 +3147,120 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(870);
playSound(54, 15);
playActorAnimation(871);
- SET_FLAG(0xDBE6, 1);
+ SET_FLAG(dsAddr_captainDrawerState, 1);
setOns(1, 0x66);
moveTo(224, 194, 0, true);
- displayCutsceneMessage(0x57df, 30423);
- inventory->remove(0x59);
+ displayCutsceneMessage(dsAddr_cutsceneMsg1, 23, 95); // "sixty seven rude words later"
+ inventory->remove(kInvItemRopeAndGrenade);
enableOn(true);
- } else {
- displayMessage(0x5de2);
- }
- return true;
+ } else
+ displayMessage(dsAddr_captainWatchingMsg); // "with captain watching? Better not"
+ break;
- case 0x505c: {
- //suspicious stuff
- Common::Point p = scene->getPosition();
- if (p.x != 203 && p.y != 171)
- moveTo(203, 169, 2);
- else
- moveTo(203, 169, 1);
- }
- return true;
+ case csAddr_egoSuspiciousPosition:
+ fnEgoSuspiciousPosition();
+ break;
case 0x509a:
- processCallback(0x505c);
+ fnEgoSuspiciousPosition();
setOns(1, 0);
playSound(5, 10);
playActorAnimation(543);
- inventory->add(15);
+ inventory->add(kInvItemBranch);
disableObject(9);
- return true;
+ break;
case 0x7802:
- if (CHECK_FLAG(0xDBD7, 1)) {
- if (CHECK_FLAG(0xDBD8, 1))
- displayMessage(0x52f6);
+ if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1))
+ displayMessage(dsAddr_nahMsg); // "Nah"
else {
playSound(71, 4);
playActorAnimation(796);
setLan(1, 0);
- SET_FLAG(0xDBD8, 1);
+ SET_FLAG(dsAddr_MansionVentFanStoppedFlag, 1);
}
} else
- displayMessage(0x52cb);
- return true;
+ displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
+ break;
case 0x78e0:
- processCallback(0x505c);
- return false;
+ fnEgoSuspiciousPosition();
+ retVal = false;
+ break;
case 0x78e7:
- processCallback(0x557e);
- return false;
-
case 0x78ee:
- processCallback(0x557e);
- return false;
+ fnEgoDefaultPosition();
+ retVal = false;
+ break;
case 0x78f5:
- if (CHECK_FLAG(0xDB95, 1)) {
- displayMessage(0x3E75);
- return true;
+ if (CHECK_FLAG(dsAddr_carTrunkEmptyFlag, 1)) {
+ displayMessage(dsAddr_bootEmptyMsg); // "There's nothing else in the boot"
} else
- return false;
+ retVal = false;
+ break;
case 0x7919:
- if (!CHECK_FLAG(0xDBA5, 1))
- return false;
- displayMessage(0x3E98);
- return true;
+ if (!CHECK_FLAG(dsAddr_laundryState, 1))
+ retVal = false;
+ else
+ displayMessage(dsAddr_clothesDryMsg); // "The clothes are dry now."
+ break;
case 0x7950:
- if (!CHECK_FLAG(0xDBB1, 1))
- return false;
-
- displayMessage(0x3DAF);
- return true;
+ if (CHECK_FLAG(dsAddr_nutSwappedForAppleFlag, 1))
+ displayMessage(dsAddr_nutRealMsg); // "Only the nut is real"
+ else
+ retVal = false;
+ break;
case 0x7975:
- if (CHECK_FLAG(0xDBA4, 1))
- return false;
- displayMessage(0x3832);
- return true;
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ retVal = false;
+ else
+ displayMessage(dsAddr_shutValveMsg); // "Shutting the valve shook the dirt from the wall..."
+ break;
case 0x7987:
case 0x7996:
case 0x79a5:
case 0x79b4:
- if (CHECK_FLAG(0xDBA4, 1))
- return false;
- return processCallback(0x61fe);
+ if (CHECK_FLAG(dsAddr_lightOnFlag, 1))
+ retVal = false;
+ else
+ fnTooDark();
+ break;
case 0x79d2:
- if (!CHECK_FLAG(0xDB9D, 1))
- return false;
- displayMessage(0x3590);
- return true;
+ if (!CHECK_FLAG(dsAddr_gotNeedleAlreadyFlag, 1))
+ retVal = false;
+ else
+ displayMessage(dsAddr_ordinaryHaystackMsg); // "Just an ordinary hay stack. Now."
+ break;
case 0x7af0:
- if (!processCallback(0x70e0))
- return true;
- return false;
+ if (fnIsCookGone())
+ retVal = false;
+ break;
case 0x8117:
- Dialog::show(scene, 0x0a41, 0, 529, 0xd1, 0xd9, 0, 1);
+ dialog->show(9, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
playSound(5, 2);
playSound(5, 44);
playAnimation(642, 0, true);
playActorAnimation(641, true);
waitAnimation();
- Dialog::show(scene, 0x0aff, 0, 529, 0xd1, 0xd9, 0, 1);
+ dialog->show(10, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
wait(170);
- Dialog::show(scene, 0x0ba0, 0, 529, 0xd1, 0xd9, 0, 1);
+ dialog->show(11, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
moveRel(0, 1, 0);
wait(100);
- Dialog::show(scene, 0x0c10, 0, 529, 0xd1, 0xd9, 0, 1);
- inventory->remove(50);
- processCallback(0x9d45);
- return true;
+ dialog->show(12, scene, 0, 529, textColorMark, textColorMansionGuard, 0, 1);
+ inventory->remove(kInvItemNugget);
+ fnMansionIntrusionAttempt();
+ break;
case 0x8174:
setOns(0, 0);
@@ -2336,7 +3273,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(1, 15);
disableObject(3);
enableObject(9);
- return true;
+ break;
case 0x81c2:
playSound(56, 11);
@@ -2353,12 +3290,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(588, true);
waitAnimation();
wait(50);
- displayMessage(0x367f);
- inventory->remove(34);
- SET_FLAG(0xDBA1, 1);
- return true;
+ displayMessage(dsAddr_itsGoneMsg); // "At least it's gone"
+ inventory->remove(kInvItemPaintedPotato);
+ SET_FLAG(dsAddr_mansionTreeHollowEmptyFlag, 1);
+ break;
- case 0x823d: //grappling hook on the wall
+ case 0x823d: // grappling hook on the wall
playSound(5, 3);
for (byte i = 16; i <= 28; i += 2)
playSound(65, i);
@@ -2367,27 +3304,26 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
for (byte i = 3; i <= 18; i += 3)
playSound(56, i);
- displayAsyncMessage(0x3ace, 3878, 20, 37, 0xd9);
+ displayAsyncMessage(dsAddr_heyLetGoMsg, 38, 12, 20, 37, textColorMansionGuard); // "Hey, let go, will ya?!"
playActorAnimation(621, true);
playAnimation(623, 1, true);
waitAnimation();
- displayAsyncMessage(0x3ae6, 3870, 1, 9, 0xd9);
+ displayAsyncMessage(dsAddr_aaahhhMsg, 30, 12, 1, 9, textColorMansionGuard); // "Aaaaaaaaaaaaahhh!"
playSound(35, 1);
playActorAnimation(622, true);
playAnimation(624, 0, true);
waitAnimation();
wait(150);
- displayMessage(0x3afd);
-
- inventory->remove(43);
- processCallback(0x9d45);
- return true;
+ displayMessage(dsAddr_oopsMsg); // "Oops"
+ inventory->remove(kInvItemGrapplingHook);
+ fnMansionIntrusionAttempt();
+ break;
- case 0x8312: //hedgehog + plastic apple
- Dialog::showMark(scene, 0x3000);
+ case 0x8312: // hedgehog + plastic apple
+ dialog->showMark(76, scene);
setLan(1, 0);
playSound(5, 24);
playSound(26, 32);
@@ -2405,13 +3341,13 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
disableObject(6);
- displayMessage(0x363f);
- inventory->remove(27);
- inventory->add(28);
- return true;
+ displayMessage(dsAddr_lifeIsBrutalMsg); // "Life is brutal"
+ inventory->remove(kInvItemPlasticApple);
+ inventory->add(kInvItemCone);
+ break;
case 0x839f:
- inventory->remove(32);
+ inventory->remove(kInvItemDart);
playSound(37, 14);
playSound(16, 17);
playActorAnimation(564, true);
@@ -2437,10 +3373,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(55, 18);
playAnimation(581, 1);
disableObject(2);
- SET_FLAG(0xDB9F, 1);
- return true;
+ SET_FLAG(dsAddr_beesGoneFlag, 1);
+ break;
- case 0x84c7: //using paddle on boat
+ case 0x84c7: // using paddle on boat
playSound(20, 9);
playActorAnimation(530);
loadScene(16, 236, 95, 1);
@@ -2451,12 +3387,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(533);
setOns(0, 9);
moveTo(236, 95, 1, true);
- return true;
+ break;
- case 0x8538://Sharpen sickle on well
+ case 0x8538: // Sharpen sickle on well
moveTo(236, 190, 0);
setOns(2, 0);
- //TODO: Remove handle sprite
+ // FIXME: Add code to Remove handle sprite (visible GFX glitch)
playSound(5, 4);
playSound(14, 14);
playSound(14, 33);
@@ -2464,52 +3400,58 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(643);
setOns(2, 43);
moveTo(236, 179, 3);
- inventory->remove(0x2c);
- inventory->add(0x2e);
- return true;
+ inventory->remove(kInvItemSickleBlunt);
+ inventory->add(kInvItemSickleSharp);
+ break;
+
+ case 0x85d6:
+ displayMessage(dsAddr_paddleBrokenMsg); // "The paddle is BROKEN"
+ break;
case 0x85eb:
- if (CHECK_FLAG(0xDBB0, 1)) {
+ if (CHECK_FLAG(dsAddr_squirrelNutState, 1)) {
enableObject(6);
playSound(25, 10);
playSound(25, 14);
playSound(25, 18);
playActorAnimation(559);
setOns(1, 23);
- SET_FLAG(0xDBB0, 2);
+ SET_FLAG(dsAddr_squirrelNutState, 2);
} else
- displayMessage(0x3d86);
-
- return true;
+ displayMessage(dsAddr_dontWorkPurposeMsg); // "I usually don't work without a purpose"
+ break;
case 0x863d:
playSound(12, 4);
playSound(50, 20);
playSound(50, 29);
playActorAnimation(554);
- inventory->remove(19);
- inventory->add(22);
- return true;
+ inventory->remove(kInvItemChocCandy);
+ inventory->add(kInvItemHeartShapedCandy);
+ break;
case 0x8665:
playSound(5, 3);
for (byte i = 12; i <= 24; i += 2)
playSound(56, i);
playActorAnimation(567);
- inventory->remove(12);
- inventory->add(33);
- return true;
+ inventory->remove(kInvItemFeatherDusterClean);
+ inventory->add(kInvItemFeatherDusterDirty);
+ break;
case 0x862c:
- displayMessage(CHECK_FLAG(0xDBB0, 1) ? 0x4882 : 0x3457);
- return true;
+ if (CHECK_FLAG(dsAddr_squirrelNutState, 1))
+ displayMessage(dsAddr_nutRakeMsg); // "It's pointless, the nut will slip between the rake's teeth"
+ else
+ displayMessage(dsAddr_objErrorMsg); // "That's no good"
+ break;
- case 0x86a9: //correcting height of the pole with spanner
- if (CHECK_FLAG(0xDB92, 1)) {
- displayMessage(0x3d40);
+ case 0x86a9: // correcting height of the pole with spanner
+ if (CHECK_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1)) {
+ displayMessage(dsAddr_noNeedMsg); // "No need to do it again"
} else {
- SET_FLAG(0xDB92, 1);
- Dialog::show(scene, 0x0fcd, 0, 502, 0xd0, 0xe5, 0, 1);
+ SET_FLAG(dsAddr_alreadyAdjustedHoopPoleFlag, 1);
+ dialog->show(17, scene, 0, 502, textColorMark, textColorSonny, 0, 1);
waitLanAnimationFrame(1, 7);
playSound(5, 16);
playSound(1, 25);
@@ -2528,7 +3470,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(5, 43);
playSound(61, 70);
playSound(61, 91);
- displayAsyncMessage(0x3cfb, 28877, 6, 17);
+ displayAsyncMessage(dsAddr_ConfusionMsg, 77, 90, 6, 17); // "!?&!"
playActorAnimation(505, true);
playAnimation(507, 0, true);
waitAnimation();
@@ -2552,8 +3494,8 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
disableObject(15);
disableObject(16);
moveTo(162, 164, 2);
- displayMessage(0x3d01, 0xe5, 24390);
- displayMessage(0x3d20, 0xd8, 24410);
+ displayMessage(dsAddr_grandpaPromiseMsg, textColorSonny, 70, 76); // "But grandpa, you promised!"
+ displayMessage(dsAddr_ohLetsGoMsg, textColorGrandpa, 90, 76); // "Oh all right. Let's go"
moveTo(162, 191, 2);
setOns(1, 0);
setOns(2, 0);
@@ -2572,133 +3514,118 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(512, 0);
wait(100);
- displayMessage(0x3d3a);
+ displayMessage(dsAddr_byeMsg); // "Bye."
{
Object *obj = scene->getObject(7);
- obj->actor_rect.left = obj->actor_rect.right = 228;
- obj->actor_rect.top = obj->actor_rect.bottom = 171;
- obj->actor_rect.save();
+ obj->actorRect.left = obj->actorRect.right = 228;
+ obj->actorRect.top = obj->actorRect.bottom = 171;
+ obj->actorRect.save();
}
{
Object *obj = scene->getObject(8);
- obj->actor_rect.left = obj->actor_rect.right = 290;
- obj->actor_rect.top = obj->actor_rect.bottom = 171;
- obj->actor_rect.save();
+ obj->actorRect.left = obj->actorRect.right = 290;
+ obj->actorRect.top = obj->actorRect.bottom = 171;
+ obj->actorRect.save();
}
}
- return true;
+ break;
- case 0x88c9: //give flower to old lady
- if (CHECK_FLAG(0xDB9A, 1))
- return processCallback(0x890b);
-
- inventory->remove(10);
- SET_FLAG(0xDB9A, 1);
- processCallback(0x88DE);
- return true;
-
- case 0x88de:
- playSound(5, 2);
- Dialog::show(scene, 0x1B5F, 0, 523, 0xd1, 0xe5, 0, 1);
- playActorAnimation(537, true);
- playAnimation(538, 0, true);
- waitAnimation();
- wait(100);
- Dialog::show(scene, 0x1BE0, 0, 523, 0xd1, 0xe5, 0, 1);
- return true;
+ case 0x88c9: // give flower to old lady
+ if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1))
+ fnGiveAnotherFlowerToOldLady();
+ else {
+ inventory->remove(kInvItemFirstFlower);
+ SET_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1);
+ fnGivingFlowerToOldLady();
+ }
+ break;
- case 0x890b:
- Dialog::pop(scene, 0xDAF0, 0, 523, 0xd1, 0xe5, 0, 1);
- return true;
+ case csAddr_givingFlowerToOldLady:
+ fnGivingFlowerToOldLady();
+ break;
- case 0x8918://give flower to old lady
- if (CHECK_FLAG(0xDB9A, 1))
- return processCallback(0x890B);
+ case csAddr_giveAnotherFlowerToOldLady:
+ fnGiveAnotherFlowerToOldLady();
+ break;
- inventory->remove(11);
- SET_FLAG(0xDB9A, 1);
- processCallback(0x88DE);
- return true;
+ case 0x8918: // give flower to old lady
+ if (CHECK_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1))
+ fnGiveAnotherFlowerToOldLady();
+ else {
+ inventory->remove(kInvItemSecondFlower);
+ SET_FLAG(dsAddr_givenFlowerToOldLadyAlreadyFlag, 1);
+ fnGivingFlowerToOldLady();
+ }
+ break;
case 0x892d:
- if (CHECK_FLAG(0xDB9B, 1))
- return processCallback(0x89aa);
+ if (CHECK_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1))
+ fnGiveAnotherFlowerToAnne();
+ else {
+ fnGivingFlowerToAnne();
+ inventory->remove(kInvItemFirstFlower);
+ SET_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1);
+ }
+ break;
- processCallback(0x8942);
- inventory->remove(10);
- SET_FLAG(0xDB9B, 1);
- return true;
+ case csAddr_givingFlowerToAnne:
+ fnGivingFlowerToAnne();
+ break;
- case 0x8942:
- Dialog::show(scene, 0x2293, 0, 524, 0xd1, 0xe5, 0, 2);
- playSound(5, 10);
- playActorAnimation(540, true);
- playAnimation(539, 1, true);
- waitAnimation();
- wait(100);
- Dialog::show(scene, 0x24b1, 0, 524, 0xd1, 0xe5, 0, 2);
- wait(50);
- Dialog::show(scene, 0x24d7, 0, 524, 0xd1, 0xe5, 0, 2);
- Dialog::show(scene, 0x2514, 0, 524, 0xd1, 0xe5, 0, 2);
- wait(50);
- moveRel(0, 1, 0);
- Dialog::show(scene, 0x2570, 0, 524, 0xd1, 0xe5, 0, 2);
- moveRel(0, -1, 0);
- wait(50);
- return true;
-
- case 0x89aa:
- Dialog::pop(scene, 0xdb02, 0, 524, 0xd1, 0xe5, 0, 2);
- return true;
+ case csAddr_giveAnotherFlowerToAnne:
+ fnGiveAnotherFlowerToAnne();
+ break;
case 0x89b7:
- if (CHECK_FLAG(0xDB9B, 1))
- return processCallback(0x89aa);
-
- processCallback(0x8942);
- inventory->remove(11);
- SET_FLAG(0xDB9B, 1);
- return true;
+ if (CHECK_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1))
+ fnGiveAnotherFlowerToAnne();
+ else {
+ fnGivingFlowerToAnne();
+ inventory->remove(kInvItemSecondFlower);
+ SET_FLAG(dsAddr_givenFlowerToAnneAlreadyFlag, 1);
+ }
+ break;
case 0x89cc:
- inventory->remove(23);
+ inventory->remove(kInvItemWrappedCandy);
playSound(5, 6);
- Dialog::show(scene, 0x2634, 0, 524, 0xd1, 0xe5, 0, 2);
+ dialog->show(60, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ // FIXME - Dialog #61 not explicitly called. Does Dialog #60 run on somehow?
playActorAnimation(555, true);
playAnimation(556, 1, true);
waitAnimation();
playActorAnimation(557, true);
playAnimation(558, 1, true);
waitAnimation();
- Dialog::show(scene, 0x2971, 0, 524, 0xd1, 0xe5, 0, 2);
- inventory->add(24);
- return true;
+ dialog->show(62, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
+ inventory->add(kInvItemRibbon);
+ break;
case 0x8a22:
playSound(45, 16);
playActorAnimation(560);
- inventory->remove(26);
- inventory->add(27);
+ inventory->remove(kInvItemNut);
+ inventory->add(kInvItemPlasticApple);
wait(50);
- Dialog::show(scene, 0x1ecd, 0, 523, 0xd1, 0xe5, 0, 1);
- Dialog::show(scene, 0x1f09, 0, 523, 0xd1, 0xe5, 0, 1);
- SET_FLAG(0xDBB1, 1);
- return true;
-
- case 0x8a6f: //banknote + ann
- if (CHECK_FLAG(0xDBB5, 1)) {
- Dialog::show(scene, 0x2992, 0, 524, 0xd1, 0xe5, 0, 2);
+ dialog->show(44, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
+ dialog->show(45, scene, 0, 523, textColorMark, textColorOldLady, 0, 1);
+ SET_FLAG(dsAddr_nutSwappedForAppleFlag, 1);
+ break;
+
+ case 0x8a6f: // banknote + ann
+ if (CHECK_FLAG(dsAddr_examinedBanknoteFlag, 1)) {
+ dialog->show(63, scene, 0, 524, textColorMark, textColorAnne, 0, 2);
playSound(5, 3);
playSound(5, 20);
playAnimation(671, 1, true);
playActorAnimation(670, true);
waitAnimation();
//playAnimation(672, 1);
- Dialog::show(scene, 0x2a00, 524, 672, 0xd1, 0xe5, 0, 2);
+ dialog->show(64, scene, 524, 672, textColorMark, textColorAnne, 0, 2);
//playAnimation(672, 1);
playSound(83, 12);
- displayAsyncMessage(0x4a5b, 36684, 23, 38, 0xe5);
+ displayAsyncMessage(dsAddr_hundredBucksMsg, 204, 114, 23, 38, textColorAnne); // "A hundred bucks!!!"
playActorAnimation(673);
loadScene(11, scene->getPosition());
playSound(24, 31);
@@ -2710,14 +3637,14 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
loadScene(28, 0, 167, 2);
playMusic(10);
moveTo(66, 167, 2);
- displayMessage(0x4a6f);
+ displayMessage(dsAddr_wantBloodMsg); // "I want Blood!"
inventory->clear();
- inventory->add(29);
+ inventory->add(kInvItemSuperGlue);
} else
- displayMessage(0x4a29);
- return true;
+ displayMessage(dsAddr_showHerMoneyMsg); // "If I just show her the money, she might take it"
+ break;
- case 0x8b82: //use fan on laundry
+ case 0x8b82: // use fan on laundry
setOns(0, 0);
playSound(5, 3);
playSound(5, 6);
@@ -2725,16 +3652,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(92, 20);
playSound(92, 38);
playSound(92, 58);
- displayAsyncMessage(0x464a, 36510, 58, 67);
+ displayAsyncMessage(dsAddr_yawnMsg, 30, 114, 58, 67); // "(yawn)"
playActorAnimation(602);
playSound(5, 3);
playActorAnimation(603);
setOns(0, 27);
- SET_FLAG(0xDBA5, 1);
- return true;
+ SET_FLAG(dsAddr_laundryState, 1);
+ break;
- case 0x8bfc://Give bone to dog
- displayMessage(0x3c31);
+ case 0x8bfc: // Give bone to dog
+ displayMessage(dsAddr_hereBoyMsg); // "Here, boy"
playSound(5, 3);
playSound(26, 13);
playActorAnimation(657, true);
@@ -2744,20 +3671,20 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
reloadLan();
playAnimation(659, 0);
- inventory->remove(36);
- SET_FLAG(0xDBAD, 1);
+ inventory->remove(kInvItemBone);
+ SET_FLAG(dsAddr_dogHasBoneFlag, 1);
{
Object *o = scene->getObject(7);
- o->actor_rect.left = o->actor_rect.right = 297;
- o->actor_rect.top = o->actor_rect.bottom = 181;
- o->actor_orientation = 1;
+ o->actorRect.left = o->actorRect.right = 297;
+ o->actorRect.top = o->actorRect.bottom = 181;
+ o->actorOrientation = 1;
o->save();
}
{
Object *o = scene->getObject(9);
- o->actor_rect.left = o->actor_rect.right = 297;
- o->actor_rect.top = o->actor_rect.bottom = 181;
- o->actor_orientation = 1;
+ o->actorRect.left = o->actorRect.right = 297;
+ o->actorRect.top = o->actorRect.bottom = 181;
+ o->actorOrientation = 1;
o->save();
}
{
@@ -2767,10 +3694,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
w->save();
}
wait(100);
- displayMessage(0x3c3d);
- return true;
+ displayMessage(dsAddr_friendsNowMsg); // "I hope we're friends now"
+ break;
- case 0x8c6e://Use car jack on rock
+ case 0x8c6e: // Use car jack on rock
playSound(5, 3);
playSound(26, 13);
playSound(24, 22);
@@ -2782,10 +3709,10 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(593);
setOns(0, 28);
enableObject(1);
- inventory->remove(35);
- return true;
+ inventory->remove(kInvItemCarJack);
+ break;
- case 0x8cc8://Cut bush with sickle
+ case 0x8cc8: // Cut bush with sickle
playSound(5, 3);
playActorAnimation(644);
setOns(1, 45);
@@ -2799,16 +3726,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(646);
playSound(5, 21);
playActorAnimation(647);
- SET_FLAG(0xdaca, 1);
- inventory->remove(0x2e);
+ SET_FLAG(dsAddr_caveThornsCutDownFlag, 1);
+ inventory->remove(kInvItemSickleSharp);
disableObject(2);
- scene->getObject(3)->actor_rect.right = 156;
+ scene->getObject(3)->actorRect.right = 156;
scene->getObject(3)->save();
- return true;
+ break;
- case 0x8d79: //mouse falls back from the hole (cave)
- if (CHECK_FLAG(0, 1)) {
- inventory->add(48);
+ case csAddr_mouseOutOfHoleTimeout: // mouse falls back from the hole (cave)
+ if (CHECK_FLAG(dsAddr_timedCallbackState, 1)) {
+ inventory->add(kInvItemMouse);
playSound(24, 26);
playActorAnimation(650, true);
playAnimation(651, 2, true);
@@ -2824,54 +3751,26 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(654, true);
playAnimation(655, 2, true);
waitAnimation();
- displayMessage(0x3bf6);
- inventory->add(49);
+ displayMessage(dsAddr_mouseGoneMsg); // "The mouse has gone!"
+ inventory->add(kInvItemRock);
setLan(2, 4, 27);
enableObject(4, 27);
- SET_FLAG(0xdba9, 0);
+ SET_FLAG(dsAddr_mouseHoleState, 0);
}
- SET_FLAG(0, 0);
- return true;
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ break;
- case 0x8d57:
- if (CHECK_FLAG(0, 0)) {
- playSound(5, 2);
- playSound(15, 12);
- playActorAnimation(638);
- inventory->remove(48);
- setTimerCallback(0x8d79, 100);
- SET_FLAG(0, 1);
- } else if (CHECK_FLAG(0, 1)) {
- playSound(5, 2);
- playSound(52, 13);
- playActorAnimation(648);
- setOns(1, 46);
- inventory->remove(49);
- setTimerCallback(0x8d79, 100);
- SET_FLAG(0, 2);
- } else if (CHECK_FLAG(0, 2)) {
- playActorAnimation(649);
- setOns(1, 47);
- wait(300);
- for (byte i = 1; i <= 37; i += 4)
- playSound(68, i);
- playAnimation(639, 2);
- setOns(0, 42);
- enableObject(6);
- disableObject(5);
- SET_FLAG(0xDBAB, 1);
- SET_FLAG(0, 0);
- setTimerCallback(0, 0);
- }
- return true;
+ case csAddr_putRockInHole:
+ fnPutRockInHole();
+ break;
case 0x8f1d:
- Dialog::showMark(scene, 0x2dd6);
+ dialog->showMark(72, scene);
for (uint i = 16; i <= 30; i += 2)
playSound(56, i);
playSound(2, 64);
playSound(3, 74);
- displayAsyncMessage(0x34c7, 25812, 35, 50);
+ displayAsyncMessage(dsAddr_lastChanceMsg, 212, 80, 35, 50); // "Last chance?"
playActorAnimation(516, true);
playAnimation(517, 2, true);
playAnimation(518, 3, true);
@@ -2880,12 +3779,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setLan(4, 0);
disableObject(2);
disableObject(3);
- inventory->remove(2);
- SET_FLAG(0xDB96, 1);
- return true;
+ inventory->remove(kInvItemShotgun);
+ SET_FLAG(dsAddr_birdsGoneFromScarecrowFlag, 1);
+ break;
case 0x8fc8:
- displayMessage(0x3b2f);
+ displayMessage(dsAddr_comeHereMsg); // "Come here, I've got something for you"
waitLanAnimationFrame(2, 4);
playSound(5, 3);
playActorAnimation(627, true);
@@ -2894,25 +3793,25 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(41, 10);
playSound(41, 47);
playSound(55, 52);
- if (CHECK_FLAG(0xDBA8, 1)) {
+ if (CHECK_FLAG(dsAddr_HankerchiefInMouseholeFlag, 1)) {
setLan(2, 0);
playActorAnimation(628, true);
playAnimation(634, 1, true);
waitAnimation();
disableObject(4);
- displayMessage(0x3b6c);
- SET_FLAG(0xDBA9, 1);
+ displayMessage(dsAddr_trappedMouseMsg); // "The mouse is trapped!"
+ SET_FLAG(dsAddr_mouseHoleState, 1);
} else {
playActorAnimation(628, true);
playAnimation(630, 1, true);
waitAnimation();
- displayMessage(0x3b59);
+ displayMessage(dsAddr_cantCatchMsg); // "I can't catch it!"
}
- return true;
+ break;
- case 0x9054: //mouse hole
- if (CHECK_FLAG(0xDBAB, 1)) {
- displayMessage(0x3c0b);
+ case 0x9054: // mouse hole
+ if (CHECK_FLAG(dsAddr_mouseGotGoldNuggetFlag, 1)) {
+ displayMessage(dsAddr_nonsenseMsg); // "Nonsense"
} else {
playSound(5, 11);
playSound(49, 21);
@@ -2920,50 +3819,48 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
setOns(5, 40);
moveTo(239, 139, 0, true);
playActorAnimation(633);
- SET_FLAG(0xDBA8, 1);
- inventory->remove(47);
- if (!CHECK_FLAG(0xDBAA, 1)) {
- SET_FLAG(0xDBAA, 1);
- displayMessage(0x3b8b);
+ SET_FLAG(dsAddr_HankerchiefInMouseholeFlag, 1);
+ inventory->remove(kInvItemHandkerchief);
+ if (!CHECK_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1)) {
+ SET_FLAG(dsAddr_mouseNerveMsgSaidFlag, 1);
+ displayMessage(dsAddr_mouseNerveMsg); // "Boy, this mouse has some nerve!"
}
}
- return true;
+ break;
case 0x933d:
- if (!processCallback(0x70e0))
- return true;
-
- if (CHECK_FLAG(0xdbcd, 1)) {
- displayMessage(0x4f3d);
- return true;
+ if (fnIsCookGone()) {
+ if (CHECK_FLAG(dsAddr_MansionRadioBrokenFlag, 1))
+ displayMessage(dsAddr_breakFlattenMsg); // "I wanted to break it, not to flatten it!"
+ else {
+ setOns(1, 0);
+ playSound(5, 3);
+ playSound(5, 33);
+ playSound(24, 13);
+ playSound(24, 19);
+ playSound(24, 23);
+ playSound(24, 26);
+ playSound(24, 29);
+ playSound(23, 21);
+ playSound(74, 25);
+ playActorAnimation(716);
+ setOns(1, 66);
+ SET_FLAG(dsAddr_MansionRadioBrokenFlag, 1);
+ }
}
+ break;
- setOns(1, 0);
- playSound(5, 3);
- playSound(5, 33);
- playSound(24, 13);
- playSound(24, 19);
- playSound(24, 23);
- playSound(24, 26);
- playSound(24, 29);
- playSound(23, 21);
- playSound(74, 25);
- playActorAnimation(716);
- setOns(1, 66);
- SET_FLAG(0xDBCD, 1);
- return true;
-
- case 0x93af: //sheet + hot plate
- if (!processCallback(0x70e0))
- return true;
- playSound(5, 3);
- playSound(86, 11);
- playActorAnimation(720);
- inventory->add(68);
- inventory->remove(55);
- return true;
+ case 0x93af: // sheet + hot plate
+ if (fnIsCookGone()) {
+ playSound(5, 3);
+ playSound(86, 11);
+ playActorAnimation(720);
+ inventory->add(kInvItemBurningPaper);
+ inventory->remove(kInvItemSheetOfPaper);
+ }
+ break;
- case 0x93d5: //burning sheet + plate
+ case 0x93d5: // burning sheet + plate
setOns(4, 0);
playSound(87, 7);
playActorAnimation(722);
@@ -2971,323 +3868,298 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(88, 12);
playSound(87, 24);
playActorAnimation(723);
- displayMessage(0x502b);
+ displayMessage(dsAddr_burnBabyMsg); // "Burn, baby, burn!"
wait(100);
playSound(89, 4);
playActorAnimation(724);
setOns(4, 68);
- displayMessage(0x503e);
- inventory->remove(68);
- SET_FLAG(0xDBD0, 1);
- return true;
-
- case 0x98fa://Right click to open toolbox
- inventory->remove(3);
- inventory->add(4);
- inventory->add(35);
+ displayMessage(dsAddr_voilaMsg); // "Voila"
+ inventory->remove(kInvItemBurningPaper);
+ SET_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1);
+ break;
+
+ case csAddr_openFullToolbox: // Right click to open toolbox
+ inventory->remove(kInvItemToolboxFull);
+ inventory->add(kInvItemToolboxHalfEmpty);
+ inventory->add(kInvItemCarJack);
inventory->activate(false);
inventory->resetSelectedObject();
- displayMessage(0x3468);
- return true;
+ displayMessage(dsAddr_carJackMsg); // "Wow! There's a car jack inside! Great!"
+ break;
- case 0x9910:
- inventory->remove(4);
- inventory->add(5);
+ case csAddr_openHalfEmptyToolbox:
+ inventory->remove(kInvItemToolboxHalfEmpty);
+ inventory->add(kInvItemSpanner);
inventory->activate(false);
inventory->resetSelectedObject();
- displayMessage(0x3490);
- return true;
+ displayMessage(dsAddr_spannerMsg); // "There's something else inside the toolbox! A spanner!"
+ break;
-
- //very last part of the game:
- case 0x671d:
+ case 0x671d: // very last part of the game
moveTo(153, 163, 4);
playActorAnimation(973);
- if (CHECK_FLAG(0xDBC1, 0)) {
- SET_FLAG(0xDBC1, _rnd.getRandomNumber(5) + 1);
+ if (CHECK_FLAG(dsAddr_drawerPuzzleBookValue, 0)) {
+ SET_FLAG(dsAddr_drawerPuzzleBookValue, _rnd.getRandomNumber(5) + 1);
}
loadScene(30, 18, 159, 2);
- return true;
+ break;
case 0x67a6:
loadScene(29, 149, 163, 1);
playActorAnimation(974);
moveTo(160, 188, 0);
- return true;
+ break;
case 0x6805:
- processCallback(0x6849);
+ fnEgoBottomRightTurn();
playSound(32, 12);
playActorAnimation(694);
playSound(15, 8);
playAnimation(693, 0);
setOns(6, 0);
- displayMessage(0x4cc7);
- inventory->add(54);
+ displayMessage(dsAddr_fullAutomaticMsg); // "Fully Automatic"
+ inventory->add(kInvItemVideoTape);
disableObject(4);
- return true;
+ break;
- case 0x6849: {
- Common::Point p = scene->getPosition();
- if (p.x == 208 && p.y == 151) {
- moveRel(0, 0, 2);
- } else
- moveTo(208, 151, 1);
- }
- return true;
+ case csAddr_egoBottomRightTurn:
+ fnEgoBottomRightTurn();
+ break;
- case 0x687a: //using the book
- if (CHECK_FLAG(0xDBC2, 1)) {
- displayMessage(0x4ca0);
+ case 0x687a: // using the book
+ if (CHECK_FLAG(dsAddr_drawerPuzzleSolvedFlag, 1)) {
+ displayMessage(dsAddr_dontMessMsg); // "I don't need to mess with it anymore"
} else {
playSound(49, 5);
playSound(49, 17);
playActorAnimation(691);
- if (!processCallback(0x68e6)) {
- if (!CHECK_FLAG(0xDBC0, 1)) {
- displayMessage(0x4c61);
- SET_FLAG(0xDBC0, 1);
+ if (!fnCheckingDrawers()) {
+ if (!CHECK_FLAG(dsAddr_drawerPuzzleBookMessageFlag, 1)) {
+ displayMessage(dsAddr_bookHeldMsg); // "Something's got hold of the book!"
+ SET_FLAG(dsAddr_drawerPuzzleBookMessageFlag, 1);
}
} else {
- playSound(15, 8); //secret compartment
+ playSound(15, 8); // secret compartment
playAnimation(692, 0);
setOns(6, 59);
enableObject(4);
- displayMessage(0x4c84);
- SET_FLAG(0xDBC2, 1);
+ displayMessage(dsAddr_secretCompartmentMsg); // "Wow! A secret compartment!"
+ SET_FLAG(dsAddr_drawerPuzzleSolvedFlag, 1);
}
}
- return true;
+ break;
- case 0x68e6: { //checking drawers
- uint16 v = GET_FLAG(0xDBC1) - 1;
- uint bx = 0xDBB7;
- if (GET_FLAG(bx + v) != 1)
- return false;
-
- uint16 sum = 0;
- for (uint i = 0; i < 6; ++i) {
- sum += GET_FLAG(bx + i);
- }
- return sum == 1;
- }
+ case csAddr_checkingDrawers:
+ fnCheckingDrawers();
+ break;
case 0x6918:
- if (inventory->has(55)) {
- displayMessage(0x4cd9);
- return true;
- }
- if (!CHECK_FLAG(0xDBC3, 1)) {
- playActorAnimation(695);
- Dialog::showMark(scene, 0x386a);
- SET_FLAG(0xDBC3, 1);
- }
+ if (inventory->has(kInvItemSheetOfPaper))
+ displayMessage(dsAddr_noMoreSheetsMsg); // "Right now I don't need any more sheets"
+ else {
+ if (!CHECK_FLAG(dsAddr_mansionTrashcanSearchedFlag, 1)) {
+ playActorAnimation(695);
+ dialog->showMark(91, scene);
+ SET_FLAG(dsAddr_mansionTrashcanSearchedFlag, 1);
+ }
- playSound(5, 11);
- playActorAnimation(696);
- inventory->add(55);
- return true;
+ playSound(5, 11);
+ playActorAnimation(696);
+ inventory->add(kInvItemSheetOfPaper);
+ }
+ break;
case 0x6962:
- if (CHECK_FLAG(0xDBB7, 1)) {
+ if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1)) {
setOns(0, 0);
playSound(67, 4);
playActorAnimation(678);
- SET_FLAG(0xDBB7, 0);
- } else if (CHECK_FLAG(0xDBB8, 1)) {
- processCallback(0x6b86);
+ SET_FLAG(dsAddr_blueDrawerOpenFlag, 0);
+ } else if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
} else {
playSound(66, 4);
playActorAnimation(677);
setOns(0, 53);
- SET_FLAG(0xDBB7, 1);
+ SET_FLAG(dsAddr_blueDrawerOpenFlag, 1);
}
- return true;
+ break;
case 0x69b8:
- if (CHECK_FLAG(0xDBB8, 1)) {
+ if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
setOns(1, 0);
playSound(67, 4);
playActorAnimation(680);
- SET_FLAG(0xDBB8, 0);
- } else if (CHECK_FLAG(0xDBB7, 1)) {
- processCallback(0x6b86);
- } else if (CHECK_FLAG(0xDBB9, 1)) {
- processCallback(0x6b86);
+ SET_FLAG(dsAddr_redDrawerOpenFlag, 0);
+ } else if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
+ } else if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
} else {
playSound(66, 5);
playActorAnimation(679);
setOns(1, 54);
- SET_FLAG(0xDBB8, 1);
+ SET_FLAG(dsAddr_redDrawerOpenFlag, 1);
}
- return true;
+ break;
case 0x6a1b:
- if (CHECK_FLAG(0xDBB9, 1)) {
+ if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1)) {
setOns(2, 0);
playSound(67, 5);
playActorAnimation(682);
- SET_FLAG(0xDBB9, 0);
- } else if (CHECK_FLAG(0xDBB8, 1)) {
- processCallback(0x6b86);
+ SET_FLAG(dsAddr_greyDrawerOpenFlag, 0);
+ } else if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
} else {
playSound(67, 5);
playActorAnimation(681);
setOns(2, 55);
- SET_FLAG(0xDBB9, 1);
+ SET_FLAG(dsAddr_greyDrawerOpenFlag, 1);
}
- return true;
+ break;
case 0x6a73:
- if (CHECK_FLAG(0xDBBA, 1)) {
+ if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1)) {
setOns(3, 0);
playSound(67, 4);
playActorAnimation(684);
- SET_FLAG(0xDBBA, 0);
- } else if (!CHECK_FLAG(0xDBBB, 1)) {
+ SET_FLAG(dsAddr_greenDrawerOpenFlag, 0);
+ } else if (!CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
playSound(66, 4);
playActorAnimation(683);
setOns(3, 56);
- SET_FLAG(0xDBBA, 1);
+ SET_FLAG(dsAddr_greenDrawerOpenFlag, 1);
} else
- processCallback(0x6b86);
- return true;
+ fnDrawerOpenMessage();
+ break;
case 0x6acb:
- if (CHECK_FLAG(0xDBBB, 1)) {
+ if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
setOns(4, 0);
playSound(67, 4);
playActorAnimation(686);
- SET_FLAG(0xDBBB, 0);
- } else if (CHECK_FLAG(0xDBBA, 1)) {
- processCallback(0x6b86);
- } else if (CHECK_FLAG(0xDBBC, 1)) {
- processCallback(0x6b86);
+ SET_FLAG(dsAddr_brownDrawerOpenFlag, 0);
+ } else if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
+ } else if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
} else {
playSound(66, 5);
playActorAnimation(685);
setOns(4, 57);
- SET_FLAG(0xDBBB, 1);
+ SET_FLAG(dsAddr_brownDrawerOpenFlag, 1);
}
- return true;
+ break;
case 0x6b2e:
- if (CHECK_FLAG(0xdbbc, 1)) {
+ if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
setOns(5, 0);
playSound(67, 5);
playActorAnimation(688);
- SET_FLAG(0xdbbc, 0);
- } else if (CHECK_FLAG(0xdbbb, 1)) {
- processCallback(0x6b86);
+ SET_FLAG(dsAddr_pinkDrawerOpenFlag, 0);
+ } else if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1)) {
+ fnDrawerOpenMessage();
} else {
playSound(66, 6);
playActorAnimation(687);
setOns(5, 58);
- SET_FLAG(0xDBBC, 1);
+ SET_FLAG(dsAddr_pinkDrawerOpenFlag, 1);
}
- return true;
-
+ break;
- case 0x6b86:
- if (CHECK_FLAG(0xDBBD, 1)) {
- displayMessage(0x4b39);
- } else {
- displayMessage(0x4acd);
- displayMessage(0x4b0d);
- SET_FLAG(0xDBBD, 1);
- }
- return true;
+ case csAddr_DrawerOpenMessage:
+ fnDrawerOpenMessage();
+ break;
- case 0x6be1: //handle to the bathroom
- if (CHECK_FLAG(0xDBD9, 1)) {
- displayMessage(0x5326); //i'd better catch johnny
- } else {
+ case 0x6be1: // handle to the bathroom
+ if (CHECK_FLAG(dsAddr_MansionJohnNotyEscapingFlag, 1))
+ displayMessage(dsAddr_catchJohnFirstMsg); // "I'd better catch John Noty first"
+ else {
playSound(88, 4);
playActorAnimation(808);
loadScene(36, 41, 195, 2);
}
- return true;
+ break;
case 0x6bad:
playSound(80, 4);
playActorAnimation(971);
loadScene(32, 139, 199, 1);
- return true;
+ break;
case 0x6c45:
playSound(89, 6);
- playActorAnimation(CHECK_FLAG(0xDBEF, 1) ? 985 : 806);
+ playActorAnimation(CHECK_FLAG(dsAddr_mansionHandleInDoorHoleFlag, 1) ? 985 : 806);
loadScene(34, 40, 133, 2);
- return true;
+ break;
case 0x6c83:
waitLanAnimationFrame(1, 1);
- Dialog::pop(scene, 0xdb2e, 0, 727, 0xd1, 0xef, 0, 1);
- scene->getObject(1)->setName((const char *)res->dseg.ptr(0xaa94));
- SET_FLAG(0xDBD1, 1);
- return true;
+ dialog->pop(scene, dsAddr_dialogStackRobotSafe, 0, 727, textColorMark, textColorMike, 0, 1);
+ scene->getObject(1)->setName((const char *)res->dseg.ptr(dsAddr_scnObjNameMike));
+ SET_FLAG(dsAddr_MansionRobotSafeUnlockedFlag, 1);
+ break;
- case 0x6c9d: //getting jar
+ case 0x6c9d: // getting jar
setOns(0, 71);
playSound(32, 5);
playActorAnimation(732);
disableObject(2);
- inventory->add(72);
- return true;
+ inventory->add(kInvItemTimePills);
+ break;
- case 0x6cc4: //secret diary
+ case 0x6cc4: // secret diary
playActorAnimation(754);
hideActor();
- displayCutsceneMessage(0x517b, 30430);
+ displayCutsceneMessage(dsAddr_cutsceneMsg0, 30, 95); // "A secret diary of ..."
playMusic(3);
loadScene(11, scene->getPosition());
playAnimation(750, 2);
- Dialog::show(scene, 0x4f50, 751, 529, 0xe5, 0xd9, 2, 1);
+ dialog->show(117, scene, 751, 529, textColorProfessor, textColorMansionGuard, 2, 1);
playAnimation(752, 0, true);
playAnimation(753, 1, true);
waitAnimation();
- Dialog::show(scene, 0x5168, 529, 751, 0xd9, 0xe5, 1, 2);
+ dialog->show(118, scene, 529, 751, textColorMansionGuard, textColorProfessor, 1, 2);
loadScene(30, scene->getPosition());
- Dialog::show(scene, 0x449e, 733, 734, 0xe5, 0xd0, 2, 3);
+ dialog->show(108, scene, 733, 734, textColorProfessor, textColorJohnNoty, 2, 3);
playSound(75, 13);
playSound(32, 22);
playAnimation(735, 1, true);
playAnimation(736, 2, true);
waitAnimation();
- Dialog::show(scene, 0x46cf, 737, 738, 0xd0, 0xe5, 3, 2);
-
+ dialog->show(109, scene, 737, 738, textColorJohnNoty, textColorProfessor, 3, 2);
playSound(32, 1);
playAnimation(739, 1, true);
playAnimation(740, 2, true);
waitAnimation();
- Dialog::show(scene, 0x4772, 733, 734, 0xe5, 0xd0, 2, 3);
+ dialog->show(110, scene, 733, 734, textColorProfessor, textColorJohnNoty, 2, 3);
playAnimation(742, 1, true);
playAnimation(741, 2, true);
waitAnimation();
- Dialog::show(scene, 0x481c, 743, 733, 0xd0, 0xe5, 3, 2); //where's my wallet??
+ dialog->show(111, scene, 743, 733, textColorJohnNoty, textColorProfessor, 3, 2);
playAnimation(744, 1, true);
playAnimation(745, 2, true);
waitAnimation();
- Dialog::show(scene, 0x4873, 734, 733, 0xd0, 0xe5, 3, 2);
+ dialog->show(112, scene, 734, 733, textColorJohnNoty, textColorProfessor, 3, 2);
playAnimation(746, 1, true);
playAnimation(747, 2, true);
waitAnimation();
-
- Dialog::show(scene, 0x4da5, 734, 734, 0xd0, 0xd0, 3, 3);
- Dialog::show(scene, 0x4eb9, 748, 748, 0xd0, 0xd0, 3, 3);
- Dialog::show(scene, 0x4f15, 749, 749, 0xd0, 0xd0, 3, 3);
- Dialog::show(scene, 0x4f2f, 748, 748, 0xd0, 0xd0, 3, 3);
+ dialog->show(113, scene, 734, 734, textColorJohnNoty, textColorJohnNoty, 3, 3);
+ dialog->show(114, scene, 748, 748, textColorJohnNoty, textColorJohnNoty, 3, 3);
+ dialog->show(115, scene, 749, 749, textColorJohnNoty, textColorJohnNoty, 3, 3);
+ dialog->show(116, scene, 748, 748, textColorJohnNoty, textColorJohnNoty, 3, 3);
playMusic(10);
loadScene(32, scene->getPosition());
@@ -3296,35 +4168,34 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(755);
moveRel(0, 0, 3);
- Dialog::show(scene, 0x51bf, 0, 0, 0xd1, 0xd1, 0, 0);
+ dialog->showMark(119, scene);
hideActor();
loadScene(31, scene->getPosition());
- Dialog::show(scene, 0x539f, 763, 764, 0xd9, 0xd0, 1, 2);
+ dialog->show(123, scene, 763, 764, textColorMansionGuard, textColorJohnNoty, 1, 2);
loadScene(32, scene->getPosition());
showActor();
- Dialog::show(scene, 0x52c3, 0, 0, 0xd1, 0xd1, 0, 0); //i have to hide somewhere
+ dialog->showMark(120, scene);
disableObject(3);
enableObject(7);
- SET_FLAG(0xDBD5, 1);
- return true;
+ SET_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1);
+ break;
case 0x6f20:
- if (CHECK_FLAG(0xDBD5, 1)) {
- displayMessage(0x51a7);
- } else {
+ if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1))
+ displayMessage(dsAddr_cantHideMsg); // "I can't hide here!"
+ else
rejectMessage();
- }
- return true;
+ break;
- case 0x6f75: //hiding in left corner
+ case 0x6f75: // hiding in left corner
moveRel(0, 0, 3);
playActorAnimation(756);
hideActor();
playAnimation(758, 1);
- Dialog::show(scene, 0x52e6, 759, 759, 0xd0, 0xd0, 2, 2); //I have to buy...
+ dialog->show(121, scene, 759, 759, textColorJohnNoty, textColorJohnNoty, 2, 2);
playSound(40, 5);
playSound(52, 13);
@@ -3340,272 +4211,265 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(58, 12);
playSound(58, 14);
playAnimation(765, 1);
- Dialog::show(scene, 0x5443, 766, 766, 0xd9, 0xd9, 1, 1);
+ dialog->show(124, scene, 766, 766, textColorMansionGuard, textColorMansionGuard, 1, 1);
loadScene(32, scene->getPosition());
- Dialog::show(scene, 0x5358, 761, 761, 0xd0, 0xd0, 2, 2);
+ dialog->show(122, scene, 761, 761, textColorJohnNoty, textColorJohnNoty, 2, 2);
playAnimation(762, 1);
setOns(2, 0);
showActor();
playActorAnimation(757);
moveRel(0, 0, 1);
- displayMessage(0x51e7);
+ displayMessage(dsAddr_wasCloseMsg); // "That was close"
enableObject(8);
disableObject(7);
- SET_FLAG(0xDBD5, 0);
- return true;
+ SET_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 0);
+ break;
case 0x6f4d:
- if (CHECK_FLAG(0xDBD5, 1)) {
- displayMessage(0x51bb);
- } else {
+ if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1))
+ displayMessage(dsAddr_johnOutsideMsg); // "There's John Noty outside! I can't go out!"
+ else
loadScene(31, 139, 172, 3);
- }
- return true;
+ break;
case 0x6f32:
- if (CHECK_FLAG(0xDBD5, 1)) {
- displayMessage(0x51a7);
+ if (CHECK_FLAG(dsAddr_MansionJohnNotyOutsideBathroomFlag, 1)) {
+ displayMessage(dsAddr_cantHideMsg); // "I can't hide here!"
} else {
playActorAnimation(977);
- displayMessage(0x5511);
+ displayMessage(dsAddr_lockedMsg); // "It's Locked!"
}
- return true;
+ break;
case 0x7096:
playSound(32, 5);
playActorAnimation(767);
setOns(1, 0);
- inventory->add(73);
+ inventory->add(kInvItemHandle);
disableObject(8);
- return true;
+ break;
+
+ case 0x7218:
+ rejectMessage();
+ break;
case 0x7291:
playSound(89, 3);
playActorAnimation(975);
loadScene(31, 298, 177, 4);
- return true;
+ break;
case 0x72c2:
- if (CHECK_FLAG(0xDBD6, 2)) {
- displayMessage(0x522c);
+ if (CHECK_FLAG(dsAddr_MansionSinkState, 2)) {
+ displayMessage(dsAddr_enoughWaterMsg); // "There's enough water in the sink"
} else {
playSound(79, 6);
playSound(84, 9);
playActorAnimation(801);
wait(50);
- if (CHECK_FLAG(0xDBD6, 1)) {
- displayMessage(0x538d);
- SET_FLAG(0xDBD6, 2);
+ if (CHECK_FLAG(dsAddr_MansionSinkState, 1)) {
+ displayMessage(dsAddr_sinkFullMsg); // "The sink is full of hot water"
+ SET_FLAG(dsAddr_MansionSinkState, 2);
} else
- displayMessage(0x5372);
+ displayMessage(dsAddr_waterHotMsg); // "The water looks very hot"
}
- return true;
+ break;
case 0x7309:
playSound(66, 5);
playSound(67, 11);
playActorAnimation(976);
- displayMessage(0x5955);
- return true;
+ displayMessage(dsAddr_emptyMsg); // "It's Empty"
+ break;
case 0x77d5:
- if (CHECK_FLAG(0xdbd7, 1) && !CHECK_FLAG(0xdbd8, 1)) { //disallow exiting through the first door until switch turned on, not present in original game
- displayMessage(0x52cb);
- return true;
+ if (CHECK_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1) && !CHECK_FLAG(dsAddr_MansionVentFanStoppedFlag, 1)) { // disallow exiting through the first door until switch turned on, not present in original game
+ displayMessage(dsAddr_noSaladMsg); // "I don't want to turn myself into a salad"
+ } else {
+ playSound(89, 6);
+ playActorAnimation(978);
+ loadScene(31, 298, 177, 4);
}
- playSound(89, 6);
- playActorAnimation(978);
- loadScene(31, 298, 177, 4);
- return true;
+ break;
case 0x79e4:
- processCallback(0x6849);
- return false;
+ fnEgoBottomRightTurn();
+ retVal = false;
+ break;
- case 0x79eb: //color of the book
- displayMessage(res->dseg.get_word(0x5f3c + GET_FLAG(0xDBC1) * 2 - 2));
- return true;
+ case 0x79eb: // color of the book
+ // FIXME - Replace with internal lookup and switch
+ displayMessage(res->dseg.get_word(dsAddr_bookColorMsgPtr + GET_FLAG(dsAddr_drawerPuzzleBookValue) * 2 - 2));
+ break;
case 0x79fd:
- if (CHECK_FLAG(0xDBB7, 1)) {
- displayMessage(0x4b6c);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_blueDrawerOpenFlag, 1))
+ displayMessage(dsAddr_blueInteriorMsg); // "It's got a blue interior"
+ else
+ retVal = false;
+ break;
case 0x7a0f:
- if (CHECK_FLAG(0xDBB8, 1)) {
- if (!CHECK_FLAG(0xDBBF, 1)) {
- displayMessage(0x4c32);
+ if (CHECK_FLAG(dsAddr_redDrawerOpenFlag, 1)) {
+ if (!CHECK_FLAG(dsAddr_drawerGotPolaroidFlag, 1)) {
+ displayMessage(dsAddr_foundPolaroidMsg); // "There's a polaroid inside! I might need that"
playSound(5, 11);
playActorAnimation(690);
- inventory->add(53);
- SET_FLAG(0xDBBF, 1);
+ inventory->add(kInvItemPolaroidCamera);
+ SET_FLAG(dsAddr_drawerGotPolaroidFlag, 1);
}
- displayMessage(0x4b87);
- return true;
+ displayMessage(dsAddr_redInteriorMsg); // "It's got a red interior"
} else
- return false;
+ retVal = false;
+ break;
case 0x7a49:
- if (CHECK_FLAG(0xDBB9, 1)) {
- displayMessage(0x4ba1);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_greyDrawerOpenFlag, 1))
+ displayMessage(dsAddr_greyInteriorMsg); // "It's got a grey interior"
+ else
+ retVal = false;
+ break;
case 0x7a5b:
- if (CHECK_FLAG(0xDBBA, 1)) {
- displayMessage(0x4bbc);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_greenDrawerOpenFlag, 1))
+ displayMessage(dsAddr_greenInteriorMsg); // "It's got a green interior"
+ else
+ retVal = false;
+ break;
case 0x7a6d:
- if (CHECK_FLAG(0xDBBB, 1)) {
- displayMessage(0x4bd8);
- return true;
- } else
- return false;
+ if (CHECK_FLAG(dsAddr_brownDrawerOpenFlag, 1))
+ displayMessage(dsAddr_brownInteriorMsg); // "It's got a brown interior"
+ else
+ retVal = false;
+ break;
case 0x7a7f:
- if (CHECK_FLAG(0xDBBC, 1)) {
- if (!CHECK_FLAG(0xDBBE, 1)) {
- displayMessage(0x4c0f); //there's dictaphone inside!
+ if (CHECK_FLAG(dsAddr_pinkDrawerOpenFlag, 1)) {
+ if (!CHECK_FLAG(dsAddr_drawerGotDictaphoneFlag, 1)) {
+ displayMessage(dsAddr_dictaphoneInsideMsg); // "Wow! There's a dictaphone inside!"
playSound(5, 12);
playActorAnimation(689);
- inventory->add(52);
- SET_FLAG(0xDBBE, 1);
+ inventory->add(kInvItemDictaphoneNoBatteries);
+ SET_FLAG(dsAddr_drawerGotDictaphoneFlag, 1);
}
- displayMessage(0x4bf4);
- return true;
+ displayMessage(dsAddr_pinkInteriorMsg); // "It's got a pink interior"
} else
- return false;
+ retVal = false;
+ break;
case 0x7af7:
- if (CHECK_FLAG(0xDBD0, 1)) {
- displayMessage(0x5082);
- return true;
- } else
- return false;
-
- case 0x7b09: {
- byte v = GET_FLAG(0xDBD6);
- switch (v) {
- case 1:
- displayMessage(0x51f8);
- return true;
- case 2:
- displayMessage(0x538d);
- return true;
- default:
- return false;
- }
- }
+ if (CHECK_FLAG(dsAddr_MansionPutBurningPaperInFridgeFlag, 1))
+ displayMessage(dsAddr_yummyMsg); // "Yummy"
+ else
+ retVal = false;
+ break;
- case 0x9166:
- if (CHECK_FLAG(0xDBD1, 1)) {
- return true;
- } else {
- displayMessage(0x50a6);
- return false;
+ case 0x7b09:
+ {
+ byte v = GET_FLAG(dsAddr_MansionSinkState);
+ switch (v) {
+ case 1:
+ displayMessage(dsAddr_corkInHoleMsg); // "The cork is stuck in the hole"
+ break;
+ case 2:
+ displayMessage(dsAddr_sinkFullMsg); // "The sink is full of hot water"
+ break;
+ default:
+ retVal = false;
+ break;
+ }
}
+ break;
- case 0x9175:
- if (CHECK_FLAG(0xDBD2, 0) || CHECK_FLAG(0xDBD3, 0) || CHECK_FLAG(0xDBD4, 0))
- return true;
+ case csAddr_robotSafeAlreadyUnlockedCheck:
+ fnRobotSafeAlreadyUnlockedCheck();
+ break;
- waitLanAnimationFrame(1, 1);
- playSound(89, 2);
- playActorAnimation(731);
- setOns(0, 70);
- setLan(1, 0);
- disableObject(1);
- enableObject(2);
- enableObject(3);
- return true;
+ case csAddr_robotSafeUnlockCheck:
+ fnRobotSafeUnlockCheck();
+ break;
- case 0x90bc: //handle on the hole
+ case 0x90bc: // handle on the hole
playSound(5, 3);
playSound(6, 9);
playActorAnimation(807);
setOns(0, 83);
- inventory->remove(73);
+ inventory->remove(kInvItemHandle);
disableObject(2);
enableObject(3);
- SET_FLAG(0xDBEF, 1);
- return true;
-
- case 0x90fc: //dictaphone on robot
- if (!processCallback(0x9166))
- return true;
-
- if (CHECK_FLAG(0xDBD2, 1)) {
- displayMessage(0x50c3);
- return true;
- }
+ SET_FLAG(dsAddr_mansionHandleInDoorHoleFlag, 1);
+ break;
- if (!CHECK_FLAG(0xDBCB, 1)) {
- displayMessage(0x5101);
- return true;
+ case 0x90fc: // dictaphone on robot
+ if (fnRobotSafeAlreadyUnlockedCheck()) {
+ if (CHECK_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1)) {
+ displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
+ } else {
+ if (!CHECK_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1)) {
+ displayMessage(dsAddr_notMyVoiceMsg); // "I won't cheat Mike with MY voice"
+ } else {
+ displayMessage(dsAddr_mikeVoiceTestMsg); // "Mike, activate the voice test"
+ waitLanAnimationFrame(1, 1);
+
+ playSound(5, 3);
+ playSound(5, 39);
+ displayAsyncMessage(dsAddr_singingMsg, 68, 126, 9, 35, textColorJohnNoty); // "siiiiinging!"
+ playActorAnimation(728);
+
+ waitLanAnimationFrame(1, 1);
+ dialog->show(98, scene, 0, 727, textColorMark, textColorMike, 0, 1);
+ SET_FLAG(dsAddr_MansionRobotSafeVoiceTestPassedFlag, 1);
+ fnRobotSafeUnlockCheck();
+ }
+ }
}
+ break;
- displayMessage(0x50e1);
- waitLanAnimationFrame(1, 1);
-
- playSound(5, 3);
- playSound(5, 39);
- displayAsyncMessage(0x5124, 40388, 9, 35, 0xd0);
- playActorAnimation(728);
-
- waitLanAnimationFrame(1, 1);
- Dialog::show(scene, 0x3d17, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD2, 1);
- processCallback(0x9175);
- return true;
+ case 0x91cb: // use socks on robot
+ if (fnRobotSafeAlreadyUnlockedCheck()) {
+ if (CHECK_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1)) {
+ displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
+ } else {
+ displayMessage(dsAddr_mikeScentTestMsg); // "Mike, let's get on with the scent test"
- case 0x91cb: //use socks on robot
- if (!processCallback(0x9166))
- return true;
+ waitLanAnimationFrame(1, 1);
+ playSound(5, 3);
+ playSound(5, 23);
+ playActorAnimation(729);
- if (CHECK_FLAG(0xDBD3, 1)) {
- displayMessage(0x50c3);
- return true;
+ waitLanAnimationFrame(1, 1);
+ dialog->show(99, scene, 0, 727, textColorMark, textColorMike, 0, 1);
+ SET_FLAG(dsAddr_MansionRobotSafeScentTestPassedFlag, 1);
+ fnRobotSafeUnlockCheck();
+ }
}
- displayMessage(0x5138);
-
- waitLanAnimationFrame(1, 1);
- playSound(5, 3);
- playSound(5, 23);
- playActorAnimation(729);
+ break;
- waitLanAnimationFrame(1, 1);
- Dialog::show(scene, 0x3d70, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD3, 1);
- processCallback(0x9175);
- return true;
+ case 0x9209: // photo on robot
+ if (fnRobotSafeAlreadyUnlockedCheck()) {
+ if (CHECK_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1)) {
+ displayMessage(dsAddr_fooledOnceMsg); // "I'd already fooled him once"
+ } else {
+ displayMessage(dsAddr_mikeViewTestMsg); // "Mike, run the view test"
+ waitLanAnimationFrame(1, 1);
- case 0x9209: //photo on robot
- if (!processCallback(0x9166))
- return true;
+ playSound(5, 3);
+ playSound(5, 25);
+ playActorAnimation(730);
- if (CHECK_FLAG(0xDBD4, 1)) {
- displayMessage(0x50c3);
- return true;
+ waitLanAnimationFrame(1, 1);
+ dialog->show(100, scene, 0, 727, textColorMark, textColorMike, 0, 1);
+ SET_FLAG(dsAddr_MansionRobotSafeViewTestPassedFlag, 1);
+ fnRobotSafeUnlockCheck();
+ }
}
- displayMessage(0x5161);
- waitLanAnimationFrame(1, 1);
-
- playSound(5, 3);
- playSound(5, 25);
- playActorAnimation(730);
+ break;
- waitLanAnimationFrame(1, 1);
- Dialog::show(scene, 0x3dd6, 0, 727, 0xd1, 0xef, 0, 1);
- SET_FLAG(0xDBD4, 1);
- processCallback(0x9175);
- return true;
+ case 0x9247:
+ displayMessage(dsAddr_sameBottleMsg); // "The bottle's the same, but I doubt if it's enough to fool anyone"
+ break;
case 0x924e:
setOns(2, 64);
@@ -3613,9 +4477,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(52, 10);
playActorAnimation(711);
moveRel(0, 0, 4);
- Dialog::show(scene, 0x3b21, 0, 709, 0xd1, 0xef, 0, 1);
+ dialog->show(95, scene, 0, 709, textColorMark, textColorCook, 0, 1);
moveTo(300, 190, 4);
- inventory->remove(64);
+ inventory->remove(kInvItemFakeChilli);
disableObject(8);
playAnimation(712, 0);
setOns(2, 0);
@@ -3623,90 +4487,90 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playSound(15, 28);
playSound(16, 37);
playAnimation(713, 0);
- Dialog::show(scene, 0x3c0d, 0, 709, 0xd1, 0xef, 0, 1);
+ dialog->show(96, scene, 0, 709, textColorMark, textColorCook, 0, 1);
playSound(85, 2);
playAnimation(714, 0);
setLan(1, 0);
disableObject(1);
{
Object *obj = scene->getObject(2);
- obj->actor_rect.left = obj->actor_rect.right = 81;
- obj->actor_rect.top = obj->actor_rect.bottom = 160;
- obj->actor_orientation = 4;
+ obj->actorRect.left = obj->actorRect.right = 81;
+ obj->actorRect.top = obj->actorRect.bottom = 160;
+ obj->actorOrientation = 4;
obj->save();
}
{
Object *obj = scene->getObject(3);
- obj->actor_rect.left = obj->actor_rect.right = 64;
- obj->actor_rect.top = obj->actor_rect.bottom = 168;
- obj->actor_orientation = 4;
+ obj->actorRect.left = obj->actorRect.right = 64;
+ obj->actorRect.top = obj->actorRect.bottom = 168;
+ obj->actorOrientation = 4;
obj->save();
}
{
Object *obj = scene->getObject(10);
- obj->actor_rect.left = obj->actor_rect.right = 105;
- obj->actor_rect.top = obj->actor_rect.bottom = 160;
- obj->actor_orientation = 1;
+ obj->actorRect.left = obj->actorRect.right = 105;
+ obj->actorRect.top = obj->actorRect.bottom = 160;
+ obj->actorOrientation = 1;
obj->save();
}
- SET_FLAG(0xDBCC, 1);
- return true;
+ SET_FLAG(dsAddr_MansionCookGoneFlag, 1);
+ break;
case 0x9472:
playSound(5, 4);
playSound(19, 14);
playActorAnimation(793);
- displayMessage(0x5218);
- inventory->remove(60);
- SET_FLAG(0xDBD6, 1);
- return true;
+ displayMessage(dsAddr_fitsPerfectMsg); // "It fits perfectly!"
+ inventory->remove(kInvItemWrappedCork);
+ SET_FLAG(dsAddr_MansionSinkState, 1);
+ break;
- case 0x9449: //meat + stew
+ case 0x9449: // meat + stew
playSound(5, 4);
playSound(63, 12);
playActorAnimation(726);
- displayMessage(0x508a);
- inventory->remove(69);
- inventory->add(70);
- return true;
+ displayMessage(dsAddr_dislikeVealMsg); // "I never liked veal anyway"
+ inventory->remove(kInvItemMeat);
+ inventory->add(kInvItemPlasticBag);
+ break;
case 0x949b:
- if (CHECK_FLAG(0xDBD6, 2)) {
+ if (CHECK_FLAG(dsAddr_MansionSinkState, 2)) {
playSound(5, 4);
playSound(5, 25);
playActorAnimation(802);
- displayMessage(0x5272);
- inventory->remove(62);
- inventory->add(74);
- inventory->add(65);
+ displayMessage(dsAddr_labelOffMsg); // "The label has come off!"
+ inventory->remove(kInvItemChilliWithLabel);
+ inventory->add(kInvItemChilliNoLabel);
+ inventory->add(kInvItemLabel);
} else
- displayMessage(0x524f);
- return true;
+ displayMessage(dsAddr_noHotWaterMsg); // "There's no hot water in the sink"
+ break;
case 0x94d4:
- if (inventory->has(70)) {
+ if (inventory->has(kInvItemPlasticBag)) {
setOns(0, 0);
playSound(5, 3);
playSound(5, 18);
playSound(13, 12);
playActorAnimation(803);
disableObject(7);
- inventory->remove(70);
- inventory->add(71);
+ inventory->remove(kInvItemPlasticBag);
+ inventory->add(kInvItemSocks);
} else
- displayMessage(0x53ad);
- return true;
+ displayMessage(dsAddr_noSockStoreMsg); // "I don't have anything to store these socks in"
+ break;
case 0x951b:
playSound(5, 4);
playSound(5, 22);
playActorAnimation(804);
- displayMessage(0x528b);
- return true;
+ displayMessage(dsAddr_corkTooSmallMsg); // "The cork is a bit too small"
+ break;
case 0x73a3:
- if (CHECK_FLAG(0xdbc5, 1)) {
- SET_FLAG(0xdbc5, 0);
+ if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
+ SET_FLAG(dsAddr_mansionTVOnFlag, 0);
//call 73e6
playSound(71, 3);
@@ -3714,92 +4578,94 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playAnimation(0, 0, true);
reloadLan();
- if (CHECK_FLAG(0xDBC6, 1)) {
- displayMessage(0x4da6);
+ if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
+ displayMessage(dsAddr_muchBetterMsg); // "That's much better"
}
} else {
- SET_FLAG(0xdbc5, 1);
+ SET_FLAG(dsAddr_mansionTVOnFlag, 1);
//call 73e6
playSound(71, 3);
playActorAnimation(700);
reloadLan();
}
- return true;
+ break;
- case 0x9537: //using remote on VCR
+ case 0x9537: // using remote on VCR
playSound(5, 3);
playSound(5, 16);
playActorAnimation(703);
- if (!CHECK_FLAG(0xDBC8, 1)) {
- displayMessage(0x4D80); //nothing happened
- return true;
- }
-
- //0x955a
- if (CHECK_FLAG(0xDBC6, 0)) {
- if (CHECK_FLAG(0xDBC5, 1)) { //tv on
- if (!CHECK_FLAG(0xDBC7, 1))
- displayMessage(0x4d93); //the tape started
-
- SET_FLAG(0xDBC6, 1);
- reloadLan();
- if (!CHECK_FLAG(0xDBC7, 1)) {
- Dialog::show(scene, 0x392c, 0, 702, 0xd1, 0xd0, 0, 1);
- SET_FLAG(0xDBC7, 1);
+ if (!CHECK_FLAG(dsAddr_mansionVCRTapeLoadedFlag, 1))
+ displayMessage(dsAddr_NotHappenMsg); // "Nothing happened"
+ else {
+ //0x955a
+ if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 0)) {
+ if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
+ if (!CHECK_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1))
+ displayMessage(dsAddr_tapeStartedMsg); // "The tape started!"
+
+ SET_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1);
+ reloadLan();
+ if (!CHECK_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1)) {
+ dialog->show(93, scene, 0, 702, textColorMark, textColorJohnNoty, 0, 1);
+ SET_FLAG(dsAddr_mansionVCRPlayedTapeBeforeFlag, 1);
+ }
+ } else
+ displayMessage(dsAddr_tvOffMsg); // "I just realised that the TV is off"
+ } else {
+ SET_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 0);
+ if (CHECK_FLAG(dsAddr_mansionTVOnFlag, 1)) {
+ reloadLan();
+ displayMessage(dsAddr_muchBetterMsg); // "That's much better"
}
- } else
- displayMessage(0x4d5b); //i just realized that tv is off
- } else {
- SET_FLAG(0xDBC6, 0);
- if (CHECK_FLAG(0xDBC5, 1)) { //tv on
- reloadLan();
- displayMessage(0x4da6); //much better!
}
}
- return true;
+ break;
- case 0x95eb: //polaroid + tv
- if (CHECK_FLAG(0xDBC6, 1)) {
- if (CHECK_FLAG(0xDBCA, 1)) {
- displayMessage(0x4de6);
+ case 0x95eb: // polaroid + tv
+ if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_usedPolaroidOnTVFlag, 1)) {
+ displayMessage(dsAddr_enoughPhotosMsg); // "I don't need any more photos"
} else {
playSound(5, 3);
playSound(5, 24);
playSound(90, 18);
playActorAnimation(707);
- inventory->add(61);
- SET_FLAG(0xDBCA, 1);
+ inventory->add(kInvItemPhoto);
+ SET_FLAG(dsAddr_usedPolaroidOnTVFlag, 1);
}
} else
- displayMessage(0x4ea5);
- return true;
+ displayMessage(dsAddr_notRightMomentMsg); // "I don't think this is the right moment"
+ break;
- case 0x962f: //polaroid + tv
- if (CHECK_FLAG(0xDBC6, 1)) {
- if (CHECK_FLAG(0xDBCB, 1)) {
- displayMessage(0x4e32);
+ case 0x962f: // dictaphone + tv
+ if (CHECK_FLAG(dsAddr_mansionVCRPlayingTapeFlag, 1)) {
+ if (CHECK_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1)) {
+ displayMessage(dsAddr_alreadyRecordedMsg); // "I already recorded what I wanted to"
} else {
- displayMessage(0x4e05);
+ displayMessage(dsAddr_recordScareMsg); // "Yeah, I can record this and scare the cats"
playSound(5, 3);
playSound(5, 27);
playActorAnimation(708);
- SET_FLAG(0xDBCB, 1);
+ SET_FLAG(dsAddr_usedDictaphoneOnTVFlag, 1);
}
} else
- displayMessage(0x4ea5);
- return true;
-
+ displayMessage(dsAddr_notRightMomentMsg); // "I don't think this is the right moment"
+ break;
case 0x95c8:
playSound(5, 3);
playSound(91, 12);
playActorAnimation(706);
- inventory->remove(54);
- SET_FLAG(0xDBC8, 1);
- return true;
+ inventory->remove(kInvItemVideoTape);
+ SET_FLAG(dsAddr_mansionVCRTapeLoadedFlag, 1);
+ break;
- case 0x9673: //hit fatso - final scene
+ case 0x966c:
+ displayMessage(dsAddr_cantRecordNoBatteriesMsg); // "I can't record anything until I find some batteries"
+ break;
+
+ case 0x9673: // hit fatso - final scene
playSound(5, 3);
playSound(24, 10);
playActorAnimation(798);
@@ -3811,12 +4677,12 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
wait(100);
playActorAnimation(805);
moveTo(50, 170, 3);
- displayMessage(0x5349);
+ displayMessage(dsAddr_onlyChilliMsg); // "Good this red stuff is only a chilli"
//moveTo(105, 157, 0, true);
playMusic(3);
loadScene(11, 105, 157, 4);
- Dialog::show(scene, 0x8409, 0, 938, 0xd1, 0xec, 0, 1);
+ dialog->show(203, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
playAnimation(939, 0, true, true);
playActorAnimation(942, true);
@@ -3837,9 +4703,9 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(945, true);
waitAnimation();
- Dialog::show(scene, 0x844f, 0, 938, 0xd1, 0xec, 0, 1);
+ dialog->show(204, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
playAnimation(946, 0);
- Dialog::show(scene, 0x87c7, 0, 938, 0xd1, 0xec, 0, 1);
+ dialog->show(205, scene, 0, 938, textColorMark, textColorCaptain, 0, 1);
playSound(24, 7);
playAnimation(948, 0, true);
@@ -3847,16 +4713,16 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
loadScene(40, 198, 186, 1);
- Dialog::show(scene, 0x8890, 0, 920, 0xd1, 0xe7, 0, 1);
- Dialog::show(scene, 0x8a2f, 0, 921, 0xd1, 0xe7, 0, 1);
+ dialog->show(206, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
+ dialog->show(207, scene, 0, 921, textColorMark, textColorRGBBoss, 0, 1);
playAnimation(923, 0);
- Dialog::show(scene, 0x8aa7, 0, 920, 0xd1, 0xe7, 0, 1);
+ dialog->show(208, scene, 0, 920, textColorMark, textColorRGBBoss, 0, 1);
moveTo(237, 186, 0);
moveTo(237, 177, 0);
moveTo(192, 177, 4);
playAnimation(949, 0);
- Dialog::showMono(scene, 0x8af6, 950, 0xe7, 1);
+ dialog->showMono(209, scene, 950, textColorRGBBoss, 1);
playSound(32, 5);
playSound(40, 14);
@@ -3869,98 +4735,89 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
displayCredits();
loadScene(39, 192, 177, 0);
hideActor();
- Dialog::showMono(scene, 0x8b4d, 953, 0xe3, 1); //well...
+ dialog->showMono(210, scene, 953, textColorMarkEnd, 1);
playSound(5, 15);
playAnimation(954, 0);
- Dialog::showMono(scene, 0x8b7a, 955, 0xe3, 1); //that's all folks
+ dialog->showMono(211, scene, 955, textColorMarkEnd, 1);
playMusic(2);
- displayCredits(0xe47c, 4500); //3 minutes (infinite until key pressed in original)
+ displayCredits(dsAddr_finalCredits6, 4500); // 3 minutes (infinite until key pressed in original)
scene->push(SceneEvent(SceneEvent::kQuit));
+ break;
- return true;
-
- case 0x9921: { //using diving eq
- int id = scene->getId();
- if (id != 15) {
- displayMessage(id == 16 ? 0x38ce : 0x38a7);
- } else {
- playSound(5, 3);
- playSound(38, 16);
- playSound(38, 22);
- playActorAnimation(614);
- playSound(5, 3);
- playSound(44, 10);
- playSound(20, 26);
- playActorAnimation(615);
- loadScene(17, 156, 180, 3);
- SET_FLAG(0, 4);
- playSound(64, 7);
- playSound(64, 21);
- playSound(64, 42);
- playSound(64, 63);
- setTimerCallback(0x9a1d, 30);
- playActorAnimation(617, false, true);
+ case csAddr_useDivingEquipment: // using diving eq
+ // FIXME - Some code is missing here as displayMessage(dsAddr_cantTalkUnderwaterMsg),
+ // displayMessage(dsAddr_notSwimmingThereMsg), displayMessage(dsAddr_tooLittleAirMsg)
+ // displayMessage(dsAddr_fishDontWorryMsg) are never called.
+ {
+ int id = scene->getId();
+ if (id != 15) {
+ if (id == 16)
+ displayMessage(dsAddr_notHereMsg); // "Not here"
+ else
+ displayMessage(dsAddr_notBestPlaceMsg); // "It's not the best place for diving"
+ } else {
+ playSound(5, 3);
+ playSound(38, 16);
+ playSound(38, 22);
+ playActorAnimation(614);
+ playSound(5, 3);
+ playSound(44, 10);
+ playSound(20, 26);
+ playActorAnimation(615);
+ loadScene(17, 156, 180, 3);
+ SET_FLAG(dsAddr_timedCallbackState, 4);
+ playSound(64, 7);
+ playSound(64, 21);
+ playSound(64, 42);
+ playSound(64, 63);
+ setTimerCallback(csAddr_noAnchorTimeout, 30);
+ playActorAnimation(617, false, true);
+ }
}
- }
- return true;
+ break;
- case 0x9a1d: //no anchor, timeout
- SET_FLAG(0, 0);
- processCallback(0x9a7a);
- INC_FLAG(0xDBA6);
- switch (GET_FLAG(0xDBA6)) {
+ case csAddr_noAnchorTimeout: // no anchor, timeout
+ SET_FLAG(dsAddr_timedCallbackState, 0);
+ fnGetOutOfLake();
+ INC_FLAG(dsAddr_lakeDivingExitMessage);
+ switch (GET_FLAG(dsAddr_lakeDivingExitMessage)) {
case 1:
- displayMessage(0x39ae);
+ displayMessage(dsAddr_seaweedMsg); // "This seaweed is just like the flowers I gave mum on her last birthday"
break;
case 2:
- displayMessage(0x39f6);
+ displayMessage(dsAddr_fishBoatMsg); // "I wonder what fish do inside this boat at night"
break;
case 3:
- displayMessage(0x3a28);
+ displayMessage(dsAddr_fishSomethingMsg); // "I think I have to fish out something down there"
break;
case 4:
- displayMessage(0x3a85);
+ displayMessage(dsAddr_notRedHerringMsg); // "I hope all this fish stuff is not a red herring"
break;
case 5:
- displayMessage(0x39ae);
+ displayMessage(dsAddr_seaweedMsg); // "This seaweed is just like the flowers I gave mum on her last birthday"
break;
default:
- displayMessage(0x3ab7);
+ displayMessage(dsAddr_niceDownMsg); // "It's nice down there"
+ break;
}
- return true;
+ break;
- case 0x99e0: //success getting an anchor
- SET_FLAG(0, 0);
- setTimerCallback(0, 0);
- scene->getActorAnimation()->free();
- playSound(64, 7);
- playActorAnimation(618);
- disableObject(5);
- setOns(0, 0);
- playSound(31, 1);
- playActorAnimation(619);
- processCallback(0x9a7a);
- inventory->add(42);
- displayMessage(0x3989);
- return true;
+ case csAddr_gotAnchor:
+ fnGotAnchor();
+ break;
- case 0x9a7a:
- loadScene(15, 156, 180, 3);
- playSound(5, 5);
- playSound(38, 14);
- playSound(38, 20);
- playSound(5, 25);
- playActorAnimation(616);
- return true;
+ case csAddr_getOutOfLake:
+ fnGetOutOfLake();
+ break;
- case 0x9aca:
+ case csAddr_digMansionWall:
if (scene->getId() == 13) {
moveTo(172, 181, 1);
playSound(26, 19);
for (uint i = 0; i < 8; ++i)
playSound(26, 30 + i * 11);
playActorAnimation(661);
- displayCutsceneMessage(0x3c80, 30484);
+ displayCutsceneMessage(dsAddr_cutsceneMsgA, 84, 95); // "Hundred moments later"
playSound(56, 10);
playSound(56, 21);
@@ -3974,7 +4831,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
waitAnimation();
setOns(1, 49);
- displayCutsceneMessage(0x3c9a, 30453);
+ displayCutsceneMessage(dsAddr_cutsceneMsgB, 53, 95); // "Another hundred moments later"
moveTo(162, 184, 0, true);
playSound(26, 6);
playSound(26, 17);
@@ -3986,27 +4843,32 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
playActorAnimation(664);
playAnimation(665, 1);
wait(100);
- displayMessage(0x3cbc);
+ displayMessage(dsAddr_foundCrudeOilMsg); // "At least I found crude oil and I'll be rich"
wait(100);
- displayMessage(0x3cea);
- inventory->remove(37);
- processCallback(0x9d45); //another mansion try
+ displayMessage(dsAddr_myLifeMsg); // "That's my life"
+ inventory->remove(kInvItemShovelAct2);
+ fnMansionIntrusionAttempt();
} else
- displayMessage(0x3c58);
- return true;
+ displayMessage(dsAddr_notThinkRightPlaceMsg); // "I don't think this is the right place"
+ break;
- case 0x9c6d:
- displayMessage(0x49d1);
- SET_FLAG(0xDBB5, 1);
- return false;
+ case csAddr_tooDarkHere:
+ displayMessage(dsAddr_cantDoTooDarkMsg); // "I can't do anything here, it's too dark"
+ break;
+
+ case csAddr_examineBanknote:
+ displayMessage(dsAddr_bankNoteMsg); // "It's a note from some bank..."
+ SET_FLAG(dsAddr_examinedBanknoteFlag, 1);
+ retVal = false;
+ break;
- case 0x9c79: //use pills
+ case csAddr_useTimePills: // use pills
if (scene->getId() != 36) {
- displayMessage(0x52a9);
- } else if (CHECK_FLAG(0xDBF1, 1)) {
- displayMessage(0x52F6);
+ displayMessage(dsAddr_notTryNowMsg); // "There's no need to try them now"
+ } else if (CHECK_FLAG(dsAddr_mansionAlreadyUsedTimePillsFlag, 1)) {
+ displayMessage(dsAddr_nahMsg); // "Nah"
} else {
- SET_FLAG(0xDBF1, 1);
+ SET_FLAG(dsAddr_mansionAlreadyUsedTimePillsFlag, 1);
moveTo(102, 195, 2);
playSound(5, 3);
playSound(75, 12);
@@ -4020,131 +4882,59 @@ bool TeenAgentEngine::processCallback(uint16 addr) {
{
Walkbox *w = scene->getWalkbox(0);
w->rect.left = 0;
- w->rect.bottom = 199;
+ w->rect.bottom = kScreenHeight-1;
w->save();
}
setLan(1, 0xff);
- Dialog::showMark(scene, 0x58a9);
+ dialog->showMark(130, scene);
Object *obj = scene->getObject(1);
- obj->actor_rect.left = obj->actor_rect.right = 270;
- obj->actor_rect.top = obj->actor_rect.bottom = 193;
- obj->actor_orientation = 2;
+ obj->actorRect.left = obj->actorRect.right = 270;
+ obj->actorRect.top = obj->actorRect.bottom = 193;
+ obj->actorOrientation = 2;
obj->save();
obj = scene->getObject(3);
- obj->actor_rect.left = obj->actor_rect.right = 254;
- obj->actor_rect.top = obj->actor_rect.bottom = 193;
- obj->actor_orientation = 1;
+ obj->actorRect.left = obj->actorRect.right = 254;
+ obj->actorRect.top = obj->actorRect.bottom = 193;
+ obj->actorOrientation = 1;
obj->save();
- SET_FLAG(0xDBD7, 1);
+ SET_FLAG(dsAddr_MansionThruFanByTimePillFlag, 1);
}
- return true;
+ break;
- case 0x9d45: {
- wait(50);
- byte attempts = ++ *(res->dseg.ptr(0xDBEA));
- debug(0, "mansion intrusion attempt #%u", attempts);
- if (attempts >= 7)
- return false;
+ case csAddr_mansionIntrusionAttempt:
+ retVal = fnMansionIntrusionAttempt();
+ break;
- uint16 ptr = res->dseg.get_word((attempts - 2) * 2 + 0x6035);
- debug(0, "mansion callback = %04x", ptr);
- byte id = scene->getId();
+ case csAddr_secondMansionIntrusion:
+ fnSecondMansionIntrusion();
+ break;
- playMusic(11);
- displayCutsceneMessage(0x580a, 30484);
- processCallback(ptr);
- playMusic(6);
- if (getFlag(0xdbec) != 1 || ptr != 0x9f3e) //ptr check eq. scene_id == 11
- loadScene(id, scene->getPosition());
- return true;
- }
+ case csAddr_thirdMansionIntrusion:
+ fnThirdMansionIntrusion();
+ break;
- case 0x9d90:
- hideActor();
- loadScene(34, scene->getPosition());
- playAnimation(986, 0, true);
- playAnimation(987, 1, true);
- waitAnimation();
- Dialog::show(scene, 0x6f60, 988, 989, 0xd9, 0xd0, 1, 2);
- playAnimation(990, 0, true);
- playAnimation(991, 1, true);
- waitAnimation();
- showActor();
- return true;
-
- case 0x9de5:
- hideActor();
- loadScene(30, scene->getPosition());
- playAnimation(887, 1);
- playAnimation(888, 2, true, true, true);
- //waitAnimation();
- Dialog::showMono(scene, 0x6fb8, 889, 0xd9, 2);
- playSound(26, 3);
- playAnimation(891, 1, true, true, true);
- playAnimation(892, 2);
- waitAnimation();
- Dialog::show(scene, 0x6ff0, 890, 889, 0xd0, 0xd9, 3, 2);
- showActor();
- return true;
-
- case 0x9e54:
- hideActor();
- loadScene(32, scene->getPosition());
- playAnimation(894, 1, true, true, true);
- playAnimation(893, 2, true);
- waitAnimation();
- Dialog::showMono(scene, 0x706e, 895, 0xd9, 3);
- playSound(75, 9);
- playAnimation(898, 1, true);
- playAnimation(897, 2, true);
- Dialog::show(scene, 0x7096, 896, 895, 0xd0, 0xd9, 2, 3);
- showActor();
- return true;
+ case csAddr_fourthMansionIntrusion:
+ fnFourthMansionIntrusion();
+ break;
- case 0x9ec3:
- hideActor();
- loadScene(29, scene->getPosition());
- playActorAnimation(901, true);
- playAnimation(900, 1, true);
- waitAnimation();
- Dialog::show(scene, 0x7161, 903, 902, 0xd0, 0xd9, 2, 3);
- for (byte i = 3; i <= 9; i += 2)
- playSound(56, i);
+ case csAddr_fifthMansionIntrusion:
+ fnFifthMansionIntrusion();
+ break;
- playActorAnimation(905, true);
- playAnimation(904, 1, true);
- Dialog::show(scene, 0x71c6, 903, 902, 0xd0, 0xd9, 2, 3);
- showActor();
- return true;
+ case csAddr_sixthMansionIntrusion:
+ fnSixthMansionIntrusion();
+ break;
- case 0x9f3e:
- hideActor();
- loadScene(35, scene->getPosition());
- playAnimation(907, 2, true);
- playAnimation(906, 3, true);
- waitAnimation();
- Dialog::show(scene, 0x7243, 908, 909, 0xd9, 0xd0, 2, 3);
- Dialog::show(scene, 0x7318, 910, 908, 0xd0, 0xd9, 3, 2);
- loadScene(11, scene->getPosition());
- showActor();
- setOns(3, 51);
- playAnimation(911, 1);
- playAnimation(899, 1);
- setFlag(0xDBEC, 1);
- reloadLan();
- wait(200);
- enableObject(8);
- setLan(2, 8);
- return true;
+ default:
+ error("unknown callback 0x%04x called", addr);
+ break;
}
- //error("invalid callback %04x called", addr);
- warning("invalid callback %04x called", addr);
- return true;
+ return retVal;
}
} // End of namespace TeenAgent
diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp
index 2de6f49c44..f9f5d2f13a 100644
--- a/engines/teenagent/detection.cpp
+++ b/engines/teenagent/detection.cpp
@@ -26,6 +26,7 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+#include "teenagent/resources.h"
#include "teenagent/teenagent.h"
#include "graphics/thumbnail.h"
@@ -52,7 +53,7 @@ static const ADGameDescription teenAgentGameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -72,7 +73,7 @@ static const ADGameDescription teenAgentGameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::CZ_CZE,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -168,7 +169,7 @@ public:
Common::String desc = buf;
- in->seek(0x777a);
+ in->seek(TeenAgent::saveStateSize);
if (!Graphics::checkThumbnailHeader(*in))
return SaveStateDescriptor(slot, desc);
diff --git a/engines/teenagent/dialog.cpp b/engines/teenagent/dialog.cpp
index 400bd7cec2..870aca6400 100644
--- a/engines/teenagent/dialog.cpp
+++ b/engines/teenagent/dialog.cpp
@@ -22,99 +22,103 @@
#include "teenagent/dialog.h"
#include "teenagent/resources.h"
#include "teenagent/scene.h"
+#include "teenagent/teenagent.h"
namespace TeenAgent {
+void Dialog::show(uint16 dialogNum, Scene *scene, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2) {
+ uint16 addr = _vm->res->getDialogAddr(dialogNum);
+ // WORKAROUND: For Dialog 163, The usage of this in the engine overlaps the previous dialog i.e. the
+ // starting offset used is two bytes early, thus implicitly changing the first command of this dialog
+ // from NEW_LINE to CHANGE_CHARACTER.
+ // FIXME: Unsure if this is correct behaviour or if this is a regression from the original. Check this.
+ // Similar issue occurs with Dialog 190 which is used from dialogue stack at 0x7403, rather than start of 0x7405
+ // Similar issue occurs with Dialog 0 which is used from dialogue stack at 0x0001, rather than start of 0x0000
+ if (dialogNum == 163)
+ addr -= 2;
+ show(scene, addr, animation1, animation2, color1, color2, slot1, slot2);
+}
+
void Dialog::show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2) {
- debug(0, "Dialog::show(%04x, %u:%u, %u:%u)", addr, slot1, animation1, slot2, animation2);
- Resources *res = Resources::instance();
+ debugC(0, kDebugDialog, "Dialog::show(%04x, %u:%u, %u:%u)", addr, slot1, animation1, slot2, animation2);
int n = 0;
Common::String message;
byte color = color1;
if (animation1 != 0) {
- SceneEvent e(SceneEvent::kPlayAnimation);
- e.animation = animation1;
- e.slot = 0xc0 | slot1; //looped, paused
- scene->push(e);
+ SceneEvent e1(SceneEvent::kPlayAnimation);
+ e1.animation = animation1;
+ e1.slot = 0xc0 | slot1; //looped, paused
+ scene->push(e1);
}
if (animation2 != 0) {
- SceneEvent e(SceneEvent::kPlayAnimation);
- e.animation = animation2;
- e.slot = 0xc0 | slot2; //looped, paused
- scene->push(e);
+ SceneEvent e2(SceneEvent::kPlayAnimation);
+ e2.animation = animation2;
+ e2.slot = 0xc0 | slot2; //looped, paused
+ scene->push(e2);
}
while (n < 4) {
- byte c = res->eseg.get_byte(addr++);
- //debug(0, "%02x: %c", c, c > 0x20? c: '.');
+ byte c = _vm->res->eseg.get_byte(addr++);
+ debugC(1, kDebugDialog, "%02x: %c", c, c > 0x20? c: '.');
switch (c) {
case 0:
++n;
switch (n) {
case 1:
- //debug(0, "new line\n");
+ debugC(1, kDebugDialog, "new line\n");
if (!message.empty())
message += '\n';
break;
case 2:
- //debug(0, "displaymessage %s", message.c_str());
+ debugC(1, kDebugDialog, "displaymessage %s", message.c_str());
if (color == color2) {
//pause animation in other slot
- {
- SceneEvent e(SceneEvent::kPauseAnimation);
- e.slot = 0x80 | slot1;
- scene->push(e);
- }
- {
- SceneEvent e(SceneEvent::kPlayAnimation);
- e.animation = animation2;
- e.slot = 0x80 | slot2;
- scene->push(e);
- }
+ SceneEvent e1(SceneEvent::kPauseAnimation);
+ e1.slot = 0x80 | slot1;
+ scene->push(e1);
+
+ SceneEvent e2(SceneEvent::kPlayAnimation);
+ e2.animation = animation2;
+ e2.slot = 0x80 | slot2;
+ scene->push(e2);
} else if (color == color1) {
//pause animation in other slot
- {
- SceneEvent e(SceneEvent::kPauseAnimation);
- e.slot = 0x80 | slot2;
- scene->push(e);
- }
- {
- SceneEvent e(SceneEvent::kPlayAnimation);
- e.animation = animation1;
- e.slot = 0x80 | slot1;
- scene->push(e);
- }
- }
+ SceneEvent e2(SceneEvent::kPauseAnimation);
+ e2.slot = 0x80 | slot2;
+ scene->push(e2);
- {
- message.trim();
- if (message.empty())
- break;
+ SceneEvent e1(SceneEvent::kPlayAnimation);
+ e1.animation = animation1;
+ e1.slot = 0x80 | slot1;
+ scene->push(e1);
+ }
- SceneEvent e(SceneEvent::kMessage);
- e.message = message;
- e.color = color;
+ message.trim();
+ if (!message.empty()) {
+ SceneEvent em(SceneEvent::kMessage);
+ em.message = message;
+ em.color = color;
if (color == color1)
- e.slot = slot1;
+ em.slot = slot1;
if (color == color2)
- e.slot = slot2;
- scene->push(e);
+ em.slot = slot2;
+ scene->push(em);
message.clear();
}
break;
case 3:
- color = color == color1 ? color2 : color1;
- //debug(0, "changing color to %02x", color);
+ color = (color == color1) ? color2 : color1;
+ debugC(1, kDebugDialog, "changing color to %02x", color);
break;
}
break;
case 0xff: {
- //fixme : wait for the next cycle of the animation
+ //FIXME : wait for the next cycle of the animation
}
break;
@@ -124,21 +128,20 @@ void Dialog::show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation
}
}
- SceneEvent e(SceneEvent::kClearAnimations);
- scene->push(e);
+ SceneEvent ec(SceneEvent::kClearAnimations);
+ scene->push(ec);
}
uint16 Dialog::pop(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2) {
- debug(0, "Dialog::pop(%04x, %u:%u, %u:%u)", addr, slot1, animation1, slot2, animation2);
- Resources *res = Resources::instance();
+ debugC(0, kDebugDialog, "Dialog::pop(%04x, %u:%u, %u:%u)", addr, slot1, animation1, slot2, animation2);
uint16 next;
do {
- next = res->dseg.get_word(addr);
+ next = _vm->res->dseg.get_word(addr);
addr += 2;
} while (next == 0);
- uint16 next2 = res->dseg.get_word(addr);
+ uint16 next2 = _vm->res->dseg.get_word(addr);
if (next2 != 0xffff)
- res->dseg.set_word(addr - 2, 0);
+ _vm->res->dseg.set_word(addr - 2, 0);
show(scene, next, animation1, animation2, color1, color2, slot1, slot2);
return next;
}
diff --git a/engines/teenagent/dialog.h b/engines/teenagent/dialog.h
index 3bb7d818c1..6672ce7206 100644
--- a/engines/teenagent/dialog.h
+++ b/engines/teenagent/dialog.h
@@ -27,20 +27,59 @@
namespace TeenAgent {
+// Text Color Symbols
+enum {
+ textColorJohnNoty = 0xd0,
+ textColorCampGuard = 0xd0,
+ textColorShockedCaptain = 0xd0,
+ textColorMark = 0xd1,
+ textColorCredits = 0xd1,
+ textColorBankGuard = 0xd7,
+ textColorGrandpa = 0xd8,
+ textColorMansionGuard = 0xd9,
+ textColorMarkEnd = 0xe3,
+ textColorProfessor = 0xe5,
+ textColorOldLady = 0xe5,
+ textColorAnne = 0xe5,
+ textColorWellEcho = 0xe5,
+ textColorSonny = 0xe5,
+ textColorEskimo = 0xe5,
+ textColorRGBBoss = 0xe7,
+ textColorGoldDriver = 0xe7,
+ textColorFortuneTeller = 0xeb,
+ textColorCaptain = 0xec,
+ textColorMike = 0xef,
+ textColorCook = 0xef,
+ textColorBarman = 0xef
+};
+
class Scene;
+class TeenAgentEngine;
+
class Dialog {
public:
- static uint16 pop(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2);
- static uint16 popMark(Scene *scene, uint16 addr) {
- return pop(scene, addr, 0, 0, 0xd1, 0xd1, 0, 0);
+ Dialog(TeenAgentEngine *vm) : _vm(vm) { }
+
+ uint16 pop(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2);
+
+ uint16 popMark(Scene *scene, uint16 addr) {
+ return pop(scene, addr, 0, 0, textColorMark, textColorMark, 0, 0);
}
- static void show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2);
- static void showMono(Scene *scene, uint16 addr, uint16 animation, byte color, byte slot) {
- show(scene, addr, animation, animation, color, color, slot, slot);
+
+ void show(uint16 dialogNum, Scene *scene, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2);
+
+ void showMono(uint16 dialogNum, Scene *scene, uint16 animation, byte color, byte slot) {
+ show(dialogNum, scene, animation, animation, color, color, slot, slot);
}
- static void showMark(Scene *scene, uint16 addr) {
- show(scene, addr, 0, 0, 0xd1, 0xd1, 0, 0);
+
+ void showMark(uint16 dialogNum, Scene *scene) {
+ show(dialogNum, scene, 0, 0, textColorMark, textColorMark, 0, 0);
}
+
+private:
+ TeenAgentEngine *_vm;
+
+ void show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2);
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index f7558b60f2..47f52ff90f 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -20,8 +20,10 @@
*/
#include "teenagent/font.h"
+
#include "teenagent/pack.h"
-#include "common/debug.h"
+#include "teenagent/teenagent.h"
+
#include "common/endian.h"
#include "common/stream.h"
#include "common/textconsole.h"
@@ -30,34 +32,41 @@
namespace TeenAgent {
-Font::Font() : grid_color(0xd0), shadow_color(0), height(0), width_pack(0), data(0) {
+Font::Font() : _gridColor(0xd0), _shadowColor(0), _height(0), _widthPack(0), _data(0) {
+}
+
+Font::~Font() {
+ delete[] _data;
}
-void Font::load(const Pack &pack, int id) {
- delete[] data;
- data = NULL;
+void Font::load(const Pack &pack, int id, byte height, byte widthPack) {
+ delete[] _data;
+ _data = NULL;
Common::ScopedPtr<Common::SeekableReadStream> s(pack.getStream(id));
if (!s)
error("loading font %d failed", id);
- data = new byte[s->size()];
- s->read(data, s->size());
- debug(0, "font size: %d", s->size());
+ _data = new byte[s->size()];
+ s->read(_data, s->size());
+ debugC(0, kDebugFont, "font size: %d", s->size());
+
+ _height = height;
+ _widthPack = widthPack;
}
uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color) {
unsigned idx = (unsigned char)c;
if (idx < 0x20 || idx >= 0x81) {
- debug(0, "unhandled char 0x%02x", idx);
+ debugC(0, kDebugFont, "unhandled char 0x%02x", idx);
return 0;
}
idx -= 0x20;
- byte *glyph = data + READ_LE_UINT16(data + idx * 2);
+ byte *glyph = _data + READ_LE_UINT16(_data + idx * 2);
int h = glyph[0], w = glyph[1];
- if (surface == NULL || surface->pixels == NULL || y + h <= 0 || y >= 200 || x + w <= 0 || x >= 320)
- return w - width_pack;
+ if (surface == NULL || surface->pixels == NULL || y + h <= 0 || y >= kScreenHeight || x + w <= 0 || x >= kScreenWidth)
+ return w - _widthPack;
int i0 = 0, j0 = 0;
if (x < 0) {
@@ -68,7 +77,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color)
i0 = -y;
y = 0;
}
- //debug(0, "char %c, width: %dx%d", c, w, h);
+ debugC(0, kDebugFont, "char %c, width: %dx%d", c, w, h);
glyph += 2;
glyph += i0 * w + j0;
byte *dst = (byte *)surface->getBasePtr(x, y);
@@ -80,7 +89,7 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color)
case 0:
break;
case 1:
- dst[j] = shadow_color;
+ dst[j] = _shadowColor;
break;
case 2:
dst[j] = color;
@@ -91,57 +100,57 @@ uint Font::render(Graphics::Surface *surface, int x, int y, char c, byte color)
}
dst += surface->pitch;
}
- return w - width_pack;
+ return w - _widthPack;
}
-static uint find_in_str(const Common::String &str, char c, uint pos = 0) {
+static uint findInStr(const Common::String &str, char c, uint pos = 0) {
while (pos < str.size() && str[pos] != c) ++pos;
return pos;
}
-uint Font::render(Graphics::Surface *surface, int x, int y, const Common::String &str, byte color, bool show_grid) {
+uint Font::render(Graphics::Surface *surface, int x, int y, const Common::String &str, byte color, bool showGrid) {
if (surface != NULL) {
- uint max_w = render(NULL, 0, 0, str, false);
- if (show_grid)
- grid(surface, x - 4, y - 2, max_w + 8, 8 + 6, grid_color);
+ uint maxW = render(NULL, 0, 0, str, false);
+ if (showGrid)
+ grid(surface, x - 4, y - 2, maxW + 8, 8 + 6, _gridColor);
uint i = 0, j;
do {
- j = find_in_str(str, '\n', i);
+ j = findInStr(str, '\n', i);
Common::String line(str.c_str() + i, j - i);
- //debug(0, "line: %s", line.c_str());
+ debugC(0, kDebugFont, "line: %s", line.c_str());
- if (y + (int)height >= 0) {
+ if (y + (int)_height >= 0) {
uint w = render(NULL, 0, 0, line, false);
- int xp = x + (max_w - w) / 2;
+ int xp = x + (maxW - w) / 2;
for (uint k = 0; k < line.size(); ++k) {
xp += render(surface, xp, y, line[k], color);
}
- } else if (y >= 200)
+ } else if (y >= kScreenHeight)
break;
- y += height;
+ y += _height;
i = j + 1;
} while (i < str.size());
- return max_w;
+ return maxW;
} else {
- //surface == NULL;
- uint w = 0, max_w = 0;
+ // surface == NULL;
+ uint w = 0, maxW = 0;
for (uint i = 0; i < str.size(); ++i) {
char c = str[i];
if (c == '\n') {
- y += height;
- if (w > max_w)
- max_w = w;
+ y += _height;
+ if (w > maxW)
+ maxW = w;
w = 0;
continue;
}
w += render(NULL, 0, 0, c, color);
}
- if (w > max_w)
- max_w = w;
+ if (w > maxW)
+ maxW = w;
- return max_w;
+ return maxW;
}
}
@@ -156,8 +165,4 @@ void Font::grid(Graphics::Surface *surface, int x, int y, int w, int h, byte col
}
}
-Font::~Font() {
- delete[] data;
-}
-
} // End of namespace TeenAgent
diff --git a/engines/teenagent/font.h b/engines/teenagent/font.h
index 5146ace21f..a61f145fa6 100644
--- a/engines/teenagent/font.h
+++ b/engines/teenagent/font.h
@@ -28,20 +28,24 @@
namespace TeenAgent {
class Pack;
+
class Font {
public:
- byte grid_color, shadow_color;
- byte height, width_pack;
-
Font();
- void load(const Pack &pack, int id);
- uint render(Graphics::Surface *surface, int x, int y, const Common::String &str, byte color, bool grid = false);
+ ~Font();
+
+ void load(const Pack &pack, int id, byte height, byte widthPack);
+ uint render(Graphics::Surface *surface, int x, int y, const Common::String &str, byte color, bool showGrid = false);
uint render(Graphics::Surface *surface, int x, int y, char c, byte color);
static void grid(Graphics::Surface *surface, int x, int y, int w, int h, byte color);
- ~Font();
+ byte getHeight() { return _height; }
+ void setShadowColor(byte color) { _shadowColor = color; }
private:
- byte *data;
+ byte *_data;
+
+ byte _gridColor, _shadowColor;
+ byte _height, _widthPack;
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 59dd44baa3..354371666c 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -24,6 +24,7 @@
#include "common/textconsole.h"
#include "teenagent/inventory.h"
+
#include "teenagent/resources.h"
#include "teenagent/objects.h"
#include "teenagent/teenagent.h"
@@ -31,47 +32,44 @@
namespace TeenAgent {
-Inventory::Inventory(TeenAgentEngine *engine) {
- _engine = engine;
+Inventory::Inventory(TeenAgentEngine *vm) : _vm(vm) {
_active = false;
FilePack varia;
varia.open("varia.res");
- {
- Common::ScopedPtr<Common::SeekableReadStream> s(varia.getStream(3));
- if (!s)
- error("no inventory background");
- debug(0, "loading inventory background...");
- _background.load(*s, Surface::kTypeOns);
- }
+ Common::ScopedPtr<Common::SeekableReadStream> s(varia.getStream(3));
+ if (!s)
+ error("no inventory background");
+ debugC(0, kDebugInventory, "loading inventory background...");
+ _background.load(*s, Surface::kTypeOns);
- uint32 items_size = varia.getSize(4);
- if (items_size == 0)
+ uint32 itemsSize = varia.getSize(4);
+ if (itemsSize == 0)
error("invalid inventory items size");
- debug(0, "loading items, size: %u", items_size);
- _items = new byte[items_size];
- varia.read(4, _items, items_size);
+ debugC(0, kDebugInventory, "loading items, size: %u", itemsSize);
+ _items = new byte[itemsSize];
+ varia.read(4, _items, itemsSize);
byte offsets = _items[0];
- assert(offsets == 92);
+ assert(offsets == kNumInventoryItems);
for (byte i = 0; i < offsets; ++i) {
_offset[i] = READ_LE_UINT16(_items + i * 2 + 1);
}
- _offset[92] = items_size;
+ _offset[kNumInventoryItems] = itemsSize;
- Resources *res = Resources::instance();
- for (byte i = 0; i <= 92; ++i) {
+ InventoryObject ioBlank;
+ _objects.push_back(ioBlank);
+ for (byte i = 0; i < kNumInventoryItems; ++i) {
InventoryObject io;
- uint16 obj_addr = res->dseg.get_word(0xc4a4 + i * 2);
- if (obj_addr != 0)
- io.load(res->dseg.ptr(obj_addr));
+ uint16 objAddr = vm->res->dseg.get_word(dsAddr_inventoryItemDataPtrTable + i * 2);
+ io.load(vm->res->dseg.ptr(objAddr));
_objects.push_back(io);
}
- _inventory = res->dseg.ptr(0xc48d);
+ _inventory = vm->res->dseg.ptr(dsAddr_inventory);
- for (int y = 0; y < 4; ++y)
+ for (int y = 0; y < 4; ++y) {
for (int x = 0; x < 6; ++x) {
int i = y * 6 + x;
_graphics[i]._rect.left = 28 + 45 * x - 1;
@@ -79,6 +77,7 @@ Inventory::Inventory(TeenAgentEngine *engine) {
_graphics[i]._rect.right = _graphics[i]._rect.left + 40;
_graphics[i]._rect.bottom = _graphics[i]._rect.top + 26;
}
+ }
varia.close();
_hoveredObj = _selectedObj = NULL;
@@ -89,7 +88,7 @@ Inventory::~Inventory() {
}
bool Inventory::has(byte item) const {
- for (int i = 0; i < 24; ++i) {
+ for (int i = 0; i < kInventorySize; ++i) {
if (_inventory[i] == item)
return true;
}
@@ -97,34 +96,34 @@ bool Inventory::has(byte item) const {
}
void Inventory::remove(byte item) {
- debug(0, "removing %u from inventory", item);
+ debugC(0, kDebugInventory, "removing %u from inventory", item);
int i;
- for (i = 0; i < 24; ++i) {
+ for (i = 0; i < kInventorySize; ++i) {
if (_inventory[i] == item) {
break;
}
}
- for (; i < 23; ++i) {
+ for (; i < (kInventorySize - 1); ++i) {
_inventory[i] = _inventory[i + 1];
_graphics[i].free();
}
- _inventory[23] = 0;
- _graphics[23].free();
+ _inventory[kInventorySize - 1] = kInvItemNoItem;
+ _graphics[kInventorySize - 1].free();
}
void Inventory::clear() {
- debug(0, "clearing inventory");
- for (int i = 0; i < 24; ++i) {
- _inventory[i] = 0;
+ debugC(0, kDebugInventory, "clearing inventory");
+ for (int i = 0; i < kInventorySize; ++i) {
+ _inventory[i] = kInvItemNoItem;
_graphics[i].free();
}
}
void Inventory::reload() {
- for (int i = 0; i < 24; ++i) {
+ for (int i = 0; i < kInventorySize; ++i) {
_graphics[i].free();
uint item = _inventory[i];
- if (item != 0)
+ if (item != kInvItemNoItem)
_graphics[i].load(this, item);
}
}
@@ -132,9 +131,9 @@ void Inventory::reload() {
void Inventory::add(byte item) {
if (has(item))
return;
- debug(0, "adding %u to inventory", item);
- for (int i = 0; i < 24; ++i) {
- if (_inventory[i] == 0) {
+ debugC(0, kDebugInventory, "adding %u to inventory", item);
+ for (int i = 0; i < kInventorySize; ++i) {
+ if (_inventory[i] == kInvItemNoItem) {
_inventory[i] = item;
return;
}
@@ -143,13 +142,14 @@ void Inventory::add(byte item) {
}
bool Inventory::tryObjectCallback(InventoryObject *obj) {
- byte id = obj->id;
- uint i = 0;
- for (byte *table = Resources::instance()->dseg.ptr(0xBB6F + 3); table[0] != 0 && i < 7; table += 3, ++i) {
- if (table[0] == id) {
+ byte objId = obj->id;
+ for (uint i = 0; i < 7; ++i) {
+ byte tableId = _vm->res->dseg.get_byte(dsAddr_objCallbackTablePtr + (3 * i));
+ uint16 callbackAddr = _vm->res->dseg.get_word(dsAddr_objCallbackTablePtr + (3 * i) + 1);
+ if (tableId == objId) {
resetSelectedObject();
activate(false);
- if (_engine->processCallback(READ_LE_UINT16(table + 1)))
+ if (_vm->processCallback(callbackAddr))
return true;
}
}
@@ -157,8 +157,6 @@ bool Inventory::tryObjectCallback(InventoryObject *obj) {
}
bool Inventory::processEvent(const Common::Event &event) {
- Resources *res = Resources::instance();
-
switch (event.type) {
case Common::EVENT_MOUSEMOVE:
@@ -178,9 +176,9 @@ bool Inventory::processEvent(const Common::Event &event) {
_mouse = event.mouse;
_hoveredObj = NULL;
- for (int i = 0; i < 24; ++i) {
+ for (int i = 0; i < kInventorySize; ++i) {
byte item = _inventory[i];
- if (item == 0)
+ if (item == kInvItemNoItem)
continue;
_graphics[i]._hovered = _graphics[i]._rect.in(_mouse);
@@ -197,14 +195,14 @@ bool Inventory::processEvent(const Common::Event &event) {
if (_hoveredObj == NULL)
return true;
- debug(0, "lclick on %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
+ debugC(0, kDebugInventory, "lclick on %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
if (_selectedObj == NULL) {
if (tryObjectCallback(_hoveredObj))
return true;
//activate(false);
- int w = res->font7.render(NULL, 0, 0, _hoveredObj->description, 0xd1);
- _engine->scene->displayMessage(_hoveredObj->description, 0xd1, Common::Point((320 - w) / 2, 162));
+ int w = _vm->res->font7.render(NULL, 0, 0, _hoveredObj->description, textColorMark);
+ _vm->scene->displayMessage(_hoveredObj->description, textColorMark, Common::Point((kScreenWidth - w) / 2, 162));
return true;
}
@@ -213,30 +211,27 @@ bool Inventory::processEvent(const Common::Event &event) {
if (id1 == id2)
return true;
- debug(0, "combine(%u, %u)!", id1, id2);
- byte *table = res->dseg.ptr(0xC335);
+ debugC(0, kDebugInventory, "combine(%u, %u)!", id1, id2);
+ byte *table = _vm->res->dseg.ptr(dsAddr_objCombiningTablePtr);
while (table[0] != 0 && table[1] != 0) {
- if (
- (id1 == table[0] && id2 == table[1]) ||
- (id2 == table[0] && id1 == table[1])
- ) {
- byte new_obj = table[2];
- if (new_obj != 0) {
+ if ((id1 == table[0] && id2 == table[1]) || (id2 == table[0] && id1 == table[1])) {
+ byte newObj = table[2];
+ if (newObj != 0) {
remove(id1);
remove(id2);
- debug(0, "adding object %u", new_obj);
- add(new_obj);
- _engine->playSoundNow(69);
+ debugC(0, kDebugInventory, "adding object %u", newObj);
+ add(newObj);
+ _vm->playSoundNow(69);
}
uint16 msg = READ_LE_UINT16(table + 3);
- _engine->displayMessage(msg);
+ _vm->displayMessage(msg);
activate(false);
resetSelectedObject();
return true;
}
table += 5;
}
- _engine->displayMessage(0xc3e2);
+ _vm->displayMessage(dsAddr_objCombineErrorMsg);
activate(false);
resetSelectedObject();
return true;
@@ -247,14 +242,15 @@ bool Inventory::processEvent(const Common::Event &event) {
return false;
if (_hoveredObj != NULL) {
- debug(0, "rclick object %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
- if (_hoveredObj->id != 51 && tryObjectCallback(_hoveredObj)) //do not process callback for banknote on r-click
+ debugC(0, kDebugInventory, "rclick object %u:%s", _hoveredObj->id, _hoveredObj->name.c_str());
+ // do not process callback for banknote on r-click
+ if (_hoveredObj->id != kInvItemBanknote && tryObjectCallback(_hoveredObj))
return true;
}
_selectedObj = _hoveredObj;
if (_selectedObj)
- debug(0, "selected object %s", _selectedObj->name.c_str());
+ debugC(0, kDebugInventory, "selected object %s", _selectedObj->name.c_str());
return true;
case Common::EVENT_KEYDOWN:
@@ -262,7 +258,7 @@ bool Inventory::processEvent(const Common::Event &event) {
activate(false);
return true;
}
- if (event.kbd.keycode == Common::KEYCODE_RETURN) { //triangle button on psp
+ if (event.kbd.keycode == Common::KEYCODE_RETURN) {
activate(!_active);
return true;
}
@@ -277,7 +273,6 @@ bool Inventory::processEvent(const Common::Event &event) {
}
}
-
void Inventory::Item::free() {
_animation.free();
_surface.free();
@@ -294,30 +289,29 @@ void Inventory::Item::backgroundEffect(Graphics::Surface *s) {
}
}
-void Inventory::Item::load(Inventory *inventory, uint item_id) {
- InventoryObject *obj = &inventory->_objects[item_id];
+void Inventory::Item::load(Inventory *inventory, uint itemId) {
+ InventoryObject *obj = &inventory->_objects[itemId];
if (obj->animated) {
if (_animation.empty()) {
- debug(0, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
+ debugC(0, kDebugInventory, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
Common::MemoryReadStream s(inventory->_items + inventory->_offset[obj->id - 1], inventory->_offset[obj->id] - inventory->_offset[obj->id - 1]);
_animation.load(s, Animation::kTypeInventory);
}
} else {
if (_surface.empty()) {
- debug(0, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
+ debugC(0, kDebugInventory, "loading item %d from offset %x", obj->id, inventory->_offset[obj->id - 1]);
Common::MemoryReadStream s(inventory->_items + inventory->_offset[obj->id - 1], inventory->_offset[obj->id] - inventory->_offset[obj->id - 1]);
_surface.load(s, Surface::kTypeOns);
}
}
}
-void Inventory::Item::render(Inventory *inventory, uint item_id, Graphics::Surface *dst, int delta) {
- InventoryObject *obj = &inventory->_objects[item_id];
- Resources *res = Resources::instance();
+void Inventory::Item::render(Inventory *inventory, uint itemId, Graphics::Surface *dst, int delta) {
+ InventoryObject *obj = &inventory->_objects[itemId];
backgroundEffect(dst);
_rect.render(dst, _hovered ? 233 : 234);
- load(inventory, item_id);
+ load(inventory, itemId);
if (obj->animated) {
if (_hovered) {
Surface *s = _animation.currentFrame(delta);
@@ -342,15 +336,16 @@ void Inventory::Item::render(Inventory *inventory, uint item_id, Graphics::Surfa
if (inventory->_selectedObj != inventory->_hoveredObj)
name += obj->name;
- if (_hovered && inventory->_engine->scene->getMessage().empty()) {
- int w = res->font7.render(NULL, 0, 0, name, 0xd1, true);
- res->font7.render(dst, (320 - w) / 2, 180, name, 0xd1, true);
+ if (_hovered && inventory->_vm->scene->getMessage().empty()) {
+ int w = inventory->_vm->res->font7.render(NULL, 0, 0, name, textColorMark, true);
+ inventory->_vm->res->font7.render(dst, (kScreenWidth - w) / 2, 180, name, textColorMark, true);
}
}
void Inventory::render(Graphics::Surface *surface, int delta) {
if (!_active)
return;
+ debugC(0, kDebugInventory, "Inventory::render()");
_background.render(surface);
@@ -358,11 +353,10 @@ void Inventory::render(Graphics::Surface *surface, int delta) {
for (int x = 0; x < 6; x++) {
int idx = x + 6 * y;
byte item = _inventory[idx];
- if (item == 0)
- continue;
-
- //debug(0, "%d,%d -> %u", x0, y0, item);
- _graphics[idx].render(this, item, surface, delta);
+ if (item != 0) {
+ debugC(0, kDebugInventory, "\t(x, y): %d,%d -> item: %u", x, y, item);
+ _graphics[idx].render(this, item, surface, delta);
+ }
}
}
}
diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h
index 61e5364542..d487848c2c 100644
--- a/engines/teenagent/inventory.h
+++ b/engines/teenagent/inventory.h
@@ -33,9 +33,112 @@ namespace TeenAgent {
struct InventoryObject;
class TeenAgentEngine;
+// Maximum number of items found within game
+const uint8 kNumInventoryItems = 92;
+
+// Inventory Item Ids
+enum {
+ kInvItemNoItem = 0, // No item i.e. empty inventory slot
+ kInvItemFeather = 1,
+ kInvItemShotgun = 2,
+ kInvItemToolboxFull = 3, // Contains Car Jack and Spanner
+ kInvItemToolboxHalfEmpty = 4, // Contains Spanner
+ kInvItemSpanner = 5,
+ kInvItemComb = 6,
+ kInvItemFan = 7,
+ kInvItemBrokenPaddle = 8,
+ kInvItemPaddle = 9, // Repaired - BrokenPaddle combined with Branch (with Glue)
+ kInvItemFirstFlower = 10, // Smells nice
+ kInvItemSecondFlower = 11, // Really beautiful
+ kInvItemFeatherDusterClean = 12,
+ kInvItemChainsaw = 13, // Unfueled
+ kInvItemDrunkenChainsaw = 14, // Fueled with Whisky (Chainsaw combined with Whiskey)
+ kInvItemBranch = 15,
+ kInvItemWhisky = 16,
+ kInvItemNeedle = 17,
+ kInvItemWrapper = 18,
+ kInvItemChocCandy = 19,
+ kInvItemPotato = 20,
+ kInvItemRakeBroken = 21,
+ kInvItemHeartShapedCandy = 22,
+ kInvItemWrappedCandy = 23, // HeartShapedCandy combined with Wrapper
+ kInvItemRibbon = 24,
+ kInvItemRakeFixed = 25, // Rake combined with Ribbon
+ kInvItemNut = 26,
+ kInvItemPlasticApple = 27,
+ kInvItemCone = 28,
+ kInvItemSuperGlue = 29,
+ kInvItemConeAndNeedle = 30, // Cone combined with Needle
+ kInvItemConeAndFeather = 31, // Cone combined with Feather
+ kInvItemDart = 32, // Needle combined with ConeAndFeather or Feather combined with ConeAndNeedle
+ kInvItemFeatherDusterDirty = 33,
+ kInvItemPaintedPotato = 34, // Potato combined with Dirty Feather Duster (Soot)
+ kInvItemCarJack = 35,
+ kInvItemBone = 36,
+ kInvItemShovelAct2 = 37,
+ kInvItemRopeAct2 = 38,
+ kInvItemMask = 39,
+ kInvItemFins = 40,
+ kInvItemDiveEquipment = 41, // Mask combined with Fins
+ kInvItemAnchor = 42,
+ kInvItemGrapplingHook = 43,
+ kInvItemSickleBlunt = 44,
+ kInvItemCheese = 45,
+ kInvItemSickleSharp = 46,
+ kInvItemHandkerchief = 47,
+ kInvItemMouse = 48,
+ kInvItemRock = 49,
+ kInvItemNugget = 50,
+ kInvItemBanknote = 51,
+ kInvItemDictaphoneNoBatteries = 52,
+ kInvItemPolaroidCamera = 53,
+ kInvItemVideoTape = 54,
+ kInvItemSheetOfPaper = 55,
+ kInvItemCognac = 56,
+ kInvItemRemoteControl = 57,
+ kInvItemIceTongs = 58,
+ kInvItemCork = 59,
+ kInvItemWrappedCork = 60, // Cork combined with Sheet Of Paper
+ kInvItemPhoto = 61,
+ kInvItemChilliWithLabel = 62,
+ kInvItemPastryRoller = 63,
+ kInvItemFakeChilli = 64,
+ kInvItemLabel = 65,
+ kInvItemBatteries = 66,
+ kInvItemDictaphoneWithBatteries = 67, // Dictaphone combined with Batteries
+ kInvItemBurningPaper = 68,
+ kInvItemMeat = 69,
+ kInvItemPlasticBag = 70,
+ kInvItemSocks = 71,
+ kInvItemTimePills = 72,
+ kInvItemHandle = 73,
+ kInvItemChilliNoLabel = 74,
+ kInvItemPass = 75,
+ kInvItemBulb = 76,
+ kInvItemJailKey = 77,
+ kInvItemDelicatePlant = 78,
+ kInvItemSwissArmyKnife = 79,
+ kInvItemSpring = 80,
+ kInvItemShovelAct1 = 81,
+ kInvItemKaleidoscope = 82,
+ kInvItemSoldierNews = 83,
+ kInvItemGrenade = 84,
+ kInvItemMug = 85, // Empty
+ kInvItemMugOfMud = 86, // Full of mud
+ kInvItemCrumbs = 87,
+ kInvItemRopeAct1 = 88,
+ kInvItemRopeAndGrenade = 89, // Rope combined with Grenade
+ kInvItemMedicine = 90,
+ kInvItemDruggedFood = 91, // Crumbs combined with Medicine
+ kInvItemBird = 92
+};
+
+// Maximum number of inventory items held by Ego (Mark)
+const uint8 kInventorySize = 24;
+
class Inventory {
public:
- Inventory(TeenAgentEngine *engine);
+ Inventory(TeenAgentEngine *vm);
~Inventory();
void render(Graphics::Surface *surface, int delta);
@@ -55,10 +158,10 @@ public:
void resetSelectedObject() { _selectedObj = NULL; }
private:
- TeenAgentEngine *_engine;
+ TeenAgentEngine *_vm;
Surface _background;
byte *_items;
- uint _offset[93];
+ uint _offset[kNumInventoryItems+1];
Common::Array<InventoryObject> _objects;
byte *_inventory;
@@ -71,12 +174,12 @@ private:
Item() : _hovered(false) {}
void free();
- void load(Inventory *inventory, uint item_id);
+ void load(Inventory *inventory, uint itemId);
void backgroundEffect(Graphics::Surface *s);
- void render(Inventory *inventory, uint item_id, Graphics::Surface *surface, int delta);
+ void render(Inventory *inventory, uint itemId, Graphics::Surface *surface, int delta);
};
- Item _graphics[24];
+ Item _graphics[kInventorySize];
bool _active;
Common::Point _mouse;
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index 1f44e9cfcb..b06a5f1f5e 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -22,6 +22,8 @@
#include "teenagent/music.h"
#include "teenagent/resources.h"
+#include "teenagent/teenagent.h"
+
#include "common/debug.h"
#include "common/ptr.h"
#include "common/textconsole.h"
@@ -34,36 +36,36 @@ static const uint32 noteToPeriod[3][12] = {
{214, 201, 189, 179, 170, 160, 151, 143, 135, 127, 120, 113}
};
-MusicPlayer::MusicPlayer() : Paula(false, 44100, 5000), _id(0) {
+MusicPlayer::MusicPlayer(TeenAgentEngine *vm) : Paula(false, 44100, 5000), _vm(vm), _id(0) {
}
MusicPlayer::~MusicPlayer() {
+ stop();
}
bool MusicPlayer::load(int id) {
- Resources *res = Resources::instance();
-
- Common::ScopedPtr<Common::SeekableReadStream> stream(res->mmm.getStream(id));
+ debugC(0, kDebugMusic, "MusicPlayer::load(%d)", id);
+ Common::ScopedPtr<Common::SeekableReadStream> stream(_vm->res->mmm.getStream(id));
if (!stream)
return false;
char header[4];
stream->read(header, 4);
- //check header?
+ // check header?
Common::StackLock lock(_mutex);
// Load the samples
sampleCount = stream->readByte();
- debug(0, "sampleCount = %d", sampleCount);
+ debugC(0, kDebugMusic, "sampleCount = %d", sampleCount);
for (byte currSample = 0; currSample < sampleCount; currSample++) {
byte sample = stream->readByte();
// Load the sample data
- byte sampleResource = ((sample >> 4) & 0x0F) * 10 + (sample & 0x0F);
- debug(0, "currSample = %d, sample = 0x%02x, resource: %d", currSample, sample, sampleResource);
- uint32 sampleSize = res->sam_mmm.getSize(sampleResource);
+ byte sampleResource = ((sample >> 4) & 0x0f) * 10 + (sample & 0x0f);
+ debugC(0, kDebugMusic, "currSample = %d, sample = 0x%02x, resource: %d", currSample, sample, sampleResource);
+ uint32 sampleSize = _vm->res->sam_mmm.getSize(sampleResource);
if (sampleSize == 0) {
warning("load: invalid sample %d (0x%02x)", sample, sample);
_samples[sample].clear();
@@ -71,7 +73,7 @@ bool MusicPlayer::load(int id) {
}
_samples[sample].resize(sampleSize);
- res->sam_mmm.read(sampleResource, _samples[sample].data, sampleSize);
+ _vm->res->sam_mmm.read(sampleResource, _samples[sample].data, sampleSize);
}
// Load the music data
@@ -87,17 +89,17 @@ bool MusicPlayer::load(int id) {
row.channels[1].note = stream->readByte();
row.channels[2].note = stream->readByte();
_rows.push_back(row);
- } else if ((cmd & 0xF0) == 0x50) {
+ } else if ((cmd & 0xf0) == 0x50) {
byte sample = stream->readByte();
- //debug(1, "%02x: set sample %02x", cmd, sample);
- row.channels[(cmd & 0x0F) - 1].sample = sample;
- } else if ((cmd & 0xF0) == 0x40) {
+ debugC(1, kDebugMusic, "%02x: set sample %02x", cmd, sample);
+ row.channels[(cmd & 0x0f) - 1].sample = sample;
+ } else if ((cmd & 0xf0) == 0x40) {
byte vol = stream->readByte();
- //debug(1, "%02x: set volume %02x -> %02x", cmd, row.channels[(cmd & 0x0F) - 1].volume, vol);
- //channel volume 0x40 * music volume 0x40 mixed with high bytes
- row.channels[(cmd & 0x0F) - 1].volume = vol * 16;
+ debugC(1, kDebugMusic, "%02x: set volume %02x -> %02x", cmd, row.channels[(cmd & 0x0f) - 1].volume, vol);
+ // channel volume 0x40 * music volume 0x40 mixed with high bytes
+ row.channels[(cmd & 0x0f) - 1].volume = vol * 16;
} else {
- debug(0, "unhandled music command %02x", cmd);
+ debugC(0, kDebugMusic, "unhandled music command %02x", cmd);
}
}
_currRow = 0;
@@ -124,13 +126,13 @@ void MusicPlayer::interrupt() {
for (int chn = 0; chn < 3; ++chn) {
setChannelVolume(chn, row->channels[chn].volume);
- //debug(0, "row->channels[%d].volume = %d", chn, row->channels[chn].volume);
+ debugC(2, kDebugMusic, "row->channels[%d].volume = %d", chn, row->channels[chn].volume);
byte sample = (row->channels[chn].sample);
if (row->channels[chn].note != 0 && sample != 0) {
- //debug(0, "row->channels[%d].note = %d", chn, row->channels[chn].note);
- //debug(0, "row->channels[%d].sample = %d", chn, row->channels[chn].sample);
+ debugC(2, kDebugMusic, "row->channels[%d].note = %d", chn, row->channels[chn].note);
+ debugC(2, kDebugMusic, "row->channels[%d].sample = %d", chn, row->channels[chn].sample);
byte note = row->channels[chn].note;
if (_samples[sample].size == 0) {
@@ -139,11 +141,11 @@ void MusicPlayer::interrupt() {
}
setChannelData(chn, (const int8 *)_samples[sample].data, NULL, _samples[sample].size, 0);
- setChannelPeriod(chn, noteToPeriod[((note >> 4) & 0x0F) - 1][(note & 0x0F)]);
+ setChannelPeriod(chn, noteToPeriod[((note >> 4) & 0x0f) - 1][(note & 0x0f)]);
}
}
- //debug(0, "------------------------------------------------");
+ debugC(2, kDebugMusic, "------------------------------------------------");
++_currRow;
}
diff --git a/engines/teenagent/music.h b/engines/teenagent/music.h
index 22b4fa5e8e..408436cf3a 100644
--- a/engines/teenagent/music.h
+++ b/engines/teenagent/music.h
@@ -28,10 +28,11 @@
namespace TeenAgent {
+class TeenAgentEngine;
+
class MusicPlayer : public Audio::Paula {
public:
-
- MusicPlayer();
+ MusicPlayer(TeenAgentEngine *vm);
~MusicPlayer();
bool load(int id);
@@ -41,6 +42,8 @@ public:
void stop();
private:
+ TeenAgentEngine *_vm;
+
int _id;
struct Row {
diff --git a/engines/teenagent/objects.cpp b/engines/teenagent/objects.cpp
index 748f342d54..5dad9ab99d 100644
--- a/engines/teenagent/objects.cpp
+++ b/engines/teenagent/objects.cpp
@@ -21,8 +21,10 @@
#include "common/debug.h"
#include "common/memstream.h"
+
#include "teenagent/objects.h"
#include "teenagent/resources.h"
+#include "teenagent/teenagent.h"
namespace TeenAgent {
@@ -51,7 +53,6 @@ void Rect::render(Graphics::Surface *surface, uint8 color) const {
surface->vLine(right, bottom, top, color);
}
-
void Object::load(byte *src) {
_base = src;
@@ -59,39 +60,39 @@ void Object::load(byte *src) {
rect.load(src);
src += 8;
- actor_rect.load(src);
+ actorRect.load(src);
src += 8;
- actor_orientation = *src++;
+ actorOrientation = *src++;
enabled = *src++;
name = (const char *)src;
- description = parse_description((const char *)src);
+ description = parseDescription((const char *)src);
}
void Object::save() const {
assert(_base != NULL);
rect.save();
- actor_rect.save();
- _base[17] = actor_orientation;
+ actorRect.save();
+ _base[17] = actorOrientation;
_base[18] = enabled;
}
-void Object::setName(const Common::String &new_name) {
+void Object::setName(const Common::String &newName) {
assert(_base != 0);
- strcpy((char *)(_base + 19), new_name.c_str());
- name = new_name;
+ strcpy((char *)(_base + 19), newName.c_str());
+ name = newName;
}
void Object::dump(int level) const {
- debug(level, "object: %u %u [%u,%u,%u,%u], actor: [%u,%u,%u,%u], orientation: %u, name: %s", id, enabled,
+ debugC(level, kDebugObject, "object: %u %u [%u,%u,%u,%u], actor: [%u,%u,%u,%u], orientation: %u, name: %s", id, enabled,
rect.left, rect.top, rect.right, rect.bottom,
- actor_rect.left, actor_rect.top, actor_rect.right, actor_rect.bottom,
- actor_orientation, name.c_str()
+ actorRect.left, actorRect.top, actorRect.right, actorRect.bottom,
+ actorOrientation, name.c_str()
);
}
-Common::String Object::parse_description(const char *name) {
+Common::String Object::parseDescription(const char *name) {
const char *desc = name + strlen(name) + 1;
if (*desc == 0)
return Common::String();
@@ -101,7 +102,7 @@ Common::String Object::parse_description(const char *name) {
while (*desc != 1 && *desc != 0) {
Common::String line;
while (*desc != 1 && *desc != 0) {
- //debug(0, "%02x ", *desc);
+ debugC(2, kDebugObject, "%02x ", *desc);
line += *desc++;
}
@@ -115,7 +116,7 @@ Common::String Object::parse_description(const char *name) {
if (!result.empty())
result.deleteLastChar();
else
- result = "Cool.";
+ result = "Cool."; // FIXME - Use dsAddr_coolMsg ?
return result;
}
@@ -124,31 +125,31 @@ void InventoryObject::load(byte *src) {
id = *src++;
animated = *src++;
name = (const char *)src;
- description = Object::parse_description((const char *)src);
+ description = Object::parseDescription((const char *)src);
}
void UseHotspot::load(byte *src) {
Common::MemoryReadStream in(src, 9);
- inventory_id = in.readByte();
- object_id = in.readByte();
+ inventoryId = in.readByte();
+ objectId = in.readByte();
orientation = in.readByte();
- actor_x = in.readUint16LE();
- actor_y = in.readUint16LE();
+ actorX = in.readUint16LE();
+ actorY = in.readUint16LE();
callback = in.readUint16LE();
}
void UseHotspot::dump(int level) const {
- debug(level,
- "hotspot: inv_id: %02x, obj_id: %02x, orientation?: %02x, actor position: (%d,%d), callback: %04x",
- inventory_id, object_id, orientation, actor_x, actor_y, callback
+ debugC(level, kDebugObject,
+ "hotspot: invId: %02x, objId: %02x, orientation: %02x, actor position: (%d,%d), callback: %04x",
+ inventoryId, objectId, orientation, actorX, actorY, callback
);
}
void Walkbox::dump(int level) const {
- debug(level, "walkbox %02x %02x [%d, %d, %d, %d] top: %u, right: %u, bottom: %u, left: %u",
+ debugC(level, kDebugObject, "walkbox %02x %02x [%d, %d, %d, %d] top: %u, right: %u, bottom: %u, left: %u",
type, orientation,
rect.left, rect.top, rect.right, rect.bottom,
- side_hint[0], side_hint[1], side_hint[2], side_hint[3]);
+ sideHint[0], sideHint[1], sideHint[2], sideHint[3]);
}
void Walkbox::load(byte *src) {
@@ -159,7 +160,7 @@ void Walkbox::load(byte *src) {
rect.load(src);
src += 8;
for (byte i = 0; i < 4; ++i)
- side_hint[i] = *src++;
+ sideHint[i] = *src++;
}
void Walkbox::save() const {
diff --git a/engines/teenagent/objects.h b/engines/teenagent/objects.h
index 555287fc56..6e7955766f 100644
--- a/engines/teenagent/objects.h
+++ b/engines/teenagent/objects.h
@@ -26,6 +26,8 @@
#include "common/rect.h"
#include "graphics/surface.h"
+#include "teenagent/teenagent.h"
+
namespace TeenAgent {
enum {kActorUp = 1, kActorRight = 2, kActorDown = 3, kActorLeft = 4 };
@@ -46,13 +48,13 @@ struct Rect {
}
inline bool valid() const {
- return left >= 0 && left < 320 && right >= 0 && right < 320 && top >= 0 && top < 200 && bottom >= 0 && bottom < 200;
+ return left >= 0 && left < kScreenWidth && right >= 0 && right < kScreenWidth && top >= 0 && top < kScreenHeight && bottom >= 0 && bottom < kScreenHeight;
}
void render(Graphics::Surface *surface, uint8 color) const;
void dump(int level = 0) const {
- debug(level, "rect[%u, %u, %u, %u]", left, top, right, bottom);
+ debugC(level, kDebugObject, "rect[%u, %u, %u, %u]", left, top, right, bottom);
}
inline void clear() {
@@ -154,22 +156,21 @@ protected:
};
struct Object {
-
byte id; //0
Rect rect; //1
- Rect actor_rect; //9
- byte actor_orientation; //17
+ Rect actorRect; //9
+ byte actorOrientation; //17
byte enabled; //18
//19
Common::String name, description;
Object(): _base(NULL) {}
void dump(int level = 0) const;
- void setName(const Common::String &name);
+ void setName(const Common::String &newName);
void load(byte *addr);
void save() const;
- static Common::String parse_description(const char *name);
+ static Common::String parseDescription(const char *name);
protected:
byte *_base;
@@ -188,10 +189,10 @@ protected:
};
struct UseHotspot {
- byte inventory_id;
- byte object_id;
+ byte inventoryId;
+ byte objectId;
byte orientation;
- uint16 actor_x, actor_y;
+ uint16 actorX, actorY;
uint16 callback;
void load(byte *src);
void dump(int level = 0) const;
@@ -201,7 +202,7 @@ struct Walkbox {
byte type;
byte orientation;
Rect rect;
- byte side_hint[4];
+ byte sideHint[4];
Walkbox() : _base(NULL) {}
void dump(int level = 0) const;
diff --git a/engines/teenagent/pack.cpp b/engines/teenagent/pack.cpp
index 5302e2eceb..2e6c913a72 100644
--- a/engines/teenagent/pack.cpp
+++ b/engines/teenagent/pack.cpp
@@ -20,6 +20,8 @@
*/
#include "teenagent/pack.h"
+#include "teenagent/teenagent.h"
+
#include "common/util.h"
#include "common/debug.h"
#include "common/memstream.h"
@@ -44,7 +46,7 @@ bool FilePack::open(const Common::String &filename) {
return false;
_fileCount = file.readUint32LE();
- debug(0, "opened %s, found %u entries", filename.c_str(), _fileCount);
+ debugC(0, kDebugPack, "opened %s, found %u entries", filename.c_str(), _fileCount);
offsets = new uint32[_fileCount + 1];
for (uint32 i = 0; i <= _fileCount; ++i) {
offsets[i] = file.readUint32LE();
@@ -65,18 +67,17 @@ uint32 FilePack::read(uint32 id, byte *dst, uint32 size) const {
file.seek(offsets[id - 1]);
uint32 rsize = offsets[id] - offsets[id - 1];
uint32 r = file.read(dst, MIN(rsize, size));
- //debug(0, "read(%u, %u) = %u", id, size, r);
+ debugC(0, kDebugPack, "read(%u, %u) = %u", id, size, r);
return r;
}
Common::SeekableReadStream *FilePack::getStream(uint32 id) const {
if (id < 1 || id > _fileCount)
return NULL;
- //debug(0, "stream: %04x-%04x", offsets[id - 1], offsets[id]);
+ debugC(0, kDebugPack, "stream: %04x-%04x", offsets[id - 1], offsets[id]);
return new Common::SeekableSubReadStream(&file, offsets[id - 1], offsets[id]);
}
-
TransientFilePack::TransientFilePack() : offsets(0) {}
TransientFilePack::~TransientFilePack() {
@@ -97,7 +98,7 @@ bool TransientFilePack::open(const Common::String &filename) {
return false;
_fileCount = file.readUint32LE();
- debug(0, "opened %s, found %u entries", filename.c_str(), _fileCount);
+ debugC(0, kDebugPack, "opened %s, found %u entries", filename.c_str(), _fileCount);
offsets = new uint32[_fileCount + 1];
for (uint32 i = 0; i <= _fileCount; ++i) {
offsets[i] = file.readUint32LE();
@@ -124,14 +125,14 @@ uint32 TransientFilePack::read(uint32 id, byte *dst, uint32 size) const {
uint32 rsize = offsets[id] - offsets[id - 1];
uint32 r = file.read(dst, MIN(rsize, size));
file.close();
- //debug(0, "read(%u, %u) = %u", id, size, r);
+ debugC(0, kDebugPack, "read(%u, %u) = %u", id, size, r);
return r;
}
Common::SeekableReadStream *TransientFilePack::getStream(uint32 id) const {
if (id < 1 || id > _fileCount)
return NULL;
- //debug(0, "stream: %04x-%04x", offsets[id - 1], offsets[id]);
+ debugC(0, kDebugPack, "stream: %04x-%04x", offsets[id - 1], offsets[id]);
Common::File file;
if (!file.open(_filename))
return NULL;
@@ -146,7 +147,6 @@ Common::SeekableReadStream *TransientFilePack::getStream(uint32 id) const {
return new Common::MemoryReadStream(ptr, r, DisposeAfterUse::YES);
}
-
void MemoryPack::close() {
chunks.clear();
}
@@ -157,7 +157,7 @@ bool MemoryPack::open(const Common::String &filename) {
return false;
uint32 count = file.readUint32LE();
- debug(0, "opened %s, found %u entries [memory]", filename.c_str(), count);
+ debugC(0, kDebugPack, "opened %s, found %u entries [memory]", filename.c_str(), count);
for (uint32 i = 0; i < count; ++i) {
uint32 offset = file.readUint32LE();
int32 pos = file.pos();
@@ -199,5 +199,4 @@ Common::SeekableReadStream *MemoryPack::getStream(uint32 id) const {
return new Common::MemoryReadStream(c.data, c.size, DisposeAfterUse::NO);
}
-
} // End of namespace TeenAgent
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index dff58f98e2..442d0abf16 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -27,14 +27,10 @@
namespace TeenAgent {
-Resources::Resources() {}
-
-Resources *Resources::instance() {
- static Resources i;
- return &i;
+Resources::Resources() {
}
-void Resources::deinit() {
+Resources::~Resources() {
off.close();
on.close();
ons.close();
@@ -61,6 +57,36 @@ quick note on varia resources:
11: quit shareware
*/
+#define CSEG_SIZE 46000 // 0xb3b0
+#define DSEG_SIZE 59280 // 0xe790
+#define ESEG_SIZE 35810 // 0x8be2
+
+void Resources::precomputeDialogOffsets() {
+ dialogOffsets.push_back(0);
+ int n = 0;
+ uint8 current, last = 0xff;
+ for (uint i = 0; i < eseg.size(); i++) {
+ current = eseg.get_byte(i);
+
+ if (n == 4) {
+ dialogOffsets.push_back(i);
+ n = 0;
+ }
+
+ if (current != 0x00 && last == 0x00)
+ n = 0;
+
+ if (current == 0x00)
+ n++;
+
+ last = current;
+ }
+
+ debug(1, "Resources::precomputeDialogOffsets() - Found %d dialogs", dialogOffsets.size());
+ for (uint i = 0; i < dialogOffsets.size(); i++)
+ debug(1, "\tDialog #%d: Offset 0x%04x", i, dialogOffsets[i]);
+}
+
bool Resources::loadArchives(const ADGameDescription *gd) {
Common::File *dat_file = new Common::File();
if (!dat_file->open("teenagent.dat")) {
@@ -93,18 +119,17 @@ bool Resources::loadArchives(const ADGameDescription *gd) {
}
#endif
- cseg.read(dat, 0xb3b0);
- dseg.read(dat, 0xe790);
- eseg.read(dat, 0x8be2);
+ dat->skip(CSEG_SIZE);
+ dseg.read(dat, DSEG_SIZE);
+ eseg.read(dat, ESEG_SIZE);
delete dat;
+ precomputeDialogOffsets();
+
FilePack varia;
varia.open("varia.res");
- font7.load(varia, 7);
- font7.width_pack = 1;
- font7.height = 11;
- font8.load(varia, 8);
- font8.height = 31;
+ font7.load(varia, 7, 11, 1);
+ font8.load(varia, 8, 31, 0);
varia.close();
off.open("off.res");
@@ -150,13 +175,13 @@ Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
switch (id) {
case 81:
- if (dseg.get_byte(0xDBAD))
+ if (dseg.get_byte(dsAddr_dogHasBoneFlag))
return lan500.getStream(160);
break;
case 137:
- if (dseg.get_byte(0xDBC5) == 1) {
- if (dseg.get_byte(0xDBC6) == 1)
+ if (dseg.get_byte(dsAddr_mansionTVOnFlag) == 1) {
+ if (dseg.get_byte(dsAddr_mansionVCRPlayingTapeFlag) == 1)
return lan500.getStream(203);
else
return lan500.getStream(202);
@@ -164,31 +189,31 @@ Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
break;
case 25:
- if (dseg.get_byte(0xDBDF) == 2) {
+ if (dseg.get_byte(dsAddr_FirstActTrialState) == 2) {
return lan500.getStream(332);
}
break;
case 37:
- if (dseg.get_byte(0xdbe2) == 1) {
+ if (dseg.get_byte(dsAddr_act1GuardState) == 1) {
return lan500.getStream(351);
- } else if (dseg.get_byte(0xdbe2) == 2) {
+ } else if (dseg.get_byte(dsAddr_act1GuardState) == 2) {
return lan500.getStream(364);
}
break;
case 29:
- if (dseg.get_byte(0xDBE7) == 1) {
+ if (dseg.get_byte(dsAddr_birdOnBarRadioAntennaFlag) == 1) {
return lan500.getStream(380);
}
case 30:
- if (dseg.get_byte(0xDBE7) == 1) {
+ if (dseg.get_byte(dsAddr_birdOnBarRadioAntennaFlag) == 1) {
return lan500.getStream(381);
}
case 42:
- if (dseg.get_byte(0xDBEC) == 1) {
+ if (dseg.get_byte(dsAddr_johnNotyOutsideMansionDoorFlag) == 1) {
return lan500.getStream(400);
}
}
diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h
index 5c08a46489..7aae2f9ec8 100644
--- a/engines/teenagent/resources.h
+++ b/engines/teenagent/resources.h
@@ -31,18 +31,1144 @@ struct ADGameDescription;
namespace TeenAgent {
+// Code Segment Addresses (Read Only)
+// Intro function : 0x024c
+const uint16 csAddr_intro = 0x024c;
+// Pole Climb Fail function : 0x4173
+const uint16 csAddr_poleClimbFail = 0x4173;
+// Move Ego (Mark) To Suspicious Position function : 0x505c
+const uint16 csAddr_egoSuspiciousPosition = 0x505c;
+// Guard Scare Timeout function : 0x516d
+const uint16 csAddr_guardScareTimeout = 0x516d;
+// Guard Drinking function : 0x5189
+const uint16 csAddr_guardDrinking = 0x5189;
+// Move Ego (Mark) To Default Position function : 0x557e
+const uint16 csAddr_egoDefaultPosition = 0x557e;
+// Cave NOP function : 0x599b
+const uint16 csAddr_caveNOP = 0x599b;
+// Enter Cave function : 0x5a21
+const uint16 csAddr_enterCave = 0x5a21;
+// Ego (Mark) Scared By Spider function : 0x60b5
+const uint16 csAddr_egoScaredBySpider = 0x60b5;
+// Move to Ladder and Leave Cellar function : 0x60d9
+const uint16 csAddr_moveToLadderAndLeaveCellar = 0x60d9;
+// Leave Cellar function : 0x612b
+const uint16 csAddr_leaveCellar = 0x612b;
+// Too Dark function : 0x61fe
+const uint16 csAddr_TooDark = 0x61fe;
+// Move Ego (Mark) To Bottom-Right or Turn function : 0x6849
+const uint16 csAddr_egoBottomRightTurn = 0x6849;
+// Checking Drawers function : 0x68e6
+const uint16 csAddr_checkingDrawers = 0x68e6;
+// Drawer Open Message function : 0x6b86
+const uint16 csAddr_DrawerOpenMessage = 0x6b86;
+// Is Cook Gone function : 0x70e0
+const uint16 csAddr_isCookGone = 0x70e0;
+// Giving Flower to Old Lady function : 0x88de
+const uint16 csAddr_givingFlowerToOldLady = 0x88de;
+// Give Another Flower to Old Lady function : 0x890b
+const uint16 csAddr_giveAnotherFlowerToOldLady = 0x890b;
+// Giving Flower to Anne function : 0x8942
+const uint16 csAddr_givingFlowerToAnne = 0x8942;
+// Give Another Flower to Anne function : 0x89aa
+const uint16 csAddr_giveAnotherFlowerToAnne = 0x89aa;
+// Putting Rock in Hole function : 0x8d57
+const uint16 csAddr_putRockInHole = 0x8d57;
+// Mouse Out Of Hole Timeout function : 0x8d79
+const uint16 csAddr_mouseOutOfHoleTimeout = 0x8d79;
+// Robot Safe (Mike) Already Unlocked Check function : 0x9166
+const uint16 csAddr_robotSafeAlreadyUnlockedCheck = 0x9166;
+// Robot Safe (Mike) Unlock Check function : 0x9175
+const uint16 csAddr_robotSafeUnlockCheck = 0x9175;
+// Open Full Toolbox function : 0x98fa
+const uint16 csAddr_openFullToolbox = 0x98fa;
+// Open Half Empty Toolbox function : 0x9910
+const uint16 csAddr_openHalfEmptyToolbox = 0x9910;
+// Use Diving Equipment function : 0x9921
+const uint16 csAddr_useDivingEquipment = 0x9921;
+// Successfully Got Anchor function : 0x99e0
+const uint16 csAddr_gotAnchor = 0x99e0;
+// No Anchor Timeout function : 0x9a1d
+const uint16 csAddr_noAnchorTimeout = 0x9a1d;
+// Get Out of Lake function : 0x9a7a
+const uint16 csAddr_getOutOfLake = 0x9a7a;
+// Dig Under Mansion Wall function : 0x9aca
+const uint16 csAddr_digMansionWall = 0x9aca;
+// Too Dark Here function : 0x9c66
+const uint16 csAddr_tooDarkHere = 0x9c66;
+// Examine Banknote function : 0x9c6d
+const uint16 csAddr_examineBanknote = 0x9c6d;
+// Use Time Pills function : 0x9c79
+const uint16 csAddr_useTimePills = 0x9c79;
+// Mansion Intrusion Attempt function : 0x9d45
+const uint16 csAddr_mansionIntrusionAttempt = 0x9d45;
+// Second Mansion Intrusion function : 0x9d90
+const uint16 csAddr_secondMansionIntrusion = 0x9d90;
+// Third Mansion Intrusion function : 0x9de5
+const uint16 csAddr_thirdMansionIntrusion = 0x9de5;
+// Fourth Mansion Intrusion function : 0x9e54
+const uint16 csAddr_fourthMansionIntrusion = 0x9e54;
+// Fifth Mansion Intrusion function : 0x9ec3
+const uint16 csAddr_fifthMansionIntrusion = 0x9ec3;
+// Sixth Mansion Intrusion function : 0x9f3e
+const uint16 csAddr_sixthMansionIntrusion = 0x9f3e;
+// Display Message function : 0xa055
+const uint16 csAddr_displayMsg = 0xa055;
+// Reject Message function : 0xa4d6
+const uint16 csAddr_rejectMsg = 0xa4d6;
+
+// Data Segment Addresses
+// Timed Callback State Variable : 0x0000
+const uint16 dsAddr_timedCallbackState = 0x0000; // 1 byte
+
+// Cursor Graphic 8*12px : 0x00da to 0x0139 (Read Only)
+const uint16 dsAddr_cursor = 0x00da;
+
+// Reject Message Address Pointers : (4 * 2-byte) = 0x339e to 0x33a5
+const uint16 dsAddr_rejectMsgPtr = 0x339e;
+// Reject Message #0 : 0x33a6 to 0x33c9
+const uint16 dsAddr_rejectMsg0 = 0x33a6; // "I have no idea what to do with it"
+// Reject Message #1 : 0x33ca to 0x33f5
+const uint16 dsAddr_rejectMsg1 = 0x33ca; // "I can't imagine what I could do with this"
+// Reject Message #2 : 0x33f6 to 0x3425
+const uint16 dsAddr_rejectMsg2 = 0x33f6; // "I can't figure out what I should do with this"
+// Reject Message #3 : 0x3426 to 0x344f
+const uint16 dsAddr_rejectMsg3 = 0x3426; // "I can't find any reason to mess with it"
+// Cool Message : 0x3450 to 0x3456
+const uint16 dsAddr_coolMsg = 0x3450; // "Cool."
+// Object Usage Error Message : 0x3457 to 0x3467
+const uint16 dsAddr_objErrorMsg = 0x3457; // "That's no good"
+// Car Jack Message : 0x3468 to 0x348f
+const uint16 dsAddr_carJackMsg = 0x3468; // "Wow! There's a car jack inside! Great!"
+// Spanner Message : 0x3490 to 0x34c6
+const uint16 dsAddr_spannerMsg = 0x3490; // "There's something else inside the toolbox! A spanner!"
+// Last Chance Message : 0x34c7 to 0x34d4
+const uint16 dsAddr_lastChanceMsg = 0x34c7; // "Last chance?"
+// Give Up Message : 0x34d5 to 0x34e0
+const uint16 dsAddr_giveUpMsg = 0x34d5; // "I give up"
+// Avoid Bees Message : 0x34e1 to 0x351e
+const uint16 dsAddr_avoidBeesMsg = 0x34e1; // "I'm going to stay at least five meters away from these bees!"
+// Boat Empty Message : 0x351f to 0x3541
+const uint16 dsAddr_boatEmptyMsg = 0x351f; // "There's nothing else in the boat"
+// Too Hard Wood Message : 0x3542 to 0x3562
+const uint16 dsAddr_tooHardWoodMsg = 0x3542; // "This wood is too hard to break"
+// Boo Message : 0x3563 to 0x3569
+const uint16 dsAddr_BooMsg = 0x3563; // "Booo!"
+// Dont Push Luck Message : 0x356a to 0x358f
+const uint16 dsAddr_dontPushLuckMsg = 0x356a; // "I don't think I should push my luck"
+// Ordinary Haystack Message : 0x3590 to 0x35b1
+const uint16 dsAddr_ordinaryHaystackMsg = 0x3590; // "Just an ordinary hay stack. Now."
+// Needle Haystack Message : 0x35b2 to 0x35e7
+const uint16 dsAddr_needleHaystackMsg = 0x35b2; // "And they say you can't find a needle in a haystack"
+// No Potatoes Message : 0x35e8 to 0x3604
+const uint16 dsAddr_noPotatoMsg = 0x35e8; // "There are no more potatoes"
+// Trousers Message : 0x3605 to 0x363e
+const uint16 dsAddr_trousersMsg = 0x3605; // "Good I always asked mum for trousers with BIG pockets"
+// Life Is Brutal Message : 0x363f to 0x364f
+const uint16 dsAddr_lifeIsBrutalMsg = 0x363f; // "Life is brutal"
+// Life Brutal Message : 0x3650 to 0x3667
+const uint16 dsAddr_lifeBrutalMsg = 0x3650; // "Life is really brutal"
+// Tickled Message : 0x3668 to 0x367e
+const uint16 dsAddr_tickledMsg = 0x3668; // "Something tickled me!"
+// Its Gone Message : 0x367f to 0x3693
+const uint16 dsAddr_itsGoneMsg = 0x367f; // "At least it's gone"
+// Monsters Message : 0x3694 to 0x36c1
+const uint16 dsAddr_monstersMsg = 0x3694; // "Who knows what monsters live in there"
+// No Hands Message : 0x36c2 to 0x370e
+const uint16 dsAddr_noHandsMsg = 0x36c2; // "I'd better not put my hands in there..."
+// Totally Empty Message : 0x370f to 0x372d
+const uint16 dsAddr_totalEmptyMsg = 0x370f; // "I can see it's totally empty"
+// One Small Step Message : 0x372e to 0x3765
+const uint16 dsAddr_oneSmallStepMsg = 0x372e; // "One small step for man, one big pain in the head"
+// No Chance Message : 0x3766 to 0x378f
+const uint16 dsAddr_noChanceMsg = 0x3766; // "I won't take my chances a second time"
+// Dinosaur Bone Message : 0x3790 to 0x37b7
+const uint16 dsAddr_dinoBoneMsg = 0x3790; // "I really hope this is DINOSAUR bone"
+// Wall Shaken Message : 0x37b8 to 0x37e9
+const uint16 dsAddr_wallShakenMsg = 0x37b8; // "Wow! This must have shaken all the nearby walls!"
+// Kinda Dark Message : 0x37ea to 0x3800
+const uint16 dsAddr_kindaDarkMsg = 0x37ea; // "It's kinda dark here"
+// Not in Dark Message : 0x3801 to 0x3831
+const uint16 dsAddr_notInDarkMsg = 0x3801; // "I'm not going to wander here in the dark again"
+// Shut Valve Message : 0x3832 to 0x387b
+const uint16 dsAddr_shutValveMsg = 0x3832; // "Shutting the valve shook the dirt from the wall..."
+// Need Sunglasses Message : 0x387c to 0x38a6
+const uint16 dsAddr_needSunglassesMsg = 0x387c; // "Sorry buddy, but I need your sunglasses"
+// Not Best Place Message : 0x38a7 to 0x38cd
+const uint16 dsAddr_notBestPlaceMsg = 0x38a7; // "It's not the best place for diving"
+// Not Here Message : 0x38ce to 0x38da
+const uint16 dsAddr_notHereMsg = 0x38ce; // "Not here"
+// Can't Talk Underwater Message : 0x38db to 0x38fe
+const uint16 dsAddr_cantTalkUnderwaterMsg = 0x38db; // "I really can't talk underwater!"
+// Not Swimming There Message : 0x38ff to 0x3931
+const uint16 dsAddr_notSwimmingThereMsg = 0x38ff; // "I don't think swimming there is worth the effort"
+// Too Little Air Message : 0x3932 to 0x3988
+const uint16 dsAddr_tooLittleAirMsg = 0x3932; // "If I want to get this anchor I have to swim there when I have more air in my lungs"
+// Hooked Anchor Message : 0x3989 to 0x39ad
+const uint16 dsAddr_hookedAnchorMsg = 0x3989; // "I was really hooked on this anchor!"
+// Seaweed Message : 0x39ae to 0x39f5
+const uint16 dsAddr_seaweedMsg = 0x39ae; // "This seaweed is just like the flowers I gave mum on her last birthday"
+// Fish Boat Message : 0x39f6 to 0x3a27
+const uint16 dsAddr_fishBoatMsg = 0x39f6; // "I wonder what fish do inside this boat at night"
+// Fish Something Message : 0x3a28 to 0x3a59
+const uint16 dsAddr_fishSomethingMsg = 0x3a28; // "I think I have to fish out something down there"
+// Fish Don't Worry Message : 0x3a5a to 0x3a84
+const uint16 dsAddr_fishDontWorryMsg = 0x3a5a; // "At least fish don't worry about the rain"
+// Not Red Herring Message : 0x3a85 to 0x3ab6
+const uint16 dsAddr_notRedHerringMsg = 0x3a85; // "I hope all this fish stuff is not a red herring"
+// Nice Down Message : 0x3ab7 to 0x3acd
+const uint16 dsAddr_niceDownMsg = 0x3ab7; // "It's nice down there"
+// Hey Let Go Message : 0x3ace to 0x3ae5
+const uint16 dsAddr_heyLetGoMsg = 0x3ace; // "Hey, let go, will ya?!"
+// Aaahhh Message : 0x3ae6 to 0x3afc
+const uint16 dsAddr_aaahhhMsg = 0x3ae6; // "Aaaaaaaaaaaaahhh!"
+// Oops Message : 0x3afd to 0x3b03
+const uint16 dsAddr_oopsMsg = 0x3afd; // "Oops"
+// Found Food Message : 0x3b04 to 0x3b2e
+const uint16 dsAddr_foundFoodMsg = 0x3b04; // "People leave food in unbelievable places"
+// Come Here Message : 0x3b2f to 0x3b58
+const uint16 dsAddr_comeHereMsg = 0x3b2f; // "Come here, I've got something for you"
+// Cant Catch Message : 0x3b59 to 0x3b6b
+const uint16 dsAddr_cantCatchMsg = 0x3b59; // "I can't catch it!"
+// Trapped Mouse Message : 0x3b6c to 0x3b82
+const uint16 dsAddr_trappedMouseMsg = 0x3b6c; // "The mouse is trapped!"
+// Yikes Message : 0x3b83 to 0x3b8a
+const uint16 dsAddr_yikesMsg = 0x3b83; // "Yikes!"
+// Mouse Nerve Message : 0x3b8b to 0x3bab
+const uint16 dsAddr_mouseNerveMsg = 0x3b8b; // "Boy, this mouse has some nerve!"
+// Drawers Empty Message : 0x3bac to 0x3bd1
+const uint16 dsAddr_drawersEmptyMsg = 0x3bac; // "There's nothing else in the drawers"
+// Rid Bush Message 0x3bd2 to 0x3bf5
+const uint16 dsAddr_ridBushMsg = 0x3bd2; // "I must get rid of this bush first"
+// Mouse Gone Message : 0x3bf6 to 0x3c0a
+const uint16 dsAddr_mouseGoneMsg = 0x3bf6; // "The mouse has gone!"
+// Nonsense Message : 0x3c0b to 0x3c15
+const uint16 dsAddr_nonsenseMsg = 0x3c0b; // "Nonsense"
+// Good Doggy Message : 0x3c16 to 0x3c30
+const uint16 dsAddr_goodDoggyMsg = 0x3c16; // "I understand. Good doggy"
+// Here Boy Message : 0x3c31 to 0x3c3c
+const uint16 dsAddr_hereBoyMsg = 0x3c31; // "Here, boy"
+// Friends Now Message : 0x3c3d to 0x3c57
+const uint16 dsAddr_friendsNowMsg = 0x3c3d; // "I hope we're friends now"
+// Not Think Right Place Message : 0x3c58 to 0x3c7f
+const uint16 dsAddr_notThinkRightPlaceMsg = 0x3c58; // "I don't think this is the right place"
+// Cutscene Message A : 0x3c80 to 0x3c99
+const uint16 dsAddr_cutsceneMsgA = 0x3c80; // "Hundred moments later"
+// Cutscene Message B : 0x3c9a to 0x3cbb
+const uint16 dsAddr_cutsceneMsgB = 0x3c9a; // "Another hundred moments later"
+// Found Crude Oil Message : 0x3cbc to 0x3ce9
+const uint16 dsAddr_foundCrudeOilMsg = 0x3cbc; // "At least I found crude oil and I'll be rich"
+// My Life Message : 0x3cea to 0x3cfa
+const uint16 dsAddr_myLifeMsg = 0x3cea; // "That's my life"
+// Confusion Message : 0x3cfb to 0x3d00
+const uint16 dsAddr_ConfusionMsg = 0x3cfb; // "!?&!"
+// Grandpa Promise Message : 0x3d01 to 0x3d1f
+const uint16 dsAddr_grandpaPromiseMsg = 0x3d01; // "But grandpa, you promised!"
+// Oh Lets Go Message : 0x3d20 to 0x3d39
+const uint16 dsAddr_ohLetsGoMsg = 0x3d20; // "Oh all right. Let's go"
+// Bye Message : 0x3d3a to 0x3d3f
+const uint16 dsAddr_byeMsg = 0x3d3a; // "Bye."
+// No Need Message : 0x3d40 to 0x3d58
+const uint16 dsAddr_noNeedMsg = 0x3d40; // "No need to do it again"
+// Girl Talk Message : 0x3d59 to 0x3d85
+const uint16 dsAddr_girlTalkMsg = 0x3d59; // "I really don't know how to talk to girls"
+// Dont Work Purpose Message : 0x3d86 to 0x3dae
+const uint16 dsAddr_dontWorkPurposeMsg = 0x3d86; // "I usually don't work without a purpose"
+// Nut Real Message : 0x3daf to 0x3dc5
+const uint16 dsAddr_nutRealMsg = 0x3daf; // "Only the nut is real"
+// Hen Fly Message : 0x3dc6 to 0x3df3
+const uint16 dsAddr_henFlyMsg = 0x3dc6; // "I wonder if hens can fly. Come here, baby"
+// First Test Fail Message : 0x3df4 to 0x3e07
+const uint16 dsAddr_firstTestFailMsg = 0x3df4; // "First test failed"
+// Rid Frustations Message : 0x3e08 to 3e30
+const uint16 dsAddr_ridFrustationsMsg = 0x3e08; // "I'd already got rid of my frustrations"
+// Road Nowhere Message : 0x3e31 to 0x3e4e
+const uint16 dsAddr_roadNowhereMsg = 0x3e31; // "Nah. It's a road to nowhere"
+// Open Boot Message 0x3e4f to 0x3e62
+const uint16 dsAddr_openBootMsg = 0x3e4f; // "It opens the boot"
+// Shut Tight Message : 0x3e63 to 0x3e74
+const uint16 dsAddr_shutTightMsg = 0x3e63; // "It's shut tight"
+// Boot Empty Message : 0x3e75 to 0x3e97
+const uint16 dsAddr_bootEmptyMsg = 0x3e75; // "There's nothing else in the boot"
+// Clothes Dry Message : 0x3e98 to 0x3eb1
+const uint16 dsAddr_clothesDryMsg = 0x3e98; // "The clothes are dry now."
+// Crow Kill Message : 0x3eb2 to 0x3ed5
+const uint16 dsAddr_crowKillMsg = 0x3eb2; // "I'm sure these crows will kill me"
+// Get Rid Of Guard First Message : 0x3ed6 to 0x3f29
+const uint16 dsAddr_getRidOfGuardFirstMsg = 0x3ed6; // "If I want to get inside I must get rid of this guard first..."
+// Wall Too Smooth Message : 0x3f2a to 0x3f53
+const uint16 dsAddr_wallTooSmoothMsg = 0x3f2a; // "The wall surface is too smooth to climb"
+// Too Much Resin To Climb Message : 0x3f54 to 0x3f84
+const uint16 dsAddr_tooMuchResinToClimbMsg = 0x3f54; // "I could climb it if there wasn't so much resin"
+// Only Green Rect Message : 0x3f85 to 0x3feb
+const uint16 dsAddr_onlyGreenRectMsg = 0x3f85; // "The only green stuff that I like is that rectangular piece of paper with..."
+// Don't Wanna Touch Hedgehog Message : 0x3fec to 0x402d
+const uint16 dsAddr_dontWannaTouchHedgehogMsg = 0x3fec; // "I don't wanna touch it. Its spines could hurt my delicate hands"
+// Not Hungry Message : 0x402e to 0x4046
+const uint16 dsAddr_notHungryMsg = 0x402e; // "Thanks, I'm not hungry"
+// No Long Hands Message : 0x4047 to 0x406c
+const uint16 dsAddr_noLongHandsMsg = 0x4047; // "I really don't have such long hands"
+// Too Far To Swim Message : 0x406d to 0x4089
+const uint16 dsAddr_tooFarToSwimMsg = 0x406d; // "It's too far to swim there"
+// Echo Message : 0x408a to 0x4090
+const uint16 dsAddr_echoMsg = 0x408a; // "Echo!"
+// Loud Echo Message : 0x4091 to 0x4097
+const uint16 dsAddr_loudEchoMsg = 0x4091; // "ECHO!"
+// Who There Message : 0x4098 to 0x40a6
+const uint16 dsAddr_whoThereMsg = 0x4098; // "Who's there?!"
+// Loud Who There Message : 0x40a7 to 0x40b5
+const uint16 dsAddr_loudWhoThereMsg = 0x40a7; // "WHO'S THERE?!"
+// Dont Copy Message : 0x40b6 to 0x40cd
+const uint16 dsAddr_dontCopyMsg = 0x40b6; // "DON'T COPY ME!"
+// Loud Dont Copy Message : 0x40ce to 0x40e7
+const uint16 dsAddr_loudDontCopyMsg = 0x40ce; // "DON'T COPY ME!!!"
+// Throw Rock Message : 0x40e8 to 0x410e
+const uint16 dsAddr_throwRockMsg = 0x40e8; // "OR I WILL THROW A ROCK DOWN THERE!"
+// Or I Will Message : 0x410f to 0x411c
+const uint16 dsAddr_orIWillMsg = 0x410f; // "OR I WILL"
+// Still There Message : 0x411d to 0x4132
+const uint16 dsAddr_stillThereMsg = 0x411d; // "Are you still there?"
+// No Bucket Message : 0x4133 to 0x4163
+const uint16 dsAddr_noBucketMsg = 0x4133; // "It's not a barrel-organ. And there's no bucket."
+// Dont Need To Open Message : 0x4164 to 0x417d
+const uint16 dsAddr_dontNeedToOpenMsg = 0x4164; // "I don't need to open it"
+// Hmm Grass Message : 0x417e to 41b0
+const uint16 dsAddr_hmmGrassMsg = 0x417e; // "Hmmm. Grass..."
+// Find Nut Message : 0x41b1 to 0x41ee
+const uint16 dsAddr_findNutMsg = 0x41b1; // "I won't find the nut just like that. The grass is too dense"
+// Not Horny Message : 0x41ef to 0x41fe
+const uint16 dsAddr_notHornyMsg = 0x41ef; // "I'm not horny"
+// Can't Jump So High Message : 0x41ff to 0x423e
+const uint16 dsAddr_CantJumpMsg = 0x41ff; // "No way I can jump so high, cause, err, white men can't jump"
+// Don't Need It Message : 0x423f to 0x4250
+const uint16 dsAddr_dontNeedItMsg = 0x423f; // "I don't need it"
+// Not Santa Claus Message : 0x4251 to 0x4266
+const uint16 dsAddr_notSantaClausMsg = 0x4251; // "I'm not Santa Claus"
+// No Plastic Imitations Message : 0x4267 to 0x4288
+const uint16 dsAddr_noPlasticImitationsMsg = 0x4267; // "I don't need plastic imitations"
+// Too Fragile Message : 0x4289 to 0x42ab
+const uint16 dsAddr_tooFragileMsg = 0x4289; // "It's too fragile to carry around"
+// Keep It Open Message : 0x42ac to 0x42c6
+const uint16 dsAddr_keepItOpenMsg = 0x42ac; // "I'd like to keep it open"
+// Not Taking Socks Message : 0x42c7 to 0x4305
+const uint16 dsAddr_notTakingSocksMsg = 0x42c7; // "I really don't want to walk around with someone else's socks"
+// Not Tired Message : 0x4306 to 0x431d
+const uint16 dsAddr_notTiredMsg = 0x4306; // "Thanks, I'm not tired"
+// Too Big Message : 0x431e to 0x434d
+const uint16 dsAddr_tooBigMsg = 0x431e; // "It's too big and I doubt if I'll ever need it"
+// No Secret Passage Message : 0x434e to 0x437f
+const uint16 dsAddr_noSecretPassageMsg = 0x434e; // "I don't think there's any secret passage inside"
+// No Fruit Message : 0x4380 to 0x43ab
+const uint16 dsAddr_noFruitMsg = 0x4380; // "There are no more interesting fruits here"
+// Jug Me Message : 0x43ac to 0x43cd
+const uint16 dsAddr_jugMeMsg = 0x43ac; // "They can jug me if I steal this"
+// Leave Flowers Alone Message : 0x43ce to 0x4411
+const uint16 dsAddr_leaveFlowersAloneMsg = 0x43ce; // "I'd better leave it. Women are really oversensitive about flowers."
+// Mirror Mirror Message : 0x4412 to 0x444e
+const uint16 dsAddr_mirrorMirrorMsg = 0x4412; // "Mirror, Mirror on the wall...."
+// Think Too Long Message : 0x444f to 0x446a
+const uint16 dsAddr_thinkTooLongMsg = 0x444f; // "Hey, don't think too long"
+// Hint Male Message : 0x446b to 0x4491
+const uint16 dsAddr_HintMaleMsg = 0x446b; // "A hint: Someone in this room, a male"
+// OK Wait Message : 0x4492 to 0x44a6
+const uint16 dsAddr_okWaitMsg = 0x4492; // "OK, take your time"
+// Busy Thinking Message : 0x44a7 to 0x44d5
+const uint16 dsAddr_busyThinkingMsg = 0x44a7; // "I'd better not interrupt it's thought process"
+// No Dentists Message : 0x44d6 to 0x450d
+const uint16 dsAddr_noDentistsMsg = 0x44d6; // "I don't want to have anything in common with dentists"
+// Too Heavy Message : 0x450e to 0x4531
+const uint16 dsAddr_tooHeavyMsg = 0x450e; // "It's too heavy. Not that I'm wimp"
+// What Got Message : 0x4532 to 0x4554
+const uint16 dsAddr_whatGotMsg = 0x4532; // "Let's look what we've got here"
+// Strawberry Jam Message : 0x4555 to 0x4567
+const uint16 dsAddr_strawberryJamMsg = 0x4555; // "Strawberry jam"
+// Gooseberry Jam Message : 0x4568 to 0x457a
+const uint16 dsAddr_gooseberryJamMsg = 0x4568; // "Gooseberry jam"
+// Blackberry Jam Message : 0x457b to 0x458d
+const uint16 dsAddr_blackberryJamMsg = 0x457b; // "Blackberry jam"
+// Bilberry Jam Message : 0x458e to 0x459e
+const uint16 dsAddr_bilberryJamMsg = 0x458e; // "Bilberry jam"
+// Get Me Out Jam Message : 0x459f to 0x45b7
+const uint16 dsAddr_getMeOutJamMsg = 0x459f; // "Get me out of this jam!"
+// Rosemary Jam Message : 0x45b8 to 0x45d9
+const uint16 dsAddr_rosemaryJamMsg = 0x45b8; // "Oh, and there is Rosemary jam"
+// Know Rosemary Message : 0x45da to 0x4602
+const uint16 dsAddr_knowRosemaryMsg = 0x45da; // "I used to know someone called Rosemary"
+// Unwanted Jams Message : 0x4603 to 0x461c
+const uint16 dsAddr_unwantedJamsMsg = 0x4603; // "I don't want those jams"
+// Too Dark Message : 0x461d to 0x463b
+const uint16 dsAddr_TooDarkMsg = 0x461d; // "It's too dark to see clearly"
+// Yeow Message : 0x463c to 0x4649
+const uint16 dsAddr_yeowMsg = 0x463c; // "YEEEOOOWWWW!"
+// Yawn Message : 0x464a to 0x4651
+const uint16 dsAddr_yawnMsg = 0x464a; // "(yawn)"
+// Laughter Message : 0x4652 to 0x465d
+const uint16 dsAddr_laughterMsg = 0x4652; // "(laughter)"
+// No Hands Sharp Thorns Message : 0x465e to 0x46a0
+const uint16 dsAddr_noHandsSharpThornsMsg = 0x465e; // "I can't remove it with my hands. these thorns look really sharp"
+// No Chainsaw Fuel Message : 0x46a1 to 0x46c2
+const uint16 dsAddr_noChainsawFuelMsg = 0x46a1; // "There's no fuel in the chainsaw"
+// Thorns Too Thin Message : 0x46c3 to 0x46f6
+const uint16 dsAddr_thornsTooThinMsg = 0x46c3; // "Thorns are too thin, the chainsaw is useless here"
+// Rock Walking Gee Message : 0x46f7 to 0x473c
+const uint16 dsAddr_rockWalkingGeeMsg = 0x46f7; // "Yeah, great idea. Let's take this rock and walk around a bit. Gee..."
+// Butterfly Message : 0x473d to 0x477a
+const uint16 dsAddr_butterflyMsg = 0x473d; // "I'd better leave them alone, they make this place beautiful"
+// Not Sure If Alive Message : 0x477b to 0x4797
+const uint16 dsAddr_notSureIfAliveMsg = 0x477b; // "I'm not sure if it's alive"
+
+// FIXME - Unknown where this is used.. Talking to SOMETHING...
+// Unknown Language Message : 0x4798 to 0x47be
+const uint16 dsAddr_unknownLanguageMsg = 0x4798; // "I don't know what language it speaks"
+
+// Hole Too Narrow Message : 0x47bf to 0x47e6
+const uint16 dsAddr_holeTooNarrowMsg = 0x47bf; // "The hole is too narrow to fit my hand"
+// Bird Attack Message : 0x47e7 to 0x4807
+const uint16 dsAddr_birdAttackMsg = 0x47e7; // "Hey You! Wake up! Bird attack!"
+// No Search Warrant Message : 0x4808 to 0x4827
+const uint16 dsAddr_noSearchWarrantMsg = 0x4808; // "I don't have a search-warrant"
+// Uninteresting Haystack Message : 0x4828 to 0x485f
+const uint16 dsAddr_uninterestingHaystackMsg = 0x4828; // "I don't see anything interesting about this haystack"
+// More Complicated Message : 0x4860 to 0x4881
+const uint16 dsAddr_moreComplicatedMsg = 0x4860; // "It's more complicated than that"
+// Nut Rake Message : 0x4882 to 0x48be
+const uint16 dsAddr_nutRakeMsg = 0x4882; // "It's pointless, the nut will slip between the rake's teeth"
+// Paddle Broken Message : 0x48bf to 0x48d5
+const uint16 dsAddr_paddleBrokenMsg = 0x48bf; // "The paddle is BROKEN"
+// Branch Not Paddle Message : 0x48d6 to 0x4912
+const uint16 dsAddr_branchNotPaddleMsg = 0x48d6; // "This branch is not a paddle. It doesn't even look like one"
+// Try Somewhere Else Message : 0x4913 to 0x495b
+const uint16 dsAddr_trySomewhereElseMsg = 0x4913; // "I'd better try somewhere else - I suppose this side is heavily guarded"
+// Sharpen Not Pulverize Message : 0x495c to 0x4983
+const uint16 dsAddr_sharpenNotPulverizeMsg = 0x495c; // "I needed to sharpen it, not pulverize"
+// Can't Do Anything Too Dark Message : 0x4984 to 0x49ad
+const uint16 dsAddr_cantDoTooDarkMsg = 0x4984; // "I can't do anything here, it's too dark"
+// Bribe Message : 0x49ae to 0x49d0
+const uint16 dsAddr_BribeMsg = 0x49ae; // "Here, let's make your pocket fat."
+// Bank Note Message : 0x49d1 to 0x4a28
+const uint16 dsAddr_bankNoteMsg = 0x49d1; // "It's a note from some bank..."
+// Show Her Money Message : 0x4a29 to 0x4a5a
+const uint16 dsAddr_showHerMoneyMsg = 0x4a29; // "If I just show her the money, she might take it"
+// Hundred Bucks Message : 0x4a5b to 0x4a6e
+const uint16 dsAddr_hundredBucksMsg = 0x4a5b; // "A hundred bucks!!!"
+// Want Blood Message : 0x4a6f to 0x4a7d
+const uint16 dsAddr_wantBloodMsg = 0x4a6f; // "I want Blood!"
+// Dont Leave Mansion Message : 0x4a7e to 0x4aaf
+const uint16 dsAddr_dontLeaveMansionMsg = 0x4a7e; // "I don't want to leave the mansion, I want blood!"
+// Wimp Message : 0x4ab0 to 0x4acc
+const uint16 dsAddr_WimpMsg = 0x4ab0; // "I'm a pathetic little wimp"
+// Strange Drawer Message : 0x4acd to 0x4b0c
+const uint16 dsAddr_strangeDrawerMsg = 0x4acd; // "Strange, but the drawer is stuck if the next drawer is open"
+// Not Ordinary Drawers Message : 0x4b0d to 0x4b38
+const uint16 dsAddr_notOrdinaryDrawersMsg = 0x4b0d; // "Maybe these are not just ordinary drawers!"
+// Drawer Open Message : 0x4b39 to 0x4b6b
+const uint16 dsAddr_drawerOpenMsg = 0x4b39; // "I cannot open the drawer if the next one is open!"
+// Blue Interior Message 0x4b6c to 0x4b86
+const uint16 dsAddr_blueInteriorMsg = 0x4b6c; // "It's got a blue interior"
+// Red Interior Message : 0x4b87 to 0x4ba0
+const uint16 dsAddr_redInteriorMsg = 0x4b87; // "It's got a red interior"
+// Grey Interior Message : 0x4ba1 to 0x4bbb
+const uint16 dsAddr_greyInteriorMsg = 0x4ba1; // "It's got a grey interior"
+// Green Interior Message : 0x4bbc to 0x4bd7
+const uint16 dsAddr_greenInteriorMsg = 0x4bbc; // "It's got a green interior"
+// Brown Interior Message : 0x4bd8 to 0x4bf3
+const uint16 dsAddr_brownInteriorMsg = 0x4bd8; // "It's got a brown interior"
+// Pink Interior Message : 0x4bf4 to 0x4c0e
+const uint16 dsAddr_pinkInteriorMsg = 0x4bf4; // "It's got a pink interior"
+// Dictaphone Inside Message : 0x4c0f to 0x4c31
+const uint16 dsAddr_dictaphoneInsideMsg = 0x4c0f; // "Wow! There's a dictaphone inside!"
+// Found Polaroid Message : 0x4c32 to 0x4c60
+const uint16 dsAddr_foundPolaroidMsg = 0x4c32; // "There's a polaroid inside! I might need that"
+// Book Held Message : 0x4c61 to 0x4c83
+const uint16 dsAddr_bookHeldMsg = 0x4c61; // "Something's got hold of the book!"
+// Secret Compartment Message : 0x4c84 to 0x4c9f
+const uint16 dsAddr_secretCompartmentMsg = 0x4c84; // "Wow! A secret compartment!"
+// Dont Mess Message : 0x4ca0 to 0x4cc6
+const uint16 dsAddr_dontMessMsg = 0x4ca0; // "I don't need to mess with it anymore"
+// Full Automatic Message : 0x4cc7 to 0x4cd8
+const uint16 dsAddr_fullAutomaticMsg = 0x4cc7; // "Fully Automatic"
+// No More Sheets Message : 0x4cd9 to 0x4d01
+const uint16 dsAddr_noMoreSheetsMsg = 0x4cd9; // "Right now I don't need any more sheets"
+// No Deprave Message : 0x4d02 to 0x4d29
+const uint16 dsAddr_noDepraveMsg = 0x4d02; // "Nah, I don't want to deprave the kids"
+// No Read Again Message : 0x4d2a to 0x4d5a
+const uint16 dsAddr_noReadAgainMsg = 0x4d2a; // "I don't want to read it again. I might like it."
+// TV Off Message : 0x4d5b to 0x4d7f
+const uint16 dsAddr_tvOffMsg = 0x4d5b; // "I just realised that the TV is off"
+// Not Happen Message : 0x4d80 to 0x4d92
+const uint16 dsAddr_NotHappenMsg = 0x4d80; // "Nothing happened"
+// Tape Started Message : 0x4d93 to 0x4da5
+const uint16 dsAddr_tapeStartedMsg = 0x4d93; // "The tape started!"
+// Much Better Message : 0x4da6 to 0x4dba
+const uint16 dsAddr_muchBetterMsg = 0x4da6; // "That's much better"
+// No Sleep Message : 0x4dbb to 0x4dd2
+const uint16 dsAddr_noSleepMsg = 0x4dbb; // "I don't want to sleep"
+// Just Cork Message : 0x4dd3 to 0x4de5
+const uint16 dsAddr_justCorkMsg = 0x4dd3; // "It's just a cork"
+// Enough Photos Message : 0x4de6 to 0x4e04
+const uint16 dsAddr_enoughPhotosMsg = 0x4de6; // "I don't need any more photos"
+// Record Scare Message : 0x4e05 to 0x4e31
+const uint16 dsAddr_recordScareMsg = 0x4e05; // "Yeah, I can record this and scare the cats"
+// Already Recorded Message : 0x4e32 to 0x4e57
+const uint16 dsAddr_alreadyRecordedMsg = 0x4e32; // "I already recorded what I wanted to"
+// Can't Record No Batteries Message : 0x4e58 to 0x4e8d
+const uint16 dsAddr_cantRecordNoBatteriesMsg = 0x4e58; // "I can't record anything until I find some batteries"
+
+// FIXME - Not sure how to get this message. Dictaphone with no batteries somewhere? Radio?
+// No Batteries No Fun Message : 0x4e8e to 0x4ea4
+const uint16 dsAddr_NoBatteriesNoFunMsg = 0x4e8e; // "No batteries, no fun"
+
+// Not Right Moment Message : 0x4ea5 to 0x4ecd
+const uint16 dsAddr_notRightMomentMsg = 0x4ea5; // "I don't think this is the right moment"
+// Cook Around Message : 0x4ece to 0x4ef9
+const uint16 dsAddr_cookAroundMsg = 0x4ece; // "I can't do anything with this cook around"
+// Same Bottle Message : 0x4efa to 0x4f3c
+const uint16 dsAddr_sameBottleMsg = 0x4efa; // "The bottle's the same, but I doubt if it's enough to fool anyone"
+// Break Flatten Message : 0x4f3d to 0x4f68
+const uint16 dsAddr_breakFlattenMsg = 0x4f3d; // "I wanted to break it, not to flatten it!"
+// What Inside Message : 0x4f69 to 0x4f9a
+const uint16 dsAddr_whatInsideMsg = 0x4f69; // "I was always curious what's inside these things"
+// Rest Useless Message : 0x4f9b to 0x4fb0
+const uint16 dsAddr_restUselessMsg = 0x4f9b; // "The rest is useless"
+// Two Batteries Message : 0x4fb1 to 0x4fca
+const uint16 dsAddr_twoBatteriesMsg = 0x4fb1; // "Wow! Two 1.5V batteries!"
+// One Taken Message : 0x4fcb to 0x4fe1
+const uint16 dsAddr_oneTakenMsg = 0x4fcb; // "This one's taken, OK?"
+// Slight Mad Message : 0x4fe2 to 0x5009
+const uint16 dsAddr_slightMadMsg = 0x4fe2; // "It finally happened. I'm slightly mad"
+// Paper Burnt Message : 0x500a to 0x502a
+const uint16 dsAddr_paperBurntMsg = 0x500a; // "The paper burnt out completely!"
+// Burn Baby Message : 0x502b to 0x503d
+const uint16 dsAddr_burnBabyMsg = 0x502b; // "Burn, baby, burn!"
+// Voila Message : 0x503e to 0x5045
+const uint16 dsAddr_voilaMsg = 0x503e; // "Voila"
+// Too Hot Message : 0x5046 to 0x505d
+const uint16 dsAddr_tooHotMsg = 0x5046; // "It's too hot to touch!"
+// Frozen Shelf Message : 0x505e to 0x5081
+const uint16 dsAddr_frozenShelfMsg = 0x505e; // "It has frozen hard onto the shelf!"
+// Yummy Message : 0x5082 to 0x5089
+const uint16 dsAddr_yummyMsg = 0x5082; // "Yummy"
+// Dislike Veal Message : 0x508a to 0x50a5
+const uint16 dsAddr_dislikeVealMsg = 0x508a; // "I never liked veal anyway"
+// No Reason Message : 0x50a6 to 0x50c2
+const uint16 dsAddr_noReasonMsg = 0x50a6; // "There's no reason to do it"
+// Fooled Once Message : 0x50c3 to 0x50e0
+const uint16 dsAddr_fooledOnceMsg = 0x50c3; // "I'd already fooled him once"
+// Mike Voice Test Message : 0x50e1 to 0x5100
+const uint16 dsAddr_mikeVoiceTestMsg = 0x50e1; // "Mike, activate the voice test"
+// Not My Voice Message : 0x5101 to 0x5123
+const uint16 dsAddr_notMyVoiceMsg = 0x5101; // "I won't cheat Mike with MY voice"
+// Singing Message : 0x5124 to 0x5137
+const uint16 dsAddr_singingMsg = 0x5124; // "siiiiinging!"
+// Mike Scent Test Message : 0x5138 to 0x5160
+const uint16 dsAddr_mikeScentTestMsg = 0x5138; // "Mike, let's get on with the scent test"
+// Mike View Test Message : 0x5161 to 0x517a
+const uint16 dsAddr_mikeViewTestMsg = 0x5161; // "Mike, run the view test"
+// Cutscene Message #0 : 0x517b to 0x51a6
+const uint16 dsAddr_cutsceneMsg0 = 0x517b; // "A secret diary of ..."
+// Cant Hide Message : 0x51a7 to 0x51ba
+const uint16 dsAddr_cantHideMsg = 0x51a7; // "I can't hide here!"
+// John Outside Message : 0x51bb to 0x51e6
+const uint16 dsAddr_johnOutsideMsg = 0x51bb; // "There's John Noty outside! I can't go out!"
+// Was Close Message : 0x51e7 to 0x51f7
+const uint16 dsAddr_wasCloseMsg = 0x51e7; // "That was close"
+// Cork In Hole Message : 0x51f8 to 0x5217
+const uint16 dsAddr_corkInHoleMsg = 0x51f8; // "The cork is stuck in the hole"
+// Fits Perfect Message : 0x5218 to 0x522b
+const uint16 dsAddr_fitsPerfectMsg = 0x5218; // "It fits perfectly!"
+// Enough Water Message : 0x522c to 0x524e
+const uint16 dsAddr_enoughWaterMsg = 0x522c; // "There's enough water in the sink"
+// No Hot Water Message : 0x524f to 0x5271
+const uint16 dsAddr_noHotWaterMsg = 0x524f; // "There's no hot water in the sink"
+// Label Off Message : 0x5272 to 0x528a
+const uint16 dsAddr_labelOffMsg = 0x5272; // "The label has come off!"
+// Cork Too Small Message : 0x528b to 0x52a8
+const uint16 dsAddr_corkTooSmallMsg = 0x528b; // "The cork is a bit too small"
+// Not Try Now Message : 0x52a9 to 0x52ca
+const uint16 dsAddr_notTryNowMsg = 0x52a9; // "There's no need to try them now"
+// No Salad Message : 0x52cb to 0x52f5
+const uint16 dsAddr_noSaladMsg = 0x52cb; // "I don't want to turn myself into a salad"
+// Nah Message : 0x52f6 to 0x52fd
+const uint16 dsAddr_nahMsg = 0x52f6; // "Nah"
+// Vent First Message : 0x52fe to 0x5325
+const uint16 dsAddr_ventFirstMsg = 0x52fe; // "I'd better stop this ventilator first"
+// Catch John First Message : 0x5326 to 0x5348
+const uint16 dsAddr_catchJohnFirstMsg = 0x5326; // "I'd better catch John Noty first"
+// Only Chilli Message : 0x5349 to 0x5371
+const uint16 dsAddr_onlyChilliMsg = 0x5349; // "Good this red stuff is only a chilli"
+// Water Hot Message : 0x5372 to 0x538c
+const uint16 dsAddr_waterHotMsg = 0x5372; // "The water looks very hot"
+// Sink Full Message : 0x538d to 0x53ac
+const uint16 dsAddr_sinkFullMsg = 0x538d; // "The sink is full of hot water"
+// No Sock Store Message : 0x53ad to 0x53dc
+const uint16 dsAddr_noSockStoreMsg = 0x53ad; // "I don't have anything to store these socks in"
+// Show Papers Message : 0x53dd to 0x53f1
+const uint16 dsAddr_showPapersMsg = 0x53dd; // "Here are my papers"
+// Got Permission Message : 0x53f2 to 0x5410
+const uint16 dsAddr_gotPermissionMsg = 0x53f2; // "I already got the permission"
+// Saving Fine Message : 0x5411 to 0x5462
+const uint16 dsAddr_SavingFineMsg = 0x5411; // "Saving is a very fine thing..."
+// Love Captain Message : 0x5463 to 0x5474
+const uint16 dsAddr_loveCaptainMsg = 0x5463; // "I love captain"
+// Soccer Rulz Message : 0x5475 to 0x5483
+const uint16 dsAddr_soccerRulzMsg = 0x5475; // "Soccer rulz"
+// Tree Cut Message : 0x5484 to 0x54c3
+const uint16 dsAddr_treeCutMsg = 0x5484; // "Don't cut the trees..."
+// Visa Accepted Message : 0x54c4 to 0x54d4
+const uint16 dsAddr_visaAcceptedMsg = 0x54c4; // "VISA Accepted"
+// Other Graffiti Message : 0x54d5 to 0x54f6
+const uint16 dsAddr_otherGraffitiMsg = 0x54d5; // "The rest of graffiti is obscene"
+// First Trial Message : 0x54f7 to 0x5510
+const uint16 dsAddr_firstTrialMsg = 0x54f7; // "Sir, I'm Mark. A rookie"
+// Locked Message : 0x5511 to 0x551e
+const uint16 dsAddr_lockedMsg = 0x5511; // "It's Locked!"
+// Thanks Message : 0x551f to 0x5527
+const uint16 dsAddr_ThanksMsg = 0x551f; // "Thanks."
+// Unknown Usage Message : 0x5528 to 0x555c
+const uint16 dsAddr_unkUsageMsg = 0x5528; // "I don't have any idea what to do with it right now"
+// Idea Message : 0x555d to 0x5576
+const uint16 dsAddr_ideaMsg = 0x555d; // "That gives me an idea"
+// Check Works Message : 0x5577 to 0x5599
+const uint16 dsAddr_checkWorksMsg = 0x5577; // "Now I got to check if it works"
+// Time To Call Message : 0x559a to 0x55bf
+const uint16 dsAddr_timeToCallMsg = 0x559a; // "I think it is time to call captain"
+// Meal Finished Message : 0x55c0 to 0x55da
+const uint16 dsAddr_mealFinishedMsg = 0x55c0; // "Hey! I finished my meal."
+// Bowl Welded Message : 0x55db to 0x55fe
+const uint16 dsAddr_bowlWeldedMsg = 0x55db; // "Wow. He got welded to the bowl"
+// Gotcha Message : 0x55ff to 0x5607
+const uint16 dsAddr_gotchaMsg = 0x55ff; // "Gotcha"
+// No Pocket Message : 0x5608 to 0x5631
+const uint16 dsAddr_noPocketMsg = 0x5608; // "I don't want to touch his pockets again."
+// Does Not Work Message : 0x5632 to 0x5645
+const uint16 dsAddr_doesNotWorkMsg = 0x5632; // "That doesn't work"
+// Message : 0x5646 to 0x5655
+const uint16 dsAddr_fnMsg1 = 0x5646; // "Piece of cake"
+// Message : 0x5656 to 0x5679
+const uint16 dsAddr_fnMsg2 = 0x5656; // "And how am I supposed to get back?"
+// Message : 0x567a to 0x5681
+const uint16 dsAddr_fnMsg3 = 0x567a; // "Great"
+// Message : 0x5682 to 0x5695
+const uint16 dsAddr_fnMsg4 = 0x5682; // "Oh, yeah, right"
+// Pull Object Message #1 : 0x5696 to 0x56ab
+const uint16 dsAddr_pullObjMsg1 = 0x5696; // "I can't pull it out"
+// Dont Want To Touch Message : 0x56ac to 0x56d9
+const uint16 dsAddr_dontWantToTouchMsg = 0x56ac; // "I don't want to touch it - I might get hurt"
+// Fence Blocks Message : 0x56da to 0x56f6
+const uint16 dsAddr_fenceBlocksMsg = 0x56da; // "The fence blocks the way"
+// Not Want To Sleep Message : 0x56f7 to 0x570e
+const uint16 dsAddr_notWantToSleepMsg = 0x56f7; // "I don't want to sleep"
+// Pull Object Message #2 : 0x570f to 0x5721
+const uint16 dsAddr_pullObjMsg2 = 0x570f; // "I can't reach it"
+// Hello Question Message : 0x5722 to 0x5729
+const uint16 dsAddr_helloQMsg = 0x5722; // "Hello?"
+// Totally Addicted Message : 0x572a to 0x5741
+const uint16 dsAddr_totallyAddictedMsg = 0x572a; // "He's totally addicted"
+// What About Message : 0x5742 to 0x5756
+const uint16 dsAddr_whatAboutMsg = 0x5742; // "What about a new"
+// Hot Off Message : 0x5757 to 0x576f
+const uint16 dsAddr_hotOffMsg = 0x5757; // "hot off the press"
+// Full Color Message : 0x5770 to 0x5781
+const uint16 dsAddr_fullColorMsg = 0x5770; // "full-color"
+// Special Edition Message : 0x5782 to 0x5798
+const uint16 dsAddr_specialEdMsg = 0x5782; // "special edition"
+// Soldier News Message : 0x5799 to 0x57b1
+const uint16 dsAddr_soldierNewsMsg = 0x5799; // "of Soldier News?!"
+// Pole Climb Done Message : 0x57b2 to 0x57bf
+const uint16 dsAddr_poleClimbDoneMsg = 0x57b2; // "Never Again!"
+// Vac Message : 0x57c0 to 0x57de
+const uint16 dsAddr_vacMsg = 0x57c0; // "What am I? A vacuum cleaner?!"
+// Cutscene Message #1 : 0x57df to 0x5809
+const uint16 dsAddr_cutsceneMsg1 = 0x57df; // "sixty seven rude words later"
+// Cutscene Message #2 : 0x580a to 0x5826
+const uint16 dsAddr_cutsceneMsg2 = 0x580a; // "Meanwhile in the mansion"
+// Now Open Message : 0x5827 to 0x5836
+const uint16 dsAddr_nowOpenMsg = 0x5827; // "Now it's open"
+// Cmon Baby Message : 0x5837 to 0x5854
+const uint16 dsAddr_cmonBabyMsg = 0x5837; // "C'mon baby, it's all yours!"
+// Talk Not Now Message : 0x5855 to 0x5882
+const uint16 dsAddr_talkNotNowMsg = 0x5855; // "I've got no reason to talk to him right now."
+// Yeah Right Message : 0x5883 to 0x5893
+const uint16 dsAddr_yeahRightMsg = 0x5883; // "Yeah right!"
+// Barman Too Close Message : 0x5894 to 0x58af
+const uint16 dsAddr_barmanTooCloseMsg = 0x5894; // "The barman is too close"
+// Yuck Message : 0x58b0 to 0x58b6
+const uint16 dsAddr_yuckMsg = 0x58b0; // "Yuck!"
+// Prefer Water Message : 0x58b7 to 0x58c7
+const uint16 dsAddr_preferWaterMsg = 0x58b7; // "I prefer water"
+// Too Weak To Climb Message : 0x58c8 to 0x58e2
+const uint16 dsAddr_tooWeakToClimbMsg = 0x58c8; // "I'm too weak to climb it"
+// Spring Prick Message : 0x58e3 to 0x5904
+const uint16 dsAddr_springPrickMsg = 0x58e3; // "The springs would prick my back"
+// Food Alive Message : 0x5905 to 0x592e
+const uint16 dsAddr_foodAliveMsg = 0x5905; // "No, thanks. This food seems still alive"
+// Door Closed Message : 0x592f to 0x5954
+const uint16 dsAddr_doorClosedMsg = 0x592f; // "The door is closed. What a surprise."
+// Empty Message : 0x5955 to 0x5961
+const uint16 dsAddr_emptyMsg = 0x5955; // "It's Empty"
+// Geography Class Message : 0x5962 to 0x599c
+const uint16 dsAddr_geographyClassMsg = 0x5962; // "I should have paid more attention in geography classes."
+// Don't Need Mess Message : 0x599d to 0x59b5
+const uint16 dsAddr_dontNeedMessMsg = 0x599d; // "I don't need this mess"
+// Seen Softer Rocks Message : 0x59b6 to 0x59da
+const uint16 dsAddr_seenSofterRocksMsg = 0x59b6; // "Thanks, but I've seen softer rocks"
+// Too Blunt Message : 0x59db to 0x5a00
+const uint16 dsAddr_tooBluntMsg = 0x59db; // "They are too blunt to be of any use"
+// Useless Models Message : 0x5a01 to 0x5a1f
+const uint16 dsAddr_uselessModelsMsg = 0x5a01; // "What's the use of the models?"
+// Barman Will Notice Message : 0x5a20 to 0x5a50
+const uint16 dsAddr_barmanWillNoticeMsg = 0x5a20; // "The barman will surely notice its disappearing"
+// Too Much To Drink Message : 0x5a51 to 0x5a95
+const uint16 dsAddr_tooMuchToDrinkMsg = 0x5a51; // "It'd take too much time to drink it..."
+// 0x5a96 to 0x5a97 : 2 extra null bytes (padding?)
+// Not Thief Message : 0x5a98 to 0x5ac5
+const uint16 dsAddr_notThiefMsg = 0x5a98; // "I'm not a thief. And it's empty, by the way."
+// Too Many To Search Message : 0x5ac6 to 0x5aec
+const uint16 dsAddr_tooManyToSearchMsg = 0x5ac6; // "There are too many of them to search"
+// Captain Would Not Fit Message : 0x5aed to 0x5b26
+const uint16 dsAddr_captainWouldNotFitMsg = 0x5aed; // "Captain surely wouldn't fit them. I must look elsewhere"
+// Chickening Never Message : 0x5b27 to 0x5b3e
+const uint16 dsAddr_chickenNeverMsg = 0x5b27; // "Chickening? Me? Never!"
+// Can't Open It Message : 0x5b3f to 0x5b50
+const uint16 dsAddr_cantOpenItMsg = 0x5b3f; // "I can't open it"
+// Don't Need Them Message : 0x5b51 to 0x5b64
+const uint16 dsAddr_dontNeedThemMsg = 0x5b51; // "I don't need them"
+// Peeping Tom Message : 0x5b65 to 0x5b7f
+const uint16 dsAddr_peepingTomMsg = 0x5b65; // "What am I? A Peeping Tom?"
+// Big Pockets Message : 0x5b80 to 0x5baa
+const uint16 dsAddr_bigPocketsMsg = 0x5b80; // "I have big pockets, but there are limits"
+// Trouble With Stairs Message : 0x5bab to 0x5be6
+const uint16 dsAddr_troubleWithStairsMsg = 0x5bab; // "If I put it on I might have trouble walking up the stairs"
+// 9 Lives To Read Message : 0x5be7 to 0x5c0a
+const uint16 dsAddr_9LivesToReadMsg = 0x5be7; // "I'd need 9 lives to read them all"
+// Thanks Not Tired Message : 0x5c0b to 0x5c25
+const uint16 dsAddr_thanksNotTiredMsg = 0x5c0b; // "Thanks, I'm not so tired"
+// No Need To Turn On Message : 0x5c26 to 0x5c45
+const uint16 dsAddr_noNeedToTurnOnMsg = 0x5c26; // "There's no need to turn it on"
+// Won't Bear Weight Message : 0x5c46 to 0x5c5f
+const uint16 dsAddr_wontBearWeightMsg = 0x5c46; // "It won't bear my weight"
+// Never Learnt Message : 0x5c60 to 0x5c81
+const uint16 dsAddr_neverLearntMsg = 0x5c60; // "I never learnt to how use one"
+// So Sharp Message : 0x5c82 to 0x5cab
+const uint16 dsAddr_soSharpMsg = 0x5c82; // "They're so sharp they'd rip my trousers!"
+// Cognac Message : 0x5cac to 0x5cda
+const uint16 dsAddr_cognacMsg = 0x5cac; // "Pfui! The cognac really didn't do any good"
+// No Time For Pleasures Message : 0x5cdb to 0x5cfc
+const uint16 dsAddr_noTimeForPleasuresMsg = 0x5cdb; // "I don't have time for pleasures"
+// Not Socks With Bare Hands Message : 0x5cfd to 0x5d2b
+const uint16 dsAddr_notSocksWithBareHandsMsg = 0x5cfd; // "I won't touch these socks with my bare hands!"
+// Not Halloween Message : 0x5d2c to 0x5d40
+const uint16 dsAddr_notHalloweenMsg = 0x5d2c; // "It's not Halloween"
+// Not Manual Message : 0x5d41 to 0x5d6d
+const uint16 dsAddr_NotManualMsg = 0x5d41; // "It can't be controlled manually! I hate it!"
+// Nothing To Play Message : 0x5d6e to 0x5d86
+const uint16 dsAddr_nothingToPlayMsg = 0x5d6e; // "I have nothing to play"
+// Not Mine Message : 0x5d87 to 0x5da7
+const uint16 dsAddr_notMineMsg = 0x5d87; // "I can't take it. It's not mine."
+// Hey What's The Matter Message : 0x5da8 to 0x5dc1
+const uint16 dsAddr_HeyWtmQMsg = 0x5da8; // "Hey! What's the matter?!"
+// Its Open Message : 0x5dc2 to 0x5dcd
+const uint16 dsAddr_ItsOpenMsg = 0x5dc2; // "It's Open!"
+// Out Of Order Message : 0x5dce to 0x5de1
+const uint16 dsAddr_outOfOrderMsg = 0x5dce; // "It's out of order"
+// Captain Watching Message : 0x5de2 to 0x5e0a
+const uint16 dsAddr_captainWatchingMsg = 0x5de2; // "with captain watching? Better not"
+// Blunt Sickle Message : 0x5e0b to 0x5e24
+const uint16 dsAddr_bluntSickleMsg = 0x5e0b; // "The sickle is too blunt"
+// First Business Message : 0x5e25 to 0x5e53
+const uint16 dsAddr_firstBusinessMsg = 0x5e25; // "First I've got some business to take care of"
+// No Digging Knife Message : 0x5e54 to 0x5e8e
+const uint16 dsAddr_noDiggingKnifeMsg = 0x5e54; // "Digging it out with the knife could take a hundred years"
+
+// FIXME - Where is this message used?! Unused?
+// No Mess On Table Message : 0x5e8f to 0x5ebd
+const uint16 dsAddr_noMessOnTableMsg = 0x5e8f; // "I don't want to make more mess on this table"
+
+// Throw Crumbs To Bird Question Message : 0x5ebe to 0x5ee5
+const uint16 dsAddr_throwCrumbsToBirdQMsg = 0x5ebe; // "Should I throw the crumbs to the bird?"
+// Don't Waste Crumbs Message : 0x5ee6 to 0x5f10
+const uint16 dsAddr_dontWasteCrumbs = 0x5ee6; // "I don't want to waste these tasty crumbs"
+// Might Slip Fall In Message : 0x5f11 to 0x5f3b
+const uint16 dsAddr_mightSlipFallInMsg = 0x5f11; // "Better not... I might slip and fall in..."
+// Book Color Message Address Pointers : (6 * 2-byte) = 0x5f3c to 0x5f47
+const uint16 dsAddr_bookColorMsgPtr = 0x5f3c;
+// Book Color Message #0 : 0x5f48 to 0x5f60
+const uint16 dsAddr_bookColorMsg0 = 0x5f48; // ""The history of blues""
+// Book Color Message #1 : 0x5f61 to 0x5f8f
+const uint16 dsAddr_bookColorMsg1 = 0x5f61; // ""Manchester United, or the Red Devils story""
+// Book Color Message #2 : 0x5f90 to 0x5fb5
+const uint16 dsAddr_bookColorMsg2 = 0x5f90; // ""Greyhounds and other hunting dogs""
+// Book Color Message #3 : 0x5fb6 to 0x5fe6
+const uint16 dsAddr_bookColorMsg3 = 0x5fb6; // ""Greenhorn, or my adventures in the Wild West""
+// Book Color Message #4 : 0x5fe7 to 0x6008
+const uint16 dsAddr_bookColorMsg4 = 0x5fe7; // ""Charlie Brown and his company""
+// Book Color Message #5 : 0x6009 to 0x6034
+const uint16 dsAddr_bookColorMsg5 = 0x6009; // ""Pink Panther: an unauthorised biography""
+
+// Mansion Intrusion Function Pointers : (5 * 2-byte) = 0x6035 to 0x603e
+const uint16 dsAddr_MansionIntrusionFnPtr = 0x6035;
+
+// Save State Region : 0x6478 to 0xdbf1
+const uint16 dsAddr_saveState = 0x6478;
+const uint16 saveStateSize = 0x777a;
+
+// Save Description String (24 bytes) : 0x6478 to 0x648f
+
+// Ego (Mark) position in scene : 0x64af to 0x64b2
+const uint16 dsAddr_egoX = 0x64af; // 2 bytes
+const uint16 dsAddr_egoY = 0x64b1; // 2 bytes
+
+// Idle Animation List Table : 0x6540 to 0x????
+const uint16 dsAddr_idleAnimationListPtr = 0x6540;
+
+// Palette Effect Data : 0x6609 to 0x????
+const uint16 dsAddr_paletteEffectData = 0x6609;
+
+// Scene Fade Table (2 byte address * 42): 0x663e to 0x6691
+const uint16 dsAddr_sceneFadeTablePtr = 0x663e;
+
+// Scene Walkbox Table (2 byte LE address * 42) : 0x6746 to 0x6799
+const uint16 dsAddr_sceneWalkboxTablePtr = 0x6746;
+
+// Scene Zoom Table (2 byte address * 42) : 0x70f4 to 0x7147
+const uint16 dsAddr_sceneZoomTablePtr = 0x70f4;
+
+// Scene Object Table (2 byte address * 42) : 0x7254 to 0x72a7
+const uint16 dsAddr_sceneObjectTablePtr = 0x7254;
+
+// Scene Object Name : Sonny or whatever : 0x92e5 to 0x92f6
+const uint16 dsAddr_scnObjNameSonny = 0x92e5; // "Sonny or whatever"
+
+// Scene Object Name - Anne : 0x9820 to 0x9824
+const uint16 dsAddr_scnObjNameAnne = 0x9820; // "Anne"
+
+// Scene Object Name - Mike : 0xaa94 to 0xaa98
+const uint16 dsAddr_scnObjNameMike = 0xaa94; // "Mike"
+
+// Current Scene Id : 0xb4f3
+const uint16 dsAddr_currentScene = 0xb4f3; // 1 byte
+
+// Ons Animation Table (2 byte address * ??) : 0xb4f5 to 0x????
+const uint16 dsAddr_onsAnimationTablePtr = 0xb4f5;
+
+// Examine Object Callback Table (2 byte LE address * ??) : 0xb5ce to 0x????
+const uint16 dsAddr_objExamineCallbackTablePtr = 0xb5ce;
+
+// Use Object Callback Table (2 byte LE address * ??) : 0xb89c to 0x????
+const uint16 dsAddr_objUseCallbackTablePtr = 0xb89c;
+
+// Inventory Object Callback Table (3 byte (id, callbackAddr) * 7) : 0xbb72 to 0xbb86
+const uint16 dsAddr_objCallbackTablePtr = 0xbb72;
+// invItemToolboxFull = csAddr_openFullToolbox
+// invItemToolboxHalfEmpty = csAddr_openHalfEmptyToolbox
+// invItemDiveEquipment = csAddr_useDivingEquipment
+// invItemShovelAct2 = csAddr_digMansionWall
+// 0xff = csAddr_tooDarkHere // TODO: No object has id 0xff - Callback Disabled?
+// invItemBanknote = csAddr_examineBanknote
+// invItemTimePills = csAddr_useTimePills
+
+// Scene Hotspots Table (2 byte LE address * ??) : 0xbb87 to 0x????
+const uint16 dsAddr_sceneHotspotsPtr = 0xbb87;
+
+// Inventory Object Combining Table (5 byte (id, id, new object id, msgAddr) * 34) : 0xc335 to 0xc3de
+const uint16 dsAddr_objCombiningTablePtr = 0xc335;
+// 3 byte null terminator for Combining table 0xc3df to 0xc3e1
+
+// Object Combine Error Message : 0xc3e2 to 0xc41e
+const uint16 dsAddr_objCombineErrorMsg = 0xc3e2; // "Using these two objects ..."
+
+// Inventory (item ids held by Ego) (1 byte * 24) : 0xc48d to 0xc4a4
+const uint16 dsAddr_inventory = 0xc48d;
+// 0xc4a5 is null word alignment byte
+// Inventory item data address table (2 bytes * 92) : 0xc4a6 to 0xc55d
+const uint16 dsAddr_inventoryItemDataPtrTable = 0xc4a6;
+
+// Lans Animation Table (4 byte * ??) : 0xd89e to 0x????
+const uint16 dsAddr_lansAnimationTablePtr = 0xd89e;
+
+// Spoken With Mansion Guard Flag : 0xda96
+// FIXME - This is probably unecessary as although this location is set, it
+// doesn't now appear to be read.
+const uint16 dsAddr_spokenWithMansionGuardFlag = 0xda96; // 1 byte
+// Have Not Spoken With Mansion Guard Flag : 0xda97
+// FIXME - This is probably unecessary as although this location is set, it
+// doesn't now appear to be read.
+const uint16 dsAddr_haveNotSpokenWithMansionGuardFlag = 0xda97; // 1 byte
+
+// Dialog Stack - Pleading with Mansion Guard : 0xdaa6 to 0xdab1
+const uint16 dsAddr_dialogStackPleadingToMansionGuard = 0xdaa6;
+// Dialog Stack - Mansion Guard Drinking : 0xdab2 to 0xdab9
+// FIXME - Can't find where this is used...
+const uint16 dsAddr_dialogStackMansionGuardDrinking = 0xdab2;
+// Dialog Stack - Talking To Sonny : 0xdaba to 0xdac3
+const uint16 dsAddr_dialogStackSonny = 0xdaba;
+// Dialog Stack - Talking To Grandpa : 0xdac4 to 0xdacd
+const uint16 dsAddr_dialogStackGrandpa = 0xdac4;
+// Cave Thorns Cut Down Flag : 0xdaca
+// FIXME - Cave Thorns Flag overlap with dsAddr_dialogStackGrandpa. Bug or typo?
+const uint16 dsAddr_caveThornsCutDownFlag = 0xdaca; // 1 byte
+// Dialog Stack - Trying To Borrow Shotgun From Grandpa : 0xdace to 0xdad3
+const uint16 dsAddr_dialogStackGrandpaShotgun = 0xdace;
+// Dialog Stack - Trying To Borrow Fan From Grandpa : 0xdad4 to 0xdad9
+const uint16 dsAddr_dialogStackGrandpaFan = 0xdad4;
+// Dialog Stack - Ask Old Lady if OK : 0xdada to 0xdaef
+const uint16 dsAddr_dialogStackAskOldLadyOK = 0xdada;
+// Dialog Stack - Talking To Old Lady : 0xdaf0 to 0xdaf5
+const uint16 dsAddr_dialogStackOldLady = 0xdaf0;
+// Dialog Stack - Borrow Duster From Old Lady : 0xdaf6 to 0xdafb
+const uint16 dsAddr_dialogStackBorrowDusterFromOldLady = 0xdaf6;
+// Dialog Stack - Get Old Lady's Apple : 0xdafc to 0xdb01
+const uint16 dsAddr_dialogStackGetAppleOldLady = 0xdafc;
+// Dialog Stack - Giving Another Flower To Anne : 0xdb02 to 0xdb07
+const uint16 dsAddr_dialogStackAnotherFlowerToAnne = 0xdb02;
+// Dialog Stack - Talking To Squirrel : 0xdb08 to 0xdb13
+const uint16 dsAddr_dialogStackSquirrel = 0xdb08;
+// Dialog Stack - Talking To Dog : 0xdb14 to 0xdb1d
+const uint16 dsAddr_dialogStackDog = 0xdb14;
+// Dialog Stack - Take Axe : 0xdb1e to 0xdb23
+const uint16 dsAddr_dialogStackTakeAxe = 0xdb1e;
+// Dialog Stack - Talking To Busy Cook : 0xdb24 to 0xdb2d
+const uint16 dsAddr_dialogStackBusyCook = 0xdb24;
+// Dialog Stack - Talking To Mike the Robot Safe : 0xdb2e to 0xdb35
+const uint16 dsAddr_dialogStackRobotSafe = 0xdb2e;
+// Dialog Stack - Talking To John Noty At Endgame : 0xdb36 to 0xdb3f
+const uint16 dsAddr_dialogStackJohnNotyEndgame = 0xdb36;
+// Dialog Stack - Camp Guard Waiting For Documents : 0xdb40 to 0xdb4b
+const uint16 dsAddr_dialogStackCampGuardWantsDocuments = 0xdb40;
+// Dialog Stack - Camp Guard Reading Soldier News : 0xdb4c to 0xdb55
+const uint16 dsAddr_dialogStackCampGuardReadingNews = 0xdb4c;
+// Dialog Stack - Camp Guard Show Pass : 0xdb56 to 0xdb5b
+const uint16 dsAddr_dialogStackCampGuardShowPass = 0xdb56;
+// Dialog Stack - Jail Door Grates : 0xdb5c to 0xdb67
+const uint16 dsAddr_dialogStackJailDoorGrates = 0xdb5c;
+// Dialog Stack - Talking to Barman : 0xdb68 to 0xdb71
+const uint16 dsAddr_dialogStackBarman = 0xdb68;
+// Dialog Stack - Fall Into Mudpool : 0xdb72 to 0xdb79
+const uint16 dsAddr_dialogStackFallIntoMudpool = 0xdb72;
+// Dialog Stack - Talking To Mudpool Bird : 0xdb7a to 0xdb81
+const uint16 dsAddr_dialogStackMudpoolBird = 0xdb7a;
+// Dialog Stack - Interrogate Captain : 0xdb82 to 0xdb89
+const uint16 dsAddr_dialogStackInterrogateCaptain = 0xdb82;
+// Dialog Stack - Bar Cellar Door : 0xdb8a to 0xdb8f
+const uint16 dsAddr_dialogStackBarCellarDoor = 0xdb8a;
+// Current Music Id Playing : 0xdb90
+const uint16 dsAddr_currentMusic = 0xdb90; // 1 byte
+// Unused Byte : 0xdb91
+// Already Adjusted Hoop Pole Flag : 0xdb92
+const uint16 dsAddr_alreadyAdjustedHoopPoleFlag = 0xdb92; // 1 byte
+// Already Kicked Hen Flag : 0xdb93
+const uint16 dsAddr_alreadyKickedHenFlag = 0xdb93; // 1 byte
+// Already Pulled Trunk Release Lever Flag : 0xdb94
+const uint16 dsAddr_alreadyPulledTrunkReleaseLeverFlag = 0xdb94; // 1 byte
+// Car Trunk Empty Flag : 0xdb95
+const uint16 dsAddr_carTrunkEmptyFlag = 0xdb95; // 1 byte
+// Birds Gone From Scarecrow Flag : 0xdb96
+const uint16 dsAddr_birdsGoneFromScarecrowFlag = 0xdb96; // 1 byte
+// Already Spoken To Anne Flag : 0xdb97
+const uint16 dsAddr_alreadySpokenToAnneFlag = 0xdb97; // 1 byte
+// Flower Isle in Lake State (0 = Both Flowers Present, 1 = One Flower Taken, 2+ = Both Flowers Taken): 0xdb98
+const uint16 dsAddr_flowerIsleState = 0xdb98; // 1 byte
+// Already Got Broken Paddle Flag : 0xdb99
+const uint16 dsAddr_alreadyGotBrokenPaddleFlag = 0xdb99; // 1 byte
+// Given Flower To OldLady Already Flag : 0xdb9a
+const uint16 dsAddr_givenFlowerToOldLadyAlreadyFlag = 0xdb9a; // 1 byte
+// Given Flower To Anne Already Flag : 0xdb9b
+const uint16 dsAddr_givenFlowerToAnneAlreadyFlag = 0xdb9b; // 1 byte
+// Scared Guard Already Flag : 0xdb9c
+const uint16 dsAddr_scaredGuardAlreadyFlag = 0xdb9c; // 1 byte
+// Got Needle Already Flag : 0xdb9d
+const uint16 dsAddr_gotNeedleAlreadyFlag = 0xdb9d; // 1 byte
+// Got Potato Already Flag : 0xdb9e
+const uint16 dsAddr_gotPotatoAlreadyFlag = 0xdb9e; // 1 byte
+// Bees Gone Flag : 0xdb9f
+const uint16 dsAddr_beesGoneFlag = 0xdb9f; // 1 byte
+// Mansion Already Been Through Tunnel Flag : 0xdba0
+const uint16 dsAddr_mansionTunnelDoneFlag = 0xdba0; // 1 byte
+// Mansion Tree Hollow Empty Flag : 0xdba1
+const uint16 dsAddr_mansionTreeHollowEmptyFlag = 0xdba1; // 1 byte
+// Climbed Mansion Tree Already Flag : 0xdba2
+const uint16 dsAddr_climbedMansionTreeAlreadyFlag = 0xdba2; // 1 byte
+// Cellar Door Open Flag : 0xdba3
+const uint16 dsAddr_cellarDoorOpenFlag = 0xdba3; // 1 byte
+// Cellar Light On Flag : 0xdba4
+const uint16 dsAddr_lightOnFlag = 0xdba4; // 1 byte
+// Laundry State (0 = Wet on Line, 1 = Dry on Line, 2 = Not Present): 0xdba5
+const uint16 dsAddr_laundryState = 0xdba5; // 1 byte
+// Lake Diving Exit Message (0 to 5+) : 0xdba6
+const uint16 dsAddr_lakeDivingExitMessage = 0xdba6; // 1 byte
+// Searched Grandpa Drawers Flag : 0xdba7
+const uint16 dsAddr_SearchedGrandpaDrawersFlag = 0xdba7; // 1 byte
+// Hankerchief in Mousehole Flag : 0xdba8
+const uint16 dsAddr_HankerchiefInMouseholeFlag = 0xdba8; // 1 byte
+// Mouse Hole State : 0xdba9, 0 = Mouse Gone, 1 = Mouse Trapped, 2 = Mouse Success(?)
+const uint16 dsAddr_mouseHoleState = 0xdba9; // 1 byte
+// Mouse Nerve Message Said Flag : 0xdbaa
+const uint16 dsAddr_mouseNerveMsgSaidFlag = 0xdbaa; // 1 byte
+// Mouse Already Got Gold Nugget Flag : 0xdbab
+const uint16 dsAddr_mouseGotGoldNuggetFlag = 0xdbab; // 1 byte
+// Unused Byte : 0xdbac
+// Dog Has Bone Flag : 0xdbad
+const uint16 dsAddr_dogHasBoneFlag = 0xdbad; // 1 byte
+// Ego Already Scared By Spider Flag : 0xdbae
+const uint16 dsAddr_egoAlreadyScaredBySpiderFlag = 0xdbae; // 1 byte
+// Already Said That Anne is Beautiful Flag : 0xdbaf
+const uint16 dsAddr_alreadySaidAnneBeautifulFlag = 0xdbaf; // 1 byte
+// Squirrel's Nut State (0 = Nut in Tree, 1 = Nut in Grass, 2 = Nut Found with Rake) : 0xdbb0
+const uint16 dsAddr_squirrelNutState = 0xdbb0; // 1 byte
+// Nut Swapped For Apple in Fruit Bowl Flag : 0xdbb1
+const uint16 dsAddr_nutSwappedForAppleFlag = 0xdbb1; // 1 byte
+// Spoken To Man In Well Flag : 0xdbb2
+const uint16 dsAddr_spokenToManInWellFlag = 0xdbb2; // 1 byte
+// Spoken To Mirror Flag : 0xdbb3
+const uint16 dsAddr_spokenToMirrorFlag = 0xdbb3; // 1 byte
+// Cellar Shelves Examine Count (0 to 2(clamped))) : 0xdbb4
+const uint16 dsAddr_cellarShelfExamineCount = 0xdbb4; // 1 byte
+// Examined Bank Note Flag : 0xdbb5
+const uint16 dsAddr_examinedBanknoteFlag = 0xdbb5; // 1 byte
+// VGA Artist Quip Already Said Flag : 0xdbb6
+const uint16 dsAddr_vgaArtistQuipAlreadySaidFlag = 0xdbb6; // 1 byte
+// Mansion Desk Blue Drawer Open Flag : 0xdbb7
+const uint16 dsAddr_blueDrawerOpenFlag = 0xdbb7; // 1 byte
+// Mansion Desk Red Drawer Open Flag : 0xdbb8
+const uint16 dsAddr_redDrawerOpenFlag = 0xdbb8; // 1 byte
+// Mansion Desk Grey Drawer Open Flag : 0xdbb9
+const uint16 dsAddr_greyDrawerOpenFlag = 0xdbb9; // 1 byte
+// Mansion Desk Green Drawer Open Flag : 0xdbba
+const uint16 dsAddr_greenDrawerOpenFlag = 0xdbba; // 1 byte
+// Mansion Desk Brown Drawer Open Flag : 0xdbbb
+const uint16 dsAddr_brownDrawerOpenFlag = 0xdbbb; // 1 byte
+// Mansion Desk Pink Drawer Open Flag : 0xdbbc
+const uint16 dsAddr_pinkDrawerOpenFlag = 0xdbbc; // 1 byte
+// Mansion Colored Drawer Puzzle Hint Message Given Flag : 0xdbbd
+const uint16 dsAddr_drawerPuzzleHintGivenFlag = 0xdbbd; // 1 byte
+// Mansion Colored Drawer Got Dictaphone Flag : 0xdbbe
+const uint16 dsAddr_drawerGotDictaphoneFlag = 0xdbbe; // 1 byte
+// Mansion Colored Drawer Got Polaroid Flag : 0xdbbf
+const uint16 dsAddr_drawerGotPolaroidFlag = 0xdbbf; // 1 byte
+// Mansion Colored Drawer Puzzle Book Message Flag : 0xdbc0
+const uint16 dsAddr_drawerPuzzleBookMessageFlag = 0xdbc0; // 1 byte
+// Mansion Colored Drawer Puzzle - Random Book Color Value (0 = No Book, 1 to 6 = Books) : 0xdbc1
+const uint16 dsAddr_drawerPuzzleBookValue = 0xdbc1; // 1 byte
+// Mansion Colored Drawer Puzzle Solved Flag : 0xdbc2
+const uint16 dsAddr_drawerPuzzleSolvedFlag = 0xdbc2; // 1 byte
+// Mansion Trashcan Searched Flag : 0xdbc3
+const uint16 dsAddr_mansionTrashcanSearchedFlag = 0xdbc3; // 1 byte
+// Mansion Read Newspaper Flag : 0xdbc4
+const uint16 dsAddr_mansionReadNewspaperFlag = 0xdbc4; // 1 byte
+// Mansion TV On Flag : 0xdbc5
+const uint16 dsAddr_mansionTVOnFlag = 0xdbc5; // 1 byte
+// Mansion VCR Playing Tape Flag : 0xdbc6
+const uint16 dsAddr_mansionVCRPlayingTapeFlag = 0xdbc6; // 1 byte
+// Mansion VCR Played Tape Before Flag : 0xdbc7
+const uint16 dsAddr_mansionVCRPlayedTapeBeforeFlag = 0xdbc7; // 1 byte
+// Mansion VCR Tape Loaded Flag : 0xdbc8
+const uint16 dsAddr_mansionVCRTapeLoadedFlag = 0xdbc8; // 1 byte
+// Mansion Examined Couch Before Flag : 0xdbc9
+const uint16 dsAddr_mansionExaminedCouchBeforeFlag = 0xdbc9; // 1 byte
+// Mansion Used Polaroid on TV Flag : 0xdbca
+const uint16 dsAddr_usedPolaroidOnTVFlag = 0xdbca; // 1 byte
+// Mansion Used Dictaphone on TV Flag : 0xdbcb
+const uint16 dsAddr_usedDictaphoneOnTVFlag = 0xdbcb; // 1 byte
+// Mansion Cook Gone Flag : 0xdbcc
+const uint16 dsAddr_MansionCookGoneFlag = 0xdbcc; // 1 byte
+// Mansion Radio Broken Flag : 0xdbcd
+const uint16 dsAddr_MansionRadioBrokenFlag = 0xdbcd; // 1 byte
+// Mansion Got Radio Batteries Flag : 0xdbce
+const uint16 dsAddr_MansionGotRadioBatteriesFlag = 0xdbce; // 1 byte
+// Mansion Have Opened Fridge Before Flag : 0xdbcf
+const uint16 dsAddr_MansionHaveOpenedFridgeBeforeFlag = 0xdbcf; // 1 byte
+// Mansion Put Burning Paper In Fridge Flag : 0xdbd0
+const uint16 dsAddr_MansionPutBurningPaperInFridgeFlag = 0xdbd0; // 1 byte
+// Mansion Robot Safe Unlocked Flag : 0xdbd1
+const uint16 dsAddr_MansionRobotSafeUnlockedFlag = 0xdbd1; // 1 byte
+// Mansion Robot Safe Voice Test Passed Flag : 0xdbd2
+const uint16 dsAddr_MansionRobotSafeVoiceTestPassedFlag = 0xdbd2; // 1 byte
+// Mansion Robot Safe Scent Test Passed Flag : 0xdbd3
+const uint16 dsAddr_MansionRobotSafeScentTestPassedFlag = 0xdbd3; // 1 byte
+// Mansion Robot Safe View Test Passed Flag : 0xdbd4
+const uint16 dsAddr_MansionRobotSafeViewTestPassedFlag = 0xdbd4; // 1 byte
+// Mansion John Noty Outside Bathroom Flag : 0xdbd5
+const uint16 dsAddr_MansionJohnNotyOutsideBathroomFlag = 0xdbd5; // 1 byte
+// Mansion Sink State (0 - No Plug, Sink Empty, 1 - Plug, Sink Empty, 2 - Plug, Sink Full) : 0xdbd6
+const uint16 dsAddr_MansionSinkState = 0xdbd6; // 1 byte
+// Mansion Through Fan By Time Pill Flag : 0xdbd7
+const uint16 dsAddr_MansionThruFanByTimePillFlag = 0xdbd7; // 1 byte
+// Mansion Ventilator Fan Stopped Flag : 0xdbd8
+const uint16 dsAddr_MansionVentFanStoppedFlag = 0xdbd8; // 1 byte
+// Mansion John Noty Escaping Flag : 0xdbd9
+const uint16 dsAddr_MansionJohnNotyEscapingFlag = 0xdbd9; // 1 byte
+// Shown Pass To Guard Flag : 0xdbda
+const uint16 dsAddr_ShownPassToGuardFlag = 0xdbda; // 1 byte
+// Graffiti Message Id (0 to 6) : 0xdbdb
+const uint16 dsAddr_graffitiMsgId = 0xdbdb; // 1 byte
+// Got Food Bowl in Jail Flag : 0xdbdc
+const uint16 dsAddr_GotFoodBowlInJailFlag = 0xdbdc; // 1 byte
+// Jail Cable and Bowl State (0 = Cable not in Bowl, 1 = Cable in Bowl, 2 = Bowl Electrified 3 = Captain Shocked) : 0xdbdd
+const uint16 dsAddr_JailCableAndBowlState = 0xdbdd; // 1 byte
+// Got Jail Key Flag : 0xdbde
+const uint16 dsAddr_GotJailKeyFlag = 0xdbde; // 1 byte
+// First Act Trial State (0 = Before First Trial, 1 to 3 = Trial 1st to 3rd) : 0xdbdf
+const uint16 dsAddr_FirstActTrialState = 0xdbdf; // 1 byte
+// Already Tickled Captain Flag : 0xdbe0
+const uint16 dsAddr_AlreadyTickledCaptainFlag = 0xdbe0; // 1 byte
+// Cut Fence Flag : 0xdbe1
+const uint16 dsAddr_cutFenceFlag = 0xdbe1; // 1 byte
+// Act 1 Guard State (0 = Normal, 1 = With Kaleidoscope & Grenade, 2 = Kaleidoscope & No Grenade) : 0xdbe2
+const uint16 dsAddr_act1GuardState = 0xdbe2; // 1 byte
+// Spoken to Barman About Third Trial Flag : 0xdbe3
+const uint16 dsAddr_spokeToBarmanAboutThirdTrialFlag = 0xdbe3; // 1 byte
+// Got Mug Of Mud Flag : 0xdbe4
+const uint16 dsAddr_gotMugOfMudFlag = 0xdbe4; // 1 byte
+// Got Rope In Act 1 Flag : 0xdbe5
+const uint16 dsAddr_gotRopeAct1Flag = 0xdbe5; // 1 byte
+// Captain Drawer State : 0xdbe6
+const uint16 dsAddr_captainDrawerState = 0xdbe6; // 1 byte
+// Bird on Bar Radio Antenna Flag : 0xdbe7
+const uint16 dsAddr_birdOnBarRadioAntennaFlag = 0xdbe7; // 1 byte
+// Swapped Barman Mug Flag : 0xdbe8
+const uint16 dsAddr_swappedBarmanMugFlag = 0xdbe8; // 1 byte
+// Barman Passed Out Flag : 0xdbe9
+const uint16 dsAddr_barmanPassedOutFlag = 0xdbe9; // 1 byte
+// Counter for Mansion Intrusion Attempts : 0xdbea
+const uint16 dsAddr_mansionEntryCount = 0xdbea;// 1 byte
+// Unused Byte : 0xdbeb
+// John Noty Outside Mansion Door Flag : 0xdbec
+const uint16 dsAddr_johnNotyOutsideMansionDoorFlag = 0xdbec; // 1 byte
+// Unused Byte : 0xdbed
+// Lovestruck By Anne Flag : 0xdbee
+const uint16 dsAddr_lovestruckByAnneFlag = 0xdbee;// 1 byte
+// Mansion Handle in Door Hole Flag : 0xdbef
+const uint16 dsAddr_mansionHandleInDoorHoleFlag = 0xdbef;// 1 byte
+// Got Password Need to Speak To Barman Flag : 0xdbf0
+const uint16 dsAddr_gotPasswordNeedSpeakBarmanFlag = 0xdbf0; // 1 byte
+// Mansion Already Used Time Pills Flag : 0xdbf1
+const uint16 dsAddr_mansionAlreadyUsedTimePillsFlag = 0xdbf1; // 1 byte
+
+// Intro Credits #1 : 0xe3c2 to 0xe3e5 (Read Only)
+const uint16 dsAddr_introCredits1 = 0xe3c2; // "backgrounds ..."
+// Intro Credits #2 : 0xe3e6 to 0xe3fe (Read Only)
+const uint16 dsAddr_introCredits2 = 0xe3e6; // "music ..."
+// Intro Credits #3 : 0xe3ff to 0xe42e (Read Only)
+const uint16 dsAddr_introCredits3 = 0xe3ff; // "animation..."
+// Intro Credits #4 : 0xe42f to 0xe45b (Read Only)
+const uint16 dsAddr_introCredits4 = 0xe42f; // "programming..."
+// Credits #5 : 0xe45c to 0xe47b (Read Only)
+const uint16 dsAddr_credits5 = 0xe45c; // "after the tiring journey..."
+// Final Credits #6 : 0xe47c to 0xe487 (Read Only)
+const uint16 dsAddr_finalCredits6 = 0xe47c; // "THE END..."
+// Final Credits #7 : 0xe488 to 0xe782 (Read Only)
+const uint16 dsAddr_finalCredits7 = 0xe488; // "programming..."
+// 0xe783 to 0xe78f: 13 null bytes at end of dseg data - segment alignment padding?
+
class Resources {
-protected:
- Resources();
public:
- static Resources *instance();
+ Resources();
+ ~Resources();
bool loadArchives(const ADGameDescription *gd);
- void deinit();
+
void loadOff(Graphics::Surface &surface, byte *palette, int id);
Common::SeekableReadStream *loadLan(uint32 id) const;
Common::SeekableReadStream *loadLan000(uint32 id) const;
- //void loadOn(Graphics::Surface &surface, int id, uint16 &dst, uint16 *flags);
- //void loadOns(Graphics::Surface &surface, int id, uint16 &dst);
/*
* PSP (as the other sony playstation consoles - to be confirmed and 'ifdef'ed here too)
@@ -56,8 +1182,17 @@ public:
FilePack off, on, ons, lan000, lan500, sam_mmm, sam_sam, mmm, voices;
#endif
- Segment cseg, dseg, eseg;
+ Segment dseg;
Font font7, font8;
+
+ //const byte *getDialog(uint16 dialogNum) { return eseg.ptr(dialogOffsets[dialogNum]); }
+ uint16 getDialogAddr(uint16 dialogNum) { return dialogOffsets[dialogNum]; }
+
+ Segment eseg;
+private:
+ void precomputeDialogOffsets();
+
+ Common::Array<uint16> dialogOffsets;
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 038c8ea05e..bdeb11a841 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -21,6 +21,7 @@
#include "common/config-manager.h"
#include "common/debug.h"
+#include "common/events.h"
#include "common/algorithm.h"
#include "common/ptr.h"
#include "common/textconsole.h"
@@ -28,24 +29,23 @@
#include "graphics/palette.h"
#include "teenagent/scene.h"
+#include "teenagent/inventory.h"
#include "teenagent/resources.h"
#include "teenagent/surface.h"
#include "teenagent/objects.h"
#include "teenagent/teenagent.h"
-#include "teenagent/dialog.h"
#include "teenagent/music.h"
namespace TeenAgent {
-Scene::Scene(TeenAgentEngine *engine, OSystem *system) : intro(false), _id(0), ons(0),
- orientation(kActorRight), actor_talking(false),
- message_timer(0), message_first_frame(0), message_last_frame(0), message_animation(NULL),
- current_event(SceneEvent::kNone), hide_actor(false), callback(0), callback_timer(0), _idle_timer(0) {
- _engine = engine;
- _system = system;
+Scene::Scene(TeenAgentEngine *vm) : _vm(vm), intro(false), _id(0), ons(0),
+ orientation(kActorRight), actorTalking(false), teenagent(vm), teenagentIdle(vm),
+ messageTimer(0), messageFirstFrame(0), messageLastFrame(0), messageAnimation(NULL),
+ currentEvent(SceneEvent::kNone), hideActor(false), callback(0), callbackTimer(0), _idleTimer(0) {
- _fade_timer = 0;
- on_enabled = true;
+ _fadeTimer = 0;
+ _fadeOld = 0;
+ onEnabled = true;
memset(palette, 0, sizeof(palette));
background.pixels = 0;
@@ -65,8 +65,8 @@ Scene::Scene(TeenAgentEngine *engine, OSystem *system) : intro(false), _id(0), o
if (!s)
error("invalid resource data");
- teenagent_idle.load(*s, Animation::kTypeVaria);
- if (teenagent_idle.empty())
+ teenagentIdle.load(*s, Animation::kTypeVaria);
+ if (teenagentIdle.empty())
error("invalid mark animation");
varia.close();
@@ -91,10 +91,10 @@ void Scene::warp(const Common::Point &_point, byte o) {
bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Point &dst) const {
const Common::Array<Walkbox> &scene_walkboxes = walkboxes[_id - 1];
- if (dst.x < 0 || dst.x > 319 || dst.y < 0 || dst.y > 199)
+ if (dst.x < 0 || dst.x >= kScreenWidth || dst.y < 0 || dst.y >= kScreenHeight)
return false;
- debug(1, "findPath %d,%d -> %d,%d", src.x, src.y, dst.x, dst.y);
+ debugC(1, kDebugScene, "findPath %d,%d -> %d,%d", src.x, src.y, dst.x, dst.y);
p.clear();
p.push_back(src);
p.push_back(dst);
@@ -113,7 +113,7 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
break;
const Common::Point &p1 = *i, &p2 = *next;
- debug(1, "%d,%d -> %d,%d", p1.x, p1.y, p2.x, p2.y);
+ debugC(1, kDebugScene, "%d,%d -> %d,%d", p1.x, p1.y, p2.x, p2.y);
Common::List<uint>::iterator wi;
for (wi = boxes.begin(); wi != boxes.end(); ++wi) {
@@ -124,14 +124,14 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
}
w.dump(1);
- debug(1, "%u: intersection mask 0x%04x, searching hints", *wi, mask);
+ debugC(1, kDebugScene, "%u: intersection mask 0x%04x, searching hints", *wi, mask);
int dx = p2.x - p1.x, dy = p2.y - p1.y;
if (dx >= 0) {
- if ((mask & 8) != 0 && w.side_hint[3] != 0) {
- debug(1, "hint left: %u", w.side_hint[3]);
+ if ((mask & 8) != 0 && w.sideHint[3] != 0) {
+ debugC(1, kDebugScene, "hint left: %u", w.sideHint[3]);
Common::Point w1, w2;
- w.rect.side(w1, w2, w.side_hint[3], p1);
- debug(1, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
+ w.rect.side(w1, w2, w.sideHint[3], p1);
+ debugC(1, kDebugScene, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
p.insert(next, w1);
if (mask & 2)
p.insert(next, w2);
@@ -139,11 +139,11 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
break;
}
} else {
- if ((mask & 2) != 0 && w.side_hint[1] != 0) {
- debug(1, "hint right: %u", w.side_hint[1]);
+ if ((mask & 2) != 0 && w.sideHint[1] != 0) {
+ debugC(1, kDebugScene, "hint right: %u", w.sideHint[1]);
Common::Point w1, w2;
- w.rect.side(w1, w2, w.side_hint[1], p1);
- debug(1, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
+ w.rect.side(w1, w2, w.sideHint[1], p1);
+ debugC(1, kDebugScene, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
p.insert(next, w1);
if (mask & 8)
p.insert(next, w2);
@@ -153,11 +153,11 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
}
if (dy >= 0) {
- if ((mask & 1) != 0 && w.side_hint[0] != 0) {
- debug(1, "hint top: %u", w.side_hint[0]);
+ if ((mask & 1) != 0 && w.sideHint[0] != 0) {
+ debugC(1, kDebugScene, "hint top: %u", w.sideHint[0]);
Common::Point w1, w2;
- w.rect.side(w1, w2, w.side_hint[0], p1);
- debug(1, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
+ w.rect.side(w1, w2, w.sideHint[0], p1);
+ debugC(1, kDebugScene, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
p.insert(next, w1);
if (mask & 4)
p.insert(next, w2);
@@ -165,11 +165,11 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
break;
}
} else {
- if ((mask & 4) != 0 && w.side_hint[2] != 0) {
- debug(1, "hint bottom: %u", w.side_hint[2]);
+ if ((mask & 4) != 0 && w.sideHint[2] != 0) {
+ debugC(1, kDebugScene, "hint bottom: %u", w.sideHint[2]);
Common::Point w1, w2;
- w.rect.side(w1, w2, w.side_hint[2], p1);
- debug(1, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
+ w.rect.side(w1, w2, w.sideHint[2], p1);
+ debugC(1, kDebugScene, "hint: %d,%d-%d,%d", w1.x, w1.y, w2.x, w2.y);
p.insert(next, w1);
if (mask & 1)
p.insert(next, w2);
@@ -187,13 +187,13 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi
void Scene::moveTo(const Common::Point &_point, byte orient, bool validate) {
Common::Point point(_point);
- debug(0, "moveTo(%d, %d, %u)", point.x, point.y, orient);
+ debugC(0, kDebugScene, "moveTo(%d, %d, %u)", point.x, point.y, orient);
const Common::Array<Walkbox> &scene_walkboxes = walkboxes[_id - 1];
for (byte i = 0; i < scene_walkboxes.size(); ++i) {
const Walkbox &w = scene_walkboxes[i];
if (w.rect.in(point)) {
- debug(0, "bumped into walkbox %u", i);
+ debugC(0, kDebugScene, "bumped into walkbox %u", i);
w.dump();
byte o = w.orientation;
switch (o) {
@@ -229,7 +229,7 @@ void Scene::moveTo(const Common::Point &_point, byte orient, bool validate) {
}
if (!findPath(path, position, point)) {
- _engine->cancel();
+ _vm->cancel();
return;
}
@@ -237,55 +237,53 @@ void Scene::moveTo(const Common::Point &_point, byte orient, bool validate) {
}
void Scene::loadObjectData() {
- Resources *res = Resources::instance();
-
//loading objects & walkboxes
objects.resize(42);
walkboxes.resize(42);
fades.resize(42);
for (byte i = 0; i < 42; ++i) {
- Common::Array<Object> &scene_objects = objects[i];
- scene_objects.clear();
+ Common::Array<Object> &sceneObjects = objects[i];
+ sceneObjects.clear();
- uint16 scene_table = res->dseg.get_word(0x7254 + i * 2);
- uint16 object_addr;
- while ((object_addr = res->dseg.get_word(scene_table)) != 0) {
+ uint16 sceneTable = _vm->res->dseg.get_word(dsAddr_sceneObjectTablePtr + (i * 2));
+ uint16 objectAddr;
+ while ((objectAddr = _vm->res->dseg.get_word(sceneTable)) != 0) {
Object obj;
- obj.load(res->dseg.ptr(object_addr));
+ obj.load(_vm->res->dseg.ptr(objectAddr));
//obj.dump();
- scene_objects.push_back(obj);
- scene_table += 2;
+ sceneObjects.push_back(obj);
+ sceneTable += 2;
}
- debug(0, "scene[%u] has %u object(s)", i + 1, scene_objects.size());
+ debugC(0, kDebugScene, "scene[%u] has %u object(s)", i + 1, sceneObjects.size());
- byte *walkboxes_base = res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(0x6746 + i * 2)));
- byte walkboxes_n = *walkboxes_base++;
- debug(0, "scene[%u] has %u walkboxes", i + 1, walkboxes_n);
+ byte *walkboxesBase = _vm->res->dseg.ptr(READ_LE_UINT16(_vm->res->dseg.ptr(dsAddr_sceneWalkboxTablePtr + i * 2)));
+ byte walkboxesCount = *walkboxesBase++;
+ debugC(0, kDebugScene, "scene[%u] has %u walkboxes", i + 1, walkboxesCount);
- Common::Array<Walkbox> &scene_walkboxes = walkboxes[i];
- for (byte j = 0; j < walkboxes_n; ++j) {
+ Common::Array<Walkbox> &sceneWalkboxes = walkboxes[i];
+ for (byte j = 0; j < walkboxesCount; ++j) {
Walkbox w;
- w.load(walkboxes_base + 14 * j);
- if ((w.side_hint[0] | w.side_hint[1] | w.side_hint[2] | w.side_hint[3]) == 0) {
- w.side_hint[0] = 2;
- w.side_hint[1] = 3;
- w.side_hint[2] = 4;
- w.side_hint[3] = 1;
+ w.load(walkboxesBase + 14 * j);
+ if ((w.sideHint[0] | w.sideHint[1] | w.sideHint[2] | w.sideHint[3]) == 0) {
+ w.sideHint[0] = 2;
+ w.sideHint[1] = 3;
+ w.sideHint[2] = 4;
+ w.sideHint[3] = 1;
}
//walkbox[i]->dump();
- scene_walkboxes.push_back(w);
+ sceneWalkboxes.push_back(w);
}
- byte *fade_table = res->dseg.ptr(res->dseg.get_word(0x663e + i * 2));
- Common::Array<FadeType> &scene_fades = fades[i];
- while (READ_LE_UINT16(fade_table) != 0xffff) {
+ byte *fadeTable = _vm->res->dseg.ptr(_vm->res->dseg.get_word(dsAddr_sceneFadeTablePtr + i * 2));
+ Common::Array<FadeType> &sceneFades = fades[i];
+ while (READ_LE_UINT16(fadeTable) != 0xffff) {
FadeType fade;
- fade.load(fade_table);
- fade_table += 9;
- scene_fades.push_back(fade);
+ fade.load(fadeTable);
+ fadeTable += 9;
+ sceneFades.push_back(fade);
}
- debug(0, "scene[%u] has %u fadeboxes", i + 1, scene_fades.size());
+ debugC(0, kDebugScene, "scene[%u] has %u fadeboxes", i + 1, sceneFades.size());
}
}
@@ -293,10 +291,10 @@ Object *Scene::findObject(const Common::Point &point) {
if (_id == 0)
return NULL;
- Common::Array<Object> &scene_objects = objects[_id - 1];
+ Common::Array<Object> &sceneObjects = objects[_id - 1];
- for (uint i = 0; i < scene_objects.size(); ++i) {
- Object &obj = scene_objects[i];
+ for (uint i = 0; i < sceneObjects.size(); ++i) {
+ Object &obj = sceneObjects[i];
if (obj.enabled != 0 && obj.rect.in(point))
return &obj;
}
@@ -304,41 +302,38 @@ Object *Scene::findObject(const Common::Point &point) {
}
byte *Scene::getOns(int id) {
- Resources *res = Resources::instance();
- return res->dseg.ptr(res->dseg.get_word(0xb4f5 + (id - 1) * 2));
+ return _vm->res->dseg.ptr(_vm->res->dseg.get_word(dsAddr_onsAnimationTablePtr + (id - 1) * 2));
}
byte *Scene::getLans(int id) {
- Resources *res = Resources::instance();
- return res->dseg.ptr(0xd89e + (id - 1) * 4);
+ return _vm->res->dseg.ptr(dsAddr_lansAnimationTablePtr + (id - 1) * 4);
}
void Scene::loadOns() {
- debug(0, "loading ons animation");
- Resources *res = Resources::instance();
+ debugC(0, kDebugScene, "loading ons animation");
- uint16 addr = res->dseg.get_word(0xb4f5 + (_id - 1) * 2);
- //debug(0, "ons index: %04x", addr);
+ uint16 addr = _vm->res->dseg.get_word(dsAddr_onsAnimationTablePtr + (_id - 1) * 2);
+ debugC(0, kDebugScene, "ons index: %04x", addr);
- ons_count = 0;
+ onsCount = 0;
byte b;
- byte on_id[16];
- while ((b = res->dseg.get_byte(addr)) != 0xff) {
- debug(0, "on: %04x = %02x", addr, b);
+ byte onId[16];
+ while ((b = _vm->res->dseg.get_byte(addr)) != 0xff) {
+ debugC(0, kDebugScene, "on: %04x = %02x", addr, b);
++addr;
if (b == 0)
continue;
- on_id[ons_count++] = b;
+ onId[onsCount++] = b;
}
delete[] ons;
ons = NULL;
- if (ons_count > 0) {
- ons = new Surface[ons_count];
- for (uint32 i = 0; i < ons_count; ++i) {
- Common::ScopedPtr<Common::SeekableReadStream> s(res->ons.getStream(on_id[i]));
+ if (onsCount > 0) {
+ ons = new Surface[onsCount];
+ for (uint32 i = 0; i < onsCount; ++i) {
+ Common::ScopedPtr<Common::SeekableReadStream> s(_vm->res->ons.getStream(onId[i]));
if (s) {
ons[i].load(*s, Surface::kTypeOns);
}
@@ -347,21 +342,20 @@ void Scene::loadOns() {
}
void Scene::loadLans() {
- debug(0, "loading lans animation");
- Resources *res = Resources::instance();
- //load lan000
+ debugC(0, kDebugScene, "loading lans animation");
+ // load lan000
for (byte i = 0; i < 4; ++i) {
animation[i].free();
- uint16 bx = 0xd89e + (_id - 1) * 4 + i;
- byte bxv = res->dseg.get_byte(bx);
- uint16 res_id = 4 * (_id - 1) + i + 1;
- debug(0, "lan[%u]@%04x = %02x, resource id: %u", i, bx, bxv, res_id);
+ uint16 bx = dsAddr_lansAnimationTablePtr + (_id - 1) * 4 + i;
+ byte bxv = _vm->res->dseg.get_byte(bx);
+ uint16 resId = 4 * (_id - 1) + i + 1;
+ debugC(0, kDebugScene, "lan[%u]@%04x = %02x, resource id: %u", i, bx, bxv, resId);
if (bxv == 0)
continue;
- Common::ScopedPtr<Common::SeekableReadStream> s(res->loadLan000(res_id));
+ Common::ScopedPtr<Common::SeekableReadStream> s(_vm->res->loadLan000(resId));
if (s) {
animation[i].load(*s, Animation::kTypeLan);
if (bxv != 0 && bxv != 0xff)
@@ -371,24 +365,23 @@ void Scene::loadLans() {
}
void Scene::init(int id, const Common::Point &pos) {
- debug(0, "init(%d)", id);
+ debugC(0, kDebugScene, "init(%d)", id);
_id = id;
- on_enabled = true; //reset on-rendering flag on loading.
+ onEnabled = true; //reset on-rendering flag on loading.
sounds.clear();
for (byte i = 0; i < 4; ++i)
- custom_animation[i].free();
+ customAnimation[i].free();
if (background.pixels == NULL)
- background.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
+ background.create(kScreenWidth, kScreenHeight, Graphics::PixelFormat::createFormatCLUT8());
warp(pos);
- Resources *res = Resources::instance();
- res->loadOff(background, palette, id);
+ _vm->res->loadOff(background, palette, id);
if (id == 24) {
- //dark scene
- if (res->dseg.get_byte(0xDBA4) != 1) {
- //dim down palette
+ // dark scene
+ if (_vm->res->dseg.get_byte(dsAddr_lightOnFlag) != 1) {
+ // dim down palette
uint i;
for (i = 0; i < 624; ++i) {
palette[i] = palette[i] > 0x20 ? palette[i] - 0x20 : 0;
@@ -399,62 +392,62 @@ void Scene::init(int id, const Common::Point &pos) {
}
}
- Common::ScopedPtr<Common::SeekableReadStream> stream(res->on.getStream(id));
- int sub_hack = 0;
- if (id == 7) { //something patched in the captains room
- switch (res->dseg.get_byte(0xdbe6)) {
+ Common::ScopedPtr<Common::SeekableReadStream> stream(_vm->res->on.getStream(id));
+ int subHack = 0;
+ if (id == 7) { // something patched in the captains room
+ switch (_vm->res->dseg.get_byte(dsAddr_captainDrawerState)) {
case 2:
break;
case 1:
- sub_hack = 1;
+ subHack = 1;
break;
default:
- sub_hack = 2;
+ subHack = 2;
}
}
- on.load(*stream, SurfaceList::kTypeOn, sub_hack);
+ on.load(*stream, subHack);
loadOns();
loadLans();
- //check music
- int now_playing = _engine->music->getId();
+ // check music
+ int nowPlaying = _vm->music->getId();
- if (now_playing != res->dseg.get_byte(0xDB90))
- _engine->music->load(res->dseg.get_byte(0xDB90));
+ if (nowPlaying != _vm->res->dseg.get_byte(dsAddr_currentMusic))
+ _vm->music->load(_vm->res->dseg.get_byte(dsAddr_currentMusic));
- _system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h);
+ _vm->_system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h);
setPalette(0);
}
void Scene::playAnimation(byte idx, uint id, bool loop, bool paused, bool ignore) {
- debug(0, "playAnimation(%u, %u, loop:%s, paused:%s, ignore:%s)", idx, id, loop ? "true" : "false", paused ? "true" : "false", ignore ? "true" : "false");
+ debugC(0, kDebugScene, "playAnimation(%u, %u, loop:%s, paused:%s, ignore:%s)", idx, id, loop ? "true" : "false", paused ? "true" : "false", ignore ? "true" : "false");
assert(idx < 4);
- Common::ScopedPtr<Common::SeekableReadStream> s(Resources::instance()->loadLan(id + 1));
+ Common::ScopedPtr<Common::SeekableReadStream> s(_vm->res->loadLan(id + 1));
if (!s)
error("playing animation %u failed", id);
- custom_animation[idx].load(*s);
- custom_animation[idx].loop = loop;
- custom_animation[idx].paused = paused;
- custom_animation[idx].ignore = ignore;
+ customAnimation[idx].load(*s);
+ customAnimation[idx].loop = loop;
+ customAnimation[idx].paused = paused;
+ customAnimation[idx].ignore = ignore;
}
void Scene::playActorAnimation(uint id, bool loop, bool ignore) {
- debug(0, "playActorAnimation(%u, loop:%s, ignore:%s)", id, loop ? "true" : "false", ignore ? "true" : "false");
- Common::ScopedPtr<Common::SeekableReadStream> s(Resources::instance()->loadLan(id + 1));
+ debugC(0, kDebugScene, "playActorAnimation(%u, loop:%s, ignore:%s)", id, loop ? "true" : "false", ignore ? "true" : "false");
+ Common::ScopedPtr<Common::SeekableReadStream> s(_vm->res->loadLan(id + 1));
if (!s)
error("playing animation %u failed", id);
- actor_animation.load(*s);
- actor_animation.loop = loop;
- actor_animation.ignore = ignore;
- actor_animation.id = id;
+ actorAnimation.load(*s);
+ actorAnimation.loop = loop;
+ actorAnimation.ignore = ignore;
+ actorAnimation.id = id;
}
Animation *Scene::getAnimation(byte slot) {
assert(slot < 4);
- return custom_animation + slot;
+ return customAnimation + slot;
}
byte Scene::peekFlagEvent(uint16 addr) const {
@@ -463,17 +456,17 @@ byte Scene::peekFlagEvent(uint16 addr) const {
if (e.type == SceneEvent::kSetFlag && e.callback == addr)
return e.color;
}
- return Resources::instance()->dseg.get_byte(addr);
+ return _vm->res->dseg.get_byte(addr);
}
void Scene::push(const SceneEvent &event) {
- //debug(0, "push");
+ debugC(0, kDebugScene, "push");
//event.dump();
if (event.type == SceneEvent::kWalk && !events.empty()) {
SceneEvent &prev = events.back();
if (prev.type == SceneEvent::kWalk && prev.color == event.color) {
- debug(0, "fixing double-move [skipping event!]");
- if ((event.color & 2) != 0) { //relative move
+ debugC(0, kDebugScene, "fixing double-move [skipping event!]");
+ if ((event.color & 2) != 0) { // relative move
prev.dst.x += event.dst.x;
prev.dst.y += event.dst.y;
} else {
@@ -489,7 +482,7 @@ bool Scene::processEvent(const Common::Event &event) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_RBUTTONDOWN:
- if (!message.empty() && message_first_frame == 0) {
+ if (!message.empty() && messageFirstFrame == 0) {
clearMessage();
nextEvent();
return true;
@@ -505,16 +498,16 @@ bool Scene::processEvent(const Common::Event &event) {
clearMessage();
events.clear();
sounds.clear();
- current_event.clear();
- message_color = 0xd1;
+ currentEvent.clear();
+ messageColor = textColorMark;
for (int i = 0; i < 4; ++i)
- custom_animation[i].free();
- _engine->playMusic(4);
- _engine->loadScene(10, Common::Point(136, 153));
+ customAnimation[i].free();
+ _vm->playMusic(4);
+ _vm->loadScene(10, Common::Point(136, 153));
return true;
}
- if (!message.empty() && message_first_frame == 0) {
+ if (!message.empty() && messageFirstFrame == 0) {
clearMessage();
nextEvent();
return true;
@@ -534,8 +527,8 @@ bool Scene::processEvent(const Common::Event &event) {
if (event.kbd.flags & Common::KBD_CTRL) {
uint feature = event.kbd.keycode - '1';
if (feature < DebugFeatures::kMax) {
- debug_features.feature[feature] = !debug_features.feature[feature];
- debug(0, "switched feature %u %s", feature, debug_features.feature[feature] ? "on" : "off");
+ debugFeatures.feature[feature] = !debugFeatures.feature[feature];
+ debugC(0, kDebugScene, "switched feature %u %s", feature, debugFeatures.feature[feature] ? "on" : "off");
}
}
break;
@@ -556,25 +549,22 @@ struct ZOrderCmp {
};
int Scene::lookupZoom(uint y) const {
- Resources *res = Resources::instance();
- for (byte *zoom_table = res->dseg.ptr(res->dseg.get_word(0x70f4 + (_id - 1) * 2));
- zoom_table[0] != 0xff && zoom_table[1] != 0xff;
- zoom_table += 2) {
- //debug(0, "%d %d->%d", y, zoom_table[0], zoom_table[1]);
- if (y <= zoom_table[0]) {
- //debug(0, "%d %d->%d", y, zoom_table[0], zoom_table[1]);
- return 256u * (100 - zoom_table[1]) / 100;
+ debugC(2, kDebugScene, "lookupZoom(%d)", y);
+ for (byte *zoomTable = _vm->res->dseg.ptr(_vm->res->dseg.get_word(dsAddr_sceneZoomTablePtr + (_id - 1) * 2));
+ zoomTable[0] != 0xff && zoomTable[1] != 0xff;
+ zoomTable += 2) {
+ debugC(2, kDebugScene, "\t%d %d->%d", y, zoomTable[0], zoomTable[1]);
+ if (y <= zoomTable[0]) {
+ return 256u * (100 - zoomTable[1]) / 100;
}
}
return 256;
}
-
void Scene::paletteEffect(byte step) {
- Resources *res = Resources::instance();
- byte *src = res->dseg.ptr(0x6609);
- byte *dst = palette + 3 * 0xf2;
- for (byte i = 0; i < 0xd; ++i) {
+ byte *src = _vm->res->dseg.ptr(dsAddr_paletteEffectData);
+ byte *dst = palette + (3 * 242);
+ for (byte i = 0; i < 13; ++i) {
for (byte c = 0; c < 3; ++c, ++src)
*dst++ = *src > step ? *src - step : 0;
}
@@ -584,9 +574,9 @@ byte Scene::findFade() const {
if (_id <= 0)
return 0;
- const Common::Array<FadeType> &scene_fades = fades[_id - 1];
- for (uint i = 0; i < scene_fades.size(); ++i) {
- const FadeType &fade = scene_fades[i];
+ const Common::Array<FadeType> &sceneFades = fades[_id - 1];
+ for (uint i = 0; i < sceneFades.size(); ++i) {
+ const FadeType &fade = sceneFades[i];
if (fade.rect.in(position)) {
return fade.value;
}
@@ -594,110 +584,109 @@ byte Scene::findFade() const {
return 0;
}
-bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
- Resources *res = Resources::instance();
+bool Scene::render(bool tickGame, bool tickMark, uint32 messageDelta) {
bool busy;
bool restart;
- uint32 game_delta = tick_game ? 1 : 0;
- uint32 mark_delta = tick_mark ? 1 : 0;
+ uint32 gameDelta = tickGame ? 1 : 0;
+ uint32 markDelta = tickMark ? 1 : 0;
do {
restart = false;
busy = processEventQueue();
- if (_fade_timer && game_delta != 0) {
- if (_fade_timer > 0) {
- _fade_timer -= game_delta;
- setPalette(_fade_timer);
+ if (_fadeTimer && gameDelta != 0) {
+ if (_fadeTimer > 0) {
+ _fadeTimer -= gameDelta;
+ setPalette(_fadeTimer);
} else {
- _fade_timer += game_delta;
- setPalette(_fade_timer + 4);
+ _fadeTimer += gameDelta;
+ setPalette(_fadeTimer + 4);
}
}
- switch (current_event.type) {
+ switch (currentEvent.type) {
case SceneEvent::kCredits: {
- _system->fillScreen(0);
- ///\todo: optimize me
- Graphics::Surface *surface = _system->lockScreen();
- res->font7.render(surface, current_event.dst.x, current_event.dst.y -= game_delta, current_event.message, current_event.color);
- _system->unlockScreen();
-
- if (current_event.dst.y < -(int)current_event.timer)
- current_event.clear();
+ _vm->_system->fillScreen(0);
+ // TODO: optimize me
+ Graphics::Surface *surface = _vm->_system->lockScreen();
+ _vm->res->font7.render(surface, currentEvent.dst.x, currentEvent.dst.y -= gameDelta, currentEvent.message, currentEvent.color);
+ _vm->_system->unlockScreen();
+
+ if (currentEvent.dst.y < -(int)currentEvent.timer)
+ currentEvent.clear();
}
return true;
default:
;
}
- if (!message.empty() && message_timer != 0) {
- if (message_timer <= delta) {
+ if (!message.empty() && messageTimer != 0) {
+ if (messageTimer <= messageDelta) {
clearMessage();
nextEvent();
continue;
} else
- message_timer -= delta;
+ messageTimer -= messageDelta;
}
- if (current_event.type == SceneEvent::kCreditsMessage) {
- _system->fillScreen(0);
- Graphics::Surface *surface = _system->lockScreen();
- if (current_event.lan == 8) {
- res->font8.shadow_color = current_event.orientation;
- res->font8.render(surface, current_event.dst.x, current_event.dst.y, message, current_event.color);
+ if (currentEvent.type == SceneEvent::kCreditsMessage) {
+ _vm->_system->fillScreen(0);
+ Graphics::Surface *surface = _vm->_system->lockScreen();
+ if (currentEvent.lan == 8) {
+ _vm->res->font8.setShadowColor(currentEvent.orientation);
+ _vm->res->font8.render(surface, currentEvent.dst.x, currentEvent.dst.y, message, currentEvent.color);
} else {
- res->font7.render(surface, current_event.dst.x, current_event.dst.y, message, 0xd1);
+ _vm->res->font7.render(surface, currentEvent.dst.x, currentEvent.dst.y, message, textColorCredits);
}
- _system->unlockScreen();
+ _vm->_system->unlockScreen();
return true;
}
- if (background.pixels && debug_features.feature[DebugFeatures::kShowBack]) {
- _system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h);
+ if (background.pixels && debugFeatures.feature[DebugFeatures::kShowBack]) {
+ _vm->_system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h);
} else
- _system->fillScreen(0);
+ _vm->_system->fillScreen(0);
- Graphics::Surface *surface = _system->lockScreen();
+ Graphics::Surface *surface = _vm->_system->lockScreen();
- bool got_any_animation = false;
+ bool gotAnyAnimation = false;
- if (ons != NULL && debug_features.feature[DebugFeatures::kShowOns]) {
- for (uint32 i = 0; i < ons_count; ++i) {
+ if (ons != NULL && debugFeatures.feature[DebugFeatures::kShowOns]) {
+ for (uint32 i = 0; i < onsCount; ++i) {
Surface *s = ons + i;
if (s != NULL)
s->render(surface);
}
}
- Common::List<Surface *> z_order;
+ Common::List<Surface *> zOrder;
for (byte i = 0; i < 4; ++i) {
- Animation *a = custom_animation + i;
- Surface *s = a->currentFrame(game_delta);
+ Animation *a = customAnimation + i;
+ Surface *s = a->currentFrame(gameDelta);
if (s != NULL) {
if (!a->ignore)
busy = true;
if (!a->paused && !a->loop)
- got_any_animation = true;
+ gotAnyAnimation = true;
} else {
a = animation + i;
- if (!custom_animation[i].empty()) {
- debug(0, "custom animation ended, restart animation in the same slot.");
- custom_animation[i].free();
+ if (!customAnimation[i].empty()) {
+ debugC(0, kDebugScene, "custom animation ended, restart animation in the same slot.");
+ customAnimation[i].free();
a->restart();
}
- s = a->currentFrame(game_delta);
+ s = a->currentFrame(gameDelta);
}
- if (current_event.type == SceneEvent::kWaitLanAnimationFrame && current_event.slot == i) {
+ if (currentEvent.type == SceneEvent::kWaitLanAnimationFrame && currentEvent.slot == i) {
if (s == NULL) {
restart |= nextEvent();
continue;
}
int index = a->currentIndex();
- if (index == current_event.animation) {
- debug(0, "kWaitLanAnimationFrame(%d, %d) complete", current_event.slot, current_event.animation);
+ if (index == currentEvent.animation) {
+ debugC(0, kDebugScene, "kWaitLanAnimationFrame(%d, %d) complete", currentEvent.slot, currentEvent.animation);
restart |= nextEvent();
}
}
@@ -705,8 +694,8 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
if (s == NULL)
continue;
- if (debug_features.feature[DebugFeatures::kShowLan])
- z_order.push_back(s);
+ if (debugFeatures.feature[DebugFeatures::kShowLan])
+ zOrder.push_back(s);
if (a->id == 0)
continue;
@@ -722,38 +711,36 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
}
}
- Common::sort(z_order.begin(), z_order.end(), ZOrderCmp());
- Common::List<Surface *>::iterator z_order_it;
+ Common::sort(zOrder.begin(), zOrder.end(), ZOrderCmp());
+ Common::List<Surface *>::iterator zOrderIter;
- Surface *mark = actor_animation.currentFrame(game_delta);
+ Surface *mark = actorAnimation.currentFrame(gameDelta);
int horizon = position.y;
- for (z_order_it = z_order.begin(); z_order_it != z_order.end(); ++z_order_it) {
- Surface *s = *z_order_it;
+ for (zOrderIter = zOrder.begin(); zOrderIter != zOrder.end(); ++zOrderIter) {
+ Surface *s = *zOrderIter;
if (s->y + s->h > horizon)
break;
s->render(surface);
}
if (mark != NULL) {
- actor_animation_position = mark->render(surface);
- if (!actor_animation.ignore)
+ actorAnimationPosition = mark->render(surface);
+ if (!actorAnimation.ignore)
busy = true;
else
busy = false;
- got_any_animation = true;
- } else if (!hide_actor) {
- actor_animation.free();
+ gotAnyAnimation = true;
+ } else if (!hideActor) {
+ actorAnimation.free();
uint zoom = lookupZoom(position.y);
- {
- byte fade = findFade();
- static byte old_fade = 0;
- if (fade != old_fade) {
- old_fade = fade;
- paletteEffect(fade);
- if (_fade_timer == 0)
- setPalette(4);
- }
+
+ byte fade = findFade();
+ if (fade != _fadeOld) {
+ _fadeOld = fade;
+ paletteEffect(fade);
+ if (_fadeTimer == 0)
+ setPalette(4);
}
if (!path.empty()) {
@@ -767,31 +754,31 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
o = dp.y > 0 ? kActorDown : kActorUp;
}
- if (tick_mark) {
- int speed_x = zoom / 32; //8 * zoom / 256
- int speed_y = (o == kActorDown || o == kActorUp ? 2 : 1) * zoom / 256;
- if (speed_x == 0)
- speed_x = 1;
- if (speed_y == 0)
- speed_y = 1;
+ if (tickMark) {
+ int speedX = zoom / 32; // 8 * zoom / 256
+ int speedY = (o == kActorDown || o == kActorUp ? 2 : 1) * zoom / 256;
+ if (speedX == 0)
+ speedX = 1;
+ if (speedY == 0)
+ speedY = 1;
- position.y += (ABS(dp.y) < speed_y ? dp.y : SIGN(dp.y) * speed_y);
+ position.y += (ABS(dp.y) < speedY ? dp.y : SIGN(dp.y) * speedY);
position.x += (o == kActorDown || o == kActorUp) ?
- (ABS(dp.x) < speed_y ? dp.x : SIGN(dp.x) * speed_y) :
- (ABS(dp.x) < speed_x ? dp.x : SIGN(dp.x) * speed_x);
+ (ABS(dp.x) < speedY ? dp.x : SIGN(dp.x) * speedY) :
+ (ABS(dp.x) < speedX ? dp.x : SIGN(dp.x) * speedX);
}
- _idle_timer = 0;
- teenagent_idle.resetIndex();
- actor_animation_position = teenagent.render(surface, position, o, mark_delta, false, zoom);
+ _idleTimer = 0;
+ teenagentIdle.resetIndex();
+ actorAnimationPosition = teenagent.render(surface, position, o, markDelta, false, zoom);
- if (tick_mark && position == destination) {
+ if (tickMark && position == destination) {
path.pop_front();
if (path.empty()) {
if (orientation == 0)
- orientation = o; //save last orientation
+ orientation = o; // save last orientation
nextEvent();
- got_any_animation = true;
+ gotAnyAnimation = true;
restart = true;
}
busy = true;
@@ -799,65 +786,63 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
busy = true;
} else {
teenagent.resetIndex();
- _idle_timer += mark_delta;
- if (_idle_timer < 50)
- actor_animation_position = teenagent.render(surface, position, orientation, 0, actor_talking, zoom);
+ _idleTimer += markDelta;
+ if (_idleTimer < 50)
+ actorAnimationPosition = teenagent.render(surface, position, orientation, 0, actorTalking, zoom);
else
- actor_animation_position = teenagent_idle.renderIdle(surface, position, orientation, mark_delta, zoom, _engine->_rnd);
+ actorAnimationPosition = teenagentIdle.renderIdle(surface, position, orientation, markDelta, zoom, _vm->_rnd);
}
}
if (restart) {
- _system->unlockScreen();
+ _vm->_system->unlockScreen();
continue;
}
- //removed mark == null. In final scene of chapter 2 mark rendered above table.
- //if it'd cause any bugs, add hack here. (_id != 23 && mark == NULL)
- if (on_enabled &&
- debug_features.feature[DebugFeatures::kShowOn]) {
- on.render(surface, actor_animation_position);
- }
+ // removed mark == null. In final scene of chapter 2 mark rendered above table.
+ // if it'd cause any bugs, add hack here. (_id != 23 && mark == NULL)
+ if (onEnabled && debugFeatures.feature[DebugFeatures::kShowOn])
+ on.render(surface, actorAnimationPosition);
- for (; z_order_it != z_order.end(); ++z_order_it) {
- Surface *s = *z_order_it;
+ for (; zOrderIter != zOrder.end(); ++zOrderIter) {
+ Surface *s = *zOrderIter;
s->render(surface);
}
if (!message.empty()) {
bool visible = true;
- if (message_first_frame != 0 && message_animation != NULL) {
- int index = message_animation->currentIndex() + 1;
- //debug(0, "message: %s first: %u index: %u", message.c_str(), message_first_frame, index);
- if (index < message_first_frame)
+ if (messageFirstFrame != 0 && messageAnimation != NULL) {
+ int index = messageAnimation->currentIndex() + 1;
+ debugC(0, kDebugScene, "message: %s first: %u index: %u", message.c_str(), messageFirstFrame, index);
+ if (index < messageFirstFrame)
visible = false;
- if (index > message_last_frame) {
+ if (index > messageLastFrame) {
clearMessage();
visible = false;
}
}
if (visible) {
- res->font7.render(surface, message_pos.x, message_pos.y, message, message_color);
+ _vm->res->font7.render(surface, messagePos.x, messagePos.y, message, messageColor);
busy = true;
}
}
- if (!busy && !restart && tick_game && callback_timer) {
- if (--callback_timer == 0) {
- if (_engine->inventory->active())
- _engine->inventory->activate(false);
- _engine->processCallback(callback);
+ if (!busy && !restart && tickGame && callbackTimer) {
+ if (--callbackTimer == 0) {
+ if (_vm->inventory->active())
+ _vm->inventory->activate(false);
+ _vm->processCallback(callback);
}
- //debug(0, "callback timer = %u", callback_timer);
+ debugC(0, kDebugScene, "callback timer = %u", callbackTimer);
}
//if (!current_event.empty())
// current_event.dump();
- if (!debug_features.feature[DebugFeatures::kHidePath]) {
- const Common::Array<Walkbox> & scene_walkboxes = walkboxes[_id - 1];
- for (uint i = 0; i < scene_walkboxes.size(); ++i) {
- scene_walkboxes[i].rect.render(surface, 0xd0 + i);
+ if (!debugFeatures.feature[DebugFeatures::kHidePath]) {
+ const Common::Array<Walkbox> & sceneWalkboxes = walkboxes[_id - 1];
+ for (uint i = 0; i < sceneWalkboxes.size(); ++i) {
+ sceneWalkboxes[i].rect.render(surface, 0xd0 + i);
}
Common::Point last_p = position;
@@ -872,39 +857,39 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
}
}
- _system->unlockScreen();
+ _vm->_system->unlockScreen();
- if (current_event.type == SceneEvent::kWait) {
- if (current_event.timer > delta) {
+ if (currentEvent.type == SceneEvent::kWait) {
+ if (currentEvent.timer > messageDelta) {
busy = true;
- current_event.timer -= delta;
+ currentEvent.timer -= messageDelta;
}
- if (current_event.timer <= delta)
+ if (currentEvent.timer <= messageDelta)
restart |= nextEvent();
}
- if (!restart && current_event.type == SceneEvent::kWaitForAnimation && !got_any_animation) {
- debug(0, "no animations, nextevent");
+ if (!restart && currentEvent.type == SceneEvent::kWaitForAnimation && !gotAnyAnimation) {
+ debugC(0, kDebugScene, "no animations, nextevent");
nextEvent();
restart = true;
}
if (busy) {
- _idle_timer = 0;
- teenagent_idle.resetIndex();
+ _idleTimer = 0;
+ teenagentIdle.resetIndex();
}
} while (restart);
for (Sounds::iterator i = sounds.begin(); i != sounds.end();) {
Sound &sound = *i;
if (sound.delay == 0) {
- debug(1, "sound %u started", sound.id);
- _engine->playSoundNow(sound.id);
+ debugC(1, kDebugScene, "sound %u started", sound.id);
+ _vm->playSoundNow(sound.id);
i = sounds.erase(i);
} else {
- sound.delay -= game_delta;
+ sound.delay -= gameDelta;
++i;
}
}
@@ -913,363 +898,364 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
}
bool Scene::processEventQueue() {
- while (!events.empty() && current_event.empty()) {
- //debug(0, "processing next event");
- current_event = events.front();
+ while (!events.empty() && currentEvent.empty()) {
+ debugC(0, kDebugScene, "processing next event");
+ currentEvent = events.front();
events.pop_front();
- switch (current_event.type) {
+ switch (currentEvent.type) {
case SceneEvent::kSetOn: {
- byte on_id = current_event.ons;
- if (on_id != 0) {
- --on_id;
- byte *ptr = getOns(current_event.scene == 0 ? _id : current_event.scene);
- debug(0, "on[%u] = %02x", on_id, current_event.color);
- ptr[on_id] = current_event.color;
+ byte onId = currentEvent.ons;
+ if (onId != 0) {
+ --onId;
+ byte *ptr = getOns(currentEvent.scene == 0 ? _id : currentEvent.scene);
+ debugC(0, kDebugScene, "on[%u] = %02x", onId, currentEvent.color);
+ ptr[onId] = currentEvent.color;
} else {
- on_enabled = current_event.color != 0;
- debug(0, "%s on rendering", on_enabled ? "enabling" : "disabling");
+ onEnabled = currentEvent.color != 0;
+ debugC(0, kDebugScene, "%s on rendering", onEnabled ? "enabling" : "disabling");
}
loadOns();
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kSetLan: {
- if (current_event.lan != 0) {
- debug(0, "lan[%u] = %02x", current_event.lan - 1, current_event.color);
- byte *ptr = getLans(current_event.scene == 0 ? _id : current_event.scene);
- ptr[current_event.lan - 1] = current_event.color;
+ if (currentEvent.lan != 0) {
+ debugC(0, kDebugScene, "lan[%u] = %02x", currentEvent.lan - 1, currentEvent.color);
+ byte *ptr = getLans(currentEvent.scene == 0 ? _id : currentEvent.scene);
+ ptr[currentEvent.lan - 1] = currentEvent.color;
}
loadLans();
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kLoadScene: {
- if (current_event.scene != 0) {
- init(current_event.scene, current_event.dst);
- if (current_event.orientation != 0)
- orientation = current_event.orientation;
+ if (currentEvent.scene != 0) {
+ init(currentEvent.scene, currentEvent.dst);
+ if (currentEvent.orientation != 0)
+ orientation = currentEvent.orientation;
} else {
- //special case, empty scene
+ // special case, empty scene
background.free();
on.free();
delete[] ons;
ons = NULL;
for (byte i = 0; i < 4; ++i) {
animation[i].free();
- custom_animation[i].free();
+ customAnimation[i].free();
}
}
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kWalk: {
- Common::Point dst = current_event.dst;
- if ((current_event.color & 2) != 0) { //relative move
+ Common::Point dst = currentEvent.dst;
+ if ((currentEvent.color & 2) != 0) { // relative move
dst.x += position.x;
dst.y += position.y;
}
- if ((current_event.color & 1) != 0) {
- warp(dst, current_event.orientation);
- current_event.clear();
+ if ((currentEvent.color & 1) != 0) {
+ warp(dst, currentEvent.orientation);
+ currentEvent.clear();
} else
- moveTo(dst, current_event.orientation);
+ moveTo(dst, currentEvent.orientation);
}
break;
case SceneEvent::kCreditsMessage:
case SceneEvent::kMessage: {
- message = current_event.message;
- message_animation = NULL;
- if (current_event.first_frame) {
- message_timer = 0;
- message_first_frame = current_event.first_frame;
- message_last_frame = current_event.last_frame;
- if (current_event.slot > 0) {
- message_animation = custom_animation + (current_event.slot - 1);
- //else if (!animation[current_event.slot].empty())
- // message_animation = animation + current_event.slot;
+ message = currentEvent.message;
+ messageAnimation = NULL;
+ if (currentEvent.firstFrame) {
+ messageTimer = 0;
+ messageFirstFrame = currentEvent.firstFrame;
+ messageLastFrame = currentEvent.lastFrame;
+ if (currentEvent.slot > 0) {
+ messageAnimation = customAnimation + (currentEvent.slot - 1);
+ //else if (!animation[currentEvent.slot].empty())
+ // messageAnimation = animation + currentEvent.slot;
} else
- message_animation = &actor_animation;
- debug(0, "async message %d-%d (slot %u)", message_first_frame, message_last_frame, current_event.slot);
+ messageAnimation = &actorAnimation;
+ debugC(0, kDebugScene, "async message %d-%d (slot %u)", messageFirstFrame, messageLastFrame, currentEvent.slot);
} else {
- message_timer = current_event.timer ? current_event.timer * 110 : messageDuration(message);
- message_first_frame = message_last_frame = 0;
+ messageTimer = currentEvent.timer ? currentEvent.timer * 110 : messageDuration(message);
+ messageFirstFrame = messageLastFrame = 0;
}
Common::Point p;
- if (current_event.dst.x == 0 && current_event.dst.y == 0) {
- p = Common::Point((actor_animation_position.left + actor_animation_position.right) / 2,
- actor_animation_position.top);
+ if (currentEvent.dst.x == 0 && currentEvent.dst.y == 0) {
+ p = Common::Point((actorAnimationPosition.left + actorAnimationPosition.right) / 2,
+ actorAnimationPosition.top);
} else {
- p = current_event.dst;
+ p = currentEvent.dst;
}
- byte message_slot = current_event.slot;
- if (message_slot != 0) {
- --message_slot;
- assert(message_slot < 4);
- const Surface *s = custom_animation[message_slot].currentFrame(0);
+ byte messageSlot = currentEvent.slot;
+ if (messageSlot != 0) {
+ --messageSlot;
+ assert(messageSlot < 4);
+ const Surface *s = customAnimation[messageSlot].currentFrame(0);
if (s == NULL)
- s = animation[message_slot].currentFrame(0);
+ s = animation[messageSlot].currentFrame(0);
if (s != NULL) {
p.x = s->x + s->w / 2;
p.y = s->y;
} else
- warning("no animation in slot %u", message_slot);
+ warning("no animation in slot %u", messageSlot);
}
- message_pos = messagePosition(message, p);
- message_color = current_event.color;
+ messagePos = messagePosition(message, p);
+ messageColor = currentEvent.color;
- if (message_first_frame)
- current_event.clear(); //async message, clearing event
+ if (messageFirstFrame)
+ currentEvent.clear(); // async message, clearing event
}
break;
case SceneEvent::kPlayAnimation: {
- byte slot = current_event.slot & 7; //0 - mark's
- if (current_event.animation != 0) {
- debug(0, "playing animation %u in slot %u(%02x)", current_event.animation, slot, current_event.slot);
+ byte slot = currentEvent.slot & 7; // 0 - mark's
+ if (currentEvent.animation != 0) {
+ debugC(0, kDebugScene, "playing animation %u in slot %u(%02x)", currentEvent.animation, slot, currentEvent.slot);
if (slot != 0) {
--slot;
assert(slot < 4);
- playAnimation(slot, current_event.animation, (current_event.slot & 0x80) != 0, (current_event.slot & 0x40) != 0, (current_event.slot & 0x20) != 0);
+ playAnimation(slot, currentEvent.animation, (currentEvent.slot & 0x80) != 0, (currentEvent.slot & 0x40) != 0, (currentEvent.slot & 0x20) != 0);
} else
- actor_talking = true;
+ actorTalking = true;
} else {
if (slot != 0) {
--slot;
- debug(0, "cancelling animation in slot %u", slot);
+ debugC(0, kDebugScene, "cancelling animation in slot %u", slot);
assert(slot < 4);
- custom_animation[slot].free();
+ customAnimation[slot].free();
} else
- actor_talking = true;
+ actorTalking = true;
}
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kPauseAnimation: {
- byte slot = current_event.slot & 7; //0 - mark's
+ byte slot = currentEvent.slot & 7; // 0 - mark's
if (slot != 0) {
--slot;
- debug(1, "pause animation in slot %u", slot);
- custom_animation[slot].paused = (current_event.slot & 0x80) != 0;
+ debugC(1, kDebugScene, "pause animation in slot %u", slot);
+ customAnimation[slot].paused = (currentEvent.slot & 0x80) != 0;
} else {
- actor_talking = false;
+ actorTalking = false;
}
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kClearAnimations:
for (byte i = 0; i < 4; ++i)
- custom_animation[i].free();
- actor_talking = false;
- current_event.clear();
+ customAnimation[i].free();
+ actorTalking = false;
+ currentEvent.clear();
break;
case SceneEvent::kPlayActorAnimation:
- debug(0, "playing actor animation %u", current_event.animation);
- playActorAnimation(current_event.animation, (current_event.slot & 0x80) != 0, (current_event.slot & 0x20) != 0);
- current_event.clear();
+ debugC(0, kDebugScene, "playing actor animation %u", currentEvent.animation);
+ playActorAnimation(currentEvent.animation, (currentEvent.slot & 0x80) != 0, (currentEvent.slot & 0x20) != 0);
+ currentEvent.clear();
break;
case SceneEvent::kPlayMusic:
- debug(0, "setting music %u", current_event.music);
- _engine->setMusic(current_event.music);
- Resources::instance()->dseg.set_byte(0xDB90, current_event.music);
- current_event.clear();
+ debugC(0, kDebugScene, "setting music %u", currentEvent.music);
+ _vm->setMusic(currentEvent.music);
+ _vm->res->dseg.set_byte(dsAddr_currentMusic, currentEvent.music);
+ currentEvent.clear();
break;
case SceneEvent::kPlaySound:
- debug(0, "playing sound %u, delay: %u", current_event.sound, current_event.color);
- sounds.push_back(Sound(current_event.sound, current_event.color));
- current_event.clear();
+ debugC(0, kDebugScene, "playing sound %u, delay: %u", currentEvent.sound, currentEvent.color);
+ sounds.push_back(Sound(currentEvent.sound, currentEvent.color));
+ currentEvent.clear();
break;
case SceneEvent::kEnableObject: {
- debug(0, "%s object #%u", current_event.color ? "enabling" : "disabling", current_event.object - 1);
- Object *obj = getObject(current_event.object - 1, current_event.scene == 0 ? _id : current_event.scene);
- obj->enabled = current_event.color;
+ debugC(0, kDebugScene, "%s object #%u", currentEvent.color ? "enabling" : "disabling", currentEvent.object - 1);
+ Object *obj = getObject(currentEvent.object - 1, currentEvent.scene == 0 ? _id : currentEvent.scene);
+ obj->enabled = currentEvent.color;
obj->save();
- current_event.clear();
+ currentEvent.clear();
}
break;
case SceneEvent::kHideActor:
- hide_actor = current_event.color != 0;
- current_event.clear();
+ hideActor = currentEvent.color != 0;
+ currentEvent.clear();
break;
case SceneEvent::kWaitForAnimation:
- debug(0, "waiting for the animation");
+ debugC(0, kDebugScene, "waiting for the animation");
break;
case SceneEvent::kWaitLanAnimationFrame:
- debug(0, "waiting for the frame %d in slot %d", current_event.animation, current_event.slot);
+ debugC(0, kDebugScene, "waiting for the frame %d in slot %d", currentEvent.animation, currentEvent.slot);
break;
case SceneEvent::kTimer:
- callback = current_event.callback;
- callback_timer = current_event.timer;
- debug(0, "triggering callback %04x in %u frames", callback, callback_timer);
- current_event.clear();
+ callback = currentEvent.callback;
+ callbackTimer = currentEvent.timer;
+ debugC(0, kDebugScene, "triggering callback %04x in %u frames", callback, callbackTimer);
+ currentEvent.clear();
break;
case SceneEvent::kEffect:
- _system->delayMillis(80); //2 vsyncs
- _system->setShakePos(8);
- _system->updateScreen();
+ _vm->_system->delayMillis(80); // 2 vsyncs
+ _vm->_system->setShakePos(8);
+ _vm->_system->updateScreen();
- _system->delayMillis(80); //2 vsyncs
- _system->setShakePos(0);
- _system->updateScreen();
+ _vm->_system->delayMillis(80); // 2 vsyncs
+ _vm->_system->setShakePos(0);
+ _vm->_system->updateScreen();
- _system->delayMillis(80); //2 vsyncs
- _system->setShakePos(4);
- _system->updateScreen();
+ _vm->_system->delayMillis(80); // 2 vsyncs
+ _vm->_system->setShakePos(4);
+ _vm->_system->updateScreen();
- _system->delayMillis(80); //2 vsyncs
- _system->setShakePos(0);
- _system->updateScreen();
+ _vm->_system->delayMillis(80); // 2 vsyncs
+ _vm->_system->setShakePos(0);
+ _vm->_system->updateScreen();
- current_event.clear();
+ currentEvent.clear();
break;
case SceneEvent::kFade:
- _fade_timer = current_event.orientation != 0 ? 5 : -5;
- current_event.clear();
+ _fadeTimer = currentEvent.orientation != 0 ? 5 : -5;
+ currentEvent.clear();
break;
case SceneEvent::kWait:
- debug(0, "wait %u", current_event.timer);
+ debugC(0, kDebugScene, "wait %u", currentEvent.timer);
break;
case SceneEvent::kCredits:
- debug(0, "showing credits");
+ debugC(0, kDebugScene, "showing credits");
break;
case SceneEvent::kQuit:
- debug(0, "quit!");
- _engine->quitGame();
+ debugC(0, kDebugScene, "quit!");
+ _vm->quitGame();
break;
case SceneEvent::kSetFlag:
- debug(0, "async set_flag(%04x, %d)", current_event.callback, current_event.color);
- Resources::instance()->dseg.set_byte(current_event.callback, current_event.color);
- current_event.clear();
+ debugC(0, kDebugScene, "async set_flag(%04x, %d)", currentEvent.callback, currentEvent.color);
+ _vm->res->dseg.set_byte(currentEvent.callback, currentEvent.color);
+ currentEvent.clear();
break;
default:
- error("empty/unhandler event[%d]", (int)current_event.type);
+ error("empty/unhandler event[%d]", (int)currentEvent.type);
}
}
+
if (events.empty()) {
- message_color = 0xd1;
- hide_actor = false;
+ messageColor = textColorMark;
+ hideActor = false;
}
- return !current_event.empty();
+
+ return !currentEvent.empty();
}
void Scene::setPalette(unsigned mul) {
- //debug(0, "setPalette(%u)", mul);
+ debugC(0, kDebugScene, "setPalette(%u)", mul);
byte p[3 * 256];
for (int i = 0; i < 3 * 256; ++i) {
p[i] = (unsigned)palette[i] * mul;
}
- _system->getPaletteManager()->setPalette(p, 0, 256);
+ _vm->_system->getPaletteManager()->setPalette(p, 0, 256);
}
-Object *Scene::getObject(int id, int scene_id) {
+Object *Scene::getObject(int id, int sceneId) {
assert(id > 0);
- if (scene_id == 0)
- scene_id = _id;
+ if (sceneId == 0)
+ sceneId = _id;
- if (scene_id == 0)
+ if (sceneId == 0)
return NULL;
- Common::Array<Object> &scene_objects = objects[scene_id - 1];
+ Common::Array<Object> &sceneObjects = objects[sceneId - 1];
--id;
- if (id >= (int)scene_objects.size())
+ if (id >= (int)sceneObjects.size())
return NULL;
- return &scene_objects[id];
+ return &sceneObjects[id];
}
-Common::Point Scene::messagePosition(const Common::String &str, Common::Point message_position) {
- Resources *res = Resources::instance();
+Common::Point Scene::messagePosition(const Common::String &str, Common::Point pos) {
int lines = 1;
for (uint i = 0; i < str.size(); ++i)
if (str[i] == '\n')
++lines;
- uint w = res->font7.render(NULL, 0, 0, str, 0);
- uint h = res->font7.height * lines + 3;
+ uint w = _vm->res->font7.render(NULL, 0, 0, str, 0);
+ uint h = _vm->res->font7.getHeight() * lines + 3;
- message_position.x -= w / 2;
- message_position.y -= h;
+ pos.x -= w / 2;
+ pos.y -= h;
- if (message_position.x + w > 320)
- message_position.x = 320 - w;
- if (message_position.x < 0)
- message_position.x = 0;
- if (message_position.y + h > 320)
- message_position.y = 200 - h;
- if (message_position.y < 0)
- message_position.y = 0;
+ if (pos.x + w > kScreenWidth)
+ pos.x = kScreenWidth - w;
+ if (pos.x < 0)
+ pos.x = 0;
+ if (pos.y + h > kScreenHeight)
+ pos.y = kScreenHeight - h;
+ if (pos.y < 0)
+ pos.y = 0;
- return message_position;
+ return pos;
}
uint Scene::messageDuration(const Common::String &str) {
- //original game uses static delays: 100-slow, 50, 20 and 1 tick - crazy speed.
- //total delay = total message length * delay / 8 + 60.
- uint total_width = str.size();
+ // original game uses static delays: 100-slow, 50, 20 and 1 tick - crazy speed.
+ // total delay = total message length * delay / 8 + 60.
+ uint totalWidth = str.size();
- int speed = Common::ConfigManager::instance().getInt("talkspeed");
+ int speed = ConfMan.getInt("talkspeed");
if (speed < 0)
speed = 60;
- uint delay_delta = 1 + (255 - speed) * 99 / 255;
+ uint delayDelta = 1 + (255 - speed) * 99 / 255;
- uint delay = 60 + (total_width * delay_delta) / 8;
- //debug(0, "delay = %u, delta: %u", delay, delay_delta);
+ uint delay = 60 + (totalWidth * delayDelta) / 8;
+ debugC(0, kDebugScene, "delay = %u, delta: %u", delay, delayDelta);
return delay * 10;
}
void Scene::displayMessage(const Common::String &str, byte color, const Common::Point &pos) {
//assert(!str.empty());
- //debug(0, "displayMessage: %s", str.c_str());
+ debugC(0, kDebugScene, "displayMessage: %s", str.c_str());
message = str;
- message_pos = (pos.x | pos.y) ? pos : messagePosition(str, position);
- message_color = color;
- message_timer = messageDuration(message);
+ messagePos = (pos.x | pos.y) ? pos : messagePosition(str, position);
+ messageColor = color;
+ messageTimer = messageDuration(message);
}
void Scene::clear() {
clearMessage();
events.clear();
- current_event.clear();
+ currentEvent.clear();
for (int i = 0; i < 4; ++i) {
animation[i].free();
- custom_animation[i].free();
+ customAnimation[i].free();
}
callback = 0;
- callback_timer = 0;
+ callbackTimer = 0;
}
void Scene::clearMessage() {
message.clear();
- message_timer = 0;
- message_color = 0xd1;
- message_first_frame = 0;
- message_last_frame = 0;
- message_animation = NULL;
+ messageTimer = 0;
+ messageColor = textColorMark;
+ messageFirstFrame = 0;
+ messageLastFrame = 0;
+ messageAnimation = NULL;
}
} // End of namespace TeenAgent
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 32e784bb60..14aefa0cca 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -27,8 +27,8 @@
#include "teenagent/objects.h"
#include "teenagent/surface.h"
#include "teenagent/surface_list.h"
+#include "teenagent/teenagent.h"
-#include "common/system.h"
#include "common/array.h"
#include "common/list.h"
@@ -39,7 +39,6 @@ struct Event;
namespace TeenAgent {
class TeenAgentEngine;
-class Dialog;
struct SceneEvent {
enum Type {
@@ -84,22 +83,22 @@ struct SceneEvent {
byte lan;
union {
byte music;
- byte first_frame;
+ byte firstFrame;
};
union {
byte sound;
- byte last_frame;
+ byte lastFrame;
};
byte object;
SceneEvent(Type type_) :
- type(type_), message(), color(0xd1), slot(0), animation(0), timer(0), orientation(0), dst(),
+ type(type_), message(), color(textColorMark), slot(0), animation(0), timer(0), orientation(0), dst(),
scene(0), ons(0), lan(0), music(0), sound(0), object(0) {}
void clear() {
type = kNone;
message.clear();
- color = 0xd1;
+ color = textColorMark;
slot = 0;
orientation = 0;
animation = 0;
@@ -118,7 +117,7 @@ struct SceneEvent {
}
void dump() const {
- debug(0, "event[%d]: \"%s\"[%02x], slot: %d, animation: %u, timer: %u, dst: (%d, %d) [%u], scene: %u, ons: %u, lan: %u, object: %u, music: %u, sound: %u",
+ debugC(0, kDebugScene, "event[%d]: \"%s\"[%02x], slot: %d, animation: %u, timer: %u, dst: (%d, %d) [%u], scene: %u, ons: %u, lan: %u, object: %u, music: %u, sound: %u",
(int)type, message.c_str(), color, slot, animation, timer, dst.x, dst.y, orientation, scene, ons, lan, object, music, sound
);
}
@@ -126,13 +125,13 @@ struct SceneEvent {
class Scene {
public:
- Scene(TeenAgentEngine *engine, OSystem *system);
+ Scene(TeenAgentEngine *engine);
~Scene();
bool intro;
void init(int id, const Common::Point &pos);
- bool render(bool tick_game, bool tick_mark, uint32 message_delta);
+ bool render(bool tickGame, bool tickMark, uint32 messageDelta);
int getId() const { return _id; }
void warp(const Common::Point &point, byte orientation = 0);
@@ -140,7 +139,7 @@ public:
void moveTo(const Common::Point &point, byte orientation = 0, bool validate = false);
Common::Point getPosition() const { return position; }
- void displayMessage(const Common::String &str, byte color = 0xd1, const Common::Point &pos = Common::Point());
+ void displayMessage(const Common::String &str, byte color = textColorMark, const Common::Point &pos = Common::Point());
void setOrientation(uint8 o) { orientation = o; }
void push(const SceneEvent &event);
byte peekFlagEvent(uint16 addr) const;
@@ -153,15 +152,15 @@ public:
byte *getOns(int id);
byte *getLans(int id);
- bool eventRunning() const { return !current_event.empty(); }
+ bool eventRunning() const { return !currentEvent.empty(); }
Walkbox *getWalkbox(byte id) { return &walkboxes[_id - 1][id]; }
- Object *getObject(int id, int scene_id = 0);
+ Object *getObject(int id, int sceneId = 0);
Object *findObject(const Common::Point &point);
void loadObjectData();
Animation *getAnimation(byte slot);
- inline Animation *getActorAnimation() { return &actor_animation; }
+ inline Animation *getActorAnimation() { return &actorAnimation; }
inline const Common::String &getMessage() const { return message; }
void setPalette(unsigned mul);
int lookupZoom(uint y) const;
@@ -173,39 +172,38 @@ private:
void playAnimation(byte idx, uint id, bool loop, bool paused, bool ignore);
void playActorAnimation(uint id, bool loop, bool ignore);
- byte palette[768];
+ byte palette[3 * 256];
void paletteEffect(byte step);
byte findFade() const;
- static Common::Point messagePosition(const Common::String &str, Common::Point position);
- static uint messageDuration(const Common::String &str);
+ Common::Point messagePosition(const Common::String &str, Common::Point pos);
+ uint messageDuration(const Common::String &str);
bool processEventQueue();
inline bool nextEvent() {
- current_event.clear();
+ currentEvent.clear();
return processEventQueue();
}
void clearMessage();
- TeenAgentEngine *_engine;
- OSystem *_system;
+ TeenAgentEngine *_vm;
int _id;
Graphics::Surface background;
SurfaceList on;
- bool on_enabled;
+ bool onEnabled;
Surface *ons;
- uint32 ons_count;
- Animation actor_animation, animation[4], custom_animation[4];
- Common::Rect actor_animation_position, animation_position[4];
+ uint32 onsCount;
+ Animation actorAnimation, animation[4], customAnimation[4];
+ Common::Rect actorAnimationPosition, animationPosition[4];
- Actor teenagent, teenagent_idle;
+ Actor teenagent, teenagentIdle;
Common::Point position;
typedef Common::List<Common::Point> Path;
Path path;
uint8 orientation;
- bool actor_talking;
+ bool actorTalking;
bool findPath(Path &p, const Common::Point &src, const Common::Point &dst) const;
@@ -214,22 +212,24 @@ private:
Common::Array<Common::Array<FadeType> > fades;
Common::String message;
- Common::Point message_pos;
- byte message_color;
- uint message_timer;
- byte message_first_frame;
- byte message_last_frame;
- Animation *message_animation;
+ Common::Point messagePos;
+ byte messageColor;
+ uint messageTimer;
+ byte messageFirstFrame;
+ byte messageLastFrame;
+ Animation *messageAnimation;
typedef Common::List<SceneEvent> EventList;
EventList events;
- SceneEvent current_event;
- bool hide_actor;
+ SceneEvent currentEvent;
+ bool hideActor;
- uint16 callback, callback_timer;
+ uint16 callback, callbackTimer;
- int _fade_timer;
- uint _idle_timer;
+ int _fadeTimer;
+ byte _fadeOld;
+
+ uint _idleTimer;
struct Sound {
byte id, delay;
@@ -254,7 +254,7 @@ private:
feature[i] = true;
}
}
- } debug_features;
+ } debugFeatures;
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/segment.h b/engines/teenagent/segment.h
index 303198b071..286337d120 100644
--- a/engines/teenagent/segment.h
+++ b/engines/teenagent/segment.h
@@ -41,26 +41,21 @@ public:
assert(offset < _size);
return _data[offset];
}
+
inline uint16 get_word(uint32 offset) const {
assert(offset + 1 < _size);
return READ_LE_UINT16(_data + offset);
}
- inline uint32 get_quad(uint32 offset) const {
- assert(offset + 3 < _size);
- return READ_LE_UINT32(_data + offset);
- }
+
inline void set_byte(uint32 offset, byte v) const {
assert(offset < _size);
_data[offset] = v;
}
+
inline void set_word(uint32 offset, uint16 v) const {
assert(offset + 1 < _size);
return WRITE_LE_UINT16(_data + offset, v);
}
- inline void set_quad(uint32 offset, uint32 v) const {
- assert(offset + 3 < _size);
- return WRITE_LE_UINT32(_data + offset, v);
- }
const byte *ptr(uint32 addr) const {
assert(addr < _size);
@@ -71,6 +66,7 @@ public:
assert(addr < _size);
return _data + addr;
}
+
uint size() const { return _size; }
};
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index 63312990ee..4db25bc749 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -21,6 +21,8 @@
#include "teenagent/surface.h"
#include "teenagent/pack.h"
+#include "teenagent/teenagent.h"
+
#include "common/stream.h"
#include "common/debug.h"
@@ -34,7 +36,7 @@ Surface::~Surface() {
}
void Surface::load(Common::SeekableReadStream &stream, Type type) {
- //debug(0, "load()");
+ debugC(0, kDebugSurface, "load()");
free();
x = y = 0;
@@ -44,71 +46,71 @@ void Surface::load(Common::SeekableReadStream &stream, Type type) {
if (type != kTypeLan) {
uint16 pos = stream.readUint16LE();
- x = pos % 320;
- y = pos / 320;
+ x = pos % kScreenWidth;
+ y = pos / kScreenWidth;
}
- //debug(0, "declared info: %ux%u (%04xx%04x) -> %u,%u", w_, h_, w_, h_, x, y);
+ debugC(0, kDebugSurface, "declared info: %ux%u (%04xx%04x) -> %u,%u", w_, h_, w_, h_, x, y);
if (stream.eos() || w_ == 0)
return;
if (w_ * h_ > stream.size()) {
- debug(0, "invalid surface %ux%u -> %u,%u", w_, h_, x, y);
+ debugC(0, kDebugSurface, "invalid surface %ux%u -> %u,%u", w_, h_, x, y);
return;
}
- //debug(0, "creating surface %ux%u -> %u,%u", w_, h_, x, y);
+ debugC(0, kDebugSurface, "creating surface %ux%u -> %u,%u", w_, h_, x, y);
create(w_, h_, Graphics::PixelFormat::createFormatCLUT8());
stream.read(pixels, w_ * h_);
}
-Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mirror, Common::Rect src_rect, uint zoom) const {
- if (src_rect.isEmpty()) {
- src_rect = Common::Rect(0, 0, w, h);
+Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mirror, Common::Rect srcRect, uint zoom) const {
+ if (srcRect.isEmpty()) {
+ srcRect = Common::Rect(0, 0, w, h);
}
- Common::Rect dst_rect(x + dx, y + dy, x + dx + zoom * src_rect.width() / 256, y + dy + zoom * src_rect.height() / 256);
- if (dst_rect.left < 0) {
- src_rect.left = -dst_rect.left;
- dst_rect.left = 0;
+ Common::Rect dstRect(x + dx, y + dy, x + dx + zoom * srcRect.width() / 256, y + dy + zoom * srcRect.height() / 256);
+ if (dstRect.left < 0) {
+ srcRect.left = -dstRect.left;
+ dstRect.left = 0;
}
- if (dst_rect.right > surface->w) {
- src_rect.right -= dst_rect.right - surface->w;
- dst_rect.right = surface->w;
+ if (dstRect.right > surface->w) {
+ srcRect.right -= dstRect.right - surface->w;
+ dstRect.right = surface->w;
}
- if (dst_rect.top < 0) {
- src_rect.top -= dst_rect.top;
- dst_rect.top = 0;
+ if (dstRect.top < 0) {
+ srcRect.top -= dstRect.top;
+ dstRect.top = 0;
}
- if (dst_rect.bottom > surface->h) {
- src_rect.bottom -= dst_rect.bottom - surface->h;
- dst_rect.bottom = surface->h;
+ if (dstRect.bottom > surface->h) {
+ srcRect.bottom -= dstRect.bottom - surface->h;
+ dstRect.bottom = surface->h;
}
- if (src_rect.isEmpty() || dst_rect.isEmpty())
+ if (srcRect.isEmpty() || dstRect.isEmpty())
return Common::Rect();
if (zoom == 256) {
- const byte *src = (const byte *)getBasePtr(0, src_rect.top);
- byte *dst_base = (byte *)surface->getBasePtr(dst_rect.left, dst_rect.top);
+ const byte *src = (const byte *)getBasePtr(0, srcRect.top);
+ byte *dstBase = (byte *)surface->getBasePtr(dstRect.left, dstRect.top);
- for (int i = src_rect.top; i < src_rect.bottom; ++i) {
- byte *dst = dst_base;
- for (int j = src_rect.left; j < src_rect.right; ++j) {
+ for (int i = srcRect.top; i < srcRect.bottom; ++i) {
+ byte *dst = dstBase;
+ for (int j = srcRect.left; j < srcRect.right; ++j) {
byte p = src[(mirror ? w - j - 1 : j)];
if (p != 0xff)
*dst++ = p;
else
++dst;
}
- dst_base += surface->pitch;
+ dstBase += surface->pitch;
src += pitch;
}
} else {
- byte *dst = (byte *)surface->getBasePtr(dst_rect.left, dst_rect.top);
- for (int i = 0; i < dst_rect.height(); ++i) {
- for (int j = 0; j < dst_rect.width(); ++j) {
+ byte *dst = (byte *)surface->getBasePtr(dstRect.left, dstRect.top);
+ for (int i = 0; i < dstRect.height(); ++i) {
+ for (int j = 0; j < dstRect.width(); ++j) {
int px = j * 256 / zoom;
- const byte *src = (const byte *)getBasePtr(src_rect.left + (mirror ? w - px - 1 : px), src_rect.top + i * 256 / zoom);
+ const byte *src = (const byte *)getBasePtr(srcRect.left + (mirror ? w - px - 1 : px), srcRect.top + i * 256 / zoom);
byte p = *src;
if (p != 0xff)
dst[j] = p;
@@ -116,7 +118,7 @@ Common::Rect Surface::render(Graphics::Surface *surface, int dx, int dy, bool mi
dst += surface->pitch;
}
}
- return dst_rect;
+ return dstRect;
}
} // End of namespace TeenAgent
diff --git a/engines/teenagent/surface.h b/engines/teenagent/surface.h
index 51368c6bee..3e591ed3e0 100644
--- a/engines/teenagent/surface.h
+++ b/engines/teenagent/surface.h
@@ -33,16 +33,17 @@ namespace TeenAgent {
class Surface : public Graphics::Surface {
public:
- enum Type {kTypeOns, kTypeLan};
-
- uint16 x, y;
-
Surface();
~Surface();
+
+ enum Type {kTypeOns, kTypeLan};
+
void load(Common::SeekableReadStream &, Type type);
- Common::Rect render(Graphics::Surface *surface, int dx = 0, int dy = 0, bool mirror = false, Common::Rect src_rect = Common::Rect(), uint zoom = 256) const;
+ Common::Rect render(Graphics::Surface *surface, int dx = 0, int dy = 0, bool mirror = false, Common::Rect srcRect = Common::Rect(), uint zoom = 256) const;
bool empty() const { return pixels == NULL; }
+
+ uint16 x, y;
};
} // End of namespace TeenAgent
diff --git a/engines/teenagent/surface_list.cpp b/engines/teenagent/surface_list.cpp
index 31387ac3cb..e293ce6470 100644
--- a/engines/teenagent/surface_list.cpp
+++ b/engines/teenagent/surface_list.cpp
@@ -19,34 +19,35 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "teenagent/surface.h"
#include "teenagent/surface_list.h"
-#include "objects.h"
+#include "teenagent/surface.h"
+#include "teenagent/objects.h"
+#include "teenagent/teenagent.h"
namespace TeenAgent {
-SurfaceList::SurfaceList() : surfaces(NULL), surfaces_n(0) {}
+SurfaceList::SurfaceList() : surfaces(NULL), surfacesCount(0) {}
SurfaceList::~SurfaceList() {
free();
}
-void SurfaceList::load(Common::SeekableReadStream &stream, Type type, int sub_hack) {
+void SurfaceList::load(Common::SeekableReadStream &stream, int subHack) {
free();
byte fn = stream.readByte();
if (stream.eos())
return;
- surfaces_n = fn - sub_hack;
- debug(0, "loading %u surfaces from list (skip %d)", surfaces_n, sub_hack);
+ surfacesCount = fn - subHack;
+ debugC(0, kDebugSurface, "loading %u surfaces from list (skip %d)", surfacesCount, subHack);
- if (surfaces_n == 0)
+ if (surfacesCount == 0)
return;
- surfaces = new Surface[surfaces_n];
+ surfaces = new Surface[surfacesCount];
- for (byte i = 0; i < surfaces_n; ++i) {
+ for (byte i = 0; i < surfacesCount; ++i) {
uint offset = stream.readUint16LE();
uint pos = stream.pos();
stream.seek(offset);
@@ -58,11 +59,11 @@ void SurfaceList::load(Common::SeekableReadStream &stream, Type type, int sub_ha
void SurfaceList::free() {
delete[] surfaces;
surfaces = NULL;
- surfaces_n = 0;
+ surfacesCount = 0;
}
void SurfaceList::render(Graphics::Surface *surface, const Common::Rect &clip) const {
- for (uint i = 0; i < surfaces_n; ++i) {
+ for (uint i = 0; i < surfacesCount; ++i) {
const Surface &s = surfaces[i];
Common::Rect r(s.x, s.y, s.x + s.w, s.y + s.h);
if (r.bottom < clip.bottom || !clip.intersects(r))
diff --git a/engines/teenagent/surface_list.h b/engines/teenagent/surface_list.h
index 2d7be0d52b..73a41fb5f8 100644
--- a/engines/teenagent/surface_list.h
+++ b/engines/teenagent/surface_list.h
@@ -23,23 +23,23 @@
#define TEENAGENT_SURFACE_LIST_H__
#include "common/stream.h"
+#include "graphics/surface.h"
namespace TeenAgent {
class Surface;
class SurfaceList {
public:
- enum Type { kTypeOn };
-
SurfaceList();
~SurfaceList();
- void load(Common::SeekableReadStream &, Type type, int sub_hack = 0);
+
+ void load(Common::SeekableReadStream &, int subHack = 0);
void free();
void render(Graphics::Surface *surface, const Common::Rect &clip) const;
protected:
Surface *surfaces;
- uint surfaces_n;
+ uint surfacesCount;
};
}
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 57c069fe59..0b48a18b26 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -21,6 +21,7 @@
#include "common/config-manager.h"
#include "common/debug.h"
+#include "common/debug-channels.h"
#include "common/events.h"
#include "common/savefile.h"
#include "common/system.h"
@@ -39,26 +40,56 @@
#include "graphics/thumbnail.h"
#include "teenagent/console.h"
+#include "teenagent/dialog.h"
+#include "teenagent/inventory.h"
#include "teenagent/music.h"
#include "teenagent/objects.h"
#include "teenagent/pack.h"
+#include "teenagent/resources.h"
#include "teenagent/scene.h"
#include "teenagent/teenagent.h"
namespace TeenAgent {
TeenAgentEngine::TeenAgentEngine(OSystem *system, const ADGameDescription *gd)
- : Engine(system), action(kActionNone), _gameDescription(gd),
- _rnd("teenagent") {
- music = new MusicPlayer();
+ : Engine(system), _action(kActionNone), _gameDescription(gd), _rnd("teenagent") {
+ DebugMan.addDebugChannel(kDebugActor, "Actor", "Enable Actor Debug");
+ DebugMan.addDebugChannel(kDebugAnimation, "Animation", "Enable Animation Debug");
+ DebugMan.addDebugChannel(kDebugCallbacks, "Callbacks", "Enable Callbacks Debug");
+ DebugMan.addDebugChannel(kDebugDialog, "Dialog", "Enable Dialog Debug");
+ DebugMan.addDebugChannel(kDebugFont, "Font", "Enable Font Debug");
+ DebugMan.addDebugChannel(kDebugInventory, "Inventory", "Enable Inventory Debug");
+ DebugMan.addDebugChannel(kDebugMusic, "Music", "Enable Music Debug");
+ DebugMan.addDebugChannel(kDebugObject, "Object", "Enable Object Debug");
+ DebugMan.addDebugChannel(kDebugPack, "Pack", "Enable Pack Debug");
+ DebugMan.addDebugChannel(kDebugScene, "Scene", "Enable Scene Debug");
+ DebugMan.addDebugChannel(kDebugSurface, "Surface", "Enable Surface Debug");
+
+ music = new MusicPlayer(this);
+ dialog = new Dialog(this);
+ res = new Resources();
console = 0;
}
TeenAgentEngine::~TeenAgentEngine() {
+ delete dialog;
+ dialog = 0;
+ delete scene;
+ scene = 0;
+ delete inventory;
+ inventory = 0;
delete music;
+ music = 0;
+ _mixer->stopAll();
+ _useHotspots.clear();
+ delete res;
+ res = 0;
+
+ CursorMan.popCursor();
delete console;
+ DebugMan.clearAllDebugChannels();
}
bool TeenAgentEngine::trySelectedObject() {
@@ -66,66 +97,64 @@ bool TeenAgentEngine::trySelectedObject() {
if (inv == NULL)
return false;
- Resources *res = Resources::instance();
- debug(0, "checking active object %u on %u", inv->id, dst_object->id);
+ debugC(0, kDebugObject, "checking active object %u on %u", inv->id, _dstObject->id);
//mouse time challenge hack:
- if ((res->dseg.get_byte(0) == 1 && inv->id == 49 && dst_object->id == 5) ||
- (res->dseg.get_byte(0) == 2 && inv->id == 29 && dst_object->id == 5)) {
+ if ((res->dseg.get_byte(dsAddr_timedCallbackState) == 1 && inv->id == kInvItemRock && _dstObject->id == 5) ||
+ (res->dseg.get_byte(dsAddr_timedCallbackState) == 2 && inv->id == kInvItemSuperGlue && _dstObject->id == 5)) {
//putting rock into hole or superglue on rock
- processCallback(0x8d57);
+ fnPutRockInHole();
return true;
}
- const Common::Array<UseHotspot> &hotspots = use_hotspots[scene->getId() - 1];
+ const Common::Array<UseHotspot> &hotspots = _useHotspots[scene->getId() - 1];
for (uint i = 0; i < hotspots.size(); ++i) {
const UseHotspot &spot = hotspots[i];
- if (spot.inventory_id == inv->id && dst_object->id == spot.object_id) {
- debug(0, "use object on hotspot!");
+ if (spot.inventoryId == inv->id && _dstObject->id == spot.objectId) {
+ debugC(0, kDebugObject, "use object on hotspot!");
spot.dump();
- if (spot.actor_x != 0xffff && spot.actor_y != 0xffff)
- moveTo(spot.actor_x, spot.actor_y, spot.orientation);
+ if (spot.actorX != 0xffff && spot.actorY != 0xffff)
+ moveTo(spot.actorX, spot.actorY, spot.orientation);
if (!processCallback(spot.callback))
- debug(0, "fixme! display proper description");
+ debugC(0, kDebugObject, "FIXME: display proper description");
inventory->resetSelectedObject();
return true;
}
}
- //error
+ // error
inventory->resetSelectedObject();
- displayMessage(0x3457);
+ displayMessage(dsAddr_objErrorMsg); // "That's no good"
return true;
}
void TeenAgentEngine::processObject() {
- if (dst_object == NULL)
+ if (_dstObject == NULL)
return;
- Resources *res = Resources::instance();
- switch (action) {
+ switch (_action) {
case kActionExamine: {
if (trySelectedObject())
break;
- byte *dcall = res->dseg.ptr(0xb5ce);
+ byte *dcall = res->dseg.ptr(dsAddr_objExamineCallbackTablePtr);
dcall = res->dseg.ptr(READ_LE_UINT16(dcall + scene->getId() * 2 - 2));
- dcall += 2 * dst_object->id - 2;
+ dcall += 2 * _dstObject->id - 2;
uint16 callback = READ_LE_UINT16(dcall);
if (callback == 0 || !processCallback(callback))
- displayMessage(dst_object->description);
+ displayMessage(_dstObject->description);
}
break;
case kActionUse: {
if (trySelectedObject())
break;
- byte *dcall = res->dseg.ptr(0xb89c);
+ byte *dcall = res->dseg.ptr(dsAddr_objUseCallbackTablePtr);
dcall = res->dseg.ptr(READ_LE_UINT16(dcall + scene->getId() * 2 - 2));
- dcall += 2 * dst_object->id - 2;
+ dcall += 2 * _dstObject->id - 2;
uint16 callback = READ_LE_UINT16(dcall);
if (!processCallback(callback))
- displayMessage(dst_object->description);
+ displayMessage(_dstObject->description);
}
break;
@@ -134,20 +163,19 @@ void TeenAgentEngine::processObject() {
}
}
-
void TeenAgentEngine::use(Object *object) {
if (object == NULL || scene->eventRunning())
return;
- dst_object = object;
+ _dstObject = object;
object->rect.dump();
- object->actor_rect.dump();
+ object->actorRect.dump();
- action = kActionUse;
- if (object->actor_rect.valid())
- scene->moveTo(Common::Point(object->actor_rect.right, object->actor_rect.bottom), object->actor_orientation);
- else if (object->actor_orientation > 0)
- scene->setOrientation(object->actor_orientation);
+ _action = kActionUse;
+ if (object->actorRect.valid())
+ scene->moveTo(Common::Point(object->actorRect.right, object->actorRect.bottom), object->actorOrientation);
+ else if (object->actorOrientation > 0)
+ scene->setOrientation(object->actorOrientation);
}
void TeenAgentEngine::examine(const Common::Point &point, Object *object) {
@@ -155,53 +183,39 @@ void TeenAgentEngine::examine(const Common::Point &point, Object *object) {
return;
if (object != NULL) {
- Common::Point dst = object->actor_rect.center();
- debug(0, "click %d, %d, object %d, %d", point.x, point.y, dst.x, dst.y);
- action = kActionExamine;
- if (object->actor_rect.valid())
- scene->moveTo(dst, object->actor_orientation, true); //validate examine message. Original engine does not let you into walkboxes
- dst_object = object;
- } else if (!scene_busy) {
- //do not reset anything while scene is busy, but allow interrupts while walking.
- debug(0, "click %d, %d", point.x, point.y);
- action = kActionNone;
+ Common::Point dst = object->actorRect.center();
+ debugC(0, kDebugObject, "click %d, %d, object %d, %d", point.x, point.y, dst.x, dst.y);
+ _action = kActionExamine;
+ if (object->actorRect.valid())
+ scene->moveTo(dst, object->actorOrientation, true); // validate examine message. Original engine does not let you into walkboxes
+ _dstObject = object;
+ } else if (!_sceneBusy) {
+ // do not reset anything while scene is busy, but allow interrupts while walking.
+ debugC(0, kDebugObject, "click %d, %d", point.x, point.y);
+ _action = kActionNone;
scene->moveTo(point, 0, true);
- dst_object = NULL;
+ _dstObject = NULL;
}
}
void TeenAgentEngine::init() {
- _mark_delay = 80;
- _game_delay = 110;
+ _markDelay = 80;
+ _gameDelay = 110;
- Resources *res = Resources::instance();
- use_hotspots.resize(42);
- byte *scene_hotspots = res->dseg.ptr(0xbb87);
+ _useHotspots.resize(42);
+ byte *sceneHotspots = res->dseg.ptr(dsAddr_sceneHotspotsPtr);
for (byte i = 0; i < 42; ++i) {
- Common::Array<UseHotspot> & hotspots = use_hotspots[i];
- byte *hotspots_ptr = res->dseg.ptr(READ_LE_UINT16(scene_hotspots + i * 2));
- while (*hotspots_ptr) {
+ Common::Array<UseHotspot> & hotspots = _useHotspots[i];
+ byte *hotspotsPtr = res->dseg.ptr(READ_LE_UINT16(sceneHotspots + i * 2));
+ while (*hotspotsPtr) {
UseHotspot h;
- h.load(hotspots_ptr);
- hotspots_ptr += 9;
+ h.load(hotspotsPtr);
+ hotspotsPtr += 9;
hotspots.push_back(h);
}
}
}
-void TeenAgentEngine::deinit() {
- _mixer->stopAll();
- delete scene;
- scene = NULL;
- delete inventory;
- inventory = NULL;
- //delete music;
- //music = NULL;
- use_hotspots.clear();
- Resources::instance()->deinit();
- CursorMan.popCursor();
-}
-
Common::Error TeenAgentEngine::loadGameState(int slot) {
debug(0, "loading from slot %d", slot);
Common::ScopedPtr<Common::InSaveFile> in(_saveFileMan->openForLoading(Common::String::format("teenagent.%02d", slot)));
@@ -211,22 +225,19 @@ Common::Error TeenAgentEngine::loadGameState(int slot) {
if (!in)
return Common::kReadPermissionDenied;
- Resources *res = Resources::instance();
+ assert(res->dseg.size() >= dsAddr_saveState + saveStateSize);
- const uint dataSize = 0x777a;
- assert(res->dseg.size() >= 0x6478 + dataSize);
-
- char *data = (char *)malloc(dataSize);
+ char *data = (char *)malloc(saveStateSize);
if (!data)
error("[TeenAgentEngine::loadGameState] Cannot allocate buffer");
in->seek(0);
- if (in->read(data, dataSize) != dataSize) {
+ if (in->read(data, saveStateSize) != saveStateSize) {
free(data);
return Common::kReadingFailed;
}
- memcpy(res->dseg.ptr(0x6478), data, dataSize);
+ memcpy(res->dseg.ptr(dsAddr_saveState), data, saveStateSize);
free(data);
@@ -234,10 +245,10 @@ Common::Error TeenAgentEngine::loadGameState(int slot) {
inventory->activate(false);
inventory->reload();
- setMusic(Resources::instance()->dseg.get_byte(0xDB90));
+ setMusic(res->dseg.get_byte(dsAddr_currentMusic));
- int id = res->dseg.get_byte(0xB4F3);
- uint16 x = res->dseg.get_word(0x64AF), y = res->dseg.get_word(0x64B1);
+ int id = res->dseg.get_byte(dsAddr_currentScene);
+ uint16 x = res->dseg.get_word(dsAddr_egoX), y = res->dseg.get_word(dsAddr_egoY);
scene->loadObjectData();
scene->init(id, Common::Point(x, y));
scene->setPalette(4);
@@ -251,15 +262,15 @@ Common::Error TeenAgentEngine::saveGameState(int slot, const Common::String &des
if (!out)
return Common::kWritingFailed;
- Resources *res = Resources::instance();
- res->dseg.set_byte(0xB4F3, scene->getId());
+ res->dseg.set_byte(dsAddr_currentScene, scene->getId());
Common::Point pos = scene->getPosition();
- res->dseg.set_word(0x64AF, pos.x);
- res->dseg.set_word(0x64B1, pos.y);
+ res->dseg.set_word(dsAddr_egoX, pos.x);
+ res->dseg.set_word(dsAddr_egoY, pos.y);
- assert(res->dseg.size() >= 0x6478 + 0x777a);
- strncpy((char *)res->dseg.ptr(0x6478), desc.c_str(), 0x16);
- out->write(res->dseg.ptr(0x6478), 0x777a);
+ assert(res->dseg.size() >= dsAddr_saveState + saveStateSize);
+ // FIXME: Description string is 24 bytes and null based on detection.cpp code, not 22?
+ strncpy((char *)res->dseg.ptr(dsAddr_saveState), desc.c_str(), 22);
+ out->write(res->dseg.ptr(dsAddr_saveState), saveStateSize);
if (!Graphics::saveThumbnail(*out))
warning("saveThumbnail failed");
@@ -267,7 +278,6 @@ Common::Error TeenAgentEngine::saveGameState(int slot, const Common::String &des
return Common::kNoError;
}
-
int TeenAgentEngine::skipEvents() const {
Common::EventManager *_event = _system->getEventManager();
Common::Event event;
@@ -295,7 +305,7 @@ bool TeenAgentEngine::showCDLogo() {
if (!cdlogo.exists("cdlogo.res") || !cdlogo.open("cdlogo.res"))
return true;
- const uint bgSize = 0xfa00;
+ const uint bgSize = kScreenWidth * kScreenHeight;
const uint paletteSize = 3 * 256;
byte *bg = (byte *)malloc(bgSize);
@@ -314,8 +324,8 @@ bool TeenAgentEngine::showCDLogo() {
for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
- _system->copyRectToScreen(bg, 320, 0, 0, 320, 200);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
+ _system->copyRectToScreen(bg, kScreenWidth, 0, 0, kScreenWidth, kScreenHeight);
_system->updateScreen();
free(bg);
@@ -341,7 +351,7 @@ bool TeenAgentEngine::showLogo() {
if (!frame)
return true;
- const uint bgSize = 0xfa00;
+ const uint bgSize = kScreenWidth * kScreenHeight;
const uint paletteSize = 3 * 256;
byte *bg = (byte *)malloc(bgSize);
@@ -360,7 +370,7 @@ bool TeenAgentEngine::showLogo() {
for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
free(palette);
@@ -374,7 +384,7 @@ bool TeenAgentEngine::showLogo() {
return r > 0 ? true : false;
}
}
- _system->copyRectToScreen(bg, 320, 0, 0, 320, 200);
+ _system->copyRectToScreen(bg, kScreenWidth, 0, 0, kScreenWidth, kScreenHeight);
frame.reset(logo.getStream(i));
if (!frame) {
@@ -419,23 +429,23 @@ bool TeenAgentEngine::showMetropolis() {
palette[c] *= 4;
}
- _system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ _system->getPaletteManager()->setPalette(palette, 0, 256);
free(palette);
const uint varia6Size = 21760;
const uint varia9Size = 18302;
- byte *varia_6 = (byte *)malloc(varia6Size);
- byte *varia_9 = (byte *)malloc(varia9Size);
- if (!varia_6 || !varia_9) {
- free(varia_6);
- free(varia_9);
+ byte *varia6Data = (byte *)malloc(varia6Size);
+ byte *varia9Data = (byte *)malloc(varia9Size);
+ if (!varia6Data || !varia9Data) {
+ free(varia6Data);
+ free(varia9Data);
error("[TeenAgentEngine::showMetropolis] Cannot allocate buffer");
}
- varia.read(6, varia_6, varia6Size);
- varia.read(9, varia_9, varia9Size);
+ varia.read(6, varia6Data, varia6Size);
+ varia.read(9, varia9Data, varia9Size);
const uint colorsSize = 56 * 160 * 2;
byte *colors = (byte *)malloc(colorsSize);
@@ -449,8 +459,8 @@ bool TeenAgentEngine::showMetropolis() {
{
int r = skipEvents();
if (r != 0) {
- free(varia_6);
- free(varia_9);
+ free(varia6Data);
+ free(varia9Data);
free(colors);
return r > 0 ? true : false;
}
@@ -458,7 +468,7 @@ bool TeenAgentEngine::showMetropolis() {
Graphics::Surface *surface = _system->lockScreen();
if (logo_y > 0) {
- surface->fillRect(Common::Rect(0, 0, 320, logo_y), 0);
+ surface->fillRect(Common::Rect(0, 0, kScreenWidth, logo_y), 0);
}
{
@@ -485,7 +495,7 @@ bool TeenAgentEngine::showMetropolis() {
}
byte *dst = (byte *)surface->getBasePtr(0, 131);
- byte *src = varia_6;
+ byte *src = varia6Data;
for (uint y = 0; y < 68; ++y) {
for (uint x = 0; x < 320; ++x) {
if (*src++ == 1) {
@@ -497,7 +507,7 @@ bool TeenAgentEngine::showMetropolis() {
_system->unlockScreen();
_system->copyRectToScreen(
- varia_9 + (logo_y < 0 ? -logo_y * 320 : 0), 320,
+ varia9Data + (logo_y < 0 ? -logo_y * 320 : 0), 320,
0, logo_y >= 0 ? logo_y : 0,
320, logo_y >= 0 ? 57 : 57 + logo_y);
@@ -509,38 +519,37 @@ bool TeenAgentEngine::showMetropolis() {
_system->delayMillis(100);
}
- free(varia_6);
- free(varia_9);
+ free(varia6Data);
+ free(varia9Data);
free(colors);
return true;
}
Common::Error TeenAgentEngine::run() {
- Resources *res = Resources::instance();
if (!res->loadArchives(_gameDescription))
return Common::kUnknownError;
Common::EventManager *_event = _system->getEventManager();
- initGraphics(320, 200, false);
+ initGraphics(kScreenWidth, kScreenHeight, false);
console = new Console(this);
- scene = new Scene(this, _system);
+ scene = new Scene(this);
inventory = new Inventory(this);
init();
- CursorMan.pushCursor(res->dseg.ptr(0x00da), 8, 12, 0, 0, 1);
+ CursorMan.pushCursor(res->dseg.ptr(dsAddr_cursor), 8, 12, 0, 0, 1);
syncSoundSettings();
setMusic(1);
_mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false);
- int load_slot = Common::ConfigManager::instance().getInt("save_slot");
- if (load_slot >= 0) {
- loadGameState(load_slot);
+ int loadSlot = ConfMan.getInt("save_slot");
+ if (loadSlot >= 0) {
+ loadGameState(loadSlot);
} else {
if (!showCDLogo())
return Common::kNoError;
@@ -549,32 +558,30 @@ Common::Error TeenAgentEngine::run() {
if (!showMetropolis())
return Common::kNoError;
scene->intro = true;
- scene_busy = true;
- processCallback(0x24c);
+ _sceneBusy = true;
+ fnIntro();
}
CursorMan.showMouse(true);
- uint32 game_timer = 0;
- uint32 mark_timer = 0;
+ uint32 gameTimer = 0;
+ uint32 markTimer = 0;
Common::Event event;
Common::Point mouse;
uint32 timer = _system->getMillis();
do {
- Object *current_object = scene->findObject(mouse);
+ Object *currentObject = scene->findObject(mouse);
while (_event->pollEvent(event)) {
- if (event.type == Common::EVENT_RTL) {
- deinit();
+ if (event.type == Common::EVENT_RTL)
return Common::kNoError;
- }
- if ((!scene_busy && inventory->processEvent(event)) || scene->processEvent(event))
+ if ((!_sceneBusy && inventory->processEvent(event)) || scene->processEvent(event))
continue;
- //debug(0, "event");
+ debug(5, "event");
switch (event.type) {
case Common::EVENT_KEYDOWN:
if ((event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_d) ||
@@ -583,33 +590,33 @@ Common::Error TeenAgentEngine::run() {
} else if (event.kbd.hasFlags(0) && event.kbd.keycode == Common::KEYCODE_F5) {
openMainMenuDialog();
} if (event.kbd.hasFlags(Common::KBD_CTRL) && event.kbd.keycode == Common::KEYCODE_f) {
- _mark_delay = _mark_delay == 80 ? 40 : 80;
- debug(0, "mark_delay = %u", _mark_delay);
+ _markDelay = _markDelay == 80 ? 40 : 80;
+ debug(5, "markDelay = %u", _markDelay);
}
break;
case Common::EVENT_LBUTTONDOWN:
if (scene->getId() < 0)
break;
- examine(event.mouse, current_object);
+ examine(event.mouse, currentObject);
break;
case Common::EVENT_RBUTTONDOWN:
- //if (current_object)
- // debug(0, "%d, %s", current_object->id, current_object->name.c_str());
+ if (currentObject)
+ debugC(0, kDebugObject, "%d, %s", currentObject->id, currentObject->name.c_str());
if (scene->getId() < 0)
break;
- if (current_object == NULL)
+ if (currentObject == NULL)
break;
- if (res->dseg.get_byte(0) == 3 && current_object->id == 1) {
- processCallback(0x5189); //boo!
+ if (res->dseg.get_byte(dsAddr_timedCallbackState) == 3 && currentObject->id == 1) {
+ fnGuardDrinking();
break;
}
- if (res->dseg.get_byte(0) == 4 && current_object->id == 5) {
- processCallback(0x99e0); //getting an anchor
+ if (res->dseg.get_byte(dsAddr_timedCallbackState) == 4 && currentObject->id == 5) {
+ fnGotAnchor();
break;
}
- use(current_object);
+ use(currentObject);
break;
case Common::EVENT_MOUSEMOVE:
mouse = event.mouse;
@@ -622,60 +629,60 @@ Common::Error TeenAgentEngine::run() {
//game delays: slow 16, normal 11, fast 5, crazy 1
//mark delays: 4 * (3 - hero_speed), normal == 1
//game delays in 1/100th of seconds
- uint32 new_timer = _system->getMillis();
- uint32 delta = new_timer - timer;
- timer = new_timer;
+ uint32 newTimer = _system->getMillis();
+ uint32 delta = newTimer - timer;
+ timer = newTimer;
- bool tick_game = game_timer <= delta;
- if (tick_game)
- game_timer = _game_delay - ((delta - game_timer) % _game_delay);
+ bool tickGame = gameTimer <= delta;
+ if (tickGame)
+ gameTimer = _gameDelay - ((delta - gameTimer) % _gameDelay);
else
- game_timer -= delta;
+ gameTimer -= delta;
- bool tick_mark = mark_timer <= delta;
- if (tick_mark)
- mark_timer = _mark_delay - ((delta - mark_timer) % _mark_delay);
+ bool tickMark = markTimer <= delta;
+ if (tickMark)
+ markTimer = _markDelay - ((delta - markTimer) % _markDelay);
else
- mark_timer -= delta;
+ markTimer -= delta;
- if (tick_game || tick_mark) {
- bool b = scene->render(tick_game, tick_mark, delta);
- if (!inventory->active() && !b && action != kActionNone) {
+ if (tickGame || tickMark) {
+ bool b = scene->render(tickGame, tickMark, delta);
+ if (!inventory->active() && !b && _action != kActionNone) {
processObject();
- action = kActionNone;
- dst_object = NULL;
+ _action = kActionNone;
+ _dstObject = NULL;
}
- scene_busy = b;
+ _sceneBusy = b;
}
- _system->showMouse(scene->getMessage().empty() && !scene_busy);
+ _system->showMouse(scene->getMessage().empty() && !_sceneBusy);
- bool busy = inventory->active() || scene_busy;
+ bool busy = inventory->active() || _sceneBusy;
Graphics::Surface *surface = _system->lockScreen();
if (!busy) {
- InventoryObject *selected_object = inventory->selectedObject();
- if (current_object || selected_object) {
+ InventoryObject *selectedObject = inventory->selectedObject();
+ if (currentObject || selectedObject) {
Common::String name;
- if (selected_object) {
- name += selected_object->name;
+ if (selectedObject) {
+ name += selectedObject->name;
name += " & ";
}
- if (current_object)
- name += current_object->name;
+ if (currentObject)
+ name += currentObject->name;
- uint w = res->font7.render(NULL, 0, 0, name, 0xd1);
- res->font7.render(surface, (320 - w) / 2, 180, name, 0xd1, true);
+ uint w = res->font7.render(NULL, 0, 0, name, textColorMark);
+ res->font7.render(surface, (kScreenWidth - w) / 2, 180, name, textColorMark, true);
#if 0
- if (current_object) {
- current_object->rect.render(surface, 0x80);
- current_object->actor_rect.render(surface, 0x81);
+ if (currentObject) {
+ currentObject->rect.render(surface, 0x80);
+ currentObject->actorRect.render(surface, 0x81);
}
#endif
}
}
- inventory->render(surface, tick_game ? 1 : 0);
+ inventory->render(surface, tickGame ? 1 : 0);
_system->unlockScreen();
@@ -683,20 +690,19 @@ Common::Error TeenAgentEngine::run() {
console->onFrame();
- uint32 next_tick = MIN(game_timer, mark_timer);
- if (next_tick > 0) {
- _system->delayMillis(next_tick > 40 ? 40 : next_tick);
+ uint32 nextTick = MIN(gameTimer, markTimer);
+ if (nextTick > 0) {
+ _system->delayMillis(nextTick > 40 ? 40 : nextTick);
}
} while (!shouldQuit());
- deinit();
return Common::kNoError;
}
Common::String TeenAgentEngine::parseMessage(uint16 addr) {
Common::String message;
for (
- const char *str = (const char *)Resources::instance()->dseg.ptr(addr);
+ const char *str = (const char *)res->dseg.ptr(addr);
str[0] != 0 || str[1] != 0;
++str) {
char c = str[0];
@@ -708,12 +714,12 @@ Common::String TeenAgentEngine::parseMessage(uint16 addr) {
return message;
}
-void TeenAgentEngine::displayMessage(const Common::String &str, byte color, uint16 position) {
+void TeenAgentEngine::displayMessage(const Common::String &str, byte color, uint16 x, uint16 y) {
if (str.empty()) {
return;
}
- if (color == 0xd1) { //mark's
+ if (color == textColorMark) { // mark's
SceneEvent e(SceneEvent::kPlayAnimation);
e.animation = 0;
e.slot = 0x80;
@@ -725,8 +731,8 @@ void TeenAgentEngine::displayMessage(const Common::String &str, byte color, uint
event.message = str;
event.color = color;
event.slot = 0;
- event.dst.x = position % 320;
- event.dst.y = position / 320;
+ event.dst.x = x;
+ event.dst.y = y;
scene->push(event);
}
@@ -738,46 +744,45 @@ void TeenAgentEngine::displayMessage(const Common::String &str, byte color, uint
}
}
-void TeenAgentEngine::displayMessage(uint16 addr, byte color, uint16 position) {
- displayMessage(parseMessage(addr), color, position);
+void TeenAgentEngine::displayMessage(uint16 addr, byte color, uint16 x, uint16 y) {
+ displayMessage(parseMessage(addr), color, x, y);
}
-void TeenAgentEngine::displayAsyncMessage(uint16 addr, uint16 position, uint16 first_frame, uint16 last_frame, byte color) {
+void TeenAgentEngine::displayAsyncMessage(uint16 addr, uint16 x, uint16 y, uint16 firstFrame, uint16 lastFrame, byte color) {
SceneEvent event(SceneEvent::kMessage);
event.message = parseMessage(addr);
event.slot = 0;
event.color = color;
- event.dst.x = position % 320;
- event.dst.y = position / 320;
- event.first_frame = first_frame;
- event.last_frame = last_frame;
+ event.dst.x = x;
+ event.dst.y = y;
+ event.firstFrame = firstFrame;
+ event.lastFrame = lastFrame;
scene->push(event);
}
-void TeenAgentEngine::displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 first_frame, uint16 last_frame, byte color) {
+void TeenAgentEngine::displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 firstFrame, uint16 lastFrame, byte color) {
SceneEvent event(SceneEvent::kMessage);
event.message = parseMessage(addr);
event.slot = slot + 1;
event.color = color;
- event.first_frame = first_frame;
- event.last_frame = last_frame;
+ event.firstFrame = firstFrame;
+ event.lastFrame = lastFrame;
scene->push(event);
}
-
void TeenAgentEngine::displayCredits(uint16 addr, uint16 timer) {
SceneEvent event(SceneEvent::kCreditsMessage);
- const byte *src = Resources::instance()->dseg.ptr(addr);
+ const byte *src = res->dseg.ptr(addr);
event.orientation = *src++;
event.color = *src++;
event.lan = 8;
event.dst.y = *src;
while (true) {
- ++src; //skip y position
+ ++src; // skip y position
Common::String line((const char *)src);
event.message += line;
src += line.size() + 1;
@@ -785,33 +790,33 @@ void TeenAgentEngine::displayCredits(uint16 addr, uint16 timer) {
break;
event.message += "\n";
}
- int w = Resources::instance()->font8.render(NULL, 0, 0, event.message, 0xd1);
- event.dst.x = (320 - w) / 2;
+ int w = res->font8.render(NULL, 0, 0, event.message, textColorCredits);
+ event.dst.x = (kScreenWidth - w) / 2;
event.timer = timer;
scene->push(event);
}
void TeenAgentEngine::displayCredits() {
SceneEvent event(SceneEvent::kCredits);
- event.message = parseMessage(0xe488);
- event.dst.y = 200;
+ event.message = parseMessage(dsAddr_finalCredits7);
+ event.dst.y = kScreenHeight;
int lines = 1;
for (uint i = 0; i < event.message.size(); ++i)
if (event.message[i] == '\n')
++lines;
- event.dst.x = (320 - Resources::instance()->font7.render(NULL, 0, 0, event.message, 0xd1)) / 2;
+ event.dst.x = (kScreenWidth - res->font7.render(NULL, 0, 0, event.message, textColorCredits)) / 2;
event.timer = 11 * lines - event.dst.y + 22;
- //debug(0, "credits = %s", event.message.c_str());
+ debug(2, "credits = %s", event.message.c_str());
scene->push(event);
}
-void TeenAgentEngine::displayCutsceneMessage(uint16 addr, uint16 position) {
+void TeenAgentEngine::displayCutsceneMessage(uint16 addr, uint16 x, uint16 y) {
SceneEvent event(SceneEvent::kCreditsMessage);
event.message = parseMessage(addr);
- event.dst.x = position % 320;
- event.dst.y = position / 320;
+ event.dst.x = x;
+ event.dst.y = y;
event.lan = 7;
scene->push(event);
@@ -822,7 +827,7 @@ void TeenAgentEngine::moveTo(const Common::Point &dst, byte o, bool warp) {
}
void TeenAgentEngine::moveTo(Object *obj) {
- moveTo(obj->actor_rect.right, obj->actor_rect.bottom, obj->actor_orientation);
+ moveTo(obj->actorRect.right, obj->actorRect.bottom, obj->actorOrientation);
}
void TeenAgentEngine::moveTo(uint16 x, uint16 y, byte o, bool warp) {
@@ -865,7 +870,6 @@ void TeenAgentEngine::playActorAnimation(uint16 id, bool async, bool ignore) {
waitAnimation();
}
-
void TeenAgentEngine::loadScene(byte id, const Common::Point &pos, byte o) {
loadScene(id, pos.x, pos.y, o);
}
@@ -890,21 +894,21 @@ void TeenAgentEngine::enableOn(bool enable) {
scene->push(event);
}
-void TeenAgentEngine::setOns(byte id, byte value, byte scene_id) {
+void TeenAgentEngine::setOns(byte id, byte value, byte sceneId) {
SceneEvent event(SceneEvent::kSetOn);
event.ons = id + 1;
event.color = value;
- event.scene = scene_id;
+ event.scene = sceneId;
scene->push(event);
}
-void TeenAgentEngine::setLan(byte id, byte value, byte scene_id) {
+void TeenAgentEngine::setLan(byte id, byte value, byte sceneId) {
if (id == 0)
error("setting lan 0 is invalid");
SceneEvent event(SceneEvent::kSetLan);
event.lan = id;
event.color = value;
- event.scene = scene_id;
+ event.scene = sceneId;
scene->push(event);
}
@@ -925,35 +929,34 @@ void TeenAgentEngine::reloadLan() {
scene->push(event);
}
-
void TeenAgentEngine::playMusic(byte id) {
SceneEvent event(SceneEvent::kPlayMusic);
event.music = id;
scene->push(event);
}
-void TeenAgentEngine::playSound(byte id, byte skip_frames) {
- if (skip_frames > 0)
- --skip_frames;
+void TeenAgentEngine::playSound(byte id, byte skipFrames) {
+ if (skipFrames > 0)
+ --skipFrames;
SceneEvent event(SceneEvent::kPlaySound);
event.sound = id;
- event.color = skip_frames;
+ event.color = skipFrames;
scene->push(event);
}
-void TeenAgentEngine::enableObject(byte id, byte scene_id) {
+void TeenAgentEngine::enableObject(byte id, byte sceneId) {
SceneEvent event(SceneEvent::kEnableObject);
event.object = id + 1;
event.color = 1;
- event.scene = scene_id;
+ event.scene = sceneId;
scene->push(event);
}
-void TeenAgentEngine::disableObject(byte id, byte scene_id) {
+void TeenAgentEngine::disableObject(byte id, byte sceneId) {
SceneEvent event(SceneEvent::kEnableObject);
event.object = id + 1;
event.color = 0;
- event.scene = scene_id;
+ event.scene = sceneId;
scene->push(event);
}
@@ -1015,7 +1018,6 @@ void TeenAgentEngine::wait(uint16 frames) {
}
void TeenAgentEngine::playSoundNow(byte id) {
- Resources *res = Resources::instance();
uint size = res->sam_sam.getSize(id);
if (size == 0) {
warning("skipping invalid sound %u", id);
@@ -1024,28 +1026,26 @@ void TeenAgentEngine::playSoundNow(byte id) {
byte *data = (byte *)malloc(size);
res->sam_sam.read(id, data, size);
- //debug(0, "playing %u samples...", size);
+ debug(3, "playing %u samples...", size);
Audio::AudioStream *stream = Audio::makeRawStream(data, size, 11025, 0);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); //dispose is YES by default
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); // dispose is YES by default
}
-
void TeenAgentEngine::setMusic(byte id) {
- debug(0, "starting music %u", id);
- Resources *res = Resources::instance();
+ debugC(0, kDebugMusic, "starting music %u", id);
- if (id != 1) //intro music
- *res->dseg.ptr(0xDB90) = id;
+ if (id != 1) // intro music
+ res->dseg.set_byte(dsAddr_currentMusic, id);
if (_gameDescription->flags & ADGF_CD) {
byte track2cd[] = {7, 2, 0, 9, 3, 6, 8, 10, 4, 5, 11};
if (id == 0 || id > 11 || track2cd[id - 1] == 0) {
- debug(0, "no cd music for id %u", id);
+ debugC(0, kDebugMusic, "no cd music for id %u", id);
return;
}
byte track = track2cd[id - 1];
- debug(0, "playing cd track %u", track);
+ debugC(0, kDebugMusic, "playing cd track %u", track);
_system->getAudioCDManager()->play(track, -1, 0, 0);
} else if (music->load(id))
music->start();
diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h
index 737f07ba85..d6a2c0d3c6 100644
--- a/engines/teenagent/teenagent.h
+++ b/engines/teenagent/teenagent.h
@@ -23,12 +23,15 @@
#define TEENAGENT_ENGINE_H
#include "engines/engine.h"
-#include "teenagent/pack.h"
-#include "teenagent/resources.h"
-#include "teenagent/inventory.h"
+
#include "audio/audiostream.h"
#include "audio/mixer.h"
+
#include "common/random.h"
+#include "common/rect.h"
+#include "common/array.h"
+
+#include "teenagent/dialog.h"
struct ADGameDescription;
@@ -43,14 +46,34 @@ struct ADGameDescription;
namespace TeenAgent {
struct Object;
+struct UseHotspot;
class Scene;
class MusicPlayer;
+class Dialog;
class Console;
+class Resources;
+class Inventory;
+
+// Engine Debug Flags
+enum {
+ kDebugActor = (1 << 0),
+ kDebugAnimation = (1 << 1),
+ kDebugCallbacks = (1 << 2),
+ kDebugDialog = (1 << 3),
+ kDebugFont = (1 << 4),
+ kDebugInventory = (1 << 5),
+ kDebugMusic = (1 << 6),
+ kDebugObject = (1 << 7),
+ kDebugPack = (1 << 8),
+ kDebugScene = (1 << 9),
+ kDebugSurface = (1 << 10)
+};
+
+const uint16 kScreenWidth = 320;
+const uint16 kScreenHeight = 200;
class TeenAgentEngine : public Engine {
public:
- enum Action { kActionNone, kActionExamine, kActionUse };
-
TeenAgentEngine(OSystem *system, const ADGameDescription *gd);
~TeenAgentEngine();
@@ -58,15 +81,16 @@ public:
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
virtual bool canLoadGameStateCurrently() { return true; }
- virtual bool canSaveGameStateCurrently() { return !scene_busy; }
+ virtual bool canSaveGameStateCurrently() { return !_sceneBusy; }
virtual bool hasFeature(EngineFeature f) const;
void init();
- void deinit();
+
+ enum Action { kActionNone, kActionExamine, kActionUse };
void examine(const Common::Point &point, Object *object);
void use(Object *object);
- inline void cancel() { action = kActionNone; }
+ inline void cancel() { _action = kActionNone; }
bool processCallback(uint16 addr);
inline Scene *getScene() { return scene; }
@@ -76,15 +100,15 @@ public:
bool showMetropolis();
int skipEvents() const;
- static Common::String parseMessage(uint16 addr);
+ Common::String parseMessage(uint16 addr);
//event driven:
- void displayMessage(uint16 addr, byte color = 0xd1, uint16 position = 0);
- void displayMessage(const Common::String &str, byte color = 0xd1, uint16 position = 0);
- void displayAsyncMessage(uint16 addr, uint16 position, uint16 first_frame, uint16 last_frame, byte color = 0xd1);
- void displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 first_frame, uint16 last_frame, byte color = 0xd1);
+ void displayMessage(uint16 addr, byte color = textColorMark, uint16 x = 0, uint16 y = 0);
+ void displayMessage(const Common::String &str, byte color = textColorMark, uint16 x = 0, uint16 y = 0);
+ void displayAsyncMessage(uint16 addr, uint16 x, uint16 y, uint16 firstFrame, uint16 lastFrame, byte color = textColorMark);
+ void displayAsyncMessageInSlot(uint16 addr, byte slot, uint16 firstFrame, uint16 lastFrame, byte color = textColorMark);
void displayCredits(uint16 addr, uint16 timer = 0);
- void displayCutsceneMessage(uint16 addr, uint16 position);
+ void displayCutsceneMessage(uint16 addr, uint16 x, uint16 y);
void moveTo(const Common::Point &dst, byte o, bool warp = false);
void moveTo(uint16 x, uint16 y, byte o, bool warp = false);
void moveTo(Object *obj);
@@ -94,18 +118,18 @@ public:
void loadScene(byte id, const Common::Point &pos, byte o = 0);
void loadScene(byte id, uint16 x, uint16 y, byte o = 0);
void enableOn(bool enable = true);
- void setOns(byte id, byte value, byte scene_id = 0);
- void setLan(byte id, byte value, byte scene_id = 0);
+ void setOns(byte id, byte value, byte sceneId = 0);
+ void setLan(byte id, byte value, byte sceneId = 0);
void setFlag(uint16 addr, byte value);
byte getFlag(uint16 addr);
void reloadLan();
void rejectMessage();
void playMusic(byte id); //schedules play
- void playSound(byte id, byte skip_frames);
+ void playSound(byte id, byte skipFrames);
void playSoundNow(byte id);
- void enableObject(byte id, byte scene_id = 0);
- void disableObject(byte id, byte scene_id = 0);
+ void enableObject(byte id, byte sceneId = 0);
+ void disableObject(byte id, byte sceneId = 0);
void hideActor();
void showActor();
void waitAnimation();
@@ -119,9 +143,11 @@ public:
Common::RandomSource _rnd;
+ Resources *res;
Scene *scene;
Inventory *inventory;
MusicPlayer *music;
+ Dialog *dialog;
Console *console;
void setMusic(byte id);
@@ -130,17 +156,47 @@ private:
void processObject();
bool trySelectedObject();
- bool scene_busy;
- Action action;
- Object *dst_object;
+ bool _sceneBusy;
+ Action _action;
+ Object *_dstObject;
Audio::AudioStream *_musicStream;
Audio::SoundHandle _musicHandle, _soundHandle;
const ADGameDescription *_gameDescription;
- uint _mark_delay, _game_delay;
-
- Common::Array<Common::Array<UseHotspot> > use_hotspots;
+ uint _markDelay, _gameDelay;
+
+ Common::Array<Common::Array<UseHotspot> > _useHotspots;
+
+ void fnIntro();
+ void fnPoleClimbFail();
+ void fnGotAnchor();
+ void fnGetOutOfLake();
+ void fnGuardDrinking();
+ void fnEgoDefaultPosition();
+ void fnEnterCave();
+ void fnEgoScaredBySpider();
+ void fnMoveToLadderAndLeaveCellar();
+ void fnLeaveCellar();
+ void fnPutRockInHole();
+ void fnEgoBottomRightTurn();
+ bool fnCheckingDrawers();
+ void fnDrawerOpenMessage();
+ bool fnRobotSafeAlreadyUnlockedCheck();
+ void fnRobotSafeUnlockCheck();
+ bool fnMansionIntrusionAttempt();
+ void fnSecondMansionIntrusion();
+ void fnThirdMansionIntrusion();
+ void fnFourthMansionIntrusion();
+ void fnFifthMansionIntrusion();
+ void fnSixthMansionIntrusion();
+ void fnTooDark();
+ bool fnIsCookGone();
+ void fnEgoSuspiciousPosition();
+ void fnGivingFlowerToOldLady();
+ void fnGiveAnotherFlowerToOldLady();
+ void fnGivingFlowerToAnne();
+ void fnGiveAnotherFlowerToAnne();
};
} // End of namespace TeenAgent
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/detection.cpp b/engines/testbed/detection.cpp
index 02a9dfcb87..fd426d3e98 100644
--- a/engines/testbed/detection.cpp
+++ b/engines/testbed/detection.cpp
@@ -38,7 +38,7 @@ static const ADGameDescription testbedDescriptions[] = {
"",
AD_ENTRY1("TESTBED", 0), // Game-data file for detection
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index 69d361b0d6..33fab03a5e 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -96,10 +96,14 @@ TestExitStatus MidiTests::playMidiMusic() {
Common::String errMsg = MidiDriver::getErrorName(errCode);
Testsuite::writeOnScreen(errMsg, Common::Point(0, 100));
Testsuite::logPrintf("Error! %s", errMsg.c_str());
+
+ delete smfParser;
+ delete driver;
+
return kTestFailed;
}
- Testsuite::logDetailedPrintf("Info! Midi: Succesfully opened the driver\n");
+ Testsuite::logDetailedPrintf("Info! Midi: Successfully opened the driver\n");
Common::MemoryWriteStreamDynamic ws(DisposeAfterUse::YES);
loadMusicInMemory(&ws);
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/actors.cpp b/engines/tinsel/actors.cpp
index 0ba8b7cdba..531a8e3d12 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -406,7 +406,7 @@ void ActorEvent(CORO_PARAM, int ano, TINSEL_EVENT tEvent, bool bWait, int myEsca
* @param bRunScript Flag for whether to run actor's script for the scene
*/
void StartActor(const T1_ACTOR_STRUC *as, bool bRunScript) {
- SCNHANDLE hActorId = FROM_LE_32(as->hActorId);
+ SCNHANDLE hActorId = FROM_32(as->hActorId);
// Zero-out many things
actorInfo[hActorId - 1].bHidden = false;
@@ -418,15 +418,15 @@ void StartActor(const T1_ACTOR_STRUC *as, bool bRunScript) {
actorInfo[hActorId - 1].presObj = NULL;
// Store current scene's parameters for this actor
- actorInfo[hActorId - 1].mtype = FROM_LE_32(as->masking);
- actorInfo[hActorId - 1].actorCode = FROM_LE_32(as->hActorCode);
+ actorInfo[hActorId - 1].mtype = FROM_32(as->masking);
+ actorInfo[hActorId - 1].actorCode = FROM_32(as->hActorCode);
// Run actor's script for this scene
if (bRunScript) {
if (bActorsOn)
actorInfo[hActorId - 1].bAlive = true;
- if (actorInfo[hActorId - 1].bAlive && FROM_LE_32(as->hActorCode))
+ if (actorInfo[hActorId - 1].bAlive && FROM_32(as->hActorCode))
ActorEvent(hActorId, STARTUP, PLR_NOEVENT);
}
}
@@ -465,11 +465,11 @@ void StartTaggedActors(SCNHANDLE ah, int numActors, bool bRunScript) {
assert(as->hActorCode);
// Store current scene's parameters for this tagged actor
- taggedActors[i].id = FROM_LE_32(as->hActorId);
- taggedActors[i].hTagText = FROM_LE_32(as->hTagText);
- taggedActors[i].tagPortionV = FROM_LE_32(as->tagPortionV);
- taggedActors[i].tagPortionH = FROM_LE_32(as->tagPortionH);
- taggedActors[i].hActorCode = FROM_LE_32(as->hActorCode);
+ taggedActors[i].id = FROM_32(as->hActorId);
+ taggedActors[i].hTagText = FROM_32(as->hTagText);
+ taggedActors[i].tagPortionV = FROM_32(as->tagPortionV);
+ taggedActors[i].tagPortionH = FROM_32(as->tagPortionH);
+ taggedActors[i].hActorCode = FROM_32(as->hActorCode);
// Run actor's script for this scene
if (bRunScript) {
@@ -1310,9 +1310,9 @@ void SetActorRGB(int ano, COLORREF color) {
assert(ano >= 0 && ano <= NumActors);
if (ano)
- actorInfo[ano - 1].textColor = TO_LE_32(color);
+ actorInfo[ano - 1].textColor = TO_32(color);
else
- defaultColor = TO_LE_32(color);
+ defaultColor = TO_32(color);
}
/**
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index 034296ccc7..a1ec02186c 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -44,9 +44,9 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
while (1) { // repeat until a real image
debugC(DEBUG_DETAILED, kTinselDebugAnimations,
"DoNextFrame %ph index=%d, op=%xh", (byte *)pAnim, pAnim->scriptIndex,
- FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ FROM_32(pAni[pAnim->scriptIndex].op));
- switch ((int32)FROM_LE_32(pAni[pAnim->scriptIndex].op)) {
+ switch ((int32)FROM_32(pAni[pAnim->scriptIndex].op)) {
case ANI_END: // end of animation script
// move to next opcode
@@ -61,7 +61,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
pAnim->scriptIndex++;
// jump to new frame position
- pAnim->scriptIndex += (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ pAnim->scriptIndex += (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// go fetch a real image
break;
@@ -101,7 +101,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to x adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op), 0);
+ MultiAdjustXY(pAnim->pObject, (int32)FROM_32(pAni[pAnim->scriptIndex].op), 0);
// next opcode
pAnim->scriptIndex++;
@@ -114,7 +114,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to y adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_32(pAni[pAnim->scriptIndex].op));
// next opcode
pAnim->scriptIndex++;
@@ -128,11 +128,11 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
// move to x adjustment operand
pAnim->scriptIndex++;
- x = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ x = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// move to y adjustment operand
pAnim->scriptIndex++;
- y = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ y = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
MultiAdjustXY(pAnim->pObject, x, y);
@@ -189,7 +189,7 @@ SCRIPTSTATE DoNextFrame(ANIM *pAnim) {
default: // must be an actual animation frame handle
// set objects new animation frame
- pAnim->pObject->hShape = FROM_LE_32(pAni[pAnim->scriptIndex].hFrame);
+ pAnim->pObject->hShape = FROM_32(pAni[pAnim->scriptIndex].hFrame);
// re-shape the object
MultiReshape(pAnim->pObject);
@@ -273,7 +273,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
while (1) { // repeat until a real image
- switch ((int32)FROM_LE_32(pAni[pAnim->scriptIndex].op)) {
+ switch ((int32)FROM_32(pAni[pAnim->scriptIndex].op)) {
case ANI_END: // end of animation script
// going off the end is probably a error, but only in Tinsel 1
if (!TinselV2)
@@ -286,7 +286,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
pAnim->scriptIndex++;
// jump to new frame position
- pAnim->scriptIndex += (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ pAnim->scriptIndex += (int32)FROM_32(pAni[pAnim->scriptIndex].op);
if (TinselV2)
// Done if skip to jump
@@ -323,7 +323,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to x adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op), 0);
+ MultiAdjustXY(pAnim->pObject, (int32)FROM_32(pAni[pAnim->scriptIndex].op), 0);
// next opcode
pAnim->scriptIndex++;
@@ -334,7 +334,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to y adjustment operand
pAnim->scriptIndex++;
- MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op));
+ MultiAdjustXY(pAnim->pObject, 0, (int32)FROM_32(pAni[pAnim->scriptIndex].op));
// next opcode
pAnim->scriptIndex++;
@@ -346,11 +346,11 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
// move to x adjustment operand
pAnim->scriptIndex++;
- x = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ x = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
// move to y adjustment operand
pAnim->scriptIndex++;
- y = (int32)FROM_LE_32(pAni[pAnim->scriptIndex].op);
+ y = (int32)FROM_32(pAni[pAnim->scriptIndex].op);
MultiAdjustXY(pAnim->pObject, x, y);
@@ -389,7 +389,7 @@ void SkipFrames(ANIM *pAnim, int numFrames) {
pAnim->scriptIndex++;
} else {
// set objects new animation frame
- pAnim->pObject->hShape = FROM_LE_32(pAni[pAnim->scriptIndex].hFrame);
+ pAnim->pObject->hShape = FROM_32(pAni[pAnim->scriptIndex].hFrame);
// re-shape the object
MultiReshape(pAnim->pObject);
@@ -414,7 +414,7 @@ bool AboutToJumpOrEnd(PANIM pAnim) {
for (;;) {
// repeat until a real image
- switch (FROM_LE_32(pAni[zzz].op)) {
+ switch (FROM_32(pAni[zzz].op)) {
case ANI_END: // end of animation script
case ANI_JUMP: // do animation jump
return true;
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index a3e21a8227..9f1f2c43f4 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -124,28 +124,28 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
pReel = (const FREEL *)param;
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
// Initialize and insert the object, and initialize its script.
g_pBG[0] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), g_pBG[0]);
- InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_32(pReel->script), g_BGspeed);
g_bgReels = 1;
} else {
/*** At start of scene ***/
pFilm = (const FILM *)LockMem(g_hBackground);
- g_bgReels = FROM_LE_32(pFilm->numreels);
+ g_bgReels = FROM_32(pFilm->numreels);
int i;
for (i = 0; i < g_bgReels; i++) {
// Get the MULTI_INIT structure
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFilm->reels[i].mobj));
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pFilm->reels[i].mobj));
// Initialize and insert the object, and initialize its script.
g_pBG[i] = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), g_pBG[i]);
MultiSetZPosition(g_pBG[i], 0);
- InitStepAnimScript(&g_thisAnim[i], g_pBG[i], FROM_LE_32(pFilm->reels[i].script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[i], g_pBG[i], FROM_32(pFilm->reels[i].script), g_BGspeed);
if (i > 0)
g_pBG[i-1]->pSlave = g_pBG[i];
@@ -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();
@@ -170,11 +170,11 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
// New background during scene
if (!TinselV2) {
pReel = (const FREEL *)param;
- InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&g_thisAnim[0], g_pBG[0], FROM_32(pReel->script), g_BGspeed);
StepAnimScript(&g_thisAnim[0]);
} else {
pFilm = (const FILM *)LockMem(g_hBackground);
- assert(g_bgReels == (int32)FROM_LE_32(pFilm->numreels));
+ assert(g_bgReels == (int32)FROM_32(pFilm->numreels));
// Just re-initialize the scripts.
for (int i = 0; i < g_bgReels; i++) {
@@ -198,7 +198,7 @@ static void BGotherProcess(CORO_PARAM, const void *param) {
CORO_END_CONTEXT(_ctx);
const FREEL *pReel = (const FREEL *)param;
- const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
+ const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
CORO_BEGIN_CODE(_ctx);
@@ -206,7 +206,7 @@ static void BGotherProcess(CORO_PARAM, const void *param) {
_ctx->pObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), _ctx->pObj);
- InitStepAnimScript(&_ctx->anim, g_pBG[0], FROM_LE_32(pReel->script), g_BGspeed);
+ InitStepAnimScript(&_ctx->anim, g_pBG[0], FROM_32(pReel->script), g_BGspeed);
while (StepAnimScript(&_ctx->anim) != ScriptFinished)
CORO_SLEEP(1);
@@ -249,16 +249,16 @@ void StartupBackground(CORO_PARAM, SCNHANDLE hFilm) {
pim = GetImageFromFilm(hFilm, 0, NULL, NULL, &pfilm);
- SetBackPal(FROM_LE_32(pim->hImgPal));
+ SetBackPal(FROM_32(pim->hImgPal));
// Extract the film speed
- g_BGspeed = ONE_SECOND / FROM_LE_32(pfilm->frate);
+ g_BGspeed = ONE_SECOND / FROM_32(pfilm->frate);
// Start display process for each reel in the film
CoroScheduler.createProcess(PID_REEL, BGmainProcess, &pfilm->reels[0], sizeof(FREEL));
if (TinselV0) {
- for (uint i = 1; i < FROM_LE_32(pfilm->numreels); ++i)
+ for (uint i = 1; i < FROM_32(pfilm->numreels); ++i)
CoroScheduler.createProcess(PID_REEL, BGotherProcess, &pfilm->reels[i], sizeof(FREEL));
}
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index 438fd52a81..106e1542d5 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -529,9 +529,9 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
if (cmd & CD_PRINT) {
PRINT_CMD *pCmd = (PRINT_CMD *)(bigBuffer + commandOffset);
- MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
- (int16)READ_LE_UINT16(&pCmd->x),
- (int16)READ_LE_UINT16(&pCmd->y),
+ MovieText(Common::nullContext, (int16)READ_16(&pCmd->stringId),
+ (int16)READ_16(&pCmd->x),
+ (int16)READ_16(&pCmd->y),
pCmd->fontId,
NULL,
pCmd->duration);
@@ -542,9 +542,9 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset);
talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
- MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
- (int16)READ_LE_UINT16(&pCmd->x),
- (int16)READ_LE_UINT16(&pCmd->y),
+ MovieText(Common::nullContext, (int16)READ_16(&pCmd->stringId),
+ (int16)READ_16(&pCmd->x),
+ (int16)READ_16(&pCmd->y),
0,
&talkColor,
pCmd->duration);
@@ -622,7 +622,7 @@ int BMVPlayer::FollowingPacket(int thisPacket, bool bReallyImportant) {
if (nextReadSlot*SLOT_SIZE >= thisPacket && thisPacket+3 >= nextReadSlot*SLOT_SIZE)
return thisPacket + 3;
}
- length = (int32)READ_LE_UINT32(bigBuffer + thisPacket + 1);
+ length = (int32)READ_32(bigBuffer + thisPacket + 1);
length &= 0x00ffffff;
return thisPacket + length + 4;
}
@@ -886,7 +886,7 @@ bool BMVPlayer::DoBMVFrame() {
return true;
default:
- length = (int32)READ_LE_UINT32(data + 1);
+ length = (int32)READ_32(data + 1);
length &= 0x00ffffff;
graphOffset = nextUseOffset + 4; // Skip command byte and length
@@ -922,7 +922,7 @@ bool BMVPlayer::DoBMVFrame() {
}
if (*data & CD_XSCR) {
- xscr = (int16)READ_LE_UINT16(bigBuffer + graphOffset);
+ xscr = (int16)READ_16(bigBuffer + graphOffset);
graphOffset += sz_XSCR_pkt; // Skip scroll offset
length -= sz_XSCR_pkt;
} else if (*data & BIT0)
diff --git a/engines/tinsel/cursor.cpp b/engines/tinsel/cursor.cpp
index bf901c03b6..a83e7cd9ca 100644
--- a/engines/tinsel/cursor.cpp
+++ b/engines/tinsel/cursor.cpp
@@ -125,7 +125,7 @@ static void InitCurTrailObj(int i, int x, int y) {
pim = GetImageFromFilm(g_hCursorFilm, i+1, &pfr, &pmi, &pfilm);// Get pointer to image
assert(BgPal()); // No background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Initialize and insert the object, set its Z-pos, and hide it
g_ntrailData[i].trailObj = MultiInitObject(pmi);
@@ -134,7 +134,7 @@ static void InitCurTrailObj(int i, int x, int y) {
MultiSetAniXY(g_ntrailData[i].trailObj, x, y);
// Initialize the animation script
- InitStepAnimScript(&g_ntrailData[i].trailAnim, g_ntrailData[i].trailObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_ntrailData[i].trailAnim, g_ntrailData[i].trailObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
StepAnimScript(&g_ntrailData[i].trailAnim);
}
@@ -237,7 +237,7 @@ void RestoreMainCursor() {
if (g_McurObj != NULL) {
pfilm = (const FILM *)LockMem(g_hCursorFilm);
- InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_LE_32(pfilm->reels->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_32(pfilm->reels->script), ONE_SECOND / FROM_32(pfilm->frate));
StepAnimScript(&g_McurAnim);
}
g_bHiddenCursor = false;
@@ -324,14 +324,14 @@ IMAGE *GetImageFromReel(const FREEL *pfr, const MULTI_INIT **ppmi) {
const MULTI_INIT *pmi;
const FRAME *pFrame;
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pfr->mobj));
if (ppmi)
*ppmi = pmi;
- pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (const FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- return (IMAGE *)LockMem(READ_LE_UINT32(pFrame));
+ return (IMAGE *)LockMem(READ_32(pFrame));
}
/**
@@ -379,18 +379,18 @@ void SetAuxCursor(SCNHANDLE hFilm) {
pim = GetImageFromFilm(hFilm, 0, &pfr, &pmi, &pfilm);// Get pointer to image
assert(BgPal()); // no background palette
- pim->hImgPal = TO_LE_32(BgPal()); // Poke in the background palette
+ pim->hImgPal = TO_32(BgPal()); // Poke in the background palette
- g_ACoX = (short)(FROM_LE_16(pim->imgWidth)/2 - ((int16) FROM_LE_16(pim->anioffX)));
- g_ACoY = (short)((FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK)/2 -
- ((int16) FROM_LE_16(pim->anioffY)));
+ g_ACoX = (short)(FROM_16(pim->imgWidth)/2 - ((int16) FROM_16(pim->anioffX)));
+ g_ACoY = (short)((FROM_16(pim->imgHeight) & ~C16_FLAG_MASK)/2 -
+ ((int16) FROM_16(pim->anioffY)));
// Initialize and insert the auxillary cursor object
g_AcurObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), g_AcurObj);
// Initialize the animation and set its position
- InitStepAnimScript(&g_AcurAnim, g_AcurObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_AcurAnim, g_AcurObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
MultiSetAniXY(g_AcurObj, x - g_ACoX, y - g_ACoY);
MultiSetZPosition(g_AcurObj, Z_ACURSOR);
@@ -481,14 +481,14 @@ static void InitCurObj() {
if (TinselV2) {
pFilm = (const FILM *)LockMem(g_hCursorFilm);
pfr = (const FREEL *)&pFilm->reels[0];
- pmi = (MULTI_INIT *)LockMem(FROM_LE_32(pfr->mobj));
+ pmi = (MULTI_INIT *)LockMem(FROM_32(pfr->mobj));
PokeInPalette(pmi);
} else {
assert(BgPal()); // no background palette
pim = GetImageFromFilm(g_hCursorFilm, 0, &pfr, &pmi, &pFilm);// Get pointer to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
g_AcurObj = NULL; // No auxillary cursor
}
@@ -496,7 +496,7 @@ static void InitCurObj() {
g_McurObj = MultiInitObject(pmi);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), g_McurObj);
- InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pFilm->frate));
+ InitStepAnimScript(&g_McurAnim, g_McurObj, FROM_32(pfr->script), ONE_SECOND / FROM_32(pFilm->frate));
}
/**
@@ -620,7 +620,7 @@ void DwInitCursor(SCNHANDLE bfilm) {
g_hCursorFilm = bfilm;
pfilm = (const FILM *)LockMem(g_hCursorFilm);
- g_numTrails = FROM_LE_32(pfilm->numreels) - 1;
+ g_numTrails = FROM_32(pfilm->numreels) - 1;
assert(g_numTrails <= MAX_TRAILERS);
}
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp
index 2e4be33e53..a7ba8b28cb 100644
--- a/engines/tinsel/detection.cpp
+++ b/engines/tinsel/detection.cpp
@@ -67,7 +67,7 @@ bool TinselEngine::getIsADGFDemo() const {
return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
}
-bool TinselEngine::isCD() const {
+bool TinselEngine::isV1CD() const {
return (bool)(_gameDescription->desc.flags & ADGF_CD);
}
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index 631c2dce14..a945672da2 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -34,6 +34,8 @@ static const TinselGameDescription gameDescriptions[] = {
// TINSEL_V2: The Discworld 2 game used this updated version of the Tinsel 1 engine,
// and as far as we know there aren't any variations of this engine.
+ // ==== Discworld 1 early (TinselV0) entries ==============================
+
{ // Floppy Demo V0 from http://www.adventure-treff.de/specials/dl_demos.php
{
"dw",
@@ -41,7 +43,7 @@ static const TinselGameDescription gameDescriptions[] = {
AD_ENTRY1s("dw.gra", "ce1b57761ba705221bcf70955b827b97", 441192),
//AD_ENTRY1s("dw.scn", "ccd72f02183d0e96b6e7d8df9492cda8", 23308),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO3(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC)
},
@@ -51,6 +53,8 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V0,
},
+ // ==== Discworld 1 entries ===============================================
+
{ // CD Demo V1 version, with *.gra files
{
"dw",
@@ -60,7 +64,7 @@ static const TinselGameDescription gameDescriptions[] = {
{"english.smp", 0, NULL, -1},
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO | ADGF_CD,
GUIO0()
},
@@ -69,7 +73,7 @@ static const TinselGameDescription gameDescriptions[] = {
0,
TINSEL_V1,
},
-#if 0
+
{ // Macintosh CD Demo V1 version, with *.scn files, see tracker #3110936
{
"dw",
@@ -89,7 +93,7 @@ static const TinselGameDescription gameDescriptions[] = {
GF_SCNFILES,
TINSEL_V1,
},
-#endif
+
{ // Multilingual Floppy V1 with *.gra files.
// Note: It contains no english subtitles.
{
@@ -104,7 +108,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO1(GUIO_NOSPEECH)
},
@@ -127,7 +131,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO1(GUIO_NOSPEECH)
},
@@ -150,7 +154,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO1(GUIO_NOSPEECH)
},
@@ -173,7 +177,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO1(GUIO_NOSPEECH)
},
@@ -189,7 +193,7 @@ static const TinselGameDescription gameDescriptions[] = {
"Floppy",
AD_ENTRY1s("dw.gra", "c8808ccd988d603dd35dff42013ae7fd", 781656),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NOSPEECH)
},
@@ -208,7 +212,7 @@ static const TinselGameDescription gameDescriptions[] = {
{"english.smp", 0, NULL, -1},
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -227,7 +231,7 @@ static const TinselGameDescription gameDescriptions[] = {
{"english.smp", 0, NULL, -1},
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO_NONE
},
@@ -243,7 +247,7 @@ static const TinselGameDescription gameDescriptions[] = {
"Floppy",
AD_ENTRY1s("dw.gra", "ef05bbd2a754bd11a2e87bcd84ab5ccf", 781864),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO_NOSPEECH
},
@@ -265,7 +269,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO0()
},
@@ -290,7 +294,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO0()
},
@@ -314,7 +318,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE,
GUIO0()
},
@@ -337,7 +341,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO0()
},
@@ -360,7 +364,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DROPLANGUAGE | ADGF_CD,
GUIO0()
},
@@ -380,7 +384,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -400,7 +404,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::HE_ISR,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -463,7 +467,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -474,7 +478,6 @@ static const TinselGameDescription gameDescriptions[] = {
},
#endif
-#if 0
{ // Mac multilanguage CD
{
"dw",
@@ -495,8 +498,6 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
-#endif
-
{ // German CD re-release "Neon Edition"
// Note: This release has ENGLISH.TXT (with german content) instead of GERMAN.TXT
{
@@ -504,7 +505,7 @@ static const TinselGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("dw.scn", "6182c7986eaec893c62fb6ea13a9f225", 774556),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
},
@@ -525,7 +526,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NOASPECT)
},
@@ -546,7 +547,7 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::PL_POL,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO_NONE
},
@@ -556,6 +557,9 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
+ // ==== Discworld 2 entries ===============================================
+ // Note: All Discworld 2 versions are CD only, therefore we don't add the ADGF_CD flag
+
{ // English Discworld 2 demo
{
"dw2",
@@ -566,8 +570,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_ANY,
- Common::kPlatformPC,
- ADGF_DEMO | ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_DEMO,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -586,8 +590,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_GRB,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -606,8 +610,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::EN_USA,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -626,8 +630,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::FR_FRA,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -646,8 +650,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::DE_DEU,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -667,8 +671,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::IT_ITA,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -687,8 +691,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::ES_ESP,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
@@ -708,8 +712,8 @@ static const TinselGameDescription gameDescriptions[] = {
{NULL, 0, NULL, 0}
},
Common::RU_RUS,
- Common::kPlatformPC,
- ADGF_CD,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
GUIO1(GUIO_NOASPECT)
},
GID_DW2,
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 56ee2ea752..e6229ff3a0 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -234,8 +234,8 @@ enum PARTS_INDEX {
#define NM_RS_R_INSET 4
#define NM_RS_THICKNESS 5
#define NM_MOVE_AREA_B_Y 30
-#define NM_SLIDE_INSET (TinselV2 ? 18 : 15) // X offset (from right) of left of scroll region
-#define NM_SLIDE_THICKNESS (TinselV2 ? 13 : 4) // thickness of scroll region
+#define NM_SLIDE_INSET (TinselV2 ? 18 : 9) // X offset (from right) of left of scroll region
+#define NM_SLIDE_THICKNESS (TinselV2 ? 13 : 7) // thickness of scroll region
#define NM_UP_ARROW_TOP 34 // Y offset of top of up arrow
#define NM_UP_ARROW_BOTTOM 49 // Y offset of bottom of up arrow
#define NM_DN_ARROW_TOP 22 // Y offset (from bottom) of top of down arrow
@@ -1143,7 +1143,7 @@ static void FirstScene(int first) {
// Fill in the rest
for (i = 0; i < NUM_RGROUP_BOXES && i + first < g_numScenes; i++) {
cd.box[i].textMethod = TM_STRINGNUM;
- cd.box[i].ixText = FROM_LE_32(g_pHopper[i + first].hSceneDesc);
+ cd.box[i].ixText = FROM_32(g_pHopper[i + first].hSceneDesc);
}
// Blank out the spare ones (if any)
while (i < NUM_RGROUP_BOXES) {
@@ -1166,10 +1166,10 @@ static void SetChosenScene() {
static void FirstEntry(int first) {
int i;
- g_InvD[INV_MENU].hInvTitle = FROM_LE_32(g_pChosenScene->hSceneDesc);
+ g_InvD[INV_MENU].hInvTitle = FROM_32(g_pChosenScene->hSceneDesc);
// get number of entrances
- g_numEntries = FROM_LE_32(g_pChosenScene->numEntries);
+ g_numEntries = FROM_32(g_pChosenScene->numEntries);
// Force first to a sensible value
if (first > g_numEntries-NUM_RGROUP_BOXES)
@@ -1179,7 +1179,7 @@ static void FirstEntry(int first) {
for (i = 0; i < NUM_RGROUP_BOXES && i < g_numEntries; i++) {
cd.box[i].textMethod = TM_STRINGNUM;
- cd.box[i].ixText = FROM_LE_32(g_pEntries[FROM_LE_32(g_pChosenScene->entryIndex) + i + first].hDesc);
+ cd.box[i].ixText = FROM_32(g_pEntries[FROM_32(g_pChosenScene->entryIndex) + i + first].hDesc);
}
// Blank out the spare ones (if any)
while (i < NUM_RGROUP_BOXES) {
@@ -1191,17 +1191,17 @@ static void FirstEntry(int first) {
}
static void HopAction() {
- PHOPENTRY pEntry = g_pEntries + FROM_LE_32(g_pChosenScene->entryIndex) + cd.selBox + cd.extraBase;
+ PHOPENTRY pEntry = g_pEntries + FROM_32(g_pChosenScene->entryIndex) + cd.selBox + cd.extraBase;
- uint32 hScene = FROM_LE_32(g_pChosenScene->hScene);
- uint32 eNumber = FROM_LE_32(pEntry->eNumber);
+ uint32 hScene = FROM_32(g_pChosenScene->hScene);
+ uint32 eNumber = FROM_32(pEntry->eNumber);
debugC(DEBUG_BASIC, kTinselDebugAnimations, "Scene hopper chose scene %xh,%d\n", hScene, eNumber);
- if (FROM_LE_32(pEntry->flags) & fCall) {
+ if (FROM_32(pEntry->flags) & fCall) {
SaveScene(Common::nullContext);
NewScene(Common::nullContext, g_pChosenScene->hScene, pEntry->eNumber, TRANS_FADE);
}
- else if (FROM_LE_32(pEntry->flags) & fHook)
+ else if (FROM_32(pEntry->flags) & fHook)
HookScene(hScene, eNumber, TRANS_FADE);
else
NewScene(Common::nullContext, hScene, eNumber, TRANS_CUT);
@@ -2568,7 +2568,7 @@ static OBJECT *AddInvObject(int num, const FREEL **pfreel, const FILM **pfilm) {
pim = GetImageFromFilm(invObj->hIconFilm, 0, pfreel, &pmi, pfilm);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Set up the multi-object
pPlayObj = MultiInitObject(pmi);
@@ -2609,7 +2609,7 @@ static void FillInInventory() {
MultiSetAniXY(g_iconArray[n], g_InvD[g_ino].inventoryX + xpos , g_InvD[g_ino].inventoryY + ypos);
MultiSetZPosition(g_iconArray[n], Z_INV_ICONS);
- InitStepAnimScript(&g_iconAnims[n], g_iconArray[n], FROM_LE_32(pfr->script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&g_iconAnims[n], g_iconArray[n], FROM_32(pfr->script), ONE_SECOND / FROM_32(pfilm->frate));
n++;
}
@@ -2697,17 +2697,17 @@ static OBJECT *AddObject(const FREEL *pfreel, int num) {
pim = GetImageFromReel(pfreel, &pmi);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
// Horrible bodge involving global variables to save
// width and/or height of some window frame components
if (num == g_TL) {
- g_TLwidth = FROM_LE_16(pim->imgWidth);
- g_TLheight = FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK;
+ g_TLwidth = FROM_16(pim->imgWidth);
+ g_TLheight = FROM_16(pim->imgHeight) & ~C16_FLAG_MASK;
} else if (num == g_TR) {
- g_TRwidth = FROM_LE_16(pim->imgWidth);
+ g_TRwidth = FROM_16(pim->imgWidth);
} else if (num == g_BL) {
- g_BLheight = FROM_LE_16(pim->imgHeight) & ~C16_FLAG_MASK;
+ g_BLheight = FROM_16(pim->imgHeight) & ~C16_FLAG_MASK;
}
// Set up and insert the multi-object
@@ -2723,7 +2723,7 @@ static OBJECT *AddObject(const FREEL *pfreel, int num) {
static void AddSlider(OBJECT **slide, const FILM *pfilm) {
g_SlideObject = *slide = AddObject(&pfilm->reels[IX_SLIDE], -1);
- MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2) - 1,
+ MultiSetAniXY(*slide, MultiRightmost(g_RectObject) + (TinselV2 ? NM_SLX : -M_SXOFF + 2),
g_InvD[g_ino].inventoryY + g_sliderYpos);
MultiSetZPosition(*slide, Z_INV_MFRAME);
}
@@ -3318,7 +3318,7 @@ static void ConstructInventory(InventoryType filling) {
}
}
} else if (g_InvD[g_ino].NoofItems > g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons) {
- g_sliderYmin = g_TLheight - (TinselV2 ? 2 : 1);
+ g_sliderYmin = g_TLheight - (TinselV2 ? 1 : 2);
g_sliderYmax = g_TLheight + eV + (TinselV2 ? 12 : 10);
AddSlider(&retObj[n++], pfilm);
}
@@ -3406,9 +3406,9 @@ static void AlterCursor(int num) {
pim = GetImageFromFilm(g_hWinParts, num, &pfreel);
// Poke in the background palette
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
- SetTempCursor(FROM_LE_32(pfreel->script));
+ SetTempCursor(FROM_32(pfreel->script));
}
enum InvCursorFN {IC_AREA, IC_DROP};
@@ -3655,10 +3655,10 @@ extern void HideConversation(bool bHide) {
if (g_InventoryState == ACTIVE_INV && g_ino == INV_CONV) {
if (bHide) {
// Move all the window and icons off-screen
- for (i = 0; g_objArray[i] && i < MAX_WCOMP; i++) {
+ for (i = 0; i < MAX_WCOMP && g_objArray[i]; i++) {
MultiAdjustXY(g_objArray[i], 2 * SCREEN_WIDTH, 0);
}
- for (i = 0; g_iconArray[i] && i < MAX_ICONS; i++) {
+ for (i = 0; i < MAX_ICONS && g_iconArray[i]; i++) {
MultiAdjustXY(g_iconArray[i], 2 * SCREEN_WIDTH, 0);
}
@@ -4861,50 +4861,101 @@ static void InvDragEnd() {
g_Xchange = g_Ychange = 0; // Probably no need, but does no harm!
}
-static void MenuPageDown() {
+static bool MenuDown(int lines) {
if (cd.box == loadBox || cd.box == saveBox) {
- if (cd.extraBase < MAX_SAVED_FILES-NUM_RGROUP_BOXES) {
- FirstFile(cd.extraBase+(NUM_RGROUP_BOXES - 1));
+ if (cd.extraBase < MAX_SAVED_FILES - NUM_RGROUP_BOXES) {
+ FirstFile(cd.extraBase + lines);
AddBoxes(true);
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
} else if (cd.box == hopperBox1) {
if (cd.extraBase < g_numScenes - NUM_RGROUP_BOXES) {
- FirstScene(cd.extraBase + (NUM_RGROUP_BOXES - 1));
+ FirstScene(cd.extraBase + lines);
AddBoxes(true);
- if (cd.selBox)
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
} else if (cd.box == hopperBox2) {
if (cd.extraBase < g_numEntries - NUM_RGROUP_BOXES) {
- FirstEntry(cd.extraBase+(NUM_RGROUP_BOXES - 1));
+ FirstEntry(cd.extraBase + lines);
AddBoxes(true);
- if (cd.selBox)
- cd.selBox = NUM_RGROUP_BOXES - 1;
- Select(cd.selBox, true);
+ return true;
}
}
+ return false;
}
-static void MenuPageUp() {
+static bool MenuUp(int lines) {
if (cd.extraBase > 0) {
if (cd.box == loadBox || cd.box == saveBox)
- FirstFile(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstFile(cd.extraBase - lines);
else if (cd.box == hopperBox1)
- FirstScene(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstScene(cd.extraBase - lines);
else if (cd.box == hopperBox2)
- FirstEntry(cd.extraBase-(NUM_RGROUP_BOXES - 1));
+ FirstEntry(cd.extraBase - lines);
else
- return;
+ return false;
AddBoxes(true);
+ return true;
+ }
+ return false;
+}
+
+static void MenuRollDown() {
+ if (MenuDown(1)) {
+ if (cd.selBox > 0)
+ cd.selBox--;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuRollUp() {
+ if (MenuUp(1)) {
+ if (cd.selBox < NUM_RGROUP_BOXES - 1)
+ cd.selBox++;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuPageDown() {
+ if (MenuDown(NUM_RGROUP_BOXES - 1)) {
+ cd.selBox = NUM_RGROUP_BOXES - 1;
+ Select(cd.selBox, true);
+ }
+}
+
+static void MenuPageUp() {
+ if (MenuUp(NUM_RGROUP_BOXES - 1)) {
cd.selBox = 0;
Select(cd.selBox, true);
}
}
+static void InventoryDown() {
+ // This code is a copy of the IB_SLIDE_DOWN case in InvWalkTo
+ // TODO: So share this duplicate code
+ if (g_InvD[g_ino].NoofVicons == 1)
+ if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
+ g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
+ for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++) {
+ if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
+ g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
+ }
+ g_ItemsChanged = true;
+}
+
+static void InventoryUp() {
+ // This code is a copy of the I_SLIDE_UP case in InvWalkTo
+ // TODO: So share this duplicate code
+ if (g_InvD[g_ino].NoofVicons == 1)
+ g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
+ for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++)
+ g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
+ if (g_InvD[g_ino].FirstDisp < 0)
+ g_InvD[g_ino].FirstDisp = 0;
+ g_ItemsChanged = true;
+}
+
/**************************************************************************/
/************** Incoming events - further processing **********************/
/**************************************************************************/
@@ -5399,42 +5450,47 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
case PLR_PGDN:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
MenuPageDown();
} else {
- // This code is a copy of the IB_SLIDE_DOWN case in InvWalkTo
- // TODO: So share this duplicate code
- if (g_InvD[g_ino].NoofVicons == 1)
- if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
- g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
- for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++) {
- if (g_InvD[g_ino].FirstDisp + g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons < g_InvD[g_ino].NoofItems)
- g_InvD[g_ino].FirstDisp += g_InvD[g_ino].NoofHicons;
- }
- g_ItemsChanged = true;
+ // Inventory window
+ InventoryDown();
}
break;
case PLR_PGUP:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
MenuPageUp();
} else {
- // This code is a copy of the I_SLIDE_UP case in InvWalkTo
- // TODO: So share this duplicate code
- if (g_InvD[g_ino].NoofVicons == 1)
- g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
- for (int i = 1; i < g_InvD[g_ino].NoofVicons; i++)
- g_InvD[g_ino].FirstDisp -= g_InvD[g_ino].NoofHicons;
- if (g_InvD[g_ino].FirstDisp < 0)
- g_InvD[g_ino].FirstDisp = 0;
- g_ItemsChanged = true;
+ // Inventory window
+ InventoryUp();
+ }
+ break;
+
+ case PLR_WHEEL_DOWN:
+ if (g_ino == INV_MENU) {
+ // Load or Save screen
+ MenuRollDown();
+ } else {
+ // Inventory window
+ InventoryDown();
+ }
+ break;
+
+ case PLR_WHEEL_UP:
+ if (g_ino == INV_MENU) {
+ // Load or Save screen
+ MenuRollUp();
+ } else {
+ // Inventory window
+ InventoryUp();
}
break;
case PLR_HOME:
if (g_ino == INV_MENU) {
- // Only act if load or save screen
+ // Load or Save screen
if (cd.box == loadBox || cd.box == saveBox)
FirstFile(0);
else if (cd.box == hopperBox1)
@@ -5448,6 +5504,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
cd.selBox = 0;
Select(cd.selBox, true);
} else {
+ // Inventory window
g_InvD[g_ino].FirstDisp = 0;
g_ItemsChanged = true;
}
@@ -5455,6 +5512,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
case PLR_END:
if (g_ino == INV_MENU) {
+ // Load or Save screen
if (cd.box == loadBox || cd.box == saveBox)
FirstFile(MAX_SAVED_FILES); // Will get reduced to appropriate value
else if (cd.box == hopperBox1)
@@ -5468,6 +5526,7 @@ extern void EventToInventory(PLR_EVENT pEvent, const Common::Point &coOrds) {
cd.selBox = 0;
Select(cd.selBox, true);
} else {
+ // Inventory window
g_InvD[g_ino].FirstDisp = g_InvD[g_ino].NoofItems - g_InvD[g_ino].NoofHicons*g_InvD[g_ino].NoofVicons;
if (g_InvD[g_ino].FirstDisp < 0)
g_InvD[g_ino].FirstDisp = 0;
@@ -5560,21 +5619,6 @@ extern void RegisterIcons(void *cptr, int num) {
memmove(destP, srcP, 12);
destP->attribute = 0;
}
- } else if (TinselV1Mac) {
- // Macintosh version has BE encoded resources, so the values need to be byte swapped
- MEM_NODE *node = MemoryAllocFixed(g_numObjects * sizeof(INV_OBJECT));
- assert(node);
- g_invObjects = (INV_OBJECT *)MemoryDeref(node);
- assert(g_invObjects);
- INV_OBJECT *srcP = (INV_OBJECT *)cptr;
- INV_OBJECT *destP = (INV_OBJECT *)g_invObjects;
-
- for (int i = 0; i < num; ++i, ++destP, ++srcP) {
- destP->id = FROM_BE_32(srcP->id);
- destP->hIconFilm = FROM_BE_32(srcP->hIconFilm);
- destP->hScript = FROM_BE_32(srcP->hScript);
- destP->attribute = FROM_BE_32(srcP->attribute);
- }
} else if (TinselV2) {
if (g_invFilms == NULL) {
// First time - allocate memory
@@ -5613,7 +5657,7 @@ extern void setInvWinParts(SCNHANDLE hf) {
#ifdef DEBUG
pfilm = (const FILM *)LockMem(hf);
- assert(FROM_LE_32(pfilm->numreels) >= (uint32)(TinselV2 ? T2_HOPEDFORREELS : T1_HOPEDFORREELS)); // not as many reels as expected
+ assert(FROM_32(pfilm->numreels) >= (uint32)(TinselV2 ? T2_HOPEDFORREELS : T1_HOPEDFORREELS)); // not as many reels as expected
#endif
}
@@ -5630,7 +5674,7 @@ extern void setFlagFilms(SCNHANDLE hf) {
#ifdef DEBUG
pfilm = (const FILM *)LockMem(hf);
- assert(FROM_LE_32(pfilm->numreels) >= HOPEDFORFREELS); // not as many reels as expected
+ assert(FROM_32(pfilm->numreels) >= HOPEDFORFREELS); // not as many reels as expected
#endif
}
diff --git a/engines/tinsel/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/events.cpp b/engines/tinsel/events.cpp
index 1aa4d34227..61d3903f1a 100644
--- a/engines/tinsel/events.cpp
+++ b/engines/tinsel/events.cpp
@@ -389,7 +389,8 @@ void PlayerEvent(PLR_EVENT pEvent, const Common::Point &coOrds) {
"PLR_PROV_WALKTO", "PLR_WALKTO", "PLR_LOOK", "PLR_ACTION", "PLR_ESCAPE",
"PLR_MENU", "PLR_QUIT", "PLR_PGUP", "PLR_PGDN", "PLR_HOME", "PLR_END",
"PLR_DRAG1_START", "PLR_DRAG1_END", "PLR_DRAG2_START", "PLR_DRAG2_END",
- "PLR_JUMP", "PLR_NOEVENT"};
+ "PLR_JUMP", "PLR_NOEVENT", "PLR_SAVE", "PLR_LOAD", "PLR_WHEEL_UP",
+ "PLR_WHEEL_DOWN"};
debugC(DEBUG_BASIC, kTinselDebugActions, "%s - (%d,%d)",
actionList[pEvent], coOrds.x, coOrds.y);
static uint32 lastRealAction = 0; // FIXME: Avoid non-const global vars
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index cdf5ae2ae4..51669e4680 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -65,6 +65,8 @@ enum PLR_EVENT {
PLR_NOEVENT = 16,
PLR_SAVE = 17,
PLR_LOAD = 18,
+ PLR_WHEEL_UP = 19,
+ PLR_WHEEL_DOWN = 20,
// Aliases used for DW1 actions
PLR_SLEFT = PLR_WALKTO,
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index c1574ff963..b51b1d6d4f 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -117,10 +117,10 @@ static void FadeProcess(CORO_PARAM, const void *param) {
pFade->pPalQ->numColors, (uint32) *_ctx->pColMult);
else
FadePalette(_ctx->fadeRGB, _ctx->pPalette->palRGB,
- FROM_LE_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
+ FROM_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
// send new palette to video DAC
- UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
+ UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
// allow time for video DAC to be updated
CORO_SLEEP(1);
@@ -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/font.cpp b/engines/tinsel/font.cpp
index 54aa7cc15f..3dba56468b 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -102,16 +102,16 @@ void FettleFontPal(SCNHANDLE fontPal) {
assert(g_hTalkFont); // Talk font not declared
pFont = (const FONT *)LockMem(g_hTagFont);
- pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0
+ pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0
if (!TinselV2)
- pImg->hImgPal = TO_LE_32(fontPal);
+ pImg->hImgPal = TO_32(fontPal);
else
pImg->hImgPal = 0;
pFont = (const FONT *)LockMem(g_hTalkFont);
- pImg = (IMAGE *)LockMem(FROM_LE_32(pFont->fontInit.hObjImg)); // get image for char 0
+ pImg = (IMAGE *)LockMem(FROM_32(pFont->fontInit.hObjImg)); // get image for char 0
if (!TinselV2)
- pImg->hImgPal = TO_LE_32(fontPal);
+ pImg->hImgPal = TO_32(fontPal);
else
pImg->hImgPal = 0;
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index 9b06b1a501..5dae984def 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -73,7 +73,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
while (remainingBlocks) { // Repeat until all blocks are decompressed
if (!controlBits) {
- controlData = READ_LE_UINT16(srcIdx);
+ controlData = READ_16(srcIdx);
srcIdx += 2;
// If bit 15 of controlData is enabled, compression data is type 1.
@@ -92,7 +92,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
// If there is compression, we need to fetch an index
// to be treated as "base" for compression.
if (compressionType != 0) {
- controlData = READ_LE_UINT16(srcIdx);
+ controlData = READ_16(srcIdx);
srcIdx += 2;
baseIndex = controlData;
}
@@ -114,7 +114,7 @@ uint8* psxPJCRLEUnwinder(uint16 imageWidth, uint16 imageHeight, uint8 *srcIdx) {
switch (compressionType) {
case 0: // No compression, plain copy of indexes
while (decremTiles) {
- WRITE_LE_UINT16(dstIdx, READ_LE_UINT16(srcIdx));
+ WRITE_LE_UINT16(dstIdx, READ_16(srcIdx));
srcIdx += 2;
dstIdx += 2;
decremTiles--;
@@ -212,6 +212,82 @@ static void t0WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
}
/**
+ * Straight rendering with transparency support, Mac variant
+ */
+static void MacDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClipping) {
+ int yClip = 0;
+
+ if (applyClipping) {
+ // Adjust the height down to skip any bottom clipping
+ pObj->height -= pObj->botClip;
+ yClip = pObj->topClip;
+ }
+
+ // Simple RLE-like scheme: the two first bytes of each data chunk determine
+ // if bytes should be repeated or copied.
+ // Example: 10 00 00 20 will repeat byte 0x0 0x10 times, and will copy 0x20
+ // bytes from the input stream afterwards
+
+ // Vertical loop
+ for (int y = 0; y < pObj->height; ++y) {
+ // Get the start of the next line output
+ uint8 *tempDest = destP;
+
+ int leftClip = applyClipping ? pObj->leftClip : 0;
+ int rightClip = applyClipping ? pObj->rightClip : 0;
+
+ // Horizontal loop
+ for (int x = 0; x < pObj->width; ) {
+ byte repeatBytes = *srcP++;
+
+ if (repeatBytes) {
+ uint clipAmount = MIN<int>(repeatBytes, leftClip);
+ leftClip -= clipAmount;
+ x += clipAmount;
+
+ // Repeat of a given color
+ byte color = *srcP++;
+ int runLength = repeatBytes - clipAmount;
+ int rptLength = MAX(MIN(runLength, pObj->width - rightClip - x), 0);
+ if (yClip == 0) {
+ if (color != 0)
+ memset(tempDest, color, rptLength);
+ tempDest += rptLength;
+ }
+
+ x += runLength;
+ } else {
+ // Copy a specified sequence length of pixels
+ byte copyBytes = *srcP++;
+
+ uint clipAmount = MIN<int>(copyBytes, leftClip);
+ leftClip -= clipAmount;
+ x += clipAmount;
+ srcP += clipAmount;
+
+ int runLength = copyBytes - clipAmount;
+ int rptLength = MAX(MIN(runLength, pObj->width - rightClip - x), 0);
+ if (yClip == 0) {
+ memmove(tempDest, srcP, rptLength);
+ tempDest += rptLength;
+ }
+
+ int overflow = (copyBytes & 1);
+ x += runLength;
+ srcP += runLength + overflow;
+ }
+ } // horizontal loop
+
+ // Move to next line
+ if (yClip > 0)
+ --yClip;
+ else
+ destP += SCREEN_WIDTH;
+ } // vertical loop
+}
+
+
+/**
* Straight rendering with transparency support, PSX variant supporting also 4-BIT clut data
*/
static void PsxDrawTiles(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClipping, bool fourBitClut, uint32 psxSkipBytes, byte *psxMapperTable, bool transparency) {
@@ -721,9 +797,10 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
* Clears both the screen surface buffer and screen to the specified value
*/
void ClearScreen() {
+ byte blackColorIndex = (!TinselV1Mac) ? 0 : 255;
void *pDest = _vm->screen().getBasePtr(0, 0);
- memset(pDest, 0, SCREEN_WIDTH * SCREEN_HEIGHT);
- g_system->fillScreen(0);
+ memset(pDest, blackColorIndex, SCREEN_WIDTH * SCREEN_HEIGHT);
+ g_system->fillScreen(blackColorIndex);
g_system->updateScreen();
}
@@ -822,120 +899,59 @@ void DrawObject(DRAWOBJECT *pObj) {
// Handle various draw types
uint8 typeId = pObj->flags & 0xff;
+ int packType = pObj->flags >> 14; // TinselV2
- if (TinselV2) {
- // Tinsel v2 decoders
- // Initial switch statement for the different bit packing types
- int packType = pObj->flags >> 14;
-
- if (packType == 0) {
- // No color packing
- switch (typeId) {
- case 0x01:
- case 0x11:
- case 0x41:
- case 0x51:
- case 0x81:
- case 0xC1:
- t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, (typeId & 0x10) != 0);
- break;
- case 0x02:
- case 0x42:
- // This renderer called 'RlWrtAll', but is the same as t2WrtNonZero
- t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, false);
- break;
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
- WrtConst(pObj, destPtr, typeId == 0x44);
- break;
- case 0x08:
- case 0x48:
- WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
- WrtTrans(pObj, destPtr, typeId == 0xC4);
- break;
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else {
- // 1 = 16 from 240
- // 2 = 16 from 224
- // 3 = variable color
- if (packType == 1) pObj->baseCol = 0xF0;
- else if (packType == 2) pObj->baseCol = 0xE0;
-
- PackedWrtNonZero(pObj, srcPtr, destPtr, (pObj->flags & DMA_CLIP) != 0,
- (pObj->flags & DMA_FLIPH), packType);
- }
+ if (TinselV2 && packType != 0) {
+ // Color packing for TinselV2
+
+ if (packType == 1)
+ pObj->baseCol = 0xF0; // 16 from 240
+ else if (packType == 2)
+ pObj->baseCol = 0xE0; // 16 from 224
+ // 3 = variable color
- } else if (TinselV1PSX) {
- // Tinsel v1 decoders, PSX specific variants
+ PackedWrtNonZero(pObj, srcPtr, destPtr, (pObj->flags & DMA_CLIP) != 0,
+ (pObj->flags & DMA_FLIPH), packType);
+ } else {
switch (typeId) {
- case 0x01:
- case 0x41:
- PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
- break;
- case 0x08:
- case 0x48:
- PsxDrawTiles(pObj, srcPtr, destPtr, typeId >= 0x40, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
- break;
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
- WrtTrans(pObj, destPtr, typeId == 0xC4);
- break;
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
- WrtConst(pObj, destPtr, typeId == 0x44);
+ case 0x01: // all versions, draw sprite without clipping
+ case 0x41: // all versions, draw sprite with clipping
+ case 0x02: // TinselV2, draw sprite without clipping
+ case 0x11: // TinselV2, draw sprite without clipping, flipped horizontally
+ case 0x42: // TinselV2, draw sprite with clipping
+ case 0x51: // TinselV2, draw sprite with clipping, flipped horizontally
+ case 0x81: // TinselV2, draw sprite with clipping
+ case 0xC1: // TinselV2, draw sprite with clipping
+ assert(TinselV2 || (typeId == 0x01 || typeId == 0x41));
+
+ if (TinselV2)
+ t2WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40, (typeId & 0x10) != 0);
+ else if (TinselV1PSX)
+ PsxDrawTiles(pObj, srcPtr, destPtr, typeId == 0x41, psxFourBitClut, psxSkipBytes, psxMapperTable, true);
+ else if (TinselV1Mac)
+ MacDrawTiles(pObj, srcPtr, destPtr, typeId == 0x41);
+ else if (TinselV1)
+ WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x41);
+ else if (TinselV0)
+ t0WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x41);
break;
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else if (TinselV1) {
- // Tinsel v1 decoders
- switch (typeId) {
- case 0x01:
- case 0x08:
- case 0x41:
- case 0x48:
- WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
+ case 0x08: // draw background without clipping
+ case 0x48: // draw background with clipping
+ if (TinselV2 || TinselV1Mac || TinselV0)
+ WrtAll(pObj, srcPtr, destPtr, typeId == 0x48);
+ else if (TinselV1PSX)
+ PsxDrawTiles(pObj, srcPtr, destPtr, typeId == 0x48, psxFourBitClut, psxSkipBytes, psxMapperTable, false);
+ else if (TinselV1)
+ WrtNonZero(pObj, srcPtr, destPtr, typeId == 0x48);
break;
-
- case 0x04:
- case 0x44:
- // WrtConst with/without clipping
+ case 0x04: // fill with constant color without clipping
+ case 0x44: // fill with constant color with clipping
WrtConst(pObj, destPtr, typeId == 0x44);
break;
-
- case 0x84:
- case 0xC4:
- // WrtTrans with/without clipping
+ case 0x84: // draw transparent surface without clipping
+ case 0xC4: // draw transparent surface with clipping
WrtTrans(pObj, destPtr, typeId == 0xC4);
break;
-
- default:
- error("Unknown drawing type %d", typeId);
- }
- } else {
- // Tinsel v0 decoders
- switch (typeId) {
- case 0x01:
- case 0x41:
- t0WrtNonZero(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x08:
- case 0x48:
- WrtAll(pObj, srcPtr, destPtr, typeId >= 0x40);
- break;
- case 0x84:
- case 0xC4:
- WrtTrans(pObj, destPtr, (typeId & 0x40) != 0);
- break;
default:
error("Unknown drawing type %d", typeId);
}
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index 14d588dcec..3921414b01 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -30,6 +30,7 @@
#include "tinsel/dw.h"
#include "tinsel/handle.h"
#include "tinsel/heapmem.h" // heap memory manager
+#include "tinsel/scn.h" // for the DW1 Mac resource handler
#include "tinsel/timers.h" // for DwGetCurrentTime()
#include "tinsel/tinsel.h"
#include "tinsel/scene.h"
@@ -85,7 +86,6 @@ static char g_szCdPlayFile[100];
static void LoadFile(MEMHANDLE *pH); // load a memory block as a file
-
/**
* Loads the graphics handle table index file and preloads all the
* permanent graphics etc.
@@ -300,7 +300,7 @@ void LoadFile(MEMHANDLE *pH) {
// discardable - unlock the memory
MemoryUnlock(pH->_node);
-
+
// set the loaded flag
pH->filesize |= fLoaded;
@@ -322,6 +322,7 @@ void LoadFile(MEMHANDLE *pH) {
*/
byte *LockMem(SCNHANDLE offset) {
uint32 handle = offset >> SCNHANDLE_SHIFT; // calc memory handle to use
+ //debug("Locking offset of type %d (%x), offset %d, handle %d", (offset & HANDLEMASK) >> SCNHANDLE_SHIFT, (offset & HANDLEMASK) >> SCNHANDLE_SHIFT, offset & OFFSETMASK, handle);
MEMHANDLE *pH; // points to table entry
// range check the memory handle
diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp
index c48fefdd22..37769a7819 100644
--- a/engines/tinsel/multiobj.cpp
+++ b/engines/tinsel/multiobj.cpp
@@ -40,22 +40,22 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) {
OBJECT *pFirst, *pObj; // object pointers
FRAME *pFrame; // list of images for the multi-part object
- if (FROM_LE_32(pInitTbl->hMulFrame)) {
+ if (FROM_32(pInitTbl->hMulFrame)) {
// we have a frame handle
- pFrame = (FRAME *)LockMem(FROM_LE_32(pInitTbl->hMulFrame));
+ pFrame = (FRAME *)LockMem(FROM_32(pInitTbl->hMulFrame));
- obj_init.hObjImg = READ_LE_UINT32(pFrame); // first objects shape
+ obj_init.hObjImg = READ_32(pFrame); // first objects shape
} else { // this must be a animation list for a NULL object
pFrame = NULL;
obj_init.hObjImg = 0; // first objects shape
}
// init the object init table
- obj_init.objFlags = (int)FROM_LE_32(pInitTbl->mulFlags); // all objects have same flags
- obj_init.objID = (int)FROM_LE_32(pInitTbl->mulID); // all objects have same ID
- obj_init.objX = (int)FROM_LE_32(pInitTbl->mulX); // all objects have same X ani pos
- obj_init.objY = (int)FROM_LE_32(pInitTbl->mulY); // all objects have same Y ani pos
- obj_init.objZ = (int)FROM_LE_32(pInitTbl->mulZ); // all objects have same Z pos
+ obj_init.objFlags = (int)FROM_32(pInitTbl->mulFlags); // all objects have same flags
+ obj_init.objID = (int)FROM_32(pInitTbl->mulID); // all objects have same ID
+ obj_init.objX = (int)FROM_32(pInitTbl->mulX); // all objects have same X ani pos
+ obj_init.objY = (int)FROM_32(pInitTbl->mulY); // all objects have same Y ani pos
+ obj_init.objZ = (int)FROM_32(pInitTbl->mulZ); // all objects have same Z pos
// create and init the first object
pObj = pFirst = InitObject(&obj_init);
@@ -65,9 +65,9 @@ OBJECT *MultiInitObject(const MULTI_INIT *pInitTbl) {
pFrame++;
- while (READ_LE_UINT32(pFrame) != 0) {
+ while (READ_32(pFrame) != 0) {
// set next objects shape
- obj_init.hObjImg = READ_LE_UINT32(pFrame);
+ obj_init.hObjImg = READ_32(pFrame);
// create next object and link to previous
pObj = pObj->pSlave = InitObject(&obj_init);
@@ -378,9 +378,9 @@ void MultiReshape(OBJECT *pMultiObj) {
// update previous
pMultiObj->hMirror = hFrame;
- while (READ_LE_UINT32(pFrame) != 0 && pMultiObj != NULL) {
+ while (READ_32(pFrame) != 0 && pMultiObj != NULL) {
// a normal image - update the current object with this image
- AnimateObject(pMultiObj, READ_LE_UINT32(pFrame));
+ AnimateObject(pMultiObj, READ_32(pFrame));
// move to next image for this frame
pFrame++;
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index b3bfbcc5dc..3144ea7f94 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -187,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;
}
@@ -277,63 +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);
- if (g_midiBuffer.pDat)
- // already allocated
- return;
+ uint32 curTrack = 1;
+ uint32 songLength = 0;
+ int32 fileSize = midiStream.size();
- // open MIDI sequence file in binary mode
- if (!midiStream.open(MIDI_FILE))
- error(CANNOT_FIND_FILE, MIDI_FILE);
+ // Init
+ for (int i = 0; i < ARRAYSIZE(g_midiOffsets); i++)
+ g_midiOffsets[i] = 0;
- // 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;
+ midiStream.skip(4); // skip file header
+
+ 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() {
@@ -784,8 +815,8 @@ bool PCMMusicPlayer::getNextChunk() {
// Set parameters for this chunk of music
id = _scriptNum;
while (id--)
- script = scriptBuffer + READ_LE_UINT32(script);
- snum = FROM_LE_32(script[_scriptIndex++]);
+ script = scriptBuffer + READ_32(script);
+ snum = FROM_32(script[_scriptIndex++]);
if (snum == MUSIC_JUMP || snum == MUSIC_END) {
// Let usual code sort it out!
@@ -797,11 +828,11 @@ bool PCMMusicPlayer::getNextChunk() {
musicSegments = (MusicSegment *) LockMem(_hSegment);
- assert(FROM_LE_32(musicSegments[snum].numChannels) == 1);
- assert(FROM_LE_32(musicSegments[snum].bitsPerSample) == 16);
+ assert(FROM_32(musicSegments[snum].numChannels) == 1);
+ assert(FROM_32(musicSegments[snum].bitsPerSample) == 16);
- sampleOffset = FROM_LE_32(musicSegments[snum].sampleOffset);
- sampleLength = FROM_LE_32(musicSegments[snum].sampleLength);
+ sampleOffset = FROM_32(musicSegments[snum].sampleOffset);
+ sampleLength = FROM_32(musicSegments[snum].sampleLength);
sampleCLength = (((sampleLength + 63) & ~63)*33)/64;
if (!file.open(_filename))
@@ -839,14 +870,14 @@ bool PCMMusicPlayer::getNextChunk() {
id = _scriptNum;
while (id--)
- script = scriptBuffer + READ_LE_UINT32(script);
- snum = FROM_LE_32(script[_scriptIndex]);
+ script = scriptBuffer + READ_32(script);
+ snum = FROM_32(script[_scriptIndex]);
if (snum == MUSIC_END) {
_state = S_END2;
} else {
if (snum == MUSIC_JUMP)
- _scriptIndex = FROM_LE_32(script[_scriptIndex+1]);
+ _scriptIndex = FROM_32(script[_scriptIndex+1]);
_state = _forcePlay ? S_NEW : S_NEXT;
_forcePlay = false;
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index cbe5b0a88f..b70b581bbe 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -302,23 +302,23 @@ void GetAniOffset(SCNHANDLE hImg, int flags, int *pAniX, int *pAniY) {
const IMAGE *pImg = (const IMAGE *)LockMem(hImg);
// set ani X
- *pAniX = (int16) FROM_LE_16(pImg->anioffX);
+ *pAniX = (int16) FROM_16(pImg->anioffX);
// set ani Y
- *pAniY = (int16) FROM_LE_16(pImg->anioffY);
+ *pAniY = (int16) FROM_16(pImg->anioffY);
if (flags & DMA_FLIPH) {
// we are flipped horizontally
// set ani X = -ani X + width - 1
- *pAniX = -*pAniX + FROM_LE_16(pImg->imgWidth) - 1;
+ *pAniX = -*pAniX + FROM_16(pImg->imgWidth) - 1;
}
if (flags & DMA_FLIPV) {
// we are flipped vertically
// set ani Y = -ani Y + height - 1
- *pAniY = -*pAniY + (FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK) - 1;
+ *pAniY = -*pAniY + (FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK) - 1;
}
} else
// null image
@@ -375,7 +375,7 @@ OBJECT *InitObject(const OBJ_INIT *pInitTbl) {
if (pImg->hImgPal) {
// allocate a palette for this object
- pPalQ = AllocPalette(FROM_LE_32(pImg->hImgPal));
+ pPalQ = AllocPalette(FROM_32(pImg->hImgPal));
// make sure palette allocated
assert(pPalQ != NULL);
@@ -385,13 +385,13 @@ OBJECT *InitObject(const OBJ_INIT *pInitTbl) {
pObj->pPal = pPalQ;
// set objects size
- pObj->width = FROM_LE_16(pImg->imgWidth);
- pObj->height = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK;
+ pObj->width = FROM_16(pImg->imgWidth);
+ pObj->height = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK;
pObj->flags &= ~C16_FLAG_MASK;
- pObj->flags |= FROM_LE_16(pImg->imgHeight) & C16_FLAG_MASK;
+ pObj->flags |= FROM_16(pImg->imgHeight) & C16_FLAG_MASK;
// set objects bitmap definition
- pObj->hBits = FROM_LE_32(pImg->hImgBits);
+ pObj->hBits = FROM_32(pImg->hImgBits);
// get animation offset of object
GetAniOffset(pObj->hImg, pInitTbl->objFlags, &aniX, &aniY);
@@ -442,13 +442,13 @@ void AnimateObjectFlags(OBJECT *pAniObj, int newflags, SCNHANDLE hNewImg) {
const IMAGE *pNewImg = (IMAGE *)LockMem(hNewImg);
// setup new shape
- pAniObj->width = FROM_LE_16(pNewImg->imgWidth);
- pAniObj->height = FROM_LE_16(pNewImg->imgHeight) & ~C16_FLAG_MASK;
+ pAniObj->width = FROM_16(pNewImg->imgWidth);
+ pAniObj->height = FROM_16(pNewImg->imgHeight) & ~C16_FLAG_MASK;
newflags &= ~C16_FLAG_MASK;
- newflags |= FROM_LE_16(pNewImg->imgHeight) & C16_FLAG_MASK;
+ newflags |= FROM_16(pNewImg->imgHeight) & C16_FLAG_MASK;
// set objects bitmap definition
- pAniObj->hBits = FROM_LE_32(pNewImg->hImgBits);
+ pAniObj->hBits = FROM_32(pNewImg->hImgBits);
} else { // null image
pAniObj->width = 0;
pAniObj->height = 0;
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index e6c9467fab..b72d52cc8d 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;
@@ -102,7 +100,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
memset(mapperTable, 0, 16);
for (int j = 1; j < 16; j++) {
- clutEntry = READ_LE_UINT16(psxClut + (sizeof(uint16) * j));
+ clutEntry = READ_16(psxClut + (sizeof(uint16) * j));
if (clutEntry) {
if (clutEntry == 0x7EC0) { // This is an already known value, used by the in-game text
mapperTable[j] = 232;
@@ -110,7 +108,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
}
// Check for correspondent color
- for (uint i = 0; (i < FROM_LE_32(pal->numColors)) && !colorFound; i++) {
+ for (uint i = 0; (i < FROM_32(pal->numColors)) && !colorFound; i++) {
// get R G B values in the same way as psx format converters
uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3);
@@ -170,6 +168,16 @@ void PalettesToVideoDAC() {
pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]);
}
+ // 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) {
+ 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
g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColors);
@@ -318,7 +326,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
p->objCount = 1; // init number of objects using palette
p->posInDAC = iDAC; // set palettes start pos in video DAC
p->hPal = hNewPal; // set hardware palette data
- p->numColors = FROM_LE_32(pNewPal->numColors); // set number of colors in palette
+ p->numColors = FROM_32(pNewPal->numColors); // set number of colors in palette
if (TinselV2)
// Copy all the colors
@@ -430,24 +438,24 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) {
// validate palette Q pointer
assert(pPalQ >= g_palAllocData && pPalQ <= g_palAllocData + NUM_PALETTES - 1);
- if (pPalQ->numColors >= (int)FROM_LE_32(pNewPal->numColors)) {
+ if (pPalQ->numColors >= (int)FROM_32(pNewPal->numColors)) {
// new palette will fit the slot
// install new palette
pPalQ->hPal = hNewPal;
if (TinselV2) {
- pPalQ->numColors = FROM_LE_32(pNewPal->numColors);
+ pPalQ->numColors = FROM_32(pNewPal->numColors);
// Copy all the colors
- memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColors) * sizeof(COLORREF));
+ memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_32(pNewPal->numColors) * sizeof(COLORREF));
if (!pPalQ->bFading)
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), pPalQ->palRGB);
+ UpdateDACqueue(pPalQ->posInDAC, FROM_32(pNewPal->numColors), pPalQ->palRGB);
} else {
// Q the change to the video DAC
- UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), hNewPal);
+ UpdateDACqueueHandle(pPalQ->posInDAC, FROM_32(pNewPal->numColors), hNewPal);
}
} else {
// # colors are different - will have to update all following palette entries
@@ -546,7 +554,8 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// leave background color alone
g_transPalette[0] = 0;
- for (uint i = 0; i < FROM_LE_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]);
@@ -558,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_LE_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 af58a7ffbd..c57b8df2ba 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -30,11 +30,11 @@ namespace Tinsel {
typedef uint32 COLORREF;
-#define TINSEL_RGB(r,g,b) ((COLORREF)TO_LE_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
+#define TINSEL_RGB(r,g,b) ((COLORREF)TO_32(((uint8)(r)|((uint16)(g)<<8))|(((uint32)(uint8)(b))<<16)))
-#define TINSEL_GetRValue(rgb) ((uint8)(FROM_LE_32(rgb)))
-#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_LE_32(rgb)))>>8))
-#define TINSEL_GetBValue(rgb) ((uint8)((FROM_LE_32(rgb))>>16))
+#define TINSEL_GetRValue(rgb) ((uint8)(FROM_32(rgb)))
+#define TINSEL_GetGValue(rgb) ((uint8)(((uint16)(FROM_32(rgb)))>>8))
+#define TINSEL_GetBValue(rgb) ((uint8)((FROM_32(rgb))>>16))
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
@@ -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/pcode.cpp b/engines/tinsel/pcode.cpp
index 04bc2856ca..7e439e83a9 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -420,7 +420,7 @@ void RegisterGlobals(int num) {
g_numGlobals = num;
g_hMasterScript = !TinselV2 ? 0 :
- READ_LE_UINT32(FindChunk(MASTER_SCNHANDLE, CHUNK_MASTER_SCRIPT));
+ READ_32(FindChunk(MASTER_SCNHANDLE, CHUNK_MASTER_SCRIPT));
// Allocate RAM for pGlobals and make sure it's allocated
g_pGlobals = (int32 *)calloc(g_numGlobals, sizeof(int32));
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index 9e0baa749e..e202278953 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -81,9 +81,9 @@ static void PokeInPalette(SCNHANDLE hMulFrame) {
pFrame = (const FRAME *)LockMem(hMulFrame);
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
}
}
@@ -96,12 +96,12 @@ void PokeInPalette(const MULTI_INIT *pmi) {
// Could be an empty column
if (pmi->hMulFrame) {
- pFrame = (FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim->hImgPal = TO_32(BgPal());
}
}
@@ -234,8 +234,8 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
PMULTI_INIT pmi; // MULTI_INIT structure
pReel = GetReel(hFilm, actorCol - 1);
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pReel->mobj));
- _ctx->reelActor = (int32)FROM_LE_32(pmi->mulID);
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pReel->mobj));
+ _ctx->reelActor = (int32)FROM_32(pmi->mulID);
} else
_ctx->reelActor = 0;
@@ -251,27 +251,27 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
pFilm = (FILM *)LockMem(hFilm);
pReel = &pFilm->reels[column];
- pAni = (ANI_SCRIPT *)LockMem(FROM_LE_32(pReel->script));
+ pAni = (ANI_SCRIPT *)LockMem(FROM_32(pReel->script));
if (_ctx->speed == -1) {
- _ctx->speed = (ONE_SECOND/FROM_LE_32(pFilm->frate));
+ _ctx->speed = (ONE_SECOND/FROM_32(pFilm->frate));
// Restored reel
for (;;) {
- if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_END)
+ if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_END)
break;
- else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_JUMP) {
+ else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_JUMP) {
_ctx->frameNumber++;
- _ctx->frameNumber += FROM_LE_32(pAni[_ctx->frameNumber].op);
+ _ctx->frameNumber += FROM_32(pAni[_ctx->frameNumber].op);
break;
}
// Could check for the other stuff here
// but they really dont happen
// OH YES THEY DO
- else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTX
- || FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTY) {
+ else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTX
+ || FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTY) {
_ctx->frameNumber += 2;
- } else if (FROM_LE_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTXY) {
+ } else if (FROM_32(pAni[_ctx->frameNumber].op) == ANI_ADJUSTXY) {
_ctx->frameNumber += 3;
} else {
// ANI_STOP, ANI_HIDE, ANI_HFLIP,
@@ -281,7 +281,7 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
}
}
- switch (FROM_LE_32(pAni[_ctx->frameNumber].op)) {
+ switch (FROM_32(pAni[_ctx->frameNumber].op)) {
case ANI_END:
// Stop this sample if repeating
if (_ctx->sampleNumber && _ctx->bLooped)
@@ -292,9 +292,9 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
case ANI_JUMP:
_ctx->frameNumber++;
- assert((int32)FROM_LE_32(pAni[_ctx->frameNumber].op) < 0);
+ assert((int32)FROM_32(pAni[_ctx->frameNumber].op) < 0);
- _ctx->frameNumber += FROM_LE_32(pAni[_ctx->frameNumber].op);
+ _ctx->frameNumber += FROM_32(pAni[_ctx->frameNumber].op);
assert(_ctx->frameNumber >= 0);
continue;
@@ -329,15 +329,15 @@ static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,
if (_ctx->sampleNumber)
_vm->_sound->stopSpecSample(_ctx->sampleNumber, 0);
- _ctx->sampleNumber = FROM_LE_32(pAni[_ctx->frameNumber++].op);
+ _ctx->sampleNumber = FROM_32(pAni[_ctx->frameNumber++].op);
if (_ctx->sampleNumber > 0)
_ctx->bLooped = false;
else {
_ctx->sampleNumber = ~_ctx->sampleNumber;
_ctx->bLooped = true;
}
- x = (short)(FROM_LE_32(pAni[_ctx->frameNumber].op) >> 16);
- y = (short)(FROM_LE_32(pAni[_ctx->frameNumber].op) & 0xffff);
+ x = (short)(FROM_32(pAni[_ctx->frameNumber].op) >> 16);
+ y = (short)(FROM_32(pAni[_ctx->frameNumber].op) & 0xffff);
if (x == 0)
x = -1;
@@ -451,10 +451,10 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
_ctx->pfreel = &pfilm->reels[ppi->column];
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pfreel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(_ctx->pfreel->mobj));
// Save actor's ID
- _ctx->reelActor = (int32)FROM_LE_32(pmi->mulID);
+ _ctx->reelActor = (int32)FROM_32(pmi->mulID);
/**** New (experimental? bit 5/1/95 ****/
if (!TinselV0 && !actorAlive(_ctx->reelActor))
@@ -488,7 +488,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
return;
// Poke in the background palette
- PokeInPalette(FROM_LE_32(pmi->hMulFrame));
+ PokeInPalette(FROM_32(pmi->hMulFrame));
// Set up and insert the multi-object
_ctx->pPlayObj = MultiInitObject(pmi);
@@ -534,7 +534,7 @@ static void t1PlayReel(CORO_PARAM, const PPINIT *ppi) {
if (ppi->actorid == 0 && !actorAlive(_ctx->reelActor))
_ctx->lifeNoMatter = true;
- InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pfreel->script), ppi->speed);
+ InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_32(_ctx->pfreel->script), ppi->speed);
// If first column, set Z position as per
// Otherwise, column 0's + column number
@@ -706,16 +706,16 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Get the reel and MULTI_INIT structure
_ctx->pFreel = GetReel(hFilm, column);
- _ctx->pmi = (MULTI_INIT *)LockMem(FROM_LE_32(_ctx->pFreel->mobj));
+ _ctx->pmi = (MULTI_INIT *)LockMem(FROM_32(_ctx->pFreel->mobj));
- if ((int32)FROM_LE_32(_ctx->pmi->mulID) == -2) {
+ if ((int32)FROM_32(_ctx->pmi->mulID) == -2) {
CORO_INVOKE_ARGS(SoundReel, (CORO_SUBCTX, hFilm, column, speed, myescEvent,
- FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATEDACTOR));
+ FROM_32(_ctx->pmi->otherFlags) & OTH_RELATEDACTOR));
return;
}
// Save actor's ID
- _ctx->reelActor = FROM_LE_32(_ctx->pmi->mulID);
+ _ctx->reelActor = FROM_32(_ctx->pmi->mulID);
UpdateActorEsc(_ctx->reelActor, myescEvent);
@@ -759,8 +759,8 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// Set ghost bit if wanted
if (ActorIsGhost(_ctx->reelActor)) {
- assert(FROM_LE_32(_ctx->pmi->mulFlags) == DMA_WNZ || FROM_LE_32(_ctx->pmi->mulFlags) == (DMA_WNZ | DMA_GHOST));
- _ctx->pmi->mulFlags = TO_LE_32(FROM_LE_32(_ctx->pmi->mulFlags) | DMA_GHOST);
+ assert(FROM_32(_ctx->pmi->mulFlags) == DMA_WNZ || FROM_32(_ctx->pmi->mulFlags) == (DMA_WNZ | DMA_GHOST));
+ _ctx->pmi->mulFlags = TO_32(FROM_32(_ctx->pmi->mulFlags) | DMA_GHOST);
}
// Set up and insert the multi-object
@@ -793,10 +793,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
/*
* Sort out x and y
*/
- assert( ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE))
- || ((FROM_LE_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE) && !(FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE)) );
+ assert( ((FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE) && !(FROM_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE))
+ || ((FROM_32(_ctx->pmi->otherFlags) & OTH_ABSOLUTE) && !(FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE)) );
- _ctx->bRelative = FROM_LE_32(_ctx->pmi->otherFlags) & OTH_RELATIVE;
+ _ctx->bRelative = FROM_32(_ctx->pmi->otherFlags) & OTH_RELATIVE;
if (_ctx->bRelative) {
// Use actor's position. If (x, y) specified, move the actor.
@@ -808,7 +808,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
x = y = 0; // Use (0,0) if no specified
// Add embedded co-ords
- MultiSetAniXY(_ctx->pPlayObj, x + FROM_LE_32(_ctx->pmi->mulX), y + FROM_LE_32(_ctx->pmi->mulY));
+ MultiSetAniXY(_ctx->pPlayObj, x + FROM_32(_ctx->pmi->mulX), y + FROM_32(_ctx->pmi->mulY));
/*
* Sort out z
@@ -824,10 +824,10 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
// N.B. It HAS been ensured that the first column gets here first
- if ((int32)FROM_LE_32(_ctx->pmi->mulZ) != -1) {
+ if ((int32)FROM_32(_ctx->pmi->mulZ) != -1) {
// Z override in script
- baseZfact = FROM_LE_32(_ctx->pmi->mulZ);
+ baseZfact = FROM_32(_ctx->pmi->mulZ);
baseZposn = (baseZfact << ZSHIFT) + MultiLowest(_ctx->pPlayObj);
if (bTop)
baseZposn += Z_TOPPLAY;
@@ -850,7 +850,7 @@ static void t2PlayReel(CORO_PARAM, int x, int y, bool bRestore, int speed, SCNHA
* another reel starts up for this actor,
* or the actor gets killed.
*/
- InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_LE_32(_ctx->pFreel->script), speed);
+ InitStepAnimScript(&_ctx->thisAnim, _ctx->pPlayObj, FROM_32(_ctx->pFreel->script), speed);
if (bRestore || (ActorEsc(_ctx->reelActor) == true &&
ActorEev(_ctx->reelActor) != GetEscEvents())) {
@@ -952,10 +952,10 @@ void NewestFilm(SCNHANDLE film, const FREEL *reel) {
const MULTI_INIT *pmi; // MULTI_INIT structure
// Get the MULTI_INIT structure
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(reel->mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(reel->mobj));
- if (!TinselV2 || ((int32)FROM_LE_32(pmi->mulID) != -2))
- SetActorLatestFilm((int32)FROM_LE_32(pmi->mulID), film);
+ if (!TinselV2 || ((int32)FROM_32(pmi->mulID) != -2))
+ SetActorLatestFilm((int32)FROM_32(pmi->mulID), film);
}
// *******************************************************
@@ -988,7 +988,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay
ppi.y = y;
ppi.z = 0;
ppi.bRestore = false;
- ppi.speed = (ONE_SECOND / FROM_LE_32(pFilm->frate));
+ ppi.speed = (ONE_SECOND / FROM_32(pFilm->frate));
ppi.actorid = actorid;
ppi.splay = splay;
ppi.bTop = bTop;
@@ -997,7 +997,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay
ppi.myescEvent = myescEvent;
// Start display process for each reel in the film
- for (int i = FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) {
+ for (int i = FROM_32(pFilm->numreels) - 1; i >= 0; i--) {
NewestFilm(hFilm, &pFilm->reels[i]);
ppi.column = i;
@@ -1049,7 +1049,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla
_ctx->ppi.y = y;
_ctx->ppi.z = 0;
_ctx->ppi.bRestore = false;
- _ctx->ppi.speed = (ONE_SECOND / FROM_LE_32(pFilm->frate));
+ _ctx->ppi.speed = (ONE_SECOND / FROM_32(pFilm->frate));
_ctx->ppi.actorid = actorid;
_ctx->ppi.splay = splay;
_ctx->ppi.bTop = bTop;
@@ -1059,7 +1059,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla
// Start display process for each secondary reel in the film in Tinsel 1,
// or all of them in Tinsel 2
- for (int i = FROM_LE_32(pFilm->numreels) - 1; i >= (TinselV2 ? 0 : 1); i--) {
+ for (int i = FROM_32(pFilm->numreels) - 1; i >= (TinselV2 ? 0 : 1); i--) {
NewestFilm(hFilm, &pFilm->reels[i]);
_ctx->ppi.column = i;
@@ -1109,7 +1109,7 @@ void RestoreActorReels(SCNHANDLE hFilm, short reelnum, short z, int x, int y) {
ppi.x = x;
ppi.y = y;
ppi.z = z;
- ppi.speed = (ONE_SECOND / FROM_LE_32(pfilm->frate));
+ ppi.speed = (ONE_SECOND / FROM_32(pfilm->frate));
ppi.actorid = 0;
ppi.splay = false;
ppi.bTop = false;
@@ -1147,15 +1147,15 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) {
ppi.x = (short)x;
ppi.y = (short)y;
ppi.bRestore = true;
- ppi.speed = (short)(ONE_SECOND/FROM_LE_32(pFilm->frate));
+ ppi.speed = (short)(ONE_SECOND/FROM_32(pFilm->frate));
ppi.bTop = false;
ppi.myescEvent = 0;
// Search backwards for now as later column will be the one
- for (i = (int)FROM_LE_32(pFilm->numreels) - 1; i >= 0; i--) {
+ for (i = (int)FROM_32(pFilm->numreels) - 1; i >= 0; i--) {
pFreel = &pFilm->reels[i];
- pmi = (PMULTI_INIT) LockMem(FROM_LE_32(pFreel->mobj));
- if ((int32)FROM_LE_32(pmi->mulID) == actor) {
+ pmi = (PMULTI_INIT) LockMem(FROM_32(pFreel->mobj));
+ if ((int32)FROM_32(pmi->mulID) == actor) {
ppi.column = (short)i;
NewestFilm(hFilm, &pFilm->reels[i]);
@@ -1173,8 +1173,8 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) {
int ExtractActor(SCNHANDLE hFilm) {
const FILM *pFilm = (const FILM *)LockMem(hFilm);
const FREEL *pReel = &pFilm->reels[0];
- const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pReel->mobj));
- return (int)FROM_LE_32(pmi->mulID);
+ const MULTI_INIT *pmi = (const MULTI_INIT *)LockMem(FROM_32(pReel->mobj));
+ return (int)FROM_32(pmi->mulID);
}
} // End of namespace Tinsel
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index d8c1cef0b6..8a984c78f9 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -154,13 +154,13 @@ public:
void setIndex(int index);
- POLY_TYPE getType() const { return (POLY_TYPE)FROM_LE_32(type); }
- int getNodecount() const { return (int)FROM_LE_32(nodecount); }
- int getNodeX(int i) const { return (int)FROM_LE_32(nlistx[i]); }
- int getNodeY(int i) const { return (int)FROM_LE_32(nlisty[i]); }
+ POLY_TYPE getType() const { return (POLY_TYPE)FROM_32(type); }
+ int getNodecount() const { return (int)FROM_32(nodecount); }
+ int getNodeX(int i) const { return (int)FROM_32(nlistx[i]); }
+ int getNodeY(int i) const { return (int)FROM_32(nlisty[i]); }
// get Inter-node line structure
- const LINEINFO *getLineinfo(int i) const { return ((const LINEINFO *)(_pStart + (int)FROM_LE_32(plinelist))) + i; }
+ const LINEINFO *getLineinfo(int i) const { return ((const LINEINFO *)(_pStart + (int)FROM_32(plinelist))) + i; }
protected:
POLY_TYPE type; ///< type of polygon
@@ -230,8 +230,8 @@ void Poly::nextPoly() {
const byte *pRecord = _pData;
int typeVal = nextLong(_pData);
- if ((FROM_LE_32(typeVal) == 5) && TinselV2)
- typeVal = TO_LE_32(6);
+ if ((FROM_32(typeVal) == 5) && TinselV2)
+ typeVal = TO_32(6);
type = (POLY_TYPE)typeVal;
for (int i = 0; i < 4; ++i)
@@ -275,8 +275,8 @@ void Poly::nextPoly() {
pnodelisty = nextLong(_pData);
plinelist = nextLong(_pData);
- nlistx = (const int32 *)(_pStart + (int)FROM_LE_32(pnodelistx));
- nlisty = (const int32 *)(_pStart + (int)FROM_LE_32(pnodelisty));
+ nlistx = (const int32 *)(_pStart + (int)FROM_32(pnodelistx));
+ nlisty = (const int32 *)(_pStart + (int)FROM_32(pnodelisty));
if (TinselV0)
// Skip to the last 4 bytes of the record for the hScript value
@@ -591,16 +591,16 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
for (int i = 0; i < ptp.getNodecount() - 1; i++) {
const LINEINFO *line = ptp.getLineinfo(i);
- const int32 a = (int)FROM_LE_32(line->a);
- const int32 b = (int)FROM_LE_32(line->b);
- const int32 c = (int)FROM_LE_32(line->c);
+ const int32 a = (int)FROM_32(line->a);
+ const int32 b = (int)FROM_32(line->b);
+ const int32 c = (int)FROM_32(line->c);
#if 1
// TODO: If the comments of the LINEINFO struct are correct, then it contains mostly
// duplicate data, probably in an effort to safe CPU cycles. Even on the slowest devices
// we support, calculating a product of two ints is not an issue.
// So we can just load & endian convert a,b,c, then replace stuff like
- // (int)FROM_LE_32(line->ab)
+ // (int)FROM_32(line->ab)
// by simply a*b, which makes it easier to understand what the code does, too.
// Just in case there is some bugged data, I leave this code here for verifying it.
// Let's leave it in for some time.
@@ -608,14 +608,14 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// One bad thing: We use sqrt to compute a square root. Might not be a good idea,
// speed wise. Maybe we should take Vicent's fp_sqroot. But that's a problem for later.
- int32 a2 = (int)FROM_LE_32(line->a2); ///< a squared
- int32 b2 = (int)FROM_LE_32(line->b2); ///< b squared
- int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); ///< a squared + b squared
- int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); ///< root(a squared + b squared)
+ int32 a2 = (int)FROM_32(line->a2); ///< a squared
+ int32 b2 = (int)FROM_32(line->b2); ///< b squared
+ int32 a2pb2 = (int)FROM_32(line->a2pb2); ///< a squared + b squared
+ int32 ra2pb2 = (int)FROM_32(line->ra2pb2); ///< root(a squared + b squared)
- int32 ab = (int)FROM_LE_32(line->ab);
- int32 ac = (int)FROM_LE_32(line->ac);
- int32 bc = (int)FROM_LE_32(line->bc);
+ int32 ab = (int)FROM_32(line->ab);
+ int32 ac = (int)FROM_32(line->ac);
+ int32 bc = (int)FROM_32(line->bc);
assert(a*a == a2);
assert(b*b == b2);
@@ -676,9 +676,9 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// A point on a line is nearest
const LINEINFO *line = ptp.getLineinfo(nearestL);
- const int32 a = (int)FROM_LE_32(line->a);
- const int32 b = (int)FROM_LE_32(line->b);
- const int32 c = (int)FROM_LE_32(line->c);
+ const int32 a = (int)FROM_32(line->a);
+ const int32 b = (int)FROM_32(line->b);
+ const int32 c = (int)FROM_32(line->c);
dropX = ((b*b * h) - (a*b * k) - a*c) / (a*a + b*b);
dropY = ((a*a * k) - (a*b * h) - b*c) / (a*a + b*b);
*x = dropX;
@@ -994,15 +994,15 @@ int GetScale(HPOLYGON hPath, int y) {
Poly ptp(LockMem(pHandle), Polys[hPath]->pIndex);
// Path is of a constant scale?
- if (FROM_LE_32(ptp.scale2) == 0)
- return FROM_LE_32(ptp.scale1);
+ if (FROM_32(ptp.scale2) == 0)
+ return FROM_32(ptp.scale1);
- assert(FROM_LE_32(ptp.scale1) >= FROM_LE_32(ptp.scale2));
+ assert(FROM_32(ptp.scale1) >= FROM_32(ptp.scale2));
- zones = FROM_LE_32(ptp.scale1) - FROM_LE_32(ptp.scale2) + 1;
+ zones = FROM_32(ptp.scale1) - FROM_32(ptp.scale2) + 1;
zlen = (Polys[hPath]->pbottom - Polys[hPath]->ptop) / zones;
- scale = FROM_LE_32(ptp.scale1);
+ scale = FROM_32(ptp.scale1);
top = Polys[hPath]->ptop;
do {
@@ -1011,7 +1011,7 @@ int GetScale(HPOLYGON hPath, int y) {
return scale;
} while (--scale);
- return FROM_LE_32(ptp.scale2);
+ return FROM_32(ptp.scale2);
}
/**
@@ -1033,15 +1033,15 @@ int GetBrightness(HPOLYGON hPath, int y) {
Poly ptp(LockMem(pHandle), Polys[hPath]->pIndex);
// Path is of a constant brightness?
- if (FROM_LE_32(ptp.bright1) == FROM_LE_32(ptp.bright2))
- return FROM_LE_32(ptp.bright1);
+ if (FROM_32(ptp.bright1) == FROM_32(ptp.bright2))
+ return FROM_32(ptp.bright1);
- assert(FROM_LE_32(ptp.bright1) >= FROM_LE_32(ptp.bright2));
+ assert(FROM_32(ptp.bright1) >= FROM_32(ptp.bright2));
- zones = FROM_LE_32(ptp.bright1) - FROM_LE_32(ptp.bright2) + 1;
+ zones = FROM_32(ptp.bright1) - FROM_32(ptp.bright2) + 1;
zlen = (Polys[hPath]->pbottom - Polys[hPath]->ptop) / zones;
- brightness = FROM_LE_32(ptp.bright1);
+ brightness = FROM_32(ptp.bright1);
top = Polys[hPath]->ptop;
do {
@@ -1050,7 +1050,7 @@ int GetBrightness(HPOLYGON hPath, int y) {
return brightness;
} while (--brightness);
- return FROM_LE_32(ptp.bright2);
+ return FROM_32(ptp.bright2);
}
@@ -1079,9 +1079,9 @@ void GetTagTag(HPOLYGON hp, SCNHANDLE *hTagText, int *tagx, int *tagy) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- *tagx = (int)FROM_LE_32(ptp.tagx) + (TinselV2 ? volatileStuff[hp].xoff : 0);
- *tagy = (int)FROM_LE_32(ptp.tagy) + (TinselV2 ? volatileStuff[hp].yoff : 0);
- *hTagText = FROM_LE_32(ptp.hTagtext);
+ *tagx = (int)FROM_32(ptp.tagx) + (TinselV2 ? volatileStuff[hp].xoff : 0);
+ *tagy = (int)FROM_32(ptp.tagy) + (TinselV2 ? volatileStuff[hp].yoff : 0);
+ *hTagText = FROM_32(ptp.hTagtext);
}
/**
@@ -1092,7 +1092,7 @@ SCNHANDLE GetPolyFilm(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return FROM_LE_32(ptp.hFilm);
+ return FROM_32(ptp.hFilm);
}
/**
@@ -1103,7 +1103,7 @@ SCNHANDLE GetPolyScript(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return FROM_LE_32(ptp.hScript);
+ return FROM_32(ptp.hScript);
}
REEL GetPolyReelType(HPOLYGON hp) {
@@ -1115,7 +1115,7 @@ REEL GetPolyReelType(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return (REEL)FROM_LE_32(ptp.reel);
+ return (REEL)FROM_32(ptp.reel);
}
int32 GetPolyZfactor(HPOLYGON hp) {
@@ -1124,7 +1124,7 @@ int32 GetPolyZfactor(HPOLYGON hp) {
Poly ptp(LockMem(pHandle), Polys[hp]->pIndex);
- return (int)FROM_LE_32(ptp.zFactor);
+ return (int)FROM_32(ptp.zFactor);
}
int numNodes(HPOLYGON hp) {
@@ -1319,11 +1319,11 @@ static bool MatchingLevels(PPOLYGON p1, PPOLYGON p2) {
Poly pp1(pps, p1->pIndex); // This polygon 1
Poly pp2(pps, p2->pIndex); // This polygon 2
- assert((int32)FROM_LE_32(pp1.level1) <= (int32)FROM_LE_32(pp1.level2));
- assert((int32)FROM_LE_32(pp2.level1) <= (int32)FROM_LE_32(pp2.level2));
+ assert((int32)FROM_32(pp1.level1) <= (int32)FROM_32(pp1.level2));
+ assert((int32)FROM_32(pp2.level1) <= (int32)FROM_32(pp2.level2));
- for (int pl = (int32)FROM_LE_32(pp1.level1); pl <= (int32)FROM_LE_32(pp1.level2); pl++) {
- if (pl >= (int32)FROM_LE_32(pp2.level1) && pl <= (int32)FROM_LE_32(pp2.level2))
+ for (int pl = (int32)FROM_32(pp1.level1); pl <= (int32)FROM_32(pp1.level2); pl++) {
+ if (pl >= (int32)FROM_32(pp2.level1) && pl <= (int32)FROM_32(pp2.level2))
return true;
}
@@ -1604,17 +1604,17 @@ static PPOLYGON CommonInits(PTYPE polyType, int pno, const Poly &ptp, bool bRest
p->pIndex = pno;
for (i = 0; i < 4; i++) { // Polygon definition
- p->cx[i] = (short)FROM_LE_32(ptp.x[i]);
- p->cy[i] = (short)FROM_LE_32(ptp.y[i]);
+ p->cx[i] = (short)FROM_32(ptp.x[i]);
+ p->cy[i] = (short)FROM_32(ptp.y[i]);
}
if (!bRestart) {
hp = PolygonIndex(p);
- volatileStuff[hp].xoff = (short)FROM_LE_32(ptp.xoff);
- volatileStuff[hp].yoff = (short)FROM_LE_32(ptp.yoff);
+ volatileStuff[hp].xoff = (short)FROM_32(ptp.xoff);
+ volatileStuff[hp].yoff = (short)FROM_32(ptp.yoff);
}
- p->polyID = FROM_LE_32(ptp.id); // Identifier
+ p->polyID = FROM_32(ptp.id); // Identifier
FiddlyBit(p);
@@ -1731,7 +1731,7 @@ static void InitEffect(const Poly &ptp, int pno, bool bRestart) {
static void InitRefer(const Poly &ptp, int pno, bool bRestart) {
PPOLYGON p = CommonInits(REFER, pno, ptp, bRestart);
- p->subtype = FROM_LE_32(ptp.reftype); // Refer type
+ p->subtype = FROM_32(ptp.reftype); // Refer type
}
@@ -1990,8 +1990,8 @@ void GetPolyNode(HPOLYGON hp, int *pNodeX, int *pNodeY) {
*pNodeX = 480;
*pNodeY = 408;
} else {
- *pNodeX = FROM_LE_32(ptp.nodex);
- *pNodeY = FROM_LE_32(ptp.nodey);
+ *pNodeX = FROM_32(ptp.nodex);
+ *pNodeY = FROM_32(ptp.nodey);
}
if (TinselV2) {
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index ba8f47f9cf..3e6334f583 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -550,7 +550,7 @@ void AlterMover(PMOVER pMover, SCNHANDLE film, AR_FUNCTION fn) {
pfilm = (const FILM *)LockMem(film);
assert(pfilm != NULL);
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), ONE_SECOND / FROM_32(pfilm->frate));
if (!TinselV2)
pMover->stepCount = 0;
@@ -643,7 +643,7 @@ void SetMoverWalkReel(PMOVER pMover, DIRECTION reel, int scale, bool force) {
pfilm = (const FILM *)LockMem(whichReel);
assert(pfilm != NULL); // no film
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), 1);
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), 1);
// Synchronised walking reels
assert(pMover->stepCount >= 0);
@@ -704,14 +704,14 @@ static void MoverProcessHelper(int X, int Y, int id, PMOVER pMover) {
InitialPathChecks(pMover, X, Y);
pfilm = (const FILM *)LockMem(pMover->walkReels[0][FORWARD]);
- pmi = (const MULTI_INIT *)LockMem(FROM_LE_32(pfilm->reels[0].mobj));
+ pmi = (const MULTI_INIT *)LockMem(FROM_32(pfilm->reels[0].mobj));
//---
- pFrame = (const FRAME *)LockMem(FROM_LE_32(pmi->hMulFrame));
+ pFrame = (const FRAME *)LockMem(FROM_32(pmi->hMulFrame));
// get pointer to image
- pim = (IMAGE *)LockMem(READ_LE_UINT32(pFrame)); // handle to image
- pim->hImgPal = TO_LE_32(BgPal());
+ pim = (IMAGE *)LockMem(READ_32(pFrame)); // handle to image
+ pim->hImgPal = TO_32(BgPal());
//---
pMover->actorObj = MultiInitObject(pmi);
@@ -722,7 +722,7 @@ static void MoverProcessHelper(int X, int Y, int id, PMOVER pMover) {
MultiInsertObject(GetPlayfieldList(FIELD_WORLD), pMover->actorObj);
storeActorReel(id, NULL, 0, pMover->actorObj, 0, 0, 0);
- InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_LE_32(pfilm->reels[0].script), ONE_SECOND / FROM_LE_32(pfilm->frate));
+ InitStepAnimScript(&pMover->actorAnim, pMover->actorObj, FROM_32(pfilm->reels[0].script), ONE_SECOND / FROM_32(pfilm->frate));
pMover->stepCount = 0;
MultiSetAniXY(pMover->actorObj, pMover->objX, pMover->objY);
@@ -802,7 +802,7 @@ void T2MoverProcess(CORO_PARAM, const void *param) {
InitialPathChecks(pMover, rpos->X, rpos->Y);
pFilm = (FILM *)LockMem(pMover->walkReels[i][FORWARD]); // Any old reel
- pmi = (PMULTI_INIT)LockMem(FROM_LE_32(pFilm->reels[0].mobj));
+ pmi = (PMULTI_INIT)LockMem(FROM_32(pFilm->reels[0].mobj));
// Poke in the background palette
PokeInPalette(pmi);
diff --git a/engines/tinsel/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 c5444517f1..17cb23b98f 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -86,8 +86,8 @@ struct SCENE_STRUC {
SCNHANDLE hTaggedActor; // handle to table of tagged actors
int32 numProcess; // number of processes in this scene
SCNHANDLE hProcess; // handle to table of processes
- SCNHANDLE hMusicScript; // handle to music script data
- SCNHANDLE hMusicSegment;// handle to music segments
+ SCNHANDLE hMusicScript; // handle to music script data - Tinsel 2 only
+ SCNHANDLE hMusicSegment;// handle to music segments - Tinsel 2 only
} PACKED_STRUCT;
/** entrance structure - one per entrance */
@@ -130,15 +130,15 @@ const SCENE_STRUC *GetSceneStruc(const byte *pStruc) {
const byte *p = pStruc;
memset(&g_tempStruc, 0, sizeof(SCENE_STRUC));
- g_tempStruc.numEntrance = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.numPoly = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.numTaggedActor = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.defRefer = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hSceneScript = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hEntrance = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hPoly = READ_UINT32(p); p += sizeof(uint32);
- g_tempStruc.hTaggedActor = READ_UINT32(p); p += sizeof(uint32);
-
+ g_tempStruc.numEntrance = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.numPoly = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.numTaggedActor = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.defRefer = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.hSceneScript = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.hEntrance = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.hPoly = READ_32(p); p += sizeof(uint32);
+ g_tempStruc.hTaggedActor = READ_32(p); p += sizeof(uint32);
+
return &g_tempStruc;
}
@@ -159,7 +159,8 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
// The following myEscape value setting is used for enabling title screen skipping in DW1
if (TinselV1 && (g_sceneCtr == 1)) g_initialMyEscape = GetEscEvents();
// DW1 PSX has its own scene skipping script code for scenes 2 and 3 (bug #3541542).
- _ctx->myEscape = (TinselV1 && (g_sceneCtr < (TinselV1PSX ? 2 : 4))) ? g_initialMyEscape : 0;
+ // Same goes for DW1 Mac.
+ _ctx->myEscape = (TinselV1 && (g_sceneCtr < ((TinselV1PSX || TinselV1Mac) ? 2 : 4))) ? g_initialMyEscape : 0;
// get the stuff copied to process when it was created
_ctx->pInit = (const TP_INIT *)param;
@@ -167,7 +168,7 @@ static void SceneTinselProcess(CORO_PARAM, const void *param) {
assert(_ctx->pInit->hTinselCode); // Must have some code to run
_ctx->pic = InitInterpretContext(GS_SCENE,
- READ_LE_UINT32(&_ctx->pInit->hTinselCode),
+ _ctx->pInit->hTinselCode,
TinselV2 ? _ctx->pInit->event : NOEVENT,
NOPOLY, // No polygon
0, // No actor
@@ -209,7 +210,7 @@ void SendSceneTinselProcess(TINSEL_EVENT event) {
*/
static void LoadScene(SCNHANDLE scene, int entry) {
- uint i;
+ int32 i;
TP_INIT init;
const SCENE_STRUC *ss;
const ENTRANCE_STRUC *es;
@@ -223,7 +224,7 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// CdPlay() stuff
byte *cptr = FindChunk(scene, CHUNK_CDPLAY_FILENUM);
assert(cptr);
- i = READ_LE_UINT32(cptr);
+ i = READ_32(cptr);
assert(i < 512);
cptr = FindChunk(scene, CHUNK_CDPLAY_FILENAME);
assert(cptr);
@@ -238,18 +239,17 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// Music stuff
char *cptr = (char *)FindChunk(scene, CHUNK_MUSIC_FILENAME);
assert(cptr);
- _vm->_pcmMusic->setMusicSceneDetails(FROM_LE_32(ss->hMusicScript),
- FROM_LE_32(ss->hMusicSegment), cptr);
+ _vm->_pcmMusic->setMusicSceneDetails(ss->hMusicScript, ss->hMusicSegment, cptr);
}
if (entry == NO_ENTRY_NUM) {
// Restoring scene
// Initialize all the polygons for this scene
- InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), true);
+ InitPolygons(ss->hPoly, ss->numPoly, true);
// Initialize the actors for this scene
- StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), false);
+ StartTaggedActors(ss->hTaggedActor, ss->numTaggedActor, false);
if (TinselV2)
// Returning from cutscene
@@ -259,18 +259,18 @@ static void LoadScene(SCNHANDLE scene, int entry) {
// Genuine new scene
// Initialize all the polygons for this scene
- InitPolygons(FROM_LE_32(ss->hPoly), FROM_LE_32(ss->numPoly), false);
+ InitPolygons(ss->hPoly, ss->numPoly, false);
// Initialize the actors for this scene
- StartTaggedActors(FROM_LE_32(ss->hTaggedActor), FROM_LE_32(ss->numTaggedActor), true);
+ StartTaggedActors(ss->hTaggedActor, ss->numTaggedActor, true);
// Run the appropriate entrance code (if any)
- es = (const ENTRANCE_STRUC *)LockMem(FROM_LE_32(ss->hEntrance));
- for (i = 0; i < FROM_LE_32(ss->numEntrance); i++) {
- if (FROM_LE_32(es->eNumber) == (uint)entry) {
+ es = (const ENTRANCE_STRUC *)LockMem(ss->hEntrance);
+ for (i = 0; i < ss->numEntrance; i++) {
+ if (FROM_32(es->eNumber) == (uint)entry) {
if (es->hScript) {
init.event = STARTUP;
- init.hTinselCode = es->hScript;
+ init.hTinselCode = FROM_32(es->hScript);
CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init));
}
@@ -285,8 +285,8 @@ static void LoadScene(SCNHANDLE scene, int entry) {
}
- if (i == FROM_LE_32(ss->numEntrance))
- error("Non-existant scene entry number");
+ if (i == ss->numEntrance)
+ error("Non-existent scene entry number");
if (ss->hSceneScript) {
init.event = STARTUP;
@@ -297,10 +297,10 @@ static void LoadScene(SCNHANDLE scene, int entry) {
}
// Default refer type
- SetDefaultRefer(FROM_LE_32(ss->defRefer));
+ SetDefaultRefer(ss->defRefer);
// Scene's processes
- SceneProcesses(FROM_LE_32(ss->numProcess), FROM_LE_32(ss->hProcess));
+ SceneProcesses(ss->numProcess, ss->hProcess);
}
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 4bf356ba36..a73b4b9b97 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -109,7 +109,7 @@ void RestoreSceneProcess(INT_CONTEXT *pic) {
pStruc = (PROCESS_STRUC *)LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(pStruc[i].hProcessCode) == pic->hCode) {
+ if (FROM_32(pStruc[i].hProcessCode) == pic->hCode) {
CoroScheduler.createProcess(PID_PROCESS + i, RestoredProcessProcess,
&pic, sizeof(pic));
break;
@@ -137,11 +137,11 @@ void SceneProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWait
_ctx->pStruc = (PROCESS_STRUC *)LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(_ctx->pStruc[i].processId) == procID) {
+ if (FROM_32(_ctx->pStruc[i].processId) == procID) {
assert(_ctx->pStruc[i].hProcessCode); // Must have some code to run
_ctx->pic = InitInterpretContext(GS_PROCESS,
- FROM_LE_32(_ctx->pStruc[i].hProcessCode),
+ FROM_32(_ctx->pStruc[i].hProcessCode),
event,
NOPOLY, // No polygon
0, // No actor
@@ -176,7 +176,7 @@ void KillSceneProcess(uint32 procID) {
pStruc = (PROCESS_STRUC *) LockMem(g_hSceneProcess);
for (i = 0; i < g_numSceneProcess; i++) {
- if (FROM_LE_32(pStruc[i].processId) == procID) {
+ if (FROM_32(pStruc[i].processId) == procID) {
CoroScheduler.killMatchingProcess(PID_PROCESS + i, -1);
break;
}
@@ -293,8 +293,8 @@ void GlobalProcesses(uint32 numProcess, byte *pProcess) {
byte *p = pProcess;
for (uint i = 0; i < numProcess; ++i, p += 8) {
- g_pGlobalProcess[i].processId = READ_LE_UINT32(p);
- g_pGlobalProcess[i].hProcessCode = READ_LE_UINT32(p + 4);
+ g_pGlobalProcess[i].processId = READ_32(p);
+ g_pGlobalProcess[i].hProcessCode = READ_32(p + 4);
}
}
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index e052302cfd..416ee74127 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -74,8 +74,8 @@ SoundManager::~SoundManager() {
*/
// playSample for DiscWorld 1
bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
- // Floppy version has no sample file
- if (!_vm->isCD())
+ // Floppy version has no sample file.
+ if (!_vm->isV1CD())
return false;
// no sample driver?
@@ -102,7 +102,7 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
// read the length of the sample
- uint32 sampleLen = _sampleStream.readUint32();
+ uint32 sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
@@ -177,14 +177,36 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
return true;
}
+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),
+ // so this shouldn't be a major issue.
+ byte *soundData = (byte *)malloc(length);
+ assert(soundData);
+
+ // read all of the sample
+ if (s.read(soundData, length) != length)
+ error(FILE_IS_CORRUPT, MIDI_FILE);
+
+ Common::SeekableReadStream *memStream = new Common::MemoryReadStream(soundData, length);
+
+ Audio::SoundHandle *handle = &_channels[kChannelDW1MacMusic].handle;
+
+ // Stop any previously playing music track
+ _vm->_mixer->stopHandle(*handle);
+
+ // 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));
+}
+
// playSample for DiscWorld 2
bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle) {
- // Floppy version has no sample file
- if (!_vm->isCD())
- return false;
-
// no sample driver?
if (!_vm->_mixer->isReady())
return false;
@@ -247,7 +269,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;
}
@@ -257,7 +279,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
// read the length of the sample
- uint32 sampleLen = _sampleStream.readUint32();
+ uint32 sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
@@ -270,12 +292,12 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
// Skipping
for (int32 i = 0; i < sub; i++) {
- sampleLen = _sampleStream.readUint32();
+ sampleLen = _sampleStream.readUint32LE();
_sampleStream.skip(sampleLen);
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
}
- sampleLen = _sampleStream.readUint32();
+ sampleLen = _sampleStream.readUint32LE();
if (_sampleStream.eos() || _sampleStream.err())
error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
}
@@ -369,7 +391,6 @@ bool SoundManager::offscreenChecks(int x, int &y) {
}
int8 SoundManager::getPan(int x) {
-
if (x == -1)
return 0;
@@ -416,14 +437,13 @@ bool SoundManager::sampleExists(int id) {
/**
* Returns true if a sample is currently playing.
*/
-bool SoundManager::sampleIsPlaying(int id) {
+bool SoundManager::sampleIsPlaying() {
if (!TinselV2)
return _vm->_mixer->isSoundHandleActive(_channels[kChannelTinsel1].handle);
for (int i = 0; i < kNumChannels; i++)
- if (_channels[i].sampleNum == id)
- if (_vm->_mixer->isSoundHandleActive(_channels[i].handle))
- return true;
+ if (_vm->_mixer->isSoundHandleActive(_channels[i].handle))
+ return true;
return false;
}
@@ -432,8 +452,6 @@ bool SoundManager::sampleIsPlaying(int id) {
* Stops any currently playing sample.
*/
void SoundManager::stopAllSamples() {
- // stop currently playing sample
-
if (!TinselV2) {
_vm->_mixer->stopHandle(_channels[kChannelTinsel1].handle);
return;
@@ -466,12 +484,21 @@ void SoundManager::setSFXVolumes(uint8 volume) {
_vm->_mixer->setChannelVolume(_channels[i].handle, volume);
}
+void SoundManager::showSoundError(const char *errorMsg, const char *soundFile) {
+ Common::String msg;
+ msg = Common::String::format(errorMsg, soundFile);
+ GUI::MessageDialog dialog(msg, "OK");
+ dialog.runModal();
+
+ error("%s", msg.c_str());
+}
+
/**
* Opens and inits all sound sample files.
*/
void SoundManager::openSampleFiles() {
- // Floppy and demo versions have no sample files, except for the Discworld 2 demo
- if (!_vm->isCD() || TinselV0)
+ // V1 Floppy and V0 demo versions have no sample files
+ if (TinselV0 || (TinselV1 && !_vm->isV1CD()))
return;
TinselFile f;
@@ -480,42 +507,26 @@ void SoundManager::openSampleFiles() {
// already allocated
return;
- // open sample index file in binary mode
+ // Open sample index (*.idx) in binary mode
if (f.open(_vm->getSampleIndex(g_sampleLanguage))) {
- // get length of index file
- f.seek(0, SEEK_END); // move to end of file
- _sampleIndexLen = f.pos(); // get file pointer
- f.seek(0, SEEK_SET); // back to beginning
-
+ uint32 fileSize = f.size();
+ _sampleIndex = (uint32 *)malloc(fileSize);
if (_sampleIndex == NULL) {
- // allocate a buffer for the indices
- _sampleIndex = (uint32 *)malloc(_sampleIndexLen);
-
- // make sure memory allocated
- if (_sampleIndex == NULL) {
- // disable samples if cannot alloc buffer for indices
- // TODO: Disabled sound if we can't load the sample index?
- return;
- }
+ showSoundError(NO_MEM, _vm->getSampleIndex(g_sampleLanguage));
+ return;
}
- // load data
- if (f.read(_sampleIndex, _sampleIndexLen) != (uint32)_sampleIndexLen)
- // file must be corrupt if we get to here
- error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
-
- // close the file
- f.close();
-
- // convert file size to size in DWORDs
- _sampleIndexLen /= sizeof(uint32);
+ _sampleIndexLen = fileSize / 4; // total sample of indices (DWORDs)
-#ifdef SCUMM_BIG_ENDIAN
- // Convert all ids from LE to native format
+ // Load data
for (int i = 0; i < _sampleIndexLen; ++i) {
- _sampleIndex[i] = SWAP_BYTES_32(_sampleIndex[i]);
+ _sampleIndex[i] = f.readUint32LE();
+ if (f.err()) {
+ showSoundError(FILE_READ_ERROR, _vm->getSampleIndex(g_sampleLanguage));
+ }
}
-#endif
+
+ f.close();
// Detect format of soundfile by looking at 1st sample-index
switch (TO_BE_32(_sampleIndex[0])) {
@@ -523,48 +534,31 @@ void SoundManager::openSampleFiles() {
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected MP3 sound-data");
_soundMode = kMP3Mode;
break;
-
case MKTAG('O','G','G',' '):
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected OGG sound-data");
_soundMode = kVorbisMode;
break;
-
case MKTAG('F','L','A','C'):
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected FLAC sound-data");
_soundMode = kFLACMode;
break;
-
default:
debugC(DEBUG_DETAILED, kTinselDebugSound, "Detected original sound-data");
break;
}
- // Normally the 1st sample-index points to nothing at all
+
+ // Normally the 1st sample index points to nothing at all. We use it to
+ // determine if the game's sample files have been compressed, thus restore
+ // it here
_sampleIndex[0] = 0;
} else {
- char buf[50];
- sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleIndex(g_sampleLanguage));
- GUI::MessageDialog dialog(buf, "OK");
- dialog.runModal();
-
- error(CANNOT_FIND_FILE, _vm->getSampleIndex(g_sampleLanguage));
+ showSoundError(FILE_READ_ERROR, _vm->getSampleIndex(g_sampleLanguage));
}
- // open sample file in binary mode
+ // Open sample file (*.smp) in binary mode
if (!_sampleStream.open(_vm->getSampleFile(g_sampleLanguage))) {
- char buf[50];
- sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleFile(g_sampleLanguage));
- GUI::MessageDialog dialog(buf, "OK");
- dialog.runModal();
-
- error(CANNOT_FIND_FILE, _vm->getSampleFile(g_sampleLanguage));
+ showSoundError(FILE_READ_ERROR, _vm->getSampleFile(g_sampleLanguage));
}
-
-/*
- // gen length of the largest sample
- sampleBuffer.size = _sampleStream.readUint32LE();
- if (_sampleStream.eos() || _sampleStream.err())
- error(FILE_IS_CORRUPT, _vm->getSampleFile(g_sampleLanguage));
-*/
}
void SoundManager::closeSampleStream() {
diff --git a/engines/tinsel/sound.h b/engines/tinsel/sound.h
index d7083b3b21..c68d9cb71e 100644
--- a/engines/tinsel/sound.h
+++ b/engines/tinsel/sound.h
@@ -51,7 +51,8 @@ protected:
enum {
kChannelTalk = 0,
kChannelTinsel1 = 0, // Always using this channel for DW1
- kChannelSFX = 1
+ kChannelSFX = 1,
+ kChannelDW1MacMusic = 2
};
static const int kNumChannels = kChannelSFX + kNumSFX;
@@ -108,6 +109,7 @@ public:
bool playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
bool playSample(int id, int sub, bool bLooped, int x, int y, int priority,
Audio::Mixer::SoundType type, Audio::SoundHandle *handle = 0);
+ 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
@@ -115,11 +117,13 @@ public:
void setSFXVolumes(uint8 volume);
bool sampleExists(int id);
- bool sampleIsPlaying(int id = -1);
+ bool sampleIsPlaying();
- // TODO: Internal method, make this protected?
void openSampleFiles();
void closeSampleStream();
+
+private:
+ void showSoundError(const char *errorMsg, const char *soundFile);
};
} // End of namespace Tinsel
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index 5a29a4d2cd..19a1ee94d6 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -165,15 +165,15 @@ static byte *FindStringBase(int id) {
// skip to the correct chunk
while (chunkSkip-- != 0) {
// make sure chunk id is correct
- assert(READ_LE_UINT32(pText + index) == CHUNK_STRING || READ_LE_UINT32(pText + index) == CHUNK_MBSTRING);
+ assert(READ_32(pText + index) == CHUNK_STRING || READ_32(pText + index) == CHUNK_MBSTRING);
- if (READ_LE_UINT32(pText + index + sizeof(uint32)) == 0) {
+ if (READ_32(pText + index + sizeof(uint32)) == 0) {
// string does not exist
return NULL;
}
// get index to next chunk
- index = READ_LE_UINT32(pText + index + sizeof(uint32));
+ index = READ_32(pText + index + sizeof(uint32));
}
// skip over chunk id and offset
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index 5eb092d00d..150eb2bdde 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -46,24 +46,24 @@ int StringLengthPix(char *szStr, const FONT *pFont) {
if (c & 0x80)
c = ((c & ~0x80) << 8) + *++szStr;
}
- hImg = FROM_LE_32(pFont->fontDef[c]);
+ hImg = FROM_32(pFont->fontDef[c]);
if (hImg) {
// there is a IMAGE for this character
const IMAGE *pChar = (const IMAGE *)LockMem(hImg);
// add width of font bitmap
- strLen += FROM_LE_16(pChar->imgWidth);
+ strLen += FROM_16(pChar->imgWidth);
} else
// use width of space character
- strLen += FROM_LE_32(pFont->spaceSize);
+ strLen += FROM_32(pFont->spaceSize);
// finally add the inter-character spacing
- strLen += FROM_LE_32(pFont->xSpacing);
+ strLen += FROM_32(pFont->xSpacing);
}
// return length of line in pixels - minus inter-char spacing for last character
- strLen -= FROM_LE_32(pFont->xSpacing);
+ strLen -= FROM_32(pFont->xSpacing);
return (strLen > 0) ? strLen : 0;
}
@@ -125,10 +125,10 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
// get image for capital W
assert(pFont->fontDef[(int)'W']);
- pImg = (const IMAGE *)LockMem(FROM_LE_32(pFont->fontDef[(int)'W']));
+ pImg = (const IMAGE *)LockMem(FROM_32(pFont->fontDef[(int)'W']));
// get height of capital W for offset to next line
- yOffset = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK;
+ yOffset = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK;
while (*szStr) {
// x justify the text according to the mode flags
@@ -140,24 +140,24 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
if (c & 0x80)
c = ((c & ~0x80) << 8) + *++szStr;
}
- hImg = FROM_LE_32(pFont->fontDef[c]);
+ hImg = FROM_32(pFont->fontDef[c]);
if (hImg == 0) {
// no image for this character
// add font spacing for a space character
- xJustify += FROM_LE_32(pFont->spaceSize);
+ xJustify += FROM_32(pFont->spaceSize);
} else { // printable character
int aniX, aniY; // char image animation offsets
OBJ_INIT oi;
- oi.hObjImg = FROM_LE_32(pFont->fontInit.hObjImg);
- oi.objFlags = FROM_LE_32(pFont->fontInit.objFlags);
- oi.objID = FROM_LE_32(pFont->fontInit.objID);
- oi.objX = FROM_LE_32(pFont->fontInit.objX);
- oi.objY = FROM_LE_32(pFont->fontInit.objY);
- oi.objZ = FROM_LE_32(pFont->fontInit.objZ);
+ oi.hObjImg = FROM_32(pFont->fontInit.hObjImg);
+ oi.objFlags = FROM_32(pFont->fontInit.objFlags);
+ oi.objID = FROM_32(pFont->fontInit.objID);
+ oi.objX = FROM_32(pFont->fontInit.objX);
+ oi.objY = FROM_32(pFont->fontInit.objY);
+ oi.objZ = FROM_32(pFont->fontInit.objZ);
// allocate and init a character object
if (pFirst == NULL)
@@ -172,9 +172,9 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
// fill in character object
pChar->hImg = hImg; // image def
- pChar->width = FROM_LE_16(pImg->imgWidth); // width of chars bitmap
- pChar->height = FROM_LE_16(pImg->imgHeight) & ~C16_FLAG_MASK; // height of chars bitmap
- pChar->hBits = FROM_LE_32(pImg->hImgBits); // bitmap
+ pChar->width = FROM_16(pImg->imgWidth); // width of chars bitmap
+ pChar->height = FROM_16(pImg->imgHeight) & ~C16_FLAG_MASK; // height of chars bitmap
+ pChar->hBits = FROM_32(pImg->hImgBits); // bitmap
// check for absolute positioning
if (mode & TXT_ABSOLUTE)
@@ -203,8 +203,8 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
CopyObject(pShad, pChar);
// add shadow offsets to characters position
- pShad->xPos += intToFrac(FROM_LE_32(pFont->xShadow));
- pShad->yPos += intToFrac(FROM_LE_32(pFont->yShadow));
+ pShad->xPos += intToFrac(FROM_32(pFont->xShadow));
+ pShad->yPos += intToFrac(FROM_32(pFont->yShadow));
// shadow is behind the character
pShad->zPos--;
@@ -232,18 +232,18 @@ OBJECT *ObjectTextOut(OBJECT **pList, char *szStr, int color,
pChar = pChar->pSlave;
// add character spacing
- xJustify += FROM_LE_16(pImg->imgWidth);
+ xJustify += FROM_16(pImg->imgWidth);
}
// finally add the inter-character spacing
- xJustify += FROM_LE_32(pFont->xSpacing);
+ xJustify += FROM_32(pFont->xSpacing);
// next character in string
++szStr;
}
// adjust the text y position and add the inter-line spacing
- yPos += yOffset + FROM_LE_32(pFont->ySpacing);
+ yPos += yOffset + FROM_32(pFont->ySpacing);
// check for newline
if (c == LF_CHAR)
diff --git a/engines/tinsel/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 058f8eb6fd..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());
}
/**
@@ -3684,7 +3683,7 @@ static void TranslucentIndex(unsigned index) {
}
/**
- * Play a sample.
+ * Play a sample (DW1 only).
*/
static void TryPlaySample(CORO_PARAM, int sample, bool bComplete, bool escOn, int myEscape) {
CORO_BEGIN_CONTEXT;
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index e09e2c1dcf..9075e1adb1 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -430,6 +430,14 @@ static void MouseProcess(CORO_PARAM, const void *) {
ProcessButEvent(PLR_DRAG2_END);
break;
+ case Common::EVENT_WHEELUP:
+ PlayerEvent(PLR_WHEEL_UP, mousePos);
+ break;
+
+ case Common::EVENT_WHEELDOWN:
+ PlayerEvent(PLR_WHEEL_DOWN, mousePos);
+ break;
+
default:
break;
}
@@ -658,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;
@@ -722,21 +730,20 @@ void LoadBasicChunks() {
cptr = FindChunk(INV_OBJ_SCNHANDLE, CHUNK_OBJECTS);
-#ifdef SCUMM_BIG_ENDIAN
- //convert to native endianness
+ // Convert to native endianness
INV_OBJECT *io = (INV_OBJECT *)cptr;
for (int i = 0; i < numObjects; i++, io++) {
- io->id = FROM_LE_32(io->id);
- io->hIconFilm = FROM_LE_32(io->hIconFilm);
- io->hScript = FROM_LE_32(io->hScript);
- io->attribute = FROM_LE_32(io->attribute);
+ io->id = FROM_32(io->id);
+ io->hIconFilm = FROM_32(io->hIconFilm);
+ io->hScript = FROM_32(io->hScript);
+ io->attribute = FROM_32(io->attribute);
}
-#endif
RegisterIcons(cptr, numObjects);
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_POLY);
- if (cptr != NULL)
+ // Max polygons are 0 in DW1 Mac (both in the demo and the full version)
+ if (cptr != NULL && *cptr != 0)
MaxPolygons(*cptr);
if (TinselV2) {
@@ -1046,6 +1053,8 @@ bool TinselEngine::pollEvent() {
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
case Common::EVENT_RBUTTONUP:
+ case Common::EVENT_WHEELUP:
+ case Common::EVENT_WHEELDOWN:
// Add button to queue for the mouse process
_mouseButtons.push_back(event.type);
break;
@@ -1053,7 +1062,7 @@ bool TinselEngine::pollEvent() {
case Common::EVENT_MOUSEMOVE:
{
// This fragment takes care of Tinsel 2 when it's been compiled with
- // blank areas at the top and bottom of thes creen
+ // blank areas at the top and bottom of the screen
int ySkip = TinselV2 ? (g_system->getHeight() - _vm->screen().h) / 2 : 0;
if ((event.mouse.y >= ySkip) && (event.mouse.y < (g_system->getHeight() - ySkip)))
_mousePos = Common::Point(event.mouse.x, event.mouse.y - ySkip);
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 123249125e..5eb3b7d7b8 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -78,7 +78,7 @@ enum TinselGameFeatures {
/**
* The following is the ScummVM definitions of the various Tinsel versions:
* TINSEL_V0 - This was an early engine version that was only used in the Discworld 1
- * demo. It is not currently supported.
+ * demo.
* TINSEL_V1 - This was the engine version used by Discworld 1. Note that there were two
* major releases: an earlier version that used *.gra files, and a later one that
* used *.scn files, and contained certain script and engine bugfixes. In ScummVM,
@@ -135,6 +135,9 @@ typedef bool (*KEYFPTR)(const Common::KeyState &);
#define READ_16(v) (TinselV1Mac ? READ_BE_UINT16(v) : READ_LE_UINT16(v))
#define READ_32(v) (TinselV1Mac ? READ_BE_UINT32(v) : READ_LE_UINT32(v))
+#define FROM_16(v) (TinselV1Mac ? FROM_BE_16(v) : FROM_LE_16(v))
+#define FROM_32(v) (TinselV1Mac ? FROM_BE_32(v) : FROM_LE_32(v))
+#define TO_32(v) (TinselV1Mac ? TO_BE_32(v) : TO_LE_32(v))
// Global reference to the TinselEngine object
extern TinselEngine *_vm;
@@ -181,7 +184,7 @@ public:
uint32 getFlags() const;
Common::Platform getPlatform() const;
bool getIsADGFDemo() const;
- bool isCD() const;
+ bool isV1CD() const;
const char *getSampleIndex(LANGUAGE lang);
const char *getSampleFile(LANGUAGE lang);
@@ -223,7 +226,11 @@ public:
Graphics::Surface &screen() { return _screenSurface; }
Common::Point getMousePosition() const { return _mousePos; }
- void setMousePosition(const Common::Point &pt) {
+ void setMousePosition(Common::Point pt) {
+ // Clip mouse position to be within the screen coordinates
+ pt.x = CLIP<int16>(pt.x, 0, SCREEN_WIDTH - 1);
+ pt.y = CLIP<int16>(pt.y, 0, SCREEN_HEIGHT - 1);
+
int yOffset = TinselV2 ? (g_system->getHeight() - _screenSurface.h) / 2 : 0;
g_system->warpMouse(pt.x, pt.y + yOffset);
_mousePos = pt;
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..c5652f0c8d 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"
@@ -64,7 +66,7 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "05472037e9cfde146e953c434e74f0f4", 337643527),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
@@ -77,7 +79,7 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "ba1742d3193b68ceb9434e2ab7a09a9b", 391462783),
Common::RU_RUS,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
@@ -90,20 +92,7 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "1a3292bad8e0bb5701800c73531dd75e", 345176617),
Common::DE_DEU,
- Common::kPlatformPC,
- ADGF_NO_FLAGS,
- GUIO1(GUIO_NONE)
- },
- },
-
- {
- // 3 Skulls of the Toltecs German Demo version
- {
- "toltecs",
- 0,
- AD_ENTRY1s("WESTERN", "1c85e82712d24f1d5c1ea2a66ddd75c2", 47730038),
- Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
@@ -116,7 +105,7 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "4fb845635cbdac732453fe23be350df9", 327269545),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
@@ -129,7 +118,7 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "479f468beccc1b0ce5873ec523d1380e", 308391018),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
@@ -143,17 +132,50 @@ static const ToltecsGameDescription gameDescriptions[] = {
0,
AD_ENTRY1s("WESTERN", "69a5572e75409d8c6230b787faa353af", 337647960),
Common::HU_HUN,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO1(GUIO_NONE)
},
},
+ {
+ // 3 Skulls of the Toltecs English Demo version
+ {
+ "toltecs",
+ 0,
+ AD_ENTRY1s("WESTERN", "53a0abd1c0bc5cad8ba18f0e56877705", 46241833),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_DEMO,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // 3 Skulls of the Toltecs German Demo version
+ {
+ "toltecs",
+ 0,
+ AD_ENTRY1s("WESTERN", "1c85e82712d24f1d5c1ea2a66ddd75c2", 47730038),
+ Common::DE_DEU,
+ Common::kPlatformDOS,
+ 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/microtiles.cpp b/engines/toltecs/microtiles.cpp
index 60e65bdaf3..9181480351 100644
--- a/engines/toltecs/microtiles.cpp
+++ b/engines/toltecs/microtiles.cpp
@@ -119,8 +119,6 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
for (y = 0; y < _tilesH; ++y) {
for (x = 0; x < _tilesW; ++x) {
-
- int start;
int finish = 0;
BoundingBox boundingBox;
@@ -141,8 +139,6 @@ Common::Rect * MicroTileArray::getRectangles(int *num_rects, int min_x, int min_
// FIXME: Why is the following code in an #if block?
#if 1
- start = i;
-
if (TileX1(boundingBox) == TileSize - 1 && x != _tilesW - 1) { // check if the tile continues
while (!finish) {
++x;
diff --git a/engines/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..341da7e5f3 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), _lastPrefetchOfs(0), _framesPerSoundChunk(0), _endPos(0) {
}
MoviePlayer::~MoviePlayer() {
}
void MoviePlayer::playMovie(uint resIndex) {
-
const uint32 subtitleSlot = kMaxScriptSlots - 1;
int16 savedSceneWidth = _vm->_sceneWidth;
int16 savedSceneHeight = _vm->_sceneHeight;
@@ -62,17 +61,18 @@ void MoviePlayer::playMovie(uint resIndex) {
int16 savedGuiHeight = _vm->_guiHeight;
byte moviePalette[768];
+ _isPlaying = true;
_vm->_isSaveAllowed = false;
memset(moviePalette, 0, sizeof(moviePalette));
_vm->_screen->finishTalkTextItems();
- _vm->_screen->clearSprites();
_vm->_arc->openResource(resIndex);
+ _endPos = _vm->_arc->pos() + _vm->_arc->getResourceSize(resIndex);
- _frameCount = _vm->_arc->readUint32LE();
- _chunkCount = _vm->_arc->readUint32LE();
+ /*_frameCount = */_vm->_arc->readUint32LE();
+ uint32 chunkCount = _vm->_arc->readUint32LE();
// TODO: Figure out rest of the header
_vm->_arc->readUint32LE();
@@ -91,7 +91,6 @@ void MoviePlayer::playMovie(uint resIndex) {
_vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _audioStream);
- _soundChunkFramesLeft = 0;
_lastPrefetchOfs = 0;
fetchAudioChunks();
@@ -99,17 +98,20 @@ void MoviePlayer::playMovie(uint resIndex) {
byte *chunkBuffer = NULL;
uint32 chunkBufferSize = 0;
uint32 frame = 0;
+ bool abortMovie = false;
+ uint32 soundChunkFramesLeft = 0;
- 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);
+ soundChunkFramesLeft += _framesPerSoundChunk;
} else {
// Only reallocate the chunk buffer if the new chunk is bigger
if (chunkSize > chunkBufferSize) {
@@ -127,8 +129,7 @@ void MoviePlayer::playMovie(uint resIndex) {
unpackRle(chunkBuffer, _vm->_screen->_backScreen);
_vm->_screen->_fullRefresh = true;
- _soundChunkFramesLeft--;
- if (_soundChunkFramesLeft <= _framesPerSoundChunk) {
+ if (--soundChunkFramesLeft <= _framesPerSoundChunk) {
fetchAudioChunks();
}
@@ -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,27 +203,25 @@ 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;
if (_lastPrefetchOfs != 0)
_vm->_arc->seek(_lastPrefetchOfs, SEEK_SET);
- while (chunkCount-- && prefetchChunkCount < _framesPerSoundChunk / 2) {
+ while (prefetchChunkCount < _framesPerSoundChunk / 2 && _vm->_arc->pos() < _endPos) {
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);
chunkBuffer = NULL;
prefetchChunkCount++;
- _soundChunkFramesLeft += _framesPerSoundChunk;
} else {
_vm->_arc->seek(chunkSize, SEEK_CUR);
}
@@ -229,7 +230,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 +249,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 +264,7 @@ void MoviePlayer::unpackRle(byte *source, byte *dest) {
size -= a;
}
}
+ //debug("Packed RLE size: %d", packedSize);
}
bool MoviePlayer::handleInput() {
@@ -272,12 +275,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..aa28c83fef 100644
--- a/engines/toltecs/movie.h
+++ b/engines/toltecs/movie.h
@@ -37,13 +37,17 @@ public:
void playMovie(uint resIndex);
+ bool isPlaying() { return _isPlaying; }
+
protected:
ToltecsEngine *_vm;
Audio::QueuingAudioStream *_audioStream;
Audio::SoundHandle _audioStreamHandle;
- uint32 _chunkCount, _frameCount, _lastPrefetchOfs;
- uint32 _soundChunkFramesLeft, _framesPerSoundChunk;
+ bool _isPlaying;
+
+ uint32 _framesPerSoundChunk;
+ int32 _lastPrefetchOfs, _endPos;
void unpackPalette(byte *source, byte *dest, int elemCount, int elemSize);
void unpackRle(byte *source, byte *dest);
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..5e12773e1b 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,17 +248,10 @@ 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() {
-
}
void Screen::blastSprite(int16 x, int16 y, int16 fragmentId, int16 resIndex, uint16 flags) {
-
DrawRequest drawRequest;
SpriteDrawItem sprite;
@@ -283,11 +267,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 +321,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 +336,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 +350,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 +436,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 +451,6 @@ void Screen::addTalkTextRect(Font &font, int16 x, int16 &y, int16 length, int16
}
y += font.getHeight() - 1;
-
}
void Screen::addTalkTextItemsToRenderQueue() {
@@ -488,7 +466,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 +477,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 +519,6 @@ void Screen::registerFont(uint fontIndex, uint resIndex) {
}
void Screen::drawGuiTextMulti(byte *textData) {
-
int16 x = 0, y = 0;
// Really strange stuff.
@@ -554,12 +548,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 +575,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 +585,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 +604,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 +614,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 +645,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 +692,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 +741,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 +768,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 +792,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..7b2149fded 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 {
@@ -166,7 +167,6 @@ public:
// Sprite list
void addStaticSprite(byte *spriteItem);
void addAnimatedSprite(int16 x, int16 y, int16 fragmentId, byte *data, int16 *spriteArray, bool loop, int mode);
- void clearSprites();
// Sprite drawing
void drawSprite(const SpriteDrawItem &sprite);
@@ -177,10 +177,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..476c3a4fcf 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("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:
@@ -462,78 +484,22 @@ void ScriptInterpreter::execOpcode(byte opcode) {
_code++;
break;
default:
- error("Invalid opcode %d", opcode);
+ // Most likely a script bug. Throw a warning and ignore it.
+ // The original ignores invalid opcodes as well - bug #3604025.
+ warning("Invalid opcode %d", 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 +525,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 +598,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 +622,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 +672,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 +703,6 @@ void ScriptInterpreter::loadState(Common::ReadStream *in) {
// Load IP
_code = getSlotData(_regs.reg4) + in->readUint16LE();
-
}
void ScriptInterpreter::sfNop() {
@@ -755,7 +716,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 +773,7 @@ void ScriptInterpreter::sfSetDeltaAnimPalette() {
}
void ScriptInterpreter::sfSetUnkPaletteEffect() {
- // TODO
- debug("ScriptInterpreter::sfSetUnkPaletteEffect");
+ error("ScriptInterpreter::sfSetUnkPaletteEffect called"); // unused
}
void ScriptInterpreter::sfBuildColorTransTable() {
@@ -992,7 +954,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 +964,6 @@ void ScriptInterpreter::sfStartSequence() {
}
void ScriptInterpreter::sfEndSequence() {
- //debug("ScriptInterpreter::sfEndSequence");
_vm->_music->stopSequence();
}
@@ -1029,9 +991,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 +1011,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..188facd63c 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");
@@ -148,7 +153,6 @@ Common::Error ToltecsEngine::run() {
_palette->loadAddPalette(9, 224);
_palette->setDeltaPalette(_palette->getMainPalette(), 7, 0, 31, 224);
_screen->finishTalkTextItems();
- _screen->clearSprites();
_menuSystem->run();
/*
while (1) {
@@ -176,6 +180,7 @@ Common::Error ToltecsEngine::run() {
_music->stopSequence();
_sound->stopAll();
+ delete _console;
delete _arc;
delete _res;
delete _screen;
@@ -215,7 +220,6 @@ void ToltecsEngine::requestLoadgame(int slotNum) {
}
void ToltecsEngine::loadScene(uint resIndex) {
-
Resource *sceneResource = _res->load(resIndex);
byte *scene = sceneResource->data;
@@ -250,13 +254,10 @@ void ToltecsEngine::loadScene(uint resIndex) {
_screen->_fullRefresh = true;
_screen->_renderQueue->clear();
-
}
void ToltecsEngine::updateScreen() {
-
_sound->updateSpeech();
-
_screen->updateShakeScreen();
// TODO: Set quit flag
@@ -278,7 +279,6 @@ void ToltecsEngine::updateScreen() {
_flag01 = 1;
_counter02 = 1;
} else {
- _screen->clearSprites();
_flag01 = 0;
}
@@ -289,7 +289,6 @@ void ToltecsEngine::updateScreen() {
_counter02 = (currUpdateTime - prevUpdateTime) / 13;
} while (_counter02 == 0);
prevUpdateTime = currUpdateTime;
-
}
void ToltecsEngine::drawScreen() {
@@ -310,6 +309,7 @@ void ToltecsEngine::drawScreen() {
_screen->_guiRefresh = false;
}
+ _console->onFrame();
_system->updateScreen();
_system->delayMillis(10);
@@ -317,7 +317,6 @@ void ToltecsEngine::drawScreen() {
}
void ToltecsEngine::updateInput() {
-
Common::Event event;
Common::EventManager *eventMan = _system->getEventManager();
while (eventMan->pollEvent(event)) {
@@ -327,6 +326,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 +352,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 +407,7 @@ void ToltecsEngine::updateInput() {
_mouseWaitForRelease = false;
_mouseButton = 0;
}
-
}
-
}
void ToltecsEngine::setGuiHeight(int16 guiHeight) {
@@ -426,8 +423,6 @@ void ToltecsEngine::setGuiHeight(int16 guiHeight) {
void ToltecsEngine::setCamera(int16 x, int16 y) {
_screen->finishTalkTextItems();
- _screen->clearSprites();
-
_cameraX = x;
_newCameraX = x;
@@ -478,7 +473,6 @@ void ToltecsEngine::scrollCameraRight(int16 delta) {
}
void ToltecsEngine::updateCamera() {
-
if (_cameraX != _newCameraX) {
_cameraX = _newCameraX;
_screen->_fullRefresh = true;
@@ -492,13 +486,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 +515,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 +609,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,
@@ -647,7 +642,6 @@ void ToltecsEngine::showMenu(MenuID menuId) {
_palette->loadAddPalette(9, 224);
_palette->setDeltaPalette(_palette->getMainPalette(), 7, 0, 31, 224);
_screen->finishTalkTextItems();
- _screen->clearSprites();
CursorMan.showMouse(true);
_menuSystem->run(menuId);
_keyState.reset();
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/tony/custom.cpp b/engines/tony/custom.cpp
index 23c655e35a..f5c580c8c5 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -154,7 +154,6 @@ void rightToMe(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS._tony->setPattern(GLOBALS._tony->PAT_STANDRIGHT);
}
-
void tonySetPerorate(CORO_PARAM, uint32 bStatus, uint32, uint32, uint32) {
g_vm->getEngine()->setPerorate(bStatus);
}
@@ -176,7 +175,6 @@ void setAlwaysDisplay(CORO_PARAM, uint32 val, uint32, uint32, uint32) {
GLOBALS._bAlwaysDisplay = (val != 0);
}
-
void setPointer(CORO_PARAM, uint32 dwPointer, uint32, uint32, uint32) {
switch (dwPointer) {
case 1:
@@ -215,7 +213,6 @@ VoiceHeader *searchVoiceHeader(uint32 codehi, uint32 codelo) {
return NULL;
}
-
void sendTonyMessage(CORO_PARAM, uint32 dwMessage, uint32 nX, uint32 nY, uint32) {
CORO_BEGIN_CONTEXT;
RMMessage msg;
@@ -337,7 +334,6 @@ void changeBoxStatus(CORO_PARAM, uint32 nLoc, uint32 nBox, uint32 nStatus, uint3
GLOBALS._boxes->changeBoxStatus(nLoc, nBox, nStatus);
}
-
void custLoadLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUseStartPos) {
CORO_BEGIN_CONTEXT;
uint32 h;
@@ -360,7 +356,6 @@ void custLoadLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUse
CORO_END_CODE;
}
-
void sendFullscreenMsgStart(CORO_PARAM, uint32 nMsg, uint32 nFont, uint32, uint32) {
CORO_BEGIN_CONTEXT;
RMMessage *msg;
@@ -485,7 +480,6 @@ void closeLocation(CORO_PARAM, uint32, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void changeLocation(CORO_PARAM, uint32 nLoc, uint32 tX, uint32 tY, uint32 bUseStartPos) {
CORO_BEGIN_CONTEXT;
uint32 h;
@@ -639,12 +633,10 @@ void tonyGenericPut2(CORO_PARAM, uint32 nDirection) {
CORO_END_CODE;
}
-
void tonyTakeUp1(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake1(coroParam, 0);
}
-
void tonyTakeMid1(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake1(coroParam, 1);
}
@@ -657,7 +649,6 @@ void tonyTakeUp2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake2(coroParam, 0);
}
-
void tonyTakeMid2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericTake2(coroParam, 1);
}
@@ -690,7 +681,6 @@ void tonyPutDown2(CORO_PARAM, uint32, uint32, uint32, uint32) {
tonyGenericPut2(coroParam, 2);
}
-
void tonyOnTheFloor(CORO_PARAM, uint32 dwParte, uint32, uint32, uint32) {
if (dwParte == 0)
GLOBALS._tony->setPattern(GLOBALS._tony->PAT_ONTHEFLOORLEFT);
@@ -1032,7 +1022,6 @@ void tonyScaredEnd(CORO_PARAM, uint32, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void tonyDisgusted(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
tonySetNumTexts(dwText);
GLOBALS._nTonyNextTalkType = GLOBALS._tony->TALK_DISGUSTED;
@@ -1101,7 +1090,6 @@ void tonyMacbeth(CORO_PARAM, uint32 nPos, uint32, uint32, uint32) {
}
}
-
void enableTony(CORO_PARAM, uint32, uint32, uint32, uint32) {
GLOBALS._tony->show();
}
@@ -1125,7 +1113,6 @@ void waitForPatternEnd(CORO_PARAM, uint32 nItem, uint32, uint32, uint32) {
CORO_END_CODE;
}
-
void setTonyPosition(CORO_PARAM, uint32 nX, uint32 nY, uint32 nLoc, uint32) {
GLOBALS._tony->setPosition(RMPoint(nX, nY), nLoc);
}
@@ -1252,17 +1239,14 @@ void syncScrollLocation(CORO_PARAM, uint32 nX, uint32 nY, uint32 sX, uint32 sY)
_ctx->pt._y += (_ctx->dimy * _ctx->dwCurTime) / _ctx->dwTotalTime;
else
_ctx->pt._y -= (_ctx->dimy * _ctx->dwCurTime) / _ctx->dwTotalTime;
-
}
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, g_vm->_hEndOfFrame, CORO_INFINITE);
GLOBALS._loc->setScrollPosition(_ctx->pt);
GLOBALS._tony->setScrollPosition(_ctx->pt);
-
}
-
// Set the position finale
if (sX) {
if (_ctx->lx > 0)
@@ -1282,7 +1266,6 @@ void syncScrollLocation(CORO_PARAM, uint32 nX, uint32 nY, uint32 sX, uint32 sY)
CORO_END_CODE;
}
-
void changeHotspot(CORO_PARAM, uint32 dwCode, uint32 nX, uint32 nY, uint32) {
int i;
@@ -1304,13 +1287,13 @@ void changeHotspot(CORO_PARAM, uint32 dwCode, uint32 nX, uint32 nY, uint32) {
GLOBALS._loc->getItemFromCode(dwCode)->changeHotspot(RMPoint(nX, nY));
}
-
void autoSave(CORO_PARAM, uint32, uint32, uint32, uint32) {
g_vm->autoSave(coroParam);
}
void abortGame(CORO_PARAM, uint32, uint32, uint32, uint32) {
- error("script called abortGame");
+ debug(1, "script called abortGame");
+ g_vm->quitGame();
}
void shakeScreen(CORO_PARAM, uint32 nScosse, uint32, uint32, uint32) {
@@ -1476,7 +1459,6 @@ void charSendMessage(CORO_PARAM, uint32 nChar, uint32 dwMessage, uint32 bIsBack,
_ctx->voice = NULL;
}
-
GLOBALS._curBackText = NULL;
delete _ctx->text;
}
@@ -1504,7 +1486,6 @@ void changeInventoryStatus(CORO_PARAM, uint32 dwCode, uint32 dwStatus, uint32, u
GLOBALS._inventory->changeItemStatus(dwCode, dwStatus);
}
-
/*
* Master Characters
*/
@@ -1535,7 +1516,6 @@ void mCharResetCode(CORO_PARAM, uint32 nChar, uint32, uint32, uint32) {
GLOBALS._mCharacter[nChar]._item = GLOBALS._loc->getItemFromCode(GLOBALS._mCharacter[nChar]._code);
}
-
void mCharSetPosition(CORO_PARAM, uint32 nChar, uint32 nX, uint32 nY, uint32) {
assert(nChar < 10);
GLOBALS._mCharacter[nChar]._x = nX;
@@ -1879,7 +1859,6 @@ void sendDialogMessage(CORO_PARAM, uint32 nPers, uint32 nMsg, uint32, uint32) {
CORO_END_CODE;
}
-
// @@@@ This cannot be skipped!!!!!!!!!!!!!!!!!!!
void startDialog(CORO_PARAM, uint32 nDialog, uint32 nStartGroup, uint32, uint32) {
@@ -1960,7 +1939,6 @@ void startDialog(CORO_PARAM, uint32 nDialog, uint32 nStartGroup, uint32, uint32)
CORO_END_CODE;
}
-
/*
* Sync between idle and mpal
*/
@@ -2270,7 +2248,6 @@ void doCredits(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint32, uint32) {
_ctx->text[_ctx->i].setPosition(RMPoint(260, 70 + _ctx->i * 26));
}
-
// Set the position
_ctx->text[_ctx->i].setAlwaysDisplay();
_ctx->text[_ctx->i].setForcedTime(dwTime * 1000);
@@ -2521,8 +2498,6 @@ void setupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation
GLOBALS._ambiance[58] = AMBIANCE_WIND;
GLOBALS._ambiance[60] = AMBIANCE_WIND;
-
-
// Create an event for the idle skipping
GLOBALS._hSkipIdle = CoroScheduler.createEvent(true, false);
}
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 85d9469519..84f05b0d25 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -77,7 +77,6 @@ void DebugChangeScene(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* This command loads up the specified new scene number
*/
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
index 8e6d5a64c3..1094950e2c 100644
--- a/engines/tony/detection.cpp
+++ b/engines/tony/detection.cpp
@@ -90,7 +90,7 @@ public:
bool TonyMetaEngine::hasFeature(MetaEngineFeature f) const {
return
- (f == kSupportsListSaves) ||
+ (f == kSupportsListSaves) ||
(f == kSupportsLoadingDuringStartup) ||
(f == kSupportsDeleteSave) ||
(f == kSavesSupportMetaInfo) ||
@@ -186,7 +186,6 @@ SaveStateDescriptor TonyMetaEngine::querySaveMetaInfos(const char *target, int s
return SaveStateDescriptor();
}
-
#if PLUGIN_ENABLED_DYNAMIC(TONY)
REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine);
#else
diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h
index d2bd81f083..ca16495903 100644
--- a/engines/tony/detection_tables.h
+++ b/engines/tony/detection_tables.h
@@ -75,6 +75,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough French "Collection Aventure" provided by Strangerke
{
@@ -91,6 +92,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough German "Shoe Box" provided by Strangerke
{
@@ -107,6 +109,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Italian provided by Fabio Barzagli
{
@@ -123,6 +126,24 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
+ {
+ // Tony Tough Italian provided by Giovanni Bajo
+ {
+ "tony",
+ 0,
+ {
+ {"roasted.mpr", 0, "06203dbbc85fdd1e6dc8fc211c1a6207", 135911071},
+ {"roasted.mpc", 0, "6202816f991b15af82aab84e3e4be011", 380183},
+ AD_LISTEND
+ },
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
{
// Tony Tough Polish provided by Fabio Barzagli
{
@@ -139,6 +160,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough German "Gamestar" provided in bug #3566035
{
@@ -155,6 +177,7 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
{
// Tony Tough Czech provided in bug #3565765
{
@@ -172,6 +195,41 @@ static const TonyGameDescription gameDescriptions[] = {
GUIO1(GUIO_NONE)
},
},
+
+ {
+ // Tony Tough English Unpacked
+ {
+ "tony",
+ 0,
+ {
+ {"roasted.mpr", 0, "06203dbbc85fdd1e6dc8fc211c1a6207", 135911071},
+ {"roasted.mpc", 0, "57c4a3860cf899443c357e0078ea6f49", 366773},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
+ {
+ // Tony Tough German "Shoe Box", reported in bug #3582420
+ {
+ "tony",
+ 0,
+ {
+ {"roasted.mpr", 0, "06203dbbc85fdd1e6dc8fc211c1a6207", 135911071},
+ {"roasted.mpc", 0, "bc3471f098e591dc509dcad401a8d8a5", 389554},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ GUIO1(GUIO_NONE)
+ },
+ },
+
{ AD_TABLE_END_MARKER }
};
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index fa018b4464..1729052d42 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -81,7 +81,6 @@ void RMFont::unload() {
}
}
-
RMGfxPrimitive *RMFont::makeLetterPrimitive(byte bChar, int &nLength) {
RMFontPrimitive *prim;
@@ -223,7 +222,6 @@ void RMFontDialog::init() {
}
}
-
/***************************************************************************\
* RMFontMacc Methods
\****************************************************************************/
@@ -278,8 +276,6 @@ void RMFontCredits::init() {
}
}
-
-
/***************************************************************************\
* RMFontObj Methods
\****************************************************************************/
@@ -544,7 +540,6 @@ void RMText::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
else if (_aHorType == HRIGHT)
prim->getDst().topLeft() -= RMPoint(_dimx, 0);
-
// Vertically
if (_aVerType == VTOP) {
@@ -627,7 +622,6 @@ void RMTextDialog::writeText(const Common::String &text, RMFontColor *font, int
*time = _time;
}
-
void RMTextDialog::setSkipStatus(bool bEnabled) {
_bSkipStatus = bEnabled;
}
@@ -685,6 +679,7 @@ void RMTextDialog::removeThis(CORO_PARAM, bool &result) {
}
}
}
+
// Erase the background
else if (!(GLOBALS._bCfgDubbing && _hCustomSkip2 != CORO_INVALID_PID_VALUE)) {
if (!_bForceNoTime) {
@@ -805,7 +800,6 @@ void RMTextDialogScrolling::clipOnScreen(RMGfxPrimitive *prim) {
// We must not do anything!
}
-
/****************************************************************************\
* RMTextItemName Methods
\****************************************************************************/
@@ -866,7 +860,6 @@ void RMTextItemName::doFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
CORO_END_CODE;
}
-
void RMTextItemName::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -952,7 +945,6 @@ void RMDialogChoice::init() {
setPriority(140);
}
-
void RMDialogChoice::close() {
if (_drawedStrings != NULL) {
delete[] _drawedStrings;
@@ -1116,7 +1108,6 @@ void RMDialogChoice::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
CORO_END_CODE;
}
-
void RMDialogChoice::hide(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
int deltay;
@@ -1145,7 +1136,6 @@ void RMDialogChoice::hide(CORO_PARAM) {
CORO_END_CODE;
}
-
void RMDialogChoice::removeThis(CORO_PARAM, bool &result) {
result = _bRemoveFromOT;
}
diff --git a/engines/tony/font.h b/engines/tony/font.h
index 13c1ddf268..9ef50b99ec 100644
--- a/engines/tony/font.h
+++ b/engines/tony/font.h
@@ -104,7 +104,6 @@ public:
int stringLen(char bChar, char bNext = 0);
};
-
class RMFontColor : public virtual RMFont {
private:
byte _fontR, _fontG, _fontB;
@@ -115,7 +114,6 @@ public:
virtual void setBaseColor(byte r, byte g, byte b);
};
-
class RMFontWithTables : public virtual RMFont {
protected:
int _cTable[256];
@@ -136,7 +134,6 @@ public:
virtual ~RMFontWithTables() {}
};
-
class RMFontDialog : public RMFontColor, public RMFontWithTables {
public:
void init();
@@ -175,16 +172,16 @@ private:
public:
enum HorAlign {
- HLEFT,
- HLEFTPAR,
- HCENTER,
- HRIGHT
+ HLEFT,
+ HLEFTPAR,
+ HCENTER,
+ HRIGHT
};
enum VerAlign {
- VTOP,
- VCENTER,
- VBOTTOM
+ VTOP,
+ VCENTER,
+ VBOTTOM
};
private:
@@ -293,7 +290,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Manages the name of a selected item on the screen
*/
@@ -319,7 +315,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Manages the selection of screen items in a box
*/
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 1a19f2836c..501a588ff5 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -164,7 +164,6 @@ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int
_pushRight = new RMOptionButton(RMRect(pt._x + _nSlideSize, pt._y, pt._x + _nSlideSize + 5 + 22, pt._y + 26));
}
-
RMOptionSlide::~RMOptionSlide() {
delete _sliderCenter;
_sliderCenter = NULL;
@@ -973,8 +972,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_BEGIN_CODE(_ctx);
-
- // If it is fully open, do nothing
+ // If it is not fully open, do nothing
if (_fadeStep != 6)
return;
@@ -1043,8 +1041,8 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
}
}
-#define KEYPRESS(c) (g_vm->getEngine()->getInput().getAsyncKeyState(c))
-#define PROCESS_CHAR(cod, c) if (KEYPRESS(cod)) { \
+#define KEYPRESS(c) (g_vm->getEngine()->getInput().getAsyncKeyState(c))
+#define PROCESS_CHAR(cod, c) if (KEYPRESS(cod)) { \
_editName[strlen(_editName) + 1] = '\0'; _editName[strlen(_editName)] = c; _ctx->bRefresh = true; }
// State Buttons
@@ -1058,7 +1056,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
for (_ctx->i = 0; _ctx->i < 26 && strlen(_editName) < 12; _ctx->i++) {
if (KEYPRESS(Common::KEYCODE_LSHIFT) ||
- KEYPRESS(Common::KEYCODE_RSHIFT)) {
+ KEYPRESS(Common::KEYCODE_RSHIFT)) {
PROCESS_CHAR((Common::KeyCode)((int)'a' + _ctx->i), _ctx->i + 'A');
} else {
PROCESS_CHAR((Common::KeyCode)((int)'a' + _ctx->i), _ctx->i + 'a');
@@ -1222,7 +1220,6 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
CORO_END_CODE;
}
-
void RMOptionScreen::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int curTime;
@@ -1233,7 +1230,7 @@ void RMOptionScreen::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
_ctx->curTime = g_vm->getTime();
#define FADE_SPEED 20
-#define SYNC (_ctx->curTime - _fadeTime) / 25
+#define SYNC (_ctx->curTime - _fadeTime) / 25
if (_bExit)
return;
@@ -1334,7 +1331,6 @@ void RMOptionScreen::removeThis(CORO_PARAM, bool &result) {
result = false;
}
-
bool RMOptionScreen::loadThumbnailFromSaveState(int nState, byte *lpDestBuf, Common::String &name, byte &diff) {
char namebuf[256];
Common::InSaveFile *f;
diff --git a/engines/tony/game.h b/engines/tony/game.h
index 83a1ddaea1..fdf62a2a5d 100644
--- a/engines/tony/game.h
+++ b/engines/tony/game.h
@@ -324,7 +324,6 @@ public:
static bool loadThumbnailFromSaveState(int numState, byte *lpDestBuf, Common::String &name, byte &diff);
protected:
-
// Initialization and state change
void initState(CORO_PARAM);
void closeState();
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 04ce01b0ed..dc82c78ee5 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -69,7 +69,6 @@ void RMGfxTaskSetPrior::setPriority(int nPrior) {
_nPrior = nPrior;
}
-
/****************************************************************************\
* RMGfxBuffer Methods
\****************************************************************************/
@@ -109,7 +108,6 @@ void RMGfxBuffer::offsetY(int nLines, int nBpp) {
_buf += nLines * getDimx() * nBpp / 8;
}
-
RMGfxBuffer::operator byte *() {
return _buf;
}
@@ -130,7 +128,6 @@ int RMGfxBuffer::getDimy() {
return _dimy;
}
-
/****************************************************************************\
* RMGfxSourceBuffer Methods
\****************************************************************************/
@@ -223,7 +220,6 @@ void RMGfxSourceBuffer::offsetY(int nLines) {
\****************************************************************************/
RMGfxWoodyBuffer::~RMGfxWoodyBuffer() {
-
}
void RMGfxWoodyBuffer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
@@ -242,7 +238,6 @@ void RMGfxWoodyBuffer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitiv
}
RMGfxWoodyBuffer::RMGfxWoodyBuffer() {
-
}
RMGfxWoodyBuffer::RMGfxWoodyBuffer(int dimx, int dimy)
@@ -487,7 +482,6 @@ bool RMGfxTargetBuffer::getTrackDirtyRects() const {
\****************************************************************************/
RMGfxSourceBufferPal::~RMGfxSourceBufferPal() {
-
}
int RMGfxSourceBufferPal::loadPaletteWA(const byte *buf, bool bSwapped) {
@@ -567,7 +561,6 @@ RMGfxSourceBuffer4::RMGfxSourceBuffer4(int dimx, int dimy)
setPriority(0);
}
-
/**
* Returns the number of bits per pixel of the surface
*
@@ -586,11 +579,10 @@ void RMGfxSourceBuffer4::create(int dimx, int dimy) {
\****************************************************************************/
RMGfxSourceBuffer8::~RMGfxSourceBuffer8() {
-
}
void RMGfxSourceBuffer8::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int width, height, u, v;
+ int width = 0, height = 0, u = 0, v = 0;
int bufx = bigBuf.getDimx();
uint16 *buf = bigBuf;
byte *raw = _buf;
@@ -659,7 +651,6 @@ RMGfxSourceBuffer8::RMGfxSourceBuffer8(bool bTrasp0) {
_bTrasp0 = bTrasp0;
}
-
/**
* Returns the number of bits per pixel of the surface
*
@@ -677,13 +668,11 @@ void RMGfxSourceBuffer8::create(int dimx, int dimy) {
#define GETGREEN(x) (((x) >> 5) & 0x1F)
#define GETBLUE(x) ((x) & 0x1F)
-
/****************************************************************************\
* RMGfxSourceBuffer8AB Methods
\****************************************************************************/
RMGfxSourceBuffer8AB::~RMGfxSourceBuffer8AB() {
-
}
int RMGfxSourceBuffer8AB::calcTrasp(int fore, int back) {
@@ -703,9 +692,8 @@ int RMGfxSourceBuffer8AB::calcTrasp(int fore, int back) {
return (r << 10) | (g << 5) | b;
}
-
void RMGfxSourceBuffer8AB::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- int width, height, u, v;
+ int width = 0, height = 0, u = 0, v = 0;
int bufx = bigBuf.getDimx();
uint16 *buf = bigBuf;
byte *raw = _buf;
@@ -765,8 +753,6 @@ void RMGfxSourceBuffer8AB::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrim
bigBuf.addDirtyRect(Common::Rect(dst._x1, dst._y1, dst._x1 + width, dst._y1 + height));
}
-
-
/****************************************************************************\
* RMGfxSourceBuffer8RLE Methods
\****************************************************************************/
@@ -792,7 +778,6 @@ RMGfxSourceBuffer8RLE::~RMGfxSourceBuffer8RLE() {
}
}
-
int RMGfxSourceBuffer8RLE::init(const byte *buf, int dimx, int dimy, bool bLoadPalette) {
return RMGfxSourceBufferPal::init(buf, dimx, dimy, bLoadPalette);
}
@@ -967,7 +952,6 @@ void RMGfxSourceBuffer8RLE::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer8RLEByte Methods
\****************************************************************************/
@@ -1050,7 +1034,6 @@ void RMGfxSourceBuffer8RLEByte::rleDecompressLine(uint16 *dst, byte *src, int nS
src += n;
}
-
while (1) {
RLEByteDoTrasp:
// Get the trasp of s**t
@@ -1155,7 +1138,6 @@ void RMGfxSourceBuffer8RLEByte::rleDecompressLineFlipped(uint16 *dst, byte *src,
src += n;
}
-
while (1) {
RLEByteFlippedDoTrasp:
// Get the trasp of s**t
@@ -1212,13 +1194,11 @@ RLEByteFlippedDoCopy2:
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer8RLEWord Methods
\****************************************************************************/
RMGfxSourceBuffer8RLEWord::~RMGfxSourceBuffer8RLEWord() {
-
}
void RMGfxSourceBuffer8RLEWord::rleWriteTrasp(byte *&cur, int rep) {
@@ -1299,7 +1279,6 @@ void RMGfxSourceBuffer8RLEWord::rleDecompressLine(uint16 *dst, byte *src, int nS
src += n;
}
-
while (1) {
RLEWordDoTrasp:
// Get the trasp of s**t
@@ -1321,7 +1300,6 @@ RLEWordDoAlpha:
src += 2;
RLEWordDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1360,7 +1338,6 @@ RLEWordDoCopy2:
return;
assert(nLength > 0);
-
}
}
@@ -1416,7 +1393,6 @@ void RMGfxSourceBuffer8RLEWord::rleDecompressLineFlipped(uint16 *dst, byte *src,
src += n;
}
-
while (1) {
RLEWordFlippedDoTrasp:
// Get the trasp of s**t
@@ -1438,7 +1414,6 @@ RLEWordFlippedDoAlpha:
src += 2;
RLEWordFlippedDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1485,7 +1460,6 @@ RLEWordFlippedDoCopy2:
\****************************************************************************/
RMGfxSourceBuffer8RLEWordAB::~RMGfxSourceBuffer8RLEWordAB() {
-
}
void RMGfxSourceBuffer8RLEWordAB::rleDecompressLine(uint16 *dst, byte *src, int nStartSkip, int nLength) {
@@ -1545,7 +1519,6 @@ void RMGfxSourceBuffer8RLEWordAB::rleDecompressLine(uint16 *dst, byte *src, int
src += n;
}
-
while (1) {
RLEWordDoTrasp:
// Get the trasp of s**t
@@ -1567,7 +1540,6 @@ RLEWordDoAlpha:
src += 2;
RLEWordDoAlpha2:
-
if (n > nLength)
n = nLength;
@@ -1651,9 +1623,9 @@ void RMGfxSourceBuffer8AA::calculateAA() {
for (int x = 0; x < _dimx; x++) {
if (*src == 0) {
if ((y > 0 && src[-_dimx] != 0) ||
- (y < _dimy - 1 && src[_dimx] != 0) ||
- (x > 0 && src[-1] != 0) ||
- (x < _dimx - 1 && src[1] != 0))
+ (y < _dimy - 1 && src[_dimx] != 0) ||
+ (x > 0 && src[-1] != 0) ||
+ (x < _dimx - 1 && src[1] != 0))
*srcaa = 1;
}
@@ -1668,9 +1640,9 @@ void RMGfxSourceBuffer8AA::calculateAA() {
for (int x = 0; x < _dimx; x++) {
if (*src != 0) {
if ((y > 0 && srcaa[-_dimx] == 1) ||
- (y < _dimy - 1 && srcaa[_dimx] == 1) ||
- (x > 0 && srcaa[-1] == 1) ||
- (x < _dimx - 1 && srcaa[1] == 1))
+ (y < _dimy - 1 && srcaa[_dimx] == 1) ||
+ (x > 0 && srcaa[-1] == 1) ||
+ (x < _dimx - 1 && srcaa[1] == 1))
*srcaa = 2;
}
@@ -1713,7 +1685,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
src += READ_LE_UINT16(src);
// Eliminate horizontal clipping
-
if (prim->isFlipped()) {
u = _dimx - (width + u);
x1 = (prim->getDst()._x1 + _dimx - 1) - u;
@@ -1728,9 +1699,8 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
bigBuf.addDirtyRect(Common::Rect(x1, y1, x1 + width, y1 + height));
}
-// width = _dimx;
-// x1 = prim->Dst().x1;
-
+ //width = _dimx;
+ //x1 = prim->Dst().x1;
// Position into the destination buffer
buf = bigBuf;
@@ -1821,8 +1791,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
}
}
-
-
void RMGfxSourceBuffer8AA::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1911,7 +1879,6 @@ void RMGfxSourceBuffer8RLEWordAA::init(Common::ReadStream &ds, int dimx, int dim
}
}
-
/****************************************************************************\
* RMGfxSourceBuffer16 Methods
\****************************************************************************/
@@ -1984,7 +1951,7 @@ void RMGfxSourceBuffer16::prepareImage() {
uint16 *buf = (uint16 *)_buf;
for (int i = 0; i < _dimx * _dimy; i++)
- WRITE_LE_UINT16(&buf[i], FROM_LE_16(buf[i]) & 0x7FFF);
+ buf[i] = FROM_LE_16(buf[i]) & 0x7FFF;
}
RMGfxSourceBuffer16::RMGfxSourceBuffer16(int dimx, int dimy)
@@ -2041,7 +2008,6 @@ void RMGfxBox::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim)
bigBuf.addDirtyRect(rcDst);
}
-
/****************************************************************************\
* RMGfxClearTask Methods
\****************************************************************************/
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index f0deed83ee..1bacf7e5a9 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -52,7 +52,6 @@ class RMGfxSourceBuffer16; // Source
class RMGfxWoodyBuffer; // Source16+Target
class RMGfxClearTask; // Task
-
/**
* Graphics buffer
*/
@@ -126,7 +125,6 @@ public:
virtual RMGfxPrimitive *duplicate();
};
-
/**
* Graphic drawing task
*/
@@ -149,7 +147,6 @@ public:
virtual void unregister();
};
-
/**
* Graphic drawing with priority
*/
@@ -159,7 +156,6 @@ public:
void setPriority(int nPrior);
};
-
/**
* Task that cleans the destination buffer
*/
@@ -172,7 +168,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Task that draws a colored box
*/
@@ -188,7 +183,6 @@ public:
virtual void removeThis(CORO_PARAM, bool &result);
};
-
/**
* Buffer source for the design, which is a task. This is an abstract base.
*/
@@ -210,7 +204,6 @@ public:
virtual int getBpp() = 0;
};
-
/**
* 16-bit color source
*/
@@ -231,7 +224,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with palette
*/
@@ -256,7 +248,6 @@ public:
int loadPalette(const byte *buf);
};
-
/**
* Buffer source with a 256 color palette
*/
@@ -276,7 +267,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with a 256 color palette, and alpha blending
*/
@@ -289,7 +279,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Buffer source with a 256 color palette, RLE compressed
*/
@@ -370,7 +359,6 @@ public:
virtual ~RMGfxSourceBuffer8RLEWordAB();
};
-
/**
* Buffer source with a 256 color palette, with anti-aliasing
*/
@@ -397,7 +385,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
class RMGfxSourceBuffer8RLEByteAA : public RMGfxSourceBuffer8RLEByte, public RMGfxSourceBuffer8AA {
protected:
void prepareImage();
@@ -426,7 +413,6 @@ public:
virtual ~RMGfxSourceBuffer8RLEWordAA();
};
-
/**
* Source buffer with 16 colors
*/
@@ -442,7 +428,6 @@ public:
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
-
/**
* Destination buffer which manages its own internal list of tasks
*/
@@ -464,7 +449,7 @@ private:
void mergeDirtyRects();
private:
-// OSystem::MutexRef csModifyingOT;
+ //OSystem::MutexRef csModifyingOT;
protected:
OTList *_otlist;
@@ -498,7 +483,6 @@ public:
bool getTrackDirtyRects() const;
};
-
/**
* Ring buffer, which is both source and by destination
*/
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index 59fb024622..7bb25f59b9 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -35,7 +35,6 @@
namespace Tony {
-
/****************************************************************************\
* RMGfxEngine Methods
\****************************************************************************/
@@ -261,7 +260,6 @@ SKIPCLICKSINISTRO:
}
}
-
// Right Release
// *************
if (_input.mouseRightReleased()) {
@@ -532,7 +530,10 @@ void RMGfxEngine::disableMouse() {
#define TONY_SAVEGAME_VERSION 8
void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Common::String &name) {
- Common::OutSaveFile *f;
+ Common::OutSaveFile *f = g_system->getSavefileManager()->openForSaving(fn);
+ if (f == NULL)
+ return;
+
byte *state;
char buf[4];
RMPoint tp = _tony.position();
@@ -551,10 +552,6 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
buf[2] = 'S';
buf[3] = TONY_SAVEGAME_VERSION;
- f = g_system->getSavefileManager()->openForSaving(fn);
- if (f == NULL)
- return;
-
f->write(buf, 4);
f->writeUint32LE(thumbsize);
f->write(curThumb, thumbsize);
@@ -634,7 +631,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
CORO_BEGIN_CONTEXT;
Common::InSaveFile *f;
byte *state, *statecmp;
- uint size, sizecmp;
+ uint32 size, sizecmp;
char buf[4];
RMPoint tp;
int loc;
diff --git a/engines/tony/globals.h b/engines/tony/globals.h
index d8d8d3eba5..0ff243b374 100644
--- a/engines/tony/globals.h
+++ b/engines/tony/globals.h
@@ -63,6 +63,7 @@ struct CharacterStruct {
f->writeUint32LE(_endTalkPattern);
f->writeUint32LE(_numTexts);
}
+
void load(Common::InSaveFile *f) {
_code = f->readUint32LE();
f->readUint32LE();
@@ -106,6 +107,7 @@ struct MCharacterStruct {
f->writeUint32LE(_curTalk);
f->writeByte(_bAlwaysBack);
}
+
void load(Common::InSaveFile *f) {
_code = f->readUint32LE();
f->readUint32LE();
@@ -134,6 +136,7 @@ struct ChangedHotspotStruct {
f->writeUint32LE(_nX);
f->writeUint32LE(_nY);
}
+
void load(Common::InSaveFile *f) {
_dwCode = f->readUint32LE();
_nX = f->readUint32LE();
@@ -141,7 +144,6 @@ struct ChangedHotspotStruct {
}
};
-
/**
* Description of a call to a custom function.
*/
@@ -150,7 +152,7 @@ typedef struct {
int _arg1, _arg2, _arg3, _arg4;
} CfCall;
-typedef CfCall *LpCfCall;
+typedef CfCall *LpCfCall;
struct CoroutineMutex {
CoroutineMutex() : _eventId(0), _ownerPid(0), _lockCount(0) { }
@@ -173,20 +175,20 @@ public:
Common::String _nextMusic;
bool _nextLoop;
- int _nextChannel;
- int _nextSync;
- int _curChannel;
- int _flipflop;
+ int _nextChannel;
+ int _nextSync;
+ int _curChannel;
+ int _flipflop;
CharacterStruct _character[16];
MCharacterStruct _mCharacter[10];
ChangedHotspotStruct _changedHotspot[256];
bool _isMChar[16];
bool _bAlwaysDisplay;
RMPoint _saveTonyPos;
- int _saveTonyLoc;
+ int _saveTonyLoc;
RMTextDialog *_curBackText;
bool _bTonyIsSpeaking;
- int _curChangedHotspot;
+ int _curChangedHotspot;
bool _bCfgInvLocked;
bool _bCfgInvNoScroll;
bool _bCfgTimerizedText;
@@ -199,16 +201,16 @@ public:
bool _bCfgDubbing;
bool _bCfgMusic;
bool _bCfgSFX;
- int _nCfgTonySpeed;
- int _nCfgTextSpeed;
- int _nCfgDubbingVolume;
- int _nCfgMusicVolume;
- int _nCfgSFXVolume;
+ int _nCfgTonySpeed;
+ int _nCfgTextSpeed;
+ int _nCfgDubbingVolume;
+ int _nCfgMusicVolume;
+ int _nCfgSFXVolume;
bool _bSkipSfxNoLoop;
bool _bIdleExited;
bool _bNoBullsEye;
- int _curDialog;
- int _curSoundEffect;
+ int _curDialog;
+ int _curSoundEffect;
bool _bFadeOutStop;
RMTony *_tony;
diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp
index b96ccaf842..e84da04d97 100644
--- a/engines/tony/input.cpp
+++ b/engines/tony/input.cpp
@@ -32,20 +32,8 @@
namespace Tony {
RMInput::RMInput() {
- // Setup mouse fields
- _clampMouse = false;
- _mousePos.set(0, 0);
- _leftButton = _rightButton = false;
_leftClickMouse = _leftReleaseMouse = false;
_rightClickMouse = _rightReleaseMouse = false;
-
- Common::fill((byte *)&_event, (byte *)&_event + sizeof(Common::Event), 0);
-
- // Setup keyboard fields
- Common::fill(&_keyDown[0], &_keyDown[350], 0);
-}
-
-RMInput::~RMInput() {
}
void RMInput::poll() {
@@ -59,19 +47,15 @@ void RMInput::poll() {
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
case Common::EVENT_RBUTTONUP:
- _mousePos.set(_event.mouse.x, _event.mouse.y);
+ _mousePos = _event.mouse;
if (_event.type == Common::EVENT_LBUTTONDOWN) {
- _leftButton = true;
_leftClickMouse = true;
} else if (_event.type == Common::EVENT_LBUTTONUP) {
- _leftButton = false;
_leftReleaseMouse = true;
} else if (_event.type == Common::EVENT_RBUTTONDOWN) {
- _rightButton = true;
_rightClickMouse = true;
} else if (_event.type == Common::EVENT_RBUTTONUP) {
- _rightButton = false;
_rightReleaseMouse = true;
} else
continue;
@@ -87,12 +71,17 @@ void RMInput::poll() {
g_vm->_debugger->onFrame();
} else {
// Flag the given key as being down
- _keyDown[(int)_event.kbd.keycode] = true;
+ _keyDown.push_back(_event.kbd.keycode);
}
return;
case Common::EVENT_KEYUP:
- _keyDown[(int)_event.kbd.keycode] = false;
+ for (uint i = 0; i < _keyDown.size(); i++) {
+ if (_keyDown[i] == _event.kbd.keycode) {
+ _keyDown.remove_at(i);
+ break;
+ }
+ }
return;
default:
@@ -101,30 +90,27 @@ void RMInput::poll() {
}
}
-bool RMInput::mouseLeft() {
- return _leftButton;
-}
-
-bool RMInput::mouseRight() {
- return _rightButton;
-}
-
/**
* Return true if a key has been pressed
*/
bool RMInput::getAsyncKeyState(Common::KeyCode kc) {
// The act of testing for a particular key automatically clears the state, to prevent
// the same key being registered in multiple different frames
- bool result = _keyDown[(int)kc];
- _keyDown[(int)kc] = false;
- return result;
+ for (uint i = 0; i < _keyDown.size(); i++) {
+ if (_keyDown[i] == kc) {
+ _keyDown.remove_at(i);
+ return true;
+ }
+ }
+ return false;
}
/**
* Reading of the mouse
*/
RMPoint RMInput::mousePos() {
- return _mousePos;
+ RMPoint p(_mousePos.x, _mousePos.y);
+ return p;
}
/**
@@ -138,10 +124,6 @@ bool RMInput::mouseRightClicked() {
return _rightClickMouse;
}
-bool RMInput::mouseBothClicked() {
- return _leftClickMouse && _rightClickMouse;
-}
-
bool RMInput::mouseLeftReleased() {
return _leftReleaseMouse;
}
@@ -150,8 +132,4 @@ bool RMInput::mouseRightReleased() {
return _rightReleaseMouse;
}
-bool RMInput::mouseBothReleased() {
- return _leftReleaseMouse && _rightReleaseMouse;
-}
-
} // End of namespace Tony
diff --git a/engines/tony/input.h b/engines/tony/input.h
index d07eaefe34..274aa8c491 100644
--- a/engines/tony/input.h
+++ b/engines/tony/input.h
@@ -30,6 +30,9 @@
#define TONY_INPUT_H
#include "common/events.h"
+#include "common/rect.h"
+#include "common/array.h"
+#include "common/keyboard.h"
#include "tony/utils.h"
namespace Tony {
@@ -39,17 +42,14 @@ private:
Common::Event _event;
// Mouse related fields
- RMPoint _mousePos;
- bool _clampMouse;
- bool _leftButton, _rightButton;
+ Common::Point _mousePos;
bool _leftClickMouse, _leftReleaseMouse, _rightClickMouse, _rightReleaseMouse;
// Keyboard related fields
- bool _keyDown[350];
+ Common::Array<Common::KeyCode> _keyDown;
public:
RMInput();
- ~RMInput();
/**
* Polling (must be performed once per frame)
@@ -62,20 +62,12 @@ public:
RMPoint mousePos();
/**
- * Current status of the mouse buttons
- */
- bool mouseLeft();
- bool mouseRight();
-
- /**
* Events of mouse clicks
*/
bool mouseLeftClicked();
bool mouseRightClicked();
- bool mouseBothClicked();
bool mouseLeftReleased();
bool mouseRightReleased();
- bool mouseBothReleased();
/**
* Returns true if the given key is pressed
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index 12540e5b7f..6b023d5990 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -34,7 +34,6 @@
namespace Tony {
-
/****************************************************************************\
* RMInventory Methods
\****************************************************************************/
@@ -71,7 +70,6 @@ bool RMInventory::checkPointInside(const RMPoint &pt) {
return pt._y < 70;
}
-
void RMInventory::init() {
// Create the main buffer
create(RM_SX, 68);
@@ -143,10 +141,9 @@ void RMInventory::init() {
RMMessage msg2(13);
RMMessage msg3(14);
- _hints[0].writeText(msg1[0], 1); // Examine
- _hints[1].writeText(msg2[0], 1); // Take
- _hints[2].writeText(msg3[0], 1); // Use
-
+ _hints[0].writeText(msg1[0], 1); // Examine
+ _hints[1].writeText(msg2[0], 1); // Take
+ _hints[2].writeText(msg3[0], 1); // Use
// Prepare initial inventory
prepare();
@@ -280,7 +277,6 @@ void RMInventory::changeItemStatus(uint32 code, uint32 dwStatus) {
}
}
-
void RMInventory::prepare() {
for (int i = 1; i < RM_SX / 64 - 1; i++) {
if (i - 1 + _curPos < _nInv)
@@ -353,6 +349,7 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
clearOT();
g_system->unlockMutex(_csModifyInterface);
}
+
// Click the left arrow
else if ((_state == OPENED) && _bBlinkingLeft) {
assert(_curPos > 0);
@@ -375,7 +372,6 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
g_system->unlockMutex(_csModifyInterface);
}
-
return false;
}
@@ -458,7 +454,7 @@ bool RMInventory::rightRelease(const RMPoint &mpos, RMTonyAction &curAction) {
return false;
}
-#define INVSPEED 20
+#define INVSPEED 20
void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen) {
bool bNeedRedraw = false;
@@ -517,7 +513,7 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
GLOBALS._bCfgInvLocked = !GLOBALS._bCfgInvLocked;
}
- if (_bCombining) {//m_state == COMBINING)
+ if (_bCombining) { // m_state == COMBINING)
ptr.setCustomPointer(&_items[_nCombine]._pointer[_items[_nCombine]._status - 1]);
ptr.setSpecialPointer(RMPointer::PTR_CUSTOM);
}
@@ -677,8 +673,10 @@ int RMInventory::getSaveStateSize() {
void RMInventory::saveState(byte *state) {
WRITE_LE_UINT32(state, _nInv);
state += 4;
- Common::copy(_inv, _inv + 256, (uint32 *)state);
- state += 256 * 4;
+ for (int i = 0; i < 256; ++i) {
+ WRITE_LE_UINT32(state, _inv[i]);
+ state += 4;
+ }
int x;
for (int i = 0; i < 256; i++) {
@@ -695,8 +693,10 @@ void RMInventory::saveState(byte *state) {
int RMInventory::loadState(byte *state) {
_nInv = READ_LE_UINT32(state);
state += 4;
- Common::copy((uint32 *)state, (uint32 *)state + 256, _inv);
- state += 256 * 4;
+ for (int i = 0; i < 256; ++i) {
+ _inv[i] = READ_LE_UINT32(state);
+ state += 4;
+ }
int x;
for (int i = 0; i < 256; i++) {
@@ -863,7 +863,7 @@ bool RMInterface::released(const RMPoint &mousepos, RMTonyAction &action) {
action = TA_PERORATE;
break;
- default: // No verb
+ default: // No verb
return false;
}
@@ -898,8 +898,8 @@ void RMInterface::init() {
_hotzone[i].loadPaletteWA(pal);
}
- _hotbbox[0].setRect(126, 123, 159, 208); // Take
- _hotbbox[1].setRect(90, 130, 125, 186); // About
+ _hotbbox[0].setRect(126, 123, 159, 208); // Take
+ _hotbbox[1].setRect(90, 130, 125, 186); // About
_hotbbox[2].setRect(110, 60, 152, 125);
_hotbbox[3].setRect(56, 51, 93, 99);
_hotbbox[4].setRect(51, 105, 82, 172);
@@ -917,11 +917,11 @@ void RMInterface::init() {
RMMessage msg3(15);
RMMessage msg4(16);
- _hints[0].writeText(msg0[0], 1); // Take
- _hints[1].writeText(msg1[0], 1); // Talk
- _hints[2].writeText(msg2[0], 1); // Use
- _hints[3].writeText(msg3[0], 1); // Examine
- _hints[4].writeText(msg4[0], 1); // Show Yourself
+ _hints[0].writeText(msg0[0], 1); // Take
+ _hints[1].writeText(msg1[0], 1); // Talk
+ _hints[2].writeText(msg2[0], 1); // Use
+ _hints[3].writeText(msg3[0], 1); // Examine
+ _hints[4].writeText(msg4[0], 1); // Show Yourself
_bActive = false;
_bPerorate = false;
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index ce94c86c1b..1d660d51cd 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -174,7 +174,6 @@ public:
int loadState(byte *state);
};
-
class RMInterface : public RMGfxSourceBuffer8RLEByte {
private:
bool _bActive;
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index 18470aa6fc..5beac842f9 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -37,7 +37,6 @@ namespace Tony {
using namespace ::Tony::MPAL;
-
/****************************************************************************\
* RMPalette Methods
\****************************************************************************/
@@ -65,7 +64,6 @@ void RMPattern::RMSlot::readFromStream(Common::ReadStream &ds, bool bLOX) {
_flag = ds.readByte();
}
-
/****************************************************************************\
* RMPattern Methods
\****************************************************************************/
@@ -329,7 +327,6 @@ RMSprite::~RMSprite() {
}
}
-
/****************************************************************************\
* RMSfx Methods
\****************************************************************************/
@@ -391,8 +388,6 @@ void RMSfx::stop() {
}
}
-
-
/****************************************************************************\
* RMItem Methods
\****************************************************************************/
@@ -553,7 +548,6 @@ void RMItem::readFromStream(Common::SeekableReadStream &ds, bool bLOX) {
_bIsActive = mpalQueryItemIsActive(_mpalCode);
}
-
RMGfxPrimitive *RMItem::newItemPrimitive() {
return new RMGfxPrimitive(this);
}
@@ -648,7 +642,6 @@ void RMItem::removeThis(CORO_PARAM, bool &result) {
result = (_nCurSprite == -1);
}
-
void RMItem::setStatus(int nStatus) {
_bIsActive = (nStatus > 0);
}
@@ -745,7 +738,6 @@ RMItem::~RMItem() {
CoroScheduler.closeEvent(_hEndPattern);
}
-
void RMItem::waitForEndPattern(CORO_PARAM, uint32 hCustomSkip) {
CORO_BEGIN_CONTEXT;
uint32 h[2];
@@ -784,12 +776,10 @@ void RMItem::pauseSound(bool bPause) {
_sfx[i].pause(bPause);
}
-
/****************************************************************************\
* RMWipe Methods
\****************************************************************************/
-
RMWipe::RMWipe() {
_hUnregistered = CoroScheduler.createEvent(false, false);
_hEndOfFade = CoroScheduler.createEvent(false, false);
@@ -799,7 +789,6 @@ RMWipe::RMWipe() {
_bEndFade = false;
_bFading = false;
_nFadeStep = 0;
-
}
RMWipe::~RMWipe() {
@@ -904,10 +893,10 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
/****************************************************************************/
short RMCharacter::findPath(short source, short destination) {
- static RMBox box[MAXBOXES]; // Matrix of adjacent boxes
- static short nodeCost[MAXBOXES]; // Cost per node
- static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
- static short nextNode[MAXBOXES]; // Next node
+ static RMBox box[MAXBOXES]; // Matrix of adjacent boxes
+ static short nodeCost[MAXBOXES]; // Cost per node
+ static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
+ static short nextNode[MAXBOXES]; // Next node
short minCost, error = 0;
RMBoxLoc *cur;
@@ -936,19 +925,19 @@ short RMCharacter::findPath(short source, short destination) {
// Find the shortest path
while (!finish) {
- minCost = 32000; // Reset the minimum cost
- error = 1; // Possible error
+ minCost = 32000; // Reset the minimum cost
+ error = 1; // Possible error
// 1st cycle: explore possible new nodes
for (int i = 0; i < cur->_numbBox; i++) {
if (valid[i] == 1) {
- error = 0; // Failure de-bunked
+ error = 0; // Failure de-bunked
int j = 0;
while (((box[i]._adj[j]) != 1) && (j < cur->_numbBox))
j++;
if (j >= cur->_numbBox)
- valid[i] = 2; // nodo saturated?
+ valid[i] = 2; // nodo saturated?
else {
nextNode[i] = j;
if (nodeCost[i] + 1 < minCost)
@@ -958,7 +947,7 @@ short RMCharacter::findPath(short source, short destination) {
}
if (error)
- finish = true; // All nodes saturated
+ finish = true; // All nodes saturated
// 2nd cycle: adding new nodes that were found, saturate old nodes
for (int i = 0; i < cur->_numbBox; i++) {
@@ -998,7 +987,6 @@ short RMCharacter::findPath(short source, short destination) {
return !error;
}
-
void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1068,7 +1056,6 @@ void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
CORO_END_CODE;
}
-
RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint point) {
short steps;
RMPoint newPt, foundPt;
@@ -1082,9 +1069,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._y--; // to avoid error?
+ newPt._y--; // to avoid error?
foundPt = newPt;
}
}
@@ -1097,9 +1084,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._y++; // to avoid error?
+ newPt._y++; // to avoid error?
foundPt = newPt;
}
}
@@ -1112,9 +1099,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._x++; // to avoid error?
+ newPt._x++; // to avoid error?
foundPt = newPt;
}
}
@@ -1127,9 +1114,9 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
steps++;
}
if ((inWhichBox(newPt) != -1) && (steps < minStep) &&
- findPath(inWhichBox(_pos), inWhichBox(newPt))) {
+ findPath(inWhichBox(_pos), inWhichBox(newPt))) {
minStep = steps;
- newPt._x--; // to avoid error?
+ newPt._x--; // to avoid error?
foundPt = newPt;
}
}
@@ -1140,12 +1127,10 @@ RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
return foundPt;
}
-
RMPoint RMCharacter::nearestPoint(const RMPoint &point) {
return searching(1, 1, 1, 1, point);
}
-
short RMCharacter::scanLine(const RMPoint &point) {
int Ldx, Ldy, Lcount;
float Lfx, Lfy, Lslope;
@@ -1175,7 +1160,7 @@ short RMCharacter::scanLine(const RMPoint &point) {
Lstatus = 0;
}
- Lscan = Lstart; // Start scanning
+ Lscan = Lstart; // Start scanning
while (inWhichBox(Lscan) != -1) {
Lcount++;
if (Lstatus) {
@@ -1200,8 +1185,8 @@ short RMCharacter::scanLine(const RMPoint &point) {
* Calculates intersections between the straight line and the closest BBOX
*/
RMPoint RMCharacter::invScanLine(const RMPoint &point) {
- RMPoint lStart = point; // Exchange!
- RMPoint lEnd = _pos; // :-)
+ RMPoint lStart = point; // Exchange!
+ RMPoint lEnd = _pos; // :-)
int lDx = lStart._x - lEnd._x;
int lDy = lStart._y - lEnd._y;
float lFx = lDx;
@@ -1256,7 +1241,6 @@ RMPoint RMCharacter::invScanLine(const RMPoint &point) {
}
}
-
/**
* Returns the HotSpot coordinate closest to the player
*/
@@ -1510,7 +1494,6 @@ inline int RMCharacter::inWhichBox(const RMPoint &pt) {
return _theBoxes->whichBox(_curLocation, pt);
}
-
void RMCharacter::move(CORO_PARAM, RMPoint pt, bool *result) {
CORO_BEGIN_CONTEXT;
RMPoint dest;
@@ -1807,7 +1790,7 @@ bool RMGameBoxes::isInBox(int nLoc, int nBox, const RMPoint &pt) {
RMBoxLoc *cur = getBoxes(nLoc);
if ((pt._x >= cur->_boxes[nBox]._left) && (pt._x <= cur->_boxes[nBox]._right) &&
- (pt._y >= cur->_boxes[nBox]._top) && (pt._y <= cur->_boxes[nBox]._bottom))
+ (pt._y >= cur->_boxes[nBox]._top) && (pt._y <= cur->_boxes[nBox]._bottom))
return true;
else
return false;
@@ -1822,7 +1805,7 @@ int RMGameBoxes::whichBox(int nLoc, const RMPoint &punto) {
for (int i = 0; i < cur->_numbBox; i++) {
if (cur->_boxes[i]._bActive) {
if ((punto._x >= cur->_boxes[i]._left) && (punto._x <= cur->_boxes[i]._right) &&
- (punto._y >= cur->_boxes[i]._top) && (punto._y <= cur->_boxes[i]._bottom))
+ (punto._y >= cur->_boxes[i]._top) && (punto._y <= cur->_boxes[i]._bottom))
return i;
}
}
@@ -1976,7 +1959,7 @@ bool RMLocation::load(Common::SeekableReadStream &ds) {
_buf->init(ds, dimx, dimy, true);
// Check the size of the location
-// assert(dimy!=512);
+ //assert(dimy!=512);
// Number of objects
_nItems = ds.readSint32LE();
@@ -1994,7 +1977,6 @@ bool RMLocation::load(Common::SeekableReadStream &ds) {
return ds.err();
}
-
bool RMLocation::loadLOX(Common::SeekableReadStream &ds) {
// Version
byte ver = ds.readByte();
@@ -2033,7 +2015,6 @@ bool RMLocation::loadLOX(Common::SeekableReadStream &ds) {
return ds.err();
}
-
/**
* Draw method overloaded from RMGfxSourceBUffer8
*/
@@ -2070,7 +2051,6 @@ void RMLocation::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
CORO_END_CODE;
}
-
/**
* Prepare a frame, adding the location to the OT list, and all the items that have changed animation frame.
*/
@@ -2084,7 +2064,6 @@ void RMLocation::doFrame(RMGfxTargetBuffer *bigBuf) {
_items[i].doFrame(bigBuf);
}
-
RMItem *RMLocation::getItemFromCode(uint32 dwCode) {
for (int i = 0; i < _nItems; i++) {
if (_items[i].mpalCode() == (int)dwCode)
diff --git a/engines/tony/loc.h b/engines/tony/loc.h
index 04ba772458..1306316136 100644
--- a/engines/tony/loc.h
+++ b/engines/tony/loc.h
@@ -49,7 +49,6 @@ typedef enum {
CM_65K
} RMColorMode;
-
/****************************************************************************\
* Class declarations
\****************************************************************************/
@@ -65,7 +64,6 @@ public:
void readFromStream(Common::ReadStream &ds);
};
-
/**
* Sound effect of an object
*/
@@ -87,7 +85,6 @@ public:
void readFromStream(Common::ReadStream &ds, bool bLOX = false);
};
-
/**
* Object pattern
*/
@@ -126,8 +123,8 @@ public:
private:
int _speed;
- RMPoint _pos; // Parent coordinates
- RMPoint _curPos; // Parent + child coordinates
+ RMPoint _pos; // Parent coordinates
+ RMPoint _curPos; // Parent + child coordinates
int _bLoop;
int _nSlots;
int _nCurSlot;
@@ -160,7 +157,6 @@ private:
void updateCoord();
};
-
/**
* Sprite (frame) animation of an item
*/
@@ -185,7 +181,6 @@ public:
void readFromStream(Common::SeekableReadStream &ds, bool bLOX = false);
};
-
/**
* Data on an item
*/
@@ -195,7 +190,7 @@ public:
protected:
int _z;
- RMPoint _pos; // Coordinate ancestor
+ RMPoint _pos; // Coordinate ancestor
RMColorMode _cm;
RMPoint _curScroll;
@@ -285,15 +280,14 @@ protected:
virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
};
-
-#define MAXBOXES 50 // Maximum number of allowed boxes
-#define MAXHOTSPOT 20 // Maximum nimber of allowed hotspots
+#define MAXBOXES 50 // Maximum number of allowed boxes
+#define MAXHOTSPOT 20 // Maximum nimber of allowed hotspots
class RMBox {
public:
struct Hotspot {
- int _hotx, _hoty; // Hotspot coordinates
- int _destination; // Hotspot destination
+ int _hotx, _hoty; // Hotspot coordinates
+ int _destination; // Hotspot destination
};
public:
@@ -309,7 +303,6 @@ public:
void readFromStream(Common::ReadStream &ds);
};
-
class RMBoxLoc {
public:
int _numbBox;
@@ -454,7 +447,6 @@ public:
void setSpeed(int speed);
};
-
class RMWipe : public RMGfxTask {
private:
bool _bFading;
@@ -483,25 +475,24 @@ public:
virtual int priority();
};
-
/**
* Location
*/
class RMLocation : public RMGfxTaskSetPrior {
public:
- Common::String _name; // Name
+ Common::String _name; // Name
private:
- RMColorMode _cmode; // Color mode
- RMGfxSourceBuffer *_buf; // Location picture
+ RMColorMode _cmode; // Color mode
+ RMGfxSourceBuffer *_buf; // Location picture
- int _nItems; // Number of objects
- RMItem *_items; // Objects
+ int _nItems; // Number of objects
+ RMItem *_items; // Objects
- RMPoint _curScroll; // Current scroll position
+ RMPoint _curScroll; // Current scroll position
RMPoint _fixedScroll;
- RMPoint _prevScroll; // Previous scroll position
+ RMPoint _prevScroll; // Previous scroll position
RMPoint _prevFixedScroll;
public:
@@ -552,7 +543,6 @@ public:
void pauseSound(bool bPause);
};
-
/**
* MPAL message, composed of more ASCIIZ
*/
diff --git a/engines/tony/mpal/expr.cpp b/engines/tony/mpal/expr.cpp
index 824cd91651..7dc640ba7c 100644
--- a/engines/tony/mpal/expr.cpp
+++ b/engines/tony/mpal/expr.cpp
@@ -35,7 +35,6 @@ namespace Tony {
namespace MPAL {
-
/**
* Duplicate a mathematical expression.
*
@@ -140,7 +139,6 @@ static void solve(LpExpression one, int num) {
}
}
-
/**
* Calculates the result of a mathematical expression, replacing the current
* value of any variable.
@@ -178,7 +176,6 @@ static int evaluateAndFreeExpression(byte *expr) {
return val;
}
-
/**
* Parses a mathematical expression from the MPC file
*
@@ -249,7 +246,6 @@ const byte *parseExpression(const byte *lpBuf, MpalHandle *h) {
return lpBuf;
}
-
/**
* Calculate the value of a mathamatical expression
*
diff --git a/engines/tony/mpal/expr.h b/engines/tony/mpal/expr.h
index 405624b4fe..256d09bb9b 100644
--- a/engines/tony/mpal/expr.h
+++ b/engines/tony/mpal/expr.h
@@ -70,16 +70,16 @@ namespace MPAL {
* Mathamatical framework to manage operations
*/
typedef struct {
- byte _type; // Object Type (see enum ExprListTypes)
+ byte _type; // Object Type (see enum ExprListTypes)
union {
- int _num; // Identifier (if type == ELT_NUMBER)
- char *_name; // Variable name (if type == ELT_VAR)
- MpalHandle _son; // Handle expressions (if type == ELT_PARENTH)
- byte *_pson; // Handle lockato (if type == ELT_PARENTH2)
+ int _num; // Identifier (if type == ELT_NUMBER)
+ char *_name; // Variable name (if type == ELT_VAR)
+ MpalHandle _son; // Handle expressions (if type == ELT_PARENTH)
+ byte *_pson; // Handle lockato (if type == ELT_PARENTH2)
} _val;
- byte _symbol; // Mathematic symbols (see #define OP_*)
+ byte _symbol; // Mathematic symbols (see #define OP_*)
} Expression;
typedef Expression *LpExpression;
diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp
index 9c45cdf982..4eb84d1406 100644
--- a/engines/tony/mpal/loadmpc.cpp
+++ b/engines/tony/mpal/loadmpc.cpp
@@ -90,7 +90,7 @@ static const byte *ParseScript(const byte *lpBuf, LpMpalScript lpmsScript) {
lpBuf += 4;
break;
- case 2: { // Variable assign
+ case 2: { // Variable assign
int len = *lpBuf;
lpBuf++;
lpmsScript->_command[curCmd]._lpszVarName = (char *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1);
@@ -216,6 +216,7 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
return NULL;
break;
}
+
// Do Choice
case 3:
lpmdDialog->_command[curCmd]._nChoice = READ_LE_UINT16(lpBuf);
@@ -317,7 +318,6 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) {
return lpBuf;
}
-
/**
* Parses an item from the MPC file, and inserts its data into a structure
*
@@ -384,7 +384,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
lpmiItem->_command[curCmd]._type = *lpBuf;
lpBuf++;
switch (lpmiItem->_command[curCmd]._type) {
- case 1: // Call custom function
+ case 1: // Call custom function
lpmiItem->_command[curCmd]._nCf = READ_LE_UINT16(lpBuf);
lpBuf += 2;
lpmiItem->_command[curCmd]._arg1 = (int32)READ_LE_UINT32(lpBuf);
@@ -397,7 +397,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
lpBuf += 4;
break;
- case 2: // Variable assign
+ case 2: // Variable assign
len = *lpBuf;
lpBuf++;
lpmiItem->_command[curCmd]._lpszVarName = (char *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, len + 1);
@@ -498,7 +498,6 @@ static const byte *ParseLocation(const byte *lpBuf, LpMpalLocation lpmlLocation)
return lpBuf;
}
-
/****************************************************************************\
* Exported functions
\****************************************************************************/
@@ -539,7 +538,7 @@ bool parseMpc(const byte *lpBuf) {
GLOBALS._lpmvVars->_dwVal = READ_LE_UINT32(lpBuf);
lpBuf += 4;
- lpBuf++; // Skip 'ext'
+ lpBuf++; // Skip 'ext'
GLOBALS._lpmvVars++;
}
diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp
index 3d0751a5ca..a04a769528 100644
--- a/engines/tony/mpal/lzo.cpp
+++ b/engines/tony/mpal/lzo.cpp
@@ -69,440 +69,440 @@ namespace Tony {
namespace MPAL {
-#define pd(a, b) ((uint32) ((a) - (b)))
+#define pd(a, b) ((uint32) ((a) - (b)))
-#define TEST_IP (ip < ip_end)
-#define TEST_OP 1
-#define NEED_IP(x) ((void) 0)
-#define NEED_OP(x) ((void) 0)
-#define TEST_LB(m_pos) ((void) 0)
+#define TEST_IP (ip < ip_end)
+#define TEST_OP 1
+#define NEED_IP(x) ((void) 0)
+#define NEED_OP(x) ((void) 0)
+#define TEST_LB(m_pos) ((void) 0)
-#define M2_MAX_OFFSET 0x0800
+#define M2_MAX_OFFSET 0x0800
#define LZO1X
/**
* Decompresses an LZO compressed resource
*/
int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) {
- register byte *op;
- register const byte *ip;
- register uint32 t = 0;
+ register byte *op;
+ register const byte *ip;
+ register uint32 t = 0;
#if defined(COPY_DICT)
- uint32 m_off;
- const byte *dict_end;
+ uint32 m_off;
+ const byte *dict_end;
#else
- register const byte *m_pos;
+ register const byte *m_pos;
#endif
- const byte * const ip_end = in + in_len;
+ const byte * const ip_end = in + in_len;
#if defined(HAVE_ANY_OP)
- byte * const op_end = out + *out_len;
+ byte * const op_end = out + *out_len;
#endif
#if defined(LZO1Z)
- uint32 last_m_off = 0;
+ uint32 last_m_off = 0;
#endif
#if defined(COPY_DICT)
- if (dict)
- {
- if (dict_len > M4_MAX_OFFSET)
- {
- dict += dict_len - M4_MAX_OFFSET;
- dict_len = M4_MAX_OFFSET;
- }
- dict_end = dict + dict_len;
- }
- else
- {
- dict_len = 0;
- dict_end = NULL;
- }
-#endif
-
- *out_len = 0;
-
- op = out;
- ip = in;
-
- if (*ip > 17)
- {
- t = *ip++ - 17;
- if (t < 4)
- goto match_next;
- assert(t > 0); NEED_OP(t); NEED_IP(t+1);
- do *op++ = *ip++; while (--t > 0);
- goto first_literal_run;
- }
-
- while (TEST_IP && TEST_OP)
- {
- t = *ip++;
- if (t >= 16)
- goto match;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 15 + *ip++;
- }
- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
+ if (dict)
+ {
+ if (dict_len > M4_MAX_OFFSET)
+ {
+ dict += dict_len - M4_MAX_OFFSET;
+ dict_len = M4_MAX_OFFSET;
+ }
+ dict_end = dict + dict_len;
+ }
+ else
+ {
+ dict_len = 0;
+ dict_end = NULL;
+ }
+#endif
+
+ *out_len = 0;
+
+ op = out;
+ ip = in;
+
+ if (*ip > 17)
+ {
+ t = *ip++ - 17;
+ if (t < 4)
+ goto match_next;
+ assert(t > 0); NEED_OP(t); NEED_IP(t+1);
+ do *op++ = *ip++; while (--t > 0);
+ goto first_literal_run;
+ }
+
+ while (TEST_IP && TEST_OP)
+ {
+ t = *ip++;
+ if (t >= 16)
+ goto match;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 15 + *ip++;
+ }
+ assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- t += 3;
- if (t >= 8) do
- {
- UA_COPY64(op, ip);
- op += 8; ip += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- }
- if (t > 0)
- {
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
- }
+ t += 3;
+ if (t >= 8) do
+ {
+ UA_COPY64(op, ip);
+ op += 8; ip += 8; t -= 8;
+ } while (t >= 8);
+ if (t >= 4)
+ {
+ UA_COPY32(op, ip);
+ op += 4; ip += 4; t -= 4;
+ }
+ if (t > 0)
+ {
+ *op++ = *ip++;
+ if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
+ }
#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
#if !defined(LZO_UNALIGNED_OK_4)
- if (PTR_ALIGNED2_4(op, ip))
- {
-#endif
- UA_COPY32(op, ip);
- op += 4; ip += 4;
- if (--t > 0)
- {
- if (t >= 4)
- {
- do {
- UA_COPY32(op, ip);
- op += 4; ip += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *ip++; while (--t > 0);
- }
- else
- do *op++ = *ip++; while (--t > 0);
- }
+ if (PTR_ALIGNED2_4(op, ip))
+ {
+#endif
+ UA_COPY32(op, ip);
+ op += 4; ip += 4;
+ if (--t > 0)
+ {
+ if (t >= 4)
+ {
+ do {
+ UA_COPY32(op, ip);
+ op += 4; ip += 4; t -= 4;
+ } while (t >= 4);
+ if (t > 0) do *op++ = *ip++; while (--t > 0);
+ }
+ else
+ do *op++ = *ip++; while (--t > 0);
+ }
#if !defined(LZO_UNALIGNED_OK_4)
- }
- else
+ }
+ else
#endif
#endif
#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8)
- {
- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
- do *op++ = *ip++; while (--t > 0);
- }
+ {
+ *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
+ do *op++ = *ip++; while (--t > 0);
+ }
#endif
first_literal_run:
- t = *ip++;
- if (t >= 16)
- goto match;
+ t = *ip++;
+ if (t >= 16)
+ goto match;
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
+ m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
#else
- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
+ m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
#endif
- NEED_OP(3);
- t = 3; COPY_DICT(t, m_off)
+ NEED_OP(3);
+ t = 3; COPY_DICT(t, m_off)
#else
#if defined(LZO1Z)
- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
+ t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
+ m_pos = op - t;
+ last_m_off = t;
#else
- m_pos = op - (1 + M2_MAX_OFFSET);
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
+ m_pos = op - (1 + M2_MAX_OFFSET);
+ m_pos -= t >> 2;
+ m_pos -= *ip++ << 2;
#endif
- TEST_LB(m_pos); NEED_OP(3);
- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
+ TEST_LB(m_pos); NEED_OP(3);
+ *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
#endif
- goto match_done;
+ goto match_done;
- do {
+ do {
match:
- if (t >= 64)
- {
+ if (t >= 64)
+ {
#if defined(COPY_DICT)
#if defined(LZO1X)
- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
- t = (t >> 5) - 1;
+ m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
+ t = (t >> 5) - 1;
#elif defined(LZO1Y)
- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
- t = (t >> 4) - 3;
+ m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
+ t = (t >> 4) - 3;
#elif defined(LZO1Z)
- m_off = t & 0x1f;
- if (m_off >= 0x1c)
- m_off = last_m_off;
- else
- {
- m_off = 1 + (m_off << 6) + (*ip++ >> 2);
- last_m_off = m_off;
- }
- t = (t >> 5) - 1;
+ m_off = t & 0x1f;
+ if (m_off >= 0x1c)
+ m_off = last_m_off;
+ else
+ {
+ m_off = 1 + (m_off << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
+ }
+ t = (t >> 5) - 1;
#endif
#else
#if defined(LZO1X)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 7;
- m_pos -= *ip++ << 3;
- t = (t >> 5) - 1;
+ m_pos = op - 1;
+ m_pos -= (t >> 2) & 7;
+ m_pos -= *ip++ << 3;
+ t = (t >> 5) - 1;
#elif defined(LZO1Y)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 3;
- m_pos -= *ip++ << 2;
- t = (t >> 4) - 3;
+ m_pos = op - 1;
+ m_pos -= (t >> 2) & 3;
+ m_pos -= *ip++ << 2;
+ t = (t >> 4) - 3;
#elif defined(LZO1Z)
- {
- uint32 off = t & 0x1f;
- m_pos = op;
- if (off >= 0x1c)
- {
- assert(last_m_off > 0);
- m_pos -= last_m_off;
- }
- else
- {
- off = 1 + (off << 6) + (*ip++ >> 2);
- m_pos -= off;
- last_m_off = off;
- }
- }
- t = (t >> 5) - 1;
-#endif
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
- goto copy_match;
-#endif
- }
- else if (t >= 32)
- {
- t &= 31;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 31 + *ip++;
- }
+ {
+ uint32 off = t & 0x1f;
+ m_pos = op;
+ if (off >= 0x1c)
+ {
+ assert(last_m_off > 0);
+ m_pos -= last_m_off;
+ }
+ else
+ {
+ off = 1 + (off << 6) + (*ip++ >> 2);
+ m_pos -= off;
+ last_m_off = off;
+ }
+ }
+ t = (t >> 5) - 1;
+#endif
+ TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
+ goto copy_match;
+#endif
+ }
+ else if (t >= 32)
+ {
+ t &= 31;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 31 + *ip++;
+ }
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- last_m_off = m_off;
+ m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
+ last_m_off = m_off;
#else
- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
+ m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
#endif
#else
#if defined(LZO1Z)
- {
- uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- m_pos = op - off;
- last_m_off = off;
- }
+ {
+ uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2);
+ m_pos = op - off;
+ last_m_off = off;
+ }
#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos = op - 1;
- m_pos -= UA_GET16(ip) >> 2;
+ m_pos = op - 1;
+ m_pos -= UA_GET16(ip) >> 2;
#else
- m_pos = op - 1;
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
+ m_pos = op - 1;
+ m_pos -= (ip[0] >> 2) + (ip[1] << 6);
#endif
#endif
- ip += 2;
- }
- else if (t >= 16)
- {
+ ip += 2;
+ }
+ else if (t >= 16)
+ {
#if defined(COPY_DICT)
- m_off = (t & 8) << 11;
+ m_off = (t & 8) << 11;
#else
- m_pos = op;
- m_pos -= (t & 8) << 11;
-#endif
- t &= 7;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 7 + *ip++;
- }
+ m_pos = op;
+ m_pos -= (t & 8) << 11;
+#endif
+ t &= 7;
+ if (t == 0)
+ {
+ NEED_IP(1);
+ while (*ip == 0)
+ {
+ t += 255;
+ ip++;
+ NEED_IP(1);
+ }
+ t += 7 + *ip++;
+ }
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off += (ip[0] << 6) + (ip[1] >> 2);
+ m_off += (ip[0] << 6) + (ip[1] >> 2);
#else
- m_off += (ip[0] >> 2) + (ip[1] << 6);
+ m_off += (ip[0] >> 2) + (ip[1] << 6);
#endif
- ip += 2;
- if (m_off == 0)
- goto eof_found;
- m_off += 0x4000;
+ ip += 2;
+ if (m_off == 0)
+ goto eof_found;
+ m_off += 0x4000;
#if defined(LZO1Z)
- last_m_off = m_off;
+ last_m_off = m_off;
#endif
#else
#if defined(LZO1Z)
- m_pos -= (ip[0] << 6) + (ip[1] >> 2);
+ m_pos -= (ip[0] << 6) + (ip[1] >> 2);
#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos -= UA_GET16(ip) >> 2;
+ m_pos -= UA_GET16(ip) >> 2;
#else
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
+ m_pos -= (ip[0] >> 2) + (ip[1] << 6);
#endif
- ip += 2;
- if (m_pos == op)
- goto eof_found;
- m_pos -= 0x4000;
+ ip += 2;
+ if (m_pos == op)
+ goto eof_found;
+ m_pos -= 0x4000;
#if defined(LZO1Z)
- last_m_off = pd((const byte *)op, m_pos);
+ last_m_off = pd((const byte *)op, m_pos);
#endif
#endif
- }
- else
- {
+ }
+ else
+ {
#if defined(COPY_DICT)
#if defined(LZO1Z)
- m_off = 1 + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
+ m_off = 1 + (t << 6) + (*ip++ >> 2);
+ last_m_off = m_off;
#else
- m_off = 1 + (t >> 2) + (*ip++ << 2);
+ m_off = 1 + (t >> 2) + (*ip++ << 2);
#endif
- NEED_OP(2);
- t = 2; COPY_DICT(t, m_off)
+ NEED_OP(2);
+ t = 2; COPY_DICT(t, m_off)
#else
#if defined(LZO1Z)
- t = 1 + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
+ t = 1 + (t << 6) + (*ip++ >> 2);
+ m_pos = op - t;
+ last_m_off = t;
#else
- m_pos = op - 1;
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
+ m_pos = op - 1;
+ m_pos -= t >> 2;
+ m_pos -= *ip++ << 2;
#endif
- TEST_LB(m_pos); NEED_OP(2);
- *op++ = *m_pos++; *op++ = *m_pos;
+ TEST_LB(m_pos); NEED_OP(2);
+ *op++ = *m_pos++; *op++ = *m_pos;
#endif
- goto match_done;
- }
+ goto match_done;
+ }
#if defined(COPY_DICT)
- NEED_OP(t+3-1);
- t += 3-1; COPY_DICT(t, m_off)
+ NEED_OP(t+3-1);
+ t += 3-1; COPY_DICT(t, m_off)
#else
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
+ TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4)
- if (op - m_pos >= 8)
- {
- t += (3 - 1);
- if (t >= 8) do
- {
- UA_COPY64(op, m_pos);
- op += 8; m_pos += 8; t -= 8;
- } while (t >= 8);
- if (t >= 4)
- {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- }
- if (t > 0)
- {
- *op++ = m_pos[0];
- if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } }
- }
- }
- else
+ if (op - m_pos >= 8)
+ {
+ t += (3 - 1);
+ if (t >= 8) do
+ {
+ UA_COPY64(op, m_pos);
+ op += 8; m_pos += 8; t -= 8;
+ } while (t >= 8);
+ if (t >= 4)
+ {
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4;
+ }
+ if (t > 0)
+ {
+ *op++ = m_pos[0];
+ if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } }
+ }
+ }
+ else
#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
#if !defined(LZO_UNALIGNED_OK_4)
- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos))
- {
- assert((op - m_pos) >= 4);
+ if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos))
+ {
+ assert((op - m_pos) >= 4);
#else
- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
- {
-#endif
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4 - (3 - 1);
- do {
- UA_COPY32(op, m_pos);
- op += 4; m_pos += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *m_pos++; while (--t > 0);
- }
- else
-#endif
- {
+ if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
+ {
+#endif
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4 - (3 - 1);
+ do {
+ UA_COPY32(op, m_pos);
+ op += 4; m_pos += 4; t -= 4;
+ } while (t >= 4);
+ if (t > 0) do *op++ = *m_pos++; while (--t > 0);
+ }
+ else
+#endif
+ {
copy_match:
- *op++ = *m_pos++; *op++ = *m_pos++;
- do *op++ = *m_pos++; while (--t > 0);
- }
+ *op++ = *m_pos++; *op++ = *m_pos++;
+ do *op++ = *m_pos++; while (--t > 0);
+ }
#endif
match_done:
#if defined(LZO1Z)
- t = ip[-1] & 3;
+ t = ip[-1] & 3;
#else
- t = ip[-2] & 3;
+ t = ip[-2] & 3;
#endif
- if (t == 0)
- break;
+ if (t == 0)
+ break;
match_next:
- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
+ assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
#if 0
- do *op++ = *ip++; while (--t > 0);
+ do *op++ = *ip++; while (--t > 0);
#else
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
+ *op++ = *ip++;
+ if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
#endif
- t = *ip++;
- } while (TEST_IP && TEST_OP);
- }
+ t = *ip++;
+ } while (TEST_IP && TEST_OP);
+ }
#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP)
- *out_len = pd(op, out);
- return LZO_E_EOF_NOT_FOUND;
+ *out_len = pd(op, out);
+ return LZO_E_EOF_NOT_FOUND;
#endif
eof_found:
- assert(t == 1);
- *out_len = pd(op, out);
- return (ip == ip_end ? LZO_E_OK :
- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
+ assert(t == 1);
+ *out_len = pd(op, out);
+ return (ip == ip_end ? LZO_E_OK :
+ (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
#if defined(HAVE_NEED_IP)
input_overrun:
- *out_len = pd(op, out);
- return LZO_E_INPUT_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_INPUT_OVERRUN;
#endif
#if defined(HAVE_NEED_OP)
output_overrun:
- *out_len = pd(op, out);
- return LZO_E_OUTPUT_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_OUTPUT_OVERRUN;
#endif
#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
lookbehind_overrun:
- *out_len = pd(op, out);
- return LZO_E_LOOKBEHIND_OVERRUN;
+ *out_len = pd(op, out);
+ return LZO_E_LOOKBEHIND_OVERRUN;
#endif
}
diff --git a/engines/tony/mpal/memory.cpp b/engines/tony/mpal/memory.cpp
index dfbf16e789..9737fe0abf 100644
--- a/engines/tony/mpal/memory.cpp
+++ b/engines/tony/mpal/memory.cpp
@@ -121,7 +121,6 @@ void MemoryManager::unlockItem(MpalHandle handle) {
--item->_lockCount;
}
-
} // end of namespace MPAL
} // end of namespace Tony
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp
index 8d83363c24..fff8676a89 100644
--- a/engines/tony/mpal/mpal.cpp
+++ b/engines/tony/mpal/mpal.cpp
@@ -196,7 +196,6 @@ static int locGetOrderFromNum(uint32 nLoc) {
return -1;
}
-
/**
* Find the index of a message within the messages array
* @param nMsg Message number to search for
@@ -233,7 +232,6 @@ static int itemGetOrderFromNum(uint32 nItem) {
return -1;
}
-
/**
* Find the index of a script within the scripts array
* @param nScript Script number to search for
@@ -252,7 +250,6 @@ static int scriptGetOrderFromNum(uint32 nScript) {
return -1;
}
-
/**
* Find the index of a dialog within the dialogs array
* @param nDialog Dialog number to search for
@@ -271,7 +268,6 @@ static int dialogGetOrderFromNum(uint32 nDialog) {
return -1;
}
-
/**
* Duplicates a message
* @param nMsgOrd Index of the message inside the messages array
@@ -302,7 +298,6 @@ static char *DuplicateMessage(uint32 nMsgOrd) {
return clonemsg;
}
-
/**
* Duplicate a sentence of a dialog
* @param nDlgOrd Index of the dialog in the dialogs array
@@ -340,7 +335,6 @@ static char *duplicateDialogPeriod(uint32 nPeriod) {
return NULL;
}
-
/**
* Load a resource from the MPR file
*
@@ -461,16 +455,16 @@ static LpItem getItemData(uint32 nOrdItem) {
dat = (char *)globalLock(hDat);
if (dat[0] == 'D' && dat[1] == 'A' && dat[2] == 'T') {
- int i = dat[3]; // For version 1.0!!
+ int i = dat[3]; // For version 1.0!!
dat += 4;
- if (i >= 0x10) { // From 1.0, there's a destination point for each object
+ if (i >= 0x10) { // From 1.0, there's a destination point for each object
ret->_destX = (int16)READ_LE_UINT16(dat);
ret->_destY = (int16)READ_LE_UINT16(dat + 2);
dat += 4;
}
- if (i >= 0x11) { // From 1.1, there's animation speed
+ if (i >= 0x11) { // From 1.1, there's animation speed
ret->_speed = READ_LE_UINT16(dat);
dat += 2;
} else
@@ -511,7 +505,7 @@ static LpItem getItemData(uint32 nOrdItem) {
for (int i = 1; i < ret->_numpattern; i++) {
for (int j = 0; j < patlength[i]; j++)
ret->_pattern[i][j] = dat[j];
- ret->_pattern[i][(int)patlength[i]] = 255; // Terminate pattern
+ ret->_pattern[i][(int)patlength[i]] = 255; // Terminate pattern
dat += patlength[i];
}
@@ -527,18 +521,18 @@ static LpItem getItemData(uint32 nOrdItem) {
dat += dim;
}
- // Check if we've got to the end of the file
int i = READ_LE_UINT16(dat);
- if (i != 0xABCD)
- return NULL;
globalUnlock(hDat);
globalFree(hDat);
+ // Check if we've got to the end of the file
+ if (i != 0xABCD)
+ return NULL;
+
return ret;
}
-
/**
* Thread that calls a custom function. It is used in scripts, so that each script
* function is executed without delaying the others.
@@ -562,7 +556,6 @@ void CustomThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Main process for running a script.
*
@@ -587,7 +580,7 @@ void ScriptThread(CORO_PARAM, const void *param) {
_ctx->dwStartTime = g_vm->getTime();
_ctx->numHandles = 0;
-// debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Moments: %u\n", s->_nMoments);
+ //debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Moments: %u\n", s->_nMoments);
for (_ctx->i = 0; _ctx->i < s->_nMoments; _ctx->i++) {
// Sleep for the required time
if (s->_moment[_ctx->i]._dwTime == -1) {
@@ -596,7 +589,7 @@ void ScriptThread(CORO_PARAM, const void *param) {
} else {
_ctx->dwCurTime = g_vm->getTime();
if (_ctx->dwCurTime < _ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime * 100)) {
- // debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Sleeping %lums\n",_ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime*100) - _ctx->dwCurTime);
+ //debugC(DEBUG_BASIC, kTonyDebugMPAL, "PlayScript(): Sleeping %lums\n",_ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime*100) - _ctx->dwCurTime);
CORO_INVOKE_1(CoroScheduler.sleep, _ctx->dwStartTime + (s->_moment[_ctx->i]._dwTime * 100) - _ctx->dwCurTime);
}
}
@@ -655,7 +648,6 @@ void ScriptThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Thread that performs an action on an item. the thread always executes the action,
* so it should create a new item in which the action is the one required.
@@ -752,11 +744,9 @@ void ShutUpActionThread(CORO_PARAM, const void *param) {
CORO_INVOKE_1(g_vm->loadState, _ctx->slotNumber);
}
-
CORO_END_CODE;
}
-
/**
* Polls one location (starting point of a process)
*
@@ -764,14 +754,14 @@ void ShutUpActionThread(CORO_PARAM, const void *param) {
*/
void LocationPollThread(CORO_PARAM, const void *param) {
typedef struct {
- uint32 _nItem, _nAction;
+ uint32 _nItem, _nAction;
- uint16 _wTime;
- byte _perc;
+ uint16 _wTime;
+ byte _perc;
MpalHandle _when;
- byte _nCmds;
- uint16 _cmdNum[MAX_COMMANDS_PER_ACTION];
- uint32 _dwLastTime;
+ byte _nCmds;
+ uint16 _cmdNum[MAX_COMMANDS_PER_ACTION];
+ uint32 _dwLastTime;
} MYACTION;
typedef struct {
@@ -862,7 +852,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
return;
}
-
// We have established that there is at least one item that contains idle actions.
// Now we created the mirrored copies of the idle actions.
_ctx->myActions = (MYACTION *)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, _ctx->nIdleActions * sizeof(MYACTION));
@@ -905,7 +894,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
// We don't need the item list anymore
globalDestroy(_ctx->il);
-
// Here's the main loop
while (1) {
// Searching for idle actions requiring time to execute
@@ -944,7 +932,7 @@ void LocationPollThread(CORO_PARAM, const void *param) {
if (_ctx->curTime >= _ctx->myActions[_ctx->k]._dwLastTime + _ctx->myActions[_ctx->k]._wTime) {
_ctx->myActions[_ctx->k]._dwLastTime += _ctx->myActions[_ctx->k]._wTime;
- // It's time to check to see if fortune is on the side of the idle action
+ // It's time to check to see if fortune is on the side of the idle action
byte randomVal = (byte)g_vm->_randomSource.getRandomNumber(99);
if (randomVal < _ctx->myActions[_ctx->k]._perc) {
// Check if there is an action running on the item
@@ -1016,7 +1004,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
}
}
-
// Set idle skip on
CORO_INVOKE_4(GLOBALS._lplpFunctions[200], 0, 0, 0, 0);
@@ -1038,7 +1025,6 @@ void LocationPollThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Wait for the end of the dialog execution thread, and then restore global
* variables indicating that the dialogue has finished.
@@ -1071,7 +1057,6 @@ void ShutUpDialogThread(CORO_PARAM, const void *param) {
void doChoice(CORO_PARAM, uint32 nChoice);
-
/**
* Executes a group of the current dialog. Can 'be the Starting point of a process.
* @parm nGroup Number of the group to perform
@@ -1149,7 +1134,6 @@ void GroupThread(CORO_PARAM, const void *param) {
CORO_END_CODE;
}
-
/**
* Make a choice in the current dialog.
*
@@ -1247,7 +1231,6 @@ void doChoice(CORO_PARAM, uint32 nChoice) {
CORO_END_CODE;
}
-
/**
* Perform an action on a certain item.
*
@@ -1353,7 +1336,6 @@ static uint32 doDialog(uint32 nDlgOrd, uint32 nGroup) {
return h;
}
-
/**
* Takes note of the selection chosen by the user, and warns the process that was running
* the box that it can continue.
@@ -1379,7 +1361,6 @@ bool doSelection(uint32 i, uint32 dwData) {
return true;
}
-
/**
* @defgroup Exported functions
*/
@@ -1502,6 +1483,8 @@ bool mpalInit(const char *lpszMpcFileName, const char *lpszMprFileName,
lzo1x_decompress((const byte *)cmpbuf, dwSizeComp, (byte *)GLOBALS._lpResources, (uint32 *)&nBytesRead);
if (nBytesRead != (uint32)GLOBALS._nResources * 8)
return false;
+ for (int i = 0; i < 2*GLOBALS._nResources; ++i)
+ GLOBALS._lpResources[i] = FROM_LE_32(GLOBALS._lpResources[i]);
globalDestroy(cmpbuf);
@@ -1884,7 +1867,6 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
return hRet;
}
-
/**
* This is a general function to communicate with the library, to request information
* about what is in the .MPC file
@@ -1894,14 +1876,11 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) {
* @remarks This is the specialised version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
-void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet, ...) {
+void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet) {
CORO_BEGIN_CONTEXT;
uint32 dwRet;
CORO_END_CONTEXT(_ctx);
- va_list v;
- va_start(v, dwRet);
-
CORO_BEGIN_CODE(_ctx);
if (wQueryType == MPQ_DIALOG_WAITFORCHOICE) {
@@ -1927,8 +1906,6 @@ void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet, ...) {
}
CORO_END_CODE;
-
- va_end(v);
}
/**
@@ -2005,7 +1982,6 @@ bool mpalStartIdlePoll(int nLoc) {
return false;
}
-
/**
* Stop processing the idle actions of the items on one location.
*
@@ -2063,7 +2039,6 @@ void mpalSaveState(byte *buf) {
unlockVar();
}
-
/**
* Load a save state from a buffer.
*
diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h
index 5e1b02b3fc..2d22ee8faf 100644
--- a/engines/tony/mpal/mpal.h
+++ b/engines/tony/mpal/mpal.h
@@ -26,7 +26,6 @@
* Copyright (c) 1997-2003 Nayma Software
*/
-
/****************************************************************************\
* General Introduction
\****************************************************************************/
@@ -56,7 +55,6 @@
*
*/
-
/****************************************************************************\
* Custom Functions
\****************************************************************************/
@@ -96,11 +94,11 @@ namespace MPAL {
\****************************************************************************/
// OK value for the error codes
-#define OK 0
+#define OK 0
-#define MAXFRAMES 400 // frame animation of an object
-#define MAXPATTERN 40 // pattern of animation of an object
-#define MAXPOLLINGLOCATIONS 64
+#define MAXFRAMES 400 // frame animation of an object
+#define MAXPATTERN 40 // pattern of animation of an object
+#define MAXPOLLINGLOCATIONS 64
#define GETARG(type) va_arg(v, type)
@@ -108,8 +106,8 @@ namespace MPAL {
* Macro for use with queries that may refer to X and Y co-ordinates
*/
enum QueryCoordinates {
- MPQ_X,
- MPQ_Y
+ MPQ_X,
+ MPQ_Y
};
/**
@@ -117,55 +115,54 @@ enum QueryCoordinates {
* that can do at the library
*/
enum QueryTypes {
- // General Query
- MPQ_VERSION = 10,
-
- MPQ_GLOBAL_VAR = 50,
- MPQ_RESOURCE,
- MPQ_MESSAGE,
-
- // Query on leases
- MPQ_LOCATION_IMAGE = 100,
- MPQ_LOCATION_SIZE,
-
- // Queries about items
- MPQ_ITEM_LIST = 200,
- MPQ_ITEM_DATA,
- MPQ_ITEM_PATTERN,
- MPQ_ITEM_NAME,
+ // General Query
+ MPQ_VERSION = 10,
+
+ MPQ_GLOBAL_VAR = 50,
+ MPQ_RESOURCE,
+ MPQ_MESSAGE,
+
+ // Query on leases
+ MPQ_LOCATION_IMAGE = 100,
+ MPQ_LOCATION_SIZE,
+
+ // Queries about items
+ MPQ_ITEM_LIST = 200,
+ MPQ_ITEM_DATA,
+ MPQ_ITEM_PATTERN,
+ MPQ_ITEM_NAME,
MPQ_ITEM_IS_ACTIVE,
- // Query dialog
- MPQ_DIALOG_PERIOD = 300,
- MPQ_DIALOG_WAITFORCHOICE,
- MPQ_DIALOG_SELECTLIST,
- MPQ_DIALOG_SELECTION,
+ // Query dialog
+ MPQ_DIALOG_PERIOD = 300,
+ MPQ_DIALOG_WAITFORCHOICE,
+ MPQ_DIALOG_SELECTLIST,
+ MPQ_DIALOG_SELECTION,
- // Query execution
- MPQ_DO_ACTION = 400,
- MPQ_DO_DIALOG
+ // Query execution
+ MPQ_DO_ACTION = 400,
+ MPQ_DO_DIALOG
};
/**
* Framework to manage the animation of an item
*/
typedef struct {
- char *_frames[MAXFRAMES];
- Common::Rect _frameslocations[MAXFRAMES];
- Common::Rect _bbox[MAXFRAMES];
- short _pattern[MAXPATTERN][MAXFRAMES];
- short _speed;
- char _numframe;
- char _numpattern;
- char _curframe;
- char _curpattern;
- short _destX, _destY;
- signed char _destZ;
- short _objectID;
+ char *_frames[MAXFRAMES];
+ Common::Rect _frameslocations[MAXFRAMES];
+ Common::Rect _bbox[MAXFRAMES];
+ short _pattern[MAXPATTERN][MAXFRAMES];
+ short _speed;
+ char _numframe;
+ char _numpattern;
+ char _curframe;
+ char _curpattern;
+ short _destX, _destY;
+ signed char _destZ;
+ short _objectID;
} Item;
typedef Item *LpItem;
-
/**
* Define a custom function, to use the language MPAL to perform various controls as a result of an action
*/
@@ -206,7 +203,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryGlobalVar(lpszVarName) \
mpalQueryDWORD(MPQ_GLOBAL_VAR, (const char *)(lpszVarName))
-
/**
* Provides access to a resource inside the .MPC file
*
@@ -216,7 +212,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryResource(dwResId) \
mpalQueryHANDLE(MPQ_RESOURCE, (uint32)(dwResId))
-
/**
* Returns a message.
*
@@ -228,7 +223,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryMessage(nMsg) \
(char *)mpalQueryHANDLE(MPQ_MESSAGE, (uint32)(nMsg))
-
/**
* Provides a location image
* @return Returns a picture handle
@@ -236,7 +230,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryLocationImage(nLoc) \
mpalQueryHANDLE(MPQ_LOCATION_IMAGE, (uint32)(nLoc))
-
/**
* Request the x or y size of a location in pixels
*
@@ -247,7 +240,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryLocationSize(nLoc, dwCoord) \
mpalQueryDWORD(MPQ_LOCATION_SIZE, (uint32)(nLoc), (uint32)(dwCoord))
-
/**
* Provides the list of objects in a location.
*
@@ -258,7 +250,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemList(nLoc) \
(uint32 *)mpalQueryHANDLE(MPQ_ITEM_LIST, (uint32)(nLoc))
-
/**
* Provides information on an item
*
@@ -268,7 +259,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemData(nItem) \
(LpItem)mpalQueryHANDLE(MPQ_ITEM_DATA, (uint32)(nItem))
-
/**
* Provides the current pattern of an item
*
@@ -279,7 +269,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemPattern(nItem) \
mpalQueryDWORD(MPQ_ITEM_PATTERN, (uint32)(nItem))
-
/**
* Returns true if an item is active
*
@@ -289,7 +278,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemIsActive(nItem) \
(bool)mpalQueryDWORD(MPQ_ITEM_IS_ACTIVE, (uint32)(nItem))
-
/**
* Returns the name of an item
*
@@ -302,7 +290,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryItemName(nItem, lpszName) \
mpalQueryHANDLE(MPQ_ITEM_NAME, (uint32)(nItem), (char *)(lpszName))
-
/**
* Returns a sentence of dialog.
*
@@ -316,7 +303,6 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
#define mpalQueryDialogPeriod(nPeriod) \
(char *)mpalQueryHANDLE(MPQ_DIALOG_PERIOD, (uint32)(nPeriod))
-
/**
* Wait until the moment in which the need is signaled to make a choice by the user.
* @returns Number of choice to be made, or -1 if the dialogue is finished.
@@ -393,7 +379,7 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION;
* @returns TRUE if all OK, FALSE on failure
*/
bool mpalInit(const char *lpszFileName, const char *lpszMprFileName,
- LPLPCUSTOMFUNCTION lplpcfArray, Common::String *lpcfStrings);
+ LPLPCUSTOMFUNCTION lplpcfArray, Common::String *lpcfStrings);
/**
* Frees resources allocated by the MPAL subsystem
@@ -431,7 +417,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...);
* @remarks This is the specialised version of the original single mpalQuery
* method that needs to run within a co-routine context.
*/
-void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet, ...);
+void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet);
/**
* Execute a script. The script runs on multitasking by a thread.
@@ -476,7 +462,6 @@ bool mpalStartIdlePoll(int nLoc);
*/
void mpalEndIdlePoll(CORO_PARAM, int nLoc, bool *result);
-
/**
* Load a save state from a buffer.
*
diff --git a/engines/tony/mpal/mpaldll.h b/engines/tony/mpal/mpaldll.h
index 8897096f51..92ddf8fc5a 100644
--- a/engines/tony/mpal/mpaldll.h
+++ b/engines/tony/mpal/mpaldll.h
@@ -73,7 +73,7 @@ namespace MPAL {
* MPAL global variables
*/
struct MpalVar {
- uint32 _dwVal; // Variable value
+ uint32 _dwVal; // Variable value
char _lpszVarName[33]; // Variable name
} PACKED_STRUCT;
typedef MpalVar *LpMpalVar;
@@ -82,8 +82,8 @@ typedef MpalVar *LpMpalVar;
* MPAL Messages
*/
struct MpalMsg {
- MpalHandle _hText; // Handle to the message text
- uint16 _wNum; // Message number
+ MpalHandle _hText; // Handle to the message text
+ uint16 _wNum; // Message number
} PACKED_STRUCT;
typedef MpalMsg *LpMpalMsg;
@@ -91,9 +91,9 @@ typedef MpalMsg *LpMpalMsg;
* MPAL Locations
*/
struct MpalLocation {
- uint32 _nObj; // Location number
- uint32 _dwXlen, _dwYlen; // Dimensions
- uint32 _dwPicRes; // Resource that contains the image
+ uint32 _nObj; // Location number
+ uint32 _dwXlen, _dwYlen; // Dimensions
+ uint32 _dwPicRes; // Resource that contains the image
} PACKED_STRUCT;
typedef MpalLocation *LpMpalLocation;
@@ -110,34 +110,33 @@ struct Command {
* #3 -> Making a choice (DIALOG)
*
*/
- byte _type; // Type of control
+ byte _type; // Type of control
union {
- int32 _nCf; // Custom function call [#1]
- char *_lpszVarName; // Variable name [#2]
- int32 _nChoice; // Number of choice you make [#3]
+ int32 _nCf; // Custom function call [#1]
+ char *_lpszVarName; // Variable name [#2]
+ int32 _nChoice; // Number of choice you make [#3]
};
union {
- int32 _arg1; // Argument for custom function [#1]
- MpalHandle _expr; // Expression to assign to a variable [#2]
+ int32 _arg1; // Argument for custom function [#1]
+ MpalHandle _expr; // Expression to assign to a variable [#2]
};
- int32 _arg2, _arg3, _arg4; // Arguments for custom function [#1]
+ int32 _arg2, _arg3, _arg4; // Arguments for custom function [#1]
} PACKED_STRUCT;
-
/**
* MPAL dialog
*/
struct MpalDialog {
- uint32 _nObj; // Dialog number
+ uint32 _nObj; // Dialog number
struct Command _command[MAX_COMMANDS_PER_DIALOG];
struct {
uint16 _num;
- byte _nCmds;
+ byte _nCmds;
uint16 _cmdNum[MAX_COMMANDS_PER_GROUP];
} _group[MAX_GROUPS_PER_DIALOG];
@@ -152,7 +151,7 @@ struct MpalDialog {
uint32 _dwData;
uint16 _wPlayGroup[MAX_PLAYGROUPS_PER_SELECT];
- // Bit 0=endchoice Bit 1=enddialog
+ // Bit 0=endchoice Bit 1=enddialog
byte _attr;
// Modified at run-time: 0 if the select is currently disabled,
@@ -172,23 +171,22 @@ typedef MpalDialog *LpMpalDialog;
* MPAL Item
*/
struct ItemAction {
- byte _num; // Action number
- uint16 _wTime; // If idle, the time which must pass
- byte _perc; // Percentage of the idle run
- MpalHandle _when; // Expression to compute. If != 0, then
- // action can be done
- uint16 _wParm; // Parameter for action
-
- byte _nCmds; // Number of commands to be executed
- uint32 _cmdNum[MAX_COMMANDS_PER_ACTION]; // Commands to execute
+ byte _num; // Action number
+ uint16 _wTime; // If idle, the time which must pass
+ byte _perc; // Percentage of the idle run
+ MpalHandle _when; // Expression to compute. If != 0, then action can be done
+ uint16 _wParm; // Parameter for action
+
+ byte _nCmds; // Number of commands to be executed
+ uint32 _cmdNum[MAX_COMMANDS_PER_ACTION]; // Commands to execute
} PACKED_STRUCT;
struct MpalItem {
- uint32 _nObj; // Item number
+ uint32 _nObj; // Item number
byte _lpszDescribe[MAX_DESCRIBE_SIZE]; // Name
- byte _nActions; // Number of managed actions
- uint32 _dwRes; // Resource that contains frames and patterns
+ byte _nActions; // Number of managed actions
+ uint32 _dwRes; // Resource that contains frames and patterns
struct Command _command[MAX_COMMANDS_PER_ITEM];
@@ -209,14 +207,14 @@ struct MpalScript {
struct Command _command[MAX_COMMANDS_PER_SCRIPT];
struct {
- int32 _dwTime;
- byte _nCmds;
+ int32 _dwTime;
+ byte _nCmds;
uint32 _cmdNum[MAX_COMMANDS_PER_MOMENT];
} _moment[MAX_MOMENTS_PER_SCRIPT];
} PACKED_STRUCT;
-typedef MpalScript *LpMpalScript;
+typedef MpalScript *LpMpalScript;
#include "common/pack-end.h"
@@ -235,7 +233,6 @@ typedef MpalScript *LpMpalScript;
*/
extern int32 varGetValue(const char *lpszVarName);
-
/**
* Sets the value of a MPAL global variable
* @param lpszVarName Name of the variable
diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h
index d92bb6f9a2..f351f22196 100644
--- a/engines/tony/mpal/mpalutils.h
+++ b/engines/tony/mpal/mpalutils.h
@@ -38,19 +38,19 @@ namespace MPAL {
class RMRes {
protected:
MpalHandle _h;
- byte *_buf;
+ byte *_buf;
public:
RMRes(uint32 resID);
- virtual ~RMRes();
+ virtual ~RMRes();
- // Attributes
+ // Attributes
unsigned int size();
- const byte *dataPointer();
+ const byte *dataPointer();
bool isValid();
- // Casting for access to data
- operator const byte*();
+ // Casting for access to data
+ operator const byte*();
Common::SeekableReadStream *getReadStream();
};
diff --git a/engines/tony/resid.h b/engines/tony/resid.h
index f4d2c9a4fa..0d601b7dd6 100644
--- a/engines/tony/resid.h
+++ b/engines/tony/resid.h
@@ -30,7 +30,6 @@
#ifndef TONY_RESID_H
#define TONY_RESID_H
-
#define RES_I_INTERFACE 10300
#define RES_I_INTERPAL 10301
#define RES_I_INTERPPAL 10302
@@ -40,16 +39,16 @@
#define RES_I_INTERP4 10306
#define RES_I_INTERP5 10307
-#define RES_I_DLGTEXT 10350
+#define RES_I_DLGTEXT 10350
#define RES_I_DLGTEXTLINE 10351
-#define RES_I_DLGTEXTPAL 10352
+#define RES_I_DLGTEXTPAL 10352
#define RES_I_MINIINTER 10360
-#define RES_P_PAL 10410
-#define RES_P_GO 10400
+#define RES_P_PAL 10410
+#define RES_P_GO 10400
#define RES_P_TAKE 10401
-#define RES_P_USE 10402
+#define RES_P_USE 10402
#define RES_P_EXAM 10403
#define RES_P_TALK 10404
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index 2844e0d925..90ae241db0 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -36,6 +36,19 @@
namespace Tony {
+/*
+ * Tony uses a [0,63] volume scale (where 0 is silent and 63 is loudest).
+ * The original game engine linearly mapped this scale into DirectSound's
+ * [-10000, 0] scale (where -10000 is silent), which is a logarithmic scale.
+ *
+ * This means that Tony's scale is logarithmic as well, and must be converted
+ * to the linear scale used by the mixer.
+ */
+static int remapVolume(int volume) {
+ double dsvol = (double)(63 - volume) * -10000.0 / 63.0;
+ return (int)((double)Audio::Mixer::kMaxChannelVolume * pow(10.0, dsvol / 2000.0) + 0.5);
+}
+
/****************************************************************************\
* FPSOUND Methods
\****************************************************************************/
@@ -62,7 +75,6 @@ bool FPSound::init() {
* Destroy the object and free the memory
*
*/
-
FPSound::~FPSound() {
}
@@ -73,7 +85,6 @@ FPSound::~FPSound() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createStream(FPStream **streamPtr) {
(*streamPtr) = new FPStream(_soundSupported);
@@ -87,7 +98,6 @@ bool FPSound::createStream(FPStream **streamPtr) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSound::createSfx(FPSfx **sfxPtr) {
(*sfxPtr) = new FPSfx(_soundSupported);
@@ -99,11 +109,13 @@ bool FPSound::createSfx(FPSfx **sfxPtr) {
*
* @param volume Volume to set (0-63)
*/
-
void FPSound::setMasterVolume(int volume) {
if (!_soundSupported)
return;
+ // WORKAROUND: We don't use remapVolume() here, so that the main option screen exposes
+ // a linear scale to the user. This is an improvement over the original game
+ // where the user had to deal with a logarithmic volume scale.
g_system->getMixer()->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, CLIP<int>(volume, 0, 63) * Audio::Mixer::kMaxChannelVolume / 63);
}
@@ -112,7 +124,6 @@ void FPSound::setMasterVolume(int volume) {
*
* @param volumePtr Variable that will contain the volume (0-63)
*/
-
void FPSound::getMasterVolume(int *volumePtr) {
if (!_soundSupported)
return;
@@ -127,7 +138,6 @@ void FPSound::getMasterVolume(int *volumePtr) {
* create it using FPSound::CreateSfx()
*
*/
-
FPSfx::FPSfx(bool soundOn) {
_soundSupported = soundOn;
_fileLoaded = false;
@@ -148,7 +158,6 @@ FPSfx::FPSfx(bool soundOn) {
* currently played, and free the memory it uses.
*
*/
-
FPSfx::~FPSfx() {
if (!_soundSupported)
return;
@@ -173,7 +182,6 @@ FPSfx::~FPSfx() {
* FPSound::CreateStream().
* Object pointers are no longer valid after this call.
*/
-
void FPSfx::release() {
delete this;
}
@@ -215,7 +223,6 @@ bool FPSfx::loadVoiceFromVDB(Common::File &vdbFP) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::loadFile(const char *fileName, uint32 codec) {
if (!_soundSupported)
return true;
@@ -256,7 +263,6 @@ bool FPSfx::loadFile(const char *fileName, uint32 codec) {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::play() {
stop(); // sanity check
@@ -291,7 +297,6 @@ bool FPSfx::play() {
*
* @returns True is everything is OK, False otherwise
*/
-
bool FPSfx::stop() {
if (_fileLoaded) {
g_system->getMixer()->stopHandle(_handle);
@@ -310,7 +315,6 @@ bool FPSfx::stop() {
* playing. Any changes made during the play will have
* no effect until the sfx is stopped then played again.
*/
-
void FPSfx::setLoop(bool loop) {
_loop = loop;
}
@@ -319,7 +323,6 @@ void FPSfx::setLoop(bool loop) {
* Pauses a Sfx.
*
*/
-
void FPSfx::setPause(bool pause) {
if (_fileLoaded) {
if (g_system->getMixer()->isSoundHandleActive(_handle) && (pause ^ _paused))
@@ -335,7 +338,6 @@ void FPSfx::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPSfx::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -364,7 +366,7 @@ void FPSfx::setVolume(int volume) {
}
if (g_system->getMixer()->isSoundHandleActive(_handle))
- g_system->getMixer()->setChannelVolume(_handle, volume * Audio::Mixer::kMaxChannelVolume / 63);
+ g_system->getMixer()->setChannelVolume(_handle, remapVolume(volume));
}
/**
@@ -373,10 +375,9 @@ void FPSfx::setVolume(int volume) {
* @param volumePtr Will contain the current Sfx volume
*
*/
-
void FPSfx::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
- *volumePtr = g_system->getMixer()->getChannelVolume(_handle) * 63 / Audio::Mixer::kMaxChannelVolume;
+ *volumePtr = _lastVolume;
else
*volumePtr = 0;
}
@@ -384,7 +385,6 @@ void FPSfx::getVolume(int *volumePtr) {
/**
* Returns true if the underlying sound has ended
*/
-
bool FPSfx::endOfBuffer() const {
return !g_system->getMixer()->isSoundHandleActive(_handle) && (!_rewindableStream || _rewindableStream->endOfData());
}
@@ -440,7 +440,6 @@ FPStream::FPStream(bool soundOn) {
*
* @remarks It calls CloseFile() if needed.
*/
-
FPStream::~FPStream() {
if (!_soundSupported)
return;
@@ -489,6 +488,7 @@ bool FPStream::loadFile(const Common::String &fileName, uint32 codec, int bufSiz
// Fallback: try with an extra '0' prefix
if (!_file.open("0" + fileName))
return false;
+ warning("FPStream::loadFile(): Fallback from %s to %s", fileName.c_str(), _file.getName());
}
// Save the size of the stream
@@ -582,7 +582,6 @@ bool FPStream::play() {
* @returns True is everything is OK, False otherwise
*
*/
-
bool FPStream::stop() {
if (!_soundSupported)
return true;
@@ -649,7 +648,6 @@ void FPStream::setPause(bool pause) {
* @param volume Volume to be set (0-63)
*
*/
-
void FPStream::setVolume(int volume) {
if (volume > 63)
volume = 63;
@@ -668,7 +666,7 @@ void FPStream::setVolume(int volume) {
}
if (g_system->getMixer()->isSoundHandleActive(_handle))
- g_system->getMixer()->setChannelVolume(_handle, volume * Audio::Mixer::kMaxChannelVolume / 63);
+ g_system->getMixer()->setChannelVolume(_handle, remapVolume(volume));
}
/**
@@ -677,10 +675,9 @@ void FPStream::setVolume(int volume) {
* @param volumePtr Variable that will contain the current volume
*
*/
-
void FPStream::getVolume(int *volumePtr) {
if (g_system->getMixer()->isSoundHandleActive(_handle))
- *volumePtr = g_system->getMixer()->getChannelVolume(_handle) * 63 / Audio::Mixer::kMaxChannelVolume;
+ *volumePtr = _lastVolume;
else
*volumePtr = 0;
}
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index 1c63096e92..43a2f639d9 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -55,6 +55,7 @@ TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Eng
SearchMan.addSubDirectoryMatching(gameDataDir, "Roasted");
SearchMan.addSubDirectoryMatching(gameDataDir, "Music");
SearchMan.addSubDirectoryMatching(gameDataDir, "Music/utilsfx");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Music/Layer");
// Set up load slot number
_initialLoadSlotNumber = -1;
@@ -731,6 +732,7 @@ uint32 TonyEngine::getTime() {
bool TonyEngine::canLoadGameStateCurrently() {
return GLOBALS._gfxEngine != NULL && GLOBALS._gfxEngine->canLoadSave();
}
+
bool TonyEngine::canSaveGameStateCurrently() {
return GLOBALS._gfxEngine != NULL && GLOBALS._gfxEngine->canLoadSave();
}
diff --git a/engines/tony/tony.h b/engines/tony/tony.h
index 332b122923..750673061d 100644
--- a/engines/tony/tony.h
+++ b/engines/tony/tony.h
@@ -69,7 +69,7 @@ enum {
struct TonyGameDescription;
-#define MAX_SFX_CHANNELS 32
+#define MAX_SFX_CHANNELS 32
#define TONY_DAT_VER_MAJ 0
#define TONY_DAT_VER_MIN 3
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index c7fa1e4a7b..46c018728e 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -120,7 +120,7 @@ void RMTony::init() {
void RMTony::close() {
// Deallocation of missing item
-// _shadow.destroy();
+ //_shadow.destroy();
}
void RMTony::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
@@ -165,7 +165,6 @@ void RMTony::hide(bool bShowShadow) {
_bShowShadow = bShowShadow;
}
-
void RMTony::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -231,7 +230,6 @@ void RMTony::moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction,
CORO_END_CODE;
}
-
void RMTony::executeAction(int nAction, int nActionItem, int nParm) {
uint32 pid;
@@ -281,7 +279,6 @@ void RMTony::executeAction(int nAction, int nActionItem, int nParm) {
}
}
-
void RMTony::stopNoAction(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -332,7 +329,6 @@ void RMTony::stop(CORO_PARAM) {
CORO_END_CODE;
}
-
int RMTony::getCurPattern() {
int nPatt = RMCharacter::getCurPattern();
@@ -394,7 +390,6 @@ void RMTony::setPattern(int nPatt, bool bPlayP0) {
RMCharacter::setPattern(nPatt, bPlayP0);
}
-
void RMTony::take(int nWhere, int nPart) {
if (nPart == 0) {
switch (getCurPattern()) {
@@ -469,7 +464,6 @@ void RMTony::take(int nWhere, int nPart) {
}
}
-
void RMTony::put(int nWhere, int nPart) {
if (nPart == 0) {
switch (getCurPattern()) {
@@ -543,7 +537,6 @@ void RMTony::put(int nWhere, int nPart) {
}
}
-
bool RMTony::startTalkCalculate(CharacterTalkType nTalkType, int &headStartPat, int &bodyStartPat,
int &headLoopPat, int &bodyLoopPat) {
assert(!_bIsTalking);
@@ -1132,7 +1125,6 @@ void RMTony::startTalk(CORO_PARAM, CharacterTalkType nTalkType) {
CORO_END_CODE;
}
-
bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic) {
bodyEndPat = 0;
headEndPat = 0;
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index c9c450424f..61497a8066 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -35,7 +35,6 @@
namespace Tony {
-
/****************************************************************************\
* RMWindow Methods
\****************************************************************************/
@@ -111,7 +110,7 @@ void RMWindow::repaint() {
*/
void RMWindow::wipeEffect(Common::Rect &rcBoundEllipse) {
if ((rcBoundEllipse.left == 0) && (rcBoundEllipse.top == 0) &&
- (rcBoundEllipse.right == RM_SX) && (rcBoundEllipse.bottom == RM_SY)) {
+ (rcBoundEllipse.right == RM_SX) && (rcBoundEllipse.bottom == RM_SY)) {
// Full screen clear wanted, so use shortcut method
g_system->fillScreen(0);
} else {
diff --git a/engines/tony/window.h b/engines/tony/window.h
index 2e8769707f..3874652f64 100644
--- a/engines/tony/window.h
+++ b/engines/tony/window.h
@@ -46,7 +46,6 @@ public:
void grabScreenshot(byte *lpBuf, int dezoom = 1, uint16 *lpDestBuf = NULL);
};
-
class RMWindow {
private:
void plotSplices(const byte *lpBuf, const Common::Point &center, int x, int y);
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 1c85a8d798..a6744568f7 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -78,8 +78,10 @@ bool Animation::loadAnimation(const Common::String &file) {
delete[] _frames;
_frames = new AnimationFrame[_numFrames];
for (int32 e = 0; e < _numFrames; e++) {
- if (READ_LE_UINT32(data) != 0x12345678)
+ if (READ_LE_UINT32(data) != 0x12345678) {
+ delete[] finalBuffer;
return false;
+ }
int32 oldRef = READ_LE_UINT32(data + 4);
uint32 compressedSize = READ_LE_UINT32(data + 8);
diff --git a/engines/toon/console.cpp b/engines/toon/console.cpp
index 8037dca4cb..18f81e1323 100644
--- a/engines/toon/console.cpp
+++ b/engines/toon/console.cpp
@@ -26,6 +26,7 @@
namespace Toon {
ToonConsole::ToonConsole(ToonEngine *vm) : GUI::Debugger(), _vm(vm) {
+ assert(_vm);
}
ToonConsole::~ToonConsole() {
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp
index 38b1f4f6e1..cee7a23796 100644
--- a/engines/toon/detection.cpp
+++ b/engines/toon/detection.cpp
@@ -44,7 +44,7 @@ static const ADGameDescription gameDescriptions[] = {
{"study.svl", 0, "281efa3f33f6712c0f641a605f4d40fd", 2511090},
AD_LISTEND
},
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
"toon", "",
@@ -54,7 +54,7 @@ static const ADGameDescription gameDescriptions[] = {
{"study.svl", 0, "df056b94ea83f1ed92a539cf636053ab", 2542668},
AD_LISTEND
},
- Common::FR_FRA, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ Common::FR_FRA, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
"toon", "",
@@ -64,7 +64,7 @@ static const ADGameDescription gameDescriptions[] = {
{"study.svl", 0, "72fe96a9e10967d3138e918295babc42", 2910283},
AD_LISTEND
},
- Common::DE_DEU, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
"toon", "",
@@ -74,7 +74,7 @@ static const ADGameDescription gameDescriptions[] = {
{"study.svl", 0, "b6b1ee2d9d94d53d305856039ab7bde7", 2634620},
AD_LISTEND
},
- Common::ES_ESP, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
"toon", "",
@@ -83,7 +83,7 @@ static const ADGameDescription gameDescriptions[] = {
{"arcaddbl.svl", 0, "1d1b96e317e03ffd3874a8ebe59556f3", 6246232},
{"study.svl", 0, "d4aff126ee27be3c3d25e2996369d7cb", 2324368},
},
- Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS, GUIO0()
+ Common::RU_RUS, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0()
},
{
"toon", "",
@@ -93,7 +93,7 @@ static const ADGameDescription gameDescriptions[] = {
{"generic.svl", 0, "5eb99850ada22f0b8cf6392262d4dd07", 9404599},
AD_LISTEND
},
- Common::DE_DEU, Common::kPlatformPC, ADGF_DEMO, GUIO0()
+ Common::DE_DEU, Common::kPlatformDOS, ADGF_DEMO, GUIO0()
},
{
"toon", "",
@@ -102,7 +102,7 @@ static const ADGameDescription gameDescriptions[] = {
{"generic.svl", 0, "5c42724bb93b360dca7044d6b7ef26e5", 7739319},
AD_LISTEND
},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO0()
+ Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO, GUIO0()
},
AD_TABLE_END_MARKER
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 1e851ff4ae..e26ed92f83 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -116,15 +116,15 @@ void FontRenderer::computeSize(const Common::String &origText, int16 *retX, int1
const byte *text = (const byte *)origText.c_str();
while (*text) {
byte curChar = *text;
- if (curChar < 32) {
- text++;
- continue;
- } else if (curChar == 13) {
+ if (curChar == 13) {
totalWidth = MAX(totalWidth, lineWidth);
totalHeight += lineHeight;
lineHeight = 0;
lineWidth = 0;
lastLineHeight = 0;
+ } else if (curChar < 32) {
+ text++;
+ continue;
} else {
curChar = textToFont(curChar);
int16 charWidth = _currentFont->getFrameWidth(curChar) - 1;
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 9fd8415676..7ad29ab8d8 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -2882,7 +2882,7 @@ void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) {
if (character && !_gameState->_inCutaway) {
if (character->getAnimationInstance()) {
if (character->getX() >= _gameState->_currentScrollValue && character->getX() <= _gameState->_currentScrollValue + TOON_SCREEN_WIDTH) {
- int16 x1, y1, x2, y2;
+ int16 x1= 0, y1 = 0, x2 = 0, y2 = 0;
character->getAnimationInstance()->getRect(&x1, &y1, &x2, &y2);
*retX = (x1 + x2) / 2;
*retY = y1;
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/touche/console.cpp b/engines/touche/console.cpp
index 51ef5fc639..2c4c6a0da1 100644
--- a/engines/touche/console.cpp
+++ b/engines/touche/console.cpp
@@ -26,9 +26,28 @@
namespace Touche {
ToucheConsole::ToucheConsole(ToucheEngine *vm) : GUI::Debugger(), _vm(vm) {
+ DCmd_Register("startMusic", WRAP_METHOD(ToucheConsole, Cmd_StartMusic));
+ DCmd_Register("stopMusic", WRAP_METHOD(ToucheConsole, Cmd_StopMusic));
}
ToucheConsole::~ToucheConsole() {
}
+bool ToucheConsole::Cmd_StartMusic(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("Usage: startMusic <num>\n");
+ return true;
+ }
+
+ int num = atoi(argv[1]);
+
+ _vm->startMusic(num);
+ return false;
+}
+
+bool ToucheConsole::Cmd_StopMusic(int argc, const char **argv) {
+ _vm->stopMusic();
+ return false;
+}
+
} // End of namespace Touche
diff --git a/engines/touche/console.h b/engines/touche/console.h
index e3cdc9d48b..43a303ad77 100644
--- a/engines/touche/console.h
+++ b/engines/touche/console.h
@@ -36,6 +36,9 @@ public:
private:
ToucheEngine *_vm;
+
+ bool Cmd_StartMusic(int argc, const char **argv);
+ bool Cmd_StopMusic(int argc, const char **argv);
};
} // End of namespace Touche
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index e4bbe0c4c1..0662e718d5 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -43,7 +43,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "2af0177f8887e3430f345e6b4d8b1414", 26350211),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -52,7 +52,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "95967f0b51d2e813e99ca00325098340", 26350190),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -61,7 +61,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "1caa20bb4d4fc2ce8eb867b6610082b3", 26558232),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -70,7 +70,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "be2ae6454b3325e410946f2322547cd4", 26625537),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -79,7 +79,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "64e95ba1decf5a5a60f8fa1840f40c62", 26529523),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -88,7 +88,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "1f442331d4b327c3488a9f6ffe9bdd25", 26367792),
Common::IT_ITA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -97,7 +97,7 @@ static const ADGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("touche.dat", "42d19a0bef65465109020440a9caa228", 26487370),
Common::PL_POL,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
@@ -106,7 +106,7 @@ static const ADGameDescription gameDescriptions[] = {
"Demo",
AD_ENTRY1s("touche.dat", "ddaed436445b2e77294ed19e8ae4aa2c", 8720683),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO0()
},
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index c58e2f1a33..85ca519f05 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -103,7 +103,7 @@ struct MenuData {
void addCharToDescription(int slot, char chr) {
char *description = saveLoadDescriptionsTable[slot];
int descriptionLen = strlen(description);
- if (descriptionLen < 32 && isprint(static_cast<unsigned char>(chr))) {
+ if (descriptionLen < 32 && Common::isPrint(chr)) {
description[descriptionLen] = chr;
description[descriptionLen + 1] = 0;
}
@@ -260,7 +260,7 @@ void ToucheEngine::redrawMenu(void *menu) {
Graphics::drawRect(_offscreenBuffer, kScreenWidth, 106, 118, 340, 164, 0xF9, 0xF7);
switch (menuData->mode) {
case kMenuSettingsMode:
- drawVolumeSlideBar(_offscreenBuffer, kScreenWidth, _midiPlayer->getVolume());
+ drawVolumeSlideBar(_offscreenBuffer, kScreenWidth, getMusicVolume());
menuData->buttonsTable[5].data = 0;
menuData->buttonsTable[6].data = 0;
menuData->buttonsTable[7].data = 0;
@@ -307,10 +307,10 @@ void ToucheEngine::handleMenuAction(void *menu, int actionId) {
_talkTextMode = kTalkModeVoiceAndText;
break;
case kActionLowerVolume:
- _midiPlayer->adjustVolume(-16);
+ adjustMusicVolume(-16);
break;
case kActionUpperVolume:
- _midiPlayer->adjustVolume(+16);
+ adjustMusicVolume(+16);
break;
case kActionScrollUpSaves:
--_saveLoadCurrentPage;
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 0790d726b7..9625224316 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -610,10 +610,7 @@ void ToucheEngine::res_stopSound() {
void ToucheEngine::res_loadMusic(int num) {
debugC(9, kDebugResource, "ToucheEngine::res_loadMusic() num=%d", num);
- uint32 size;
- const uint32 offs = res_getDataOffset(kResourceTypeMusic, num, &size);
- _fData.seek(offs);
- _midiPlayer->play(_fData, size, true);
+ startMusic(num);
}
void ToucheEngine::res_loadSpeech(int num) {
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 4b989963f6..5c133ccbc6 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -32,6 +32,8 @@
#include "common/keyboard.h"
#include "common/textconsole.h"
+#include "audio/mixer.h"
+
#include "engines/util.h"
#include "graphics/cursorman.h"
#include "graphics/palette.h"
@@ -58,6 +60,8 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
_playSoundCounter = 0;
+ _musicVolume = 0;
+
_processRandomPaletteCounter = 0;
_fastWalkMode = false;
@@ -90,6 +94,7 @@ ToucheEngine::~ToucheEngine() {
DebugMan.clearAllDebugChannels();
delete _console;
+ stopMusic();
delete _midiPlayer;
}
@@ -100,7 +105,7 @@ Common::Error ToucheEngine::run() {
setupOpcodes();
- _midiPlayer = new MidiPlayer;
+ initMusic();
// Setup mixer
syncSoundSettings();
@@ -120,7 +125,7 @@ Common::Error ToucheEngine::run() {
}
void ToucheEngine::restart() {
- _midiPlayer->stop();
+ stopMusic();
_gameState = kGameStateGameLoop;
_displayQuitDialog = false;
@@ -216,7 +221,7 @@ void ToucheEngine::readConfigurationSettings() {
_talkTextMode = kTalkModeVoiceOnly;
}
}
- _midiPlayer->setVolume(ConfMan.getInt("music_volume"));
+ setMusicVolume(ConfMan.getInt("music_volume"));
}
void ToucheEngine::writeConfigurationSettings() {
@@ -234,7 +239,7 @@ void ToucheEngine::writeConfigurationSettings() {
ConfMan.setBool("subtitles", true);
break;
}
- ConfMan.setInt("music_volume", _midiPlayer->getVolume());
+ ConfMan.setInt("music_volume", getMusicVolume());
ConfMan.flushToDisk();
}
@@ -3307,4 +3312,80 @@ bool ToucheEngine::canSaveGameStateCurrently() {
return _gameState == kGameStateGameLoop && _flagsTable[618] == 0 && !_hideInventoryTexts;
}
+void ToucheEngine::initMusic() {
+ // Detect External Music Files
+ bool extMusic = true;
+ for (int num = 0; num < 26 && extMusic; num++) {
+ Common::String extMusicFilename = Common::String::format("track%02d", num+1);
+ Audio::SeekableAudioStream *musicStream = Audio::SeekableAudioStream::openStreamFile(extMusicFilename);
+ if (!musicStream)
+ extMusic = false;
+ delete musicStream;
+ }
+
+ if (!extMusic) {
+ _midiPlayer = new MidiPlayer;
+ debug(1, "initMusic(): Using midi music!");
+ } else
+ debug(1, "initMusic(): Using external digital music!");
+}
+
+void ToucheEngine::startMusic(int num) {
+ debug(1, "startMusic(%d)", num);
+ uint32 size;
+
+ stopMusic();
+
+ if (_midiPlayer) {
+ const uint32 offs = res_getDataOffset(kResourceTypeMusic, num, &size);
+ _fData.seek(offs);
+ _midiPlayer->play(_fData, size, true);
+ } else {
+ Common::String extMusicFilename = Common::String::format("track%02d", num);
+ Audio::SeekableAudioStream *extMusicFileStream = Audio::SeekableAudioStream::openStreamFile(extMusicFilename);
+ if (!extMusicFileStream) {
+ error("Unable to open %s for reading", extMusicFilename.c_str());
+ }
+ Audio::LoopingAudioStream *loopStream = new Audio::LoopingAudioStream(extMusicFileStream, 0);
+ _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, loopStream, -1, _musicVolume);
+ }
+}
+
+void ToucheEngine::stopMusic() {
+ debug(1, "stopMusic()");
+ if (_midiPlayer)
+ _midiPlayer->stop();
+ else {
+ _mixer->stopHandle(_musicHandle);
+ }
+}
+
+int ToucheEngine::getMusicVolume() {
+ if (_midiPlayer)
+ _musicVolume = _midiPlayer->getVolume();
+ return _musicVolume;
+}
+
+void ToucheEngine::setMusicVolume(int volume) {
+ debug(1, "setMusicVolume(%d)", volume);
+ _musicVolume = CLIP(volume, 0, 255);
+
+ if (_midiPlayer)
+ _midiPlayer->setVolume(_musicVolume);
+ else {
+ _mixer->setChannelVolume(_musicHandle, _musicVolume);
+ }
+}
+
+void ToucheEngine::adjustMusicVolume(int diff) {
+ debug(1, "adjustMusicVolume(%d)", diff);
+ _musicVolume = CLIP(_musicVolume + diff, 0, 255);
+
+ if (_midiPlayer)
+ _midiPlayer->adjustVolume(diff);
+ else {
+ _mixer->setChannelVolume(_musicHandle, _musicVolume);
+ }
+}
+
} // namespace Touche
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index 949727b665..6ac43e7dfe 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -31,6 +31,7 @@
#include "common/util.h"
#include "audio/mixer.h"
+#include "audio/audiostream.h"
#include "engines/engine.h"
@@ -646,6 +647,18 @@ protected:
MidiPlayer *_midiPlayer;
+ int _musicVolume;
+ Audio::SoundHandle _musicHandle;
+
+ void initMusic();
+public: // To allow access from console
+ void startMusic(int num);
+ void stopMusic();
+protected:
+ int getMusicVolume();
+ void setMusicVolume(int volume);
+ void adjustMusicVolume(int diff);
+
Common::Language _language;
Common::RandomSource _rnd;
diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp
index 1cb8191640..52115b95fe 100644
--- a/engines/tsage/blue_force/blueforce_scenes9.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes9.cpp
@@ -705,6 +705,10 @@ void Scene900::process(Event &event) {
void Scene900::dispatch() {
SceneExt::dispatch();
+ // WORKAROUND:: Fix for invalid data in the Blue Force floppy version when opening gate
+ if (_sceneMode == 9006 && (g_vm->getFeatures() & GF_FLOPPY) && BF_GLOBALS._player._endFrame == 8)
+ BF_GLOBALS._player._endFrame = 6;
+
if (BF_GLOBALS.getFlag(fWithLyle) && _lyle.isNoMover()) {
_lyle.updateAngle(BF_GLOBALS._player._position);
}
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index ba27db9104..de5ac62425 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -42,6 +42,8 @@ SequenceManager::SequenceManager() : Action() {
_objectIndex = 0;
_keepActive = false;
_onCallback = NULL;
+ for (int i = 0; i < 6; i ++)
+ _objectList[i] = NULL;
setup();
}
@@ -415,6 +417,8 @@ ConversationChoiceDialog::ConversationChoiceDialog() {
_stdColor = 23;
_highlightColor = g_globals->_scenePalette._colors.background;
_fontNumber = 1;
+ _savedFgColor = _savedFontNumber = 0;
+ _selectedIndex = 0;
}
int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
@@ -587,6 +591,8 @@ StripManager::StripManager() {
_activeSpeaker = NULL;
_onBegin = NULL;
_onEnd = NULL;
+ _sceneNumber = 0;
+ _lookupList = NULL;
reset();
}
@@ -932,6 +938,7 @@ Speaker::Speaker() : EventHandler() {
_color1 = _color2 = _color3 = g_globals->_scenePalette._colors.foreground;
_action = NULL;
_speakerName = "SPEAKER";
+ _oldSceneNumber = -1;
}
void Speaker::synchronize(Serializer &s) {
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 292e74c09b..4a90e23a33 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -65,6 +65,11 @@ InvObject::InvObject(int visage, int strip, int frame) {
_frame = frame;
_sceneNumber = 0;
_iconResNum = 10;
+
+ _displayResNum = 0;
+ _rlbNum = 0;
+ _cursorNum = 0;
+ _cursorId = INV_NONE;
}
InvObject::InvObject(int strip, int frame) {
@@ -75,6 +80,11 @@ InvObject::InvObject(int strip, int frame) {
_visage = 7;
_sceneNumber = 0;
_iconResNum = 10;
+
+ _displayResNum = 0;
+ _rlbNum = 0;
+ _cursorNum = 0;
+ _cursorId = INV_NONE;
}
void InvObject::setCursor() {
@@ -163,6 +173,8 @@ Action::Action() {
_owner = NULL;
_endHandler = NULL;
_attached = false;
+ _delayFrames = 0;
+ _startFrame = 0;
}
void Action::synchronize(Serializer &s) {
@@ -387,6 +399,8 @@ void ObjectMover::endMove() {
ObjectMover2::ObjectMover2() : ObjectMover() {
_destObject = NULL;
+ _minArea = 0;
+ _maxArea = 0;
}
void ObjectMover2::synchronize(Serializer &s) {
@@ -1047,6 +1061,8 @@ PaletteModifier::PaletteModifier() {
PaletteModifierCached::PaletteModifierCached(): PaletteModifier() {
_step = 0;
_percent = 0;
+ for (int i = 0; i < 768; i++)
+ _palette[i] = 0;
}
void PaletteModifierCached::setPalette(ScenePalette *palette, int step) {
@@ -1070,6 +1086,10 @@ PaletteRotation::PaletteRotation() : PaletteModifierCached() {
_frameNumber = g_globals->_events.getFrameNumber();
_idxChange = 1;
_countdown = 0;
+ _currIndex = 0;
+ _start = _end = 0;
+ _rotationMode = 0;
+ _duration = 0;
}
void PaletteRotation::synchronize(Serializer &s) {
@@ -1273,6 +1293,10 @@ ScenePalette::ScenePalette() {
}
_field412 = 0;
+ _redColor = _greenColor = _blueColor = 0;
+ _aquaColor = 0;
+ _purpleColor = 0;
+ _limeColor = 0;
}
ScenePalette::~ScenePalette() {
@@ -1280,6 +1304,12 @@ ScenePalette::~ScenePalette() {
}
ScenePalette::ScenePalette(int paletteNum) {
+ _field412 = 0;
+ _redColor = _greenColor = _blueColor = 0;
+ _aquaColor = 0;
+ _purpleColor = 0;
+ _limeColor = 0;
+
loadPalette(paletteNum);
}
@@ -1781,6 +1811,7 @@ void SceneItem::display(const Common::String &msg) {
SceneHotspot::SceneHotspot(): SceneItem() {
_lookLineNum = _useLineNum = _talkLineNum = 0;
+ _resNum = 0;
}
void SceneHotspot::synchronize(Serializer &s) {
@@ -2036,6 +2067,13 @@ SceneObject::SceneObject() : SceneHotspot() {
_linkedActor = NULL;
_field8A = Common::Point(0, 0);
+ _angle = 0;
+ _xs = 0;
+ _xe = 0;
+ _endFrame = 0;
+ _field68 = 0;
+ _regionIndex = 0;
+ _field9C = NULL;
}
SceneObject::SceneObject(const SceneObject &so) : SceneHotspot() {
@@ -2331,6 +2369,7 @@ void SceneObject::animate(AnimateMode animMode, ...) {
setFrame(getNewFrame());
break;
}
+ va_end(va);
}
SceneObject *SceneObject::clone() const {
@@ -3072,6 +3111,7 @@ Visage::Visage(const Visage &v) {
_data = v._data;
if (_data)
g_vm->_memoryManager.incLocks(_data);
+ _flipHoriz = false;
}
Visage &Visage::operator=(const Visage &s) {
@@ -3579,6 +3619,7 @@ void SceneItemList::addItems(SceneItem *first, ...) {
push_back(p);
p = va_arg(va, SceneItem *);
}
+ va_end(va);
}
/*--------------------------------------------------------------------------*/
@@ -4074,6 +4115,7 @@ SceneHandler::SceneHandler() {
_saveGameSlot = -1;
_loadGameSlot = -1;
_prevFrameNumber = 0;
+ _delayTicks = 0;
}
void SceneHandler::registerHandler() {
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 60a7930eab..296754011e 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -189,7 +189,7 @@ public:
Action *_action;
SceneObject *_sceneObject;
public:
- ObjectMover() { _action = NULL; _sceneObject = NULL; }
+ ObjectMover() { _action = NULL; _sceneObject = NULL; _minorDiff = 0; _majorDiff = 0; _changeCtr = 0;}
virtual ~ObjectMover();
virtual void synchronize(Serializer &s);
@@ -272,7 +272,7 @@ public:
SceneObject *_destObject;
int _maxArea;
int _minArea;
- PlayerMover2() : PlayerMover() { _destObject = NULL; }
+ PlayerMover2() : PlayerMover() { _destObject = NULL; _minArea = _maxArea = 0;}
virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "PlayerMover2"; }
@@ -415,7 +415,7 @@ public:
int _yDiff;
int _sceneRegionId;
public:
- SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; }
+ SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; _yDiff = 0; _fieldE = _field10 = 0;}
virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneItem"; }
@@ -685,6 +685,7 @@ public:
int xe = va_arg(va, int);
items.push_back(LineSlice(xs, xe));
}
+ va_end(va);
}
void add(LineSlice &slice) { items.push_back(slice); }
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index a84ee5662f..b374dbc98b 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -31,7 +31,7 @@ static const tSageGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -45,7 +45,7 @@ static const tSageGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("ring.rlb", "cb8bba91b30cd172712371d7123bd763", 7427980),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -59,7 +59,7 @@ static const tSageGameDescription gameDescriptions[] = {
"Floppy",
AD_ENTRY1s("ring.rlb", "7b7f0c5b37b58fa5ec06ebb2ca0d0d9d", 8438770),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -73,7 +73,7 @@ static const tSageGameDescription gameDescriptions[] = {
"Floppy Demo",
AD_ENTRY1s("tsage.rlb", "3b3604a97c06c91f3735d3e9d341f63f", 833453),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -88,7 +88,7 @@ static const tSageGameDescription gameDescriptions[] = {
"Floppy Demo",
AD_ENTRY1s("demoring.rlb", "64050e1806203b15bb03876140eb4f56", 832206),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -104,7 +104,7 @@ static const tSageGameDescription gameDescriptions[] = {
"Floppy",
AD_ENTRY1s("blue.rlb", "17c3993415e8a2cf93040eef7e88ec93", 1156508),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_UNSTABLE,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -119,7 +119,7 @@ static const tSageGameDescription gameDescriptions[] = {
"",
AD_ENTRY1s("blue.rlb", "17eabb456cb1546c66baf1aff387ba6a", 10032614),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -133,7 +133,7 @@ static const tSageGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("blue.rlb", "99983f48cb218f1f3760cf2f9a7ef11d", 63863322),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -149,7 +149,7 @@ static const tSageGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("blue.rlb", "5b2b35c51b62e82d82b0791540bfae2d", 10082565),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD | ADGF_UNSTABLE,
GUIO2(GUIO_NOSPEECH, GUIO_NOSFX)
},
@@ -164,7 +164,7 @@ static const tSageGameDescription gameDescriptions[] = {
"CD",
AD_ENTRY1s("r2rw.rlb", "df6c25622387007788ca36d99362c1f0", 47586928),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_CD | ADGF_UNSTABLE,
GUIO0()
},
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 475db47315..a1e9da3477 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -32,7 +32,7 @@
namespace TsAGE {
enum EventType {EVENT_NONE = 0, EVENT_BUTTON_DOWN = 1, EVENT_BUTTON_UP = 2, EVENT_KEYPRESS = 4,
- EVENT_MOUSE_MOVE = 8};
+ EVENT_MOUSE_MOVE = 8, EVENT_UNK27 = 27};
enum ButtonShiftFlags {BTNSHIFT_LEFT = 0, BTNSHIFT_RIGHT = 3, BTNSHIFT_MIDDLE = 4};
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index 9175b1050a..826f2fef6f 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -162,7 +162,6 @@ public:
class GfxFontBackup {
private:
- GfxSurface *_surface;
Common::Point _edgeSize;
Common::Point _position;
GfxColors _colors;
diff --git a/engines/tsage/ringworld/ringworld_scenes3.cpp b/engines/tsage/ringworld/ringworld_scenes3.cpp
index 0e4ccd1269..b2ed986331 100644
--- a/engines/tsage/ringworld/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld/ringworld_scenes3.cpp
@@ -2179,6 +2179,7 @@ Scene2120::Scene2120(): Scene() {
_prevDbMode = 0;
_visageVisable = false;
_subjectIndex = 0;
+ _lineOffset = 0;
}
void Scene2120::postInit(SceneObjectList *OwnerList) {
@@ -3690,8 +3691,8 @@ void Scene2230::Hotspot12::doAction(int action) {
/*--------------------------------------------------------------------------*/
-Scene2230::Scene2230() :
- _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) {
+Scene2230::Scene2230() : _hotspot9(0, CURSOR_LOOK, 2230, 16, CURSOR_USE, 2230, 18, LIST_END) {
+ _field30A = 0;
}
void Scene2230::postInit(SceneObjectList *OwnerList) {
@@ -4877,6 +4878,7 @@ Scene2310::Scene2310() {
_rectList[4].set(199, 70, 215, 140);
_wireIndex = 5;
+ _pageIndex = 0;
}
void Scene2310::postInit(SceneObjectList *OwnerList) {
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 4c98fcf00a..3b7d283e44 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -61,14 +61,10 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
}
void Scene50::process(Event &event) {
- if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == 27)) {
+ if ((event.eventType != EVENT_BUTTON_DOWN) && (event.eventType != EVENT_KEYPRESS) && (event.eventType == EVENT_UNK27)) {
event.handled = true;
- warning("TODO: incomplete Scene50::process()");
- // CursorType _oldCursorId = _cursorId;
g_globals->_events.setCursor(CURSOR_ARROW);
- // _cursorManager.sub_1D474(2, 0);
- // sub_5566A(1);
- // _cursorManager._fieldE = _oldCursorId;
+ HelpDialog::show();
R2_GLOBALS._sceneManager.changeScene(100);
}
}
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 216444e722..af62ab6916 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -1062,9 +1062,10 @@ void Scene1200::Area1::process(Event &event) {
CursorType cursor = R2_GLOBALS._events.getCursor();
if (_actor2._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) {
- if (cursor == _cursorNum)
+ if (cursor == _cursorNum) {
warning("TODO: _cursorState = ???");
R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState);
+ }
} else if (event.mousePos.y < 168) {
if (cursor != _cursorNum) {
_savedCursorNum = cursor;
@@ -5106,11 +5107,11 @@ void Scene1337::subCDB90(int arg1, Common::Point pt) {
displayDialog(_arrunkObj1337[2]._arr1[2]._field34);
else if (subC2BF8(&_arrunkObj1337[2]._arr1[3], pt))
displayDialog(_arrunkObj1337[2]._arr1[3]._field34);
- else if ((curReg >= 6) || (curReg <= 9))
+ else if ((curReg >= 6) && (curReg <= 9))
actionDisplay(1330, 29, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if ((curReg >= 11) || (curReg <= 14))
+ else if ((curReg >= 11) && (curReg <= 14))
actionDisplay(1330, 31, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- else if ((curReg >= 16) || (curReg <= 19))
+ else if ((curReg >= 16) && (curReg <= 19))
actionDisplay(1330, 30, 159, 10, 1, 200, 0, 7, 0, 154, 154);
else {
switch (curReg) {
@@ -6930,9 +6931,10 @@ void Scene1550::UnkArea1550::process(Event &event) {
CursorType cursor = R2_GLOBALS._events.getCursor();
if (_areaActor._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) {
- if (cursor == _cursorNum)
+ if (cursor == _cursorNum) {
warning("TODO: _cursorState = ???");
R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState);
+ }
} else if (event.mousePos.y < 168) {
if (cursor != _cursorNum) {
_savedCursorNum = cursor;
@@ -8232,9 +8234,10 @@ void Scene1550::subA2B2F() {
R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE;
if (varA == 0) {
- if (_field417 != 1550)
+ if (_field417 != 1550) {
g_globals->_scenePalette.loadPalette(1550);
R2_GLOBALS._sceneManager._hasPalette = true;
+ }
} else {
g_globals->_scenePalette.loadPalette(varA);
R2_GLOBALS._sceneManager._hasPalette = true;
@@ -12951,9 +12954,10 @@ void Scene1950::Area1::process(Event &event) {
CursorType cursor = R2_GLOBALS._events.getCursor();
if (_areaActor._bounds.contains(event.mousePos.x + g_globals->gfxManager()._bounds.left , event.mousePos.y)) {
- if (cursor == _cursorNum)
+ if (cursor == _cursorNum) {
warning("TODO: _cursorState = ???");
R2_GLOBALS._events.setCursor(_savedCursorNum); //, _cursorState);
+ }
} else if (event.mousePos.y < 168) {
if (cursor != _cursorNum) {
_savedCursorNum = cursor;
@@ -14556,9 +14560,10 @@ void Scene1950::signal() {
case 1964:
// No break on purpose
case 1965:
- if (!R2_GLOBALS.getFlag(37))
+ if (!R2_GLOBALS.getFlag(37)) {
SceneItem::display(1950, 26, 0, 280, 1, 160, 9, 1, 2, 20, 7, 7, -999);
R2_GLOBALS._player.enableControl();
+ }
break;
case 1966:
_actor4.remove();
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 69a9975ef4..b9567cece2 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -1494,6 +1494,11 @@ Sound::Sound() {
memset(_trkLoopIndex, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_trkRest, 0, SOUND_ARR_SIZE * sizeof(int));
memset(_trkLoopRest, 0, SOUND_ARR_SIZE * sizeof(int));
+ for (int i = 0; i < 16; i++) {
+ _chWork[i] = false;
+ _trackInfo._chunks[i] = 0;
+ _trackInfo._voiceTypes[i] = 0;
+ }
}
Sound::~Sound() {
@@ -2504,6 +2509,7 @@ SoundDriver::SoundDriver() {
_driverResID = 0;
_minVersion = _maxVersion = 0;
_groupMask = 0;
+ _groupOffset = NULL;
}
/*--------------------------------------------------------------------------*/
@@ -2568,6 +2574,12 @@ AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
Common::fill(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
_patchData = NULL;
+ for (int i = 0; i < 256; i++)
+ _portContents[i] = 0;
+ for (int i = 0; i < 9; i++) {
+ _channelVoiced[i] = false;
+ _pitchBlend[i] = 0;
+ }
}
AdlibSoundDriver::~AdlibSoundDriver() {
@@ -2862,6 +2874,7 @@ SoundBlasterDriver::SoundBlasterDriver(): SoundDriver() {
_sampleRate = _mixer->getOutputRate();
_audioStream = NULL;
_channelData = NULL;
+ _channelVolume = 0;
}
SoundBlasterDriver::~SoundBlasterDriver() {
diff --git a/engines/tucker/console.cpp b/engines/tucker/console.cpp
index e0f2debc30..17ba2038d0 100644
--- a/engines/tucker/console.cpp
+++ b/engines/tucker/console.cpp
@@ -11,7 +11,7 @@
* 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
+ * 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
@@ -26,6 +26,7 @@
namespace Tucker {
TuckerConsole::TuckerConsole(TuckerEngine *vm) : _vm(vm) {
+ assert(_vm);
}
TuckerConsole::~TuckerConsole() {
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index aeeebe6877..e4a74f6c37 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -41,7 +41,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobar.txt", "f1e42a95972643462b9c3c2ea79d6683", 543),
Common::FR_FRA,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
Tucker::kGameFlagNoSubtitles,
GUIO0()
},
@@ -50,7 +50,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobar.txt", "9c1ddeafc5283b90d1a284bd0924831c", 462),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
Tucker::kGameFlagEncodedData,
GUIO0()
},
@@ -59,7 +59,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobar.txt", "1b3ea79d8528ea3c7df83dd0ed345e37", 525),
Common::ES_ESP,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
Tucker::kGameFlagEncodedData,
GUIO0()
},
@@ -68,7 +68,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobrgr.txt", "4df9eb65722418d1a1723508115b146c", 552),
Common::DE_DEU,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
Tucker::kGameFlagEncodedData,
GUIO0()
},
@@ -77,7 +77,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobar.txt", "5f85285bbc23ce57cbc164021ee1f23c", 525),
Common::PL_POL,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
0,
GUIO0()
},
@@ -86,7 +86,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"",
AD_ENTRY1s("infobar.txt", "e548994877ff31ca304f6352ce022a8e", 497),
Common::CZ_CZE,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
Tucker::kGameFlagEncodedData,
GUIO0()
},
@@ -95,7 +95,7 @@ static const ADGameDescription tuckerGameDescriptions[] = {
"Demo",
AD_ENTRY1s("infobar.txt", "010b055de42097b140d5bcb6e95a5c7c", 203),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO | Tucker::kGameFlagDemo,
GUIO0()
},
@@ -107,7 +107,7 @@ static const ADGameDescription tuckerDemoGameDescription = {
"Non-Interactive Demo",
AD_ENTRY1(0, 0),
Common::EN_ANY,
- Common::kPlatformPC,
+ Common::kPlatformDOS,
ADGF_DEMO | Tucker::kGameFlagDemo | Tucker::kGameFlagIntroOnly,
GUIO0()
};
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp
index d175855d1e..e4c18d6287 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 {
@@ -752,11 +752,11 @@ bool AdActor::update() {
_tempSprite2 = _sentence->_currentSprite;
}
- 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)) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->getTimer()->getTime() - _sentence->_startTime);
+ 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;
@@ -915,7 +915,7 @@ void AdActor::getNextStep() {
//////////////////////////////////////////////////////////////////////////
-void AdActor::initLine(BasePoint startPt, BasePoint endPt) {
+void AdActor::initLine(const BasePoint &startPt, const BasePoint &endPt) {
_pFCount = MAX((abs(endPt.x - startPt.x)) , (abs(endPt.y - startPt.y)));
_pFStepX = (double)(endPt.x - startPt.x) / _pFCount;
@@ -963,16 +963,16 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
AdObject *obj = (AdObject *)val->getNative();
- if (!obj || obj->_type != OBJECT_ENTITY) {
+ if (!obj || obj->getType() != OBJECT_ENTITY) {
script->runtimeError("actor.%s method accepts an entity refrence only", name);
stack->pushNULL();
return STATUS_OK;
}
AdEntity *ent = (AdEntity *)obj;
- if (ent->_walkToX == 0 && ent->_walkToY == 0) {
+ if (ent->getWalkToX() == 0 && ent->getWalkToY() == 0) {
goTo(ent->_posX, ent->_posY);
} else {
- goTo(ent->_walkToX, ent->_walkToY, ent->_walkToDir);
+ goTo(ent->getWalkToX(), ent->getWalkToY(), ent->getWalkToDir());
}
if (strcmp(name, "GoToObjectAsync") != 0) {
script->waitForExclusive(this);
@@ -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 {
@@ -1320,23 +1320,23 @@ bool AdActor::persist(BasePersistenceManager *persistMgr) {
AdTalkHolder::persist(persistMgr);
persistMgr->transfer(TMEMBER_INT(_dir));
- persistMgr->transfer(TMEMBER(_path));
+ persistMgr->transferPtr(TMEMBER_PTR(_path));
persistMgr->transfer(TMEMBER(_pFCount));
persistMgr->transfer(TMEMBER(_pFStepX));
persistMgr->transfer(TMEMBER(_pFStepY));
persistMgr->transfer(TMEMBER(_pFX));
persistMgr->transfer(TMEMBER(_pFY));
- persistMgr->transfer(TMEMBER(_standSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_standSprite));
_talkSprites.persist(persistMgr);
_talkSpritesEx.persist(persistMgr);
persistMgr->transfer(TMEMBER_INT(_targetDir));
persistMgr->transfer(TMEMBER_INT(_afterWalkDir));
- persistMgr->transfer(TMEMBER(_targetPoint));
- persistMgr->transfer(TMEMBER(_turnLeftSprite));
- persistMgr->transfer(TMEMBER(_turnRightSprite));
- persistMgr->transfer(TMEMBER(_walkSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_targetPoint));
+ persistMgr->transferPtr(TMEMBER_PTR(_turnLeftSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_turnRightSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_walkSprite));
- persistMgr->transfer(TMEMBER(_animSprite2));
+ persistMgr->transferPtr(TMEMBER_PTR(_animSprite2));
persistMgr->transfer(TMEMBER(_talkAnimName));
persistMgr->transfer(TMEMBER(_idleAnimName));
persistMgr->transfer(TMEMBER(_walkAnimName));
@@ -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..3630c6665b 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);
@@ -83,24 +83,24 @@ private:
AdSpriteSet *getAnimByName(const Common::String &animName);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
bool setDefaultAnimNames();
BaseSprite *getTalkStanceOld(const char *stance);
bool mergeAnims(const char *animsFilename);
BaseSprite *_animSprite2;
- void initLine(BasePoint startPt, BasePoint endPt);
+ void initLine(const BasePoint &startPt, const BasePoint &endPt);
void getNextStep();
void followPath();
double _pFStepX;
double _pFStepY;
double _pFX;
double _pFY;
- int _pFCount;
+ int32 _pFCount;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp
index 9af7e034ca..c43f74b620 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,17 +76,32 @@ AdEntity::~AdEntity() {
_gameRef->unregisterObject(_region);
delete _theora;
- _theora = NULL;
+ _theora = nullptr;
delete[] _item;
- _item = NULL;
+ _item = nullptr;
}
+int32 AdEntity::getWalkToX() const {
+ return _walkToX;
+}
+
+int32 AdEntity::getWalkToY() const {
+ return _walkToY;
+}
+
+TDirection AdEntity::getWalkToDir() const {
+ return _walkToDir;
+}
+
+const char *AdEntity::getItemName() const {
+ return _item;
+}
//////////////////////////////////////////////////////////////////////////
bool AdEntity::loadFile(const char *filename) {
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;
}
@@ -210,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) {
@@ -230,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;
@@ -320,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;
@@ -333,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;
@@ -346,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;
@@ -367,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;
@@ -393,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"))) {
@@ -550,7 +565,7 @@ bool AdEntity::display() {
} else if (_currentSprite) {
_currentSprite->display(_posX,
_posY,
- (reg || _editorAlwaysRegister) ? _registerAlias : NULL,
+ (reg || _editorAlwaysRegister) ? _registerAlias : nullptr,
scaleX,
scaleY,
alpha,
@@ -570,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;
}
@@ -612,11 +627,11 @@ bool AdEntity::update() {
_tempSprite2 = _sentence->_currentSprite;
}
- 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)) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->getTimer()->getTime() - _sentence->_startTime);
+ if (_tempSprite2 == nullptr || _tempSprite2->isFinished() || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
if (timeIsUp) {
_sentence->finish();
- _tempSprite2 = NULL;
+ _tempSprite2 = nullptr;
_state = STATE_READY;
} else {
_tempSprite2 = getTalkStance(_sentence->getNextStance());
@@ -658,7 +673,7 @@ bool AdEntity::update() {
if (_theora->isFinished()) {
_theora->stop();
delete _theora;
- _theora = NULL;
+ _theora = nullptr;
}
}
@@ -722,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);
@@ -815,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);
@@ -1056,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();
@@ -1078,7 +1093,7 @@ bool AdEntity::persist(BasePersistenceManager *persistMgr) {
AdTalkHolder::persist(persistMgr);
persistMgr->transfer(TMEMBER(_item));
- persistMgr->transfer(TMEMBER(_region));
+ persistMgr->transferPtr(TMEMBER_PTR(_region));
//persistMgr->transfer(TMEMBER(_sprite));
persistMgr->transfer(TMEMBER_INT(_subtype));
_talkSprites.persist(persistMgr);
@@ -1088,7 +1103,7 @@ bool AdEntity::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_walkToY));
persistMgr->transfer(TMEMBER_INT(_walkToDir));
- persistMgr->transfer(TMEMBER(_theora));
+ persistMgr->transferPtr(TMEMBER_PTR(_theora));
return STATUS_OK;
}
@@ -1102,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_entity.h b/engines/wintermute/ad/ad_entity.h
index 415987e50a..c23b37366d 100644
--- a/engines/wintermute/ad/ad_entity.h
+++ b/engines/wintermute/ad/ad_entity.h
@@ -37,30 +37,35 @@ class AdEntity : public AdTalkHolder {
public:
VideoTheoraPlayer *_theora;
bool setSprite(const char *filename);
- int _walkToX;
- int _walkToY;
- TDirection _walkToDir;
void setItem(const char *itemName);
- char *_item;
DECLARE_PERSISTENT(AdEntity, AdTalkHolder)
void updatePosition();
virtual int getHeight();
BaseRegion *_region;
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
virtual bool update();
virtual bool display();
AdEntity(BaseGame *inGame);
virtual ~AdEntity();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- TEntityType _subtype;
- // scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ int32 getWalkToX() const;
+ int32 getWalkToY() const;
+ TDirection getWalkToDir() const;
+ const char* getItemName() const;
+ // scripting interface
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
+private:
+ int32 _walkToX;
+ int32 _walkToY;
+ TDirection _walkToDir;
+ char *_item;
+ TEntityType _subtype;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 4481b774c1..ead68f7729 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -43,7 +43,6 @@
#include "engines/wintermute/base/base_object.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/sound/base_sound.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/base_transition_manager.h"
#include "engines/wintermute/base/base_sprite.h"
@@ -69,22 +68,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 +93,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 +121,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 +138,7 @@ bool AdGame::cleanup() {
unregisterObject(_scene);
- _scene = NULL;
+ _scene = nullptr;
// remove items
for (uint32 i = 0; i < _items.size(); i++) {
@@ -150,7 +149,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 +159,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 +172,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 +206,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 +257,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 +296,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 +384,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 +401,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 +462,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 +484,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()) {
@@ -520,9 +519,14 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (_responseBox) {
AdResponse *res = new AdResponse(_gameRef);
if (res) {
- res->_iD = id;
- res->setText(text);
- _stringTable->expand(&res->_text);
+ res->setID(id);
+
+ char *expandedText = new char[strlen(text) + 1];
+ Common::strlcpy(expandedText, text, strlen(text) + 1);
+ expandStringByStringTable(&expandedText);
+ res->setText(expandedText);
+ delete[] expandedText;
+
if (!val1->isNULL()) {
res->setIcon(val1->getString());
}
@@ -542,7 +546,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
res->_responseType = RESPONSE_ONCE_GAME;
}
- _responseBox->_responses.add(res);
+ _responseBox->addResponse(res);
}
} else {
script->runtimeError("Game.AddResponse: response box is not defined");
@@ -584,15 +588,15 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (_responseBox) {
_responseBox->weedResponses();
- if (_responseBox->_responses.size() == 0) {
+ if (_responseBox->getNumResponses() == 0) {
stack->pushNULL();
return STATUS_OK;
}
- if (_responseBox->_responses.size() == 1 && autoSelectLast) {
- stack->pushInt(_responseBox->_responses[0]->_iD);
- _responseBox->handleResponse(_responseBox->_responses[0]);
+ if (_responseBox->getNumResponses() == 1 && autoSelectLast) {
+ stack->pushInt(_responseBox->getIdForResponseNum(0));
+ _responseBox->handleResponseNum(0);
_responseBox->clearResponses();
return STATUS_OK;
}
@@ -617,7 +621,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
stack->correctParams(0);
if (_responseBox) {
_responseBox->weedResponses();
- stack->pushInt(_responseBox->_responses.size());
+ stack->pushInt(_responseBox->getNumResponses());
} else {
script->runtimeError("Game.GetNumResponses: response box is not defined");
stack->pushNULL();
@@ -639,7 +643,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 +655,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();
@@ -754,8 +758,8 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetResponsesWindow") == 0 || strcmp(name, "GetResponseWindow") == 0) {
stack->correctParams(0);
- if (_responseBox && _responseBox->_window) {
- stack->pushNative(_responseBox->_window, true);
+ if (_responseBox && _responseBox->getResponseWindow()) {
+ stack->pushNative(_responseBox->getResponseWindow(), true);
} else {
stack->pushNULL();
}
@@ -777,7 +781,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 +801,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;
@@ -850,10 +854,10 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
int height = stack->pop()->getInt();
if (width <= 0) {
- width = _renderer->_width;
+ width = _renderer->getWidth();
}
if (height <= 0) {
- height = _renderer->_height;
+ height = _renderer->getHeight();
}
if (!_sceneViewport) {
@@ -983,10 +987,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) {
// LastResponse (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "LastResponse") {
- if (!_responseBox || !_responseBox->_lastResponseText) {
+ if (!_responseBox || !_responseBox->getLastResponseText()) {
_scValue->setString("");
} else {
- _scValue->setString(_responseBox->_lastResponseText);
+ _scValue->setString(_responseBox->getLastResponseText());
}
return _scValue;
}
@@ -995,10 +999,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) {
// LastResponseOrig (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "LastResponseOrig") {
- if (!_responseBox || !_responseBox->_lastResponseTextOrig) {
+ if (!_responseBox || !_responseBox->getLastResponseTextOrig()) {
_scValue->setString("");
} else {
- _scValue->setString(_responseBox->_lastResponseTextOrig);
+ _scValue->setString(_responseBox->getLastResponseTextOrig());
}
return _scValue;
}
@@ -1036,7 +1040,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 +1070,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 +1162,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 +1246,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 +1320,7 @@ bool AdGame::loadBuffer(byte *buffer, bool complete) {
registerObject(_responseBox);
} else {
delete _responseBox;
- _responseBox = NULL;
+ _responseBox = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1328,7 +1332,7 @@ bool AdGame::loadBuffer(byte *buffer, bool complete) {
registerObject(_inventoryBox);
} else {
delete _inventoryBox;
- _inventoryBox = NULL;
+ _inventoryBox = nullptr;
cmd = PARSERR_GENERIC;
}
break;
@@ -1338,7 +1342,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;
@@ -1409,32 +1413,32 @@ bool AdGame::persist(BasePersistenceManager *persistMgr) {
_dlgPendingBranches.persist(persistMgr);
_inventories.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_inventoryBox));
+ persistMgr->transferPtr(TMEMBER_PTR(_inventoryBox));
_objects.persist(persistMgr);
persistMgr->transfer(TMEMBER(_prevSceneName));
persistMgr->transfer(TMEMBER(_prevSceneFilename));
- persistMgr->transfer(TMEMBER(_responseBox));
+ persistMgr->transferPtr(TMEMBER_PTR(_responseBox));
_responsesBranch.persist(persistMgr);
_responsesGame.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_scene));
+ persistMgr->transferPtr(TMEMBER_PTR(_scene));
_sceneStates.persist(persistMgr);
persistMgr->transfer(TMEMBER(_scheduledFadeIn));
persistMgr->transfer(TMEMBER(_scheduledScene));
- persistMgr->transfer(TMEMBER(_selectedItem));
+ persistMgr->transferPtr(TMEMBER_PTR(_selectedItem));
persistMgr->transfer(TMEMBER_INT(_talkSkipButton));
_sentences.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_sceneViewport));
+ persistMgr->transferPtr(TMEMBER_PTR(_sceneViewport));
persistMgr->transfer(TMEMBER_INT(_stateEx));
persistMgr->transfer(TMEMBER(_initialScene));
persistMgr->transfer(TMEMBER(_debugStartupScene));
- persistMgr->transfer(TMEMBER(_invObject));
- persistMgr->transfer(TMEMBER(_inventoryOwner));
+ persistMgr->transferPtr(TMEMBER_PTR(_invObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_inventoryOwner));
persistMgr->transfer(TMEMBER(_tempDisableSaveState));
_items.persist(persistMgr);
@@ -1456,7 +1460,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 +1473,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 +1486,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);
@@ -1498,8 +1502,8 @@ 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);
+bool AdGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const {
+ BaseGame::getVersion(verMajor, verMinor, nullptr, nullptr);
if (extMajor) {
*extMajor = 0;
@@ -1515,7 +1519,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 +1571,7 @@ bool AdGame::loadItemsBuffer(byte *buffer, bool merge) {
addItem(item);
} else {
delete item;
- item = NULL;
+ item = nullptr;
cmd = PARSERR_GENERIC;
}
}
@@ -1599,7 +1603,7 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
}
for (uint32 i = 0; i < _sceneStates.size(); i++) {
- if (scumm_stricmp(_sceneStates[i]->_filename, filenameCor) == 0) {
+ if (scumm_stricmp(_sceneStates[i]->getFilename(), filenameCor) == 0) {
delete[] filenameCor;
return _sceneStates[i];
}
@@ -1615,7 +1619,7 @@ AdSceneState *AdGame::getSceneState(const char *filename, bool saving) {
return ret;
} else {
delete[] filenameCor;
- return NULL;
+ return nullptr;
}
}
@@ -1635,7 +1639,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 +1693,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 +1707,7 @@ bool AdGame::endDlgBranch(const char *branchName, const char *scriptName, const
}
}
- if (name == NULL) {
+ if (name == nullptr) {
return STATUS_OK;
}
@@ -1719,7 +1723,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);
}
@@ -1743,7 +1747,7 @@ bool AdGame::endDlgBranch(const char *branchName, const char *scriptName, const
//////////////////////////////////////////////////////////////////////////
bool AdGame::clearBranchResponses(char *name) {
for (uint32 i = 0; i < _responsesBranch.size(); i++) {
- if (scumm_stricmp(name, _responsesBranch[i]->_context) == 0) {
+ if (scumm_stricmp(name, _responsesBranch[i]->getContext()) == 0) {
delete _responsesBranch[i];
_responsesBranch.remove_at(i);
i--;
@@ -1760,18 +1764,18 @@ 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;
}
//////////////////////////////////////////////////////////////////////////
-bool AdGame::branchResponseUsed(int id) {
- char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL;
+bool AdGame::branchResponseUsed(int id) const {
+ 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]->getContext() == nullptr) || scumm_stricmp(context, _responsesBranch[i]->getContext()) == 0) {
return true;
}
}
@@ -1787,19 +1791,19 @@ 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;
}
//////////////////////////////////////////////////////////////////////////
-bool AdGame::gameResponseUsed(int id) {
- char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : NULL;
+bool AdGame::gameResponseUsed(int id) const {
+ char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr;
for (uint32 i = 0; i < _responsesGame.size(); i++) {
- AdResponseContext *respContext = _responsesGame[i];
+ const 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->getContext() == nullptr) || ((context != nullptr && respContext->getContext() != nullptr) && scumm_stricmp(context, respContext->getContext()) == 0)) {
return true;
}
}
@@ -1810,11 +1814,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]->getContext() == nullptr) || scumm_stricmp(context, _responsesGame[i]->getContext()) == 0) {
delete _responsesGame[i];
_responsesGame.remove_at(i);
break;
@@ -1824,7 +1828,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]->getContext() == nullptr) || scumm_stricmp(context, _responsesBranch[i]->getContext()) == 0) {
delete _responsesBranch[i];
_responsesBranch.remove_at(i);
break;
@@ -1863,7 +1867,7 @@ bool AdGame::displayContent(bool doUpdate, bool displayAll) {
}
if (_theoraPlayer->isFinished()) {
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
} else {
@@ -1912,7 +1916,7 @@ bool AdGame::displayContent(bool doUpdate, bool displayAll) {
_loadingIcon->display(_loadingIconX, _loadingIconY);
if (!_loadingIconPersistent) {
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
}
}
@@ -1959,13 +1963,13 @@ bool AdGame::isItemTaken(char *itemName) {
}
//////////////////////////////////////////////////////////////////////////
-AdItem *AdGame::getItemByName(const char *name) {
+AdItem *AdGame::getItemByName(const char *name) const {
for (uint32 i = 0; i < _items.size(); i++) {
if (scumm_stricmp(_items[i]->getName(), name) == 0) {
return _items[i];
}
}
- return NULL;
+ return nullptr;
}
@@ -2026,7 +2030,7 @@ bool AdGame::deleteItem(AdItem *item) {
}
if (_selectedItem == item) {
- _selectedItem = NULL;
+ _selectedItem = nullptr;
}
_scene->handleItemAssociations(item->getName(), false);
@@ -2115,7 +2119,7 @@ char *AdGame::findSpeechFile(char *stringID) {
}
}
delete[] ret;
- return NULL;
+ return nullptr;
}
@@ -2145,14 +2149,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 +2172,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 +2202,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 +2233,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 +2250,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");
@@ -2260,10 +2264,10 @@ bool AdGame::displayDebugInfo() {
char str[100];
if (_gameRef->_debugDebugMode) {
sprintf(str, "Mouse: %d, %d (scene: %d, %d)", _mousePos.x, _mousePos.y, _mousePos.x + _scene->getOffsetLeft(), _mousePos.y + _scene->getOffsetTop());
- _systemFont->drawText((byte *)str, 0, 90, _renderer->_width, TAL_RIGHT);
+ _systemFont->drawText((byte *)str, 0, 90, _renderer->getWidth(), TAL_RIGHT);
sprintf(str, "Scene: %s (prev: %s)", (_scene && _scene->getName()) ? _scene->getName() : "???", _prevSceneName ? _prevSceneName : "???");
- _systemFont->drawText((byte *)str, 0, 110, _renderer->_width, TAL_RIGHT);
+ _systemFont->drawText((byte *)str, 0, 110, _renderer->getWidth(), TAL_RIGHT);
}
return BaseGame::displayDebugInfo();
}
@@ -2272,7 +2276,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_game.h b/engines/wintermute/ad/ad_game.h
index 81c79a3da8..2032a1723f 100644
--- a/engines/wintermute/ad/ad_game.h
+++ b/engines/wintermute/ad/ad_game.h
@@ -44,15 +44,15 @@ class AdResponseContext;
class AdResponseBox;
class AdGame : public BaseGame {
public:
- virtual bool onScriptShutdown(ScScript *script);
+ virtual bool onScriptShutdown(ScScript *script) override;
- virtual bool onMouseLeftDown();
- virtual bool onMouseLeftUp();
- virtual bool onMouseLeftDblClick();
- virtual bool onMouseRightDown();
- virtual bool onMouseRightUp();
+ virtual bool onMouseLeftDown() override;
+ virtual bool onMouseLeftUp() override;
+ virtual bool onMouseLeftDblClick() override;
+ virtual bool onMouseRightDown() override;
+ virtual bool onMouseRightUp() override;
- virtual bool displayDebugInfo();
+ virtual bool displayDebugInfo() override;
bool addSpeechDir(const char *dir);
bool removeSpeechDir(const char *dir);
@@ -63,37 +63,37 @@ public:
bool _tempDisableSaveState;
virtual bool resetContent();
bool addItem(AdItem *item);
- AdItem *getItemByName(const char *name);
+ AdItem *getItemByName(const char *name) const;
AdObject *_inventoryOwner;
bool isItemTaken(char *itemName);
bool registerInventory(AdInventory *inv);
bool unregisterInventory(AdInventory *inv);
- virtual bool displayContent(bool update = true, bool displayAll = false);
+ virtual bool displayContent(bool update = true, bool displayAll = false) override;
- bool gameResponseUsed(int ID);
+ bool gameResponseUsed(int ID) const;
bool addGameResponse(int ID);
bool resetResponse(int ID);
- bool branchResponseUsed(int ID);
+ bool branchResponseUsed(int ID) const;
bool addBranchResponse(int ID);
bool clearBranchResponses(char *name);
bool startDlgBranch(const char *branchName, const char *scriptName, const char *eventName);
bool endDlgBranch(const char *branchName, const char *scriptName, const char *eventName);
- virtual bool windowLoadHook(UIWindow *win, char **buf, char **params);
- virtual bool windowScriptMethodHook(UIWindow *win, ScScript *script, ScStack *stack, const char *name);
+ virtual bool windowLoadHook(UIWindow *win, char **buf, char **params) override;
+ virtual bool windowScriptMethodHook(UIWindow *win, ScScript *script, ScStack *stack, const char *name) override;
AdSceneState *getSceneState(const char *filename, bool saving);
BaseViewport *_sceneViewport;
- int _texItemLifeTime;
- int _texWalkLifeTime;
- int _texStandLifeTime;
- int _texTalkLifeTime;
+ int32 _texItemLifeTime;
+ int32 _texWalkLifeTime;
+ int32 _texStandLifeTime;
+ int32 _texTalkLifeTime;
TTalkSkipButton _talkSkipButton;
- virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor);
+ virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const override;
bool scheduleChangeScene(const char *filename, bool fadeIn);
void setPrevSceneName(const char *name);
void setPrevSceneFilename(const char *name);
@@ -126,12 +126,12 @@ public:
bool loadItemsBuffer(byte *buffer, bool merge = false);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
bool validMouse();
private:
- virtual bool externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
+ virtual bool externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) override;
AdObject *_invObject;
BaseArray<AdInventory *> _inventories;
@@ -151,8 +151,8 @@ private:
BaseArray<AdSceneState *> _sceneStates;
BaseArray<char *> _dlgPendingBranches;
- BaseArray<AdResponseContext *> _responsesBranch;
- BaseArray<AdResponseContext *> _responsesGame;
+ BaseArray<const AdResponseContext *> _responsesBranch;
+ BaseArray<const AdResponseContext *> _responsesGame;
AdResponseBox *_responseBox;
AdInventoryBox *_inventoryBox;
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..999200b465 100644
--- a/engines/wintermute/ad/ad_inventory.h
+++ b/engines/wintermute/ad/ad_inventory.h
@@ -40,11 +40,11 @@ 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;
- int _scrollOffset;
+ int32 _scrollOffset;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_inventory_box.cpp b/engines/wintermute/ad/ad_inventory_box.cpp
index 7ae8ff8d69..110359917b 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;
}
@@ -84,7 +84,7 @@ bool AdInventoryBox::listen(BaseScriptHolder *param1, uint32 param2) {
_visible = false;
} else if (scumm_stricmp(obj->getName(), "prev") == 0) {
_scrollOffset -= _scrollBy;
- _scrollOffset = MAX(_scrollOffset, 0);
+ _scrollOffset = MAX<int32>(_scrollOffset, 0);
} else if (scumm_stricmp(obj->getName(), "next") == 0) {
_scrollOffset += _scrollBy;
} else {
@@ -120,8 +120,8 @@ bool AdInventoryBox::display() {
if (_closeButton) {
_closeButton->_posX = _closeButton->_posY = 0;
- _closeButton->_width = _gameRef->_renderer->_width;
- _closeButton->_height = _gameRef->_renderer->_height;
+ _closeButton->_width = _gameRef->_renderer->getWidth();
+ _closeButton->_height = _gameRef->_renderer->getHeight();
_closeButton->display();
}
@@ -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);
@@ -371,7 +371,7 @@ bool AdInventoryBox::saveAsText(BaseDynamicBuffer *buffer, int indent) {
bool AdInventoryBox::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_closeButton));
+ persistMgr->transferPtr(TMEMBER_PTR(_closeButton));
persistMgr->transfer(TMEMBER(_hideSelected));
persistMgr->transfer(TMEMBER(_itemHeight));
persistMgr->transfer(TMEMBER(_itemsArea));
@@ -380,7 +380,7 @@ bool AdInventoryBox::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_scrollOffset));
persistMgr->transfer(TMEMBER(_spacing));
persistMgr->transfer(TMEMBER(_visible));
- persistMgr->transfer(TMEMBER(_window));
+ persistMgr->transferPtr(TMEMBER_PTR(_window));
persistMgr->transfer(TMEMBER(_exclusive));
return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_inventory_box.h b/engines/wintermute/ad/ad_inventory_box.h
index cb6d084562..9792b1ea66 100644
--- a/engines/wintermute/ad/ad_inventory_box.h
+++ b/engines/wintermute/ad/ad_inventory_box.h
@@ -43,8 +43,8 @@ public:
bool _visible;
virtual bool display();
UIButton *_closeButton;
- int _spacing;
- int _scrollOffset;
+ int32 _spacing;
+ int32 _scrollOffset;
Rect32 _itemsArea;
bool listen(BaseScriptHolder *param1, uint32 param2);
UIWindow *_window;
@@ -52,12 +52,12 @@ public:
virtual ~AdInventoryBox();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
private:
bool _exclusive;
- int _scrollBy;
- int _itemHeight;
- int _itemWidth;
+ int32 _scrollBy;
+ int32 _itemHeight;
+ int32 _itemWidth;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_item.cpp b/engines/wintermute/ad/ad_item.cpp
index 427b1c7db4..1a46eb783b 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;
}
@@ -378,11 +378,11 @@ bool AdItem::update() {
_tempSprite2 = _sentence->_currentSprite;
}
- 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)) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->getTimer()->getTime() - _sentence->_startTime);
+ 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());
}
@@ -784,9 +784,9 @@ bool AdItem::persist(BasePersistenceManager *persistMgr) {
AdTalkHolder::persist(persistMgr);
persistMgr->transfer(TMEMBER(_cursorCombined));
- persistMgr->transfer(TMEMBER(_cursorHover));
- persistMgr->transfer(TMEMBER(_cursorNormal));
- persistMgr->transfer(TMEMBER(_spriteHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_cursorHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_cursorNormal));
+ persistMgr->transferPtr(TMEMBER_PTR(_spriteHover));
persistMgr->transfer(TMEMBER(_inInventory));
persistMgr->transfer(TMEMBER(_displayAmount));
persistMgr->transfer(TMEMBER(_amount));
diff --git a/engines/wintermute/ad/ad_item.h b/engines/wintermute/ad/ad_item.h
index 79978f9f72..b8351448a7 100644
--- a/engines/wintermute/ad/ad_item.h
+++ b/engines/wintermute/ad/ad_item.h
@@ -51,15 +51,15 @@ public:
bool loadBuffer(byte *buffer, bool complete = true);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
private:
bool _displayAmount;
- int _amount;
- int _amountOffsetX;
- int _amountOffsetY;
+ int32 _amount;
+ int32 _amountOffsetX;
+ int32 _amountOffsetY;
TTextAlign _amountAlign;
char *_amountString;
};
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_layer.h b/engines/wintermute/ad/ad_layer.h
index de65e2822f..8fe4d4f91e 100644
--- a/engines/wintermute/ad/ad_layer.h
+++ b/engines/wintermute/ad/ad_layer.h
@@ -36,21 +36,21 @@ public:
bool _closeUp;
DECLARE_PERSISTENT(AdLayer, BaseObject)
bool _active;
- int _height;
- int _width;
+ int32 _height;
+ int32 _width;
bool _main;
AdLayer(BaseGame *inGame);
virtual ~AdLayer();
BaseArray<AdSceneNode *> _nodes;
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp
index 493156c750..d52201a08d 100644
--- a/engines/wintermute/ad/ad_node_state.cpp
+++ b/engines/wintermute/ad/ad_node_state.cpp
@@ -29,7 +29,6 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/ad/ad_node_state.h"
#include "engines/wintermute/ad/ad_entity.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/utils/utils.h"
#include "engines/wintermute/platform_osystem.h"
@@ -42,14 +41,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 +57,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 +70,7 @@ AdNodeState::~AdNodeState() {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setName(const char *name) {
delete[] _name;
- _name = NULL;
+ _name = nullptr;
BaseUtils::setString(&_name, name);
}
@@ -79,7 +78,7 @@ void AdNodeState::setName(const char *name) {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setFilename(const char *filename) {
delete[] _filename;
- _filename = NULL;
+ _filename = nullptr;
BaseUtils::setString(&_filename, filename);
}
@@ -87,14 +86,14 @@ void AdNodeState::setFilename(const char *filename) {
//////////////////////////////////////////////////////////////////////////
void AdNodeState::setCursor(const char *filename) {
delete[] _cursor;
- _cursor = NULL;
+ _cursor = nullptr;
BaseUtils::setString(&_cursor, filename);
}
//////////////////////////////////////////////////////////////////////////
bool AdNodeState::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_active));
persistMgr->transfer(TMEMBER(_name));
@@ -122,7 +121,7 @@ void AdNodeState::setCaption(const char *caption, int caseVal) {
_caption[caseVal - 1] = new char[strlen(caption) + 1];
if (_caption[caseVal - 1]) {
strcpy(_caption[caseVal - 1], caption);
- _gameRef->_stringTable->expand(&_caption[caseVal - 1]);
+ _gameRef->expandStringByStringTable(&_caption[caseVal - 1]);
}
}
@@ -132,7 +131,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 7b91daab2e..741d6e6fc6 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -38,7 +38,6 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_frame.h"
#include "engines/wintermute/base/base_sprite.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_sub_frame.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/font/base_font.h"
@@ -65,27 +64,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 +92,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 +108,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 +135,7 @@ AdObject::~AdObject() {
if (_inventory) {
((AdGame *)_gameRef)->unregisterInventory(_inventory);
- _inventory = NULL;
+ _inventory = nullptr;
}
if (_partEmitter) {
@@ -159,7 +158,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 +168,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 +273,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 +285,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 +308,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 +333,7 @@ bool AdObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
}
if (!regFound) {
- _stickRegion = NULL;
+ _stickRegion = nullptr;
}
stack->pushBool(regFound);
return STATUS_OK;
@@ -348,7 +347,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 +384,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 +511,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 +532,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 +610,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 +644,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 +850,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;
}
}
@@ -865,19 +864,22 @@ int AdObject::getHeight() {
return 0;
} else {
BaseFrame *frame = _currentSprite->_frames[_currentSprite->_currentFrame];
- int ret = 0;
+ int32 ret = 0;
for (uint32 i = 0; i < frame->_subframes.size(); i++) {
ret = MAX(ret, frame->_subframes[i]->_hotspotY);
}
if (_zoomable) {
float zoom = ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY);
- ret = (int)(ret * zoom / 100);
+ ret = (int32)(ret * zoom / 100);
}
return ret;
}
}
+TObjectType AdObject::getType() const {
+ return _type;
+}
//////////////////////////////////////////////////////////////////////////
void AdObject::talk(const char *text, const char *sound, uint32 duration, const char *stances, TTextAlign Align) {
@@ -890,27 +892,27 @@ 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);
+ _gameRef->expandStringByStringTable(&_sentence->_text);
_sentence->setStances(stances);
_sentence->_duration = duration;
_sentence->_align = Align;
- _sentence->_startTime = _gameRef->_timer;
+ _sentence->_startTime = _gameRef->getTimer()->getTime();
_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
bool deleteSound = false;
if (!sound) {
- char *key = _gameRef->_stringTable->getKey(text);
+ char *key = _gameRef->getKeyFromStringTable(text);
if (key) {
sound = ((AdGame *)_gameRef)->findSpeechFile(key);
delete[] key;
@@ -939,11 +941,11 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
// set duration by text length
if (_sentence->_duration <= 0) {// TODO: Avoid longs.
- _sentence->_duration = MAX((size_t)1000, _gameRef->_subtitlesSpeed * strlen(_sentence->_text));
+ _sentence->_duration = MAX<int32>((size_t)1000, _gameRef->_subtitlesSpeed * strlen(_sentence->_text));
}
- int x, y, width, height;
+ int32 x, y, width, height;
x = _posX;
y = _posY;
@@ -957,10 +959,10 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
if (_subtitlesWidth > 0) {
width = _subtitlesWidth;
} else {
- if ((x < _gameRef->_renderer->_width / 4 || x > _gameRef->_renderer->_width * 0.75) && !_gameRef->_touchInterface) {
- width = MAX(_gameRef->_renderer->_width / 4, MIN(x * 2, (_gameRef->_renderer->_width - x) * 2));
+ if ((x < _gameRef->_renderer->getWidth() / 4 || x > _gameRef->_renderer->getWidth() * 0.75) && !_gameRef->_touchInterface) {
+ width = MAX(_gameRef->_renderer->getWidth() / 4, MIN(x * 2, (_gameRef->_renderer->getWidth() - x) * 2));
} else {
- width = _gameRef->_renderer->_width / 2;
+ width = _gameRef->_renderer->getWidth() / 2;
}
}
@@ -979,8 +981,8 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
}
- x = MIN(MAX(0, x), _gameRef->_renderer->_width - width);
- y = MIN(MAX(0, y), _gameRef->_renderer->_height - height);
+ x = MIN(MAX<int32>(0, x), _gameRef->_renderer->getWidth() - width);
+ y = MIN(MAX<int32>(0, y), _gameRef->_renderer->getHeight() - height);
_sentence->_width = width;
@@ -1009,9 +1011,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();
}
@@ -1029,39 +1031,39 @@ bool AdObject::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
persistMgr->transfer(TMEMBER(_active));
- persistMgr->transfer(TMEMBER(_blockRegion));
- persistMgr->transfer(TMEMBER(_currentBlockRegion));
- persistMgr->transfer(TMEMBER(_currentWptGroup));
- persistMgr->transfer(TMEMBER(_currentSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_blockRegion));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentBlockRegion));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentWptGroup));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentSprite));
persistMgr->transfer(TMEMBER(_drawn));
- persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transferPtr(TMEMBER_PTR(_font));
persistMgr->transfer(TMEMBER(_ignoreItems));
persistMgr->transfer(TMEMBER_INT(_nextState));
- persistMgr->transfer(TMEMBER(_sentence));
+ persistMgr->transferPtr(TMEMBER_PTR(_sentence));
persistMgr->transfer(TMEMBER_INT(_state));
- persistMgr->transfer(TMEMBER(_animSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_animSprite));
persistMgr->transfer(TMEMBER(_sceneIndependent));
persistMgr->transfer(TMEMBER(_forcedTalkAnimName));
persistMgr->transfer(TMEMBER(_forcedTalkAnimUsed));
- persistMgr->transfer(TMEMBER(_tempSprite2));
+ persistMgr->transferPtr(TMEMBER_PTR(_tempSprite2));
persistMgr->transfer(TMEMBER_INT(_type));
- persistMgr->transfer(TMEMBER(_wptGroup));
- persistMgr->transfer(TMEMBER(_stickRegion));
+ persistMgr->transferPtr(TMEMBER_PTR(_wptGroup));
+ persistMgr->transferPtr(TMEMBER_PTR(_stickRegion));
persistMgr->transfer(TMEMBER(_subtitlesModRelative));
persistMgr->transfer(TMEMBER(_subtitlesModX));
persistMgr->transfer(TMEMBER(_subtitlesModY));
persistMgr->transfer(TMEMBER(_subtitlesModXCenter));
persistMgr->transfer(TMEMBER(_subtitlesWidth));
- persistMgr->transfer(TMEMBER(_inventory));
- persistMgr->transfer(TMEMBER(_partEmitter));
+ persistMgr->transferPtr(TMEMBER_PTR(_inventory));
+ persistMgr->transferPtr(TMEMBER_PTR(_partEmitter));
for (int i = 0; i < MAX_NUM_REGIONS; i++) {
- persistMgr->transfer(TMEMBER(_currentRegions[i]));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentRegions[i]));
}
_attachmentsPre.persist(persistMgr);
_attachmentsPost.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_registerAlias));
+ persistMgr->transferPtr(TMEMBER_PTR(_registerAlias));
persistMgr->transfer(TMEMBER(_partFollowParent));
persistMgr->transfer(TMEMBER(_partOffsetX));
@@ -1154,7 +1156,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;
}
@@ -1177,7 +1179,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 d1a20908e1..c6573315da 100644
--- a/engines/wintermute/ad/ad_object.h
+++ b/engines/wintermute/ad/ad_object.h
@@ -46,77 +46,81 @@ class PartEmitter;
class AdObject : public BaseObject {
public:
- PartEmitter *_partEmitter;
virtual PartEmitter *createParticleEmitter(bool followParent = false, int offsetX = 0, int offsetY = 0);
virtual bool updatePartEmitter();
- bool _partFollowParent;
- int _partOffsetX;
- int _partOffsetY;
bool invalidateCurrRegions();
- bool _subtitlesModRelative;
- bool _subtitlesModXCenter;
- int _subtitlesModX;
- int _subtitlesModY;
- int _subtitlesWidth;
AdRegion *_stickRegion;
bool _sceneIndependent;
- bool _ignoreItems;
+
bool updateBlockRegion();
- bool _forcedTalkAnimUsed;
- char *_forcedTalkAnimName;
- virtual bool getExtendedFlag(const char *flagName);
- virtual bool resetSoundPan();
- virtual bool updateSounds();
+
+ virtual bool getExtendedFlag(const char *flagName) override;
+ virtual bool resetSoundPan() override;
+ virtual bool updateSounds() override;
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 int getHeight();
- AdSentence *_sentence;
+ virtual void talk(const char *text, const char *sound = nullptr, uint32 duration = 0, const char *stances = nullptr, TTextAlign align = TAL_CENTER);
+ virtual int getHeight() override;
+
bool setFont(const char *filename);
- virtual bool update();
- virtual bool display();
+ virtual bool update() override;
+ virtual bool display() override;
+
bool _drawn;
bool _active;
virtual bool playAnim(const char *filename);
- BaseSprite *_animSprite;
- BaseSprite *_currentSprite;
- TObjectState _state;
- TObjectState _nextState;
- TObjectType _type;
+
+ TObjectType getType() const;
AdObject(BaseGame *inGame);
virtual ~AdObject();
- BaseFont *_font;
- BaseSprite *_tempSprite2;
- BaseRegion *_blockRegion;
- AdWaypointGroup *_wptGroup;
+
BaseRegion *_currentBlockRegion;
AdWaypointGroup *_currentWptGroup;
AdInventory *getInventory();
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
-
- virtual bool afterMove();
- AdRegion *_currentRegions[MAX_NUM_REGIONS];
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
+ virtual bool afterMove() override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
-
- BaseArray<AdObject *> _attachmentsPre;
- BaseArray<AdObject *> _attachmentsPost;
-
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
bool updateSpriteAttachments();
bool displaySpriteAttachments(bool preDisplay);
+
+protected:
+ PartEmitter *_partEmitter;
+ bool _ignoreItems;
+ bool _forcedTalkAnimUsed;
+ char *_forcedTalkAnimName;
+ BaseSprite *_animSprite;
+ BaseSprite *_currentSprite;
+ AdSentence *_sentence;
+ TObjectState _state;
+ TObjectState _nextState;
+ TObjectType _type;
+ BaseFont *_font;
+ BaseSprite *_tempSprite2;
+ BaseRegion *_blockRegion;
+ AdWaypointGroup *_wptGroup;
AdObject *_registerAlias;
+ bool getScale(float *scaleX, float *scaleY);
private:
+ bool _partFollowParent;
+ int32 _partOffsetX;
+ int32 _partOffsetY;
+ bool _subtitlesModRelative;
+ bool _subtitlesModXCenter;
+ int32 _subtitlesModX;
+ int32 _subtitlesModY;
+ int32 _subtitlesWidth;
+ AdRegion *_currentRegions[MAX_NUM_REGIONS];
+ BaseArray<AdObject *> _attachmentsPre;
+ BaseArray<AdObject *> _attachmentsPost;
bool displaySpriteAttachment(AdObject *attachment);
AdInventory *_inventory;
-
-protected:
- bool getScale(float *scaleX, float *scaleY);
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_path.cpp b/engines/wintermute/ad/ad_path.cpp
index c931213456..5b36ed6471 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;
}
}
@@ -108,7 +108,7 @@ bool AdPath::setReady(bool ready) {
//////////////////////////////////////////////////////////////////////////
bool AdPath::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_currIndex));
_points.persist(persistMgr);
diff --git a/engines/wintermute/ad/ad_path.h b/engines/wintermute/ad/ad_path.h
index 6b043197aa..3f38355b94 100644
--- a/engines/wintermute/ad/ad_path.h
+++ b/engines/wintermute/ad/ad_path.h
@@ -47,7 +47,7 @@ public:
AdPath(BaseGame *inGame);
virtual ~AdPath();
BaseArray<BasePoint *> _points;
- int _currIndex;
+ int32 _currIndex;
bool _ready;
};
diff --git a/engines/wintermute/ad/ad_path_point.cpp b/engines/wintermute/ad/ad_path_point.cpp
index a36648eb69..be4b487466 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;
}
@@ -67,7 +67,7 @@ bool AdPathPoint::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_distance));
persistMgr->transfer(TMEMBER(_marked));
- persistMgr->transfer(TMEMBER(_origin));
+ persistMgr->transferPtr(TMEMBER_PTR(_origin));
return STATUS_OK;
}
diff --git a/engines/wintermute/ad/ad_path_point.h b/engines/wintermute/ad/ad_path_point.h
index 58457976c8..04648b1733 100644
--- a/engines/wintermute/ad/ad_path_point.h
+++ b/engines/wintermute/ad/ad_path_point.h
@@ -42,7 +42,7 @@ public:
virtual ~AdPathPoint();
AdPathPoint *_origin;
bool _marked;
- int _distance;
+ int32 _distance;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_region.cpp b/engines/wintermute/ad/ad_region.cpp
index c9f1553c9a..acd5f13397 100644
--- a/engines/wintermute/ad/ad_region.cpp
+++ b/engines/wintermute/ad/ad_region.cpp
@@ -51,11 +51,26 @@ AdRegion::AdRegion(BaseGame *inGame) : BaseRegion(inGame) {
AdRegion::~AdRegion() {
}
+uint32 AdRegion::getAlpha() const {
+ return _alpha;
+}
+
+float AdRegion::getZoom() const {
+ return _zoom;
+}
+
+bool AdRegion::isBlocked() const {
+ return _blocked;
+}
+
+bool AdRegion::hasDecoration() const {
+ return _decoration;
+}
//////////////////////////////////////////////////////////////////////////
bool AdRegion::loadFile(const char *filename) {
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_region.h b/engines/wintermute/ad/ad_region.h
index 6112900361..bc9eab085e 100644
--- a/engines/wintermute/ad/ad_region.h
+++ b/engines/wintermute/ad/ad_region.h
@@ -36,21 +36,27 @@ namespace Wintermute {
class AdRegion : public BaseRegion {
public:
DECLARE_PERSISTENT(AdRegion, BaseRegion)
- uint32 _alpha;
- float _zoom;
- bool _blocked;
- bool _decoration;
+
AdRegion(BaseGame *inGame);
virtual ~AdRegion();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
+ bool hasDecoration() const;
+ bool isBlocked() const;
+ uint32 getAlpha() const;
+ float getZoom() const;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
+private:
+ uint32 _alpha;
+ float _zoom;
+ bool _blocked;
+ bool _decoration;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_response.cpp b/engines/wintermute/ad/ad_response.cpp
index a2225f2632..4483bbc667 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;
@@ -131,16 +131,48 @@ bool AdResponse::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_icon));
- persistMgr->transfer(TMEMBER(_iconHover));
- persistMgr->transfer(TMEMBER(_iconPressed));
+ persistMgr->transferPtr(TMEMBER_PTR(_icon));
+ persistMgr->transferPtr(TMEMBER_PTR(_iconHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_iconPressed));
persistMgr->transfer(TMEMBER(_iD));
persistMgr->transfer(TMEMBER(_text));
persistMgr->transfer(TMEMBER(_textOrig));
persistMgr->transfer(TMEMBER_INT(_responseType));
- persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transferPtr(TMEMBER_PTR(_font));
return STATUS_OK;
}
+void AdResponse::setID(int32 id) {
+ _iD = id;
+}
+
+BaseSprite *AdResponse::getIcon() const {
+ return _icon;
+}
+
+BaseSprite *AdResponse::getIconHover() const {
+ return _iconHover;
+}
+
+BaseSprite *AdResponse::getIconPressed() const {
+ return _iconPressed;
+}
+
+BaseFont *AdResponse::getFont() const {
+ return _font;
+}
+
+int32 AdResponse::getID() const {
+ return _iD;
+}
+
+const char *AdResponse::getText() const {
+ return _text;
+}
+
+const char *AdResponse::getTextOrig() const {
+ return _textOrig;
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_response.h b/engines/wintermute/ad/ad_response.h
index 0ba88cf2e8..57cd302e9d 100644
--- a/engines/wintermute/ad/ad_response.h
+++ b/engines/wintermute/ad/ad_response.h
@@ -43,17 +43,29 @@ public:
bool setIconHover(const char *filename);
bool setIconPressed(const char *filename);
void setText(const char *text);
- int _iD;
+ void setID(int32 id);
+ BaseSprite *getIcon() const;
+ BaseSprite *getIconHover() const;
+ BaseSprite *getIconPressed() const;
+ BaseFont *getFont() const;
+ int32 getID() const;
+
+ const char *getText() const;
+ const char *getTextOrig() const;
+
+ AdResponse(BaseGame *inGame);
+ virtual ~AdResponse();
+ TResponseType _responseType;
+private:
BaseSprite *_icon;
BaseSprite *_iconHover;
BaseSprite *_iconPressed;
BaseFont *_font;
+
+ int32 _iD;
+
char *_text;
char *_textOrig;
- AdResponse(BaseGame *inGame);
- virtual ~AdResponse();
- TResponseType _responseType;
-
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index fb31aa0bb8..a589bf3a30 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,9 +93,12 @@ AdResponseBox::~AdResponseBox() {
clearResponses();
clearButtons();
- _waitingScript = NULL;
+ _waitingScript = nullptr;
}
+uint32 AdResponseBox::getNumResponses() const {
+ return _responses.size();
+}
//////////////////////////////////////////////////////////////////////////
void AdResponseBox::clearResponses() {
@@ -118,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;
@@ -141,16 +144,16 @@ bool AdResponseBox::createButtons() {
btn->_sharedFonts = btn->_sharedImages = true;
btn->_sharedCursors = true;
// iconic
- if (_responses[i]->_icon) {
- btn->_image = _responses[i]->_icon;
- if (_responses[i]->_iconHover) {
- btn->_imageHover = _responses[i]->_iconHover;
+ if (_responses[i]->getIcon()) {
+ btn->_image = _responses[i]->getIcon();
+ if (_responses[i]->getIconHover()) {
+ btn->_imageHover = _responses[i]->getIconHover();
}
- if (_responses[i]->_iconPressed) {
- btn->_imagePress = _responses[i]->_iconPressed;
+ if (_responses[i]->getIconPressed()) {
+ btn->_imagePress = _responses[i]->getIconPressed();
}
- btn->setCaption(_responses[i]->_text);
+ btn->setCaption(_responses[i]->getText());
if (_cursor) {
btn->_cursor = _cursor;
} else if (_gameRef->_activeCursor) {
@@ -159,9 +162,9 @@ 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->setText(_responses[i]->getText());
+ btn->_font = (_font == nullptr) ? _gameRef->getSystemFont() : _font;
+ btn->_fontHover = (_fontHover == nullptr) ? _gameRef->getSystemFont() : _fontHover;
btn->_fontPress = btn->_fontHover;
btn->_align = _align;
@@ -170,13 +173,13 @@ bool AdResponseBox::createButtons() {
}
- if (_responses[i]->_font) {
- btn->_font = _responses[i]->_font;
+ if (_responses[i]->getFont()) {
+ btn->_font = _responses[i]->getFont();
}
btn->_width = _responseArea.right - _responseArea.left;
if (btn->_width <= 0) {
- btn->_width = _gameRef->_renderer->_width;
+ btn->_width = _gameRef->_renderer->getWidth();
}
}
btn->setName("response");
@@ -184,7 +187,7 @@ bool AdResponseBox::createButtons() {
// make the responses touchable
if (_gameRef->_touchInterface) {
- btn->_height = MAX(btn->_height, 50);
+ btn->_height = MAX<int32>(btn->_height, 50);
}
//btn->SetListener(this, btn, _responses[i]->_iD);
@@ -193,7 +196,7 @@ bool AdResponseBox::createButtons() {
_respButtons.add(btn);
if (_responseArea.bottom - _responseArea.top < btn->_height) {
- _gameRef->LOG(0, "Warning: Response '%s' is too high to be displayed within response box. Correcting.", _responses[i]->_text);
+ _gameRef->LOG(0, "Warning: Response '%s' is too high to be displayed within response box. Correcting.", _responses[i]->getText());
_responseArea.bottom += (btn->_height - (_responseArea.bottom - _responseArea.top));
}
}
@@ -207,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;
}
@@ -284,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;
@@ -352,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;
@@ -512,8 +515,8 @@ bool AdResponseBox::display() {
// go exclusive
if (_shieldWindow) {
_shieldWindow->_posX = _shieldWindow->_posY = 0;
- _shieldWindow->_width = _gameRef->_renderer->_width;
- _shieldWindow->_height = _gameRef->_renderer->_height;
+ _shieldWindow->_width = _gameRef->_renderer->getWidth();
+ _shieldWindow->_height = _gameRef->_renderer->getHeight();
_shieldWindow->display();
}
@@ -545,10 +548,10 @@ bool AdResponseBox::listen(BaseScriptHolder *param1, uint32 param2) {
_scrollOffset++;
} else if (scumm_stricmp(obj->getName(), "response") == 0) {
if (_waitingScript) {
- _waitingScript->_stack->pushInt(_responses[param2]->_iD);
+ _waitingScript->_stack->pushInt(_responses[param2]->getID());
}
handleResponse(_responses[param2]);
- _waitingScript = NULL;
+ _waitingScript = nullptr;
_gameRef->_state = GAME_RUNNING;
((AdGame *)_gameRef)->_stateEx = GAME_NORMAL;
_ready = true;
@@ -570,8 +573,8 @@ bool AdResponseBox::listen(BaseScriptHolder *param1, uint32 param2) {
bool AdResponseBox::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_font));
- persistMgr->transfer(TMEMBER(_fontHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_font));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontHover));
persistMgr->transfer(TMEMBER(_horizontal));
persistMgr->transfer(TMEMBER(_lastResponseText));
persistMgr->transfer(TMEMBER(_lastResponseTextOrig));
@@ -579,10 +582,10 @@ bool AdResponseBox::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_responseArea));
_responses.persist(persistMgr);
persistMgr->transfer(TMEMBER(_scrollOffset));
- persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transferPtr(TMEMBER_PTR(_shieldWindow));
persistMgr->transfer(TMEMBER(_spacing));
- persistMgr->transfer(TMEMBER(_waitingScript));
- persistMgr->transfer(TMEMBER(_window));
+ persistMgr->transferPtr(TMEMBER_PTR(_waitingScript));
+ persistMgr->transferPtr(TMEMBER_PTR(_window));
persistMgr->transfer(TMEMBER_INT(_verticalAlign));
persistMgr->transfer(TMEMBER_INT(_align));
@@ -598,7 +601,7 @@ bool AdResponseBox::weedResponses() {
for (uint32 i = 0; i < _responses.size(); i++) {
switch (_responses[i]->_responseType) {
case RESPONSE_ONCE:
- if (adGame->branchResponseUsed(_responses[i]->_iD)) {
+ if (adGame->branchResponseUsed(_responses[i]->getID())) {
delete _responses[i];
_responses.remove_at(i);
i--;
@@ -606,7 +609,7 @@ bool AdResponseBox::weedResponses() {
break;
case RESPONSE_ONCE_GAME:
- if (adGame->gameResponseUsed(_responses[i]->_iD)) {
+ if (adGame->gameResponseUsed(_responses[i]->getID())) {
delete _responses[i];
_responses.remove_at(i);
i--;
@@ -627,20 +630,44 @@ void AdResponseBox::setLastResponseText(const char *text, const char *textOrig)
BaseUtils::setString(&_lastResponseTextOrig, textOrig);
}
+const char *AdResponseBox::getLastResponseText() const {
+ return _lastResponseText;
+}
+
+const char *AdResponseBox::getLastResponseTextOrig() const {
+ return _lastResponseTextOrig;
+}
+
+UIWindow *AdResponseBox::getResponseWindow() {
+ return _window;
+}
+
+void AdResponseBox::addResponse(const AdResponse *response) {
+ _responses.add(response);
+}
+
+int32 AdResponseBox::getIdForResponseNum(uint32 num) const {
+ assert(num < _responses.size());
+ return _responses[num]->getID();
+}
+
+bool AdResponseBox::handleResponseNum(uint32 num) {
+ return handleResponse(_responses[num]);
+}
//////////////////////////////////////////////////////////////////////////
-bool AdResponseBox::handleResponse(AdResponse *response) {
- setLastResponseText(response->_text, response->_textOrig);
+bool AdResponseBox::handleResponse(const AdResponse *response) {
+ setLastResponseText(response->getText(), response->getTextOrig());
AdGame *adGame = (AdGame *)_gameRef;
switch (response->_responseType) {
case RESPONSE_ONCE:
- adGame->addBranchResponse(response->_iD);
+ adGame->addBranchResponse(response->getID());
break;
case RESPONSE_ONCE_GAME:
- adGame->addGameResponse(response->_iD);
+ adGame->addGameResponse(response->getID());
break;
default:
debugC(kWintermuteDebugGeneral, "AdResponseBox::HandleResponse - Unhandled enum");
@@ -656,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) {
@@ -671,7 +698,7 @@ BaseObject *AdResponseBox::getNextAccessObject(BaseObject *currObject) {
}
return objects[0];
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -680,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) {
@@ -695,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_box.h b/engines/wintermute/ad/ad_response_box.h
index 35f8cb6347..cb57b98924 100644
--- a/engines/wintermute/ad/ad_response_box.h
+++ b/engines/wintermute/ad/ad_response_box.h
@@ -44,10 +44,14 @@ public:
BaseObject *getPrevAccessObject(BaseObject *CurrObject);
bool getObjects(BaseArray<UIObject *> &objects, bool interactiveOnly);
- bool handleResponse(AdResponse *response);
+ void addResponse(const AdResponse* response);
+ bool handleResponse(const AdResponse *response);
+ bool handleResponseNum(uint32 num);
+ int32 getIdForResponseNum(uint32 num) const;
void setLastResponseText(const char *text, const char *textOrig);
- char *_lastResponseText;
- char *_lastResponseTextOrig;
+ const char *getLastResponseText() const;
+ const char *getLastResponseTextOrig() const;
+
DECLARE_PERSISTENT(AdResponseBox, BaseObject)
ScScript *_waitingScript;
virtual bool listen(BaseScriptHolder *param1, uint32 param2);
@@ -59,27 +63,35 @@ public:
bool weedResponses();
bool display();
- int _spacing;
- int _scrollOffset;
- BaseFont *_fontHover;
- BaseFont *_font;
+
bool createButtons();
bool invalidateButtons();
void clearButtons();
void clearResponses();
AdResponseBox(BaseGame *inGame);
virtual ~AdResponseBox();
- BaseArray<AdResponse *> _responses;
- BaseArray<UIButton *> _respButtons;
- UIWindow *_window;
- UIWindow *_shieldWindow;
+
+ bool loadFile(const char *filename);
+ bool loadBuffer(byte *buffer, bool complete = true);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
+
+ UIWindow *getResponseWindow();
+ uint32 getNumResponses() const;
+private:
+ int32 _spacing;
+ int32 _scrollOffset;
+ BaseFont *_fontHover;
+ BaseFont *_font;
bool _horizontal;
Rect32 _responseArea;
- int _verticalAlign;
+ int32 _verticalAlign;
TTextAlign _align;
- bool loadFile(const char *filename);
- bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ BaseArray<UIButton *> _respButtons;
+ BaseArray<const AdResponse *> _responses;
+ UIWindow *_shieldWindow;
+ char *_lastResponseText;
+ char *_lastResponseTextOrig;
+ UIWindow *_window;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_response_context.cpp b/engines/wintermute/ad/ad_response_context.cpp
index ebfa03feea..663ef49a24 100644
--- a/engines/wintermute/ad/ad_response_context.cpp
+++ b/engines/wintermute/ad/ad_response_context.cpp
@@ -36,20 +36,20 @@ IMPLEMENT_PERSISTENT(AdResponseContext, false)
//////////////////////////////////////////////////////////////////////////
AdResponseContext::AdResponseContext(BaseGame *inGame) : BaseClass(inGame) {
_id = 0;
- _context = NULL;
+ _context = nullptr;
}
//////////////////////////////////////////////////////////////////////////
AdResponseContext::~AdResponseContext() {
delete[] _context;
- _context = NULL;
+ _context = nullptr;
}
//////////////////////////////////////////////////////////////////////////
bool AdResponseContext::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_context));
persistMgr->transfer(TMEMBER(_id));
@@ -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_response_context.h b/engines/wintermute/ad/ad_response_context.h
index 14bc1abd93..dd0008a728 100644
--- a/engines/wintermute/ad/ad_response_context.h
+++ b/engines/wintermute/ad/ad_response_context.h
@@ -37,12 +37,14 @@ namespace Wintermute {
class AdResponseContext : public BaseClass {
public:
void setContext(const char *context);
- int _id;
- char *_context;
+ const char *getContext() const { return _context; }
+ int32 _id;
+
DECLARE_PERSISTENT(AdResponseContext, BaseClass)
AdResponseContext(BaseGame *inGame);
virtual ~AdResponseContext();
-
+private:
+ char *_context;
};
} // end of namespace Wintermute
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_rot_level.h b/engines/wintermute/ad/ad_rot_level.h
index d7f5f8edf0..3466e46ba5 100644
--- a/engines/wintermute/ad/ad_rot_level.h
+++ b/engines/wintermute/ad/ad_rot_level.h
@@ -34,12 +34,13 @@
namespace Wintermute {
class AdRotLevel : public BaseObject {
+ float _rotation;
public:
DECLARE_PERSISTENT(AdRotLevel, BaseObject)
AdRotLevel(BaseGame *inGame);
virtual ~AdRotLevel();
- float _rotation;
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ float getRotation() const { return _rotation; }
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
};
diff --git a/engines/wintermute/ad/ad_scale_level.cpp b/engines/wintermute/ad/ad_scale_level.cpp
index 4e9293d875..e80f38bd0f 100644
--- a/engines/wintermute/ad/ad_scale_level.cpp
+++ b/engines/wintermute/ad/ad_scale_level.cpp
@@ -48,11 +48,14 @@ AdScaleLevel::~AdScaleLevel() {
}
+float AdScaleLevel::getScale() const {
+ return _scale;
+}
//////////////////////////////////////////////////////////////////////////
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_scale_level.h b/engines/wintermute/ad/ad_scale_level.h
index 628a385eb4..516f507a5a 100644
--- a/engines/wintermute/ad/ad_scale_level.h
+++ b/engines/wintermute/ad/ad_scale_level.h
@@ -37,12 +37,14 @@ namespace Wintermute {
class AdScaleLevel : public BaseObject {
public:
DECLARE_PERSISTENT(AdScaleLevel, BaseObject)
- float _scale;
AdScaleLevel(BaseGame *inGame);
virtual ~AdScaleLevel();
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
+ float getScale() const;
+private:
+ float _scale;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index 8e9beca0c0..4d0068fad1 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,14 +182,14 @@ void AdScene::cleanup() {
_objects.clear();
delete _viewport;
- _viewport = NULL;
+ _viewport = nullptr;
setDefaults();
}
//////////////////////////////////////////////////////////////////////////
-bool AdScene::getPath(BasePoint source, BasePoint target, AdPath *path, BaseObject *requester) {
+bool AdScene::getPath(const BasePoint &source, const BasePoint &target, AdPath *path, BaseObject *requester) {
if (!_pfReady) {
return false;
} else {
@@ -287,9 +287,9 @@ float AdScene::getZoomAt(int x, int y) {
if (_mainLayer) {
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_blocked && node->_region->pointInRegion(x, y)) {
- if (node->_region->_zoom != 0) {
- ret = node->_region->_zoom;
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->isBlocked() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->getZoom() != 0) {
+ ret = node->_region->getZoom();
found = true;
break;
}
@@ -320,9 +320,9 @@ uint32 AdScene::getAlphaAt(int x, int y, bool colorCheck) {
if (_mainLayer) {
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && (colorCheck || !node->_region->_blocked) && node->_region->pointInRegion(x, y)) {
- if (!node->_region->_blocked) {
- ret = node->_region->_alpha;
+ if (node->_type == OBJECT_REGION && node->_region->_active && (colorCheck || !node->_region->isBlocked()) && node->_region->pointInRegion(x, y)) {
+ if (!node->_region->isBlocked()) {
+ ret = node->_region->getAlpha();
}
break;
}
@@ -365,8 +365,8 @@ bool AdScene::isBlockedAt(int x, int y, bool checkFreeObjects, BaseObject *reque
break;
}
*/
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_decoration && node->_region->pointInRegion(x, y)) {
- if (node->_region->_blocked) {
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->hasDecoration() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->isBlocked()) {
ret = true;
break;
} else {
@@ -405,8 +405,8 @@ bool AdScene::isWalkableAt(int x, int y, bool checkFreeObjects, BaseObject *requ
if (_mainLayer) {
for (uint32 i = 0; i < _mainLayer->_nodes.size(); i++) {
AdSceneNode *node = _mainLayer->_nodes[i];
- if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->_decoration && node->_region->pointInRegion(x, y)) {
- if (node->_region->_blocked) {
+ if (node->_type == OBJECT_REGION && node->_region->_active && !node->_region->hasDecoration() && node->_region->pointInRegion(x, y)) {
+ if (node->_region->isBlocked()) {
ret = false;
break;
} else {
@@ -420,7 +420,7 @@ bool AdScene::isWalkableAt(int x, int y, bool checkFreeObjects, BaseObject *requ
//////////////////////////////////////////////////////////////////////////
-int AdScene::getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester) {
+int AdScene::getPointsDist(const BasePoint &p1, const BasePoint &p2, BaseObject *requester) {
double xStep, yStep, x, y;
int xLength, yLength, xCount, yCount;
int x1, y1, x2, y2;
@@ -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,13 +749,13 @@ 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;
case TOKEN_CAMERA:
- strcpy(camera, (char *)params);
+ Common::strlcpy(camera, (char *)params, MAX_PATH_LENGTH);
break;
case TOKEN_EDITOR_MARGIN_H:
@@ -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);
}
@@ -931,25 +931,35 @@ bool AdScene::traverseNodes(bool doUpdate) {
if (_autoScroll) {
// adjust horizontal scroll
- if (_gameRef->_timer - _lastTimeH >= _scrollTimeH) {
- _lastTimeH = _gameRef->_timer;
+ if (_gameRef->getTimer()->getTime() - _lastTimeH >= _scrollTimeH) {
+ int timesMissed = (_gameRef->getTimer()->getTime() - _lastTimeH) / _scrollTimeH;
+ // Cap the amount of catch-up to avoid jittery characters.
+ if (timesMissed > 2) {
+ timesMissed = 2;
+ }
+ _lastTimeH = _gameRef->getTimer()->getTime();
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) {
- _lastTimeV = _gameRef->_timer;
+ if (_gameRef->getTimer()->getTime() - _lastTimeV >= _scrollTimeV) {
+ int timesMissed = (_gameRef->getTimer()->getTime() - _lastTimeV) / _scrollTimeV;
+ // Cap the amount of catch-up to avoid jittery characters.
+ if (timesMissed > 2) {
+ timesMissed = 2;
+ }
+ _lastTimeV = _gameRef->getTimer()->getTime();
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);
}
}
@@ -966,14 +976,14 @@ bool AdScene::traverseNodes(bool doUpdate) {
//////////////////////////////////////////////////////////////////////////
- int viewportWidth, viewportHeight;
+ int32 viewportWidth, viewportHeight;
getViewportSize(&viewportWidth, &viewportHeight);
- int viewportX, viewportY;
+ int32 viewportX, viewportY;
getViewportOffset(&viewportX, &viewportY);
- int scrollableX = _width - viewportWidth;
- int scrollableY = _height - viewportHeight;
+ int32 scrollableX = _width - viewportWidth;
+ int32 scrollableY = _height - viewportHeight;
double widthRatio = scrollableX <= 0 ? 0 : ((double)(_offsetLeft) / (double)scrollableX);
double heightRatio = scrollableY <= 0 ? 0 : ((double)(_offsetTop) / (double)scrollableY);
@@ -1004,8 +1014,8 @@ bool AdScene::traverseNodes(bool doUpdate) {
}
if (_shieldWindow) {
_shieldWindow->_posX = _shieldWindow->_posY = 0;
- _shieldWindow->_width = _gameRef->_renderer->_width;
- _shieldWindow->_height = _gameRef->_renderer->_height;
+ _shieldWindow->_width = _gameRef->_renderer->getWidth();
+ _shieldWindow->_height = _gameRef->_renderer->getHeight();
_shieldWindow->display();
}
}
@@ -1045,10 +1055,10 @@ bool AdScene::traverseNodes(bool doUpdate) {
break;
case OBJECT_REGION: {
- if (node->_region->_blocked) {
+ if (node->_region->isBlocked()) {
break;
}
- if (node->_region->_decoration) {
+ if (node->_region->hasDecoration()) {
break;
}
@@ -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());
}
@@ -1140,22 +1150,22 @@ bool AdScene::updateFreeObjects() {
//////////////////////////////////////////////////////////////////////////
bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
AdGame *adGame = (AdGame *)_gameRef;
- BaseArray<AdObject *> objects;
+ Common::Array<AdObject *> objects;
AdObject *obj;
// global objects
for (uint32 i = 0; i < adGame->_objects.size(); i++) {
obj = adGame->_objects[i];
- if (obj->_active && !obj->_drawn && (obj->_stickRegion == region || region == NULL || (obj->_stickRegion == NULL && region->pointInRegion(obj->_posX, obj->_posY)))) {
- objects.add(obj);
+ if (obj->_active && !obj->_drawn && (obj->_stickRegion == region || region == nullptr || (obj->_stickRegion == nullptr && region->pointInRegion(obj->_posX, obj->_posY)))) {
+ objects.push_back(obj);
}
}
// 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)))) {
- objects.add(obj);
+ 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();
@@ -1195,16 +1205,11 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
}
//////////////////////////////////////////////////////////////////////////
-int AdScene::compareObjs(const void *obj1, const void *obj2) {
- const AdObject *object1 = *(const AdObject *const *)obj1;
- const AdObject *object2 = *(const AdObject *const *)obj2;
-
- if (object1->_posY < object2->_posY) {
- return -1;
- } else if (object1->_posY > object2->_posY) {
- return 1;
+bool AdScene::compareObjs(const AdObject *obj1, const AdObject *obj2) {
+ if (obj1->_posY < obj2->_posY) {
+ return true;
} else {
- return 0;
+ return false;
}
}
@@ -1215,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;
}
@@ -1228,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) {
@@ -1243,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();
@@ -1267,20 +1272,20 @@ bool AdScene::update() {
//////////////////////////////////////////////////////////////////////////
void AdScene::scrollTo(int offsetX, int offsetY) {
- int viewportWidth, viewportHeight;
+ int32 viewportWidth, viewportHeight;
getViewportSize(&viewportWidth, &viewportHeight);
- int origOffsetLeft = _targetOffsetLeft;
- int origOffsetTop = _targetOffsetTop;
+ int32 origOffsetLeft = _targetOffsetLeft;
+ int32 origOffsetTop = _targetOffsetTop;
- _targetOffsetLeft = MAX(0, offsetX - viewportWidth / 2);
+ _targetOffsetLeft = MAX<int32>(0, offsetX - viewportWidth / 2);
_targetOffsetLeft = MIN(_targetOffsetLeft, _width - viewportWidth);
- _targetOffsetTop = MAX(0, offsetY - viewportHeight / 2);
+ _targetOffsetTop = MAX<int32>(0, offsetY - viewportHeight / 2);
_targetOffsetTop = MIN(_targetOffsetTop, _height - viewportHeight);
- if (_gameRef->_mainObject && _gameRef->_mainObject->_is3D) {
+ if (_gameRef->getMainObject() && _gameRef->getMainObject()->_is3D) {
if (abs(origOffsetLeft - _targetOffsetLeft) < 5) {
_targetOffsetLeft = origOffsetLeft;
}
@@ -1312,13 +1317,13 @@ void AdScene::skipToObject(BaseObject *object) {
//////////////////////////////////////////////////////////////////////////
void AdScene::skipTo(int offsetX, int offsetY) {
- int viewportWidth, viewportHeight;
+ int32 viewportWidth, viewportHeight;
getViewportSize(&viewportWidth, &viewportHeight);
- _offsetLeft = MAX(0, offsetX - viewportWidth / 2);
+ _offsetLeft = MAX<int32>(0, offsetX - viewportWidth / 2);
_offsetLeft = MIN(_offsetLeft, _width - viewportWidth);
- _offsetTop = MAX(0, offsetY - viewportHeight / 2);
+ _offsetTop = MAX<int32>(0, offsetY - viewportHeight / 2);
_offsetTop = MIN(_offsetTop, _height - viewportHeight);
_targetOffsetLeft = _offsetLeft;
@@ -1341,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;
@@ -1358,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;
@@ -1499,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()) {
@@ -1541,7 +1546,7 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
for (int i = _mainLayer->_nodes.size() - 1; i >= 0; i--) {
AdSceneNode *node = _mainLayer->_nodes[i];
if (node->_type == OBJECT_REGION && node->_region->_active && node->_region->pointInRegion(x, y)) {
- if (node->_region->_decoration && !includeDecors) {
+ if (node->_region->hasDecoration() && !includeDecors) {
continue;
}
@@ -1689,10 +1694,10 @@ bool AdScene::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
int height = stack->pop()->getInt();
if (width <= 0) {
- width = _gameRef->_renderer->_width;
+ width = _gameRef->_renderer->getWidth();
}
if (height <= 0) {
- height = _gameRef->_renderer->_height;
+ height = _gameRef->_renderer->getHeight();
}
if (!_viewport) {
@@ -1767,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++) {
@@ -1782,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;
}
@@ -1861,7 +1866,7 @@ ScValue *AdScene::scGetProperty(const Common::String &name) {
// MouseX (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "MouseX") {
- int viewportX;
+ int32 viewportX;
getViewportOffset(&viewportX);
_scValue->setInt(_gameRef->_mousePos.x + _offsetLeft - viewportX);
@@ -1872,8 +1877,8 @@ ScValue *AdScene::scGetProperty(const Common::String &name) {
// MouseY (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "MouseY") {
- int viewportY;
- getViewportOffset(NULL, &viewportY);
+ int32 viewportY;
+ getViewportOffset(nullptr, &viewportY);
_scValue->setInt(_gameRef->_mousePos.y + _offsetTop - viewportY);
return _scValue;
@@ -2052,10 +2057,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
else if (strcmp(name, "OffsetX") == 0) {
_offsetLeft = value->getInt();
- int viewportWidth, viewportHeight;
+ int32 viewportWidth, viewportHeight;
getViewportSize(&viewportWidth, &viewportHeight);
- _offsetLeft = MAX(0, _offsetLeft - viewportWidth / 2);
+ _offsetLeft = MAX<int32>(0, _offsetLeft - viewportWidth / 2);
_offsetLeft = MIN(_offsetLeft, _width - viewportWidth);
_targetOffsetLeft = _offsetLeft;
@@ -2068,10 +2073,10 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
else if (strcmp(name, "OffsetY") == 0) {
_offsetTop = value->getInt();
- int viewportWidth, viewportHeight;
+ int32 viewportWidth, viewportHeight;
getViewportSize(&viewportWidth, &viewportHeight);
- _offsetTop = MAX(0, _offsetTop - viewportHeight / 2);
+ _offsetTop = MAX<int32>(0, _offsetTop - viewportHeight / 2);
_offsetTop = MIN(_offsetTop, _height - viewportHeight);
_targetOffsetTop = _offsetTop;
@@ -2202,7 +2207,7 @@ bool AdScene::saveAsText(BaseDynamicBuffer *buffer, int indent) {
// free entities
buffer->putTextIndent(indent + 2, "; ----- free entities\n");
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
_objects[i]->saveAsText(buffer, indent + 2);
}
@@ -2263,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];*/
@@ -2277,16 +2282,16 @@ float AdScene::getScaleAt(int Y) {
}
}
- if (prev == NULL || next == NULL) {
+ if (prev == nullptr || next == nullptr) {
return 100;
}
int delta_y = next->_posY - prev->_posY;
- float delta_scale = next->_scale - prev->_scale;
+ float delta_scale = next->getScale() - prev->getScale();
Y -= prev->_posY;
float percent = (float)Y / ((float)delta_y / 100.0f);
- return prev->_scale + delta_scale / 100 * percent;
+ return prev->getScale() + delta_scale / 100 * percent;
}
@@ -2314,13 +2319,13 @@ bool AdScene::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_editorShowEntities));
persistMgr->transfer(TMEMBER(_editorShowRegions));
persistMgr->transfer(TMEMBER(_editorShowScale));
- persistMgr->transfer(TMEMBER(_fader));
+ persistMgr->transferPtr(TMEMBER_PTR(_fader));
persistMgr->transfer(TMEMBER(_height));
persistMgr->transfer(TMEMBER(_initialized));
persistMgr->transfer(TMEMBER(_lastTimeH));
persistMgr->transfer(TMEMBER(_lastTimeV));
_layers.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_mainLayer));
+ persistMgr->transferPtr(TMEMBER_PTR(_mainLayer));
_objects.persist(persistMgr);
persistMgr->transfer(TMEMBER(_offsetLeft));
persistMgr->transfer(TMEMBER(_offsetTop));
@@ -2331,20 +2336,20 @@ bool AdScene::persist(BasePersistenceManager *persistMgr) {
_pfPath.persist(persistMgr);
persistMgr->transfer(TMEMBER(_pfPointsNum));
persistMgr->transfer(TMEMBER(_pfReady));
- persistMgr->transfer(TMEMBER(_pfRequester));
- persistMgr->transfer(TMEMBER(_pfTarget));
- persistMgr->transfer(TMEMBER(_pfTargetPath));
+ persistMgr->transferPtr(TMEMBER_PTR(_pfRequester));
+ persistMgr->transferPtr(TMEMBER_PTR(_pfTarget));
+ persistMgr->transferPtr(TMEMBER_PTR(_pfTargetPath));
_rotLevels.persist(persistMgr);
_scaleLevels.persist(persistMgr);
persistMgr->transfer(TMEMBER(_scrollPixelsH));
persistMgr->transfer(TMEMBER(_scrollPixelsV));
persistMgr->transfer(TMEMBER(_scrollTimeH));
persistMgr->transfer(TMEMBER(_scrollTimeV));
- persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transferPtr(TMEMBER_PTR(_shieldWindow));
persistMgr->transfer(TMEMBER(_targetOffsetLeft));
persistMgr->transfer(TMEMBER(_targetOffsetTop));
_waypointGroups.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_viewport));
+ persistMgr->transferPtr(TMEMBER_PTR(_viewport));
persistMgr->transfer(TMEMBER(_width));
return STATUS_OK;
@@ -2356,10 +2361,10 @@ bool AdScene::afterLoad() {
}
//////////////////////////////////////////////////////////////////////////
-bool AdScene::correctTargetPoint2(int startX, int startY, int *targetX, int *targetY, bool checkFreeObjects, BaseObject *requester) {
+bool AdScene::correctTargetPoint2(int32 startX, int32 startY, int32 *targetX, int32 *targetY, bool checkFreeObjects, BaseObject *requester) {
double xStep, yStep, x, y;
- int xLength, yLength, xCount, yCount;
- int x1, y1, x2, y2;
+ int32 xLength, yLength, xCount, yCount;
+ int32 x1, y1, x2, y2;
x1 = *targetX;
y1 = *targetY;
@@ -2402,9 +2407,9 @@ bool AdScene::correctTargetPoint2(int startX, int startY, int *targetX, int *tar
}
//////////////////////////////////////////////////////////////////////////
-bool AdScene::correctTargetPoint(int startX, int startY, int *argX, int *argY, bool checkFreeObjects, BaseObject *requester) {
- int x = *argX;
- int y = *argY;
+bool AdScene::correctTargetPoint(int32 startX, int32 startY, int32 *argX, int32 *argY, bool checkFreeObjects, BaseObject *requester) {
+ int32 x = *argX;
+ int32 y = *argY;
if (isWalkableAt(x, y, checkFreeObjects, requester) || !_mainLayer) {
return STATUS_OK;
@@ -2509,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++;
@@ -2517,7 +2522,7 @@ void AdScene::pfPointsAdd(int x, int y, int distance) {
//////////////////////////////////////////////////////////////////////////
-bool AdScene::getViewportOffset(int *offsetX, int *offsetY) {
+bool AdScene::getViewportOffset(int32 *offsetX, int32 *offsetY) {
AdGame *adGame = (AdGame *)_gameRef;
if (_viewport && !_gameRef->_editorMode) {
if (offsetX) {
@@ -2546,7 +2551,7 @@ bool AdScene::getViewportOffset(int *offsetX, int *offsetY) {
//////////////////////////////////////////////////////////////////////////
-bool AdScene::getViewportSize(int *width, int *height) {
+bool AdScene::getViewportSize(int32 *width, int32 *height) {
AdGame *adGame = (AdGame *)_gameRef;
if (_viewport && !_gameRef->_editorMode) {
if (width) {
@@ -2564,10 +2569,10 @@ bool AdScene::getViewportSize(int *width, int *height) {
}
} else {
if (width) {
- *width = _gameRef->_renderer->_width;
+ *width = _gameRef->_renderer->getWidth();
}
if (height) {
- *height = _gameRef->_renderer->_height;
+ *height = _gameRef->_renderer->getHeight();
}
}
return STATUS_OK;
@@ -2576,7 +2581,7 @@ bool AdScene::getViewportSize(int *width, int *height) {
//////////////////////////////////////////////////////////////////////////
int AdScene::getOffsetLeft() {
- int viewportX;
+ int32 viewportX;
getViewportOffset(&viewportX);
return _offsetLeft - viewportX;
@@ -2585,8 +2590,8 @@ int AdScene::getOffsetLeft() {
//////////////////////////////////////////////////////////////////////////
int AdScene::getOffsetTop() {
- int viewportY;
- getViewportOffset(NULL, &viewportY);
+ int32 viewportY;
+ getViewportOffset(nullptr, &viewportY);
return _offsetTop - viewportY;
}
@@ -2594,7 +2599,7 @@ int AdScene::getOffsetTop() {
//////////////////////////////////////////////////////////////////////////
bool AdScene::pointInViewport(int x, int y) {
- int left, top, width, height;
+ int32 left, top, width, height;
getViewportOffset(&left, &top);
getViewportSize(&width, &height);
@@ -2612,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++) {
@@ -2629,7 +2634,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
ret = node->_region;
break;
default:
- ret = NULL;
+ ret = nullptr;
}
return ret;
}
@@ -2638,7 +2643,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
// free entities
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY && !scumm_stricmp(name, _objects[i]->getName())) {
+ if (_objects[i]->getType() == OBJECT_ENTITY && !scumm_stricmp(name, _objects[i]->getName())) {
return _objects[i];
}
}
@@ -2650,7 +2655,7 @@ BaseObject *AdScene::getNodeByName(const char *name) {
}
}
- return NULL;
+ return nullptr;
}
@@ -2722,7 +2727,7 @@ bool AdScene::persistState(bool saving) {
if (!_objects[i]->_saveState) {
continue;
}
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
nodeState = state->getNodeState(_objects[i]->getName(), saving);
if (nodeState) {
nodeState->transferEntity((AdEntity *)_objects[i], _persistentStateSprites, saving);
@@ -2750,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];
@@ -2764,16 +2769,16 @@ float AdScene::getRotationAt(int x, int y) {
}
}
- if (prev == NULL || next == NULL) {
+ if (prev == nullptr || next == nullptr) {
return 0;
}
int delta_x = next->_posX - prev->_posX;
- float delta_rot = next->_rotation - prev->_rotation;
+ float delta_rot = next->getRotation() - prev->getRotation();
x -= prev->_posX;
float percent = (float)x / ((float)delta_x / 100.0f);
- return prev->_rotation + delta_rot / 100 * percent;
+ return prev->getRotation() + delta_rot / 100 * percent;
}
@@ -2785,7 +2790,7 @@ bool AdScene::handleItemAssociations(const char *itemName, bool show) {
if (layer->_nodes[j]->_type == OBJECT_ENTITY) {
AdEntity *ent = layer->_nodes[j]->_entity;
- if (ent->_item && strcmp(ent->_item, itemName) == 0) {
+ if (ent->getItemName() && strcmp(ent->getItemName(), itemName) == 0) {
ent->_active = show;
}
}
@@ -2793,9 +2798,9 @@ bool AdScene::handleItemAssociations(const char *itemName, bool show) {
}
for (uint32 i = 0; i < _objects.size(); i++) {
- if (_objects[i]->_type == OBJECT_ENTITY) {
+ if (_objects[i]->getType() == OBJECT_ENTITY) {
AdEntity *ent = (AdEntity *)_objects[i];
- if (ent->_item && strcmp(ent->_item, itemName) == 0) {
+ if (ent->getItemName() && strcmp(ent->getItemName(), itemName) == 0) {
ent->_active = show;
}
}
@@ -2822,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;
@@ -2840,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) {
@@ -2855,7 +2860,7 @@ BaseObject *AdScene::getNextAccessObject(BaseObject *currObject) {
}
return objects[0];
}
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -2864,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) {
@@ -2879,7 +2884,7 @@ BaseObject *AdScene::getPrevAccessObject(BaseObject *currObject) {
}
return objects[objects.size() - 1];
}
- return NULL;
+ return nullptr;
}
@@ -2957,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;
}
@@ -2969,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 3b482403b5..cd144b77ef 100644
--- a/engines/wintermute/ad/ad_scene.h
+++ b/engines/wintermute/ad/ad_scene.h
@@ -67,27 +67,27 @@ 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(int32 *width = nullptr, int32 *height = nullptr);
+ bool getViewportOffset(int32 *offsetX = nullptr, int32 *offsetY = nullptr);
BaseViewport *_viewport;
BaseFader *_fader;
- int _pfPointsNum;
+ int32 _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 correctTargetPoint2(int startX, int startY, int *targetX, int *targetY, bool checkFreeObjects, BaseObject *requester);
+ bool correctTargetPoint(int32 startX, int32 startY, int32 *x, int32 *y, bool checkFreeObjects = false, BaseObject *requester = nullptr);
+ bool correctTargetPoint2(int32 startX, int32 startY, int32 *targetX, int32 *targetY, bool checkFreeObjects, BaseObject *requester);
DECLARE_PERSISTENT(AdScene, BaseObject)
- bool displayRegionContent(AdRegion *region = NULL, bool display3DOnly = false);
- bool displayRegionContentOld(AdRegion *region = NULL);
- static int compareObjs(const void *obj1, const void *obj2);
+ bool displayRegionContent(AdRegion *region = nullptr, bool display3DOnly = false);
+ bool displayRegionContentOld(AdRegion *region = nullptr);
+ static bool compareObjs(const AdObject *obj1, const AdObject *obj2);
bool updateFreeObjects();
bool traverseNodes(bool update = false);
float getScaleAt(int y);
bool sortScaleLevels();
bool sortRotLevels();
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
uint32 getAlphaAt(int x, int y, bool colorCheck = false);
bool _paralaxScrolling;
void skipTo(int offsetX, int offsetY);
@@ -96,16 +96,16 @@ public:
void skipToObject(BaseObject *object);
void scrollToObject(BaseObject *object);
void scrollTo(int offsetX, int offsetY);
- virtual bool update();
+ virtual bool update() override;
bool _autoScroll;
- int _targetOffsetTop;
- int _targetOffsetLeft;
+ int32 _targetOffsetTop;
+ int32 _targetOffsetLeft;
- int _scrollPixelsV;
+ int32 _scrollPixelsV;
uint32 _scrollTimeV;
uint32 _lastTimeV;
- int _scrollPixelsH;
+ int32 _scrollPixelsH;
uint32 _scrollTimeH;
uint32 _lastTimeH;
@@ -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(const BasePoint &source, const BasePoint &target, AdPath *path, BaseObject *requester = nullptr);
AdScene(BaseGame *inGame);
virtual ~AdScene();
BaseArray<AdLayer *> _layers;
@@ -125,12 +125,12 @@ public:
BaseArray<AdWaypointGroup *> _waypointGroups;
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- int _width;
- int _height;
+ int32 _width;
+ int32 _height;
bool addObject(AdObject *Object);
bool removeObject(AdObject *Object);
- int _editorMarginH;
- int _editorMarginV;
+ int32 _editorMarginH;
+ int32 _editorMarginV;
uint32 _editorColFrame;
uint32 _editorColEntity;
uint32 _editorColRegion;
@@ -153,26 +153,26 @@ public:
BaseArray<AdRotLevel *> _rotLevels;
virtual bool restoreDeviceObjects();
- int getPointsDist(BasePoint p1, BasePoint p2, BaseObject *requester = NULL);
+ int getPointsDist(const BasePoint &p1, const BasePoint &p2, BaseObject *requester = nullptr);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
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;
BaseObject *_pfRequester;
BaseArray<AdPathPoint *> _pfPath;
- int _offsetTop;
- int _offsetLeft;
+ int32 _offsetTop;
+ int32 _offsetLeft;
};
diff --git a/engines/wintermute/ad/ad_scene_node.cpp b/engines/wintermute/ad/ad_scene_node.cpp
index d0202236fd..e9b80b3cc8 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;
}
@@ -72,8 +72,8 @@ bool AdSceneNode::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_entity));
- persistMgr->transfer(TMEMBER(_region));
+ persistMgr->transferPtr(TMEMBER_PTR(_entity));
+ persistMgr->transferPtr(TMEMBER_PTR(_region));
persistMgr->transfer(TMEMBER_INT(_type));
return STATUS_OK;
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp
index 6b34f1af53..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];
@@ -72,6 +72,9 @@ void AdSceneState::setFilename(const char *filename) {
}
}
+const char *AdSceneState::getFilename() const {
+ return _filename;
+}
//////////////////////////////////////////////////////////////////////////
AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {
@@ -88,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_scene_state.h b/engines/wintermute/ad/ad_scene_state.h
index 2b25393c5a..600aa4b581 100644
--- a/engines/wintermute/ad/ad_scene_state.h
+++ b/engines/wintermute/ad/ad_scene_state.h
@@ -39,9 +39,11 @@ class AdSceneState : public BaseClass {
public:
AdNodeState *getNodeState(const char *name, bool saving);
void setFilename(const char *filename);
+ const char *getFilename() const;
DECLARE_PERSISTENT(AdSceneState, BaseClass)
AdSceneState(BaseGame *inGame);
virtual ~AdSceneState();
+private:
char *_filename;
BaseArray<AdNodeState *> _nodeStates;
};
diff --git a/engines/wintermute/ad/ad_sentence.cpp b/engines/wintermute/ad/ad_sentence.cpp
index cfe4191b07..70a57a624d 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;
+ _width = _gameRef->_renderer->getWidth();
_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') {
@@ -204,8 +204,8 @@ bool AdSentence::display() {
}
if (_gameRef->_subtitles) {
- int x = _pos.x;
- int y = _pos.y;
+ int32 x = _pos.x;
+ int32 y = _pos.y;
if (!_fixedPos) {
x = x - ((AdGame *)_gameRef)->_scene->getOffsetLeft();
@@ -213,9 +213,9 @@ bool AdSentence::display() {
}
- x = MAX(x, 0);
- x = MIN(x, _gameRef->_renderer->_width - _width);
- y = MAX(y, 0);
+ x = MAX<int32>(x, 0);
+ x = MIN(x, _gameRef->_renderer->getWidth() - _width);
+ y = MAX<int32>(y, 0);
_font->drawText((byte *)_text, x, y, _width, _align);
}
@@ -247,20 +247,20 @@ bool AdSentence::finish() {
//////////////////////////////////////////////////////////////////////////
bool AdSentence::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER_INT(_align));
persistMgr->transfer(TMEMBER(_currentStance));
- persistMgr->transfer(TMEMBER(_currentSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentSprite));
persistMgr->transfer(TMEMBER(_currentSkelAnim));
persistMgr->transfer(TMEMBER(_duration));
- persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transferPtr(TMEMBER_PTR(_font));
persistMgr->transfer(TMEMBER(_pos));
- persistMgr->transfer(TMEMBER(_sound));
+ persistMgr->transferPtr(TMEMBER_PTR(_sound));
persistMgr->transfer(TMEMBER(_soundStarted));
persistMgr->transfer(TMEMBER(_stances));
persistMgr->transfer(TMEMBER(_startTime));
- persistMgr->transfer(TMEMBER(_talkDef));
+ persistMgr->transferPtr(TMEMBER_PTR(_talkDef));
persistMgr->transfer(TMEMBER(_tempStance));
persistMgr->transfer(TMEMBER(_text));
persistMgr->transfer(TMEMBER(_width));
@@ -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);
@@ -314,9 +314,9 @@ bool AdSentence::update(TDirection dir) {
/*
if (_sound) CurrentTime = _sound->GetPositionTime();
- else CurrentTime = _gameRef->_timer - _startTime;
+ else CurrentTime = _gameRef->getTimer()->getTime() - _startTime;
*/
- currentTime = _gameRef->_timer - _startTime;
+ currentTime = _gameRef->getTimer()->getTime() - _startTime;
bool talkNodeFound = false;
for (uint32 i = 0; i < _talkDef->_nodes.size(); i++) {
@@ -345,7 +345,7 @@ bool AdSentence::update(TDirection dir) {
}
_currentSprite = newSprite;
} else {
- _currentSprite = NULL;
+ _currentSprite = nullptr;
}
}
@@ -355,7 +355,7 @@ bool AdSentence::update(TDirection dir) {
//////////////////////////////////////////////////////////////////////////
bool AdSentence::canSkip() {
// prevent accidental sentence skipping (TODO make configurable)
- return (_gameRef->_timer - _startTime) > 300;
+ return (_gameRef->getTimer()->getTime() - _startTime) > 300;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_sentence.h b/engines/wintermute/ad/ad_sentence.h
index e7c94030b9..6f255578f7 100644
--- a/engines/wintermute/ad/ad_sentence.h
+++ b/engines/wintermute/ad/ad_sentence.h
@@ -56,14 +56,14 @@ public:
BaseSound *_sound;
TTextAlign _align;
bool display();
- int _width;
+ int32 _width;
Point32 _pos;
BaseFont *_font;
char *getNextStance();
char *getCurrentStance();
void setStances(const char *stances);
void setText(const char *text);
- int _currentStance;
+ int32 _currentStance;
uint32 _startTime;
char *_stances;
char *_text;
diff --git a/engines/wintermute/ad/ad_sprite_set.cpp b/engines/wintermute/ad/ad_sprite_set.cpp
index 345b483a8f..6c802c4863 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;
@@ -249,9 +249,9 @@ bool AdSpriteSet::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_owner));
+ persistMgr->transferPtr(TMEMBER_PTR(_owner));
for (int i = 0; i < NUM_DIRECTIONS; i++) {
- persistMgr->transfer("", &_sprites[i]);
+ persistMgr->transferPtr("", &_sprites[i]);
}
return STATUS_OK;
@@ -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..61043aa3d6 100644
--- a/engines/wintermute/ad/ad_sprite_set.h
+++ b/engines/wintermute/ad/ad_sprite_set.h
@@ -37,11 +37,11 @@ class BaseSprite;
class AdSpriteSet : public BaseObject {
public:
bool containsSprite(BaseSprite *sprite);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0) override;
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..bf72b2916b 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);
@@ -208,9 +208,9 @@ bool AdTalkDef::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_defaultSprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_defaultSprite));
persistMgr->transfer(TMEMBER(_defaultSpriteFilename));
- persistMgr->transfer(TMEMBER(_defaultSpriteSet));
+ persistMgr->transferPtr(TMEMBER_PTR(_defaultSpriteSet));
persistMgr->transfer(TMEMBER(_defaultSpriteSetFilename));
_nodes.persist(persistMgr);
@@ -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_def.h b/engines/wintermute/ad/ad_talk_def.h
index d147212775..2375360d89 100644
--- a/engines/wintermute/ad/ad_talk_def.h
+++ b/engines/wintermute/ad/ad_talk_def.h
@@ -50,7 +50,7 @@ public:
BaseArray<AdTalkNode *> _nodes;
char *_defaultSpriteFilename;
BaseSprite *_defaultSprite;
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0) override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ad/ad_talk_holder.cpp b/engines/wintermute/ad/ad_talk_holder.cpp
index cca4fdc2cb..33deab7805 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;
}
@@ -392,7 +392,7 @@ bool AdTalkHolder::saveAsText(BaseDynamicBuffer *buffer, int indent) {
bool AdTalkHolder::persist(BasePersistenceManager *persistMgr) {
AdObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_sprite));
_talkSprites.persist(persistMgr);
_talkSpritesEx.persist(persistMgr);
diff --git a/engines/wintermute/ad/ad_talk_holder.h b/engines/wintermute/ad/ad_talk_holder.h
index d52ebf63c0..501acbc885 100644
--- a/engines/wintermute/ad/ad_talk_holder.h
+++ b/engines/wintermute/ad/ad_talk_holder.h
@@ -37,7 +37,7 @@ class AdTalkHolder : public AdObject {
public:
DECLARE_PERSISTENT(AdTalkHolder, AdObject)
virtual BaseSprite *getTalkStance(const char *stance);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
BaseSprite *_sprite;
BaseArray<BaseSprite *> _talkSprites;
BaseArray<BaseSprite *> _talkSpritesEx;
@@ -45,10 +45,10 @@ public:
virtual ~AdTalkHolder();
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
diff --git a/engines/wintermute/ad/ad_talk_node.cpp b/engines/wintermute/ad/ad_talk_node.cpp
index c909ee27ff..f03c24ea94 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;
}
}
@@ -195,9 +195,9 @@ bool AdTalkNode::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_startTime));
persistMgr->transfer(TMEMBER(_endTime));
persistMgr->transfer(TMEMBER(_playToEnd));
- persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_sprite));
persistMgr->transfer(TMEMBER(_spriteFilename));
- persistMgr->transfer(TMEMBER(_spriteSet));
+ persistMgr->transferPtr(TMEMBER_PTR(_spriteSet));
persistMgr->transfer(TMEMBER(_spriteSetFilename));
return STATUS_OK;
@@ -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_talk_node.h b/engines/wintermute/ad/ad_talk_node.h
index 7dfd861f85..012fa2133e 100644
--- a/engines/wintermute/ad/ad_talk_node.h
+++ b/engines/wintermute/ad/ad_talk_node.h
@@ -47,7 +47,7 @@ public:
AdTalkNode(BaseGame *inGame);
virtual ~AdTalkNode();
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0) override;
char *_spriteFilename;
BaseSprite *_sprite;
uint32 _startTime;
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/ad/ad_waypoint_group.h b/engines/wintermute/ad/ad_waypoint_group.h
index 13d6bbadd7..79b28e0d22 100644
--- a/engines/wintermute/ad/ad_waypoint_group.h
+++ b/engines/wintermute/ad/ad_waypoint_group.h
@@ -35,22 +35,25 @@ namespace Wintermute {
class BasePoint;
class AdWaypointGroup : public BaseObject {
public:
- float _lastMimicScale;
- int _lastMimicX;
- int _lastMimicY;
void cleanup();
bool mimic(AdWaypointGroup *wpt, float scale = 100.0f, int x = 0, int y = 0);
DECLARE_PERSISTENT(AdWaypointGroup, BaseObject)
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
- bool _active;
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
AdWaypointGroup(BaseGame *inGame);
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
virtual ~AdWaypointGroup();
+
+ bool _active;
BaseArray<BasePoint *> _points;
- int _editorSelectedPoint;
+
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scSetProperty(const char *name, ScValue *value);
+private:
+ int32 _editorSelectedPoint;
+ float _lastMimicScale;
+ int32 _lastMimicX;
+ int32 _lastMimicY;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp
index e351792e61..d01972b82f 100644
--- a/engines/wintermute/base/base.cpp
+++ b/engines/wintermute/base/base.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/base/base.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/base_dynamic_buffer.h"
@@ -42,7 +43,7 @@ BaseClass::BaseClass(BaseGame *gameOwner) {
//////////////////////////////////////////////////////////////////////////
BaseClass::BaseClass() {
- _gameRef = NULL;
+ _gameRef = nullptr;
_persistable = true;
}
@@ -105,14 +106,14 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
if (complete) {
if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_EDITOR_PROPERTY) {
- _gameRef->LOG(0, "'EDITOR_PROPERTY' keyword expected.");
+ BaseEngine::LOG(0, "'EDITOR_PROPERTY' keyword expected.");
return STATUS_FAILED;
}
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,17 +142,17 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
if (cmd == PARSERR_TOKENNOTFOUND) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
- _gameRef->LOG(0, "Syntax error in EDITOR_PROPERTY definition");
+ propName = nullptr;
+ propValue = nullptr;
+ BaseEngine::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;
- _gameRef->LOG(0, "Error loading EDITOR_PROPERTY definition");
+ propName = nullptr;
+ propValue = nullptr;
+ BaseEngine::LOG(0, "Error loading EDITOR_PROPERTY definition");
return STATUS_FAILED;
}
@@ -160,8 +161,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..7a91854c57 100644
--- a/engines/wintermute/base/base_active_rect.cpp
+++ b/engines/wintermute/base/base_active_rect.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/base/base_active_rect.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_region.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/platform_osystem.h"
@@ -37,9 +38,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 +56,7 @@ BaseActiveRect::BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseSubFrame
_zoomX = zoomX;
_zoomY = zoomY;
_precise = precise;
- _region = NULL;
+ _region = nullptr;
_offsetX = _offsetY = 0;
clipRect();
}
@@ -69,7 +70,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 +79,9 @@ BaseActiveRect::BaseActiveRect(BaseGame *inGame, BaseObject *owner, BaseRegion *
//////////////////////////////////////////////////////////////////////
BaseActiveRect::~BaseActiveRect() {
- _owner = NULL;
- _frame = NULL;
- _region = NULL;
+ _owner = nullptr;
+ _frame = nullptr;
+ _region = nullptr;
}
@@ -89,7 +90,7 @@ void BaseActiveRect::clipRect() {
Rect32 rc;
bool customViewport;
_gameRef->getCurrentViewportRect(&rc, &customViewport);
- BaseRenderer *Rend = _gameRef->_renderer;
+ BaseRenderer *Rend = BaseEngine::getRenderer();
if (!customViewport) {
rc.left -= Rend->_drawOffsetX;
diff --git a/engines/wintermute/base/base_active_rect.h b/engines/wintermute/base/base_active_rect.h
index fcd2619b03..982a0902d0 100644
--- a/engines/wintermute/base/base_active_rect.h
+++ b/engines/wintermute/base/base_active_rect.h
@@ -45,10 +45,10 @@ public:
BaseSubFrame *_frame;
BaseObject *_owner;
BaseRegion *_region;
- int _offsetX;
- int _offsetY;
+ int32 _offsetX;
+ int32 _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 fc48e93c2b..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;
@@ -65,7 +65,7 @@ void BaseDynamicBuffer::cleanup() {
//////////////////////////////////////////////////////////////////////////
-uint32 BaseDynamicBuffer::getSize() {
+uint32 BaseDynamicBuffer::getSize() const {
return _size;
}
@@ -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_dynamic_buffer.h b/engines/wintermute/base/base_dynamic_buffer.h
index 2d1a7fbe48..ad78ebad00 100644
--- a/engines/wintermute/base/base_dynamic_buffer.h
+++ b/engines/wintermute/base/base_dynamic_buffer.h
@@ -43,7 +43,7 @@ public:
void putString(const char *val);
bool getBytes(byte *buffer, uint32 size);
bool putBytes(const byte *buffer, uint32 size);
- uint32 getSize();
+ uint32 getSize() const;
bool init(uint32 initSize = 0);
void cleanup();
BaseDynamicBuffer(BaseGame *inGame, uint32 initSize = 1000, uint32 growBy = 1000);
diff --git a/engines/wintermute/base/base_engine.cpp b/engines/wintermute/base/base_engine.cpp
index 8146d14beb..d4b17a0a64 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 = "";
}
@@ -90,4 +90,36 @@ uint32 BaseEngine::randInt(int from, int to) {
return _rnd->getRandomNumberRng(from, to);
}
+BaseSoundMgr *BaseEngine::getSoundMgr() {
+ if (instance()._gameRef) {
+ return _gameRef->_soundMgr;
+ } else {
+ return nullptr;
+ }
+}
+
+BaseRenderer *BaseEngine::getRenderer() {
+ if (instance()._gameRef) {
+ return instance()._gameRef->_renderer;
+ } else {
+ return nullptr;
+ }
+}
+
+const Timer *BaseEngine::getTimer() {
+ if (instance()._gameRef) {
+ return instance()._gameRef->getTimer();
+ } else {
+ return nullptr;
+ }
+}
+
+const Timer *BaseEngine::getLiveTimer() {
+ if (instance()._gameRef) {
+ return instance()._gameRef->getLiveTimer();
+ } else {
+ return nullptr;
+ }
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_engine.h b/engines/wintermute/base/base_engine.h
index 1ed0e3ab01..d972e6ebbc 100644
--- a/engines/wintermute/base/base_engine.h
+++ b/engines/wintermute/base/base_engine.h
@@ -39,7 +39,10 @@ namespace Wintermute {
class BaseFileManager;
class BaseRegistry;
class BaseGame;
+class BaseSoundMgr;
+class BaseRenderer;
class SystemClassRegistry;
+class Timer;
class BaseEngine : public Common::Singleton<Wintermute::BaseEngine> {
void init(Common::Language lang);
BaseFileManager *_fileManager;
@@ -57,9 +60,13 @@ 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; }
+ BaseSoundMgr *getSoundMgr();
+ static BaseRenderer *getRenderer();
+ static const Timer *getTimer();
+ static const Timer *getLiveTimer();
static void LOG(bool res, const char *fmt, ...);
const char *getGameId() { return _gameId.c_str(); }
};
diff --git a/engines/wintermute/base/base_fader.cpp b/engines/wintermute/base/base_fader.cpp
index 985718fcab..0d17b07a9d 100644
--- a/engines/wintermute/base/base_fader.cpp
+++ b/engines/wintermute/base/base_fader.cpp
@@ -27,7 +27,8 @@
*/
#include "engines/wintermute/base/base_fader.h"
-#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/timer.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "common/util.h"
@@ -71,7 +72,7 @@ bool BaseFader::update() {
if (_system) {
time = g_system->getMillis() - _startTime;
} else {
- time = _gameRef->_timer - _startTime;
+ time = BaseEngine::getTimer()->getTime() - _startTime;
}
if (time >= _duration) {
@@ -97,7 +98,7 @@ bool BaseFader::display() {
}
if (_currentAlpha > 0x00) {
- _gameRef->_renderer->fadeToColor(_red, _green, _blue, _currentAlpha);
+ BaseEngine::getRenderer()->fadeToColor(_red, _green, _blue, _currentAlpha);
}
return STATUS_OK;
}
@@ -129,7 +130,7 @@ bool BaseFader::fadeIn(uint32 sourceColor, uint32 duration, bool system) {
if (_system) {
_startTime = g_system->getMillis();
} else {
- _startTime = _gameRef->_timer;
+ _startTime = BaseEngine::getTimer()->getTime();
}
return STATUS_OK;
@@ -155,7 +156,7 @@ bool BaseFader::fadeOut(uint32 targetColor, uint32 duration, bool system) {
if (_system) {
_startTime = g_system->getMillis();
} else {
- _startTime = _gameRef->_timer;
+ _startTime = BaseEngine::getTimer()->getTime();
}
@@ -164,7 +165,7 @@ bool BaseFader::fadeOut(uint32 targetColor, uint32 duration, bool system) {
//////////////////////////////////////////////////////////////////////////
-uint32 BaseFader::getCurrentColor() {
+uint32 BaseFader::getCurrentColor() const {
return BYTETORGBA(_red, _green, _blue, _currentAlpha);
}
diff --git a/engines/wintermute/base/base_fader.h b/engines/wintermute/base/base_fader.h
index 116c8c963d..845ce2f244 100644
--- a/engines/wintermute/base/base_fader.h
+++ b/engines/wintermute/base/base_fader.h
@@ -36,7 +36,7 @@ namespace Wintermute {
class BaseFader : public BaseObject {
public:
- uint32 getCurrentColor();
+ uint32 getCurrentColor() const;
bool fadeOut(uint32 targetColor, uint32 duration, bool system = false);
bool fadeIn(uint32 sourceColor, uint32 duration, bool system = false);
bool deactivate();
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index b726c0c66f..7d59b03684 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);
@@ -185,7 +192,9 @@ bool BaseFileManager::registerPackages() {
Common::FSList files;
for (Common::FSList::iterator it = _packagePaths.begin(); it != _packagePaths.end(); ++it) {
debugC(kWintermuteDebugFileAccess, "Should register folder: %s %s", (*it).getPath().c_str(), (*it).getName().c_str());
- (*it).getChildren(files, Common::FSNode::kListFilesOnly);
+ if (!(*it).getChildren(files, Common::FSNode::kListFilesOnly)) {
+ warning("getChildren() failed for path: %s", (*it).getDisplayName().c_str());
+ }
for (Common::FSList::iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
if (!fileIt->getName().hasSuffix(".dcp")) {
continue;
@@ -224,13 +233,25 @@ 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());
+ Common::strlcpy(fileName, upcName.c_str(), MAX_PATH_LENGTH);
// correct slashes
for (uint32 i = 0; i < upcName.size(); i++) {
@@ -240,7 +261,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 +282,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 +291,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 +318,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 +342,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..9fb5770f79 100644
--- a/engines/wintermute/base/base_frame.cpp
+++ b/engines/wintermute/base/base_frame.cpp
@@ -27,8 +27,9 @@
*/
#include "engines/wintermute/base/base_parser.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_frame.h"
-#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_object.h"
#include "engines/wintermute/base/base_dynamic_buffer.h"
#include "engines/wintermute/base/sound/base_sound_manager.h"
#include "engines/wintermute/base/sound/base_sound.h"
@@ -48,7 +49,7 @@ BaseFrame::BaseFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_delay = 0;
_moveX = _moveY = 0;
- _sound = NULL;
+ _sound = nullptr;
_killSound = false;
_editorExpanded = false;
@@ -59,7 +60,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 +69,7 @@ BaseFrame::~BaseFrame() {
for (uint32 i = 0; i < _applyEvent.size(); i++) {
delete[] _applyEvent[i];
- _applyEvent[i] = NULL;
+ _applyEvent[i] = nullptr;
}
_applyEvent.clear();
}
@@ -181,7 +182,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,15 +261,15 @@ 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))) {
- if (_gameRef->_soundMgr->_soundAvailable) {
- _gameRef->LOG(0, "Error loading sound '%s'.", params);
+ if (BaseEngine::instance().getSoundMgr()->_soundAvailable) {
+ BaseEngine::LOG(0, "Error loading sound '%s'.", params);
}
delete _sound;
- _sound = NULL;
+ _sound = nullptr;
}
}
break;
@@ -294,18 +295,18 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
}
}
if (cmd == PARSERR_TOKENNOTFOUND) {
- _gameRef->LOG(0, "Syntax error in FRAME definition");
+ BaseEngine::LOG(0, "Syntax error in FRAME definition");
return STATUS_FAILED;
}
if (cmd == PARSERR_GENERIC) {
- _gameRef->LOG(0, "Error loading FRAME definition");
+ BaseEngine::LOG(0, "Error loading FRAME definition");
return STATUS_FAILED;
}
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 {
@@ -314,7 +315,7 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
if (!sub->_surface) {
delete sub;
- _gameRef->LOG(0, "Error loading SUBFRAME");
+ BaseEngine::LOG(0, "Error loading SUBFRAME");
return STATUS_FAILED;
}
@@ -419,7 +420,7 @@ bool BaseFrame::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_killSound));
persistMgr->transfer(TMEMBER(_moveX));
persistMgr->transfer(TMEMBER(_moveY));
- persistMgr->transfer(TMEMBER(_sound));
+ persistMgr->transferPtr(TMEMBER_PTR(_sound));
_subframes.persist(persistMgr);
return STATUS_OK;
@@ -452,14 +453,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 +517,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 +544,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..954851c77f 100644
--- a/engines/wintermute/base/base_frame.h
+++ b/engines/wintermute/base/base_frame.h
@@ -47,11 +47,11 @@ public:
bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = 100, float scaleY = 100);
bool saveAsText(BaseDynamicBuffer *buffer, int indent);
- int _moveY;
- int _moveX;
+ int32 _moveY;
+ int32 _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);
@@ -60,10 +60,10 @@ public:
BaseArray<const char *> _applyEvent;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
private:
bool _keyframe;
bool _editorExpanded;
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index f0b1171ca4..4d8e79b5c2 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -29,32 +29,30 @@
#include "engines/wintermute/dcgf.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_game_music.h"
+#include "engines/wintermute/base/base_game_settings.h"
#include "engines/wintermute/base/base_fader.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/font/base_font.h"
#include "engines/wintermute/base/font/base_font_storage.h"
-#include "engines/wintermute/base/gfx/base_image.h"
-#include "engines/wintermute/base/gfx/base_surface.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/base_keyboard_state.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/base_quick_msg.h"
-#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/base/sound/base_sound_manager.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/base/base_sub_frame.h"
#include "engines/wintermute/base/base_transition_manager.h"
#include "engines/wintermute/base/base_viewport.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_region.h"
-#include "engines/wintermute/base/base_save_thumb_helper.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/saveload.h"
+#include "engines/wintermute/base/save_thumb_helper.h"
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script_engine.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
#include "engines/wintermute/base/scriptables/script.h"
-#include "engines/wintermute/base/scriptables/script_ext_math.h"
+#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/video/video_player.h"
#include "engines/wintermute/video/video_theora_player.h"
#include "engines/wintermute/utils/utils.h"
@@ -64,6 +62,7 @@
#include "engines/wintermute/ui/ui_window.h"
#include "engines/wintermute/wintermute.h"
#include "engines/wintermute/platform_osystem.h"
+#include "base/version.h"
#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/textconsole.h"
@@ -82,7 +81,7 @@ IMPLEMENT_PERSISTENT(BaseGame, true)
//////////////////////////////////////////////////////////////////////
-BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gameId) {
+BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gameId), _timerNormal(), _timerLive() {
_shuttingDown = false;
_state = GAME_RUNNING;
@@ -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;
@@ -123,50 +122,25 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_subtitles = true;
_videoSubtitles = true;
- _timer = 0;
- _timerDelta = 0;
- _timerLast = 0;
-
- _liveTimer = 0;
- _liveTimerDelta = 0;
- _liveTimerLast = 0;
-
_sequence = 0;
_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;
- _stringTable = new BaseStringTable(this);
-
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- _music[i] = NULL;
- _musicStartTime[i] = 0;
- }
-
- _settingsResWidth = 800;
- _settingsResHeight = 600;
- _settingsRequireAcceleration = false;
- _settingsRequireSound = false;
- _settingsTLMode = 0;
- _settingsAllowWindowed = true;
- _settingsGameFile = NULL;
- _settingsAllowAdvanced = false;
- _settingsAllowAccessTab = true;
- _settingsAllowAboutTab = true;
- _settingsAllowDesktopRes = false;
+ _musicSystem = new BaseGameMusic(this);
_editorForceScripts = false;
_editorAlwaysRegister = false;
- _focusedWindow = NULL;
+ _focusedWindow = nullptr;
_loadInProgress = false;
@@ -175,13 +149,12 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_scheduledLoadSlot = -1;
_personalizedSave = false;
- _compressedSavegames = true;
_editorMode = false;
//_doNotExpandStrings = false;
- _engineLogCallback = NULL;
- _engineLogCallbackData = NULL;
+ _engineLogCallback = nullptr;
+ _engineLogCallbackData = nullptr;
_smartCache = false;
_surfaceGCCycleTime = 10000;
@@ -196,22 +169,11 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_thumbnailWidth = _thumbnailHeight = 0;
- _richSavedGames = false;
- _savedGameExt = NULL;
- BaseUtils::setString(&_savedGameExt, "dsv");
-
- _musicCrossfadeRunning = false;
- _musicCrossfadeStartTime = 0;
- _musicCrossfadeLength = 0;
- _musicCrossfadeChannel1 = -1;
- _musicCrossfadeChannel2 = -1;
- _musicCrossfadeSwap = false;
+ _localSaveDir = "saves";
- _localSaveDir = NULL;
- BaseUtils::setString(&_localSaveDir, "saves");
_saveDirChecked = false;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
_loadingIconX = _loadingIconY = 0;
_loadingIconPersistent = false;
@@ -221,8 +183,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_soundBufferSizeSec = 3;
_suspendedRendering = false;
- _lastCursor = NULL;
-
+ _lastCursor = nullptr;
BasePlatform::setRectEmpty(&_mouseLockRect);
@@ -230,7 +191,7 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
_lastMiniUpdate = 0;
_miniUpdateEnabled = false;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
_autorunDisabled = false;
@@ -251,6 +212,8 @@ BaseGame::BaseGame(const Common::String &gameId) : BaseObject(this), _gameId(gam
#else*/
_touchInterface = false;
_constrainedMemory = false;
+
+ _settings = new BaseGameSettings(this);
//#endif
}
@@ -267,10 +230,6 @@ BaseGame::~BaseGame() {
cleanup();
- delete[] _localSaveDir;
- delete[] _settingsGameFile;
- delete[] _savedGameExt;
-
delete _cachedThumbnail;
delete _mathClass;
@@ -285,26 +244,24 @@ BaseGame::~BaseGame() {
//SAFE_DELETE(_keyboardState);
delete _renderer;
- delete _stringTable;
-
- _localSaveDir = NULL;
- _settingsGameFile = NULL;
- _savedGameExt = NULL;
+ delete _musicSystem;
+ delete _settings;
- _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;
+ _renderer = nullptr;
+ _musicSystem = nullptr;
+ _settings = nullptr;
DEBUG_DebugDisable();
debugC(kWintermuteDebugLog, "--- shutting down normally ---\n");
@@ -314,52 +271,48 @@ BaseGame::~BaseGame() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::cleanup() {
delete _loadingIcon;
- _loadingIcon = NULL;
+ _loadingIcon = nullptr;
- _engineLogCallback = NULL;
- _engineLogCallbackData = NULL;
+ _engineLogCallback = nullptr;
+ _engineLogCallbackData = nullptr;
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- delete _music[i];
- _music[i] = NULL;
- _musicStartTime[i] = 0;
- }
+ _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];
@@ -369,68 +322,104 @@ 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;
+}
+
+//////////////////////////////////////////////////////////////////////
+bool BaseGame::initConfManSettings() {
+ if (ConfMan.hasKey("debug_mode")) {
+ if (ConfMan.getBool("debug_mode")) {
+ DEBUG_DebugEnable("./wme.log");
+ }
+ }
+
+ if (ConfMan.hasKey("show_fps")) {
+ _debugShowFPS = ConfMan.getBool("show_fps");
+ } else {
+ _debugShowFPS = false;
+ }
+ if (ConfMan.hasKey("disable_smartcache")) {
+ _smartCache = ConfMan.getBool("disable_smartcache");
+ } else {
+ _smartCache = true;
+ }
+
+ if (!_smartCache) {
+ LOG(0, "Smart cache is DISABLED");
+ }
return STATUS_OK;
}
+//////////////////////////////////////////////////////////////////////
+bool BaseGame::initRenderer() {
+ bool windowedMode = !ConfMan.getBool("fullscreen");
+ return _renderer->initRenderer(_settings->getResWidth(), _settings->getResHeight(), windowedMode);
+}
+
+//////////////////////////////////////////////////////////////////////
+bool BaseGame::loadGameSettingsFile() {
+ return loadFile(_settings->getGameFile());
+}
//////////////////////////////////////////////////////////////////////
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 = new SXMath(this);
- if (_mathClass == NULL) {
+ _mathClass = makeSXMath(this);
+ 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);
@@ -456,7 +445,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;
}
@@ -466,8 +455,8 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
//////////////////////////////////////////////////////////////////////
bool BaseGame::initialize3() { // renderer is initialized
- _posX = _renderer->_width / 2;
- _posY = _renderer->_height / 2;
+ _posX = _renderer->getWidth() / 2;
+ _posY = _renderer->getHeight() / 2;
_renderer->initIndicator();
return STATUS_OK;
}
@@ -489,7 +478,7 @@ void BaseGame::DEBUG_DebugEnable(const char *filename) {
LOG(0, "********** DEBUG LOG OPENED %02d-%02d-%02d (Release Build) *****************", hours, mins, secs);
#endif
- LOG(0, "%s ver %d.%d.%d%s, Compiled on " __DATE__ ", " __TIME__, DCGF_NAME, DCGF_VER_MAJOR, DCGF_VER_MINOR, DCGF_VER_BUILD, DCGF_VER_SUFFIX);
+ LOG(0, "%s - %s ver %d.%d.%d%s ", gScummVMFullVersion, DCGF_NAME, DCGF_VER_MAJOR, DCGF_VER_MINOR, DCGF_VER_BUILD, DCGF_VER_SUFFIX);
AnsiString platform = BasePlatform::getPlatformName();
LOG(0, "Platform: %s", platform.c_str());
@@ -499,10 +488,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;
}
@@ -551,29 +540,25 @@ bool BaseGame::initLoop() {
_currentTime = g_system->getMillis();
_renderer->initLoop();
- updateMusicCrossfade();
+ _musicSystem->updateMusicCrossfade();
_surfaceStorage->initLoop();
_fontStorage->initLoop();
- //_activeObject = NULL;
+ //_activeObject = nullptr;
// count FPS
_deltaTime = _currentTime - _lastTime;
_lastTime = _currentTime;
_fpsTime += _deltaTime;
- _liveTimerDelta = _liveTimer - _liveTimerLast;
- _liveTimerLast = _liveTimer;
- _liveTimer += MIN((uint32)1000, _deltaTime);
+ _timerLive.updateTime(_deltaTime, 1000);
if (_state != GAME_FROZEN) {
- _timerDelta = _timer - _timerLast;
- _timerLast = _timer;
- _timer += MIN((uint32)1000, _deltaTime);
+ _timerNormal.updateTime(_deltaTime, 1000);
} else {
- _timerDelta = 0;
+ _timerNormal.setTimeDelta(0);
}
_framesRendered++;
@@ -586,7 +571,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];
@@ -617,17 +602,17 @@ int BaseGame::getSequence() {
//////////////////////////////////////////////////////////////////////////
-void BaseGame::setOffset(int offsetX, int offsetY) {
+void BaseGame::setOffset(int32 offsetX, int32 offsetY) {
_offsetX = offsetX;
_offsetY = offsetY;
}
//////////////////////////////////////////////////////////////////////////
-void BaseGame::getOffset(int *offsetX, int *offsetY) {
- if (offsetX != NULL) {
+void BaseGame::getOffset(int *offsetX, int *offsetY) const {
+ if (offsetX != nullptr) {
*offsetX = _offsetX;
}
- if (offsetY != NULL) {
+ if (offsetY != nullptr) {
*offsetY = _offsetY;
}
}
@@ -636,7 +621,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;
}
@@ -787,7 +772,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
if (_systemFont) {
_fontStorage->removeFont(_systemFont);
}
- _systemFont = NULL;
+ _systemFont = nullptr;
_systemFont = _gameRef->_fontStorage->addFont((char *)params);
break;
@@ -796,7 +781,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
if (_videoFont) {
_fontStorage->removeFont(_videoFont);
}
- _videoFont = NULL;
+ _videoFont = nullptr;
_videoFont = _gameRef->_fontStorage->addFont((char *)params);
break;
@@ -807,18 +792,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;
@@ -828,7 +813,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;
@@ -917,7 +902,7 @@ bool BaseGame::loadBuffer(byte *buffer, bool complete) {
break;
case TOKEN_LOCAL_SAVE_DIR:
- BaseUtils::setString(&_localSaveDir, (char *)params);
+ _localSaveDir = (char *)params;
break;
case TOKEN_COMPAT_KILL_METHOD_THREADS:
@@ -1012,7 +997,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
clearOld = val->getBool();
}
- if (DID_FAIL(_stringTable->loadFile(filename, clearOld))) {
+ if (DID_FAIL(_settings->loadStringTable(filename, clearOld))) {
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1076,7 +1061,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;
@@ -1090,278 +1075,13 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
ScValue *val = stack->pop();
char *str = new char[strlen(val->getString()) + 1];
strcpy(str, val->getString());
- _stringTable->expand(&str);
+ expandStringByStringTable(&str);
stack->pushString(str);
delete[] str;
return STATUS_OK;
}
- //////////////////////////////////////////////////////////////////////////
- // PlayMusic / PlayMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "PlayMusic") == 0 || strcmp(name, "PlayMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "PlayMusic") == 0) {
- stack->correctParams(3);
- } else {
- stack->correctParams(4);
- channel = stack->pop()->getInt();
- }
-
- const char *filename = stack->pop()->getString();
- ScValue *valLooping = stack->pop();
- bool looping = valLooping->isNULL() ? true : valLooping->getBool();
-
- ScValue *valLoopStart = stack->pop();
- uint32 loopStart = (uint32)(valLoopStart->isNULL() ? 0 : valLoopStart->getInt());
-
-
- if (DID_FAIL(playMusic(channel, filename, looping, loopStart))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // StopMusic / StopMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "StopMusic") == 0 || strcmp(name, "StopMusicChannel") == 0) {
- int channel = 0;
-
- if (strcmp(name, "StopMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(stopMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // PauseMusic / PauseMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "PauseMusic") == 0 || strcmp(name, "PauseMusicChannel") == 0) {
- int channel = 0;
-
- if (strcmp(name, "PauseMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(pauseMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // ResumeMusic / ResumeMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "ResumeMusic") == 0 || strcmp(name, "ResumeMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "ResumeMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (DID_FAIL(resumeMusic(channel))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusic / GetMusicChannel
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusic") == 0 || strcmp(name, "GetMusicChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusic") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS) {
- stack->pushNULL();
- } else {
- if (!_music[channel] || !_music[channel]->getFilename()) {
- stack->pushNULL();
- } else {
- stack->pushString(_music[channel]->getFilename());
- }
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetMusicPosition / SetMusicChannelPosition
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "SetMusicPosition") == 0 || strcmp(name, "SetMusicChannelPosition") == 0 || strcmp(name, "SetMusicPositionChannel") == 0) {
- int channel = 0;
- if (strcmp(name, "SetMusicPosition") == 0) {
- stack->correctParams(1);
- } else {
- stack->correctParams(2);
- channel = stack->pop()->getInt();
- }
-
- uint32 time = stack->pop()->getInt();
-
- if (DID_FAIL(setMusicStartTime(channel, time))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
-
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusicPosition / GetMusicChannelPosition
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusicPosition") == 0 || strcmp(name, "GetMusicChannelPosition") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusicPosition") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushInt(0);
- } else {
- stack->pushInt(_music[channel]->getPositionTime());
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // IsMusicPlaying / IsMusicChannelPlaying
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "IsMusicPlaying") == 0 || strcmp(name, "IsMusicChannelPlaying") == 0) {
- int channel = 0;
- if (strcmp(name, "IsMusicPlaying") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushBool(false);
- } else {
- stack->pushBool(_music[channel]->isPlaying());
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // SetMusicVolume / SetMusicChannelVolume
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "SetMusicVolume") == 0 || strcmp(name, "SetMusicChannelVolume") == 0) {
- int channel = 0;
- if (strcmp(name, "SetMusicVolume") == 0) {
- stack->correctParams(1);
- } else {
- stack->correctParams(2);
- channel = stack->pop()->getInt();
- }
-
- int volume = stack->pop()->getInt();
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushBool(false);
- } else {
- if (DID_FAIL(_music[channel]->setVolumePercent(volume))) {
- stack->pushBool(false);
- } else {
- stack->pushBool(true);
- }
- }
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetMusicVolume / GetMusicChannelVolume
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetMusicVolume") == 0 || strcmp(name, "GetMusicChannelVolume") == 0) {
- int channel = 0;
- if (strcmp(name, "GetMusicVolume") == 0) {
- stack->correctParams(0);
- } else {
- stack->correctParams(1);
- channel = stack->pop()->getInt();
- }
-
- if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
- stack->pushInt(0);
- } else {
- stack->pushInt(_music[channel]->getVolumePercent());
- }
-
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // MusicCrossfade
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "MusicCrossfade") == 0) {
- stack->correctParams(4);
- int channel1 = stack->pop()->getInt(0);
- int channel2 = stack->pop()->getInt(0);
- uint32 fadeLength = (uint32)stack->pop()->getInt(0);
- bool swap = stack->pop()->getBool(true);
-
- if (_musicCrossfadeRunning) {
- script->runtimeError("Game.MusicCrossfade: Music crossfade is already in progress.");
- stack->pushBool(false);
- return STATUS_OK;
- }
-
- _musicCrossfadeStartTime = _liveTimer;
- _musicCrossfadeChannel1 = channel1;
- _musicCrossfadeChannel2 = channel2;
- _musicCrossfadeLength = fadeLength;
- _musicCrossfadeSwap = swap;
-
- _musicCrossfadeRunning = true;
-
- stack->pushBool(true);
- return STATUS_OK;
- }
-
- //////////////////////////////////////////////////////////////////////////
- // GetSoundLength
- //////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "GetSoundLength") == 0) {
- stack->correctParams(1);
-
- int length = 0;
- const char *filename = stack->pop()->getString();
-
- BaseSound *sound = new BaseSound(_gameRef);
- if (sound && DID_SUCCEED(sound->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
- length = sound->getLength();
- delete sound;
- sound = NULL;
- }
- stack->pushInt(length);
+ else if (_musicSystem->scCallMethod(script, stack, thisStack, name) == STATUS_OK) {
return STATUS_OK;
}
@@ -1370,12 +1090,12 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetMousePos") == 0) {
stack->correctParams(2);
- int x = stack->pop()->getInt();
- int y = stack->pop()->getInt();
- x = MAX(x, 0);
- x = MIN(x, _renderer->_width);
- y = MAX(y, 0);
- y = MIN(y, _renderer->_height);
+ int32 x = stack->pop()->getInt();
+ int32 y = stack->pop()->getInt();
+ x = MAX<int32>(x, 0);
+ x = MIN(x, _renderer->getWidth());
+ y = MAX<int32>(y, 0);
+ y = MIN(y, _renderer->getHeight());
Point32 p;
p.x = x + _renderer->_drawOffsetX;
p.y = y + _renderer->_drawOffsetY;
@@ -1431,7 +1151,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;
@@ -1471,7 +1191,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;
@@ -1490,7 +1210,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
} else {
stack->pushBool(false);
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
return STATUS_OK;
@@ -1542,7 +1262,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();
@@ -1556,7 +1276,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));
@@ -1755,7 +1475,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;
@@ -1861,14 +1581,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;
@@ -1880,20 +1593,10 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "ScreenshotEx") == 0) {
stack->correctParams(3);
const char *filename = stack->pop()->getString();
- 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;
- }
+ int sizeX = stack->pop()->getInt(_renderer->getWidth());
+ int sizeY = stack->pop()->getInt(_renderer->getHeight());
+
+ bool ret = _gameRef->_renderer->saveScreenShot(filename, sizeX, sizeY);
stack->pushBool(ret);
return STATUS_OK;
@@ -2008,7 +1711,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();
@@ -2067,7 +1770,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();
@@ -2084,7 +1787,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;
}
@@ -2121,10 +1824,10 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
else if (strcmp(name, "StoreSaveThumbnail") == 0) {
stack->correctParams(0);
delete _cachedThumbnail;
- _cachedThumbnail = new BaseSaveThumbHelper(this);
+ _cachedThumbnail = new SaveThumbHelper(this);
if (DID_FAIL(_cachedThumbnail->storeThumbnail())) {
delete _cachedThumbnail;
- _cachedThumbnail = NULL;
+ _cachedThumbnail = nullptr;
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -2139,7 +1842,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;
@@ -2178,7 +1881,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
}
BaseFileManager::getEngineInstance()->closeFile(file);
- file = NULL;
+ file = nullptr;
} else {
stack->pushNULL();
}
@@ -2270,7 +1973,7 @@ ScValue *BaseGame::scGetProperty(const Common::String &name) {
// CurrentTime (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "CurrentTime") {
- _scValue->setInt((int)_timer);
+ _scValue->setInt((int)getTimer()->getTime());
return _scValue;
}
@@ -2286,7 +1989,7 @@ ScValue *BaseGame::scGetProperty(const Common::String &name) {
// WindowedMode (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "WindowedMode") {
- _scValue->setBool(_renderer->_windowed);
+ _scValue->setBool(_renderer->isWindowed());
return _scValue;
}
@@ -2326,7 +2029,7 @@ ScValue *BaseGame::scGetProperty(const Common::String &name) {
// ScreenWidth (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "ScreenWidth") {
- _scValue->setInt(_renderer->_width);
+ _scValue->setInt(_renderer->getWidth());
return _scValue;
}
@@ -2334,7 +2037,7 @@ ScValue *BaseGame::scGetProperty(const Common::String &name) {
// ScreenHeight (RO)
//////////////////////////////////////////////////////////////////////////
else if (name == "ScreenHeight") {
- _scValue->setInt(_renderer->_height);
+ _scValue->setInt(_renderer->getHeight());
return _scValue;
}
@@ -2681,7 +2384,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;
@@ -2783,7 +2486,7 @@ bool BaseGame::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundBufferSize") == 0) {
_soundBufferSizeSec = value->getInt();
- _soundBufferSizeSec = MAX(3, _soundBufferSizeSec);
+ _soundBufferSizeSec = MAX<int32>(3, _soundBufferSizeSec);
return STATUS_OK;
}
@@ -2855,7 +2558,7 @@ bool BaseGame::displayQuickMsg() {
// update
for (uint32 i = 0; i < _quickMessages.size(); i++) {
- if (_currentTime - _quickMessages[i]->_startTime >= QUICK_MSG_DURATION) {
+ if (_currentTime - _quickMessages[i]->getStartTime() >= QUICK_MSG_DURATION) {
delete _quickMessages[i];
_quickMessages.remove_at(i);
i--;
@@ -2866,8 +2569,8 @@ bool BaseGame::displayQuickMsg() {
// display
for (uint32 i = 0; i < _quickMessages.size(); i++) {
- _systemFont->drawText((byte *)_quickMessages[i]->getText(), 0, posY, _renderer->_width);
- posY += _systemFont->getTextHeight((byte *)_quickMessages[i]->getText(), _renderer->_width);
+ _systemFont->drawText((const byte *)_quickMessages[i]->getText(), 0, posY, _renderer->getWidth());
+ posY += _systemFont->getTextHeight((const byte *)_quickMessages[i]->getText(), _renderer->getWidth());
}
return STATUS_OK;
}
@@ -2880,7 +2583,7 @@ void BaseGame::quickMessage(const char *text) {
delete _quickMessages[0];
_quickMessages.remove_at(0);
}
- _quickMessages.add(new BaseQuickMsg(_gameRef, text));
+ _quickMessages.add(new BaseQuickMsg(_currentTime, text));
}
@@ -2917,7 +2620,7 @@ bool BaseGame::unregisterObject(BaseObject *object) {
// get new focused window
if (_focusedWindow == object) {
- _focusedWindow = NULL;
+ _focusedWindow = nullptr;
}
break;
@@ -2926,12 +2629,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
@@ -2957,7 +2660,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();
}
}
@@ -3292,13 +2995,13 @@ bool BaseGame::showCursor() {
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::saveGame(int slot, const char *desc, bool quickSave) {
+bool BaseGame::saveGame(int32 slot, const char *desc, bool quickSave) {
return SaveLoad::saveGame(slot, desc, quickSave, _gameRef);
}
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::loadGame(int slot) {
+bool BaseGame::loadGame(uint32 slot) {
//_gameRef->LOG(0, "Load start %d", BaseUtils::GetUsedMemMB());
_loading = false;
@@ -3320,8 +3023,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];
@@ -3344,225 +3047,6 @@ bool BaseGame::displayWindows(bool inGame) {
return STATUS_OK;
}
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::playMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- delete _music[channel];
- _music[channel] = NULL;
-
- _music[channel] = new BaseSound(_gameRef);
- if (_music[channel] && DID_SUCCEED(_music[channel]->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
- if (_musicStartTime[channel]) {
- _music[channel]->setPositionTime(_musicStartTime[channel]);
- _musicStartTime[channel] = 0;
- }
- if (loopStart) {
- _music[channel]->setLoopStart(loopStart);
- }
- return _music[channel]->play(looping);
- } else {
- delete _music[channel];
- _music[channel] = NULL;
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::stopMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- _music[channel]->stop();
- delete _music[channel];
- _music[channel] = NULL;
- return STATUS_OK;
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::pauseMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- return _music[channel]->pause();
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::resumeMusic(int channel) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- if (_music[channel]) {
- return _music[channel]->resume();
- } else {
- return STATUS_FAILED;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::setMusicStartTime(int channel, uint32 time) {
- if (channel >= NUM_MUSIC_CHANNELS) {
- _gameRef->LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
- return STATUS_FAILED;
- }
-
- _musicStartTime[channel] = time;
- if (_music[channel] && _music[channel]->isPlaying()) {
- return _music[channel]->setPositionTime(time);
- } else {
- return STATUS_OK;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-bool BaseGame::loadSettings(const char *filename) {
- TOKEN_TABLE_START(commands)
- TOKEN_TABLE(SETTINGS)
- TOKEN_TABLE(GAME)
- TOKEN_TABLE(STRING_TABLE)
- TOKEN_TABLE(RESOLUTION)
- TOKEN_TABLE(REQUIRE_3D_ACCELERATION)
- TOKEN_TABLE(REQUIRE_SOUND)
- TOKEN_TABLE(HWTL_MODE)
- TOKEN_TABLE(ALLOW_WINDOWED_MODE)
- TOKEN_TABLE(ALLOW_ACCESSIBILITY_TAB)
- TOKEN_TABLE(ALLOW_ABOUT_TAB)
- TOKEN_TABLE(ALLOW_ADVANCED)
- TOKEN_TABLE(ALLOW_DESKTOP_RES)
- TOKEN_TABLE(REGISTRY_PATH)
- TOKEN_TABLE(RICH_SAVED_GAMES)
- TOKEN_TABLE(SAVED_GAME_EXT)
- TOKEN_TABLE(GUID)
- TOKEN_TABLE_END
-
-
- byte *origBuffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (origBuffer == NULL) {
- _gameRef->LOG(0, "BaseGame::LoadSettings failed for file '%s'", filename);
- return STATUS_FAILED;
- }
-
- bool ret = STATUS_OK;
-
- byte *buffer = origBuffer;
- byte *params;
- int cmd;
- BaseParser parser;
-
- if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_SETTINGS) {
- _gameRef->LOG(0, "'SETTINGS' keyword expected in game settings file.");
- return STATUS_FAILED;
- }
- buffer = params;
- while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
- switch (cmd) {
- case TOKEN_GAME:
- delete[] _settingsGameFile;
- _settingsGameFile = new char[strlen((char *)params) + 1];
- if (_settingsGameFile) {
- strcpy(_settingsGameFile, (char *)params);
- }
- break;
-
- case TOKEN_STRING_TABLE:
- if (DID_FAIL(_stringTable->loadFile((char *)params))) {
- cmd = PARSERR_GENERIC;
- }
- break;
-
- case TOKEN_RESOLUTION:
- parser.scanStr((char *)params, "%d,%d", &_settingsResWidth, &_settingsResHeight);
- break;
-
- case TOKEN_REQUIRE_3D_ACCELERATION:
- parser.scanStr((char *)params, "%b", &_settingsRequireAcceleration);
- break;
-
- case TOKEN_REQUIRE_SOUND:
- parser.scanStr((char *)params, "%b", &_settingsRequireSound);
- break;
-
- case TOKEN_HWTL_MODE:
- parser.scanStr((char *)params, "%d", &_settingsTLMode);
- break;
-
- case TOKEN_ALLOW_WINDOWED_MODE:
- parser.scanStr((char *)params, "%b", &_settingsAllowWindowed);
- break;
-
- case TOKEN_ALLOW_DESKTOP_RES:
- parser.scanStr((char *)params, "%b", &_settingsAllowDesktopRes);
- break;
-
- case TOKEN_ALLOW_ADVANCED:
- parser.scanStr((char *)params, "%b", &_settingsAllowAdvanced);
- break;
-
- case TOKEN_ALLOW_ACCESSIBILITY_TAB:
- parser.scanStr((char *)params, "%b", &_settingsAllowAccessTab);
- break;
-
- case TOKEN_ALLOW_ABOUT_TAB:
- parser.scanStr((char *)params, "%b", &_settingsAllowAboutTab);
- break;
-
- case TOKEN_REGISTRY_PATH:
- //BaseEngine::instance().getRegistry()->setBasePath((char *)params);
- break;
-
- case TOKEN_RICH_SAVED_GAMES:
- parser.scanStr((char *)params, "%b", &_richSavedGames);
- break;
-
- case TOKEN_SAVED_GAME_EXT:
- BaseUtils::setString(&_savedGameExt, (char *)params);
- break;
-
- case TOKEN_GUID:
- break;
- }
- }
- if (cmd == PARSERR_TOKENNOTFOUND) {
- _gameRef->LOG(0, "Syntax error in game settings '%s'", filename);
- ret = STATUS_FAILED;
- }
- if (cmd == PARSERR_GENERIC) {
- _gameRef->LOG(0, "Error loading game settings '%s'", filename);
- ret = STATUS_FAILED;
- }
-
- _settingsAllowWindowed = true; // TODO: These two settings should probably be cleaned out altogether.
- _compressedSavegames = true;
-
- delete[] origBuffer;
-
- return ret;
-}
-
-
//////////////////////////////////////////////////////////////////////////
bool BaseGame::persist(BasePersistenceManager *persistMgr) {
if (!persistMgr->getIsSaving()) {
@@ -3571,22 +3055,20 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_activeObject));
- persistMgr->transfer(TMEMBER(_capturedObject));
- persistMgr->transfer(TMEMBER(_cursorNoninteractive));
+ persistMgr->transferPtr(TMEMBER_PTR(_activeObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_capturedObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_cursorNoninteractive));
persistMgr->transfer(TMEMBER(_editorMode));
- persistMgr->transfer(TMEMBER(_fader));
+ persistMgr->transferPtr(TMEMBER_PTR(_fader));
persistMgr->transfer(TMEMBER(_freezeLevel));
- persistMgr->transfer(TMEMBER(_focusedWindow));
- persistMgr->transfer(TMEMBER(_fontStorage));
+ persistMgr->transferPtr(TMEMBER_PTR(_focusedWindow));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontStorage));
persistMgr->transfer(TMEMBER(_interactive));
- persistMgr->transfer(TMEMBER(_keyboardState));
+ persistMgr->transferPtr(TMEMBER_PTR(_keyboardState));
persistMgr->transfer(TMEMBER(_lastTime));
- persistMgr->transfer(TMEMBER(_mainObject));
- for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
- persistMgr->transfer(TMEMBER(_music[i]));
- persistMgr->transfer(TMEMBER(_musicStartTime[i]));
- }
+ persistMgr->transferPtr(TMEMBER_PTR(_mainObject));
+ _musicSystem->persistChannels(persistMgr);
+ _musicSystem->persistCrossfadeSettings(persistMgr);
persistMgr->transfer(TMEMBER(_offsetX));
persistMgr->transfer(TMEMBER(_offsetY));
@@ -3600,30 +3082,18 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
_regObjects.persist(persistMgr);
- persistMgr->transfer(TMEMBER(_scEngine));
+ persistMgr->transferPtr(TMEMBER_PTR(_scEngine));
//persistMgr->transfer(TMEMBER(_soundMgr));
persistMgr->transfer(TMEMBER_INT(_state));
//persistMgr->transfer(TMEMBER(_surfaceStorage));
persistMgr->transfer(TMEMBER(_subtitles));
persistMgr->transfer(TMEMBER(_subtitlesSpeed));
- persistMgr->transfer(TMEMBER(_systemFont));
- persistMgr->transfer(TMEMBER(_videoFont));
+ persistMgr->transferPtr(TMEMBER_PTR(_systemFont));
+ persistMgr->transferPtr(TMEMBER_PTR(_videoFont));
persistMgr->transfer(TMEMBER(_videoSubtitles));
- persistMgr->transfer(TMEMBER(_timer));
- persistMgr->transfer(TMEMBER(_timerDelta));
- persistMgr->transfer(TMEMBER(_timerLast));
-
- persistMgr->transfer(TMEMBER(_liveTimer));
- persistMgr->transfer(TMEMBER(_liveTimerDelta));
- persistMgr->transfer(TMEMBER(_liveTimerLast));
-
- persistMgr->transfer(TMEMBER(_musicCrossfadeRunning));
- persistMgr->transfer(TMEMBER(_musicCrossfadeStartTime));
- persistMgr->transfer(TMEMBER(_musicCrossfadeLength));
- persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
- persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
- persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
+ _timerNormal.persist(persistMgr);
+ _timerLive.persist(persistMgr);
_renderer->persistSaveLoadImages(persistMgr);
@@ -3729,7 +3199,7 @@ bool BaseGame::handleKeypress(Common::Event *event, bool printable) {
// TODO
if (_focusedWindow) {
- if (!_gameRef->_focusedWindow->handleKeypress(event, _keyboardState->_currentPrintable)) {
+ if (!_gameRef->_focusedWindow->handleKeypress(event, _keyboardState->isCurrentPrintable())) {
/*if (event->type != SDL_TEXTINPUT) {*/
if (_gameRef->_focusedWindow->canHandleEvent("Keypress")) {
_gameRef->_focusedWindow->applyEvent("Keypress");
@@ -3753,7 +3223,7 @@ void BaseGame::handleKeyRelease(Common::Event *event) {
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::handleMouseWheel(int delta) {
+bool BaseGame::handleMouseWheel(int32 delta) {
bool handled = false;
if (_focusedWindow) {
handled = _gameRef->_focusedWindow->handleMouseWheel(delta);
@@ -3783,7 +3253,7 @@ bool BaseGame::handleMouseWheel(int delta) {
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) {
+bool BaseGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const {
if (verMajor) {
*verMajor = DCGF_VER_MAJOR;
}
@@ -3806,11 +3276,11 @@ bool BaseGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *
void BaseGame::setWindowTitle() {
if (_renderer) {
char title[512];
- strcpy(title, _caption[0]);
+ Common::strlcpy(title, _caption[0], 512);
if (title[0] != '\0') {
- strcat(title, " - ");
+ Common::strlcat(title, " - ", 512);
}
- strcat(title, "WME Lite");
+ Common::strlcat(title, "WME Lite", 512);
Utf8String utf8Title;
@@ -3831,7 +3301,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) {
@@ -3877,16 +3347,16 @@ bool BaseGame::popViewport() {
_renderer->setViewport(_viewportStack[_viewportSP]->getRect());
} else _renderer->setViewport(_renderer->_drawOffsetX,
_renderer->_drawOffsetY,
- _renderer->_width + _renderer->_drawOffsetX,
- _renderer->_height + _renderer->_drawOffsetY);
+ _renderer->getWidth() + _renderer->_drawOffsetX,
+ _renderer->getHeight() + _renderer->_drawOffsetY);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::getCurrentViewportRect(Rect32 *rect, bool *custom) {
- if (rect == NULL) {
+bool BaseGame::getCurrentViewportRect(Rect32 *rect, bool *custom) const {
+ if (rect == nullptr) {
return STATUS_FAILED;
} else {
if (_viewportSP >= 0) {
@@ -3897,8 +3367,8 @@ bool BaseGame::getCurrentViewportRect(Rect32 *rect, bool *custom) {
} else {
BasePlatform::setRect(rect, _renderer->_drawOffsetX,
_renderer->_drawOffsetY,
- _renderer->_width + _renderer->_drawOffsetX,
- _renderer->_height + _renderer->_drawOffsetY);
+ _renderer->getWidth() + _renderer->_drawOffsetX,
+ _renderer->getHeight() + _renderer->_drawOffsetY);
if (custom) {
*custom = false;
}
@@ -3910,7 +3380,7 @@ bool BaseGame::getCurrentViewportRect(Rect32 *rect, bool *custom) {
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::getCurrentViewportOffset(int *offsetX, int *offsetY) {
+bool BaseGame::getCurrentViewportOffset(int *offsetX, int *offsetY) const {
if (_viewportSP >= 0) {
if (offsetX) {
*offsetX = _viewportStack[_viewportSP]->_offsetX;
@@ -3978,69 +3448,6 @@ bool BaseGame::displayContentSimple() {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::updateMusicCrossfade() {
- /* byte globMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
-
- if (!_musicCrossfadeRunning) {
- return STATUS_OK;
- }
- if (_state == GAME_FROZEN) {
- return STATUS_OK;
- }
-
- if (_musicCrossfadeChannel1 < 0 || _musicCrossfadeChannel1 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel1]) {
- _musicCrossfadeRunning = false;
- return STATUS_OK;
- }
- if (_musicCrossfadeChannel2 < 0 || _musicCrossfadeChannel2 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel2]) {
- _musicCrossfadeRunning = false;
- return STATUS_OK;
- }
-
- if (!_music[_musicCrossfadeChannel1]->isPlaying()) {
- _music[_musicCrossfadeChannel1]->play();
- }
- if (!_music[_musicCrossfadeChannel2]->isPlaying()) {
- _music[_musicCrossfadeChannel2]->play();
- }
-
- uint32 currentTime = _gameRef->_liveTimer - _musicCrossfadeStartTime;
-
- if (currentTime >= _musicCrossfadeLength) {
- _musicCrossfadeRunning = false;
- //_music[_musicCrossfadeChannel2]->setVolume(GlobMusicVol);
- _music[_musicCrossfadeChannel2]->setVolumePercent(100);
-
- _music[_musicCrossfadeChannel1]->stop();
- //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol);
- _music[_musicCrossfadeChannel1]->setVolumePercent(100);
-
-
- if (_musicCrossfadeSwap) {
- // swap channels
- BaseSound *dummy = _music[_musicCrossfadeChannel1];
- int dummyInt = _musicStartTime[_musicCrossfadeChannel1];
-
- _music[_musicCrossfadeChannel1] = _music[_musicCrossfadeChannel2];
- _musicStartTime[_musicCrossfadeChannel1] = _musicStartTime[_musicCrossfadeChannel2];
-
- _music[_musicCrossfadeChannel2] = dummy;
- _musicStartTime[_musicCrossfadeChannel2] = dummyInt;
- }
- } else {
- //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol - (float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
- //_music[_musicCrossfadeChannel2]->setVolume((float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
- _music[_musicCrossfadeChannel1]->setVolumePercent((int)(100.0f - (float)currentTime / (float)_musicCrossfadeLength * 100.0f));
- _music[_musicCrossfadeChannel2]->setVolumePercent((int)((float)currentTime / (float)_musicCrossfadeLength * 100.0f));
-
- //_gameRef->QuickMessageForm("%d %d", _music[_musicCrossfadeChannel1]->GetVolume(), _music[_musicCrossfadeChannel2]->GetVolume());
- }
-
- return STATUS_OK;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
bool BaseGame::resetContent() {
_scEngine->clearGlobals();
//_timer = 0;
@@ -4083,12 +3490,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;
@@ -4114,7 +3521,7 @@ bool BaseGame::stopVideo() {
if (_theoraPlayer && _theoraPlayer->isPlaying()) {
_theoraPlayer->stop();
delete _theoraPlayer;
- _theoraPlayer = NULL;
+ _theoraPlayer = nullptr;
}
return STATUS_OK;
}
@@ -4165,12 +3572,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;
@@ -4186,12 +3593,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");
}
}
@@ -4210,7 +3617,7 @@ bool BaseGame::onMouseLeftDblClick() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("LeftDoubleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("LeftDoubleClick");
}
}
@@ -4229,7 +3636,7 @@ bool BaseGame::onMouseRightDblClick() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightDoubleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightDoubleClick");
}
}
@@ -4244,7 +3651,7 @@ bool BaseGame::onMouseRightDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightClick");
}
}
@@ -4259,7 +3666,7 @@ bool BaseGame::onMouseRightUp() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("RightRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("RightRelease");
}
}
@@ -4278,7 +3685,7 @@ bool BaseGame::onMouseMiddleDown() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("MiddleClick"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("MiddleClick");
}
}
@@ -4293,7 +3700,7 @@ bool BaseGame::onMouseMiddleUp() {
bool handled = _state == GAME_RUNNING && DID_SUCCEED(applyEvent("MiddleRelease"));
if (!handled) {
- if (_activeObject != NULL) {
+ if (_activeObject != nullptr) {
_activeObject->applyEvent("MiddleRelease");
}
}
@@ -4302,7 +3709,7 @@ bool BaseGame::onMouseMiddleUp() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::onPaint() {
- if (_renderer && _renderer->_windowed && _renderer->_ready) {
+ if (_renderer && _renderer->isWindowed() && _renderer->isReady()) {
_renderer->initLoop();
displayContent(false, true);
displayDebugInfo();
@@ -4325,42 +3732,43 @@ bool BaseGame::onWindowClose() {
//////////////////////////////////////////////////////////////////////////
bool BaseGame::displayDebugInfo() {
- char str[100];
-
+ const uint32 strLength = 100;
+ char str[strLength];
+
if (_debugShowFPS) {
sprintf(str, "FPS: %d", _gameRef->_fps);
_systemFont->drawText((byte *)str, 0, 0, 100, TAL_LEFT);
}
if (_gameRef->_debugDebugMode) {
- if (!_gameRef->_renderer->_windowed) {
- sprintf(str, "Mode: %dx%dx%d", _renderer->_width, _renderer->_height, _renderer->_bPP);
+ if (!_gameRef->_renderer->isWindowed()) {
+ sprintf(str, "Mode: %dx%dx%d", _renderer->getWidth(), _renderer->getHeight(), _renderer->getBPP());
} else {
- sprintf(str, "Mode: %dx%d windowed", _renderer->_width, _renderer->_height);
+ sprintf(str, "Mode: %dx%d windowed", _renderer->getWidth(), _renderer->getHeight());
}
- strcat(str, " (");
- strcat(str, _renderer->getName().c_str());
- strcat(str, ")");
- _systemFont->drawText((byte *)str, 0, 0, _renderer->_width, TAL_RIGHT);
+ Common::strlcat(str, " (", strLength);
+ Common::strlcat(str, _renderer->getName().c_str(), strLength);
+ Common::strlcat(str, ")", strLength);
+ _systemFont->drawText((byte *)str, 0, 0, _renderer->getWidth(), TAL_RIGHT);
_renderer->displayDebugInfo();
int scrTotal, scrRunning, scrWaiting, scrPersistent;
scrTotal = _scEngine->getNumScripts(&scrRunning, &scrWaiting, &scrPersistent);
sprintf(str, "Running scripts: %d (r:%d w:%d p:%d)", scrTotal, scrRunning, scrWaiting, scrPersistent);
- _systemFont->drawText((byte *)str, 0, 70, _renderer->_width, TAL_RIGHT);
+ _systemFont->drawText((byte *)str, 0, 70, _renderer->getWidth(), TAL_RIGHT);
- sprintf(str, "Timer: %d", _timer);
- _gameRef->_systemFont->drawText((byte *)str, 0, 130, _renderer->_width, TAL_RIGHT);
+ sprintf(str, "Timer: %d", getTimer()->getTime());
+ _gameRef->_systemFont->drawText((byte *)str, 0, 130, _renderer->getWidth(), TAL_RIGHT);
- if (_activeObject != NULL) {
- _systemFont->drawText((const byte *)_activeObject->getName(), 0, 150, _renderer->_width, TAL_RIGHT);
+ if (_activeObject != nullptr) {
+ _systemFont->drawText((const byte *)_activeObject->getName(), 0, 150, _renderer->getWidth(), TAL_RIGHT);
}
sprintf(str, "GfxMem: %dMB", _usedMem / (1024 * 1024));
- _systemFont->drawText((byte *)str, 0, 170, _renderer->_width, TAL_RIGHT);
+ _systemFont->drawText((byte *)str, 0, 170, _renderer->getWidth(), TAL_RIGHT);
}
@@ -4432,7 +3840,7 @@ bool BaseGame::isRightDoubleClick() {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseGame::isDoubleClick(int buttonIndex) {
+bool BaseGame::isDoubleClick(int32 buttonIndex) {
uint32 maxDoubleCLickTime = 500;
int maxMoveX = 4;
int maxMoveY = 4;
@@ -4471,7 +3879,7 @@ void BaseGame::autoSaveOnExit() {
}
//////////////////////////////////////////////////////////////////////////
-void BaseGame::addMem(int bytes) {
+void BaseGame::addMem(int32 bytes) {
_usedMem += bytes;
}
@@ -4480,4 +3888,18 @@ AnsiString BaseGame::getDeviceType() const {
return "computer";
}
+//////////////////////////////////////////////////////////////////////////
+bool BaseGame::loadSettings(const char *filename) {
+ return _settings->loadSettings(filename);
+}
+
+//////////////////////////////////////////////////////////////////////////
+void BaseGame::expandStringByStringTable(char **str) const {
+ _settings->expandStringByStringTable(str);
+}
+
+char *BaseGame::getKeyFromStringTable(const char *str) const {
+ return _settings->getKeyFromStringTable(str);
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index 0f764b3d03..d51255d013 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -30,6 +30,7 @@
#define WINTERMUTE_BASE_GAME_H
#include "engines/wintermute/base/base_object.h"
+#include "engines/wintermute/base/timer.h"
#include "engines/wintermute/persistent.h"
#include "engines/wintermute/coll_templ.h"
#include "engines/wintermute/math/rect32.h"
@@ -44,22 +45,21 @@ class BaseFader;
class BaseFont;
class BaseFileManager;
class BaseTransitionMgr;
-class ScEngine;
class BaseFontStorage;
-class BaseStringTable;
+class BaseGameMusic;
class BaseQuickMsg;
-class UIWindow;
class BaseViewport;
class BaseRenderer;
class BaseRegistry;
-class BaseSaveThumbHelper;
class BaseSurfaceStorage;
-class SXMath;
class BaseKeyboardState;
+class BaseGameSettings;
+class ScEngine;
+class SXMath;
+class UIWindow;
class VideoPlayer;
class VideoTheoraPlayer;
-
-#define NUM_MUSIC_CHANNELS 5
+class SaveThumbHelper;
class BaseGame: public BaseObject {
public:
@@ -95,10 +95,10 @@ public:
bool _shuttingDown;
virtual bool displayDebugInfo();
- bool _debugShowFPS;
- bool _suspendedRendering;
- int _soundBufferSizeSec;
+ void setShowFPS(bool enabled) { _debugShowFPS = enabled; }
+
+ bool getSuspendedRendering() const { return _suspendedRendering; }
TTextEncoding _textEncoding;
bool _textRTL;
@@ -108,81 +108,84 @@ public:
void DEBUG_DumpClassRegistry();
bool setWaitCursor(const char *filename);
- int _thumbnailWidth;
- int _thumbnailHeight;
+ uint32 getSaveThumbWidth() const { return _thumbnailWidth; }
+ uint32 getSaveThumbHeight() const { return _thumbnailHeight; }
bool _editorMode;
- void getOffset(int *offsetX, int *offsetY);
- void setOffset(int offsetX, int offsetY);
+ void getOffset(int *offsetX, int *offsetY) const;
+ void setOffset(int32 offsetX, int32 offsetY);
int getSequence();
- int _offsetY;
- int _offsetX;
+ int32 _offsetY;
+ int32 _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;
+
+ // Init-functions:
+ bool initConfManSettings();
+ bool initRenderer();
+ bool loadGameSettingsFile();
bool initialize1();
bool initialize2();
bool initialize3();
BaseTransitionMgr *_transMgr;
+
+ // String Table
+ void expandStringByStringTable(char **str) const;
+ char *getKeyFromStringTable(const char *str) const;
void LOG(bool res, const char *fmt, ...);
BaseRenderer *_renderer;
BaseSoundMgr *_soundMgr;
ScEngine *_scEngine;
- SXMath *_mathClass;
+ BaseScriptable *_mathClass;
BaseSurfaceStorage *_surfaceStorage;
BaseFontStorage *_fontStorage;
BaseGame(const Common::String &gameId);
virtual ~BaseGame();
- void DEBUG_DebugDisable();
- void DEBUG_DebugEnable(const char *filename = NULL);
bool _debugDebugMode;
- void *_debugLogFile;
- int _sequence;
+ int32 _sequence;
virtual bool loadFile(const char *filename);
virtual bool loadBuffer(byte *buffer, bool complete = true);
- int _viewportSP;
+ int32 _viewportSP;
- BaseStringTable *_stringTable;
- int _settingsResWidth;
- int _settingsResHeight;
- char *_settingsGameFile;
bool _suppressScriptErrors;
bool _mouseLeftDown; // TODO: Hide
virtual bool externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
// compatibility bits
bool _compatKillMethodThreads;
- const char* getGameId() { return _gameId.c_str(); }
+ const char* getGameId() const { return _gameId.c_str(); }
void setGameId(const Common::String& gameId) { _gameId = gameId; }
uint32 _surfaceGCCycleTime;
bool _smartCache; // RO
bool _subtitles; // RO
- int _scheduledLoadSlot;
- bool _loading;
+ int32 _scheduledLoadSlot;
+
+ bool getIsLoading() const { return _loading; }
- virtual bool handleMouseWheel(int delta);
+ virtual bool handleMouseWheel(int32 delta);
bool _quitting;
- virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor);
+ virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const;
virtual bool handleKeypress(Common::Event *event, bool printable = false);
virtual void handleKeyRelease(Common::Event *event);
@@ -201,9 +204,9 @@ public:
bool displayWindows(bool inGame = false);
bool _useD3D;
virtual bool cleanup();
- bool loadGame(int slot);
+ bool loadGame(uint32 slot);
bool loadGame(const char *filename);
- bool saveGame(int slot, const char *desc, bool quickSave = false);
+ bool saveGame(int32 slot, const char *desc, bool quickSave = false);
virtual bool showCursor();
BaseObject *_activeObject;
@@ -212,14 +215,13 @@ public:
TGameState _state;
TGameState _origState;
bool _origInteractive;
- uint32 _timer;
- uint32 _timerDelta;
- uint32 _timerLast;
-
- uint32 _liveTimer;
- uint32 _liveTimerDelta;
- uint32 _liveTimerLast;
+ const Timer *getTimer() const { return &_timerNormal; }
+ const Timer *getLiveTimer() const { return &_timerLive; }
+private:
+ Timer _timerNormal;
+ Timer _timerLive;
+public:
BaseObject *_capturedObject;
Point32 _mousePos;
bool validObject(BaseObject *object);
@@ -233,51 +235,59 @@ public:
virtual bool displayContentSimple();
bool _forceNonStreamedSounds;
void resetMousePos();
- int _subtitlesSpeed;
+ int32 _subtitlesSpeed;
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) const;
+ bool getCurrentViewportRect(Rect32 *rect, bool *custom = nullptr) const;
bool popViewport();
bool pushViewport(BaseViewport *Viewport);
bool setActiveObject(BaseObject *Obj);
BaseSprite *_lastCursor;
bool drawCursor(BaseSprite *Cursor);
- BaseSaveThumbHelper *_cachedThumbnail;
- void addMem(int bytes);
+ SaveThumbHelper *_cachedThumbnail;
+ void addMem(int32 bytes);
bool _touchInterface;
bool _constrainedMemory;
protected:
+ BaseFont *_systemFont;
+ BaseFont *_videoFont;
+
BaseSprite *_loadingIcon;
- int _loadingIconX;
- int _loadingIconY;
- int _loadingIconPersistent;
+ int32 _loadingIconX;
+ int32 _loadingIconY;
+ int32 _loadingIconPersistent;
BaseFader *_fader;
- int _freezeLevel;
+ int32 _freezeLevel;
VideoPlayer *_videoPlayer;
VideoTheoraPlayer *_theoraPlayer;
private:
+ bool _debugShowFPS;
+ void *_debugLogFile;
+ void DEBUG_DebugDisable();
+ void DEBUG_DebugEnable(const char *filename = nullptr);
+
+ BaseObject *_mainObject;
+
bool _mouseRightDown;
bool _mouseMidlleDown;
- bool _settingsRequireAcceleration;
- bool _settingsAllowWindowed;
- bool _settingsAllowAdvanced;
- bool _settingsAllowAccessTab;
- bool _settingsAllowAboutTab;
- bool _settingsRequireSound;
- bool _settingsAllowDesktopRes;
- int _settingsTLMode;
+
+ BaseGameSettings *_settings;
+
+ int32 _soundBufferSizeSec;
+
virtual bool invalidateDeviceObjects();
virtual bool restoreDeviceObjects();
- char *_localSaveDir;
+ // TODO: This can probably be removed completely:
bool _saveDirChecked;
- bool _richSavedGames;
- char *_savedGameExt;
+
+ Common::String _localSaveDir;
+ bool _loading;
bool _reportTextureFormat;
@@ -287,36 +297,26 @@ 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;
bool _videoSubtitles;
- uint32 _musicStartTime[NUM_MUSIC_CHANNELS];
- bool _compressedSavegames;
bool _personalizedSave;
+ uint32 _thumbnailWidth;
+ uint32 _thumbnailHeight;
+
void setWindowTitle();
- bool resumeMusic(int channel);
- bool setMusicStartTime(int channel, uint32 time);
- bool pauseMusic(int channel);
- bool stopMusic(int channel);
- bool playMusic(int channel, const char *filename, bool looping = true, uint32 loopStart = 0);
- BaseSound *_music[NUM_MUSIC_CHANNELS];
- bool _musicCrossfadeRunning;
- bool _musicCrossfadeSwap;
- uint32 _musicCrossfadeStartTime;
- uint32 _musicCrossfadeLength;
- int _musicCrossfadeChannel1;
- int _musicCrossfadeChannel2;
+ bool _suspendedRendering;
BaseSprite *_cursorNoninteractive;
BaseKeyboardState *_keyboardState;
uint32 _fps;
- bool updateMusicCrossfade();
+ BaseGameMusic *_musicSystem;
bool isVideoPlaying();
bool stopVideo();
@@ -334,13 +334,13 @@ private:
time = 0;
}
- int posX;
- int posY;
+ int32 posX;
+ int32 posY;
uint32 time;
};
LastClickInfo _lastClick[2];
- bool isDoubleClick(int buttonIndex);
+ bool isDoubleClick(int32 buttonIndex);
uint32 _usedMem;
@@ -348,7 +348,7 @@ private:
protected:
// WME Lite specific
bool _autoSaveOnExit;
- int _autoSaveSlot;
+ uint32 _autoSaveSlot;
bool _cursorHidden;
public:
diff --git a/engines/wintermute/base/base_game_music.cpp b/engines/wintermute/base/base_game_music.cpp
new file mode 100644
index 0000000000..ac23801e4c
--- /dev/null
+++ b/engines/wintermute/base/base_game_music.cpp
@@ -0,0 +1,506 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/base/base_game_music.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_persistence_manager.h"
+#include "engines/wintermute/base/scriptables/script_stack.h"
+#include "engines/wintermute/base/scriptables/script_value.h"
+#include "engines/wintermute/base/scriptables/script.h"
+#include "engines/wintermute/base/sound/base_sound.h"
+
+namespace Wintermute {
+
+BaseGameMusic::BaseGameMusic(BaseGame *gameRef) : _gameRef(gameRef) {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ _music[i] = nullptr;
+ _musicStartTime[i] = 0;
+ }
+
+ _musicCrossfadeRunning = false;
+ _musicCrossfadeStartTime = 0;
+ _musicCrossfadeLength = 0;
+ _musicCrossfadeChannel1 = -1;
+ _musicCrossfadeChannel2 = -1;
+ _musicCrossfadeSwap = false;
+}
+
+void BaseGameMusic::cleanup() {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ delete _music[i];
+ _music[i] = nullptr;
+ _musicStartTime[i] = 0;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::playMusic(int channel, const char *filename, bool looping, uint32 loopStart) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ delete _music[channel];
+ _music[channel] = nullptr;
+
+ _music[channel] = new BaseSound(_gameRef);
+ if (_music[channel] && DID_SUCCEED(_music[channel]->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
+ if (_musicStartTime[channel]) {
+ _music[channel]->setPositionTime(_musicStartTime[channel]);
+ _musicStartTime[channel] = 0;
+ }
+ if (loopStart) {
+ _music[channel]->setLoopStart(loopStart);
+ }
+ return _music[channel]->play(looping);
+ } else {
+ delete _music[channel];
+ _music[channel] = nullptr;
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::stopMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ _music[channel]->stop();
+ delete _music[channel];
+ _music[channel] = nullptr;
+ return STATUS_OK;
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::pauseMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ return _music[channel]->pause();
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::resumeMusic(int channel) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ if (_music[channel]) {
+ return _music[channel]->resume();
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::setMusicStartTime(int channel, uint32 time) {
+ if (channel >= NUM_MUSIC_CHANNELS) {
+ BaseEngine::LOG(0, "**Error** Attempting to use music channel %d (max num channels: %d)", channel, NUM_MUSIC_CHANNELS);
+ return STATUS_FAILED;
+ }
+
+ _musicStartTime[channel] = time;
+ if (_music[channel] && _music[channel]->isPlaying()) {
+ return _music[channel]->setPositionTime(time);
+ } else {
+ return STATUS_OK;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameMusic::updateMusicCrossfade() {
+ /* byte globMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
+
+ if (!_musicCrossfadeRunning) {
+ return STATUS_OK;
+ }
+ if (_gameRef->_state == GAME_FROZEN) {
+ return STATUS_OK;
+ }
+
+ if (_musicCrossfadeChannel1 < 0 || _musicCrossfadeChannel1 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel1]) {
+ _musicCrossfadeRunning = false;
+ return STATUS_OK;
+ }
+ if (_musicCrossfadeChannel2 < 0 || _musicCrossfadeChannel2 >= NUM_MUSIC_CHANNELS || !_music[_musicCrossfadeChannel2]) {
+ _musicCrossfadeRunning = false;
+ return STATUS_OK;
+ }
+
+ if (!_music[_musicCrossfadeChannel1]->isPlaying()) {
+ _music[_musicCrossfadeChannel1]->play();
+ }
+ if (!_music[_musicCrossfadeChannel2]->isPlaying()) {
+ _music[_musicCrossfadeChannel2]->play();
+ }
+
+ uint32 currentTime = _gameRef->getLiveTimer()->getTime() - _musicCrossfadeStartTime;
+
+ if (currentTime >= _musicCrossfadeLength) {
+ _musicCrossfadeRunning = false;
+ //_music[_musicCrossfadeChannel2]->setVolume(GlobMusicVol);
+ _music[_musicCrossfadeChannel2]->setVolumePercent(100);
+
+ _music[_musicCrossfadeChannel1]->stop();
+ //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol);
+ _music[_musicCrossfadeChannel1]->setVolumePercent(100);
+
+
+ if (_musicCrossfadeSwap) {
+ // swap channels
+ BaseSound *dummy = _music[_musicCrossfadeChannel1];
+ int dummyInt = _musicStartTime[_musicCrossfadeChannel1];
+
+ _music[_musicCrossfadeChannel1] = _music[_musicCrossfadeChannel2];
+ _musicStartTime[_musicCrossfadeChannel1] = _musicStartTime[_musicCrossfadeChannel2];
+
+ _music[_musicCrossfadeChannel2] = dummy;
+ _musicStartTime[_musicCrossfadeChannel2] = dummyInt;
+ }
+ } else {
+ //_music[_musicCrossfadeChannel1]->setVolume(GlobMusicVol - (float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
+ //_music[_musicCrossfadeChannel2]->setVolume((float)CurrentTime / (float)_musicCrossfadeLength * GlobMusicVol);
+ _music[_musicCrossfadeChannel1]->setVolumePercent((int)(100.0f - (float)currentTime / (float)_musicCrossfadeLength * 100.0f));
+ _music[_musicCrossfadeChannel2]->setVolumePercent((int)((float)currentTime / (float)_musicCrossfadeLength * 100.0f));
+
+ //_gameRef->QuickMessageForm("%d %d", _music[_musicCrossfadeChannel1]->GetVolume(), _music[_musicCrossfadeChannel2]->GetVolume());
+ }
+
+ return STATUS_OK;
+}
+
+bool BaseGameMusic::persistChannels(BasePersistenceManager *persistMgr) {
+ for (int i = 0; i < NUM_MUSIC_CHANNELS; i++) {
+ persistMgr->transferPtr(TMEMBER_PTR(_music[i]));
+ persistMgr->transfer(TMEMBER(_musicStartTime[i]));
+ }
+ return true;
+}
+
+bool BaseGameMusic::persistCrossfadeSettings(BasePersistenceManager *persistMgr) {
+ persistMgr->transfer(TMEMBER(_musicCrossfadeRunning));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeStartTime));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeLength));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel1));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeChannel2));
+ persistMgr->transfer(TMEMBER(_musicCrossfadeSwap));
+ return true;
+}
+
+bool BaseGameMusic::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) {
+ //////////////////////////////////////////////////////////////////////////
+ // PlayMusic / PlayMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ if (strcmp(name, "PlayMusic") == 0 || strcmp(name, "PlayMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "PlayMusic") == 0) {
+ stack->correctParams(3);
+ } else {
+ stack->correctParams(4);
+ channel = stack->pop()->getInt();
+ }
+
+ const char *filename = stack->pop()->getString();
+ ScValue *valLooping = stack->pop();
+ bool looping = valLooping->isNULL() ? true : valLooping->getBool();
+
+ ScValue *valLoopStart = stack->pop();
+ uint32 loopStart = (uint32)(valLoopStart->isNULL() ? 0 : valLoopStart->getInt());
+
+
+ if (DID_FAIL(playMusic(channel, filename, looping, loopStart))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // StopMusic / StopMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "StopMusic") == 0 || strcmp(name, "StopMusicChannel") == 0) {
+ int channel = 0;
+
+ if (strcmp(name, "StopMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(stopMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // PauseMusic / PauseMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "PauseMusic") == 0 || strcmp(name, "PauseMusicChannel") == 0) {
+ int channel = 0;
+
+ if (strcmp(name, "PauseMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(pauseMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // ResumeMusic / ResumeMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "ResumeMusic") == 0 || strcmp(name, "ResumeMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "ResumeMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (DID_FAIL(resumeMusic(channel))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusic / GetMusicChannel
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusic") == 0 || strcmp(name, "GetMusicChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusic") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS) {
+ stack->pushNULL();
+ } else {
+ if (!_music[channel] || !_music[channel]->getFilename()) {
+ stack->pushNULL();
+ } else {
+ stack->pushString(_music[channel]->getFilename());
+ }
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // SetMusicPosition / SetMusicChannelPosition
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "SetMusicPosition") == 0 || strcmp(name, "SetMusicChannelPosition") == 0 || strcmp(name, "SetMusicPositionChannel") == 0) {
+ int channel = 0;
+ if (strcmp(name, "SetMusicPosition") == 0) {
+ stack->correctParams(1);
+ } else {
+ stack->correctParams(2);
+ channel = stack->pop()->getInt();
+ }
+
+ uint32 time = stack->pop()->getInt();
+
+ if (DID_FAIL(setMusicStartTime(channel, time))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusicPosition / GetMusicChannelPosition
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusicPosition") == 0 || strcmp(name, "GetMusicChannelPosition") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusicPosition") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushInt(0);
+ } else {
+ stack->pushInt(_music[channel]->getPositionTime());
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // IsMusicPlaying / IsMusicChannelPlaying
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "IsMusicPlaying") == 0 || strcmp(name, "IsMusicChannelPlaying") == 0) {
+ int channel = 0;
+ if (strcmp(name, "IsMusicPlaying") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(_music[channel]->isPlaying());
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // SetMusicVolume / SetMusicChannelVolume
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "SetMusicVolume") == 0 || strcmp(name, "SetMusicChannelVolume") == 0) {
+ int channel = 0;
+ if (strcmp(name, "SetMusicVolume") == 0) {
+ stack->correctParams(1);
+ } else {
+ stack->correctParams(2);
+ channel = stack->pop()->getInt();
+ }
+
+ int volume = stack->pop()->getInt();
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushBool(false);
+ } else {
+ if (DID_FAIL(_music[channel]->setVolumePercent(volume))) {
+ stack->pushBool(false);
+ } else {
+ stack->pushBool(true);
+ }
+ }
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetMusicVolume / GetMusicChannelVolume
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetMusicVolume") == 0 || strcmp(name, "GetMusicChannelVolume") == 0) {
+ int channel = 0;
+ if (strcmp(name, "GetMusicVolume") == 0) {
+ stack->correctParams(0);
+ } else {
+ stack->correctParams(1);
+ channel = stack->pop()->getInt();
+ }
+
+ if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) {
+ stack->pushInt(0);
+ } else {
+ stack->pushInt(_music[channel]->getVolumePercent());
+ }
+
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // MusicCrossfade
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "MusicCrossfade") == 0) {
+ stack->correctParams(4);
+ int channel1 = stack->pop()->getInt(0);
+ int channel2 = stack->pop()->getInt(0);
+ uint32 fadeLength = (uint32)stack->pop()->getInt(0);
+ bool swap = stack->pop()->getBool(true);
+
+ if (_musicCrossfadeRunning) {
+ script->runtimeError("Game.MusicCrossfade: Music crossfade is already in progress.");
+ stack->pushBool(false);
+ return STATUS_OK;
+ }
+
+ _musicCrossfadeStartTime = _gameRef->getLiveTimer()->getTime();
+ _musicCrossfadeChannel1 = channel1;
+ _musicCrossfadeChannel2 = channel2;
+ _musicCrossfadeLength = fadeLength;
+ _musicCrossfadeSwap = swap;
+
+ _musicCrossfadeRunning = true;
+
+ stack->pushBool(true);
+ return STATUS_OK;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+ // GetSoundLength
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "GetSoundLength") == 0) {
+ stack->correctParams(1);
+
+ int length = 0;
+ const char *filename = stack->pop()->getString();
+
+ BaseSound *sound = new BaseSound(_gameRef);
+ if (sound && DID_SUCCEED(sound->setSound(filename, Audio::Mixer::kMusicSoundType, true))) {
+ length = sound->getLength();
+ delete sound;
+ sound = nullptr;
+ }
+ stack->pushInt(length);
+ return STATUS_OK;
+ } else {
+ return STATUS_FAILED;
+ }
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_game_music.h b/engines/wintermute/base/base_game_music.h
new file mode 100644
index 0000000000..0ac904b8c1
--- /dev/null
+++ b/engines/wintermute/base/base_game_music.h
@@ -0,0 +1,73 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_BASE_GAME_MUSIC_H
+#define WINTERMUTE_BASE_GAME_MUSIC_H
+
+#include "common/scummsys.h"
+
+
+namespace Wintermute {
+
+#define NUM_MUSIC_CHANNELS 5
+class BasePersistenceManager;
+class BaseSound;
+class ScStack;
+class ScScript;
+class BaseGame;
+class BaseGameMusic {
+public:
+ BaseGameMusic(BaseGame *gameRef);
+ void cleanup();
+
+ bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
+
+ bool resumeMusic(int channel);
+ bool setMusicStartTime(int channel, uint32 time);
+ bool pauseMusic(int channel);
+ bool stopMusic(int channel);
+ bool playMusic(int channel, const char *filename, bool looping = true, uint32 loopStart = 0);
+ bool updateMusicCrossfade();
+
+ bool persistChannels(BasePersistenceManager *persistMgr);
+ bool persistCrossfadeSettings(BasePersistenceManager *persistMgr);
+private:
+ BaseGame *_gameRef;
+ BaseSound *_music[NUM_MUSIC_CHANNELS];
+ uint32 _musicStartTime[NUM_MUSIC_CHANNELS];
+ bool _musicCrossfadeRunning;
+ bool _musicCrossfadeSwap;
+ uint32 _musicCrossfadeStartTime;
+ uint32 _musicCrossfadeLength;
+ int32 _musicCrossfadeChannel1;
+ int32 _musicCrossfadeChannel2;
+};
+
+} // end of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/base/base_game_settings.cpp b/engines/wintermute/base/base_game_settings.cpp
new file mode 100644
index 0000000000..55fbe39fd2
--- /dev/null
+++ b/engines/wintermute/base/base_game_settings.cpp
@@ -0,0 +1,222 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/base/base_game_settings.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_file_manager.h"
+#include "engines/wintermute/base/base_string_table.h"
+#include "engines/wintermute/base/base_parser.h"
+#include "engines/wintermute/wintypes.h"
+
+namespace Wintermute {
+
+BaseGameSettings::BaseGameSettings(BaseGame *gameRef) {
+ _resWidth = 800;
+ _resHeight = 600;
+ _requireAcceleration = false;
+ _requireSound = false;
+ _TLMode = 0;
+ _allowWindowed = true;
+ _gameFile = nullptr;
+ _allowAdvanced = false;
+ _allowAccessTab = true;
+ _allowAboutTab = true;
+ _allowDesktopRes = false;
+
+ _compressedSavegames = true;
+ _richSavedGames = false;
+ _savedGameExt = "dsv";
+
+ _stringTable = new BaseStringTable(gameRef);
+}
+
+BaseGameSettings::~BaseGameSettings() {
+ delete[] _gameFile;
+ _gameFile = nullptr;
+ delete _stringTable;
+ _stringTable = nullptr;
+}
+
+TOKEN_DEF_START
+TOKEN_DEF(GAME)
+TOKEN_DEF(STRING_TABLE)
+TOKEN_DEF(RESOLUTION)
+TOKEN_DEF(SETTINGS)
+TOKEN_DEF(REQUIRE_3D_ACCELERATION)
+TOKEN_DEF(REQUIRE_SOUND)
+TOKEN_DEF(HWTL_MODE)
+TOKEN_DEF(ALLOW_WINDOWED_MODE)
+TOKEN_DEF(ALLOW_ACCESSIBILITY_TAB)
+TOKEN_DEF(ALLOW_ABOUT_TAB)
+TOKEN_DEF(ALLOW_ADVANCED)
+TOKEN_DEF(ALLOW_DESKTOP_RES)
+TOKEN_DEF(REGISTRY_PATH)
+TOKEN_DEF(RICH_SAVED_GAMES)
+TOKEN_DEF(SAVED_GAME_EXT)
+TOKEN_DEF(GUID)
+TOKEN_DEF_END
+
+//////////////////////////////////////////////////////////////////////////
+bool BaseGameSettings::loadSettings(const char *filename) {
+ TOKEN_TABLE_START(commands)
+ TOKEN_TABLE(SETTINGS)
+ TOKEN_TABLE(GAME)
+ TOKEN_TABLE(STRING_TABLE)
+ TOKEN_TABLE(RESOLUTION)
+ TOKEN_TABLE(REQUIRE_3D_ACCELERATION)
+ TOKEN_TABLE(REQUIRE_SOUND)
+ TOKEN_TABLE(HWTL_MODE)
+ TOKEN_TABLE(ALLOW_WINDOWED_MODE)
+ TOKEN_TABLE(ALLOW_ACCESSIBILITY_TAB)
+ TOKEN_TABLE(ALLOW_ABOUT_TAB)
+ TOKEN_TABLE(ALLOW_ADVANCED)
+ TOKEN_TABLE(ALLOW_DESKTOP_RES)
+ TOKEN_TABLE(REGISTRY_PATH)
+ TOKEN_TABLE(RICH_SAVED_GAMES)
+ TOKEN_TABLE(SAVED_GAME_EXT)
+ TOKEN_TABLE(GUID)
+ TOKEN_TABLE_END
+
+
+ byte *origBuffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
+ if (origBuffer == nullptr) {
+ BaseEngine::LOG(0, "BaseGame::LoadSettings failed for file '%s'", filename);
+ return STATUS_FAILED;
+ }
+
+ bool ret = STATUS_OK;
+
+ byte *buffer = origBuffer;
+ byte *params;
+ int cmd;
+ BaseParser parser;
+
+ if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_SETTINGS) {
+ BaseEngine::LOG(0, "'SETTINGS' keyword expected in game settings file.");
+ return STATUS_FAILED;
+ }
+ buffer = params;
+ while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
+ switch (cmd) {
+ case TOKEN_GAME:
+ delete[] _gameFile;
+ _gameFile = new char[strlen((char *)params) + 1];
+ if (_gameFile) {
+ strcpy(_gameFile, (char *)params);
+ }
+ break;
+
+ case TOKEN_STRING_TABLE:
+ if (DID_FAIL(_stringTable->loadFile((char *)params))) {
+ cmd = PARSERR_GENERIC;
+ }
+ break;
+
+ case TOKEN_RESOLUTION:
+ parser.scanStr((char *)params, "%d,%d", &_resWidth, &_resHeight);
+ break;
+
+ case TOKEN_REQUIRE_3D_ACCELERATION:
+ parser.scanStr((char *)params, "%b", &_requireAcceleration);
+ break;
+
+ case TOKEN_REQUIRE_SOUND:
+ parser.scanStr((char *)params, "%b", &_requireSound);
+ break;
+
+ case TOKEN_HWTL_MODE:
+ parser.scanStr((char *)params, "%d", &_TLMode);
+ break;
+
+ case TOKEN_ALLOW_WINDOWED_MODE:
+ parser.scanStr((char *)params, "%b", &_allowWindowed);
+ break;
+
+ case TOKEN_ALLOW_DESKTOP_RES:
+ parser.scanStr((char *)params, "%b", &_allowDesktopRes);
+ break;
+
+ case TOKEN_ALLOW_ADVANCED:
+ parser.scanStr((char *)params, "%b", &_allowAdvanced);
+ break;
+
+ case TOKEN_ALLOW_ACCESSIBILITY_TAB:
+ parser.scanStr((char *)params, "%b", &_allowAccessTab);
+ break;
+
+ case TOKEN_ALLOW_ABOUT_TAB:
+ parser.scanStr((char *)params, "%b", &_allowAboutTab);
+ break;
+
+ case TOKEN_REGISTRY_PATH:
+ //BaseEngine::instance().getRegistry()->setBasePath((char *)params);
+ break;
+
+ case TOKEN_RICH_SAVED_GAMES:
+ parser.scanStr((char *)params, "%b", &_richSavedGames);
+ break;
+
+ case TOKEN_SAVED_GAME_EXT:
+ _savedGameExt = (char *)params;
+ break;
+
+ case TOKEN_GUID:
+ break;
+ }
+ }
+ if (cmd == PARSERR_TOKENNOTFOUND) {
+ BaseEngine::LOG(0, "Syntax error in game settings '%s'", filename);
+ ret = STATUS_FAILED;
+ }
+ if (cmd == PARSERR_GENERIC) {
+ BaseEngine::LOG(0, "Error loading game settings '%s'", filename);
+ ret = STATUS_FAILED;
+ }
+
+ _allowWindowed = true; // TODO: These two settings should probably be cleaned out altogether.
+ _compressedSavegames = true;
+
+ delete[] origBuffer;
+
+ return ret;
+}
+
+bool BaseGameSettings::loadStringTable(const char *filename, bool clearOld) {
+ return _stringTable->loadFile(filename, clearOld);
+}
+
+//////////////////////////////////////////////////////////////////////////
+void BaseGameSettings::expandStringByStringTable(char **str) const {
+ _stringTable->expand(str);
+}
+
+char *BaseGameSettings::getKeyFromStringTable(const char *str) const {
+ return _stringTable->getKey(str);
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_game_settings.h b/engines/wintermute/base/base_game_settings.h
new file mode 100644
index 0000000000..1dfb0b50cc
--- /dev/null
+++ b/engines/wintermute/base/base_game_settings.h
@@ -0,0 +1,71 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_BASE_GAME_SETTINGS_H
+#define WINTERMUTE_BASE_GAME_SETTINGS_H
+
+#include "common/str.h"
+
+namespace Wintermute {
+class BaseStringTable;
+class BaseGame;
+class BaseGameSettings {
+public:
+ const char *getGameFile() const { return (_gameFile ? _gameFile : "default.game"); }
+ int getResWidth() const { return _resWidth; }
+ int getResHeight() const { return _resHeight; }
+
+ BaseGameSettings(BaseGame *gameRef);
+ ~BaseGameSettings();
+ bool loadSettings(const char *filename);
+ bool loadStringTable(const char *filename, bool clearOld);
+ void expandStringByStringTable(char **str) const;
+ char *getKeyFromStringTable(const char *str) const;
+private:
+ char *_gameFile;
+ int _resWidth;
+ int _resHeight;
+ BaseStringTable *_stringTable;
+// Not ever used:
+ int _TLMode;
+ bool _compressedSavegames;
+ Common::String _savedGameExt;
+ bool _requireAcceleration;
+ bool _allowWindowed;
+ bool _allowAdvanced;
+ bool _allowAccessTab;
+ bool _allowAboutTab;
+ bool _requireSound;
+ bool _allowDesktopRes;
+// TODO: This can probably be removed completely:
+ bool _richSavedGames;
+};
+
+} // end of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/base/base_keyboard_state.cpp b/engines/wintermute/base/base_keyboard_state.cpp
index da7baafd2d..072a1bb71b 100644
--- a/engines/wintermute/base/base_keyboard_state.cpp
+++ b/engines/wintermute/base/base_keyboard_state.cpp
@@ -200,9 +200,8 @@ const char *BaseKeyboardState::scToString() {
bool BaseKeyboardState::readKey(Common::Event *event) {
//_currentPrintable = (event->type == SDL_TEXTINPUT); // TODO
_currentCharCode = keyCodeToVKey(event);
- if ((_currentCharCode <= Common::KEYCODE_z && _currentCharCode >= Common::KEYCODE_a) ||
- (_currentCharCode <= Common::KEYCODE_9 && _currentCharCode >= Common::KEYCODE_0) ||
- (_currentCharCode == Common::KEYCODE_SPACE)) {
+ // Verify that this is a printable ISO-8859-character (including the upper charset)
+ if ((_currentCharCode <= 0x7E && _currentCharCode >= 0x20) || (_currentCharCode <= 0xFF && _currentCharCode >= 0xA0)) {
_currentPrintable = true;
} else {
_currentPrintable = false;
@@ -258,6 +257,11 @@ bool BaseKeyboardState::isAltDown() {
}
//////////////////////////////////////////////////////////////////////////
+bool BaseKeyboardState::isCurrentPrintable() const {
+ return _currentPrintable;
+}
+
+//////////////////////////////////////////////////////////////////////////
uint32 BaseKeyboardState::keyCodeToVKey(Common::Event *event) {
if (event->type != Common::EVENT_KEYDOWN) {
return 0;
@@ -267,7 +271,7 @@ uint32 BaseKeyboardState::keyCodeToVKey(Common::Event *event) {
case Common::KEYCODE_KP_ENTER:
return Common::KEYCODE_RETURN;
default:
- return (uint32)event->kbd.keycode;
+ return (uint32)event->kbd.ascii;
}
}
diff --git a/engines/wintermute/base/base_keyboard_state.h b/engines/wintermute/base/base_keyboard_state.h
index dfd0efdec0..b62ece02b7 100644
--- a/engines/wintermute/base/base_keyboard_state.h
+++ b/engines/wintermute/base/base_keyboard_state.h
@@ -39,14 +39,6 @@ namespace Wintermute {
class BaseKeyboardState : public BaseScriptable {
public:
- uint32 _currentKeyData;
- uint32 _currentCharCode;
- bool _currentPrintable;
-
- bool _currentShift;
- bool _currentAlt;
- bool _currentControl;
-
DECLARE_PERSISTENT(BaseKeyboardState, BaseScriptable)
BaseKeyboardState(BaseGame *inGame);
virtual ~BaseKeyboardState();
@@ -57,6 +49,7 @@ public:
static bool isShiftDown();
static bool isControlDown();
static bool isAltDown();
+ bool isCurrentPrintable() const;
// scripting interface
virtual ScValue *scGetProperty(const Common::String &name);
@@ -65,6 +58,14 @@ public:
virtual const char *scToString();
private:
+ bool _currentPrintable;
+ uint32 _currentKeyData;
+ uint32 _currentCharCode;
+
+ bool _currentShift;
+ bool _currentAlt;
+ bool _currentControl;
+
uint8 *_keyStates;
uint32 keyCodeToVKey(Common::Event *event);
Common::KeyCode vKeyToKeyCode(uint32 vkey); //TODO, reimplement using ScummVM-backend
diff --git a/engines/wintermute/base/base_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_named_object.h b/engines/wintermute/base/base_named_object.h
index 77a00cee45..d25fec4a82 100644
--- a/engines/wintermute/base/base_named_object.h
+++ b/engines/wintermute/base/base_named_object.h
@@ -42,7 +42,7 @@ public:
virtual ~BaseNamedObject(void);
BaseNamedObject(TDynamicConstructor, TDynamicConstructor);
- const char *getName() { return _name; }
+ const char *getName() const { return _name; }
void setName(const char *name);
};
diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp
index eba8416485..ad181b922e 100644
--- a/engines/wintermute/base/base_object.cpp
+++ b/engines/wintermute/base/base_object.cpp
@@ -33,7 +33,6 @@
#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/base/sound/base_sound_manager.h"
#include "engines/wintermute/base/base_game.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/platform_osystem.h"
@@ -60,18 +59,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 +85,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 +108,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;
@@ -150,7 +149,7 @@ void BaseObject::setCaption(const char *caption, int caseVal) {
_caption[caseVal - 1] = new char[strlen(caption) + 1];
if (_caption[caseVal - 1]) {
strcpy(_caption[caseVal - 1], caption);
- _gameRef->_stringTable->expand(&_caption[caseVal - 1]);
+ _gameRef->expandStringByStringTable(&_caption[caseVal - 1]);
}
}
@@ -160,7 +159,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 +222,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 +316,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 +350,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();
@@ -956,10 +955,10 @@ bool BaseObject::persist(BasePersistenceManager *persistMgr) {
for (int i = 0; i < 7; i++) {
persistMgr->transfer(TMEMBER(_caption[i]));
}
- persistMgr->transfer(TMEMBER(_activeCursor));
+ persistMgr->transferPtr(TMEMBER_PTR(_activeCursor));
persistMgr->transfer(TMEMBER(_alphaColor));
persistMgr->transfer(TMEMBER(_autoSoundPanning));
- persistMgr->transfer(TMEMBER(_cursor));
+ persistMgr->transferPtr(TMEMBER_PTR(_cursor));
persistMgr->transfer(TMEMBER(_sharedCursors));
persistMgr->transfer(TMEMBER(_editorAlwaysRegister));
persistMgr->transfer(TMEMBER(_editorOnly));
@@ -972,7 +971,7 @@ bool BaseObject::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_relativeScale));
persistMgr->transfer(TMEMBER(_rotatable));
persistMgr->transfer(TMEMBER(_scale));
- persistMgr->transfer(TMEMBER(_sFX));
+ persistMgr->transferPtr(TMEMBER_PTR(_sFX));
persistMgr->transfer(TMEMBER(_sFXStart));
persistMgr->transfer(TMEMBER(_sFXVolume));
persistMgr->transfer(TMEMBER(_ready));
@@ -1010,14 +1009,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 +1030,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 +1065,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 +1084,7 @@ bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const
}
}
- if (filename == NULL) {
+ if (filename == nullptr) {
return STATUS_FAILED;
}
@@ -1111,7 +1110,7 @@ bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const
}
} else {
delete _sFX;
- _sFX = NULL;
+ _sFX = nullptr;
return STATUS_FAILED;
}
}
@@ -1123,7 +1122,7 @@ bool BaseObject::stopSFX(bool deleteSound) {
_sFX->stop();
if (deleteSound) {
delete _sFX;
- _sFX = NULL;
+ _sFX = nullptr;
}
return STATUS_OK;
} else {
@@ -1179,7 +1178,7 @@ bool BaseObject::updateSounds() {
if (_soundEvent) {
if (_sFX && !_sFX->isPlaying()) {
applyEvent(_soundEvent);
- setSoundEvent(NULL);
+ setSoundEvent(nullptr);
}
}
@@ -1229,7 +1228,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 d7d91a25f6..7afe9cf94c 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;
@@ -72,7 +72,7 @@ protected:
bool _ready;
Rect32 _rect;
bool _rectSet;
- int _iD;
+ int32 _iD;
char *_soundEvent;
public:
TSpriteBlendMode _blendMode;
@@ -84,7 +84,7 @@ public:
virtual bool resetSoundPan();
virtual bool updateSounds();
bool updateOneSound(BaseSound *sound);
- int _sFXVolume;
+ int32 _sFXVolume;
virtual bool handleMouseWheel(int delta);
virtual bool handleMouse(TMouseEvent event, TMouseButton button);
@@ -110,8 +110,8 @@ public:
bool _movable;
bool _zoomable;
bool _shadowable;
- int _posY;
- int _posX;
+ int32 _posY;
+ int32 _posX;
bool _registrable;
char *_caption[7];
bool _saveState;
@@ -136,10 +136,10 @@ public:
public:
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_parser.cpp b/engines/wintermute/base/base_parser.cpp
index 9a0e9e3ad9..a7e3bd5efb 100644
--- a/engines/wintermute/base/base_parser.cpp
+++ b/engines/wintermute/base/base_parser.cpp
@@ -27,8 +27,8 @@
*/
#include "engines/wintermute/base/base_parser.h"
-#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/platform_osystem.h"
#include "common/str.h"
#include "common/util.h"
@@ -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;
@@ -275,7 +275,7 @@ float BaseParser::getTokenFloat(char **buf) {
//////////////////////////////////////////////////////////////////////
-int BaseParser::getTokenInt(char **buf) {
+int32 BaseParser::getTokenInt(char **buf) {
Common::String token = getToken(buf);
const char *t = token.c_str();
if (!((*t >= '0' && *t <= '9') || *t == '-')) {
@@ -298,11 +298,11 @@ void BaseParser::skipToken(char **buf, char *tok, char * /*msg*/) {
//////////////////////////////////////////////////////////////////////
-int BaseParser::scanStr(const char *in, const char *format, ...) {
+int32 BaseParser::scanStr(const char *in, const char *format, ...) {
va_list arg;
va_start(arg, format);
- int num = 0;
+ int32 num = 0;
in += strspn(in, " \t\n\f");
while (*format && *in) {
diff --git a/engines/wintermute/base/base_parser.h b/engines/wintermute/base/base_parser.h
index 76ca8ea856..4953ac3c0b 100644
--- a/engines/wintermute/base/base_parser.h
+++ b/engines/wintermute/base/base_parser.h
@@ -59,26 +59,26 @@ namespace Wintermute {
class BaseParser {
public:
struct TokenDesc {
- int32 id;
+ int32 id;
const char *token;
};
public:
- int scanStr(const char *in, const char *format, ...);
+ int32 scanStr(const char *in, const char *format, ...);
int32 getCommand(char **buf, const TokenDesc *tokens, char **params);
BaseParser();
virtual ~BaseParser();
private:
char *getLastOffender();
- void skipToken(char **buf, char *tok, char *msg = NULL);
- int getTokenInt(char **buf);
+ void skipToken(char **buf, char *tok, char *msg = nullptr);
+ int32 getTokenInt(char **buf);
float getTokenFloat(char **buf);
Common::String getToken(char **buf);
char *getAssignmentText(char **buf);
char *getSubText(char **buf, char open, char close);
void skipCharacters(char **buf, const char *toSkip);
int32 getObject(char **buf, const TokenDesc *tokens, char **name, char **data);
- int _parserLine;
+ int32 _parserLine;
char _lastOffender[255];
char *_whiteSpace;
};
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 4cb67b87e1..5dbacb157b 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -31,13 +31,15 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_persistence_manager.h"
-#include "engines/wintermute/base/base_save_thumb_helper.h"
#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/math/vector2.h"
#include "engines/wintermute/base/gfx/base_image.h"
+#include "engines/wintermute/base/save_thumb_helper.h"
#include "engines/wintermute/base/sound/base_sound.h"
+#include "engines/wintermute/graphics/transparent_surface.h"
#include "engines/wintermute/wintermute.h"
#include "graphics/decoders/bmp.h"
+#include "graphics/scaler.h"
#include "common/memstream.h"
#include "common/str.h"
#include "common/system.h"
@@ -45,37 +47,50 @@
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;
+ _savedTimestamp.tm_sec = 0;
+ _savedTimestamp.tm_min = 0;
+ _savedTimestamp.tm_hour = 0;
+ _savedTimestamp.tm_mday = 0;
+ _savedTimestamp.tm_mon = 0;
+ _savedTimestamp.tm_year = 0;
+ _savedTimestamp.tm_wday = 0;
+
+ _savedPlayTime = 0;
+
_thumbnailDataSize = 0;
- _thumbnailData = NULL;
+ _thumbnailData = nullptr;
if (savePrefix) {
_savePrefix = savePrefix;
} else if (_gameRef) {
@@ -89,28 +104,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;
@@ -118,25 +126,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);
@@ -144,13 +158,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 = new Graphics::Surface;
- surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat());
- desc.setThumbnail(surf);
+ const Graphics::Surface *bmpSurface = bmpDecoder.getSurface();
+ TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false);
+ Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);
+ Graphics::Surface *thumb = scaled->convertTo(g_system->getOverlayFormat());
+ desc.setThumbnail(thumb);
+ delete scaleableSurface;
+ scaled->free();
+ delete scaled;
}
}
@@ -165,13 +194,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;
@@ -199,22 +228,21 @@ bool BasePersistenceManager::initSave(const char *desc) {
if (_saveStream) {
// get thumbnails
if (!_gameRef->_cachedThumbnail) {
- _gameRef->_cachedThumbnail = new BaseSaveThumbHelper(_gameRef);
+ _gameRef->_cachedThumbnail = new SaveThumbHelper(_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);
@@ -243,10 +271,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
@@ -270,7 +317,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();
@@ -282,28 +329,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();
@@ -448,7 +499,7 @@ char *BasePersistenceManager::getString() {
if (!strcmp(ret, "(null)")) {
delete[] ret;
- return NULL;
+ return nullptr;
} else {
return ret;
}
@@ -461,7 +512,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;
@@ -477,20 +528,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);
+ int 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);
}
@@ -499,16 +556,21 @@ float BasePersistenceManager::getFloat() {
}
void BasePersistenceManager::putDouble(double val) {
- Common::String str = Common::String::format("D%f", val);
- str.format("D%f", val);
+ int 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);
}
@@ -537,7 +599,7 @@ bool BasePersistenceManager::transfer(const char *name, bool *val) {
//////////////////////////////////////////////////////////////////////////
// int
-bool BasePersistenceManager::transfer(const char *name, int *val) {
+bool BasePersistenceManager::transfer(const char *name, int32 *val) {
if (_saving) {
_saveStream->writeSint32LE(*val);
if (_saveStream->err()) {
@@ -786,12 +848,13 @@ bool BasePersistenceManager::transfer(const char *name, Vector2 *val) {
//////////////////////////////////////////////////////////////////////////
// generic pointer
-bool BasePersistenceManager::transfer(const char *name, void *val) {
+
+bool BasePersistenceManager::transferPtr(const char *name, void *val) {
int classID = -1, instanceID = -1;
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);
}
@@ -807,7 +870,6 @@ bool BasePersistenceManager::transfer(const char *name, void *val) {
return STATUS_OK;
}
-
//////////////////////////////////////////////////////////////////////////
bool BasePersistenceManager::checkVersion(byte verMajor, byte verMinor, byte verBuild) {
if (_saving) {
diff --git a/engines/wintermute/base/base_persistence_manager.h b/engines/wintermute/base/base_persistence_manager.h
index a262c92a0b..7b578085ba 100644
--- a/engines/wintermute/base/base_persistence_manager.h
+++ b/engines/wintermute/base/base_persistence_manager.h
@@ -73,8 +73,8 @@ public:
uint32 _richBufferSize;
byte *_richBuffer;
- bool transfer(const char *name, void *val);
- bool transfer(const char *name, int *val);
+ bool transferPtr(const char *name, void *val);
+ bool transfer(const char *name, int32 *val);
bool transfer(const char *name, uint32 *val);
bool transfer(const char *name, float *val);
bool transfer(const char *name, double *val);
@@ -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_point.h b/engines/wintermute/base/base_point.h
index c0bbd3102e..26568d5d0b 100644
--- a/engines/wintermute/base/base_point.h
+++ b/engines/wintermute/base/base_point.h
@@ -39,8 +39,8 @@ public:
DECLARE_PERSISTENT(BasePoint, BaseClass)
BasePoint();
BasePoint(int initX, int initY);
- int y;
- int x;
+ int32 y;
+ int32 x;
virtual ~BasePoint();
};
diff --git a/engines/wintermute/base/base_quick_msg.cpp b/engines/wintermute/base/base_quick_msg.cpp
index 0a9907ac6b..9f19dfd74a 100644
--- a/engines/wintermute/base/base_quick_msg.cpp
+++ b/engines/wintermute/base/base_quick_msg.cpp
@@ -27,31 +27,29 @@
*/
#include "engines/wintermute/base/base_quick_msg.h"
-#include "engines/wintermute/base/base_game.h"
namespace Wintermute {
//////////////////////////////////////////////////////////////////////////
-BaseQuickMsg::BaseQuickMsg(BaseGame *inGame, const char *text) : BaseClass(inGame) {
- _text = new char [strlen(text) + 1];
- if (_text) {
- strcpy(_text, text);
- }
- _startTime = _gameRef->_currentTime;
+BaseQuickMsg::BaseQuickMsg(uint32 startTime, const char *text) {
+ _text = text;
+ _startTime = startTime;
}
//////////////////////////////////////////////////////////////////////////
BaseQuickMsg::~BaseQuickMsg() {
- if (_text) {
- delete[] _text;
- }
}
//////////////////////////////////////////////////////////////////////////
-char *BaseQuickMsg::getText() {
- return _text;
+const char *BaseQuickMsg::getText() const {
+ return _text.c_str();
+}
+
+//////////////////////////////////////////////////////////////////////////
+uint32 BaseQuickMsg::getStartTime() const {
+ return _startTime;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_quick_msg.h b/engines/wintermute/base/base_quick_msg.h
index 67f9613461..377f7733fd 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 BaseQuickMsg {
public:
- char *getText();
- uint32 _startTime;
- BaseQuickMsg(BaseGame *inGame, const char *text);
+ const char *getText() const;
+ uint32 getStartTime() const;
+ BaseQuickMsg(uint32 startTime, const char *text);
virtual ~BaseQuickMsg();
private:
- char *_text;
+ Common::String _text;
+ uint32 _startTime;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp
index 0bc5975e51..2dabe6ae44 100644
--- a/engines/wintermute/base/base_region.cpp
+++ b/engines/wintermute/base/base_region.cpp
@@ -29,7 +29,7 @@
#include "engines/wintermute/base/base_region.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/base_dynamic_buffer.h"
-#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/scriptables/script.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
#include "engines/wintermute/base/scriptables/script_value.h"
@@ -103,8 +103,8 @@ bool BaseRegion::pointInRegion(int x, int y) {
//////////////////////////////////////////////////////////////////////////
bool BaseRegion::loadFile(const char *filename) {
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
- if (buffer == NULL) {
- _gameRef->LOG(0, "BaseRegion::LoadFile failed for file '%s'", filename);
+ if (buffer == nullptr) {
+ BaseEngine::LOG(0, "BaseRegion::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -113,7 +113,7 @@ bool BaseRegion::loadFile(const char *filename) {
setFilename(filename);
if (DID_FAIL(ret = loadBuffer(buffer, true))) {
- _gameRef->LOG(0, "Error parsing REGION file '%s'", filename);
+ BaseEngine::LOG(0, "Error parsing REGION file '%s'", filename);
}
@@ -154,7 +154,7 @@ bool BaseRegion::loadBuffer(byte *buffer, bool complete) {
if (complete) {
if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_REGION) {
- _gameRef->LOG(0, "'REGION' keyword expected.");
+ BaseEngine::LOG(0, "'REGION' keyword expected.");
return STATUS_FAILED;
}
buffer = params;
@@ -206,7 +206,7 @@ bool BaseRegion::loadBuffer(byte *buffer, bool complete) {
}
}
if (cmd == PARSERR_TOKENNOTFOUND) {
- _gameRef->LOG(0, "Syntax error in REGION definition");
+ BaseEngine::LOG(0, "Syntax error in REGION definition");
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();
@@ -446,7 +446,7 @@ typedef struct {
} dPoint;
//////////////////////////////////////////////////////////////////////////
-bool BaseRegion::ptInPolygon(int x, int y) {
+bool BaseRegion::ptInPolygon(int32 x, int32 y) {
if (_points.size() < 3) {
return false;
}
@@ -493,7 +493,7 @@ bool BaseRegion::getBoundingRect(Rect32 *rect) {
if (_points.size() == 0) {
BasePlatform::setRectEmpty(rect);
} else {
- int minX = INT_MAX, minY = INT_MAX, maxX = INT_MIN, maxY = INT_MIN;
+ int32 minX = INT_MAX, minY = INT_MAX, maxX = INT_MIN, maxY = INT_MIN;
for (uint32 i = 0; i < _points.size(); i++) {
minX = MIN(minX, _points[i]->x);
diff --git a/engines/wintermute/base/base_region.h b/engines/wintermute/base/base_region.h
index 464f25be2f..67ca158897 100644
--- a/engines/wintermute/base/base_region.h
+++ b/engines/wintermute/base/base_region.h
@@ -39,10 +39,10 @@ public:
void cleanup();
bool mimic(BaseRegion *region, float scale = 100.0f, int x = 0, int y = 0);
bool getBoundingRect(Rect32 *rect);
- bool ptInPolygon(int x, int y);
+ bool ptInPolygon(int32 x, int32 y);
DECLARE_PERSISTENT(BaseRegion, BaseObject)
bool _active;
- int _editorSelectedPoint;
+ int32 _editorSelectedPoint;
BaseRegion(BaseGame *inGame);
virtual ~BaseRegion();
bool pointInRegion(int x, int y);
@@ -51,18 +51,18 @@ 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
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
private:
float _lastMimicScale;
- int _lastMimicX;
- int _lastMimicY;
+ int32 _lastMimicX;
+ int32 _lastMimicY;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp
index c5d5e82f76..036bac1dd8 100644
--- a/engines/wintermute/base/base_script_holder.cpp
+++ b/engines/wintermute/base/base_script_holder.cpp
@@ -29,6 +29,7 @@
#include "engines/wintermute/ad/ad_game.h"
#include "engines/wintermute/base/base_script_holder.h"
#include "engines/wintermute/base/base_parser.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script_engine.h"
#include "engines/wintermute/base/scriptables/script.h"
@@ -43,7 +44,7 @@ BaseScriptHolder::BaseScriptHolder(BaseGame *inGame) : BaseScriptable(inGame) {
setName("<unnamed>");
_freezable = true;
- _filename = NULL;
+ _filename = nullptr;
}
@@ -56,11 +57,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 +70,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);
}
}
@@ -301,7 +302,7 @@ bool BaseScriptHolder::addScript(const char *filename) {
for (uint32 i = 0; i < _scripts.size(); i++) {
if (scumm_stricmp(_scripts[i]->_filename, filename) == 0) {
if (_scripts[i]->_state != SCRIPT_FINISHED) {
- _gameRef->LOG(0, "BaseScriptHolder::AddScript - trying to add script '%s' mutiple times (obj: '%s')", filename, getName());
+ BaseEngine::LOG(0, "BaseScriptHolder::AddScript - trying to add script '%s' mutiple times (obj: '%s')", filename, getName());
return STATUS_OK;
}
}
@@ -342,7 +343,7 @@ bool BaseScriptHolder::removeScript(ScScript *script) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptHolder::canHandleEvent(const char *EventName) {
+bool BaseScriptHolder::canHandleEvent(const char *EventName) const {
for (uint32 i = 0; i < _scripts.size(); i++) {
if (!_scripts[i]->_thread && _scripts[i]->canHandleEvent(EventName)) {
return true;
@@ -353,7 +354,7 @@ bool BaseScriptHolder::canHandleEvent(const char *EventName) {
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptHolder::canHandleMethod(const char *MethodName) {
+bool BaseScriptHolder::canHandleMethod(const char *MethodName) const {
for (uint32 i = 0; i < _scripts.size(); i++) {
if (!_scripts[i]->_thread && _scripts[i]->canHandleMethod(MethodName)) {
return true;
@@ -382,14 +383,14 @@ bool BaseScriptHolder::parseProperty(byte *buffer, bool complete) {
if (complete) {
if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_PROPERTY) {
- _gameRef->LOG(0, "'PROPERTY' keyword expected.");
+ BaseEngine::LOG(0, "'PROPERTY' keyword expected.");
return STATUS_FAILED;
}
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,17 +419,17 @@ bool BaseScriptHolder::parseProperty(byte *buffer, bool complete) {
if (cmd == PARSERR_TOKENNOTFOUND) {
delete[] propName;
delete[] propValue;
- propName = NULL;
- propValue = NULL;
- _gameRef->LOG(0, "Syntax error in PROPERTY definition");
+ propName = nullptr;
+ propValue = nullptr;
+ BaseEngine::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;
- _gameRef->LOG(0, "Error loading PROPERTY definition");
+ propName = nullptr;
+ propValue = nullptr;
+ BaseEngine::LOG(0, "Error loading PROPERTY definition");
return STATUS_FAILED;
}
@@ -440,8 +441,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 +475,7 @@ ScScript *BaseScriptHolder::invokeMethodThread(const char *methodName) {
}
}
}
- return NULL;
+ return nullptr;
}
diff --git a/engines/wintermute/base/base_script_holder.h b/engines/wintermute/base/base_script_holder.h
index 5fd0dbec9c..38a3f935d3 100644
--- a/engines/wintermute/base/base_script_holder.h
+++ b/engines/wintermute/base/base_script_holder.h
@@ -43,8 +43,8 @@ public:
virtual ~BaseScriptHolder();
virtual ScScript *invokeMethodThread(const char *methodName);
virtual void makeFreezable(bool freezable);
- bool canHandleEvent(const char *eventName);
- virtual bool canHandleMethod(const char *eventMethod);
+ bool canHandleEvent(const char *eventName) const;
+ virtual bool canHandleMethod(const char *eventMethod) const;
bool cleanup();
bool removeScript(ScScript *script);
bool addScript(const char *filename);
@@ -59,11 +59,11 @@ public:
BaseArray<ScScript *> _scripts;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
- virtual void scDebuggerDesc(char *buf, int bufSize);
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
+ virtual void scDebuggerDesc(char *buf, int bufSize) override;
// IWmeObject
private:
char *_filename;
diff --git a/engines/wintermute/base/base_scriptable.cpp b/engines/wintermute/base/base_scriptable.cpp
index a2dd8b00e7..5753b0482b 100644
--- a/engines/wintermute/base/base_scriptable.cpp
+++ b/engines/wintermute/base/base_scriptable.cpp
@@ -39,24 +39,24 @@ 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;
}
//////////////////////////////////////////////////////////////////////////
BaseScriptable::~BaseScriptable() {
- //if (_refCount>0) _gameRef->LOG(0, "Warning: Destroying object, _refCount=%d", _refCount);
+ //if (_refCount>0) BaseEngine::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;
}
}
@@ -152,10 +152,10 @@ void BaseScriptable::scSetBool(bool val) {
//////////////////////////////////////////////////////////////////////////
bool BaseScriptable::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_refCount));
- persistMgr->transfer(TMEMBER(_scProp));
- persistMgr->transfer(TMEMBER(_scValue));
+ persistMgr->transferPtr(TMEMBER_PTR(_scProp));
+ persistMgr->transferPtr(TMEMBER_PTR(_scValue));
return STATUS_OK;
}
@@ -178,14 +178,14 @@ void BaseScriptable::scDebuggerDesc(char *buf, int bufSize) {
}
//////////////////////////////////////////////////////////////////////////
-bool BaseScriptable::canHandleMethod(const char *eventMethod) {
+bool BaseScriptable::canHandleMethod(const char *eventMethod) const {
return false;
}
//////////////////////////////////////////////////////////////////////////
ScScript *BaseScriptable::invokeMethodThread(const char *methodName) {
- return NULL;
+ return nullptr;
}
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_scriptable.h b/engines/wintermute/base/base_scriptable.h
index fbe14fc299..f23d7faa5b 100644
--- a/engines/wintermute/base/base_scriptable.h
+++ b/engines/wintermute/base/base_scriptable.h
@@ -48,7 +48,7 @@ public:
virtual ~BaseScriptable();
// high level scripting interface
- virtual bool canHandleMethod(const char *eventMethod);
+ virtual bool canHandleMethod(const char *eventMethod) const;
virtual bool scSetProperty(const char *name, ScValue *value);
virtual ScValue *scGetProperty(const Common::String &name);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
@@ -63,7 +63,7 @@ public:
virtual void scSetBool(bool val);
virtual int scCompare(BaseScriptable *val);
virtual void scDebuggerDesc(char *buf, int bufSize);
- int _refCount;
+ int32 _refCount;
ScValue *_scValue;
ScValue *_scProp;
};
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp
index 468af1bd75..c920da9ee9 100644
--- a/engines/wintermute/base/base_sprite.cpp
+++ b/engines/wintermute/base/base_sprite.cpp
@@ -32,6 +32,7 @@
#include "engines/wintermute/base/base_dynamic_buffer.h"
#include "engines/wintermute/base/gfx/base_surface.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_frame.h"
#include "engines/wintermute/base/sound/base_sound.h"
#include "engines/wintermute/base/base_sub_frame.h"
@@ -64,7 +65,7 @@ void BaseSprite::setDefaults() {
_currentFrame = -1;
_looping = false;
_lastFrameTime = 0;
- setFilename(NULL);
+ setFilename(nullptr);
_finished = false;
_changed = false;
_paused = false;
@@ -72,7 +73,7 @@ void BaseSprite::setDefaults() {
_moveX = _moveY = 0;
_editorMuted = false;
- _editorBgFile = NULL;
+ _editorBgFile = nullptr;
_editorBgOffsetX = _editorBgOffsetY = 0;
_editorBgAlpha = 0xFF;
_streamed = false;
@@ -94,7 +95,7 @@ void BaseSprite::cleanup() {
_frames.clear();
delete[] _editorBgFile;
- _editorBgFile = NULL;
+ _editorBgFile = nullptr;
setDefaults();
}
@@ -133,7 +134,7 @@ bool BaseSprite::isFinished() {
bool BaseSprite::loadFile(const Common::String &filename, int lifeTime, TSpriteCacheType cacheType) {
Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(filename);
if (!file) {
- _gameRef->LOG(0, "BaseSprite::LoadFile failed for file '%s'", filename.c_str());
+ BaseEngine::LOG(0, "BaseSprite::LoadFile failed for file '%s'", filename.c_str());
if (_gameRef->_debugDebugMode) {
return loadFile("invalid_debug.bmp", lifeTime, cacheType);
} else {
@@ -141,7 +142,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,8 +155,8 @@ 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) {
- _gameRef->LOG(0, "Error loading simple sprite '%s'", filename.c_str());
+ if (subframe->_surface == nullptr) {
+ BaseEngine::LOG(0, "Error loading simple sprite '%s'", filename.c_str());
ret = STATUS_FAILED;
delete frame;
delete subframe;
@@ -170,7 +171,7 @@ bool BaseSprite::loadFile(const Common::String &filename, int lifeTime, TSpriteC
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename);
if (buffer) {
if (DID_FAIL(ret = loadBuffer(buffer, true, lifeTime, cacheType))) {
- _gameRef->LOG(0, "Error parsing SPRITE file '%s'", filename.c_str());
+ BaseEngine::LOG(0, "Error parsing SPRITE file '%s'", filename.c_str());
} else {
ret = STATUS_OK;
}
@@ -231,7 +232,7 @@ bool BaseSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteCa
if (complete) {
if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_SPRITE) {
- _gameRef->LOG(0, "'SPRITE' keyword expected.");
+ BaseEngine::LOG(0, "'SPRITE' keyword expected.");
return STATUS_FAILED;
}
buffer = params;
@@ -297,8 +298,8 @@ bool BaseSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteCa
case TOKEN_EDITOR_BG_ALPHA:
parser.scanStr((char *)params, "%d", &_editorBgAlpha);
- _editorBgAlpha = MIN(_editorBgAlpha, 255);
- _editorBgAlpha = MAX(_editorBgAlpha, 0);
+ _editorBgAlpha = MIN<int32>(_editorBgAlpha, 255);
+ _editorBgAlpha = MAX<int32>(_editorBgAlpha, 0);
break;
case TOKEN_FRAME: {
@@ -311,7 +312,7 @@ bool BaseSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteCa
if (DID_FAIL(frame->loadBuffer(params, frameLifeTime, _streamedKeepLoaded))) {
delete frame;
- _gameRef->LOG(0, "Error parsing frame %d", frameCount);
+ BaseEngine::LOG(0, "Error parsing frame %d", frameCount);
return STATUS_FAILED;
}
@@ -330,7 +331,7 @@ bool BaseSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteCa
}
if (cmd == PARSERR_TOKENNOTFOUND) {
- _gameRef->LOG(0, "Syntax error in SPRITE definition");
+ BaseEngine::LOG(0, "Syntax error in SPRITE definition");
return STATUS_FAILED;
}
_canBreak = !_continuous;
@@ -365,9 +366,9 @@ bool BaseSprite::getCurrentFrame(float zoomX, float zoomY) {
uint32 timer;
if (_owner && _owner->_freezable) {
- timer = _gameRef->_timer;
+ timer = _gameRef->getTimer()->getTime();
} else {
- timer = _gameRef->_liveTimer;
+ timer = _gameRef->getLiveTimer()->getTime();
}
int lastFrame = _currentFrame;
@@ -440,7 +441,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 +449,10 @@ BaseSurface *BaseSprite::getSurface() {
if (subframe) {
return subframe->_surface;
} else {
- return NULL;
+ return nullptr;
}
} else {
- return NULL;
+ return nullptr;
}
}
@@ -538,7 +539,7 @@ bool BaseSprite::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_looping));
persistMgr->transfer(TMEMBER(_moveX));
persistMgr->transfer(TMEMBER(_moveY));
- persistMgr->transfer(TMEMBER(_owner));
+ persistMgr->transferPtr(TMEMBER_PTR(_owner));
persistMgr->transfer(TMEMBER(_precise));
persistMgr->transfer(TMEMBER(_streamed));
persistMgr->transfer(TMEMBER(_streamedKeepLoaded));
@@ -611,13 +612,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 +644,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 +741,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..05cb9fc936 100644
--- a/engines/wintermute/base/base_sprite.h
+++ b/engines/wintermute/base/base_sprite.h
@@ -45,38 +45,38 @@ public:
DECLARE_PERSISTENT(BaseSprite, BaseScriptHolder)
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);
+ int32 _moveY;
+ int32 _moveX;
+ 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);
+ int32 _currentFrame;
+ 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);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
private:
BaseObject *_owner;
bool _canBreak;
bool _changed;
bool _editorAllFrames;
char *_editorBgFile;
- int _editorBgOffsetX;
- int _editorBgOffsetY;
- int _editorBgAlpha;
+ int32 _editorBgOffsetX;
+ int32 _editorBgOffsetY;
+ int32 _editorBgAlpha;
bool _editorMuted;
bool _finished;
bool _continuous;
diff --git a/engines/wintermute/base/base_string_table.cpp b/engines/wintermute/base/base_string_table.cpp
index 2f890beea1..8207c32244 100644
--- a/engines/wintermute/base/base_string_table.cpp
+++ b/engines/wintermute/base/base_string_table.cpp
@@ -29,6 +29,7 @@
#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_string_table.h"
#include "common/str.h"
@@ -50,7 +51,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;
}
@@ -64,7 +65,7 @@ bool BaseStringTable::addString(const char *key, const char *val, bool reportDup
StringsIter it = _strings.find(finalKey);
if (it != _strings.end() && reportDuplicities) {
- _gameRef->LOG(0, " Warning: Duplicate definition of string '%s'.", finalKey.c_str());
+ BaseEngine::LOG(0, " Warning: Duplicate definition of string '%s'.", finalKey.c_str());
}
_strings[finalKey] = val;
@@ -74,13 +75,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 +111,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 +150,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;
}
@@ -185,7 +186,7 @@ const char *BaseStringTable::expandStatic(const char *string) const {
//////////////////////////////////////////////////////////////////////////
bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
- _gameRef->LOG(0, "Loading string table...");
+ BaseEngine::LOG(0, "Loading string table...");
if (clearOld) {
_strings.clear();
@@ -193,8 +194,8 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
uint32 size;
byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename, &size);
- if (buffer == NULL) {
- _gameRef->LOG(0, "BaseStringTable::LoadFile failed for file '%s'", filename);
+ if (buffer == nullptr) {
+ BaseEngine::LOG(0, "BaseStringTable::LoadFile failed for file '%s'", filename);
return STATUS_FAILED;
}
@@ -205,7 +206,7 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
if (_gameRef->_textEncoding != TEXT_UTF8) {
_gameRef->_textEncoding = TEXT_UTF8;
//_gameRef->_textEncoding = TEXT_ANSI;
- _gameRef->LOG(0, " UTF8 file detected, switching to UTF8 text encoding");
+ BaseEngine::LOG(0, " UTF8 file detected, switching to UTF8 text encoding");
}
} else {
_gameRef->_textEncoding = TEXT_ANSI;
@@ -222,12 +223,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++) {
@@ -247,7 +248,7 @@ bool BaseStringTable::loadFile(const char *filename, bool clearOld) {
delete[] buffer;
- _gameRef->LOG(0, " %d strings loaded", _strings.size());
+ BaseEngine::LOG(0, " %d strings loaded", _strings.size());
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 77cc522ae7..d93cf667f1 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -33,6 +33,7 @@
#include "engines/wintermute/base/gfx/base_surface.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/scriptables/script_value.h"
@@ -44,7 +45,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 +55,7 @@ BaseSubFrame::BaseSubFrame(BaseGame *inGame) : BaseScriptable(inGame, true) {
_editorSelected = false;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
_cKDefault = true;
_cKRed = _cKBlue = _cKGreen = 0;
_lifeTime = -1;
@@ -73,7 +74,7 @@ BaseSubFrame::~BaseSubFrame() {
_gameRef->_surfaceStorage->removeSurface(_surface);
}
delete[] _surfaceFilename;
- _surfaceFilename = NULL;
+ _surfaceFilename = nullptr;
}
@@ -118,10 +119,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) {
@@ -180,11 +181,11 @@ bool BaseSubFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) {
}
}
if (cmd == PARSERR_TOKENNOTFOUND) {
- _gameRef->LOG(0, "Syntax error in SUBFRAME definition");
+ BaseEngine::LOG(0, "Syntax error in SUBFRAME definition");
return STATUS_FAILED;
}
- if (surfaceFile != NULL) {
+ if (surfaceFile != nullptr) {
if (custoTrans) {
setSurface(surfaceFile, false, r, g, b, lifeTime, keepLoaded);
} else {
@@ -198,9 +199,9 @@ 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.");
+ BaseEngine::LOG(0, "Error parsing sub-frame. Image not set.");
return STATUS_FAILED;
}
*/
@@ -236,14 +237,14 @@ 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));
+ BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, x - _hotspotX + getRect().left, y - _hotspotY + getRect().top, getRect().right - getRect().left, getRect().bottom - getRect().top, zoomX, zoomY, precise));
} else {
- _gameRef->_renderer->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, (int)(x - (_hotspotX + getRect().left) * (zoomX / 100)), (int)(y - (_hotspotY + getRect().top) * (zoomY / 100)), (int)((getRect().right - getRect().left) * (zoomX / 100)), (int)((getRect().bottom - getRect().top) * (zoomY / 100)), zoomX, zoomY, precise));
+ BaseEngine::getRenderer()->addRectToList(new BaseActiveRect(_gameRef, registerOwner, this, (int)(x - (_hotspotX + getRect().left) * (zoomX / 100)), (int)(y - (_hotspotY + getRect().top) * (zoomY / 100)), (int)((getRect().right - getRect().left) * (zoomX / 100)), (int)((getRect().bottom - getRect().top) * (zoomY / 100)), zoomX, zoomY, precise));
}
}
- if (_gameRef->_suspendedRendering) {
+ if (_gameRef->getSuspendedRendering()) {
return STATUS_OK;
}
@@ -426,7 +427,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 +618,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 +646,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..37ba34b748 100644
--- a/engines/wintermute/base/base_sub_frame.h
+++ b/engines/wintermute/base/base_sub_frame.h
@@ -52,12 +52,12 @@ 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();
- int _hotspotX;
- int _hotspotY;
+ int32 _hotspotX;
+ int32 _hotspotY;
uint32 _alpha;
// These two setters and getters are rather usefull, as they allow _rect to be lazily defined
// Thus we don't need to load the actual graphics before the rect is actually needed.
@@ -72,7 +72,7 @@ public:
byte _cKRed;
byte _cKGreen;
byte _cKBlue;
- int _lifeTime;
+ int32 _lifeTime;
bool _keepLoaded;
bool _2DOnly;
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp
index 4e795ca813..8dbd6a6d2a 100644
--- a/engines/wintermute/base/base_surface_storage.cpp
+++ b/engines/wintermute/base/base_surface_storage.cpp
@@ -30,6 +30,7 @@
#include "engines/wintermute/base/gfx/base_surface.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/platform_osystem.h"
#include "common/str.h"
@@ -54,7 +55,7 @@ BaseSurfaceStorage::~BaseSurfaceStorage() {
bool BaseSurfaceStorage::cleanup(bool warn) {
for (uint32 i = 0; i < _surfaces.size(); i++) {
if (warn) {
- _gameRef->LOG(0, "BaseSurfaceStorage warning: purging surface '%s', usage:%d", _surfaces[i]->getFileName(), _surfaces[i]->_referenceCount);
+ BaseEngine::LOG(0, "BaseSurfaceStorage warning: purging surface '%s', usage:%d", _surfaces[i]->getFileName(), _surfaces[i]->_referenceCount);
}
delete _surfaces[i];
}
@@ -66,15 +67,15 @@ bool BaseSurfaceStorage::cleanup(bool warn) {
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceStorage::initLoop() {
- if (_gameRef->_smartCache && _gameRef->_liveTimer - _lastCleanupTime >= _gameRef->_surfaceGCCycleTime) {
- _lastCleanupTime = _gameRef->_liveTimer;
+ if (_gameRef->_smartCache && _gameRef->getLiveTimer()->getTime() - _lastCleanupTime >= _gameRef->_surfaceGCCycleTime) {
+ _lastCleanupTime = _gameRef->getLiveTimer()->getTime();
sortSurfaces();
for (uint32 i = 0; i < _surfaces.size(); i++) {
if (_surfaces[i]->_lifeTime <= 0) {
break;
}
- if (_surfaces[i]->_lifeTime > 0 && _surfaces[i]->_valid && (int)(_gameRef->_liveTimer - _surfaces[i]->_lastUsedTime) >= _surfaces[i]->_lifeTime) {
+ if (_surfaces[i]->_lifeTime > 0 && _surfaces[i]->_valid && (int)(_gameRef->getLiveTimer()->getTime() - _surfaces[i]->_lastUsedTime) >= _surfaces[i]->_lifeTime) {
//_gameRef->QuickMessageForm("Invalidating: %s", _surfaces[i]->_filename);
_surfaces[i]->invalidate();
}
@@ -111,7 +112,7 @@ BaseSurface *BaseSurfaceStorage::addSurface(const Common::String &filename, bool
if (!BaseFileManager::getEngineInstance()->hasFile(filename)) {
if (filename.size()) {
- _gameRef->LOG(0, "Missing image: '%s'", filename.c_str());
+ BaseEngine::LOG(0, "Missing image: '%s'", filename.c_str());
}
if (_gameRef->_debugDebugMode) {
return addSurface("invalid_debug.bmp", defaultCK, ckRed, ckGreen, ckBlue, lifeTime, keepLoaded);
@@ -121,15 +122,15 @@ BaseSurface *BaseSurfaceStorage::addSurface(const Common::String &filename, bool
}
BaseSurface *surface;
- surface = _gameRef->_renderer->createSurface();
+ surface = BaseEngine::getRenderer()->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);
@@ -144,7 +145,7 @@ bool BaseSurfaceStorage::restoreAll() {
for (uint32 i = 0; i < _surfaces.size(); i++) {
ret = _surfaces[i]->restore();
if (ret != STATUS_OK) {
- _gameRef->LOG(0, "BaseSurfaceStorage::RestoreAll failed");
+ BaseEngine::LOG(0, "BaseSurfaceStorage::RestoreAll failed");
return ret;
}
}
@@ -176,32 +177,29 @@ bool BaseSurfaceStorage::sortSurfaces() {
//////////////////////////////////////////////////////////////////////////
-int BaseSurfaceStorage::surfaceSortCB(const void *arg1, const void *arg2) {
- const BaseSurface *s1 = *((const BaseSurface *const *)arg1);
- const BaseSurface *s2 = *((const BaseSurface *const *)arg2);
-
+bool BaseSurfaceStorage::surfaceSortCB(const BaseSurface *s1, const BaseSurface *s2) {
// sort by life time
if (s1->_lifeTime <= 0 && s2->_lifeTime > 0) {
- return 1;
+ return false;
} else if (s1->_lifeTime > 0 && s2->_lifeTime <= 0) {
- return -1;
+ return true;
}
// sort by validity
if (s1->_valid && !s2->_valid) {
- return -1;
+ return true;
} else if (!s1->_valid && s2->_valid) {
- return 1;
+ return false;
}
// sort by time
else if (s1->_lastUsedTime > s2->_lastUsedTime) {
- return 1;
+ return false;
} else if (s1->_lastUsedTime < s2->_lastUsedTime) {
- return -1;
+ return true;
} else {
- return 0;
+ return false;
}
}
diff --git a/engines/wintermute/base/base_surface_storage.h b/engines/wintermute/base/base_surface_storage.h
index aef8ad23f9..61738e69a2 100644
--- a/engines/wintermute/base/base_surface_storage.h
+++ b/engines/wintermute/base/base_surface_storage.h
@@ -39,7 +39,7 @@ public:
uint32 _lastCleanupTime;
bool initLoop();
bool sortSurfaces();
- static int surfaceSortCB(const void *arg1, const void *arg2);
+ static bool surfaceSortCB(const BaseSurface *arg1, const BaseSurface *arg2);
bool cleanup(bool warn = false);
//DECLARE_PERSISTENT(BaseSurfaceStorage, BaseClass);
diff --git a/engines/wintermute/base/base_transition_manager.cpp b/engines/wintermute/base/base_transition_manager.cpp
index 7785f3d5af..1c869e6a2b 100644
--- a/engines/wintermute/base/base_transition_manager.cpp
+++ b/engines/wintermute/base/base_transition_manager.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/base/base_transition_manager.h"
#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
namespace Wintermute {
@@ -51,7 +52,7 @@ BaseTransitionMgr::~BaseTransitionMgr() {
//////////////////////////////////////////////////////////////////////////
-bool BaseTransitionMgr::isReady() {
+bool BaseTransitionMgr::isReady() const {
return (_state == TRANS_MGR_READY);
}
@@ -103,7 +104,7 @@ bool BaseTransitionMgr::update() {
uint32 time = g_system->getMillis() - _lastTime;
int alpha = (int)(255 - (float)time / (float)FADE_DURATION * 255);
alpha = MIN(255, MAX(alpha, 0));
- _gameRef->_renderer->fade((uint16)alpha);
+ BaseEngine::getRenderer()->fade((uint16)alpha);
if (time > FADE_DURATION) {
_state = TRANS_MGR_READY;
@@ -115,7 +116,7 @@ bool BaseTransitionMgr::update() {
uint32 time = g_system->getMillis() - _lastTime;
int alpha = (int)((float)time / (float)FADE_DURATION * 255);
alpha = MIN(255, MAX(alpha, 0));
- _gameRef->_renderer->fade((uint16)alpha);
+ BaseEngine::getRenderer()->fade((uint16)alpha);
if (time > FADE_DURATION) {
_state = TRANS_MGR_READY;
diff --git a/engines/wintermute/base/base_transition_manager.h b/engines/wintermute/base/base_transition_manager.h
index d16a44c88e..edb3045a58 100644
--- a/engines/wintermute/base/base_transition_manager.h
+++ b/engines/wintermute/base/base_transition_manager.h
@@ -41,7 +41,7 @@ public:
bool _preserveInteractive;
bool update();
bool start(TTransitionType type, bool nonInteractive = false);
- bool isReady();
+ bool isReady() const;
TTransMgrState _state;
BaseTransitionMgr(BaseGame *inGame);
virtual ~BaseTransitionMgr();
diff --git a/engines/wintermute/base/base_viewport.cpp b/engines/wintermute/base/base_viewport.cpp
index 7ec995449f..f79e5c9f13 100644
--- a/engines/wintermute/base/base_viewport.cpp
+++ b/engines/wintermute/base/base_viewport.cpp
@@ -26,9 +26,10 @@
* Copyright (c) 2011 Jan Nedoma
*/
-#include "engines/wintermute/base/base_game.h"
-#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/base/base_viewport.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/base_persistence_manager.h"
+#include "engines/wintermute/platform_osystem.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
namespace Wintermute {
@@ -38,7 +39,7 @@ IMPLEMENT_PERSISTENT(BaseViewport, false)
//////////////////////////////////////////////////////////////////////////
BaseViewport::BaseViewport(BaseGame *inGame) : BaseClass(inGame) {
BasePlatform::setRectEmpty(&_rect);
- _mainObject = NULL;
+ _mainObject = nullptr;
_offsetX = _offsetY = 0;
}
@@ -52,9 +53,9 @@ BaseViewport::~BaseViewport() {
//////////////////////////////////////////////////////////////////////////
bool BaseViewport::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
- persistMgr->transfer(TMEMBER(_mainObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_mainObject));
persistMgr->transfer(TMEMBER(_offsetX));
persistMgr->transfer(TMEMBER(_offsetY));
persistMgr->transfer(TMEMBER(_rect));
@@ -64,12 +65,12 @@ bool BaseViewport::persist(BasePersistenceManager *persistMgr) {
//////////////////////////////////////////////////////////////////////////
-bool BaseViewport::setRect(int left, int top, int right, int bottom, bool noCheck) {
+bool BaseViewport::setRect(int32 left, int32 top, int32 right, int32 bottom, bool noCheck) {
if (!noCheck) {
- left = MAX(left, 0);
- top = MAX(top, 0);
- right = MIN(right, _gameRef->_renderer->_width);
- bottom = MIN(bottom, _gameRef->_renderer->_height);
+ left = MAX<int32>(left, 0);
+ top = MAX<int32>(top, 0);
+ right = MIN(right, BaseEngine::instance().getRenderer()->getWidth());
+ bottom = MIN(bottom, BaseEngine::instance().getRenderer()->getHeight());
}
BasePlatform::setRect(&_rect, left, top, right, bottom);
@@ -86,13 +87,13 @@ Rect32 *BaseViewport::getRect() {
//////////////////////////////////////////////////////////////////////////
-int BaseViewport::getWidth() {
+int BaseViewport::getWidth() const {
return _rect.right - _rect.left;
}
//////////////////////////////////////////////////////////////////////////
-int BaseViewport::getHeight() {
+int BaseViewport::getHeight() const {
return _rect.bottom - _rect.top;
}
diff --git a/engines/wintermute/base/base_viewport.h b/engines/wintermute/base/base_viewport.h
index 98ad1c1e14..584e5a78f9 100644
--- a/engines/wintermute/base/base_viewport.h
+++ b/engines/wintermute/base/base_viewport.h
@@ -31,20 +31,22 @@
#include "engines/wintermute/base/base.h"
+#include "engines/wintermute/math/rect32.h"
+#include "engines/wintermute/persistent.h"
namespace Wintermute {
class BaseObject;
class BaseViewport : public BaseClass {
public:
- int getHeight();
- int getWidth();
+ int getHeight() const;
+ int getWidth() const;
Rect32 *getRect();
- bool setRect(int left, int top, int right, int bottom, bool noCheck = false);
+ bool setRect(int32 left, int32 top, int32 right, int32 bottom, bool noCheck = false);
DECLARE_PERSISTENT(BaseViewport, BaseClass)
- int _offsetY;
- int _offsetX;
+ int32 _offsetY;
+ int32 _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.h b/engines/wintermute/base/file/base_file.h
index 82f6ce3554..8eda6d51d9 100644
--- a/engines/wintermute/base/file/base_file.h
+++ b/engines/wintermute/base/file/base_file.h
@@ -45,10 +45,10 @@ protected:
uint32 _pos;
uint32 _size;
public:
- virtual uint32 getSize() {
+ virtual uint32 getSize() const {
return _size;
};
- virtual uint32 getPos() {
+ virtual uint32 getPos() const {
return _pos;
};
virtual bool seek(uint32 pos, int whence = SEEK_SET) = 0;
diff --git a/engines/wintermute/base/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_package.h b/engines/wintermute/base/file/base_package.h
index 2882eb03b7..bcf088aaea 100644
--- a/engines/wintermute/base/file/base_package.h
+++ b/engines/wintermute/base/file/base_package.h
@@ -41,7 +41,7 @@ public:
bool _boundToExe;
byte _priority;
Common::String _name;
- int _cd;
+ int32 _cd;
BasePackage();
};
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..596f9fb5c6 100644
--- a/engines/wintermute/base/font/base_font.cpp
+++ b/engines/wintermute/base/font/base_font.cpp
@@ -57,13 +57,13 @@ void BaseFont::drawText(const byte *text, int x, int y, int width, TTextAlign al
//////////////////////////////////////////////////////////////////////
-int BaseFont::getTextHeight(byte *text, int width) {
+int BaseFont::getTextHeight(const byte *text, int width) {
return 0;
}
//////////////////////////////////////////////////////////////////////
-int BaseFont::getTextWidth(byte *text, int maxLength) {
+int BaseFont::getTextWidth(const byte *text, int maxLength) {
return 0;
}
@@ -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.h b/engines/wintermute/base/font/base_font.h
index 0abe62ab98..50587fa7eb 100644
--- a/engines/wintermute/base/font/base_font.h
+++ b/engines/wintermute/base/font/base_font.h
@@ -38,8 +38,8 @@ namespace Wintermute {
class BaseFont: public BaseObject {
public:
DECLARE_PERSISTENT(BaseFont, BaseObject)
- virtual int getTextWidth(byte *text, int maxLength = -1);
- virtual int getTextHeight(byte *text, int width);
+ virtual int getTextWidth(const byte *text, int maxLength = -1);
+ virtual int getTextHeight(const byte *text, int width);
virtual void drawText(const byte *text, int x, int y, int width, TTextAlign align = TAL_LEFT, int max_height = -1, int maxLength = -1);
virtual int getLetterHeight();
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp
index 55f46c476b..03bd471636 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;
}
@@ -76,20 +76,20 @@ void BaseFontBitmap::drawText(const byte *text, int x, int y, int width, TTextAl
//////////////////////////////////////////////////////////////////////
-int BaseFontBitmap::getTextHeight(byte *text, int width) {
+int BaseFontBitmap::getTextHeight(const byte *text, int width) {
return textHeightDraw(text, 0, 0, width, TAL_LEFT, false);
}
//////////////////////////////////////////////////////////////////////
-int BaseFontBitmap::getTextWidth(byte *text, int maxLength) {
+int BaseFontBitmap::getTextWidth(const byte *text, int maxLength) {
AnsiString str;
if (_gameRef->_textEncoding == TEXT_UTF8) {
- WideString wstr = StringUtil::utf8ToWide(Utf8String((char *)text));
+ WideString wstr = StringUtil::utf8ToWide(Utf8String((const char *)text));
str = StringUtil::wideToAnsi(wstr);
} else {
- str = AnsiString((char *)text);
+ str = AnsiString((const char *)text);
}
if (maxLength >= 0 && str.size() > (uint32)maxLength) {
@@ -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;
}
@@ -478,7 +478,7 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
_widths[spaceChar] = spaceWidth;
} else {
if (_widths[spaceChar] == expandWidth || _widths[spaceChar] == 0) {
- _widths[spaceChar] = (_widths['m'] + _widths['i']) / 2;
+ _widths[spaceChar] = (_widths[(uint)'m'] + _widths[(uint)'i']) / 2;
}
}
} else {
@@ -498,10 +498,10 @@ bool BaseFontBitmap::persist(BasePersistenceManager *persistMgr) {
BaseFont::persist(persistMgr);
persistMgr->transfer(TMEMBER(_numColumns));
- persistMgr->transfer(TMEMBER(_subframe));
+ persistMgr->transferPtr(TMEMBER_PTR(_subframe));
persistMgr->transfer(TMEMBER(_tileHeight));
persistMgr->transfer(TMEMBER(_tileWidth));
- persistMgr->transfer(TMEMBER(_sprite));
+ persistMgr->transferPtr(TMEMBER_PTR(_sprite));
persistMgr->transfer(TMEMBER(_widthsFrame));
if (persistMgr->getIsSaving()) {
@@ -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_bitmap.h b/engines/wintermute/base/font/base_font_bitmap.h
index 2f3a69d097..0bdac64026 100644
--- a/engines/wintermute/base/font/base_font_bitmap.h
+++ b/engines/wintermute/base/font/base_font_bitmap.h
@@ -39,10 +39,10 @@ public:
DECLARE_PERSISTENT(BaseFontBitmap, BaseFont)
bool loadBuffer(byte *Buffer);
bool loadFile(const Common::String &filename);
- virtual int getTextWidth(byte *text, int maxLength = -1);
- virtual int getTextHeight(byte *text, int width);
- virtual void drawText(const byte *text, int x, int y, int width, TTextAlign align = TAL_LEFT, int max_height = -1, int maxLength = -1);
- virtual int getLetterHeight();
+ virtual int getTextWidth(const byte *text, int maxLength = -1) override;
+ virtual int getTextHeight(const byte *text, int width) override;
+ virtual void drawText(const byte *text, int x, int y, int width, TTextAlign align = TAL_LEFT, int max_height = -1, int maxLength = -1) override;
+ virtual int getLetterHeight() override;
BaseFontBitmap(BaseGame *inGame);
virtual ~BaseFontBitmap();
@@ -50,11 +50,11 @@ public:
private:
bool getWidths();
BaseSprite *_sprite;
- int _widthsFrame;
+ int32 _widthsFrame;
bool _fontextFix;
- int _numColumns;
- int _tileHeight;
- int _tileWidth;
+ int32 _numColumns;
+ int32 _tileHeight;
+ int32 _tileWidth;
byte _widths[NUM_CHARACTERS];
BaseSubFrame *_subframe;
bool _wholeCell;
diff --git a/engines/wintermute/base/font/base_font_storage.cpp b/engines/wintermute/base/font/base_font_storage.cpp
index 8128ffe897..3286742478 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;
@@ -132,7 +132,7 @@ bool BaseFontStorage::persist(BasePersistenceManager *persistMgr) {
cleanup(false);
}
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
_fonts.persist(persistMgr);
return STATUS_OK;
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index 3219918e6d..2fcdebc117 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -38,6 +38,8 @@
#include "engines/wintermute/wintermute.h"
#include "graphics/fonts/ttf.h"
#include "graphics/fontman.h"
+#include "common/unzip.h"
+#include "common/config-manager.h" // For Scummmodern.zip
#include <limits.h>
namespace Wintermute {
@@ -49,13 +51,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 +74,10 @@ BaseFontTT::~BaseFontTT(void) {
_layers.clear();
delete[] _fontFile;
- _fontFile = NULL;
+ _fontFile = nullptr;
delete _deletableFont;
- _font = NULL;
+ _font = nullptr;
}
@@ -85,7 +87,7 @@ void BaseFontTT::clearCache() {
if (_cachedTexts[i]) {
delete _cachedTexts[i];
}
- _cachedTexts[i] = NULL;
+ _cachedTexts[i] = nullptr;
}
}
@@ -95,13 +97,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;
}
@@ -110,13 +112,13 @@ void BaseFontTT::initLoop() {
}
//////////////////////////////////////////////////////////////////////////
-int BaseFontTT::getTextWidth(byte *text, int maxLength) {
+int BaseFontTT::getTextWidth(const byte *text, int maxLength) {
WideString textStr;
if (_gameRef->_textEncoding == TEXT_UTF8) {
- textStr = StringUtil::utf8ToWide((char *)text);
+ textStr = StringUtil::utf8ToWide((const char *)text);
} else {
- textStr = StringUtil::ansiToWide((char *)text);
+ textStr = StringUtil::ansiToWide((const char *)text);
}
if (maxLength >= 0 && textStr.size() > (uint32)maxLength) {
@@ -131,13 +133,13 @@ int BaseFontTT::getTextWidth(byte *text, int maxLength) {
}
//////////////////////////////////////////////////////////////////////////
-int BaseFontTT::getTextHeight(byte *text, int width) {
+int BaseFontTT::getTextHeight(const byte *text, int width) {
WideString textStr;
if (_gameRef->_textEncoding == TEXT_UTF8) {
- textStr = StringUtil::utf8ToWide((char *)text);
+ textStr = StringUtil::utf8ToWide((const char *)text);
} else {
- textStr = StringUtil::ansiToWide((char *)text);
+ textStr = StringUtil::ansiToWide((const char *)text);
}
@@ -150,7 +152,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;
}
@@ -159,6 +161,11 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
// TODO: Why do we still insist on Widestrings everywhere?
/* if (_gameRef->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
else text = StringUtil::AnsiToWide((char *)Text);*/
+ // 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((const char *)text);
+ }
if (maxLength >= 0 && textStr.size() > (uint32)maxLength) {
textStr = Common::String(textStr.c_str(), (uint32)maxLength);
@@ -168,25 +175,25 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
BaseRenderer *renderer = _gameRef->_renderer;
// find cached surface, if exists
- int minPriority = INT_MAX;
+ uint32 minUseTime = UINT_MAX;
int minIndex = -1;
- BaseSurface *surface = NULL;
+ BaseSurface *surface = nullptr;
int textOffset = 0;
for (int i = 0; i < NUM_CACHED_TEXTS; i++) {
- if (_cachedTexts[i] == NULL) {
- minPriority = 0;
+ if (_cachedTexts[i] == nullptr) {
+ minUseTime = 0;
minIndex = i;
} else {
if (_cachedTexts[i]->_text == textStr && _cachedTexts[i]->_align == align && _cachedTexts[i]->_width == width && _cachedTexts[i]->_maxHeight == maxHeight && _cachedTexts[i]->_maxLength == maxLength) {
surface = _cachedTexts[i]->_surface;
textOffset = _cachedTexts[i]->_textOffset;
- _cachedTexts[i]->_priority++;
_cachedTexts[i]->_marked = true;
+ _cachedTexts[i]->_lastUsed = g_system->getMillis();
break;
} else {
- if (_cachedTexts[i]->_priority < minPriority) {
- minPriority = _cachedTexts[i]->_priority;
+ if (_cachedTexts[i]->_lastUsed < minUseTime) {
+ minUseTime = _cachedTexts[i]->_lastUsed;
minIndex = i;
}
}
@@ -199,7 +206,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;
@@ -209,10 +216,10 @@ void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign
_cachedTexts[minIndex]->_width = width;
_cachedTexts[minIndex]->_maxHeight = maxHeight;
_cachedTexts[minIndex]->_maxLength = maxLength;
- _cachedTexts[minIndex]->_priority = 1;
_cachedTexts[minIndex]->_text = textStr;
_cachedTexts[minIndex]->_textOffset = textOffset;
_cachedTexts[minIndex]->_marked = true;
+ _cachedTexts[minIndex]->_lastUsed = g_system->getMillis();
}
}
@@ -249,7 +256,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;
@@ -298,7 +305,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;
}
@@ -416,7 +423,7 @@ bool BaseFontTT::loadBuffer(byte *buffer) {
_layers.add(layer);
} else {
delete layer;
- layer = NULL;
+ layer = nullptr;
cmd = PARSERR_TOKENNOTFOUND;
}
}
@@ -503,7 +510,7 @@ bool BaseFontTT::persist(BasePersistenceManager *persistMgr) {
// persist layers
- int numLayers;
+ int32 numLayers;
if (persistMgr->getIsSaving()) {
numLayers = _layers.size();
persistMgr->transfer(TMEMBER(numLayers));
@@ -522,9 +529,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;
@@ -541,26 +548,64 @@ 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 = nullptr;
+ if (ConfMan.hasKey("themepath")) {
+ Common::FSNode themePath(ConfMan.get("themepath"));
+ if (themePath.exists()) {
+ Common::FSNode scummModern = themePath.getChild("scummmodern.zip");
+ if (scummModern.exists()) {
+ themeFile = scummModern.createReadStream();
+ }
+ }
+ }
+ if (!themeFile) { // Fallback 2.5: Search for ScummModern.zip in SearchMan.
+ 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);
@@ -595,7 +640,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 02dca7439f..f93505921f 100644
--- a/engines/wintermute/base/font/base_font_truetype.h
+++ b/engines/wintermute/base/font/base_font_truetype.h
@@ -46,23 +46,24 @@ private:
class BaseCachedTTFontText {
public:
WideString _text;
- int _width;
+ int32 _width;
TTextAlign _align;
- int _maxHeight;
- int _maxLength;
+ int32 _maxHeight;
+ int32 _maxLength;
BaseSurface *_surface;
- int _priority;
- int _textOffset;
+ int32 _priority;
+ int32 _textOffset;
bool _marked;
+ uint32 _lastUsed;
BaseCachedTTFontText() {
//_text = L"";
_text = "";
_width = _maxHeight = _maxLength = -1;
_align = TAL_LEFT;
- _surface = NULL;
- _priority = -1;
+ _surface = nullptr;
_textOffset = 0;
+ _lastUsed = 0;
_marked = false;
}
@@ -89,8 +90,8 @@ public:
return STATUS_OK;
}
- int _offsetX;
- int _offsetY;
+ int32 _offsetX;
+ int32 _offsetY;
uint32 _color;
};
@@ -99,10 +100,10 @@ public:
BaseFontTT(BaseGame *inGame);
virtual ~BaseFontTT(void);
- virtual int getTextWidth(byte *text, int maxLength = -1);
- virtual int getTextHeight(byte *text, int width);
- virtual void drawText(const byte *text, int x, int y, int width, TTextAlign align = TAL_LEFT, int max_height = -1, int maxLength = -1);
- virtual int getLetterHeight();
+ virtual int getTextWidth(const byte *text, int maxLength = -1) override;
+ virtual int getTextHeight(const byte *text, int width) override;
+ virtual void drawText(const byte *text, int x, int y, int width, TTextAlign align = TAL_LEFT, int max_height = -1, int maxLength = -1) override;
+ virtual int getLetterHeight() override;
bool loadBuffer(byte *buffer);
bool loadFile(const Common::String &filename);
@@ -139,7 +140,7 @@ public:
bool _isItalic;
bool _isUnderline;
bool _isStriked;
- int _fontHeight;
+ int32 _fontHeight;
char *_fontFile;
BaseArray<BaseTTFontLayer *> _layers;
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 0475824464..bfef29a5ed 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);
/**
@@ -164,10 +166,11 @@ public:
bool pointInViewport(Point32 *P);
bool _active;
bool _ready;
- bool _windowed;
- int _bPP;
- int _height;
- int _width;
+
+ bool isReady() const { return _ready; }
+ bool isWindowed() const { return _windowed; }
+ int32 getBPP() const { return _bPP; }
+
uint32 _window;
uint32 _forceAlphaColor;
@@ -179,31 +182,40 @@ public:
void setIndicator(int width, int height, int x, int y, uint32 color);
void persistSaveLoadImages(BasePersistenceManager *persistMgr);
void initSaveLoad(bool isSaving, bool quickSave = false);
- void endSaveLoad();
+ virtual void endSaveLoad();
void setLoadingScreen(const char *filename, int x, int y);
void setSaveImage(const char *filename, int x, int y);
bool displayIndicator();
+
+ int32 getWidth() const { return _width; }
+ int32 getHeight() const { return _height; }
protected:
+ int32 _height;
+ int32 _width;
+
+ bool _windowed;
+ int32 _bPP;
+
Common::String _loadImageName;
Common::String _saveImageName;
- int _saveImageX;
- int _saveImageY;
- int _loadImageX;
- int _loadImageY;
+ int32 _saveImageX;
+ int32 _saveImageY;
+ int32 _loadImageX;
+ int32 _loadImageY;
BaseSurface *_saveLoadImage;
bool _hasDrawnSaveLoadImage;
- int _indicatorWidthDrawn;
+ int32 _indicatorWidthDrawn;
uint32 _indicatorColor;
- int _indicatorX;
- int _indicatorY;
- int _indicatorWidth;
- int _indicatorHeight;
+ int32 _indicatorX;
+ int32 _indicatorY;
+ int32 _indicatorWidth;
+ int32 _indicatorHeight;
bool _loadInProgress;
bool _indicatorDisplay;
- int _indicatorProgress;
-protected:
+ int32 _indicatorProgress;
+
uint32 _clipperWindow;
Rect32 _windowRect;
diff --git a/engines/wintermute/base/gfx/base_surface.cpp b/engines/wintermute/base/gfx/base_surface.cpp
index d882adf5ad..2002463ea4 100644
--- a/engines/wintermute/base/gfx/base_surface.cpp
+++ b/engines/wintermute/base/gfx/base_surface.cpp
@@ -129,7 +129,7 @@ bool BaseSurface::invalidate() {
//////////////////////////////////////////////////////////////////////////
bool BaseSurface::prepareToDraw() {
- _lastUsedTime = _gameRef->_liveTimer;
+ _lastUsedTime = _gameRef->getLiveTimer()->getTime();
if (!_valid) {
//_gameRef->LOG(0, "Reviving: %s", _filename);
diff --git a/engines/wintermute/base/gfx/base_surface.h b/engines/wintermute/base/gfx/base_surface.h
index ee53c03e77..b83efa0bb8 100644
--- a/engines/wintermute/base/gfx/base_surface.h
+++ b/engines/wintermute/base/gfx/base_surface.h
@@ -41,7 +41,7 @@ public:
virtual bool prepareToDraw();
uint32 _lastUsedTime;
bool _valid;
- int _lifeTime;
+ int32 _lifeTime;
bool _pixelOpReady;
BaseSurface(BaseGame *inGame);
@@ -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;
@@ -89,8 +90,8 @@ protected:
bool _keepLoaded;
Common::String _filename;
- int _height;
- int _width;
+ int32 _height;
+ int32 _width;
};
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 7970a25300..e1424cea87 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -28,6 +28,7 @@
#include "engines/wintermute/base/gfx/osystem/base_render_osystem.h"
#include "engines/wintermute/base/gfx/osystem/base_surface_osystem.h"
+#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/gfx/base_image.h"
#include "engines/wintermute/math/math_util.h"
@@ -38,57 +39,9 @@
#include "common/queue.h"
#include "common/config-manager.h"
-namespace Wintermute {
+#define DIRTY_RECT_LIMIT 800
-RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha) : _owner(owner),
- _srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(true), _hasAlpha(!disableAlpha) {
- _colorMod = 0;
- _mirror = TransparentSurface::FLIP_NONE;
- if (mirrorX) {
- _mirror |= TransparentSurface::FLIP_V;
- }
- if (mirrorY) {
- _mirror |= TransparentSurface::FLIP_H;
- }
- if (surf) {
- _surface = new Graphics::Surface();
- _surface->create((uint16)srcRect->width(), (uint16)srcRect->height(), surf->format);
- assert(_surface->format.bytesPerPixel == 4);
- // Get a clipped copy of the surface
- for (int i = 0; i < _surface->h; i++) {
- memcpy(_surface->getBasePtr(0, i), surf->getBasePtr(srcRect->left, srcRect->top + i), srcRect->width() * _surface->format.bytesPerPixel);
- }
- // Then scale it if necessary
- if (dstRect->width() != srcRect->width() || dstRect->height() != srcRect->height()) {
- TransparentSurface src(*_surface, false);
- Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
- _surface->free();
- delete _surface;
- _surface = temp;
- }
- } else {
- _surface = NULL;
- }
-}
-
-RenderTicket::~RenderTicket() {
- if (_surface) {
- _surface->free();
- delete _surface;
- }
-}
-
-bool RenderTicket::operator==(RenderTicket &t) {
- if ((t._srcRect != _srcRect) ||
- (t._dstRect != _dstRect) ||
- (t._mirror != _mirror) ||
- (t._owner != _owner) ||
- (t._hasAlpha != _hasAlpha) ||
- (t._colorMod != _colorMod)) {
- return false;
- }
- return true;
-}
+namespace Wintermute {
BaseRenderer *makeOSystemRenderer(BaseGame *inGame) {
return new BaseRenderOSystem(inGame);
@@ -100,16 +53,34 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) {
_blankSurface = new Graphics::Surface();
_drawNum = 1;
_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;
+ _tempDisableDirtyRects = 0;
+ if (ConfMan.hasKey("dirty_rects")) {
+ _disableDirtyRects = !ConfMan.getBool("dirty_rects");
+ }
}
//////////////////////////////////////////////////////////////////////////
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();
@@ -198,7 +169,20 @@ bool BaseRenderOSystem::indicatorFlip() {
}
bool BaseRenderOSystem::flip() {
- if (!_disableDirtyRects) {
+ if (_renderQueue.size() > DIRTY_RECT_LIMIT) {
+ _tempDisableDirtyRects++;
+ }
+ if (_skipThisFrame) {
+ _skipThisFrame = false;
+ delete _dirtyRect;
+ _dirtyRect = nullptr;
+ g_system->updateScreen();
+ _needsFlip = false;
+ _drawNum = 1;
+ addDirtyRect(_renderRect);
+ return true;
+ }
+ if (!_tempDisableDirtyRects && !_disableDirtyRects) {
drawTickets();
} else {
// Clear the scale-buffered tickets that wasn't reused.
@@ -214,25 +198,41 @@ bool BaseRenderOSystem::flip() {
}
}
}
- if (_needsFlip || _disableDirtyRects) {
- if (_disableDirtyRects) {
+ if (_needsFlip || _disableDirtyRects || _tempDisableDirtyRects) {
+ if (_disableDirtyRects || _tempDisableDirtyRects) {
g_system->copyRectToScreen((byte *)_renderSurface->pixels, _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h);
}
// 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;
}
_drawNum = 1;
+ if (_tempDisableDirtyRects && !_disableDirtyRects) {
+ _tempDisableDirtyRects--;
+ if (!_tempDisableDirtyRects) {
+ Common::Rect screen(_screenRect.top, _screenRect.left, _screenRect.bottom, _screenRect.right);
+ addDirtyRect(screen);
+
+ // The queue has been ignored but updated, and is guaranteed to be in draw-order when run without dirty-rects.
+ RenderQueueIterator it = _renderQueue.begin();
+ int drawNum = 1;
+ while (it != _renderQueue.end()) {
+ (*it)->_drawNum = drawNum++;
+ ++it;
+ }
+ }
+ }
+
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
bool BaseRenderOSystem::fill(byte r, byte g, byte b, Common::Rect *rect) {
_clearColor = _renderSurface->format.ARGBToColor(0xFF, r, g, b);
- if (!_disableDirtyRects) {
+ if (!_disableDirtyRects && !_tempDisableDirtyRects) {
return STATUS_OK;
}
if (!rect) {
@@ -259,14 +259,6 @@ void BaseRenderOSystem::fade(uint16 alpha) {
//////////////////////////////////////////////////////////////////////////
void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect) {
- // This particular warning is rather messy, as this function is called a ton,
- // thus we avoid printing it more than once.
-
- // TODO: Add fading with dirty rects.
- if (!_disableDirtyRects) {
- warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
- }
-
Common::Rect fillRect;
if (rect) {
@@ -294,7 +286,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);
@@ -307,22 +299,51 @@ 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) {
+ if (_tempDisableDirtyRects || _disableDirtyRects) {
+ RenderTicket *ticket = new RenderTicket(owner, surf, srcRect, dstRect, mirrorX, mirrorY, disableAlpha);
+ ticket->_colorMod = _colorMod;
+ ticket->_wantsDraw = true;
+ _renderQueue.push_back(ticket);
+ _previousTicket = ticket;
+ drawFromSurface(ticket);
+ 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) {
+ _batchNum++;
+ }
compare._colorMod = _colorMod;
RenderQueueIterator it;
- for (it = _renderQueue.begin(); it != _renderQueue.end(); ++it) {
- if ((*it)->_owner == owner && *(*it) == compare && (*it)->_isValid) {
- (*it)->_colorMod = _colorMod;
+ // Avoid calling end() and operator* every time, when potentially going through
+ // LOTS of tickets.
+ RenderQueueIterator endIterator = _renderQueue.end();
+ RenderTicket *compareTicket = nullptr;
+ for (it = _lastAddedTicket; it != endIterator; ++it) {
+ compareTicket = *it;
+ if (*(compareTicket) == compare && compareTicket->_isValid) {
+ compareTicket->_colorMod = _colorMod;
if (_disableDirtyRects) {
- drawFromSurface(*it, NULL);
+ drawFromSurface(compareTicket);
} else {
- drawFromTicket(*it);
+ drawFromTicket(compareTicket);
+ _previousTicket = compareTicket;
+ }
+ if (_renderQueue.size() > DIRTY_RECT_LIMIT) {
+ drawTickets();
+ _tempDisableDirtyRects = 3;
}
return;
}
@@ -332,10 +353,52 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
ticket->_colorMod = _colorMod;
if (!_disableDirtyRects) {
drawFromTicket(ticket);
+ _previousTicket = ticket;
} else {
ticket->_wantsDraw = true;
_renderQueue.push_back(ticket);
- drawFromSurface(ticket, NULL);
+ _previousTicket = ticket;
+ drawFromSurface(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 (!_tempDisableDirtyRects && !_disableDirtyRects && *_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?)");
}
}
@@ -363,28 +426,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();
@@ -421,9 +487,12 @@ void BaseRenderOSystem::addDirtyRect(const Common::Rect &rect) {
void BaseRenderOSystem::drawTickets() {
RenderQueueIterator it = _renderQueue.begin();
// Clean out the old tickets
- int decrement = 0;
+ // Note: We draw invalid tickets too, otherwise we wouldn't be honouring
+ // the draw request they obviously made BEFORE becoming invalid, either way
+ // we have a copy of their data, so their invalidness won't affect us.
+ uint32 decrement = 0;
while (it != _renderQueue.end()) {
- if ((*it)->_wantsDraw == false || (*it)->_isValid == false) {
+ if ((*it)->_wantsDraw == false) {
RenderTicket *ticket = *it;
addDirtyRect((*it)->_dstRect);
it = _renderQueue.erase(it);
@@ -435,6 +504,12 @@ void BaseRenderOSystem::drawTickets() {
}
}
if (!_dirtyRect || _dirtyRect->width() == 0 || _dirtyRect->height() == 0) {
+ it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ ticket->_wantsDraw = false;
+ ++it;
+ }
return;
}
// The color-mods are stored in the RenderTickets on add, since we set that state again during
@@ -446,8 +521,9 @@ void BaseRenderOSystem::drawTickets() {
_drawNum = 1;
for (it = _renderQueue.begin(); it != _renderQueue.end(); ++it) {
RenderTicket *ticket = *it;
- assert(ticket->_drawNum == _drawNum++);
- if (ticket->_isValid && ticket->_dstRect.intersects(*_dirtyRect)) {
+ assert(ticket->_drawNum == _drawNum);
+ ++_drawNum;
+ if (ticket->_dstRect.intersects(*_dirtyRect)) {
// dstClip is the area we want redrawn.
Common::Rect dstClip(ticket->_dstRect);
// reduce it to the dirty rect
@@ -460,7 +536,7 @@ void BaseRenderOSystem::drawTickets() {
dstClip.translate(-offsetX, -offsetY);
_colorMod = ticket->_colorMod;
- drawFromSurface(ticket->getSurface(), &ticket->_srcRect, &pos, &dstClip, ticket->_mirror);
+ drawFromSurface(ticket, &pos, &dstClip);
_needsFlip = true;
}
// Some tickets want redraw but don't actually clip the dirty area (typically the ones that shouldnt become clear-color)
@@ -470,46 +546,40 @@ void BaseRenderOSystem::drawTickets() {
// Revert the colorMod-state.
_colorMod = oldColorMod;
+
+ it = _renderQueue.begin();
+ // Clean out the old tickets
+ decrement = 0;
+ while (it != _renderQueue.end()) {
+ if ((*it)->_isValid == false) {
+ RenderTicket *ticket = *it;
+ addDirtyRect((*it)->_dstRect);
+ it = _renderQueue.erase(it);
+ delete ticket;
+ decrement++;
+ } else {
+ (*it)->_drawNum -= decrement;
+ ++it;
+ }
+ }
+
}
// Replacement for SDL2's SDL_RenderCopy
-void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket, Common::Rect *clipRect) {
- TransparentSurface src(*ticket->getSurface(), false);
- bool doDelete = false;
- if (!clipRect) {
- doDelete = true;
- clipRect = new Common::Rect();
- clipRect->setWidth(ticket->getSurface()->w);
- clipRect->setHeight(ticket->getSurface()->h);
- }
-
- src._enableAlphaBlit = ticket->_hasAlpha;
- src.blit(*_renderSurface, ticket->_dstRect.left, ticket->_dstRect.top, ticket->_mirror, clipRect, _colorMod, clipRect->width(), clipRect->height());
- if (doDelete) {
- delete clipRect;
- }
+void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket) {
+ ticket->drawToSurface(_renderSurface);
}
-void BaseRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror) {
- TransparentSurface src(*surf, false);
- bool doDelete = false;
- if (!clipRect) {
- doDelete = true;
- clipRect = new Common::Rect();
- clipRect->setWidth(surf->w);
- clipRect->setHeight(surf->h);
- }
- src.blit(*_renderSurface, dstRect->left, dstRect->top, mirror, clipRect, _colorMod, clipRect->width(), clipRect->height());
- if (doDelete) {
- delete clipRect;
- }
+void BaseRenderOSystem::drawFromSurface(RenderTicket *ticket, Common::Rect *dstRect, Common::Rect *clipRect) {
+ ticket->drawToSurface(_renderSurface, dstRect, clipRect);
}
//////////////////////////////////////////////////////////////////////////
bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
-
- if (!_disableDirtyRects) {
- warning("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
+ // This function isn't used outside of indicator-displaying, and thus quite unused in
+ // BaseRenderOSystem when dirty-rects are enabled.
+ if (!_tempDisableDirtyRects && !_disableDirtyRects && !_indicatorDisplay) {
+ error("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
}
byte r = RGBCOLGetR(color);
@@ -606,4 +676,38 @@ BaseSurface *BaseRenderOSystem::createSurface() {
return new BaseSurfaceOSystem(_gameRef);
}
+void BaseRenderOSystem::endSaveLoad() {
+ BaseRenderer::endSaveLoad();
+
+ // Clear the scale-buffered tickets as we just loaded.
+ RenderQueueIterator it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ RenderTicket *ticket = *it;
+ it = _renderQueue.erase(it);
+ delete ticket;
+ }
+ _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() {
+ _spriteBatch = true;
+ _batchNum = 1;
+ return STATUS_OK;
+}
+
+bool BaseRenderOSystem::endSpriteBatch() {
+ _spriteBatch = false;
+ _batchNum = 0;
+ return STATUS_OK;
+}
+
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
index 1e72508cd0..3cb0fa82a3 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h
@@ -36,27 +36,7 @@
namespace Wintermute {
class BaseSurfaceOSystem;
-class RenderTicket {
- Graphics::Surface *_surface;
-public:
- RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false, bool disableAlpha = false);
- RenderTicket() : _isValid(true), _wantsDraw(false), _drawNum(0) {}
- ~RenderTicket();
- const Graphics::Surface *getSurface() { return _surface; }
- Common::Rect _srcRect;
- Common::Rect _dstRect;
- uint32 _mirror;
- bool _hasAlpha;
-
- bool _isValid;
- bool _wantsDraw;
- uint32 _drawNum;
- uint32 _colorMod;
-
- BaseSurfaceOSystem *_owner;
- bool operator==(RenderTicket &a);
-};
-
+class RenderTicket;
class BaseRenderOSystem : public BaseRenderer {
public:
BaseRenderOSystem(BaseGame *inGame);
@@ -64,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);
@@ -82,32 +62,40 @@ 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;
}
-
- void drawSurface(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha = false);
- BaseSurface *createSurface();
+ 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) ;
+ 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();
- void drawFromSurface(RenderTicket *ticket, Common::Rect *clipRect);
- void drawFromSurface(const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, Common::Rect *clipRect, uint32 mirror);
+ // Non-dirty-rects:
+ void drawFromSurface(RenderTicket *ticket);
+ // Dirty-rects:
+ void drawFromSurface(RenderTicket *ticket, Common::Rect *dstRect, Common::Rect *clipRect);
typedef Common::List<RenderTicket *>::iterator RenderQueueIterator;
Common::Rect *_dirtyRect;
Common::List<RenderTicket *> _renderQueue;
+ RenderQueueIterator _lastAddedTicket;
+ RenderTicket *_previousTicket;
+
bool _needsFlip;
uint32 _drawNum;
Common::Rect _renderRect;
@@ -119,11 +107,16 @@ private:
int _borderRight;
int _borderBottom;
- static const bool _disableDirtyRects = true;
+ bool _disableDirtyRects;
+ uint32 _tempDisableDirtyRects;
+ bool _spriteBatch;
+ uint32 _batchNum;
float _ratioX;
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..0572ef2f6e 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);
@@ -120,6 +120,7 @@ bool BaseSurfaceOSystem::create(const Common::String &filename, bool defaultCK,
bool BaseSurfaceOSystem::finishLoad() {
BaseImage *image = new BaseImage();
if (!image->loadFile(_filename)) {
+ delete image;
return false;
}
@@ -140,23 +141,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 +187,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
return;
// TODO: Reimplement this
delete[] _alphaMask;
- _alphaMask = NULL;
+ _alphaMask = nullptr;
if (!surface) {
return;
}
@@ -214,7 +224,7 @@ void BaseSurfaceOSystem::genAlphaMask(Graphics::Surface *surface) {
if (!hasTransparency) {
delete[] _alphaMask;
- _alphaMask = NULL;
+ _alphaMask = nullptr;
}
}
@@ -293,7 +303,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 +424,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
new file mode 100644
index 0000000000..36c5d7b740
--- /dev/null
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -0,0 +1,115 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/graphics/transparent_surface.h"
+#include "engines/wintermute/base/gfx/osystem/render_ticket.h"
+
+namespace Wintermute {
+
+RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect, bool mirrorX, bool mirrorY, bool disableAlpha) : _owner(owner),
+_srcRect(*srcRect), _dstRect(*dstRect), _drawNum(0), _isValid(true), _wantsDraw(true), _hasAlpha(!disableAlpha) {
+ _colorMod = 0;
+ _batchNum = 0;
+ _mirror = TransparentSurface::FLIP_NONE;
+ if (mirrorX) {
+ _mirror |= TransparentSurface::FLIP_V;
+ }
+ if (mirrorY) {
+ _mirror |= TransparentSurface::FLIP_H;
+ }
+ if (surf) {
+ _surface = new Graphics::Surface();
+ _surface->create((uint16)srcRect->width(), (uint16)srcRect->height(), surf->format);
+ assert(_surface->format.bytesPerPixel == 4);
+ // Get a clipped copy of the surface
+ for (int i = 0; i < _surface->h; i++) {
+ memcpy(_surface->getBasePtr(0, i), surf->getBasePtr(srcRect->left, srcRect->top + i), srcRect->width() * _surface->format.bytesPerPixel);
+ }
+ // Then scale it if necessary
+ if (dstRect->width() != srcRect->width() || dstRect->height() != srcRect->height()) {
+ TransparentSurface src(*_surface, false);
+ Graphics::Surface *temp = src.scale(dstRect->width(), dstRect->height());
+ _surface->free();
+ delete _surface;
+ _surface = temp;
+ }
+ } else {
+ _surface = nullptr;
+ }
+}
+
+RenderTicket::~RenderTicket() {
+ if (_surface) {
+ _surface->free();
+ delete _surface;
+ }
+}
+
+bool RenderTicket::operator==(RenderTicket &t) {
+ if ((t._owner != _owner) ||
+ (t._batchNum != _batchNum) ||
+ (t._hasAlpha != _hasAlpha) ||
+ (t._mirror != _mirror) ||
+ (t._colorMod != _colorMod) ||
+ (t._dstRect != _dstRect) ||
+ (t._srcRect != _srcRect)) {
+ return false;
+ }
+ return true;
+}
+
+// Replacement for SDL2's SDL_RenderCopy
+void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface) {
+ TransparentSurface src(*getSurface(), false);
+
+ Common::Rect clipRect;
+ clipRect.setWidth(getSurface()->w);
+ clipRect.setHeight(getSurface()->h);
+
+ src._enableAlphaBlit = _hasAlpha;
+ src.blit(*_targetSurface, _dstRect.left, _dstRect.top, _mirror, &clipRect, _colorMod, clipRect.width(), clipRect.height());
+}
+
+void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface, Common::Rect *dstRect, Common::Rect *clipRect) {
+ TransparentSurface src(*getSurface(), false);
+ bool doDelete = false;
+ if (!clipRect) {
+ doDelete = true;
+ clipRect = new Common::Rect();
+ clipRect->setWidth(getSurface()->w);
+ clipRect->setHeight(getSurface()->h);
+ }
+
+ src._enableAlphaBlit = _hasAlpha;
+ src.blit(*_targetSurface, dstRect->left, dstRect->top, _mirror, clipRect, _colorMod, clipRect->width(), clipRect->height());
+ if (doDelete) {
+ delete clipRect;
+ }
+}
+
+} // end of namespace Wintermute
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.h b/engines/wintermute/base/gfx/osystem/render_ticket.h
new file mode 100644
index 0000000000..968b42b5e1
--- /dev/null
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.h
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_RENDER_TICKET_H
+#define WINTERMUTE_RENDER_TICKET_H
+
+#include "graphics/surface.h"
+#include "common/rect.h"
+
+namespace Wintermute {
+
+class BaseSurfaceOSystem;
+class RenderTicket {
+public:
+ RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false, bool disableAlpha = false);
+ RenderTicket() : _isValid(true), _wantsDraw(false), _drawNum(0) {}
+ ~RenderTicket();
+ const Graphics::Surface *getSurface() { return _surface; }
+ // Non-dirty-rects:
+ void drawToSurface(Graphics::Surface *_targetSurface);
+ // Dirty-rects:
+ void drawToSurface(Graphics::Surface *_targetSurface, Common::Rect *dstRect, Common::Rect *clipRect);
+
+ Common::Rect _dstRect;
+ uint32 _batchNum;
+
+ bool _isValid;
+ bool _wantsDraw;
+ uint32 _drawNum;
+ uint32 _colorMod;
+
+ BaseSurfaceOSystem *_owner;
+ bool operator==(RenderTicket &a);
+ const Common::Rect *getSrcRect() { return &_srcRect; }
+private:
+ Graphics::Surface *_surface;
+ Common::Rect _srcRect;
+ bool _hasAlpha;
+ uint32 _mirror;
+};
+
+} // end of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index bab4d4609e..c86e1ce369 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -32,7 +32,8 @@
#include "engines/wintermute/math/matrix4.h"
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
-#include "engines/wintermute/base/base_game.h"
+#include "engines/wintermute/base/base_engine.h"
+#include "engines/wintermute/base/timer.h"
#include "engines/wintermute/base/base_region.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
@@ -88,7 +89,7 @@ PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *owner) : BaseObject
_useRegion = false;
- _emitEvent = NULL;
+ _emitEvent = nullptr;
_owner = owner;
}
@@ -112,7 +113,7 @@ PartEmitter::~PartEmitter(void) {
_sprites.clear();
delete[] _emitEvent;
- _emitEvent = NULL;
+ _emitEvent = nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -131,7 +132,7 @@ bool PartEmitter::addSprite(const char *filename) {
// check if file exists
Common::SeekableReadStream *File = BaseFileManager::getEngineInstance()->openFile(filename);
if (!File) {
- _gameRef->LOG(0, "Sprite '%s' not found", filename);
+ BaseEngine::LOG(0, "Sprite '%s' not found", filename);
return STATUS_FAILED;
} else {
BaseFileManager::getEngineInstance()->closeFile(File);
@@ -252,7 +253,7 @@ bool PartEmitter::update() {
if (!_running) {
return STATUS_OK;
} else {
- return updateInternal(_gameRef->_timer, _gameRef->_timerDelta);
+ return updateInternal(BaseEngine::getTimer()->getTime(), BaseEngine::getTimer()->getTimeDelta());
}
}
@@ -321,11 +322,11 @@ bool PartEmitter::updateInternal(uint32 currentTime, uint32 timerDelta) {
//////////////////////////////////////////////////////////////////////////
bool PartEmitter::display(BaseRegion *region) {
if (_sprites.size() <= 1) {
- _gameRef->_renderer->startSpriteBatch();
+ BaseEngine::getRenderer()->startSpriteBatch();
}
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;
}
@@ -335,7 +336,7 @@ bool PartEmitter::display(BaseRegion *region) {
}
if (_sprites.size() <= 1) {
- _gameRef->_renderer->endSpriteBatch();
+ BaseEngine::getRenderer()->endSpriteBatch();
}
return STATUS_OK;
@@ -353,7 +354,7 @@ bool PartEmitter::start() {
if (_overheadTime > 0) {
uint32 delta = 500;
int steps = _overheadTime / delta;
- uint32 currentTime = _gameRef->_timer - _overheadTime;
+ uint32 currentTime = BaseEngine::getTimer()->getTime() - _overheadTime;
for (int i = 0; i < steps; i++) {
updateInternal(currentTime, delta);
@@ -373,16 +374,13 @@ bool PartEmitter::sortParticlesByZ() {
}
//////////////////////////////////////////////////////////////////////////
-int PartEmitter::compareZ(const void *obj1, const void *obj2) {
- const PartParticle *p1 = *(const PartParticle *const *)obj1;
- const PartParticle *p2 = *(const PartParticle *const *)obj2;
-
+bool PartEmitter::compareZ(const PartParticle *p1, const PartParticle *p2) {
if (p1->_posZ < p2->_posZ) {
- return -1;
+ return true;
} else if (p1->_posZ > p2->_posZ) {
- return 1;
+ return false;
} else {
- return 0;
+ return false;
}
}
@@ -405,7 +403,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) {
@@ -1136,7 +1134,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());
}
@@ -1214,7 +1212,7 @@ bool PartEmitter::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER_INT(_batchesGenerated));
persistMgr->transfer(TMEMBER(_emitEvent));
- persistMgr->transfer(TMEMBER(_owner));
+ persistMgr->transferPtr(TMEMBER_PTR(_owner));
_sprites.persist(persistMgr);
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index f2c8f139f1..a0d701f338 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -43,12 +43,12 @@ public:
PartEmitter(BaseGame *inGame, BaseScriptHolder *Owner);
virtual ~PartEmitter(void);
- int _fadeOutTime;
+ int32 _fadeOutTime;
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();
@@ -70,11 +70,11 @@ public:
private:
- int _width;
- int _height;
+ int32 _width;
+ int32 _height;
- int _angle1;
- int _angle2;
+ int32 _angle1;
+ int32 _angle2;
float _rotation1;
float _rotation2;
@@ -94,31 +94,31 @@ private:
float _scale2;
bool _scaleZBased;
- int _maxParticles;
+ int32 _maxParticles;
- int _lifeTime1;
- int _lifeTime2;
+ int32 _lifeTime1;
+ int32 _lifeTime2;
bool _lifeTimeZBased;
- int _genInterval;
- int _genAmount;
+ int32 _genInterval;
+ int32 _genAmount;
bool _running;
- int _overheadTime;
+ int32 _overheadTime;
- int _maxBatches;
- int _batchesGenerated;
+ int32 _maxBatches;
+ int32 _batchesGenerated;
Rect32 _border;
- int _borderThicknessLeft;
- int _borderThicknessRight;
- int _borderThicknessTop;
- int _borderThicknessBottom;
+ int32 _borderThicknessLeft;
+ int32 _borderThicknessRight;
+ int32 _borderThicknessTop;
+ int32 _borderThicknessBottom;
- int _fadeInTime;
+ int32 _fadeInTime;
- int _alpha1;
- int _alpha2;
+ int32 _alpha1;
+ int32 _alpha2;
bool _alphaTimeBased;
bool _useRegion;
@@ -127,7 +127,7 @@ private:
BaseScriptHolder *_owner;
PartForce *addForceByName(const Common::String &name);
- int static compareZ(const void *obj1, const void *obj2);
+ bool static compareZ(const PartParticle *p1, const PartParticle *p2);
bool initParticle(PartParticle *particle, uint32 currentTime, uint32 timerDelta);
bool updateInternal(uint32 currentTime, uint32 timerDelta);
uint32 _lastGenTime;
diff --git a/engines/wintermute/base/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/particles/part_particle.h b/engines/wintermute/base/particles/part_particle.h
index 4b8c2f131e..8cca6b4057 100644
--- a/engines/wintermute/base/particles/part_particle.h
+++ b/engines/wintermute/base/particles/part_particle.h
@@ -55,8 +55,8 @@ public:
float _rotation;
float _angVelocity;
- int _alpha1;
- int _alpha2;
+ int32 _alpha1;
+ int32 _alpha2;
Rect32 _border;
Vector2 _pos;
@@ -65,7 +65,7 @@ public:
float _scale;
BaseSprite *_sprite;
uint32 _creationTime;
- int _lifeTime;
+ int32 _lifeTime;
bool _isDead;
TParticleState _state;
@@ -80,9 +80,9 @@ public:
bool persist(BasePersistenceManager *PersistMgr);
private:
uint32 _fadeStart;
- int _fadeTime;
- int _currentAlpha;
- int _fadeStartAlpha;
+ int32 _fadeTime;
+ int32 _currentAlpha;
+ int32 _fadeStartAlpha;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/base_save_thumb_helper.cpp b/engines/wintermute/base/save_thumb_helper.cpp
index b4205c21c4..bab29c5cf8 100644
--- a/engines/wintermute/base/base_save_thumb_helper.cpp
+++ b/engines/wintermute/base/save_thumb_helper.cpp
@@ -26,54 +26,83 @@
* Copyright (c) 2011 Jan Nedoma
*/
-#include "engines/wintermute/base/base_save_thumb_helper.h"
+#include "engines/wintermute/base/save_thumb_helper.h"
#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;
+SaveThumbHelper::SaveThumbHelper(BaseGame *inGame) : _gameRef(inGame) {
+ _thumbnail = nullptr;
+ _scummVMThumb = nullptr;
}
//////////////////////////////////////////////////////////////////////////
-BaseSaveThumbHelper::~BaseSaveThumbHelper(void) {
+SaveThumbHelper::~SaveThumbHelper(void) {
delete _thumbnail;
- _thumbnail = NULL;
+ _thumbnail = nullptr;
+ delete _scummVMThumb;
+ _scummVMThumb = nullptr;
}
-//////////////////////////////////////////////////////////////////////////
-bool BaseSaveThumbHelper::storeThumbnail(bool doFlip) {
- delete _thumbnail;
- _thumbnail = NULL;
-
- if (_gameRef->_thumbnailWidth > 0 && _gameRef->_thumbnailHeight > 0) {
+BaseImage *SaveThumbHelper::storeThumb(bool doFlip, int width, int height) {
+ BaseImage *thumbnail = nullptr;
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 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);
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 0) {
+ thumbnail = new BaseImage();
+ thumbnail->copyFrom(screenshot, width, height);
}
+
+
+ delete screenshot;
+ screenshot = nullptr;
+ }
+ return thumbnail;
+}
+//////////////////////////////////////////////////////////////////////////
+bool SaveThumbHelper::storeThumbnail(bool doFlip) {
+ delete _thumbnail;
+ _thumbnail = nullptr;
- delete screenshot;
- screenshot = NULL;
+ if (_gameRef->getSaveThumbWidth() > 0 && _gameRef->getSaveThumbHeight() > 0) {
+
+ _thumbnail = storeThumb(doFlip, _gameRef->getSaveThumbWidth(), _gameRef->getSaveThumbHeight());
+ if (!_thumbnail) {
+ return STATUS_FAILED;
+ }
+ }
+ storeScummVMThumbNail();
+ return STATUS_OK;
+}
+
+//////////////////////////////////////////////////////////////////////////
+bool SaveThumbHelper::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/save_thumb_helper.h
index 8863508ac9..d3bc5f5523 100644
--- a/engines/wintermute/base/base_save_thumb_helper.h
+++ b/engines/wintermute/base/save_thumb_helper.h
@@ -28,22 +28,23 @@
#ifndef WINTERMUTE_BASE_SAVE_THUMB_HELPER_H
#define WINTERMUTE_BASE_SAVE_THUMB_HELPER_H
-
-#include "engines/wintermute/base/base.h"
-
namespace Wintermute {
class BaseImage;
+class BaseGame;
-class BaseSaveThumbHelper : public BaseClass {
+class SaveThumbHelper {
public:
- BaseSaveThumbHelper(BaseGame *inGame);
- virtual ~BaseSaveThumbHelper(void);
+ SaveThumbHelper(BaseGame *inGame);
+ virtual ~SaveThumbHelper(void);
bool storeThumbnail(bool doFlip = false);
+ bool storeScummVMThumbNail(bool doFlip = false);
BaseImage *_thumbnail;
+ BaseImage *_scummVMThumb;
private:
- BaseImage *_richThumbnail;
+ BaseImage *storeThumb(bool doFlip, int width, int height);
+ BaseGame *_gameRef;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index 12204e1b35..1b7dfd42ed 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -75,10 +75,10 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
gameRef->_renderer->endSaveLoad();
- //_gameRef->LOG(0, "Load end %d", BaseUtils::GetUsedMemMB());
+ //BaseEngine::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 9469bd46a7..1b945c2e1c 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());
@@ -1108,7 +1108,7 @@ uint32 ScScript::getFuncPos(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
-uint32 ScScript::getMethodPos(const Common::String &name) {
+uint32 ScScript::getMethodPos(const Common::String &name) const {
for (uint32 i = 0; i < _numMethods; i++) {
if (name == _methods[i].name) {
return _methods[i].pos;
@@ -1120,7 +1120,7 @@ uint32 ScScript::getMethodPos(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
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);
@@ -1194,7 +1194,7 @@ bool ScScript::sleep(uint32 duration) {
_waitTime = g_system->getMillis() + duration;
_waitFrozen = true;
} else {
- _waitTime = _gameRef->_timer + duration;
+ _waitTime = _gameRef->getTimer()->getTime() + duration;
_waitFrozen = false;
}
return STATUS_OK;
@@ -1243,7 +1243,7 @@ void ScScript::runtimeError(const char *fmt, ...) {
//////////////////////////////////////////////////////////////////////////
bool ScScript::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
// buffer
if (persistMgr->getIsSaving()) {
@@ -1252,7 +1252,7 @@ bool ScScript::persist(BasePersistenceManager *persistMgr) {
persistMgr->putBytes(_buffer, _bufferSize);
} else {
// don't save idle/finished scripts
- int bufferSize = 0;
+ int32 bufferSize = 0;
persistMgr->transfer(TMEMBER(bufferSize));
}
} else {
@@ -1263,38 +1263,38 @@ bool ScScript::persist(BasePersistenceManager *persistMgr) {
_scriptStream = new Common::MemoryReadStream(_buffer, _bufferSize);
initTables();
} else {
- _buffer = NULL;
- _scriptStream = NULL;
+ _buffer = nullptr;
+ _scriptStream = nullptr;
}
}
- persistMgr->transfer(TMEMBER(_callStack));
+ persistMgr->transferPtr(TMEMBER_PTR(_callStack));
persistMgr->transfer(TMEMBER(_currentLine));
- persistMgr->transfer(TMEMBER(_engine));
+ persistMgr->transferPtr(TMEMBER_PTR(_engine));
persistMgr->transfer(TMEMBER(_filename));
persistMgr->transfer(TMEMBER(_freezable));
- persistMgr->transfer(TMEMBER(_globals));
+ persistMgr->transferPtr(TMEMBER_PTR(_globals));
persistMgr->transfer(TMEMBER(_iP));
- persistMgr->transfer(TMEMBER(_scopeStack));
- persistMgr->transfer(TMEMBER(_stack));
+ persistMgr->transferPtr(TMEMBER_PTR(_scopeStack));
+ persistMgr->transferPtr(TMEMBER_PTR(_stack));
persistMgr->transfer(TMEMBER_INT(_state));
- persistMgr->transfer(TMEMBER(_operand));
+ persistMgr->transferPtr(TMEMBER_PTR(_operand));
persistMgr->transfer(TMEMBER_INT(_origState));
- persistMgr->transfer(TMEMBER(_owner));
- persistMgr->transfer(TMEMBER(_reg1));
+ persistMgr->transferPtr(TMEMBER_PTR(_owner));
+ persistMgr->transferPtr(TMEMBER_PTR(_reg1));
persistMgr->transfer(TMEMBER(_thread));
persistMgr->transfer(TMEMBER(_threadEvent));
- persistMgr->transfer(TMEMBER(_thisStack));
+ persistMgr->transferPtr(TMEMBER_PTR(_thisStack));
persistMgr->transfer(TMEMBER(_timeSlice));
- persistMgr->transfer(TMEMBER(_waitObject));
- persistMgr->transfer(TMEMBER(_waitScript));
+ persistMgr->transferPtr(TMEMBER_PTR(_waitObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_waitScript));
persistMgr->transfer(TMEMBER(_waitTime));
persistMgr->transfer(TMEMBER(_waitFrozen));
persistMgr->transfer(TMEMBER(_methodThread));
persistMgr->transfer(TMEMBER(_methodThread));
persistMgr->transfer(TMEMBER(_unbreakable));
- persistMgr->transfer(TMEMBER(_parentScript));
+ persistMgr->transferPtr(TMEMBER_PTR(_parentScript));
if (!persistMgr->getIsSaving()) {
_tracingMode = false;
@@ -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,17 +1322,17 @@ ScScript *ScScript::invokeEventHandler(const Common::String &eventName, bool unb
return thread;
} else {
delete thread;
- return NULL;
+ return nullptr;
}
} else {
- return NULL;
+ return nullptr;
}
}
//////////////////////////////////////////////////////////////////////////
-uint32 ScScript::getEventPos(const Common::String &name) {
+uint32 ScScript::getEventPos(const Common::String &name) const {
for (int i = _numEvents - 1; i >= 0; i--) {
if (scumm_stricmp(name.c_str(), _events[i].name) == 0) {
return _events[i].pos;
@@ -1343,13 +1343,13 @@ uint32 ScScript::getEventPos(const Common::String &name) {
//////////////////////////////////////////////////////////////////////////
-bool ScScript::canHandleEvent(const Common::String &eventName) {
+bool ScScript::canHandleEvent(const Common::String &eventName) const {
return getEventPos(eventName) != 0;
}
//////////////////////////////////////////////////////////////////////////
-bool ScScript::canHandleMethod(const Common::String &methodName) {
+bool ScScript::canHandleMethod(const Common::String &methodName) const {
return getMethodPos(methodName) != 0;
}
@@ -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.h b/engines/wintermute/base/scriptables/script.h
index 0616bce58a..ee9f45e204 100644
--- a/engines/wintermute/base/scriptables/script.h
+++ b/engines/wintermute/base/scriptables/script.h
@@ -57,8 +57,8 @@ public:
bool _freezable;
bool resume();
bool pause();
- bool canHandleEvent(const Common::String &eventName);
- bool canHandleMethod(const Common::String &methodName);
+ bool canHandleEvent(const Common::String &eventName) const;
+ bool canHandleMethod(const Common::String &methodName) const;
bool createThread(ScScript *original, uint32 initIP, const Common::String &eventName);
bool createMethodThread(ScScript *original, const Common::String &methodName);
ScScript *invokeEventHandler(const Common::String &eventName, bool unbreakable = false);
@@ -78,8 +78,8 @@ public:
TScriptState _origState;
ScValue *getVar(char *name);
uint32 getFuncPos(const Common::String &name);
- uint32 getEventPos(const Common::String &name);
- uint32 getMethodPos(const Common::String &name);
+ uint32 getEventPos(const Common::String &name) const;
+ uint32 getMethodPos(const Common::String &name) const;
typedef struct {
uint32 magic;
uint32 version;
@@ -113,7 +113,7 @@ public:
char *dll_name;
TCallType call_type;
TExternalType returns;
- int nu_params;
+ int32 nu_params;
TExternalType *params;
} TExternalFunction;
@@ -124,7 +124,7 @@ public:
ScStack *_stack;
ScValue *_globals;
ScEngine *_engine;
- int _currentLine;
+ int32 _currentLine;
bool executeInstruction();
char *getString();
uint32 getDWORD();
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp
index 3d1863946e..f83fb36843 100644
--- a/engines/wintermute/base/scriptables/script_engine.cpp
+++ b/engines/wintermute/base/scriptables/script_engine.cpp
@@ -30,7 +30,6 @@
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/base/scriptables/script.h"
#include "engines/wintermute/base/scriptables/script_stack.h"
-#include "engines/wintermute/base/scriptables/script_ext_math.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_file_manager.h"
@@ -70,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;
@@ -106,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;
}
@@ -141,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
@@ -150,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);
@@ -192,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?
@@ -203,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);
@@ -218,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) {
@@ -227,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;
@@ -286,7 +285,7 @@ bool ScEngine::tick() {
_scripts[i]->run();
}
} else {
- if (_scripts[i]->_waitTime <= _gameRef->_timer) {
+ if (_scripts[i]->_waitTime <= _gameRef->getTimer()->getTime()) {
_scripts[i]->run();
}
}
@@ -297,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) {
@@ -305,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;
@@ -352,7 +351,7 @@ bool ScEngine::tick() {
addScriptTime(_scripts[i]->_filename, g_system->getMillis() - startTime);
}
}
- _currentScript = NULL;
+ _currentScript = nullptr;
}
removeFinishedScripts();
@@ -374,7 +373,7 @@ bool ScEngine::tickUnbreakable() {
_scripts[i]->executeInstruction();
}
_scripts[i]->finish();
- _currentScript = NULL;
+ _currentScript = nullptr;
}
removeFinishedScripts();
@@ -445,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;
@@ -485,9 +484,9 @@ bool ScEngine::persist(BasePersistenceManager *persistMgr) {
cleanup();
}
- persistMgr->transfer(TMEMBER(_gameRef));
- persistMgr->transfer(TMEMBER(_currentScript));
- persistMgr->transfer(TMEMBER(_globals));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_currentScript));
+ persistMgr->transferPtr(TMEMBER_PTR(_globals));
_scripts.persist(persistMgr);
return STATUS_OK;
@@ -497,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..a466d361ec 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;
}
@@ -215,7 +215,7 @@ bool SXArray::persist(BasePersistenceManager *persistMgr) {
BaseScriptable::persist(persistMgr);
persistMgr->transfer(TMEMBER(_length));
- persistMgr->transfer(TMEMBER(_values));
+ persistMgr->transferPtr(TMEMBER_PTR(_values));
return STATUS_OK;
}
diff --git a/engines/wintermute/base/scriptables/script_ext_array.h b/engines/wintermute/base/scriptables/script_ext_array.h
index 284c547a27..68f808641e 100644
--- a/engines/wintermute/base/scriptables/script_ext_array.h
+++ b/engines/wintermute/base/scriptables/script_ext_array.h
@@ -46,7 +46,7 @@ public:
bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
const char *scToString();
private:
- int _length;
+ int32 _length;
ScValue *_values;
Common::String _strRep;
};
diff --git a/engines/wintermute/base/scriptables/script_ext_date.cpp b/engines/wintermute/base/scriptables/script_ext_date.cpp
index 5aa069d0b2..afca0c4bbf 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;
}
@@ -237,12 +237,29 @@ bool SXDate::scSetProperty(const char *name, ScValue *value) {
bool SXDate::persist(BasePersistenceManager *persistMgr) {
BaseScriptable::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_tm.tm_year));
- persistMgr->transfer(TMEMBER(_tm.tm_mon));
- persistMgr->transfer(TMEMBER(_tm.tm_mday));
- persistMgr->transfer(TMEMBER(_tm.tm_hour));
- persistMgr->transfer(TMEMBER(_tm.tm_min));
- persistMgr->transfer(TMEMBER(_tm.tm_sec));
+ int32 year = _tm.tm_year;
+ int32 mon = _tm.tm_mon;
+ int32 mday = _tm.tm_mday;
+ int32 hour = _tm.tm_hour;
+ int32 min = _tm.tm_min;
+ int32 sec = _tm.tm_sec;
+ persistMgr->transfer(TMEMBER(year));
+ persistMgr->transfer(TMEMBER(mon));
+ persistMgr->transfer(TMEMBER(mday));
+ persistMgr->transfer(TMEMBER(hour));
+ persistMgr->transfer(TMEMBER(min));
+ persistMgr->transfer(TMEMBER(sec));
+ if (persistMgr->checkVersion(1, 2, 1)) {
+ int32 wday = _tm.tm_wday;
+ persistMgr->transfer(TMEMBER(wday));
+ _tm.tm_wday = wday;
+ }
+ _tm.tm_year = year;
+ _tm.tm_mon = mon;
+ _tm.tm_mday = mday;
+ _tm.tm_hour = hour;
+ _tm.tm_min = min;
+ _tm.tm_sec = sec;
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_file.h b/engines/wintermute/base/scriptables/script_ext_file.h
index f7c72fcfb3..fa2384109f 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.h
+++ b/engines/wintermute/base/scriptables/script_ext_file.h
@@ -49,7 +49,7 @@ public:
private:
Common::SeekableReadStream *_readFile;
Common::WriteStream *_writeFile;
- int _mode; // 0..none, 1..read, 2..write, 3..append
+ int32 _mode; // 0..none, 1..read, 2..write, 3..append
bool _textMode;
void close();
void cleanup();
diff --git a/engines/wintermute/base/scriptables/script_ext_math.cpp b/engines/wintermute/base/scriptables/script_ext_math.cpp
index d816fbec65..f4c6be2d6c 100644
--- a/engines/wintermute/base/scriptables/script_ext_math.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_math.cpp
@@ -31,7 +31,6 @@
#include "engines/wintermute/base/scriptables/script_value.h"
#include "engines/wintermute/persistent.h"
#include "common/math.h"
-#include <math.h>
namespace Wintermute {
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_mem_buffer.h b/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
index 1527a323dc..6700a03f50 100644
--- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
+++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.h
@@ -47,7 +47,7 @@ public:
virtual ~SXMemBuffer();
virtual void *scToMemBuffer();
private:
- int _size;
+ int32 _size;
bool resize(int newSize);
void *_buffer;
diff --git a/engines/wintermute/base/scriptables/script_ext_string.cpp b/engines/wintermute/base/scriptables/script_ext_string.cpp
index 5f7da1c2dd..7cb3b9360b 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);
}
@@ -269,7 +270,7 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
ScValue *val = stack->pop();
char separators[MAX_PATH_LENGTH] = ",";
if (!val->isNULL()) {
- strcpy(separators, val->getString());
+ Common::strlcpy(separators, val->getString(), MAX_PATH_LENGTH);
}
SXArray *array = new SXArray(_gameRef);
@@ -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_ext_string.h b/engines/wintermute/base/scriptables/script_ext_string.h
index 00bffab3a9..50b61deba4 100644
--- a/engines/wintermute/base/scriptables/script_ext_string.h
+++ b/engines/wintermute/base/scriptables/script_ext_string.h
@@ -50,7 +50,7 @@ public:
private:
char *_string;
- int _capacity;
+ int32 _capacity;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/scriptables/script_stack.cpp b/engines/wintermute/base/scriptables/script_stack.cpp
index 77367045c2..b53457c81b 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);
}
@@ -221,7 +184,7 @@ void ScStack::pushNative(BaseScriptable *val, bool persistent) {
//////////////////////////////////////////////////////////////////////////
bool ScStack::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_sP));
_values.persist(persistMgr);
diff --git a/engines/wintermute/base/scriptables/script_stack.h b/engines/wintermute/base/scriptables/script_stack.h
index 86d246cf34..82c3debefa 100644
--- a/engines/wintermute/base/scriptables/script_stack.h
+++ b/engines/wintermute/base/scriptables/script_stack.h
@@ -57,7 +57,7 @@ public:
ScStack(BaseGame *inGame);
virtual ~ScStack();
BaseArray<ScValue *> _values;
- int _sP;
+ int32 _sP;
};
diff --git a/engines/wintermute/base/scriptables/script_value.cpp b/engines/wintermute/base/scriptables/script_value.cpp
index 0bc7ab5807..5e2923e029 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,24 +64,24 @@ 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;
}
//////////////////////////////////////////////////////////////////////////
-ScValue::ScValue(BaseGame *inGame, int val) : BaseClass(inGame) {
+ScValue::ScValue(BaseGame *inGame, int32 val) : BaseClass(inGame) {
_type = VAL_INT;
_valInt = val;
_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;
}
}
@@ -789,7 +789,7 @@ void ScValue::setValue(ScValue *val) {
//////////////////////////////////////////////////////////////////////////
bool ScValue::persist(BasePersistenceManager *persistMgr) {
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_persistent));
persistMgr->transfer(TMEMBER(_isConstVar));
@@ -797,9 +797,9 @@ bool ScValue::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_valBool));
persistMgr->transfer(TMEMBER(_valFloat));
persistMgr->transfer(TMEMBER(_valInt));
- persistMgr->transfer(TMEMBER(_valNative));
+ persistMgr->transferPtr(TMEMBER_PTR(_valNative));
- int size;
+ int32 size;
const char *str;
if (persistMgr->getIsSaving()) {
size = _valObject.size();
@@ -808,26 +808,26 @@ bool ScValue::persist(BasePersistenceManager *persistMgr) {
while (_valIter != _valObject.end()) {
str = _valIter->_key.c_str();
persistMgr->transfer("", &str);
- persistMgr->transfer("", &_valIter->_value);
+ persistMgr->transferPtr("", &_valIter->_value);
_valIter++;
}
} else {
- ScValue *val;
+ ScValue *val = nullptr;
persistMgr->transfer("", &size);
for (int i = 0; i < size; i++) {
persistMgr->transfer("", &str);
- persistMgr->transfer("", &val);
+ persistMgr->transferPtr("", &val);
_valObject[str] = val;
delete[] str;
}
}
- persistMgr->transfer(TMEMBER(_valRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_valRef));
persistMgr->transfer(TMEMBER(_valString));
- /*
+ /* // TODO: Convert to Debug-statements.
FILE* f = fopen("c:\\val.log", "a+");
switch(_type)
{
@@ -951,7 +951,7 @@ int ScValue::compareStrict(ScValue *val1, ScValue *val2) {
}
//////////////////////////////////////////////////////////////////////////
-bool ScValue::setProperty(const char *propName, int value) {
+bool ScValue::setProperty(const char *propName, int32 value) {
ScValue *val = new ScValue(_gameRef, value);
bool ret = DID_SUCCEED(setProp(propName, val));
delete val;
diff --git a/engines/wintermute/base/scriptables/script_value.h b/engines/wintermute/base/scriptables/script_value.h
index bf7d9cd8a1..a8e815023e 100644
--- a/engines/wintermute/base/scriptables/script_value.h
+++ b/engines/wintermute/base/scriptables/script_value.h
@@ -87,21 +87,21 @@ public:
ScValue *_valRef;
private:
bool _valBool;
- int _valInt;
+ int32 _valInt;
double _valFloat;
char *_valString;
public:
TValType _type;
ScValue(BaseGame *inGame);
ScValue(BaseGame *inGame, bool Val);
- ScValue(BaseGame *inGame, int Val);
+ ScValue(BaseGame *inGame, int32 Val);
ScValue(BaseGame *inGame, double Val);
ScValue(BaseGame *inGame, const char *Val);
virtual ~ScValue();
Common::HashMap<Common::String, ScValue *> _valObject;
Common::HashMap<Common::String, ScValue *>::iterator _valIter;
- bool setProperty(const char *propName, int value);
+ bool setProperty(const char *propName, int32 value);
bool setProperty(const char *propName, const char *value);
bool setProperty(const char *propName, double value);
bool setProperty(const char *propName, bool value);
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp
index 00d07cd3c2..d027c03c8b 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
@@ -164,7 +164,7 @@ bool BaseSound::persist(BasePersistenceManager *persistMgr) {
_sFXParam1 = _sFXParam2 = _sFXParam3 = _sFXParam4 = 0;
}
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_soundFilename));
persistMgr->transfer(TMEMBER(_soundLooping));
diff --git a/engines/wintermute/base/sound/base_sound.h b/engines/wintermute/base/sound/base_sound.h
index 637061b7cc..3412e6c3a3 100644
--- a/engines/wintermute/base/sound/base_sound.h
+++ b/engines/wintermute/base/sound/base_sound.h
@@ -67,7 +67,7 @@ private:
Common::String _soundFilename;
bool _soundStreamed;
Audio::Mixer::SoundType _soundType;
- int _soundPrivateVolume;
+ int32 _soundPrivateVolume;
uint32 _soundLoopStart;
uint32 _soundPosition;
bool _soundPlaying;
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_buffer.h b/engines/wintermute/base/sound/base_sound_buffer.h
index 9c39f4c34b..e78d062cd4 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.h
+++ b/engines/wintermute/base/sound/base_sound_buffer.h
@@ -86,13 +86,13 @@ public:
Audio::Mixer::SoundType _type;
bool _looping;
- int _privateVolume;
+ int32 _privateVolume;
private:
uint32 _startPos;
Common::String _filename;
bool _streamed;
Common::SeekableReadStream *_file;
- int _volume;
+ int32 _volume;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index 441793144d..f3e7bfb408 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -30,7 +30,6 @@
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/utils/path_util.h"
#include "engines/wintermute/utils/string_util.h"
-#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/gfx/base_renderer.h"
#include "engines/wintermute/base/sound/base_sound_buffer.h"
@@ -50,6 +49,7 @@ namespace Wintermute {
BaseSoundMgr::BaseSoundMgr(BaseGame *inGame) : BaseClass(inGame) {
_soundAvailable = false;
_volumeMaster = 255;
+ _volumeMasterPercent = 100;
}
@@ -72,7 +72,7 @@ bool BaseSoundMgr::cleanup() {
//////////////////////////////////////////////////////////////////////////
void BaseSoundMgr::saveSettings() {
if (_soundAvailable) {
- ConfMan.setInt("master_volume", _volumeMaster);
+ ConfMan.setInt("master_volume_percent", _volumeMasterPercent);
}
}
@@ -83,7 +83,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 +93,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 +113,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
sound = new BaseSoundBuffer(_gameRef);
if (!sound) {
- return NULL;
+ return nullptr;
}
sound->setStreaming(streamed);
@@ -121,9 +122,9 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
bool res = sound->loadFromFile(useFilename);
if (DID_FAIL(res)) {
- _gameRef->LOG(res, "Error loading sound '%s'", useFilename.c_str());
+ BaseEngine::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 +135,7 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const Common::String &filename, Audio::M
return sound;
- return NULL;
+ return nullptr;
}
//////////////////////////////////////////////////////////////////////////
@@ -217,6 +218,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 +232,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;
}
//////////////////////////////////////////////////////////////////////////
@@ -272,7 +279,7 @@ bool BaseSoundMgr::resumeAll() {
//////////////////////////////////////////////////////////////////////////
float BaseSoundMgr::posToPan(int x, int y) {
- float relPos = (float)x / ((float)_gameRef->_renderer->_width);
+ float relPos = (float)x / ((float)BaseEngine::getRenderer()->getWidth());
float minPan = -0.7f;
float maxPan = 0.7f;
diff --git a/engines/wintermute/base/sound/base_sound_manager.h b/engines/wintermute/base/sound/base_sound_manager.h
index 36a729b5ae..602571765f 100644
--- a/engines/wintermute/base/sound/base_sound_manager.h
+++ b/engines/wintermute/base/sound/base_sound_manager.h
@@ -45,13 +45,11 @@ 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);
bool setVolume(Audio::Mixer::SoundType type, int volume);
- uint32 _volumeOriginal;
- int _volumeMaster;
+ int32 _volumeMaster;
bool removeSound(BaseSoundBuffer *sound);
BaseSoundBuffer *addSound(const Common::String &filename, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType, bool streamed = false);
bool addSound(BaseSoundBuffer *sound, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType);
@@ -61,6 +59,9 @@ public:
virtual ~BaseSoundMgr();
Common::Array<BaseSoundBuffer *> _sounds;
void saveSettings();
+private:
+ int32 _volumeMasterPercent; // Necessary to avoid round-offs.
+ bool setMasterVolume(byte percent);
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/base/timer.cpp b/engines/wintermute/base/timer.cpp
new file mode 100644
index 0000000000..5dfc117f48
--- /dev/null
+++ b/engines/wintermute/base/timer.cpp
@@ -0,0 +1,74 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#include "engines/wintermute/base/timer.h"
+#include "engines/wintermute/base/base_persistence_manager.h"
+#include "engines/wintermute/persistent.h"
+
+namespace Wintermute {
+Timer::Timer() : _timer(0), _timerDelta(0), _timerLast(0) {
+
+}
+
+void Timer::setTime(uint32 time) {
+ _timer = time;
+}
+
+void Timer::setTimeDelta(uint32 timeDelta) {
+ _timerDelta = timeDelta;
+}
+
+void Timer::setTimeLast(uint32 timeLast) {
+ _timerLast = timeLast;
+}
+
+void Timer::updateTime(uint32 delta, uint32 max) {
+ _timerDelta = _timer - _timerLast;
+ _timerLast = _timer;
+ _timer += MIN((uint32)max, delta);
+}
+
+uint32 Timer::getTime() const {
+ return _timer;
+}
+
+uint32 Timer::getTimeDelta() const {
+ return _timerDelta;
+}
+
+uint32 Timer::getTimeLast() const {
+ return _timerLast;
+}
+
+void Timer::persist(BasePersistenceManager *persistMgr) {
+ persistMgr->transfer(TMEMBER(_timer));
+ persistMgr->transfer(TMEMBER(_timerDelta));
+ persistMgr->transfer(TMEMBER(_timerLast));
+}
+
+} // End of namespace Wintermute
diff --git a/engines/wintermute/base/timer.h b/engines/wintermute/base/timer.h
new file mode 100644
index 0000000000..ec5477ba2e
--- /dev/null
+++ b/engines/wintermute/base/timer.h
@@ -0,0 +1,57 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+/*
+ * This file is based on WME Lite.
+ * http://dead-code.org/redir.php?target=wmelite
+ * Copyright (c) 2011 Jan Nedoma
+ */
+
+#ifndef WINTERMUTE_TIMER_H
+#define WINTERMUTE_TIMER_H
+
+#include "common/scummsys.h"
+
+namespace Wintermute {
+
+class BasePersistenceManager;
+
+class Timer {
+ uint32 _timer;
+ uint32 _timerDelta;
+ uint32 _timerLast;
+public:
+ Timer();
+ void setTime(uint32 time);
+ void setTimeDelta(uint32 timeDelta);
+ void setTimeLast(uint32 timeLast);
+ void updateTime(uint32 delta, uint32 max);
+ uint32 getTime() const;
+ uint32 getTimeDelta() const;
+ uint32 getTimeLast() const;
+ void persist(BasePersistenceManager *persistMgr);
+};
+
+
+} // End of namespace Wintermute
+
+#endif
diff --git a/engines/wintermute/coll_templ.h b/engines/wintermute/coll_templ.h
index 493ea07015..4a8e92c121 100644
--- a/engines/wintermute/coll_templ.h
+++ b/engines/wintermute/coll_templ.h
@@ -36,48 +36,105 @@ namespace Wintermute {
// Basically Common::Array with peristence-support.
template<typename TYPE>
-class BaseArray : public Common::Array<TYPE> {
+class BaseArrayBase : public Common::Array<TYPE> {
public:
// TODO: Might want to make sure that destructors are called when replacing/deleting/getting destructed
+ int add(TYPE newElement) {
+ Common::Array<TYPE>::push_back(newElement);
+ return Common::Array<TYPE>::size() - 1;
+ }
+ void remove_at(uint32 idx) {
+ Common::Array<TYPE>::remove_at(idx);
+ }
+ void remove_at(uint32 idx, uint32 num) {
+ while (num) {
+ if (idx >= Common::Array<TYPE>::size()) {
+ break;
+ }
+ Common::Array<TYPE>::remove_at(idx);
+ }
+ }
+ template<typename T2>
+ void copy(const BaseArrayBase<T2> &src) {
+ Common::Array<TYPE>::insert_at(0, src);
+ }
+};
+
+template <typename TYPE>
+class BaseArray : public BaseArrayBase<TYPE> {
+ public:
bool persist(BasePersistenceManager *persistMgr) {
- int j;
+ int32 j;
if (persistMgr->getIsSaving()) {
j = Common::Array<TYPE>::size();
persistMgr->transfer("ArraySize", &j);
typename Common::Array<TYPE>::const_iterator it = Common::Array<TYPE>::begin();
for (; it != Common::Array<TYPE>::end(); ++it) {
TYPE obj = *it;
- persistMgr->transfer("", &obj);
+ persistMgr->transferPtr("", &obj);
}
} else {
Common::Array<TYPE>::clear();
persistMgr->transfer("ArraySize", &j);
for (int i = 0; i < j; i++) {
- TYPE obj;
+ TYPE obj = nullptr;
+ persistMgr->transferPtr("", &obj);
+ this->add(obj);
+ }
+ }
+ return true;
+ }
+};
+
+template <>
+class BaseArray<char *> : public BaseArrayBase<char *> {
+ public:
+ bool persist(BasePersistenceManager *persistMgr) {
+ int32 j;
+ if (persistMgr->getIsSaving()) {
+ j = Common::Array<char *>::size();
+ persistMgr->transfer("ArraySize", &j);
+ Common::Array<char *>::const_iterator it = Common::Array<char *>::begin();
+ for (; it != Common::Array<char *>::end(); ++it) {
+ char * obj = *it;
+ persistMgr->transfer("", &obj);
+ }
+ } else {
+ Common::Array<char *>::clear();
+ persistMgr->transfer("ArraySize", &j);
+ for (int i = 0; i < j; i++) {
+ char * obj = nullptr;
persistMgr->transfer("", &obj);
add(obj);
}
}
return true;
}
- int add(TYPE newElement) {
- Common::Array<TYPE>::push_back(newElement);
- return Common::Array<TYPE>::size() - 1;
- }
- void remove_at(uint32 idx) {
- Common::Array<TYPE>::remove_at(idx);
- }
- void remove_at(uint32 idx, uint32 num) {
- while (num) {
- if (idx >= Common::Array<TYPE>::size()) {
- break;
+};
+
+template <>
+class BaseArray<const char *> : public BaseArrayBase<const char *> {
+public:
+ bool persist(BasePersistenceManager *persistMgr) {
+ int32 j;
+ if (persistMgr->getIsSaving()) {
+ j = Common::Array<const char *>::size();
+ persistMgr->transfer("ArraySize", &j);
+ Common::Array<const char *>::const_iterator it = Common::Array<const char *>::begin();
+ for (; it != Common::Array<const char *>::end(); ++it) {
+ const char * obj = *it;
+ persistMgr->transfer("", &obj);
+ }
+ } else {
+ Common::Array<const char *>::clear();
+ persistMgr->transfer("ArraySize", &j);
+ for (int i = 0; i < j; i++) {
+ const char * obj = nullptr;
+ persistMgr->transfer("", &obj);
+ add(obj);
}
- Common::Array<TYPE>::remove_at(idx);
}
- }
- template<typename T2>
- void copy(const BaseArray<T2> &src) {
- Common::Array<TYPE>::insert_at(0, src);
+ return true;
}
};
diff --git a/engines/wintermute/dcgf.h b/engines/wintermute/dcgf.h
index fc4174094b..fe92194443 100644
--- a/engines/wintermute/dcgf.h
+++ b/engines/wintermute/dcgf.h
@@ -32,12 +32,12 @@
//////////////////////////////////////////////////////////////////////////
#define DCGF_VER_MAJOR 1
-#define DCGF_VER_MINOR 1
+#define DCGF_VER_MINOR 2
#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..92b8e6251f
--- /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->setShowFPS(true);
+ } else if (Common::String(argv[1]) == "false") {
+ _engineRef->_game->setShowFPS(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 4f8a962591..09426c9307 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -22,22 +22,35 @@
namespace Wintermute {
+#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
+
static const PlainGameDescriptor wintermuteGames[] = {
{"5ld", "Five Lethal Demons"},
{"5ma", "Five Magical Amulets"},
+ {"bthreshold", "Beyond the Threshold"},
{"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"},
+ {"dreaming", "Des Reves Elastiques Avec Mille Insectes Nommes Georges"},
{"dirtysplit", "Dirty Split"},
- {"eastside", "East Side Story"},
+ {"dreamscape", "Dreamscape"},
{"ghostsheet", "Ghost in the Sheet"},
{"hamlet", "Hamlet or the last game without MMORPS features, shaders and product placement"},
+ {"jamesperis", "James Peris: No License Nor Control"},
{"julia", "J.U.L.I.A."},
{"mirage", "Mirage"},
{"pigeons", "Pigeons in the Park"},
- {"reversion", "Reversion"},
+ {"reversion1", "Reversion: The Escape"},
+ {"reversion2", "Reversion: The Meeting"},
{"rosemary", "Rosemary"},
{"thebox", "The Box"},
+ {"tradestory", "The Trader of Stories"},
{"twc", "the white chamber"},
{"wintermute", "Wintermute engine game"},
{0, 0}
@@ -74,6 +87,88 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // Beyond the Threshold
+ {
+ "bthreshold",
+ "",
+ AD_ENTRY1s("data.dcp", "d49bf9ccb2e74507447c82d6ad3e2bc4", 12773712),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ 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",
@@ -81,7 +176,17 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("data.dcp", "ebd0915d9a12df5224be22f53bb23eb6", 7278306),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_UNSTABLE,
+ ADGF_TESTING,
+ GUIO0()
+ },
+ // Chivalry is Not Dead (Version from deirdrakai.com)
+ {
+ "chivalry",
+ "",
+ AD_ENTRY1s("data.dcp", "ae6d91b9517f4d2851a8ad94c96951c8", 7278302),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_TESTING,
GUIO0()
},
// Dead City (English)
@@ -146,15 +251,24 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
- // East Side Story (Demo)
+ // Des Reves Elastiques Avec Mille Insectes Nommes Georges
{
- "eastside",
- "Demo",
- AD_ENTRY1s("data.dcp", "b3f8b09bb4b05ee3e9d14697525257f9", 59296246),
+ "dreaming",
+ "",
+ AD_ENTRY1s("data.dcp", "4af26d97ea063fc1277ce30ae431de90", 8804073),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_UNSTABLE |
- ADGF_DEMO,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Dreamscape
+ {
+ "dreamscape",
+ "",
+ AD_ENTRY1s("data.dcp", "7a5752ed4446c862be9f02d7932acf54", 17034377),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
GUIO0()
},
// Ghosts in the Sheet
@@ -178,6 +292,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // James Peris: No License Nor Control
+ {
+ "jamesperis",
+ "Demo",
+ AD_ENTRY1s("data.dcp", "edb9f9c7a08993c1e28f4e477b5f9830", 116113507),
+ Common::UNK_LANG, // No solution in place to select language
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// J.U.L.I.A. (English)
{
"julia",
@@ -199,6 +324,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_DEMO,
GUIO0()
},
+ // J.U.L.I.A. (English) (Greenlight Demo)
+ {
+ "julia",
+ "Greenlight Demo",
+ AD_ENTRY1s("data.dcp", "4befd448d36b0dae9c3ab1aa7cb8b78d", 7271886),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// Mirage
{
"mirage",
@@ -219,16 +355,222 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
- // Reversion
+ // Reversion: The Escape Version 1.0
{
- "reversion",
- "",
+ "reversion1",
+ "Version 1.0",
AD_ENTRY1s("data.dcp", "cd616f98ebfd047e0c540b50b4b70761", 254384531),
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_UNSTABLE,
GUIO0()
},
+ // Reversion: The Escape Version 1.1 (Chinese)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"chinese.dcp", 0, "cf97150739499a4c15f51dc534ff85a1", 6330561},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::ZH_CNA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.1 (English)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"english.dcp", 0, "7b2f061d7c91365c5d04605f1de032b3", 5702699},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.1 (French)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"french.dcp", 0, "214204b6022c5ed67fada44557690faf", 6327400},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.1 (German)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"german.dcp", 0, "96677823b36d580a4a29e3659071071c", 6340699},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.1 (Italian)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"italian.dcp", 0, "9ce80c1835108f10170a02969f71efe1", 6301836},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.1 (Portuguese)
+ {
+ "reversion1",
+ "Version 1.1",
+ {
+ {"portugues.dcp", 0, "8772501afa2c630a7c697eb99e9c7bda", 5053303},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::PT_BRA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (Chinese)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_nz.dcp", 0, "92c4065156e464211685bf799b3279fd", 5130600},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::ZH_CNA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (English)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_en.dcp", 0, "05845e1283920a6e4044f2a54f7a9519", 4818543},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (French)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_fr.dcp", 0, "441795490e9307eb2ed07830779881ac", 5425959},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (German)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_de.dcp", 0, "b588041015b93e54b4c246ca77d01e76", 5423798},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::DE_DEU,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (Italian)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_it.dcp", 0, "a1f4199079b75ee10cded41f05b45d5f", 5386424},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::IT_ITA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Escape Version 1.3 (Portuguese)
+ {
+ "reversion1",
+ "Version 1.3",
+ {
+ {"xlanguage_pt.dcp", 0, "3d653debd37e56756a79401e1004c4d2", 4149165},
+ {"data.dcp", 0, "9ebb12f6fd7c038d079f81beb3bd96d5", 254185907},
+ AD_LISTEND
+ },
+ Common::PT_BRA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Meeting (Chinese)
+ {
+ "reversion2",
+ "",
+ {
+ {"xlanguage_nz.dcp", 0, "8c3709474a87a7876109025dff41ff3f", 8746015},
+ {"data.dcp", 0, "cb9865dc7e1db2990a8cf4bc13cf4999", 257643032},
+ AD_LISTEND
+ },
+ Common::ZH_CNA,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Meeting (English)
+ {
+ "reversion2",
+ "",
+ {
+ {"xlanguage_en.dcp", 0, "ca357d86618d1ab76a21c913f4403cbd", 8414976},
+ {"data.dcp", 0, "f7938cbfdc48f07934550245a3286921", 255672016},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
+ // Reversion: The Meeting (Spanish)
+ {
+ "reversion2",
+ "",
+ AD_ENTRY1s("data.dcp", "f7938cbfdc48f07934550245a3286921", 255672016),
+ Common::ES_ESP,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ GUIO0()
+ },
// Rosemary
{
"rosemary",
@@ -249,6 +591,17 @@ static const ADGameDescription gameDescriptions[] = {
ADGF_UNSTABLE,
GUIO0()
},
+ // The Trader of Stories
+ {
+ "tradestory",
+ "Demo",
+ AD_ENTRY1s("data.dcp", "0a0b51191636cc8ead89b905281c3218", 40401902),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_UNSTABLE |
+ ADGF_DEMO,
+ GUIO0()
+ },
// the white chamber (multi-language)
{
"twc",
@@ -263,3 +616,4 @@ static const ADGameDescription gameDescriptions[] = {
};
} // End of namespace Wintermute
+
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 9319899495..dcdcbf247e 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) {}
@@ -218,9 +218,9 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
height = height * 2 / 3;
#endif
- Graphics::Surface *img;
- Graphics::Surface *imgScaled = NULL;
- byte *savedPixels = NULL;
+ Graphics::Surface *img = nullptr;
+ Graphics::Surface *imgScaled = nullptr;
+ byte *savedPixels = nullptr;
if ((width != srcImage.w) || (height != srcImage.h)) {
// Scale the image
img = imgScaled = srcImage.scale(width, height);
@@ -371,14 +371,15 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
}
}
+ retSize.setWidth(img->w);
+ retSize.setHeight(img->h);
+
if (imgScaled) {
imgScaled->pixels = savedPixels;
imgScaled->free();
delete imgScaled;
}
- retSize.setWidth(img->w);
- retSize.setHeight(img->h);
return retSize;
}
@@ -394,6 +395,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/math/math_util.cpp b/engines/wintermute/math/math_util.cpp
index 31af77538a..0aa0f841ac 100644
--- a/engines/wintermute/math/math_util.cpp
+++ b/engines/wintermute/math/math_util.cpp
@@ -27,7 +27,7 @@
*/
#include "engines/wintermute/math/math_util.h"
-#include <math.h>
+#include "common/scummsys.h"
namespace Wintermute {
diff --git a/engines/wintermute/math/matrix4.cpp b/engines/wintermute/math/matrix4.cpp
index ca1eae8813..a50514457e 100644
--- a/engines/wintermute/math/matrix4.cpp
+++ b/engines/wintermute/math/matrix4.cpp
@@ -28,7 +28,7 @@
#include "engines/wintermute/math/matrix4.h"
#include "engines/wintermute/math/vector2.h"
-#include <math.h>
+#include "common/scummsys.h"
namespace Wintermute {
diff --git a/engines/wintermute/math/vector2.cpp b/engines/wintermute/math/vector2.cpp
index 74c5586d62..98dca70b44 100644
--- a/engines/wintermute/math/vector2.cpp
+++ b/engines/wintermute/math/vector2.cpp
@@ -27,7 +27,7 @@
*/
#include "engines/wintermute/math/vector2.h"
-#include <math.h>
+#include "common/scummsys.h"
namespace Wintermute {
diff --git a/engines/wintermute/module.mk b/engines/wintermute/module.mk
index 7b5b1b1a3a..32931bf05f 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 \
@@ -53,6 +52,7 @@ MODULE_OBJS := \
base/gfx/base_surface.o \
base/gfx/osystem/base_surface_osystem.o \
base/gfx/osystem/base_render_osystem.o \
+ base/gfx/osystem/render_ticket.o \
base/particles/part_particle.o \
base/particles/part_emitter.o \
base/particles/part_force.o \
@@ -67,6 +67,8 @@ MODULE_OBJS := \
base/base_file_manager.o \
base/base_frame.o \
base/base_game.o \
+ base/base_game_music.o \
+ base/base_game_settings.o \
base/base_keyboard_state.o \
base/base_named_object.o \
base/base_object.o \
@@ -75,7 +77,6 @@ MODULE_OBJS := \
base/base_point.o \
base/base_quick_msg.o \
base/base_region.o \
- base/base_save_thumb_helper.o \
base/base_scriptable.o \
base/base_script_holder.o \
base/base_sprite.o \
@@ -85,6 +86,8 @@ MODULE_OBJS := \
base/base_transition_manager.o \
base/base_viewport.o \
base/saveload.o \
+ base/save_thumb_helper.o \
+ base/timer.o \
detection.o \
graphics/transparent_surface.o \
math/math_util.o \
@@ -108,6 +111,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..1464ae0fd6 100644
--- a/engines/wintermute/persistent.h
+++ b/engines/wintermute/persistent.h
@@ -36,53 +36,54 @@ 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_PTR(memberName) #memberName, &memberName
+#define TMEMBER_INT(memberName) #memberName, (int32*)&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..8a6aae754f 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();
}
@@ -234,7 +234,7 @@ bool SystemClassRegistry::loadTable(BaseGame *gameRef, BasePersistenceManager *p
uint32 numClasses = persistMgr->getDWORD();
for (uint32 i = 0; i < numClasses; i++) {
- gameRef->_renderer->setIndicatorVal((int)(50.0f / (float)((float)numClasses / (float)i)));
+ gameRef->_renderer->setIndicatorVal((int)(50.0f / (float)((float)numClasses / (float)(i + 1))));
Common::String className = persistMgr->getStringObj();
NameMap::iterator mapIt = _nameMap.find(className);
@@ -286,7 +286,7 @@ bool SystemClassRegistry::loadInstances(BaseGame *gameRef, BasePersistenceManage
for (int i = 0; i < numInstances; i++) {
if (i % 20 == 0) {
- gameRef->_renderer->setIndicatorVal((int)(50.0f + 50.0f / (float)((float)numInstances / (float)i)));
+ gameRef->_renderer->setIndicatorVal((int)(50.0f + 50.0f / (float)((float)numInstances / (float)(i + 1))));
}
checkHeader("<INSTANCE_HEAD>", persistMgr);
diff --git a/engines/wintermute/ui/ui_button.cpp b/engines/wintermute/ui/ui_button.cpp
index 7967d566f9..9db1f4f4b4 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;
@@ -382,7 +382,7 @@ bool UIButton::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TEXT:
setText((char *)params);
- _gameRef->_stringTable->expand(&_text);
+ _gameRef->expandStringByStringTable(&_text);
break;
case TOKEN_TEXT_ALIGN:
@@ -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);
@@ -1179,21 +1179,21 @@ bool UIButton::persist(BasePersistenceManager *persistMgr) {
UIObject::persist(persistMgr);
persistMgr->transfer(TMEMBER_INT(_align));
- persistMgr->transfer(TMEMBER(_backDisable));
- persistMgr->transfer(TMEMBER(_backFocus));
- persistMgr->transfer(TMEMBER(_backHover));
- persistMgr->transfer(TMEMBER(_backPress));
+ persistMgr->transferPtr(TMEMBER_PTR(_backDisable));
+ persistMgr->transferPtr(TMEMBER_PTR(_backFocus));
+ persistMgr->transferPtr(TMEMBER_PTR(_backHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_backPress));
persistMgr->transfer(TMEMBER(_centerImage));
- persistMgr->transfer(TMEMBER(_fontDisable));
- persistMgr->transfer(TMEMBER(_fontFocus));
- persistMgr->transfer(TMEMBER(_fontHover));
- persistMgr->transfer(TMEMBER(_fontPress));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontDisable));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontFocus));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontPress));
persistMgr->transfer(TMEMBER(_hover));
- persistMgr->transfer(TMEMBER(_image));
- persistMgr->transfer(TMEMBER(_imageDisable));
- persistMgr->transfer(TMEMBER(_imageFocus));
- persistMgr->transfer(TMEMBER(_imageHover));
- persistMgr->transfer(TMEMBER(_imagePress));
+ persistMgr->transferPtr(TMEMBER_PTR(_image));
+ persistMgr->transferPtr(TMEMBER_PTR(_imageDisable));
+ persistMgr->transferPtr(TMEMBER_PTR(_imageFocus));
+ persistMgr->transferPtr(TMEMBER_PTR(_imageHover));
+ persistMgr->transferPtr(TMEMBER_PTR(_imagePress));
persistMgr->transfer(TMEMBER(_pixelPerfect));
persistMgr->transfer(TMEMBER(_press));
persistMgr->transfer(TMEMBER(_stayPressed));
diff --git a/engines/wintermute/ui/ui_button.h b/engines/wintermute/ui/ui_button.h
index 93333a2534..5db9356ef9 100644
--- a/engines/wintermute/ui/ui_button.h
+++ b/engines/wintermute/ui/ui_button.h
@@ -62,17 +62,17 @@ 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);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ui/ui_edit.cpp b/engines/wintermute/ui/ui_edit.cpp
index a3283d5a01..91ca7326cb 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;
@@ -231,7 +231,7 @@ bool UIEdit::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TEXT:
setText((char *)params);
- _gameRef->_stringTable->expand(&_text);
+ _gameRef->expandStringByStringTable(&_text);
break;
case TOKEN_X:
@@ -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 {
@@ -481,7 +481,7 @@ bool UIEdit::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SelStart") == 0) {
_selStart = value->getInt();
- _selStart = MAX(_selStart, 0);
+ _selStart = MAX<int32>(_selStart, 0);
_selStart = (int)MIN((size_t)_selStart, strlen(_text));
return STATUS_OK;
}
@@ -491,7 +491,7 @@ bool UIEdit::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelEnd") == 0) {
_selEnd = value->getInt();
- _selEnd = MAX(_selEnd, 0);
+ _selEnd = MAX<int32>(_selEnd, 0);
_selEnd = (int)MIN((size_t)_selEnd, strlen(_text));
return STATUS_OK;
}
@@ -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) {
@@ -600,8 +600,8 @@ bool UIEdit::display(int offsetX, int offsetY) {
bool focused = isFocused();
- _selStart = MAX(_selStart, 0);
- _selEnd = MAX(_selEnd, 0);
+ _selStart = MAX<int32>(_selStart, 0);
+ _selEnd = MAX<int32>(_selEnd, 0);
_selStart = (int)MIN((size_t)_selStart, strlen(_text));
_selEnd = (int)MIN((size_t)_selEnd, strlen(_text));
@@ -609,11 +609,11 @@ bool UIEdit::display(int offsetX, int offsetY) {
//int CursorWidth = font->GetCharWidth(_cursorChar[0]);
int cursorWidth = font->getTextWidth((byte *)_cursorChar);
- int s1, s2;
+ int32 s1, s2;
bool curFirst;
// modify scroll offset
if (_selStart >= _selEnd) {
- while (font->getTextWidth((byte *)_text + _scrollOffset, MAX(0, _selEnd - _scrollOffset)) > _width - cursorWidth - 2 * _frameWidth) {
+ while (font->getTextWidth((byte *)_text + _scrollOffset, MAX<int32>(0, _selEnd - _scrollOffset)) > _width - cursorWidth - 2 * _frameWidth) {
_scrollOffset++;
if (_scrollOffset >= (int)strlen(_text)) {
break;
@@ -626,8 +626,8 @@ bool UIEdit::display(int offsetX, int offsetY) {
s2 = _selStart;
curFirst = true;
} else {
- while (font->getTextWidth((byte *)_text + _scrollOffset, MAX(0, _selStart - _scrollOffset)) +
- sfont->getTextWidth((byte *)(_text + MAX(_scrollOffset, _selStart)), _selEnd - MAX(_scrollOffset, _selStart))
+ while (font->getTextWidth((byte *)_text + _scrollOffset, MAX<int32>(0, _selStart - _scrollOffset)) +
+ sfont->getTextWidth((byte *)(_text + MAX<int32>(_scrollOffset, _selStart)), _selEnd - MAX(_scrollOffset, _selStart))
> _width - cursorWidth - 2 * _frameWidth) {
_scrollOffset++;
@@ -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;
@@ -766,7 +766,7 @@ bool UIEdit::handleKeypress(Common::Event *event, bool printable) {
deleteChars(_selStart, _selEnd);
}
if (_selEnd >= _selStart) {
- _selEnd -= MAX(1, _selEnd - _selStart);
+ _selEnd -= MAX<int32>(1, _selEnd - _selStart);
}
_selStart = _selEnd;
@@ -934,7 +934,7 @@ bool UIEdit::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_cursorBlinkRate));
persistMgr->transfer(TMEMBER(_cursorChar));
- persistMgr->transfer(TMEMBER(_fontSelected));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontSelected));
persistMgr->transfer(TMEMBER(_frameWidth));
persistMgr->transfer(TMEMBER(_maxLength));
persistMgr->transfer(TMEMBER(_scrollOffset));
diff --git a/engines/wintermute/ui/ui_edit.h b/engines/wintermute/ui/ui_edit.h
index 5bb31422b6..ac626f0f06 100644
--- a/engines/wintermute/ui/ui_edit.h
+++ b/engines/wintermute/ui/ui_edit.h
@@ -38,20 +38,20 @@ class BaseFont;
class UIEdit : public UIObject {
public:
DECLARE_PERSISTENT(UIEdit, UIObject)
- int _maxLength;
+ int32 _maxLength;
int insertChars(int pos, const byte *chars, int num);
int deleteChars(int start, int end);
bool _cursorVisible;
uint32 _lastBlinkTime;
virtual bool display(int offsetX, int offsetY);
virtual bool handleKeypress(Common::Event *event, bool printable = false);
- int _scrollOffset;
- int _frameWidth;
+ int32 _scrollOffset;
+ int32 _frameWidth;
uint32 _cursorBlinkRate;
void setCursorChar(const char *character);
char *_cursorChar;
- int _selEnd;
- int _selStart;
+ int32 _selEnd;
+ int32 _selStart;
BaseFont *_fontSelected;
UIEdit(BaseGame *inGame);
virtual ~UIEdit();
@@ -61,10 +61,10 @@ public:
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ui/ui_entity.cpp b/engines/wintermute/ui/ui_entity.cpp
index 1cb4e0926b..1872400cdd 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;
@@ -359,7 +359,7 @@ bool UIEntity::persist(BasePersistenceManager *persistMgr) {
UIObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_entity));
+ persistMgr->transferPtr(TMEMBER_PTR(_entity));
return STATUS_OK;
}
diff --git a/engines/wintermute/ui/ui_entity.h b/engines/wintermute/ui/ui_entity.h
index b5f4450071..3bd3ec9888 100644
--- a/engines/wintermute/ui/ui_entity.h
+++ b/engines/wintermute/ui/ui_entity.h
@@ -40,16 +40,16 @@ public:
virtual ~UIEntity();
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
- virtual bool display() { return display(0, 0); }
- virtual bool display(int offsetX, int offsetY);
+ virtual bool display() override { return display(0, 0); }
+ virtual bool display(int offsetX, int offsetY) override;
AdEntity *_entity;
bool setEntity(const char *filename);
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
};
diff --git a/engines/wintermute/ui/ui_object.cpp b/engines/wintermute/ui/ui_object.cpp
index 8e5bae993c..07efc5e4cb 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);
@@ -621,17 +621,17 @@ bool UIObject::persist(BasePersistenceManager *persistMgr) {
BaseObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_back));
+ persistMgr->transferPtr(TMEMBER_PTR(_back));
persistMgr->transfer(TMEMBER(_canFocus));
persistMgr->transfer(TMEMBER(_disable));
- persistMgr->transfer(TMEMBER(_focusedWidget));
- persistMgr->transfer(TMEMBER(_font));
+ persistMgr->transferPtr(TMEMBER_PTR(_focusedWidget));
+ persistMgr->transferPtr(TMEMBER_PTR(_font));
persistMgr->transfer(TMEMBER(_height));
- persistMgr->transfer(TMEMBER(_image));
- persistMgr->transfer(TMEMBER(_listenerObject));
- persistMgr->transfer(TMEMBER(_listenerParamObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_image));
+ persistMgr->transferPtr(TMEMBER_PTR(_listenerObject));
+ persistMgr->transferPtr(TMEMBER_PTR(_listenerParamObject));
persistMgr->transfer(TMEMBER(_listenerParamDWORD));
- persistMgr->transfer(TMEMBER(_parent));
+ persistMgr->transferPtr(TMEMBER_PTR(_parent));
persistMgr->transfer(TMEMBER(_parentNotify));
persistMgr->transfer(TMEMBER(_sharedFonts));
persistMgr->transfer(TMEMBER(_sharedImages));
diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h
index ec2ea33de1..935c27613c 100644
--- a/engines/wintermute/ui/ui_object.h
+++ b/engines/wintermute/ui/ui_object.h
@@ -48,7 +48,7 @@ public:
bool _parentNotify;
DECLARE_PERSISTENT(UIObject, BaseObject)
UIObject *_parent;
- virtual bool display() { return display(0, 0); }
+ virtual bool display() override { return display(0, 0); }
virtual bool display(int offsetX) { return display(offsetX, 0); }
virtual bool display(int offsetX, int offsetY);
virtual void correctSize();
@@ -60,10 +60,10 @@ public:
bool _visible;
UITiledImage *_back;
bool _disable;
- UIObject(BaseGame *inGame = NULL);
+ UIObject(BaseGame *inGame = nullptr);
virtual ~UIObject();
- int _width;
- int _height;
+ int32 _width;
+ int32 _height;
TUIObjectType _type;
BaseSprite *_image;
void setListener(BaseScriptHolder *object, BaseScriptHolder *listenerObject, uint32 listenerParam);
@@ -71,13 +71,13 @@ public:
uint32 _listenerParamDWORD;
BaseScriptHolder *_listenerObject;
UIObject *_focusedWidget;
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ui/ui_text.cpp b/engines/wintermute/ui/ui_text.cpp
index 2c10f176c7..98d70b770e 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;
@@ -230,7 +230,7 @@ bool UIText::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TEXT:
setText((char *)params);
- _gameRef->_stringTable->expand(&_text);
+ _gameRef->expandStringByStringTable(&_text);
break;
case TOKEN_TEXT_ALIGN:
@@ -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..be074755ba 100644
--- a/engines/wintermute/ui/ui_text.h
+++ b/engines/wintermute/ui/ui_text.h
@@ -40,19 +40,19 @@ 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;
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
- virtual const char *scToString();
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
+ virtual const char *scToString() override;
};
} // end of namespace Wintermute
diff --git a/engines/wintermute/ui/ui_tiled_image.cpp b/engines/wintermute/ui/ui_tiled_image.cpp
index 2b337330c7..abccdd6c39 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;
@@ -361,7 +358,7 @@ bool UITiledImage::saveAsText(BaseDynamicBuffer *buffer, int indent) {
}
//////////////////////////////////////////////////////////////////////////
-void UITiledImage::correctSize(int *width, int *height) {
+void UITiledImage::correctSize(int32 *width, int32 *height) {
int tileWidth = _middleMiddle.right - _middleMiddle.left;
int tileHeight = _middleMiddle.bottom - _middleMiddle.top;
@@ -380,7 +377,7 @@ bool UITiledImage::persist(BasePersistenceManager *persistMgr) {
persistMgr->transfer(TMEMBER(_downLeft));
persistMgr->transfer(TMEMBER(_downMiddle));
persistMgr->transfer(TMEMBER(_downRight));
- persistMgr->transfer(TMEMBER(_image));
+ persistMgr->transferPtr(TMEMBER_PTR(_image));
persistMgr->transfer(TMEMBER(_middleLeft));
persistMgr->transfer(TMEMBER(_middleMiddle));
persistMgr->transfer(TMEMBER(_middleRight));
diff --git a/engines/wintermute/ui/ui_tiled_image.h b/engines/wintermute/ui/ui_tiled_image.h
index c413e7f129..a6cd22d53d 100644
--- a/engines/wintermute/ui/ui_tiled_image.h
+++ b/engines/wintermute/ui/ui_tiled_image.h
@@ -38,14 +38,15 @@ class BaseSubFrame;
class UITiledImage : public BaseObject {
public:
DECLARE_PERSISTENT(UITiledImage, BaseObject)
- void correctSize(int *width, int *height);
+ void correctSize(int32 *width, int32 *height);
bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
bool display(int x, int y, int width, int height);
- UITiledImage(BaseGame *inGame = NULL);
+ UITiledImage(BaseGame *inGame = nullptr);
virtual ~UITiledImage();
+private:
BaseSubFrame *_image;
Rect32 _upLeft;
Rect32 _upMiddle;
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp
index 9606486efb..2ce9f68605 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) {
@@ -127,8 +127,8 @@ bool UIWindow::display(int offsetX, int offsetY) {
}
if (_shieldWindow) {
_shieldWindow->_posX = _shieldWindow->_posY = 0;
- _shieldWindow->_width = _gameRef->_renderer->_width;
- _shieldWindow->_height = _gameRef->_renderer->_height;
+ _shieldWindow->_width = _gameRef->_renderer->getWidth();
+ _shieldWindow->_height = _gameRef->_renderer->getHeight();
_shieldWindow->display();
}
@@ -141,8 +141,8 @@ bool UIWindow::display(int offsetX, int offsetY) {
}
if (_shieldButton) {
_shieldButton->_posX = _shieldButton->_posY = 0;
- _shieldButton->_width = _gameRef->_renderer->_width;
- _shieldButton->_height = _gameRef->_renderer->_height;
+ _shieldButton->_width = _gameRef->_renderer->getWidth();
+ _shieldButton->_height = _gameRef->_renderer->getHeight();
_shieldButton->display();
}
@@ -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;
@@ -431,7 +431,7 @@ bool UIWindow::loadBuffer(byte *buffer, bool complete) {
case TOKEN_TITLE:
setText((char *)params);
- _gameRef->_stringTable->expand(&_text);
+ _gameRef->expandStringByStringTable(&_text);
break;
case TOKEN_TITLE_ALIGN:
@@ -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);
@@ -885,8 +885,8 @@ bool UIWindow::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Center") == 0) {
stack->correctParams(0);
- _posX = (_gameRef->_renderer->_width - _width) / 2;
- _posY = (_gameRef->_renderer->_height - _height) / 2;
+ _posX = (_gameRef->_renderer->getWidth() - _width) / 2;
+ _posY = (_gameRef->_renderer->getHeight() - _height) / 2;
stack->pushNULL();
return STATUS_OK;
}
@@ -1257,24 +1257,24 @@ bool UIWindow::persist(BasePersistenceManager *persistMgr) {
UIObject::persist(persistMgr);
- persistMgr->transfer(TMEMBER(_backInactive));
+ persistMgr->transferPtr(TMEMBER_PTR(_backInactive));
persistMgr->transfer(TMEMBER(_clipContents));
persistMgr->transfer(TMEMBER(_dragFrom));
persistMgr->transfer(TMEMBER(_dragging));
persistMgr->transfer(TMEMBER(_dragRect));
persistMgr->transfer(TMEMBER(_fadeBackground));
persistMgr->transfer(TMEMBER(_fadeColor));
- persistMgr->transfer(TMEMBER(_fontInactive));
- persistMgr->transfer(TMEMBER(_imageInactive));
+ persistMgr->transferPtr(TMEMBER_PTR(_fontInactive));
+ persistMgr->transferPtr(TMEMBER_PTR(_imageInactive));
persistMgr->transfer(TMEMBER(_inGame));
persistMgr->transfer(TMEMBER(_isMenu));
persistMgr->transfer(TMEMBER_INT(_mode));
- persistMgr->transfer(TMEMBER(_shieldButton));
- persistMgr->transfer(TMEMBER(_shieldWindow));
+ persistMgr->transferPtr(TMEMBER_PTR(_shieldButton));
+ persistMgr->transferPtr(TMEMBER_PTR(_shieldWindow));
persistMgr->transfer(TMEMBER_INT(_titleAlign));
persistMgr->transfer(TMEMBER(_titleRect));
persistMgr->transfer(TMEMBER(_transparent));
- persistMgr->transfer(TMEMBER(_viewport));
+ persistMgr->transferPtr(TMEMBER_PTR(_viewport));
persistMgr->transfer(TMEMBER(_pauseMusic));
_widgets.persist(persistMgr);
@@ -1294,7 +1294,7 @@ bool UIWindow::moveFocus(bool forward) {
}
}
if (!found) {
- _focusedWidget = NULL;
+ _focusedWidget = nullptr;
}
if (!_focusedWidget) {
diff --git a/engines/wintermute/ui/ui_window.h b/engines/wintermute/ui/ui_window.h
index ae035c65c7..70799cea25 100644
--- a/engines/wintermute/ui/ui_window.h
+++ b/engines/wintermute/ui/ui_window.h
@@ -68,10 +68,10 @@ public:
bool enableWidget(const char *name, bool enable = true);
Rect32 _titleRect;
Rect32 _dragRect;
- virtual bool display(int offsetX = 0, int offsetY = 0);
+ virtual bool display(int offsetX = 0, int offsetY = 0) override;
UIWindow(BaseGame *inGame);
virtual ~UIWindow();
- virtual bool handleKeypress(Common::Event *event, bool printable = false);
+ virtual bool handleKeypress(Common::Event *event, bool printable = false) override;
BaseArray<UIObject *> _widgets;
TTextAlign _titleAlign;
bool loadFile(const char *filename);
@@ -80,12 +80,12 @@ public:
BaseFont *_fontInactive;
BaseSprite *_imageInactive;
virtual bool listen(BaseScriptHolder *param1, uint32 param2);
- virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+ virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
// scripting interface
- virtual ScValue *scGetProperty(const Common::String &name);
- virtual bool scSetProperty(const char *name, ScValue *value);
- virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
+ virtual ScValue *scGetProperty(const Common::String &name) override;
+ virtual bool scSetProperty(const char *name, ScValue *value) override;
+ virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
virtual const char *scToString();
};
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp
index 2c3be8c2f5..9fffad85cd 100644
--- a/engines/wintermute/utils/string_util.cpp
+++ b/engines/wintermute/utils/string_util.cpp
@@ -148,11 +148,11 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) {
// Currently this only does Ansi->ISO 8859, and only for carets.
char simpleAnsiToWide(const AnsiString &str, uint32 &offset) {
- char c = str[offset];
+ byte c = str[offset];
- if (c == 92) {
+ if (c == 146) {
offset++;
- return '\'';
+ return 39; // Replace right-quote with apostrophe
} else {
offset++;
return c;
@@ -162,11 +162,11 @@ char simpleAnsiToWide(const AnsiString &str, uint32 &offset) {
//////////////////////////////////////////////////////////////////////////
WideString StringUtil::ansiToWide(const AnsiString &str) {
// TODO: This function gets called a lot, so warnings like these drown out the usefull information
- /*Common::String converted = "";
+ Common::String converted = "";
uint32 index = 0;
while (index != str.size()) {
converted += simpleAnsiToWide(str, index);
- }*/
+ }
// using default os locale!
/* setlocale(LC_CTYPE, "");
@@ -176,7 +176,7 @@ WideString StringUtil::ansiToWide(const AnsiString &str) {
WideString ResultString(wstr);
delete[] wstr;
return ResultString;*/
- return WideString(str);
+ return WideString(converted);
}
//////////////////////////////////////////////////////////////////////////
@@ -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..033ab50dfa 100644
--- a/engines/wintermute/video/video_player.h
+++ b/engines/wintermute/video/video_player.h
@@ -42,7 +42,7 @@ namespace Wintermute {
class VideoPlayer : public BaseClass {
public:
bool _showSubtitle;
- int _currentSubtitle;
+ int32 _currentSubtitle;
bool loadSubtitles(const char *filename, const char *subtitleFile);
bool _slowRendering;
bool isPlaying();
@@ -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();
@@ -76,8 +76,8 @@ public:
PGETFRAME _videoPGF;*/
uint32 _videoEndTime;
- int _playPosX;
- int _playPosY;
+ int32 _playPosX;
+ int32 _playPosY;
float _playZoom;
/* LPBITMAPV4HEADER _targetFormat;
diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp
index 0f8bc018ea..8f9db8392f 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;
}
//////////////////////////////////////////////////////////////////////////
@@ -151,7 +151,32 @@ bool VideoTheoraPlayer::initialize(const Common::String &filename, const Common:
//////////////////////////////////////////////////////////////////////////
bool VideoTheoraPlayer::resetStream() {
- warning("VidTheoraPlayer::resetStream - stubbed");
+ warning("VidTheoraPlayer::resetStream - hacked");
+ // HACK: Just reopen the same file again.
+ if (_theoraDecoder) {
+ _theoraDecoder->close();
+ }
+ delete _theoraDecoder;
+ _theoraDecoder = nullptr;
+
+ _file = BaseFileManager::getEngineInstance()->openFile(_filename, true, false);
+ if (!_file) {
+ return STATUS_FAILED;
+ }
+
+#if defined (USE_THEORADEC)
+ _theoraDecoder = new Video::TheoraDecoder();
+#else
+ return STATUS_FAILED;
+#endif
+ _theoraDecoder->loadStream(_file);
+
+ if (!_theoraDecoder->isVideoLoaded()) {
+ return STATUS_FAILED;
+ }
+
+ return play(_playbackType, _posX, _posY, false, false, _looping, 0, _playZoom);
+ // End of hack.
#if 0 // Stubbed for now, as theora isn't seekable
if (_sound) {
_sound->Stop();
@@ -199,8 +224,8 @@ bool VideoTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame,
width = (float)_theoraDecoder->getWidth();
height = (float)_theoraDecoder->getHeight();
} else {
- width = (float)_gameRef->_renderer->_width;
- height = (float)_gameRef->_renderer->_height;
+ width = (float)_gameRef->_renderer->getWidth();
+ height = (float)_gameRef->_renderer->getHeight();
}
switch (type) {
@@ -211,18 +236,18 @@ bool VideoTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame,
break;
case VID_PLAY_STRETCH: {
- float zoomX = (float)((float)_gameRef->_renderer->_width / width * 100);
- float zoomY = (float)((float)_gameRef->_renderer->_height / height * 100);
+ float zoomX = (float)((float)_gameRef->_renderer->getWidth() / width * 100);
+ float zoomY = (float)((float)_gameRef->_renderer->getHeight() / height * 100);
_playZoom = MIN(zoomX, zoomY);
- _posX = (int)((_gameRef->_renderer->_width - width * (_playZoom / 100)) / 2);
- _posY = (int)((_gameRef->_renderer->_height - height * (_playZoom / 100)) / 2);
+ _posX = (int)((_gameRef->_renderer->getWidth() - width * (_playZoom / 100)) / 2);
+ _posY = (int)((_gameRef->_renderer->getHeight() - height * (_playZoom / 100)) / 2);
}
break;
case VID_PLAY_CENTER:
_playZoom = 100.0f;
- _posX = (int)((_gameRef->_renderer->_width - width) / 2);
- _posY = (int)((_gameRef->_renderer->_height - height) / 2);
+ _posX = (int)((_gameRef->_renderer->getWidth() - width) / 2);
+ _posY = (int)((_gameRef->_renderer->getHeight() - height) / 2);
break;
}
_theoraDecoder->start();
@@ -249,7 +274,7 @@ bool VideoTheoraPlayer::stop() {
//////////////////////////////////////////////////////////////////////////
bool VideoTheoraPlayer::update() {
- _currentTime = _freezeGame ? _gameRef->_liveTimer : _gameRef->_timer;
+ _currentTime = _freezeGame ? _gameRef->getLiveTimer()->getTime() : _gameRef->getTimer()->getTime();
if (!isPlaying()) {
return STATUS_OK;
@@ -265,8 +290,10 @@ bool VideoTheoraPlayer::update() {
if (_theoraDecoder) {
if (_theoraDecoder->endOfVideo() && _looping) {
- warning("Should loop movie %s", _filename.c_str());
+ warning("Should loop movie %s, hacked for now", _filename.c_str());
_theoraDecoder->rewind();
+ //HACK: Just reinitialize the same video again:
+ return resetStream();
} else if (_theoraDecoder->endOfVideo() && !_looping) {
debugC(kWintermuteDebugLog, "Finished movie %s", _filename.c_str());
_state = THEORA_STATE_FINISHED;
@@ -290,7 +317,7 @@ bool VideoTheoraPlayer::update() {
}
}
// Skip the busy-loop?
- if ((!_texture || !_videoFrameReady) && !_theoraDecoder->endOfVideo()) {
+ if ((!_texture || !_videoFrameReady) && _theoraDecoder && !_theoraDecoder->endOfVideo()) {
// end playback
if (!_looping) {
_state = THEORA_STATE_FINISHED;
@@ -308,7 +335,7 @@ bool VideoTheoraPlayer::update() {
}
//////////////////////////////////////////////////////////////////////////
-uint32 VideoTheoraPlayer::getMovieTime() {
+uint32 VideoTheoraPlayer::getMovieTime() const {
if (!_playbackStarted) {
return 0;
} else {
@@ -392,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;
}
@@ -405,7 +432,7 @@ bool VideoTheoraPlayer::setAlphaImage(const Common::String &filename) {
}
//////////////////////////////////////////////////////////////////////////
-byte VideoTheoraPlayer::getAlphaAt(int x, int y) {
+byte VideoTheoraPlayer::getAlphaAt(int x, int y) const {
if (_alphaImage) {
return _alphaImage->getAlphaAt(x, y);
} else {
@@ -464,7 +491,7 @@ bool VideoTheoraPlayer::persist(BasePersistenceManager *persistMgr) {
SetDefaults();
}
- persistMgr->transfer(TMEMBER(_gameRef));
+ persistMgr->transferPtr(TMEMBER_PTR(_gameRef));
persistMgr->transfer(TMEMBER(_savedPos));
persistMgr->transfer(TMEMBER(_savedState));
persistMgr->transfer(TMEMBER(_filename));
@@ -498,7 +525,7 @@ bool VideoTheoraPlayer::initializeSimple() {
}
//////////////////////////////////////////////////////////////////////////
-BaseSurface *VideoTheoraPlayer::getTexture() {
+BaseSurface *VideoTheoraPlayer::getTexture() const {
return _texture;
}
diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h
index 593c1b9666..364509a080 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);
@@ -72,64 +72,63 @@ public:
bool pause();
bool resume();
- bool isPlaying() {
+ bool isPlaying() const {
return _state == THEORA_STATE_PLAYING;
};
- bool isFinished() {
+ bool isFinished() const {
return _state == THEORA_STATE_FINISHED;
};
- bool isPaused() {
+ bool isPaused() const {
return _state == THEORA_STATE_PAUSED;
};
- uint32 getMovieTime();
-
- BaseSurface *getTexture();
-
- int _state;
- uint32 _startTime;
-
- int _savedState;
- uint32 _savedPos;
+ uint32 getMovieTime() const;
+ BaseSurface *getTexture() const;
// alpha related
BaseImage *_alphaImage;
Common::String _alphaFilename;
bool setAlphaImage(const Common::String &filename);
- __inline byte getAlphaAt(int x, int y);
+ __inline byte getAlphaAt(int x, int y) const;
void writeAlpha();
bool seekToTime(uint32 Time);
-
void cleanup();
bool resetStream();
// video properties
+ int32 _posX;
+ int32 _posY;
+
+ bool _dontDropFrames;
+private:
+ int32 _state;
+ uint32 _startTime;
+
+ int32 _savedState;
+ uint32 _savedPos;
+
+ // video properties
TVideoPlayback _playbackType;
- int _posX;
- int _posY;
+ bool _looping;
float _playZoom;
- int _volume;
+ int32 _volume;
- bool _looping;
- bool _dontDropFrames;
bool _freezeGame;
uint32 _currentTime;
-
-private:
// seeking support
bool _seekingKeyframe;
float _timeOffset;
bool _frameRendered;
- bool getIsFrameReady() {
+ bool getIsFrameReady() const {
return _videoFrameReady;
}
-private:
+
bool _audioFrameReady;
bool _videoFrameReady;
float _videobufTime;
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index c9726e150a..89a6f1b3e0 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,9 @@ namespace Wintermute {
// This might not be the prettiest solution
WintermuteEngine::WintermuteEngine() : Engine(g_system) {
_game = new AdGame("");
+ _debugger = nullptr;
+ _trigDebug = false;
+ _gameDescription = nullptr;
}
WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)
@@ -55,6 +59,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 +75,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 +113,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,31 +140,9 @@ 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");
-
- if (ConfMan.hasKey("debug_mode")) {
- if (ConfMan.getBool("debug_mode")) {
- _game->DEBUG_DebugEnable("./wme.log");
- }
- }
-
- if (ConfMan.hasKey("show_fps")) {
- _game->_debugShowFPS = ConfMan.getBool("show_fps");
- } else {
- _game->_debugShowFPS = false;
- }
-
- if (ConfMan.hasKey("disable_smartcache")) {
- _game->_smartCache = ConfMan.getBool("disable_smartcache");
- } else {
- _game->_smartCache = true;
- }
-
- if (!_game->_smartCache) {
- _game->LOG(0, "Smart cache is DISABLED");
- }
+ _game->initConfManSettings();
// load general game settings
_game->initialize1();
@@ -168,7 +153,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;
@@ -176,15 +161,13 @@ int WintermuteEngine::init() {
_game->initialize2();
- bool ret;
+ bool ret = _game->initRenderer();
- // initialize the renderer
- ret = _game->_renderer->initRenderer(_game->_settingsResWidth, _game->_settingsResHeight, windowedMode);
if (DID_FAIL(ret)) {
_game->LOG(ret, "Error initializing renderer. Exiting.");
delete _game;
- _game = NULL;
+ _game = nullptr;
return 3;
}
@@ -200,10 +183,10 @@ int WintermuteEngine::init() {
// load game
uint32 dataInitStart = g_system->getMillis();
- if (DID_FAIL(_game->loadFile(_game->_settingsGameFile ? _game->_settingsGameFile : "default.game"))) {
+ if (DID_FAIL(_game->loadGameSettingsFile())) {
_game->LOG(ret, "Error loading game file. Exiting.");
delete _game;
- _game = NULL;
+ _game = nullptr;
return false;
}
@@ -230,14 +213,24 @@ int WintermuteEngine::messageLoop() {
uint32 diff = 0;
const uint32 maxFPS = 60;
- const uint32 frameTime = (uint32)((1.0 / maxFPS) * 1000);
+ const uint32 frameTime = 2 * (uint32)((1.0 / maxFPS) * 1000);
while (!done) {
+ if (!_game) {
+ break;
+ }
+ _debugger->onFrame();
+
Common::Event event;
while (_system->getEventManager()->pollEvent(event)) {
BasePlatform::handleEvent(&event);
}
- if (_game && _game->_renderer->_active && _game->_renderer->_ready) {
+ if (_trigDebug) {
+ _debugger->attach();
+ _trigDebug = false;
+ }
+
+ if (_game && _game->_renderer->_active && _game->_renderer->isReady()) {
_game->displayContent();
_game->displayQuickMsg();
@@ -250,28 +243,29 @@ int WintermuteEngine::messageLoop() {
}
// ***** flip
- if (!_game->_suspendedRendering) {
+ if (!_game->getSuspendedRendering()) {
_game->_renderer->flip();
}
- if (_game->_loading) {
+ if (_game->getIsLoading()) {
_game->loadGame(_game->_scheduledLoadSlot);
}
prevTime = time;
}
- if (_game->_quitting) {
+ if (_game && _game->_quitting) {
break;
}
}
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 +289,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/bmp.h b/graphics/decoders/bmp.h
index 59da682e4d..779da352be 100644
--- a/graphics/decoders/bmp.h
+++ b/graphics/decoders/bmp.h
@@ -24,6 +24,7 @@
* Image decoder used in engines:
* - hugo
* - mohawk
+ * - wintermute
*/
#ifndef GRAPHICS_DECODERS_BMP_H
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..75fdcd6e5a 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;
}
@@ -481,8 +487,8 @@ bool JPEGDecoder::readDQT() {
// Validate the table id
tableId &= 0xF;
- if (tableId > JPEG_MAX_QUANT_TABLES) {
- warning("JPEG: Invalid number of components");
+ if (tableId >= JPEG_MAX_QUANT_TABLES) {
+ warning("JPEG: Invalid quantization table");
return false;
}
diff --git a/graphics/decoders/jpeg.h b/graphics/decoders/jpeg.h
index c74aa57ca1..d59b72adf4 100644
--- a/graphics/decoders/jpeg.h
+++ b/graphics/decoders/jpeg.h
@@ -25,6 +25,7 @@
* Image decoder used in engines:
* - groovie
* - mohawk
+ * - wintermute
*/
#ifndef GRAPHICS_JPEG_H
diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp
index d35e5c3064..b1d408ebc3 100644
--- a/graphics/decoders/pict.cpp
+++ b/graphics/decoders/pict.cpp
@@ -235,10 +235,13 @@ bool PICTDecoder::loadStream(Common::SeekableReadStream &stream) {
// PICT v2 opcodes are two bytes
uint16 opcode = stream.readUint16BE();
- if (opNum == 0 && opcode != 0x0011)
- error("Cannot find PICT version opcode");
- else if (opNum == 1 && opcode != 0x0C00)
- error("Cannot find PICT header opcode");
+ if (opNum == 0 && opcode != 0x0011) {
+ warning("Cannot find PICT version opcode");
+ return false;
+ } else if (opNum == 1 && opcode != 0x0C00) {
+ warning("Cannot find PICT header opcode");
+ return false;
+ }
// Since opcodes are word-aligned, we need to mark our starting
// position here.
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/decoders/png.h b/graphics/decoders/png.h
index e52ddabd7d..5e608eb7b1 100644
--- a/graphics/decoders/png.h
+++ b/graphics/decoders/png.h
@@ -23,6 +23,7 @@
/*
* PNG decoder used in engines:
* - sword25
+ * - wintermute
* Dependencies:
* - libpng
*/
diff --git a/graphics/decoders/tga.h b/graphics/decoders/tga.h
index dfdc5a4da9..d8ccf8f766 100644
--- a/graphics/decoders/tga.h
+++ b/graphics/decoders/tga.h
@@ -25,7 +25,7 @@
/*
* TGA decoder used in engines:
- * - none
+ * - wintermute
*/
#ifndef GRAPHICS_DECODERS_TGA_H
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/scaler/aspect.cpp b/graphics/scaler/aspect.cpp
index 327e7c5e89..92d6c5777e 100644
--- a/graphics/scaler/aspect.cpp
+++ b/graphics/scaler/aspect.cpp
@@ -23,11 +23,7 @@
#include "graphics/scaler/intern.h"
#include "graphics/scaler/aspect.h"
-#ifdef OPENPANDORA
-#define NEON_ASPECT_CORRECTOR
-#endif
-
-#ifdef NEON_ASPECT_CORRECTOR
+#ifdef USE_ARM_NEON_ASPECT_CORRECTOR
#include <arm_neon.h>
#endif
@@ -62,7 +58,7 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
#if ASPECT_MODE == kVeryFastAndGoodAspectMode
-#ifdef NEON_ASPECT_CORRECTOR
+#ifdef USE_ARM_NEON_ASPECT_CORRECTOR
template<typename ColorMask>
static void interpolate5LineNeon(uint16 *dst, const uint16 *srcA, const uint16 *srcB, int width, int k1, int k2) {
@@ -97,31 +93,31 @@ static void interpolate5LineNeon(uint16 *dst, const uint16 *srcA, const uint16 *
width -= 4;
}
}
-#endif
+#endif // USE_ARM_NEON_ASPECT_CORRECTOR
template<typename ColorMask, int scale>
static void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint16 *srcB, int width) {
if (scale == 1) {
-#ifdef NEON_ASPECT_CORRECTOR
+#ifdef USE_NEON_ASPECT_CORRECTOR
int width4 = width & ~3;
interpolate5LineNeon<ColorMask>(dst, srcA, srcB, width4, 7, 1);
srcA += width4;
srcB += width4;
dst += width4;
width -= width4;
-#endif
+#endif // USE_ARM_NEON_ASPECT_CORRECTOR
while (width--) {
*dst++ = interpolate16_7_1<ColorMask>(*srcB++, *srcA++);
}
} else {
-#ifdef NEON_ASPECT_CORRECTOR
+#ifdef USE_ARM_NEON_ASPECT_CORRECTOR
int width4 = width & ~3;
interpolate5LineNeon<ColorMask>(dst, srcA, srcB, width4, 5, 3);
srcA += width4;
srcB += width4;
dst += width4;
width -= width4;
-#endif
+#endif // USE_ARM_NEON_ASPECT_CORRECTOR
while (width--) {
*dst++ = interpolate16_5_3<ColorMask>(*srcB++, *srcA++);
}
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/ThemeParser.cpp b/gui/ThemeParser.cpp
index 8285aff7ca..bd5b406ca8 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -335,11 +335,15 @@ bool ThemeParser::parserCallback_drawstep(ParserNode *node) {
drawstep->drawingCall = getDrawingFunctionCallback(functionName);
- if (drawstep->drawingCall == 0)
+ if (drawstep->drawingCall == 0) {
+ delete drawstep;
return parserError(functionName + " is not a valid drawing function name");
+ }
- if (!parseDrawStep(node, drawstep, true))
+ if (!parseDrawStep(node, drawstep, true)) {
+ delete drawstep;
return false;
+ }
_theme->addDrawStep(getParentNode(node)->values["id"], *drawstep);
delete drawstep;
@@ -691,7 +695,7 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) {
return false;
}
- Common::parseBool(node->values["center"], center);
+ (void)Common::parseBool(node->values["center"], center);
if (node->values["type"] == "vertical")
_theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, center);
diff --git a/gui/about.cpp b/gui/about.cpp
index 03be1f8992..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.",
@@ -110,16 +112,16 @@ AboutDialog::AboutDialog()
const EnginePlugin::List &plugins = EngineMan.getPlugins();
EnginePlugin::List::const_iterator iter = plugins.begin();
for (; iter != plugins.end(); ++iter) {
- Common::String str;
- str = "C0";
- str += (**iter).getName();
- addLine(str.c_str());
+ Common::String str;
+ str = "C0";
+ str += (**iter).getName();
+ addLine(str.c_str());
- str = "C2";
- str += (**iter)->getOriginalCopyright();
- addLine(str.c_str());
+ str = "C2";
+ str += (**iter)->getOriginalCopyright();
+ addLine(str.c_str());
- //addLine("");
+ //addLine("");
}
for (i = 0; i < ARRAYSIZE(gpl_text); i++)
@@ -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 e5cc12ad8e..b82fe516f9 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
@@ -48,11 +50,15 @@ public:
protected:
#ifdef MACOSX
const void *_titleRef;
+ const void *_chooseRef;
+ const void *_hiddenFilesRef;
#else
ListWidget *_fileList;
StaticTextWidget *_currentPath;
Common::FSNode _node;
Common::FSList _nodeContent;
+ bool _showHidden;
+ CheckboxWidget *_showHiddenWidget;
#endif
Common::FSNode _choice;
bool _isDirBrowser;
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index b8aa7c50ee..642718df94 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -28,20 +28,86 @@
#include "common/config-manager.h"
#include "common/system.h"
#include "common/algorithm.h"
+#include "common/translation.h"
+#include <AppKit/NSNibDeclarations.h>
#include <AppKit/NSOpenPanel.h>
+#include <AppKit/NSButton.h>
#include <Foundation/NSString.h>
+#include <Foundation/NSURL.h>
+
+@interface ShowHiddenFilesController : NSObject {
+ NSOpenPanel* _panel;
+}
+
+- (id) init;
+- (void) dealloc;
+- (void) setOpenPanel : (NSOpenPanel*) panel;
+- (IBAction) showHiddenFiles : (id) sender;
+
+@end
+
+@implementation ShowHiddenFilesController
+
+- (id) init {
+ self = [super init];
+ _panel = 0;
+
+ return self;
+}
+
+- (void) dealloc {
+ [_panel release];
+ [super dealloc];
+}
+
+- (void) setOpenPanel : (NSOpenPanel*) panel {
+ _panel = panel;
+ [_panel retain];
+}
+
+
+- (IBAction) showHiddenFiles : (id) sender {
+ if ([sender state] == NSOnState) {
+ [_panel setShowsHiddenFiles: YES];
+ ConfMan.setBool("gui_browser_show_hidden", true, Common::ConfigManager::kApplicationDomain);
+ } else {
+ [_panel setShowsHiddenFiles: NO];
+ ConfMan.setBool("gui_browser_show_hidden", false, Common::ConfigManager::kApplicationDomain);
+ }
+}
+
+@end
namespace GUI {
BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
: Dialog("Browser") {
- _titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding());
+
+ // remember whether this is a file browser or a directory browser.
_isDirBrowser = dirBrowser;
+
+ // Get current encoding
+#ifdef USE_TRANSLATION
+ CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII);
+ CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr);
+ CFRelease(encStr);
+#else
+ CFStringEncoding stringEncoding = kCFStringEncodingASCII;
+#endif
+
+ // Convert title to NSString
+ _titleRef = CFStringCreateWithCString(0, title, stringEncoding);
+
+ // Convert button text to NSString
+ _chooseRef = CFStringCreateWithCString(0, _("Choose"), stringEncoding);
+ _hiddenFilesRef = CFStringCreateWithCString(0, _("Show hidden files"), stringEncoding);
}
BrowserDialog::~BrowserDialog() {
CFRelease(_titleRef);
+ CFRelease(_chooseRef);
+ CFRelease(_hiddenFilesRef);
}
int BrowserDialog::runModal() {
@@ -58,15 +124,45 @@ int BrowserDialog::runModal() {
// Temporarily show the real mouse
CGDisplayShowCursor(kCGDirectMainDisplay);
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+ [panel setCanChooseFiles:!_isDirBrowser];
+ [panel setCanChooseDirectories:_isDirBrowser];
+ [panel setTitle:(NSString *)_titleRef];
+ [panel setPrompt:(NSString *)_chooseRef];
+
+ NSButton *showHiddenFilesButton = 0;
+ ShowHiddenFilesController *showHiddenFilesController = 0;
+ if ([panel respondsToSelector:@selector(setShowsHiddenFiles:)]) {
+ showHiddenFilesButton = [[NSButton alloc] init];
+ [showHiddenFilesButton setButtonType:NSSwitchButton];
+ [showHiddenFilesButton setTitle:(NSString *)_hiddenFilesRef];
+ [showHiddenFilesButton sizeToFit];
+ if (ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain)) {
+ [showHiddenFilesButton setState:NSOnState];
+ [panel setShowsHiddenFiles: YES];
+ } else {
+ [showHiddenFilesButton setState:NSOffState];
+ [panel setShowsHiddenFiles: NO];
+ }
+ [panel setAccessoryView:showHiddenFilesButton];
+
+ showHiddenFilesController = [[ShowHiddenFilesController alloc] init];
+ [showHiddenFilesController setOpenPanel:panel];
+ [showHiddenFilesButton setTarget:showHiddenFilesController];
+ [showHiddenFilesButton setAction:@selector(showHiddenFiles:)];
+ }
- NSOpenPanel * panel = [NSOpenPanel openPanel];
- [panel setCanChooseDirectories:YES];
- if ([panel runModalForTypes:nil] == NSOKButton) {
- const char *filename = [[panel filename] UTF8String];
- _choice = Common::FSNode(filename);
- choiceMade = true;
+ if ([panel runModal] == NSOKButton) {
+ NSURL *url = [panel URL];
+ if ([url isFileURL]) {
+ const char *filename = [[url path] UTF8String];
+ _choice = Common::FSNode(filename);
+ choiceMade = true;
+ }
}
+ [showHiddenFilesButton release];
+ [showHiddenFilesController release];
// If we were in fullscreen mode, switch back
if (wasFullscreen) {
diff --git a/gui/credits.h b/gui/credits.h
index 37c5a7bd95..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)",
"",
@@ -475,15 +510,22 @@ static const char *credits[] = {
"C1""Basque",
"C0""Mikel Iturbe Urretxa",
"",
+"C1""Belarusian",
+"C0""Ivan Lukyanov",
+"",
"C1""Catalan",
"C0""Jordi Vilalta Prat",
"",
"C1""Czech",
+"A0""Zbynik Schwarz",
"C0""Zbyn\354k Schwarz",
"",
"C1""Danish",
"C0""Steffen Nyeland",
"",
+"C1""Finnish",
+"C0""Toni Saarela",
+"",
"C1""French",
"C0""Thierry Crozat",
"",
@@ -502,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",
@@ -518,6 +563,7 @@ static const char *credits[] = {
"C0""Eugene Sandulenko",
"",
"C1""Spanish",
+"A0""Tomas Maidagan",
"C0""Tom\341s Maidagan",
"C0""Jordi Vilalta Prat",
"",
@@ -529,6 +575,7 @@ static const char *credits[] = {
"",
"",
"C1""Websites (design)",
+"A0""Dobo Balazs",
"C0""Dob\363 Bal\341zs",
"C2""Website design",
"C0""William Claydon",
@@ -557,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",
@@ -581,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",
@@ -703,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..a9fdc19274 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 Device (enable MT-32 mappings)"), _("Check if you want to enable patch mappings to emulate an MT-32 on a Roland GS device"));
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/predictivedialog.cpp b/gui/predictivedialog.cpp
index ed18847a40..5ce093e054 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -779,7 +779,7 @@ bool PredictiveDialog::searchWord(const char *const where, const Common::String
}
void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Common::String &code) {
- char *newLine;
+ char *newLine = 0;
Common::String tmpCode = code + ' ';
int line = binarySearch(dict.dictLine, tmpCode, dict.dictLineCount);
if (line >= 0) {
@@ -856,6 +856,9 @@ void PredictiveDialog::addWord(Dict &dict, const Common::String &word, const Com
char **newDictLine = (char **)calloc(1, sizeof(char *) * (dict.dictLineCount + 1));
if (!newDictLine) {
warning("Predictive Dialog: cannot allocate memory for index buffer");
+
+ free(newLine);
+
return;
}
newDictLine[dict.dictLineCount] = '\0';
diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index df8dda7470..c7dd62b6c6 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -35,6 +35,14 @@ namespace GUI {
#ifndef DISABLE_SAVELOADCHOOSER_GRID
SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine) {
const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain);
+
+ // Check (and update if necessary) the theme config here. This catches
+ // resolution changes, which happened after the GUI was closed. This
+ // should assure that the correct GUI width/height are returned below and
+ // prevent the logic from picking the grid dialog, even though it is not
+ // possible to use it.
+ g_gui.checkScreenChange();
+
if (g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400
&& metaEngine.hasFeature(MetaEngine::kSavesSupportMetaInfo)
&& metaEngine.hasFeature(MetaEngine::kSavesSupportThumbnail)
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 1c3abf84a8..7bd1316208 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/list.cpp b/gui/widgets/list.cpp
index 13784ddf7f..473d5f04df 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -206,6 +206,7 @@ void ListWidget::scrollTo(int item) {
if (_currentPos != item) {
_currentPos = item;
+ checkBounds();
scrollBarRecalc();
}
}
@@ -284,7 +285,7 @@ bool ListWidget::handleKeyDown(Common::KeyState state) {
bool dirty = false;
int oldSelectedItem = _selectedItem;
- if (!_editMode && state.keycode <= Common::KEYCODE_z && isprint((unsigned char)state.ascii)) {
+ if (!_editMode && state.keycode <= Common::KEYCODE_z && Common::isPrint(state.ascii)) {
// Quick selection mode: Go to first list item starting with this key
// (or a substring accumulated from the last couple key presses).
// Only works in a useful fashion if the list entries are sorted.
@@ -467,6 +468,7 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
case kSetPositionCmd:
if (_currentPos != (int)data) {
_currentPos = data;
+ checkBounds();
draw();
// Scrollbar actions cause list focus (which triggers a redraw)
@@ -550,6 +552,13 @@ Common::Rect ListWidget::getEditRect() const {
return r;
}
+void ListWidget::checkBounds() {
+ if (_currentPos < 0 || _entriesPerPage > (int)_list.size())
+ _currentPos = 0;
+ else if (_currentPos + _entriesPerPage > (int)_list.size())
+ _currentPos = _list.size() - _entriesPerPage;
+}
+
void ListWidget::scrollToCurrent() {
// Only do something if the current item is not in our view port
if (_selectedItem < _currentPos) {
@@ -560,11 +569,7 @@ void ListWidget::scrollToCurrent() {
_currentPos = _selectedItem - _entriesPerPage + 1;
}
- if (_currentPos < 0 || _entriesPerPage > (int)_list.size())
- _currentPos = 0;
- else if (_currentPos + _entriesPerPage > (int)_list.size())
- _currentPos = _list.size() - _entriesPerPage;
-
+ checkBounds();
_scrollBar->_currentPos = _currentPos;
_scrollBar->recalc();
}
diff --git a/gui/widgets/list.h b/gui/widgets/list.h
index 47613b79f3..d18a82dd3f 100644
--- a/gui/widgets/list.h
+++ b/gui/widgets/list.h
@@ -145,6 +145,7 @@ protected:
void receivedFocusWidget();
void lostFocusWidget();
+ void checkBounds();
void scrollToCurrent();
int *_textWidth;
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..c2f67e288b 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -14,6 +14,7 @@ gui/saveload-dialog.cpp
gui/themebrowser.cpp
gui/ThemeEngine.cpp
gui/widget.cpp
+gui/fluidsynth-dialog.cpp
base/main.cpp
@@ -25,6 +26,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 +43,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 +59,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
new file mode 100644
index 0000000000..4c36c65f71
--- /dev/null
+++ b/po/be_BY.po
@@ -0,0 +1,3321 @@
+# Belarusian translation for ScummVM.
+# Copyright (C) 2010-2013 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Ivan Lukyanov <greencis@mail.ru>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.6.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-28 18:53+0300\n"
+"Last-Translator: Ivan Lukyanov <greencis@mail.ru>\n"
+"Language-Team: Ivan Lukyanov <greencis@mail.ru>\n"
+"Language: Belarusian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-5\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Poedit 1.5.5\n"
+
+#: gui/about.cpp:93
+#, c-format
+msgid "(built on %s)"
+msgstr "(áÐÑàÐÝë %s)"
+
+#: gui/about.cpp:100
+msgid "Features compiled in:"
+msgstr "ÃÚÛîçÐÝëï þ ÑöÛÔ Þßæëö:"
+
+#: gui/about.cpp:109
+msgid "Available engines:"
+msgstr "´ÐáâãßÝëï àãåÐÒöçÚö:"
+
+#: 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:71 gui/browser.cpp:73
+msgid "Go to previous directory level"
+msgstr "¿ÕàÐÙáæö ÝÐ ÔëàíÚâÞàëî þ×àÞþÝÕÜ ÒëèíÙ"
+
+#: gui/browser.cpp:73
+msgctxt "lowres"
+msgid "Go up"
+msgstr "ÃÒÕàå"
+
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
+msgid "Cancel"
+msgstr "°ÔÜÕÝÐ"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+msgid "Choose"
+msgstr "°ÑàÐæì"
+
+#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125
+#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165
+#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209
+#: backends/keymapper/remap-dialog.cpp:52
+msgid "Close"
+msgstr "·ÐÚàëæì"
+
+#: gui/gui-manager.cpp:118
+msgid "Mouse click"
+msgstr "ºÛöÚ Üëèèã"
+
+#: gui/gui-manager.cpp:122 base/main.cpp:301
+msgid "Display keyboard"
+msgstr "¿ÐÚÐ×Ðæì ÚÛÐÒöïâãàã"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:305
+msgid "Remap keys"
+msgstr "¿ÕàÐßàë×ÝÐçëæì ÚÛÐÒöèë"
+
+#: gui/gui-manager.cpp:129 base/main.cpp:308
+msgid "Toggle FullScreen"
+msgstr "¿ÕàÐÚÛîçíÝÝÕ ÝÐ þÒÕáì íÚàÐÝ"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "°ÑïàëæÕ Ô×ÕïÝÝÕ ÔÛï ßàë×ÝÐçíÝÝï"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "¿àë×ÝÐçëæì"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "°ÑïàëæÕ Ô×ÕïÝÝÕ ö ÚÛöÚÝöæÕ '¿àë×ÝÐçëæì'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "¿àë×ÝÐçÐÝÐï ÚÛÐÒöèÐ : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+#, c-format
+msgid "Associated key : none"
+msgstr "¿àë×ÝÐçÐÝÐï ÚÛÐÒöèÐ : ÝïÜÐ"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "ºÐÛö ÛÐáÚÐ, ÐÑïàëæÕ Ô×ÕïÝÝÕ"
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "½ÐæöáÝöæÕ ÚÛÐÒöèã ÔÛï ßàë×ÝÐçíÝÝï"
+
+#: gui/launcher.cpp:187
+msgid "Game"
+msgstr "³ãÛìÝï"
+
+#: gui/launcher.cpp:191
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194
+msgid ""
+"Short game identifier used for referring to savegames and running the game "
+"from the command line"
+msgstr ""
+"ºÐàÞâÚö öÔíÝâëäöÚÐâÐà, ÒëÚÐàëáâÞþÒÐÝë ÔÛï öÜñÝÐþ ×ÐåÐÒÐÝÝïþ ÓãÛìÝïþ ö ÔÛï "
+"×ÐßãáÚã × ÚÐÜÐÝÔÝÐÓÐ àÐÔÚÐ"
+
+#: gui/launcher.cpp:193
+msgctxt "lowres"
+msgid "ID:"
+msgstr "ID:"
+
+#: gui/launcher.cpp:198
+msgid "Name:"
+msgstr "½Ð×ÒÐ:"
+
+#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201
+msgid "Full title of the game"
+msgstr "¿ÞþÝÐï ÝÐ×ÒÐ ÓãÛìÝö"
+
+#: gui/launcher.cpp:200
+msgctxt "lowres"
+msgid "Name:"
+msgstr "½Ð×Ò:"
+
+#: gui/launcher.cpp:204
+msgid "Language:"
+msgstr "¼ÞÒÐ:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:205
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"¼ÞÒÐ ÓãÛìÝö. ·ÜÕÝÐ ÓíâÐÙ ÝÐÛÐÔë ÝÕ ßÕàÐâÒÞàëæì ÐÝÓÕÛìáÚãî ÓãÛìÝî þ àãáÚãî"
+
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
+#: audio/null.cpp:40
+msgid "<default>"
+msgstr "<ßÐ ×ÜÐþçÐÝÝö>"
+
+#: gui/launcher.cpp:216
+msgid "Platform:"
+msgstr "¿ÛÐâäÞàÜÐ:"
+
+#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219
+msgid "Platform the game was originally designed for"
+msgstr "¿ÛÐâäÞàÜÐ, ÔÛï ïÚÞÙ ÓãÛìÝï ÑëÛÐ ßÕàèÐßÐçÐâÚÞÒÐ àÐáßàÐæÐÒÐÝÐ"
+
+#: gui/launcher.cpp:218
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "¿ÛÐâäÞàÜÐ:"
+
+#: gui/launcher.cpp:231
+msgid "Engine"
+msgstr "ÀãåÐÒöçÞÚ"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
+msgid "Graphics"
+msgstr "³àÐäöÚÐ"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
+msgid "GFX"
+msgstr "³àä"
+
+#: gui/launcher.cpp:242
+msgid "Override global graphic settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÓàÐäöÚö"
+
+#: gui/launcher.cpp:244
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÓàÐäöÚö"
+
+#: gui/launcher.cpp:251 gui/options.cpp:1095
+msgid "Audio"
+msgstr "°þÔëñ"
+
+#: gui/launcher.cpp:254
+msgid "Override global audio settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÐþÔëñ"
+
+#: gui/launcher.cpp:256
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÐþÔëñ"
+
+#: gui/launcher.cpp:265 gui/options.cpp:1100
+msgid "Volume"
+msgstr "³ãçÝÐáæì"
+
+#: gui/launcher.cpp:267 gui/options.cpp:1102
+msgctxt "lowres"
+msgid "Volume"
+msgstr "³ãçÝ"
+
+#: gui/launcher.cpp:270
+msgid "Override global volume settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÓãçÝÐáæö"
+
+#: gui/launcher.cpp:272
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ÓãçÝÐáæö"
+
+#: gui/launcher.cpp:280 gui/options.cpp:1110
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:283
+msgid "Override global MIDI settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë MIDI"
+
+#: gui/launcher.cpp:285
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë MIDI"
+
+#: gui/launcher.cpp:294 gui/options.cpp:1116
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:297
+msgid "Override global MT-32 settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë MT-32"
+
+#: gui/launcher.cpp:299
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "¿ÕàÐÚàëæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë MT-32"
+
+#: gui/launcher.cpp:308 gui/options.cpp:1123
+msgid "Paths"
+msgstr "ÈÛïåö"
+
+#: gui/launcher.cpp:310 gui/options.cpp:1125
+msgctxt "lowres"
+msgid "Paths"
+msgstr "ÈÛïåö"
+
+#: gui/launcher.cpp:317
+msgid "Game Path:"
+msgstr "ÈÛïå ÔÐ ÓãÛìÝö:"
+
+#: gui/launcher.cpp:319
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "´×Õ ÓãÛìÝï:"
+
+#: gui/launcher.cpp:324 gui/options.cpp:1149
+msgid "Extra Path:"
+msgstr "´ÐÔ. èÛïå:"
+
+#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327
+msgid "Specifies path to additional data used the game"
+msgstr "¿ÐÚÐ×ÒÐÕ èÛïå ÔÐ ÔÐÔÐâÚÞÒëå äÐÙÛÐþ, ÔÐÔ×ÕÝëå ÔÛï ÓãÛìÝö"
+
+#: gui/launcher.cpp:326 gui/options.cpp:1151
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "´ÐÔ. èÛïå:"
+
+#: 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:1133 gui/options.cpp:1135 gui/options.cpp:1136
+msgid "Specifies where your savegames are put"
+msgstr "¿ÐÚÐ×ÒÐÕ èÛïå ÔÐ ×ÐåÐÒÐÝÝïþ ÓãÛìÝö"
+
+#: 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: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: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:1435
+msgid "Select SoundFont"
+msgstr "°ÑïàëæÕ SoundFont"
+
+#: gui/launcher.cpp:523 gui/launcher.cpp:677
+msgid "Select directory with game data"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × äÐÙÛÐÜö ÓãÛìÝö"
+
+#: gui/launcher.cpp:541
+msgid "Select additional game directory"
+msgstr "°ÑïàëæÕ ÔÐÔÐâÚÞÒãî ÔëàíÚâÞàëî ÓãÛìÝö"
+
+#: gui/launcher.cpp:553
+msgid "Select directory for saved games"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî ÔÛï ×ÐåÐÒÐÝÝïþ"
+
+#: gui/launcher.cpp:580
+msgid "This game ID is already taken. Please choose another one."
+msgstr "³íâë ID ÓãÛìÝö þÖÞ ÒëÚÐàëáâÞþÒÐÕææÐ. ºÐÛö ÛÐáÚÐ, ÐÑïàëæÕ öÝèë."
+
+#: gui/launcher.cpp:621 engines/dialogs.cpp:110
+msgid "~Q~uit"
+msgstr "~²~ëåÐÔ"
+
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
+msgid "Quit ScummVM"
+msgstr "·ÐÒïàèëæì ScummVM"
+
+#: gui/launcher.cpp:622
+msgid "A~b~out..."
+msgstr "¿àÐ ß~à~ÐÓàÐÜã..."
+
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
+msgid "About ScummVM"
+msgstr "¿àÐ ßàÐÓàÐÜã ScummVM"
+
+#: gui/launcher.cpp:623
+msgid "~O~ptions..."
+msgstr "~½~ÐÛÐÔë..."
+
+#: gui/launcher.cpp:623
+msgid "Change global ScummVM options"
+msgstr "·ÜïÝöæì ÓÛÐÑÐÛìÝëï ÝÐÛÐÔë ScummVM"
+
+#: gui/launcher.cpp:625
+msgid "~S~tart"
+msgstr "¿~ã~áÚ"
+
+#: gui/launcher.cpp:625
+msgid "Start selected game"
+msgstr "·Ðßãáæöæì ÐÑàÐÝãî ÓãÛìÝî"
+
+#: gui/launcher.cpp:628
+msgid "~L~oad..."
+msgstr "~·~ÐÓàã×öæì..."
+
+#: gui/launcher.cpp:628
+msgid "Load savegame for selected game"
+msgstr "·ÐÓàã×öæì ×ÐåÐÒÐÝÝÕ ÔÛï ÐÑàÐÝÐÙ ÓãÛìÝö"
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:1120
+msgid "~A~dd Game..."
+msgstr "~´~ÐÔÐæì ÓãÛìÝî..."
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:640
+msgid "Hold Shift for Mass Add"
+msgstr "ÃâàëÜÛöÒÐÙæÕ ÚÛÐÒöèã Shift ÔÛï âÐÓÞ, ÚÐÑ ÔÐÔÐæì ÝÕÚÐÛìÚö ÓãÛìÝïþ"
+
+#: gui/launcher.cpp:635
+msgid "~E~dit Game..."
+msgstr "½~Ð~ÛÐÔë ÓãÛìÝö..."
+
+#: gui/launcher.cpp:635 gui/launcher.cpp:642
+msgid "Change game options"
+msgstr "·ÜïÝöæì ÝÐÛÐÔë ÓãÛìÝö"
+
+#: gui/launcher.cpp:637
+msgid "~R~emove Game"
+msgstr "²~ë~ÔÐÛöæì ÓãÛìÝî"
+
+#: gui/launcher.cpp:637 gui/launcher.cpp:644
+msgid "Remove game from the list. The game data files stay intact"
+msgstr "²ëÔÐÛöæì ÓãÛìÝî áÐ áßöáã. ½Õ ÒëÔÐÛïÕ ÓãÛìÝî × ÖÞàáâÚÐÓÐ ÔëáÚÐ"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:1120
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "~´~ÐÔ. ÓãÛìÝî..."
+
+#: gui/launcher.cpp:642
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "½~Ð~Û. ÓãÛìÝö..."
+
+#: gui/launcher.cpp:644
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "²~ë~ÔÐÛöæì ÓãÛìÝî"
+
+#: gui/launcher.cpp:652
+msgid "Search in game list"
+msgstr "¿ÞèãÚ ã áßöáÕ ÓãÛìÝïþ"
+
+#: gui/launcher.cpp:656 gui/launcher.cpp:1167
+msgid "Search:"
+msgstr "¿ÞèãÚ:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:349
+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 engines/pegasus/pegasus.cpp:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Load"
+msgstr "·ÐÓàã×öæì"
+
+#: gui/launcher.cpp:788
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ×Ðßãáæöæì ÔíâíÚâÐà ãáöå ÓãÛìÝïþ? ³íâÐ ßÐâíÝæëïÛìÝÐ ÜÞÖÐ "
+"ÔÐÔÐæì ÒïÛöÚãî ÚÞÛìÚÐáæì ÓãÛìÝïþ."
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Yes"
+msgstr "ÂÐÚ"
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "No"
+msgstr "½Õ"
+
+#: gui/launcher.cpp:837
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM ÝÕ ÜÞÖÐ ÐÔÚàëæì Ð×ÝÐçÐÝãî ÔëàíÚâÞàëî!"
+
+#: gui/launcher.cpp:849
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM ÝÕ ÜÞÖÐ ×ÝÐÙáæö ÓãÛìÝî þ Ð×ÝÐçÐÝÐÙ ÔëàíÚâÞàëö!"
+
+#: gui/launcher.cpp:863
+msgid "Pick the game:"
+msgstr "°ÑïàëæÕ ÓãÛìÝî:"
+
+#: gui/launcher.cpp:937
+msgid "Do you really want to remove this game configuration?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ÒëÔÐÛöæì ÝÐÛÐÔë ÔÛï ÓíâÐÙ ÓãÛìÝö?"
+
+#: gui/launcher.cpp:1001
+msgid "This game does not support loading games from the launcher."
+msgstr "³íâÐï ÓãÛìÝï ÝÕ ßÐÔâàëÜÛöÒÐÕ ×ÐÓàã×Úã ×ÐåÐÒÐÝÝïþ ßàÐ× ÓÐÛÞþÝÐÕ ÜÕÝî."
+
+#: gui/launcher.cpp:1005
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr "ScummVM ÝÕ ×ÜÞÓ ×ÝÐÙáæö àãåÐÒöçÞÚ ÔÛï ×ÐßãáÚã ÐÑàÐÝÐÙ ÓãÛìÝö!"
+
+#: gui/launcher.cpp:1119
+msgctxt "lowres"
+msgid "Mass Add..."
+msgstr "ÈÜÐâ ÓãÛìÝïþ..."
+
+#: gui/launcher.cpp:1119
+msgid "Mass Add..."
+msgstr "ÈÜÐâ ÓãÛìÝïþ..."
+
+#: gui/massadd.cpp:78 gui/massadd.cpp:81
+msgid "... progress ..."
+msgstr "...èãÚÐî..."
+
+#: gui/massadd.cpp:258
+msgid "Scan complete!"
+msgstr "¿ÞèãÚ áÚÞÝçÐÝë!"
+
+#: gui/massadd.cpp:261
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr "·ÝÞÙÔ×ÕÝÐ %d ÝÞÒëå ÓãÛìÝïþ, ßàÐßãèçÐÝÐ %d àÐÝÕÙ ÔÐÔÐÔ×ÕÝëå ÓãÛìÝïþ."
+
+#: gui/massadd.cpp:265
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "¿àÐÓÛÕÔÖÐÝÐ %d ÔëàíÚâÞàëÙ..."
+
+#: gui/massadd.cpp:268
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr "·ÝÞÙÔ×ÕÝÐ %d ÝÞÒëå ÓãÛìÝïþ, ßàÐßãèçÐÝÐ %d àÐÝÕÙ ÔÐÔÐÔ×ÕÝëå ÓãÛìÝïþ..."
+
+#: gui/options.cpp:84
+msgid "Never"
+msgstr "½öÚÞÛö"
+
+#: gui/options.cpp:84
+msgid "every 5 mins"
+msgstr "ÚÞÖÝëï 5 åÒöÛöÝ"
+
+#: gui/options.cpp:84
+msgid "every 10 mins"
+msgstr "ÚÞÖÝëï 10 åÒöÛöÝ"
+
+#: gui/options.cpp:84
+msgid "every 15 mins"
+msgstr "ÚÞÖÝëï 15 åÒöÛöÝ"
+
+#: gui/options.cpp:84
+msgid "every 30 mins"
+msgstr "ÚÞÖÝëï 30 åÒöÛöÝ"
+
+#: gui/options.cpp:86
+msgid "8 kHz"
+msgstr "8 Ú³æ"
+
+#: gui/options.cpp:86
+msgid "11kHz"
+msgstr "11 Ú³æ"
+
+#: gui/options.cpp:86
+msgid "22 kHz"
+msgstr "22 Ú³æ"
+
+#: gui/options.cpp:86
+msgid "44 kHz"
+msgstr "44 Ú³æ"
+
+#: gui/options.cpp:86
+msgid "48 kHz"
+msgstr "48 Ú³æ"
+
+#: 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:388
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "½Õ ÐâàëÜÐÛÐáï þÖëæì ×ÜÕÝë ÝÕÚÐâÞàëå ÓàÐäöçÝëå ÝÐÛÐÔ:"
+
+#: gui/options.cpp:400
+msgid "the video mode could not be changed."
+msgstr "ÒöÔíÐàíÖëÜ ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë."
+
+#: gui/options.cpp:406
+msgid "the fullscreen setting could not be changed"
+msgstr "ßÞþÝÐíÚàÐÝÝë àíÖëÜ ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë"
+
+#: gui/options.cpp:412
+msgid "the aspect ratio setting could not be changed"
+msgstr "àíÖëÜ ÚÐàíÚâëàÞþÚö áãÐÔÝÞáöÝ ÑÐÚÞþ ÝÕ ÜÞÖÐ Ñëæì ×ÜÕÝÕÝë"
+
+#: gui/options.cpp:733
+msgid "Graphics mode:"
+msgstr "³àÐä. àíÖëÜ:"
+
+#: gui/options.cpp:747
+msgid "Render mode:"
+msgstr "ÀíÖëÜ àÐáâàã:"
+
+#: gui/options.cpp:747 gui/options.cpp:748
+msgid "Special dithering modes supported by some games"
+msgstr "ÁßÕæëïÛìÝëï àíÖëÜë àíÝÔíàëÝÓã, ßÐÔâàëÜÞþÒÐÝëï ÝÕÚÐâÞàëÜö ÓãÛìÝïÜö"
+
+#: gui/options.cpp:759
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
+msgid "Fullscreen mode"
+msgstr "¿ÞþÝÐíÚàÐÝÝë àíÖëÜ"
+
+#: gui/options.cpp:762
+msgid "Aspect ratio correction"
+msgstr "ºÐàíÚæëï áãÐÔÝÞáöÝ ÑÐÚÞþ"
+
+#: gui/options.cpp:762
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "ºÐàíÚâÐÒÐæì áãÐÔÝÞáöÝë ÑÐÚÞþ ÔÛï ÓãÛìÝïþ × àí×ÐÛîæëïÙ 320x200"
+
+#: gui/options.cpp:770
+msgid "Preferred Device:"
+msgstr "ÃßÐÔÐÑÐÝÐÕ:"
+
+#: gui/options.cpp:770
+msgid "Music Device:"
+msgstr "³ãÚÐÒÐï ßàëÛÐÔÐ:"
+
+#: gui/options.cpp:770 gui/options.cpp:772
+msgid "Specifies preferred sound device or sound card emulator"
+msgstr "·Ð×ÝÐçÐÕ þßÐÔÐÑÐÝãî ÓãÚÐÒãî ßàëÛÐÔã æö íÜãÛïâÐà ÓãÚÐÒÞÙ ÚÐàâë"
+
+#: 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:772
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "ÃßÐÔÐÑÐÝÐÕ:"
+
+#: gui/options.cpp:772
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "³ãÚ. ßàëÛÐÔÐ:"
+
+#: gui/options.cpp:799
+msgid "AdLib emulator:"
+msgstr "ÍÜãÛïâÐà AdLib:"
+
+#: gui/options.cpp:799 gui/options.cpp:800
+msgid "AdLib is used for music in many games"
+msgstr "³ãÚÐÒÐï ÚÐàâÐ AdLib ÒëÚÐàëáâÞþÒÐÕææÐ ÜÝÞÓöÜö ÓãÛìÝïÜö"
+
+#: gui/options.cpp:810
+msgid "Output rate:"
+msgstr "ÇÐèçëÝï ÓãÚã:"
+
+#: 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:821
+msgid "GM Device:"
+msgstr "¿àëÛÐÔÐ GM:"
+
+#: gui/options.cpp:821
+msgid "Specifies default sound device for General MIDI output"
+msgstr "·Ð×ÝÐçÐÕ ÒëåÞÔÝãî ÓãÚÐÒãî ßàëÛÐÔã ÔÛï MIDI"
+
+#: gui/options.cpp:832
+msgid "Don't use General MIDI music"
+msgstr "½Õ ÒëÚÐàëáâÞþÒÐæì Üã×ëÚã ÔÛï General MIDI"
+
+#: gui/options.cpp:843 gui/options.cpp:909
+msgid "Use first available device"
+msgstr "²ëÚÐàëáâÞþÒÐæì ßÕàèãî ÔÐáâãßÝãî ßàëÛÐÔã"
+
+#: gui/options.cpp:855
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: 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:857
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "SoundFont:"
+
+#: gui/options.cpp:863
+msgid "Mixed AdLib/MIDI mode"
+msgstr "·ÜÕèÐÝë àíÖëÜ AdLib/MIDI"
+
+#: gui/options.cpp:863
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "²ëÚÐàëáâÞþÒÐæì ö MIDI, ö AdLib ÔÛï ÓÕÝÕàÐæëö ÓãÚã"
+
+#: gui/options.cpp:866
+msgid "MIDI gain:"
+msgstr "Ã×ÜÐæÝÕÝÝÕ MIDI:"
+
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr "½ÐÛÐÔë FluidSynth"
+
+#: gui/options.cpp:880
+msgid "MT-32 Device:"
+msgstr "½ÐÛ. MT-32:"
+
+#: 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:885
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "ÁÐßàÐþÔÝë Roland MT-32 (×ÐÑÐàÐÝöæì íÜãÛïæëî GM)"
+
+#: 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 ""
+"°Ô×ÝÐçæÕ, ÚÐÛö þ ÒÐá ßÐÔÚÛîçÐÝÐ Roland-áãÜïèçÐÛìÝÐï ÓãÚÐÒÐï ßàëÛÐÔÐ ö Òë "
+"ÖÐÔÐÕæÕ ïÕ ÒëÚÐàëáâÞþÒÐæì"
+
+#: gui/options.cpp:887
+msgctxt "lowres"
+msgid "True Roland MT-32 (no GM emulation)"
+msgstr "ÁÐßàÐþÔÝë Roland MT-32 (ÑÕ× GM)"
+
+#: gui/options.cpp:890
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "ÀíÖëÜ Roland GS (×ÐÑÐàÐÝöæì àÐáÚÛÐÔÚã GM)"
+
+#: 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:899
+msgid "Don't use Roland MT-32 music"
+msgstr "½Õ ÒëÚÐàëáâÞþÒÐæì Üã×ëÚã ÔÛï MT-32"
+
+#: gui/options.cpp:926
+msgid "Text and Speech:"
+msgstr "ÂíÚáâ ö ÐÓãçÚÐ:"
+
+#: gui/options.cpp:930 gui/options.cpp:940
+msgid "Speech"
+msgstr "°ÓãçÚÐ"
+
+#: gui/options.cpp:931 gui/options.cpp:941
+msgid "Subtitles"
+msgstr "ÁãÑâëâàë"
+
+#: gui/options.cpp:932
+msgid "Both"
+msgstr "°ÑÞÕ"
+
+#: gui/options.cpp:934
+msgid "Subtitle speed:"
+msgstr "ÅãâÚÐáæì âëâàÐþ:"
+
+#: gui/options.cpp:936
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "ÂíÚáâ ö ÐÓãçÚÐ:"
+
+#: gui/options.cpp:940
+msgid "Spch"
+msgstr "°Óãç"
+
+#: gui/options.cpp:941
+msgid "Subs"
+msgstr "狄"
+
+#: gui/options.cpp:942
+msgctxt "lowres"
+msgid "Both"
+msgstr "°ÑÞÕ"
+
+#: gui/options.cpp:942
+msgid "Show subtitles and play speech"
+msgstr "¿ÐÚÐ×ÒÐæì áãÑâëâàë ö ßàÐÙÓàÐÒÐæì ÓÐÒÞàÚã"
+
+#: gui/options.cpp:944
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "ÅãâÚÐáæì âëâàÐþ:"
+
+#: gui/options.cpp:960
+msgid "Music volume:"
+msgstr "³ãçÝ. Üã×ëÚö:"
+
+#: gui/options.cpp:962
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "³ãçÝ. Üã×ëÚö:"
+
+#: gui/options.cpp:969
+msgid "Mute All"
+msgstr "²ëÚÛ. ãáñ"
+
+#: gui/options.cpp:972
+msgid "SFX volume:"
+msgstr "³ãçÝÐáæì SFX:"
+
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
+msgid "Special sound effects volume"
+msgstr "³ãçÝÐáæì áßÕæëïÛìÝëå ÓãÚÐÒëå íäÕÚâÐþ"
+
+#: gui/options.cpp:974
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "³ãçÝ. SFX:"
+
+#: gui/options.cpp:982
+msgid "Speech volume:"
+msgstr "³ãçÝ. ÐÓãçÚö:"
+
+#: gui/options.cpp:984
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "³ãçÝ. ÐÓãçÚö:"
+
+#: gui/options.cpp:1141
+msgid "Theme Path:"
+msgstr "ÈÛïå ÔÐ âíÜ:"
+
+#: gui/options.cpp:1143
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "´×Õ âíÜë:"
+
+#: 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:1158
+msgid "Plugins Path:"
+msgstr "ÈÛïå ÔÐ ßÛÐÓöÝÐþ:"
+
+#: gui/options.cpp:1160
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "ÈÛïå ÔÐ ßÛÐÓöÝÐþ:"
+
+#: gui/options.cpp:1169 gui/fluidsynth-dialog.cpp:137
+msgid "Misc"
+msgstr "ÀÞ×ÝÐÕ"
+
+#: gui/options.cpp:1171
+msgctxt "lowres"
+msgid "Misc"
+msgstr "ÀÞ×ÝÐÕ"
+
+#: gui/options.cpp:1173
+msgid "Theme:"
+msgstr "ÂíÜÐ"
+
+#: gui/options.cpp:1177
+msgid "GUI Renderer:"
+msgstr "¼ÐÛïÒÐÛÚÐ GUI:"
+
+#: gui/options.cpp:1189
+msgid "Autosave:"
+msgstr "°þâÐ×ÐåÐÒÐÝÝÕ:"
+
+#: gui/options.cpp:1191
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "°þâÐ×Ðå.:"
+
+#: gui/options.cpp:1199
+msgid "Keys"
+msgstr "ºÛÐÒöèë"
+
+#: gui/options.cpp:1206
+msgid "GUI Language:"
+msgstr "¼ÞÒÐ GUI:"
+
+#: gui/options.cpp:1206
+msgid "Language of ScummVM GUI"
+msgstr "¼ÞÒÐ ÓàÐäöçÝÐÓÐ öÝâíàäÕÙáã ScummVM"
+
+#: gui/options.cpp:1365
+msgid "You have to restart ScummVM before your changes will take effect."
+msgstr "²ë ßÐÒöÝÝë ßÕàÐ×Ðßãáæöæì ScummVM, ÚÐÑ ãÖëæì ×ÜÕÝë."
+
+#: gui/options.cpp:1378
+msgid "Select directory for savegames"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî ÔÛï ×ÐåÐÒÐÝÝïþ"
+
+#: gui/options.cpp:1385
+msgid "The chosen directory cannot be written to. Please select another one."
+msgstr "½Õ ÜÐÓã ßöáÐæì ã ÐÑàÐÝãî ÔëàíÚâÞàëî. ºÐÛö ÛÐáÚÐ, Ð×ÝÐçæÕ öÝèãî."
+
+#: gui/options.cpp:1394
+msgid "Select directory for GUI themes"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî ÔÛï âíÜ GUI"
+
+#: gui/options.cpp:1404
+msgid "Select directory for extra files"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × ÔÐÔÐâÚÞÒëÜö äÐÙÛÐÜö"
+
+#: gui/options.cpp:1415
+msgid "Select directory for plugins"
+msgstr "°ÑïàëæÕ ÔëàíÚâÞàëî × ßÛÐÓöÝÐÜö"
+
+#: 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."
+msgstr ""
+"ÂíÜÐ, ÐÑàÐÝÐï ÒÐÜö, ÝÕ ßÐÔâàëÜÛöÒÐÕ ÑïÓãçãî ÜÞÒã. ºÐÛö Òë ÖÐÔÐÕæÕ "
+"ÒëÚÐàëáâÞþÒÐæì Óíâãî âíÜã, ÒÐÜ ÝÕÐÑåÞÔÝÐ áßÐçÐâÚã ßÕàÐÚÛîçëææÐ ÝÐ öÝèãî ÜÞÒã."
+
+#: gui/saveload-dialog.cpp:166
+msgid "List view"
+msgstr "²ëÓÛïÔ áßöáã"
+
+#: gui/saveload-dialog.cpp:167
+msgid "Grid view"
+msgstr "²ëÓÛïÔ áÕâÚö"
+
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
+msgid "No date saved"
+msgstr "´ÐâÐ ÝÕ ×ÐßöáÐÝÐ"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
+msgid "No time saved"
+msgstr "ÇÐá ÝÕ ×ÐßöáÐÝë"
+
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
+msgid "No playtime saved"
+msgstr "ÇÐá ÓãÛìÝö ÝÕ ×ÐßöáÐÝë"
+
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
+msgid "Delete"
+msgstr "²ëÔÐÛöæì"
+
+#: gui/saveload-dialog.cpp:274
+msgid "Do you really want to delete this savegame?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ÒëÔÐÛöæì ÓíâÐ ×ÐåÐÒÐÝÝÕ?"
+
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
+msgid "Date: "
+msgstr "´ÐâÐ: "
+
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
+msgid "Time: "
+msgstr "ÇÐá: "
+
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
+msgid "Playtime: "
+msgstr "ÇÐá ÓãÛìÝö: "
+
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
+msgid "Untitled savestate"
+msgstr "·ÐåÐÒÐÝÝÕ ÑÕ× öÜï"
+
+#: gui/saveload-dialog.cpp:546
+msgid "Next"
+msgstr "½ÐáâãßÝë"
+
+#: gui/saveload-dialog.cpp:549
+msgid "Prev"
+msgstr "¿ÐßïàíÔÝö"
+
+#: gui/saveload-dialog.cpp:736
+msgid "New Save"
+msgstr "½ÞÒÐÕ ×ÐåÐÒÐÝÝÕ"
+
+#: gui/saveload-dialog.cpp:736
+msgid "Create a new save game"
+msgstr "ÁâÒÐàëæì ÝÞÒë ×Ðßöá ÓãÛìÝö"
+
+#: gui/saveload-dialog.cpp:865
+msgid "Name: "
+msgstr "½Ð×ÒÐ: "
+
+#: gui/saveload-dialog.cpp:937
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "ÃÒïÔ×öæÕ ÐßöáÐÝÝÕ áÛÞâÐ %d:"
+
+#: gui/themebrowser.cpp:44
+msgid "Select a Theme"
+msgstr "°ÑïàëæÕ âíÜã"
+
+#: gui/ThemeEngine.cpp:337
+msgid "Disabled GFX"
+msgstr "±Õ× ÓàÐäöÚö"
+
+#: gui/ThemeEngine.cpp:337
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "±Õ× ÓàÐäöÚö"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard Renderer (16bpp)"
+msgstr "ÁâÐÝÔÐàâÝë àÐáâÐàë×ÐâÐà (16bpp)"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard (16bpp)"
+msgstr "ÁâÐÝÔÐàâÝë àÐáâÐàë×ÐâÐà (16bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased Renderer (16bpp)"
+msgstr "ÀÐáâÐàë×ÐâÐà áÐ ×ÓÛÐÔÖÒÐÝÝÕÜ (16bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased (16bpp)"
+msgstr "ÀÐáâÐàë×ÐâÐà áÐ ×ÓÛÐÔÖÒÐÝÝÕÜ (16bpp)"
+
+#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332
+msgid "Clear value"
+msgstr "°çëáæöæì ×ÝÐçíÝÝÕ"
+
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "ÀíÒÕàÑÕàÐæëï"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "(°ÚâëþÝÐï)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "¿ÐÚÞÙ:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "´íÜßäÐÒÐÝÝÕ:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "´ÐþÖëÝï:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Ã×àÞÒÕÝì:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "ÅÞà"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "ÅãâÚÐáæì:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "³ÛëÑöÝï:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Âëß:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "ÁöÝãá"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "ÂàÞåÚãâÝöÚ"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "¦ÝâíàßÐÛïæëï:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "½ïÜÐ (åãâçíÙèÐÕ)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "»öÝÕÙÝÐï"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "ÇÐæÒñàâÐÓÐ ßÐàÐÔÚÐ"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "ÁñÜÐÓÐ ßÐàÐÔÚÐ"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "ÁÚöÝãæì"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "ÁÚöÝãæì ÝÐÛÐÔë FluidSynth ßÐ ×ÜÐþçÐÝÝö."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ áÚöÝãæì ÝÐÛÐÔë FluidSynth ßÐ ×ÜÐþçÐÝÝö?"
+
+#: base/main.cpp:210
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "ÀãåÐÒöçÞÚ ÝÕ ßÐÔâàëÜÛöÒÐÕ þ×àÞÒÕÝì ÐÔÛÐÔÚö '%s'"
+
+#: base/main.cpp:288
+msgid "Menu"
+msgstr "¼ÕÝî"
+
+#: 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:294 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "¿Ðþ×Ð"
+
+#: base/main.cpp:297
+msgid "Skip line"
+msgstr "¿àÐßãáæöæì àÐÔÞÚ"
+
+#: base/main.cpp:468
+msgid "Error running game:"
+msgstr "¿ÐÜëÛÚÐ ×ÐßãáÚã ÓãÛìÝö:"
+
+#: base/main.cpp:492
+msgid "Could not find any engine capable of running the selected game"
+msgstr "½Õ ÜÐÓã ×ÝÐÙáæö àãåÐÒöçÞÚ ÔÛï ×ÐßãáÚã ÐÑàÐÝÐÙ ÓãÛìÝö"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "½ïÜÐ ßÐÜëÛÚö"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "½ïÜÐ äÐÙÛÐþ ÓãÛìÝö"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Game id ÝÕ ßÐÔâàëÜÛöÒÐÕææÐ"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "½ÕßÐÔâàëÜÞþÒÐÝë àíÖëÜ ÚÞÛÕàã"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "½ÕÔÐáâÐâÚÞÒÐ ßàÐÒÞþ ÔÛï çëâÐÝÝï"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "½ÕÔÐáâÐâÚÞÒÐ ßàÐÒÞþ ÔÛï ×Ðßöáã"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "ÈÛïå ÝÕ ×ÝÞÙÔ×ÕÝë"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "ÈÛïå ÝÕ ×'ïþÛïÕææÐ ÔëàíÚâÞàëïÙ"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "ÈÛïå ÝÕ ×'ïþÛïÕææÐ äÐÙÛÐÜ"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "½Õ ÜÐÓã áâÒÐàëæì äÐÙÛ"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "¿ÐÜëÛÚÐ çëâÐÝÝï ÔÐÔ×ÕÝëå"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "¿ÐÜëÛÚÐ ×Ðßöáã ÔÐÔ×ÕÝëå"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "½Õ ÜÐÓã ×ÝÐÙáæö ßÐÔëåÞÔÝë ßÛÐÓöÝ ÔÛï àãåÐÒöçÚÐ"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "ÀãåÐÒöçÞÚ ÝÕ ßÐÔâàëÜÛöÒÐÕ ×ÐåÐÒÐÝÝö"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "¿ÕàÐßëÝÕÝÐ ÚÐàëáâÐçÞÜ"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "½ÕÒïÔÞÜÐï ßÐÜëÛÚÐ"
+
+#: engines/advancedDetector.cpp:316
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "·ÔÐÕææÐ, èâÞ ÓãÛìÝï '%s' ïèçí ÝÕÒïÔÞÜÐ."
+
+#: engines/advancedDetector.cpp:317
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"ºÐÛö ÛÐáÚÐ, ßÕàÐÔÐÙæÕ ÝÐáâãßÝëï ÔÐÔ×ÕÝëï ÚÐÜÐÝÔ×Õ ScummVM àÐ×ÐÜ × ÝÐ×ÒÐÙ"
+
+#: engines/advancedDetector.cpp:319
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr "ÓãÛìÝö, ïÚãî Òë áßàÐÑãÕæÕ ÔÐÔÐæì, ö Ð×ÝÐçæÕ ïÕ ÒÕàáöî, ÜÞÒã ö Ó.Ô."
+
+#: engines/dialogs.cpp:84
+msgid "~R~esume"
+msgstr "¿àÐæïÓ~Ý~ãæì"
+
+#: engines/dialogs.cpp:86
+msgid "~L~oad"
+msgstr "·Ð~Ó~àã×öæì"
+
+#: engines/dialogs.cpp:90
+msgid "~S~ave"
+msgstr "·Ð~ß~öáÐæì"
+
+#: engines/dialogs.cpp:94
+msgid "~O~ptions"
+msgstr "~¾~ßæëö"
+
+#: engines/dialogs.cpp:99
+msgid "~H~elp"
+msgstr "~´~ÐßÐÜÞÓÐ"
+
+#: engines/dialogs.cpp:101
+msgid "~A~bout"
+msgstr "~¿~àÐ ßàÐÓàÐÜã"
+
+#: engines/dialogs.cpp:104 engines/dialogs.cpp:180
+msgid "~R~eturn to Launcher"
+msgstr "~³~ÐÛÞþÝÐÕ ÜÕÝî"
+
+#: engines/dialogs.cpp:106 engines/dialogs.cpp:182
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "~³~ÐÛÞþÝÐÕ ÜÕÝî"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:373
+msgid "Save game:"
+msgstr "·ÐåÐÒÐæì ÓãÛìÝî:"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: 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:373
+#: backends/platform/symbian/src/SymbianActions.cpp:44
+#: backends/platform/wince/CEActionsPocket.cpp:43
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Save"
+msgstr "·ÐåÐÒÐæì"
+
+#: engines/dialogs.cpp:144
+msgid ""
+"Sorry, this engine does not currently provide in-game help. Please consult "
+"the README for basic information, and for instructions on how to obtain "
+"further assistance."
+msgstr ""
+"¿àÐÑÐçæÕ, ÐÛÕ Óíâë àãåÐÒöçÞÚ ßÐÚãÛì ÝÕ ßÐÔÐÕ ÔÐßÐÜÞÓö þ ÓãÛìÝö. ºÐÛö ÛÐáÚÐ, "
+"×ÒïàÝöæÕáï ÔÐ äÐÙÛÐ README ×Ð ÑÐ×ÐÒÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö "
+"ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî ÔÐßÐÜÞÓã."
+
+#: engines/dialogs.cpp:228
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"½Õ ÐâàëÜÐÛÐáï ×ÐåÐÒÐæì ÓãÛìÝî (%s)! ºÐÛö ÛÐáÚÐ, ×ÒïàÝöæÕáï ÔÐ äÐÙÛÐ README "
+"×Ð ÑÐ×ÐÒÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì ÔÐÛÕÙèãî "
+"ÔÐßÐÜÞÓã."
+
+#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:170
+msgid "~O~K"
+msgstr "~¾~º"
+
+#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:171
+msgid "~C~ancel"
+msgstr "~°~ÔÜÕÝÐ"
+
+#: engines/dialogs.cpp:305
+msgid "~K~eys"
+msgstr "~º~ÛÐÒöèë"
+
+#: engines/engine.cpp:240
+msgid "Could not initialize color format."
+msgstr "½Õ ÜÐÓã öÝöæëïÛö×ÐÒÐæì äÐàÜÐâ ÚÞÛÕàã."
+
+#: engines/engine.cpp:248
+msgid "Could not switch to video mode: '"
+msgstr "½Õ ÐâàëÜÐÛÐáï ßÕàÐÚÛîçëæì ÒöÔíÐàíÖëÜ: '"
+
+#: engines/engine.cpp:257
+msgid "Could not apply aspect ratio setting."
+msgstr "½Õ ÐâàëÜÐÛÐáï ÒëÚÐàëáâÐæì ÚÐàíÚæëî áãÐÔÝÞáöÝ ÑÐÚÞþ."
+
+#: engines/engine.cpp:262
+msgid "Could not apply fullscreen setting."
+msgstr "½Õ ÜÐÓã þÖëæì ßÞþÝÐíÚàÐÝÝë àíÖëÜ."
+
+#: engines/engine.cpp:362
+msgid ""
+"You appear to be playing this game directly\n"
+"from the CD. This is known to cause problems,\n"
+"and it is therefore recommended that you copy\n"
+"the data files to your hard disk instead.\n"
+"See the README file for details."
+msgstr ""
+"·ÔÐÕææÐ, Òë áßàÐÑãÕæÕ ×Ðßãáæöæì Óíâã ÓãÛìÝî ßàÐÜÐ\n"
+"× CD. ³íâÐ ×ÒëçÐÙÝÐ ÒëÚÛöÚÐÕ ßàÐÑÛÕÜë, ö âÐÜã\n"
+"Üë àíÚÐÜÕÝÔãÕÜ áÚÐßöïÒÐæì äÐÙÛë ÔÐÔ×ÕÝëå ÓãÛìÝö\n"
+"ÝÐ ÖÞàáâÚö ÔëáÚ. ¿ÐÔàÐÑï×ÝÐáæö ÜÞÖÝÐ ×ÝÐÙáæö þ\n"
+"äÐÙÛÕ README."
+
+#: engines/engine.cpp:373
+msgid ""
+"This game has audio tracks in its disk. These\n"
+"tracks need to be ripped from the disk using\n"
+"an appropriate CD audio extracting tool in\n"
+"order to listen to the game's music.\n"
+"See the README file for details."
+msgstr ""
+"´ëáÚ ÓíâÐÙ ÓãÛìÝö þâàëÜÞþÒÐÕ ÓãÚÐÒëï ÔÐàÞÖÚö. ¦å\n"
+"ÝÕÐÑåÞÔÝÐ ßÕàÐßöáÐæì × ÔëáÚÐ × ÔÐßÐÜÞÓÐÙ\n"
+"ÐÔßÐÒÕÔÝÐÙ ßàÐÓàÐÜë ÔÛï ÚÐßöïÒÐÝÝï\n"
+"ÐþÔëñÔëáÚÐþ, ö âÞÛìÚö ßÐáÛï ÓíâÐÓÐ þ ÓãÛìÝö\n"
+"×'ïÒöææÐ Üã×ëÚÐ. ¿ÐÔàÐÑï×ÝÐáæö ÜÞÖÝÐ ×ÝÐÙáæö þ\n"
+"äÐÙÛÕ README."
+
+#: engines/engine.cpp: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 ""
+"½Õ ÐâàëÜÐÛÐáï ßàÐçëâÐæì ×ÐåÐÒÐÝÝÕ ÓãÛìÝö (%s)! ºÐÛö ÛÐáÚÐ, ×ÒïàÝöæÕáï þ äÐÙÛ "
+"README ×Ð ÑÐ×ÐÒÐÙ öÝäÐàÜÐæëïÙ, Ð âÐÚáÐÜÐ öÝáâàãÚæëïÜö ßàÐ âÞÕ, ïÚ ÐâàëÜÐæì "
+"ÔÐÛÕÙèãî ÔÐßÐÜÞÓã."
+
+#: 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 ""
+"¿°¿ÏÀÍ´¶°½½µ: ³ãÛìÝï, ïÚãî Òë ×ÑöàÐÕæÕáï ×Ðßãáæöæì, ïèçí ÝÕ ßÐÔâàëÜÛöÒÐÕææÐ "
+"ScummVM æÐÛÚÐÜ. ÏÝÐ, åãâçíÙ ×Ð þáñ, ÝÕ ÑãÔ×Õ ßàÐæÐÒÐæì áâÐÑöÛìÝÐ, ö "
+"×ÐåÐÒÐÝÝö ÓãÛìÝïþ ÜÞÓãæì ÝÕ ßàÐæÐÒÐæì ã ÑãÔãçëå ÒÕàáöïå ScummVM."
+
+#: engines/engine.cpp:447
+msgid "Start anyway"
+msgstr "Ãáñ ÐÔÝÞ ×Ðßãáæöæì"
+
+#: 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/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/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:841 engines/toltecs/menu.cpp:259
+msgid "Restore game:"
+msgstr "Ã×ÝÐÒöæì ÓãÛìÝî:"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:841 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 ""
+"ScummVM ÒëïÒöþ ã ÒÐá ×ÐåÐÒÐÝÝö ÓãÛìÝö Drascula ã áâÐàëÜ äÐàÜÐæÕ.\n"
+"ÁâÐàë äÐàÜÐâ ÑÞÛìè ÝÕ ßÐÔâàëÜÛöÒÐÕææÐ, ö, ÚÐÑ ×ÐÓàã×öæì ×ÐåÐÒÐÝÝö, ïÝë "
+"ßÐÒöÝÝë Ñëæì ßÕàÐÒÕÔ×ÕÝë þ ÝÞÒë äÐàÜÐâ.\n"
+"\n"
+"½ÐæöáÝöæÕ ¾º, ÚÐÑ ßÕàÐÒÕáæö öå ã ÝÞÒë äÐàÜÐâ ×ÐàÐ×, ã ÐÔÒÐàÞâÝëÜ ÒëßÐÔÚã "
+"ÓíâÐ ßÐÒÕÔÐÜÛÕÝÝÕ ×'ïÒöææÐ ×ÝÞþ ßàë ÝÐáâãßÝëÜ ×ÐßãáÚã ÓãÛìÝö.\n"
+
+#: engines/dreamweb/detection.cpp:57
+msgid "Use bright palette mode"
+msgstr "²ëÚÐàëáâÞþÒÐæì àíÖëÜ ïàÚÐÙ ßÐÛöâàë"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "¼ÐÛîÕ ÓàÐäöÚã × ÒëÚÐàëáâÐÝÝÕÜ ïàÚÐÙ ßÐÛöâàë ÓãÛìÝö"
+
+#: engines/sci/detection.cpp:373
+msgid "EGA undithering"
+msgstr "EGA ÑÕ× àÐáâàã"
+
+#: engines/sci/detection.cpp:374
+msgid "Enable undithering in EGA games"
+msgstr "ÃÚÛîçÐÕ àíÖëÜ ÑÕ× àÐáâàÐÒÐÝÝï þ EGA ÓãÛìÝïå"
+
+#: engines/sci/detection.cpp:383
+msgid "Prefer digital sound effects"
+msgstr "°ÔÔÐÒÐæì ßÕàÐÒÐÓã ÛöçÑÐÒëÜ ÓãÚÐÒëÜ íäÕÚâÐÜ"
+
+#: engines/sci/detection.cpp:384
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr "°ÔÔÐÒÐæì ßÕàÐÒÐÓã ÛöçÑÐÒëÜ ÓãÚÐÒëÜ íäÕÚâÐÜ ×ÐÜÕáâ áöÝâí×ÐÒÐÝëå"
+
+#: engines/sci/detection.cpp:403
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "²ëÚÐàëáâÞþÒÐæì IMF/Yamaha FB-01 ÔÛï ÒëÒÐÔã MIDI"
+
+#: engines/sci/detection.cpp:404
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"²ëÚÐàëáâÞþÒÐæì ÓãÚÐÒãî ÚÐàâã IBM Music Feature æö ÜÞÔãÛì áöÝâí×ã Yamaha "
+"FB-01 FM ÔÛï MIDI"
+
+#: engines/sci/detection.cpp:414
+msgid "Use CD audio"
+msgstr "²ëÚÐàëáâÞþÒÐæì CD ÐþÔëñ"
+
+#: engines/sci/detection.cpp:415
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr ""
+"²ëÚÐàëáâÞþÒÐæì ÓãÚÐÒëï ÔÐàÞÖÚö × CD ×ÐÜÕáâ Üã×ëÚö × äÐÙÛÐþ ÓãÛìÝö (ÚÐÛö "
+"ÔÐáâãßÝÐ)"
+
+#: engines/sci/detection.cpp:425
+msgid "Use Windows cursors"
+msgstr "²ëÚÐàëáâÞþÒÐæì ÚãàáÞàë Windows"
+
+#: 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:436
+msgid "Use silver cursors"
+msgstr "²ëÚÐàëáâÞþÒÐæì áàíÑÝëï ÚãàáÞàë"
+
+#: engines/sci/detection.cpp:437
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr ""
+"²ëÚÐàëáâÞþÒÐæì ÐÛìâíàÝÐâëþÝë ÝÐÑÞà áàíÑÝëå ÚãàáÞàÐþ ×ÐÜÕáâ ×ÒëçÐÙÝëå ×ÐÛÐâëå"
+
+#: engines/scumm/dialogs.cpp:175
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "ÃáâÐþæÕ ÔëáÚ %c ö ÝÐæöáÝöæÕ ÚÛÐÒöèã, ÚÐÑ ßàÐæïÓÝãæì."
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "½Õ ÐâàëÜÐÛÐáï ×ÝÐÙáæö %s, (%c%d) ½ÐæöáÝöæÕ ÚÛÐÒöèã."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "¿ÐÜëÛÚÐ çëâÐÝÝï ÔëáÚÐ %c, (%c%d) ½ÐæöáÝöæÕ ÚÛÐÒöèã."
+
+#: engines/scumm/dialogs.cpp:178
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "³ãÛìÝï áßëÝÕÝÐ. ½ÐæöáÝöæÕ ßàÐÑÕÛ, ÚÐÑ ßàÐæïÓÝãæì."
+
+#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
+#. "Moechten Sie wirklich neu starten? (J/N)J"
+#. Will react to J as 'Yes'
+#: engines/scumm/dialogs.cpp:182
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "²ë þßíþÝÕÝë, èâÞ ÖÐÔÐÕæÕ ßÐçÐæì ö×ÝÞþ? (Y/N)"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:184
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "²ë þßíþÝÕÝë, èâÞ ÖÐÔÐÕæÕ ÒëÙáæö? (Y/N)"
+
+#: engines/scumm/dialogs.cpp:189
+msgid "Play"
+msgstr "³ãÛïæì"
+
+#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:215
+msgid "Quit"
+msgstr "²ëåÐÔ"
+
+#: engines/scumm/dialogs.cpp:193
+msgid "Insert save/load game disk"
+msgstr "ÃáâÐþæÕ ÔëáÚ × ×ÐåÐÒÐÝÝïÜö"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "You must enter a name"
+msgstr "²ë ßÐÒöÝÝë þÒÕáæö öÜï"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "The game was NOT saved (disk full?)"
+msgstr "³ãÛìÝï ½µ ±Ë»° ×ÐßöáÐÝÐ (ÔëáÚ ßÞþÝë?)"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT loaded"
+msgstr "³ãÛìÝï ½µ ±Ë»° ×ÐÓàãÖÐÝÐ"
+
+#: engines/scumm/dialogs.cpp:197
+#, c-format
+msgid "Saving '%s'"
+msgstr "·ÐåÞþÒÐî '%s'"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Loading '%s'"
+msgstr "·ÐÓàãÖÐî '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+msgid "Name your SAVE game"
+msgstr "½Ð×ÐÒöæÕ ×ÐåÐÒÐÝÝÕ ÓãÛìÝö"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Select a game to LOAD"
+msgstr "°ÑïàëæÕ ÓãÛìÝî ÔÛï ×ÐÓàã×Úö"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Game title)"
+msgstr "½Ð×ÒÐ ÓãÛìÝö)"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:287
+msgid "~P~revious"
+msgstr "~¿~Ðßïà"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:289
+msgid "~N~ext"
+msgstr "~½~Ðáâ"
+
+#: engines/scumm/dialogs.cpp:290
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+msgid "~C~lose"
+msgstr "~·~ÐÚàëæì"
+
+#: engines/scumm/dialogs.cpp:597
+msgid "Speech Only"
+msgstr "ÂÞÛìÚö ÐÓãçÚÐ"
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech and Subtitles"
+msgstr "°ÓãçÚÐ ö áãÑâëâàë"
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Subtitles Only"
+msgstr "ÂÞÛìÚö áãÑâëâàë"
+
+#: engines/scumm/dialogs.cpp:607
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "°ÓãçÚÐ ö âíÚáâ"
+
+#: engines/scumm/dialogs.cpp:653
+msgid "Select a Proficiency Level."
+msgstr "°ÑïàëæÕ þ×àÞÒÕÝì áÚÛÐÔÐÝÐáæö."
+
+#: engines/scumm/dialogs.cpp:655
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "·Ð ÔÐßÐÜÞÓÐÙ ×ÒïàÝöæÕáï ÔÐ öÝáâàãÚæëö Loom(TM)."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Standard"
+msgstr "ÁâÐÝÔÐàâÝë"
+
+#: engines/scumm/dialogs.cpp:659
+msgid "Practice"
+msgstr "¿àÐÚâëÚÐÝâ"
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Expert"
+msgstr "ÍÚáßÕàâ"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "°ÓãÛìÝëï ÚÛÐÒöïâãàÝëï ÚÐÜÐÝÔë:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "´ëïÛÞÓ ×Ðßöáã / çëâÐÝÝï"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "¿àÐßãáæöæì àÐÔÞÚ"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "¿àÐßãáæöæì ×ÐáâÐþÚã"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "¿àÐÑÕÛ"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "¿Ðþ×Ð ÓãÛìÝö"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "·ÐÓàã×öæì ÓãÛìÝî 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "·ÐåÐÒÐæì ÓãÛìÝî 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "ÃÒÞÔ"
+
+#: engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "¿ÕàÐÚÛîçëæì ÝÐ þÒÕáì íÚàÐÝ"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "³ãçÝÐáæì Üã×ëÚö ßÐÒïÛöçëæì / ßÐÜÕÝèëæì"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "ÅãâÚÐáæì âíÚáâã åãâçíÙ / ßÐÒÞÛìÝÕÙ"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "ÍÜãÛïæëï ÛÕÒÐÙ ÚÛÐÒöèë Üëèë"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Tab"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "ÍÜãÛïæëï ßàÐÒÐÙ ÚÛÐÒöèë Üëèë"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "ÁßÕæëïÛìÝëï ÚÛÐÒöïâãàÝëï ÚÐÜÐÝÔë:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "¿ÐÚÐ×Ðæì / ¿àëÑàÐæì ÚÐÝáÞÛì"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "·ÐßãáÚ ÐÔÛÐÔçëÚÐ"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "¿ÐÚÐ×Ðæì áßÐÖëÒÐÝÝÕ ßÐÜïæö"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "·Ðßãáæöæì åãâÚö àíÖëÜ (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "·Ðßãáæöæì ÒÕÛìÜö åãâÚö àíÖëÜ (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "¿ÕàÐÚÛîçíÝÝÕ ßÕàÐåÞßã Üëèë"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "¿ÕàÐÚÛîçíÝÝÕ ßÐÜöÖ ÓàÐäöçÝëÜö äöÛìâàÐÜö"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "¿ÐÒïÛöçëæì/ßÐÜÕÝèëæì ÜÐèâÐÑ"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "¿ÕàÐÚÛîçíÝÝÕ ÚÐàíÚæëö áãÐÔÝÞáöÝ ÑÐÚÞþ"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* ²ëÚÐàëáâÐÝÝÕ Ctrl-F ö"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " Ctrl-G ÝÕ àíÚÐÜÕÝÔãÕææÐ,"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " ÑÞ ïÝë ÜÞÓãæì ßàëÒÕáæö ÔÐ"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " ÝïáÛãèÝÐÙ àÐÑÞâë ÓãÛìÝö."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr "·ÜïÝïÝëï çÐàÝÐÒöÚö ÝÐ ÚÛÐÒöïâãàë:"
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "°áÝÞþÝÐÕ ÚöàÐÒÐÝÝÕ ÓãÛìÝñÙ:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "¿åÐæì"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "ÆïÓÝãæì"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "´Ðæì"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "°ÔÚàëæì"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "¦áæö"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Ã×ïæì"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "²ëÚÐàëáâÐæì"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "ÇëâÐæì"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "½ÞÒë ßÕàá"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "ÃÚÛîçëæì"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "²ëÚÛîçëæì"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "¦áæö ÔÐ"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "¿ÐÔÝïæì"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "ÈâÞ âÐÚÞÕ"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "°ÔÚàëæì"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "¿ÐÚÛÐáæö"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "¿ÐÔÝïæì"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "²ëßàÐÒöæì"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "¿ÕàÐÚÛîçëæì"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "³ÛïÔ×Õæì"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "³ÐÒÐàëæì"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "¿ÐÔÐàÞÖÝöçÐæì"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "³ÕÝàë/¦ÝÔë"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "öÓàÐæì ÔÞ ÜöÝÞà ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "öÓàÐæì àí ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "öÓàÐæì Üö ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "öÓàÐæì äÐ ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "öÓàÐæì áÞÛì ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "öÓàÐæì Ûï ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "öÓàÐæì áö ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "öÓàÐæì ÔÞ ÜÐÖÞà ÝÐ ÚÐÛÐþàÞæÕ"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "ßåÐæì"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "æïÓÝãæì (çÐßÛïæì)"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "³ÐÒÐàëæì ×"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "³ÛïÔ×Õæì ÝÐ"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "ãÚÛîçëæì"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "ÒëÚÛîçëæì"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "ÃÒÕàå"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "¿ÐÔáÒïâÛöæì ßÐßïàíÔÝö ÔëïÛÞÓ"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "ÃÝö×"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "¿ÐÔáÒïâÛöæì ÝÐáâãßÝë ÔëïÛÞÓ"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "¦áæö"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "¦ÝÒÕÝâÐà"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "°Ñ'ÕÚâ"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "ÇÞàÝÐ-ÑÕÛë / ºÐÛïàÞÒë"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "²Þçë"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Ï×ëÚ"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "ÃÔÐà"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "½ÐÓÞÙ"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "¿àÐÒÕàëæì"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "·ÒëçÐÙÝë ÚãàáÞà"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "ºÐÜ"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "·ÐÓàã×öæì / ·ÐåÐÒÐæì / ½ÐÛÐÔë"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "°áâÐâÝïÕ ÚöàÐÒÐÝÝÕ ÓãÛìÝñÙ:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "¦ÝÒÕÝâÐà:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "¿àÐÚàãæöæì áßöá ãÒÕàå"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "¿àÐÚàãæöæì áßöá ãÝö×"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr "²ÕàåÝö ÛÕÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr "½öÖÝö ÛÕÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr "²ÕàåÝö ßàÐÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr "½öÖÝö ßàÐÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr "ÁïàíÔÝö ÛÕÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr "ÁïàíÔÝö ßàÐÒë ßàÐÔÜÕâ"
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "·ÜÕÝÐ ÓÕàÞï:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "´àãÓö ÓÕàÞÙ"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Âàíæö ÓÕàÞÙ"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "ºöàÐÒÐÝÝÕ ÑÞÕÜ (ÛöçÑÐÒëï ÚÛÐÒöèë)"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "ºàÞÚ ÝÐ×ÐÔ"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "°ÑÐàÞÝÐ ×ÒÕàåã"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "°ÑÐàÞÝÐ ßÐáïàíÔ×öÝÕ"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "°ÑÐàÞÝÐ ×Ýö×ã"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "ÃÔÐà ×ÒÕàåã"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "ÃÔÐà ßÐáïàíÔ×öÝÕ"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "ÃÔÐà ×Ýö×ã"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "³íâÐ ÚÐÛö ¦ÝÔë ×ÛÕÒÐ."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "ºÐÛö ¦ÝÔë áßàÐÒÐ,"
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 ö 1 ×ÜïÝïîææÐ ×"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 ö 3 ÐÔßÐÒÕÔÝÐ."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "ºöàÐÒÐÝÝÕ áÐÜÐÛñâÐÜ (ÛöçÑÐÒëï ÚÛÐÒöèë)"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "»ïæÕæì ÝÐÛÕÒÐ-þÒÕàå"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "»ïæÕæì ÝÐÛÕÒÐ"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "»ïæÕæì ÝÐÛÕÒÐ-þÝö×"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "»ïæÕæì ãÒÕàå"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "»ïæÕæì ßàÐÜÐ"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "»ïæÕæì ãÝö×"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "»ïæÕæì ÝÐßàÐÒÐ-þÒÕàå"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "»ïæÕæì ÝÐßàÐÒÐ"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "»ïæÕæì ÝÐßàÐÒÐ-þÝö×"
+
+#: engines/scumm/scumm.cpp:1776
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"ÀíÖëÜ \"àÞÔÝÐÓÐ\" MIDI ßÐâàÐÑãÕ ÐÑÝÐþÛÕÝÝÕ Roland Upgrade ÐÔ\n"
+"LucasArts, ÐÛÕ ÝÕ åÐßÐÕ %s. ¿ÕàÐÚÛîçÐîáï ÝÐ AdLib."
+
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"½Õ ÐâàëÜÐÛÐáï ×ÐßöáÐæì ÓãÛìÝî þ äÐÙÛ:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"½Õ ÐâàëÜÐÛÐáï ×ÐÓàã×öæì ÓãÛìÝî × äÐÙÛÐ:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"³ãÛìÝï ßÐáßïåÞÒÐ ×ÐåÐÒÐÝÐ þ äÐÙÛ:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp: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' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"·ÐàÐ× ßÐÒöÝÝÐ ×ÐßãáæöææÐ ÓãÛìÝï Maniac Mansion. °ÛÕ ScummVM ßÐÚãÛì ÓíâÐÓÐ ÝÕ "
+"þÜÕÕ. ºÐÑ ×ÓãÛïæì, ÝÐæöáÝöæÕ '½ÞÒÐï ÓãÛìÝï' ã áâÐàâÐÒëÜ ÜÕÝî ScummVM, Ð "
+"×ÐâëÜ ÐÑïàëæÕ ÔëàíÚâÞàëî Maniac ã ÔëàíÚâÞàëö × ÓãÛìÝñÙ Tentacle."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
+msgid "~Z~ip Mode Activated"
+msgstr "ÀíÖëÜ åãâÚÐÓÐ ßÕàÐåÞÔã ÐÚâëÒÐÒÐÝë"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "¿ÕàÐåÞÔë ÐÚâëÒÐÒÐÝë"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "²ëÚöÝãæì áâÐàÞÝÚã"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "¿ÞÚÐ×Ðâì ÚÐàâã"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "³ÐÛÞþÝÐÕ ÜÕÝî"
+
+#: engines/mohawk/dialogs.cpp:168
+msgid "~W~ater Effect Enabled"
+msgstr "ÍäÕÚâë ÒÐÔë þÚÛîçÐÝë"
+
+#: engines/agos/animation.cpp:557
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "ÄÐÙÛ ×ÐáâÐþÚö '%s' ÝÕ ×ÝÞÙÔ×ÕÝë!"
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287
+#: engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "½Õ ÐâàëÜÐÛÐáï ×ÐÓàã×öæì ×ÐåÐÒÐÝãî ÓãÛìÝî × äÐÙÛÐ."
+
+#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "½Õ ÐâàëÜÐÛÐáï ×ÐåÐÒÐæì ÓãÛìÝî þ äÐÙÛ."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "½Õ ÐâàëÜÐÛÐáï ÒëÔÐÛöæì äÐÙÛ."
+
+#: engines/groovie/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 "½Õ ÐâàëÜÐÛÐáï ×ÐåÐÒÐæì ÓãÛìÝî"
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "ÁâãÔëÙÝÐï ÐþÔëâÞàëï"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "ÃÚÛîçëæì ÓãÚö ÐþÔëâÞàëö þ áâãÔëö"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "¿ÐÔâàëÜÚÐ ßàÞßãáÚÐþ"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "ÃÚÛîçÐÕ ÜÐÓçëÜÐáæì ßàÐßãáÚÐæì âíÚáâë ö ×ÐáâÐþÚö"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "ÀíÖëÜ ÓÕÛöï"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "ÃÚÛîçëæì àíÖëÜ ÓÕÛöï"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "¿ÛëþÝÐï ßàÐÓÞàâÚÐ"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "ÃÚÛîçëæì ßÛëþÝãî ßàÐÓÞàâÚã ßÐÔçÐá åÐÔë"
+
+#. I18N: When enabled, this option changes the cursor when it floats to the
+#. edge of the screen to a directional arrow. The player can then click to
+#. walk towards that direction.
+#: engines/kyra/detection.cpp:112
+msgid "Floating cursors"
+msgstr "¿ÛëÒãçëï ÚãàáÞàë"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "ÃÚÛîçëæì ßÛëÒãçëï ÚãàáÞàë"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "¿ÐÛÞáÚö ×ÔÐàÞþï"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "ÃÚÛîçëæì ÐÔÛîáâàÐÒÐÝÝÕ ßÐÛÞáÐÚ ×ÔÐàÞþï"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "°âÐÚÐ 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "°âÐÚÐ 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "°âÐÚÐ 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "¦áæö ÝÐßÕàÐÔ"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "¦áæö ÝÐ×ÐÔ"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "ÁÛö×ÓÐæì ÝÐÛÕÒÐ"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "ÁÛö×ÓÐæì ÝÐßàÐÒÐ"
+
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
+msgid "Turn Left"
+msgstr "¿ÐÒÐàÞâ ÝÐÛÕÒÐ"
+
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
+msgid "Turn Right"
+msgstr "¿ÐÒÐàÞâ ÝÐßàÐÒÐ"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "°ÔßÐçëæì"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "¾ßæëö"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "°ÑàÐæì ×ÐÓÐÒÞà"
+
+#: engines/kyra/sound_midi.cpp:477
+msgid ""
+"You appear to be using a General MIDI device,\n"
+"but your game only supports Roland MT32 MIDI.\n"
+"We try to map the Roland MT32 instruments to\n"
+"General MIDI ones. It is still possible that\n"
+"some tracks sound incorrect."
+msgstr ""
+"·ÔÐÕææÐ, Òë áßàÐÑãÕæÕ ÒëÚÐàëáâÞþÒÐæì ßàëÛÐÔã\n"
+"General MIDI, ÐÛÕ ÓíâÐï ÓãÛìÝï ßÐÔâàëÜÛöÒÐÕ âÞÛìÚö\n"
+"Roland MT32 MIDI. ¼ë ßÐáßàÐÑãÕÜ ßÐÔÐÑàÐæì General\n"
+"MIDI ßàëÛÐÔë, ßÐÔÞÑÝëï ÝÐ Roland MT32, ÐÛÕ\n"
+"ÜÞÖÐ âÐÚ ÐâàëÜÐææÐ, èâÞ ÝÕÚÐâÞàëï âàíÚö ÑãÔãæì\n"
+"áëÓàÐÝë ÝïßàÐÒöÛìÝÐ."
+
+#: engines/queen/queen.cpp:59
+msgid "Alternative intro"
+msgstr "°ÛìâíàÝÐâëþÝë þáâãß"
+
+#: engines/queen/queen.cpp:60
+msgid "Use an alternative game intro (CD version only)"
+msgstr "²ëÚÐàëáâÞþÒÐæì ÐÛìâíàÝÐâëþÝë þáâãß (âÞÛìÚö ÔÛï CD ÒÕàáöö ÓãÛìÝö)"
+
+#: engines/sky/compact.cpp:130
+msgid ""
+"Unable to find \"sky.cpt\" file!\n"
+"Please download it from www.scummvm.org"
+msgstr ""
+"°ÔáãâÝöçÐÕ äÐÙÛ sky.cpt!\n"
+"ºÐÛö ÛÐáÚÐ, ×ÐßÐÜßãÙæÕ ïÓÞ × www.scummvm.org"
+
+#: engines/sky/compact.cpp:141
+msgid ""
+"The \"sky.cpt\" file has an incorrect size.\n"
+"Please (re)download it from www.scummvm.org"
+msgstr ""
+"ÄÐÙÛ sky.cpt ÜÐÕ ÝïßàÐÒöÛìÝë ßÐÜÕà.\n"
+"ºÐÛö ÛÐáÚÐ, ×ÐßÐÜßãÙæÕ ïÓÞ ÝÐÝÞÒÐ × www.scummvm.org"
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Ãáâãß × ÔëáÚÕâ"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "²ëÚÐàëáâÞþÒÐæì ãáâãß × ÓÝãâÚöå ÔëáÚÐþ (âÞÛìÚö ÔÛï CD ÒÕàáöö ÓãÛìÝö)"
+
+#: engines/sword1/animation.cpp:519
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "·ÐáâÐþÚÐ PSX '%s' ÝÕ ÜÞÖÐ Ñëæì ßàÐÙÓàÐÝÐ þ àíÖëÜÕ × ßÐÛöâàÐÙ"
+
+#: 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:550 engines/sword2/animation.cpp:449
+msgid "MPEG2 cutscenes are no longer supported"
+msgstr "·ÐáâÐþÚö þ äÐàÜÐæÕ MPEG2 ÑÞÛìè ÝÕ ßÐÔâàëÜÛöÒÐîææÐ"
+
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "·ÐáâÐþÚÐ '%s' ÝÕ ×ÝÞÙÔ×ÕÝÐ"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"ScummVM ÒëïÒöþ ã ÒÐá ×ÐåÐÒÐÝÝö ÓãÛìÝö Broken Sword 1 ã áâÐàëÜ äÐàÜÐæÕ.\n"
+"ÁâÐàë äÐàÜÐâ ÑÞÛìè ÝÕ ßÐÔâàëÜÛöÒÐÕææÐ, ö, ÚÐÑ ×ÐÓàã×öæì ×ÐåÐÒÐÝÝö, ïÝë "
+"ßÐÒöÝÝë Ñëæì ßÕàÐÒÕÔ×ÕÝë þ ÝÞÒë äÐàÜÐâ.\n"
+"\n"
+"½ÐæöáÝöæÕ ¾º, ÚÐÑ ßÕàÐÒÕáæö öå ã ÝÞÒë äÐàÜÐâ ×ÐàÐ×, ã ÐÔÒÐàÞâÝëÜ ÒëßÐÔÚã "
+"ÓíâÐ ßÐÒÕÔÐÜÛÕÝÝÕ ×'ïÒöææÐ ×ÝÞþ ßàë ÝÐáâãßÝëÜ ×ÐßãáÚã ÓãÛìÝö.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"·ÐåÐÒÐÝÝÕ ÓãÛìÝö × âÐÚöÜ öÜÕÜ ãÖÞ öáÝãÕ!\n"
+"²ë ÖÐÔÐÕæÕ ßÐÚöÝãæì áâÐàãî ÝÐ×Òã (%s) æö ×àÐÑöæì ÝÞÒãî (%s)?\n"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the old one"
+msgstr "¿ÐÚöÝãæì áâÐàÞÕ"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the new one"
+msgstr "·àÐÑöæì ÝÞÒÐÕ"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "³íâÐ ×ÐÒïàèíÝÝÕ ÔíÜÐ Broken Sword 1"
+
+#: engines/sword2/animation.cpp:419
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr ""
+"·ÝÞÙÔ×ÕÝë ×ÐáâÐþÚö þ äÐàÜÐæÕ PSX, ÐÛÕ ScummVM Ñëþ áÐÑàÐÝë ÑÕ× ßÐÔâàëÜÚö RGB "
+"ÚÞÛÕàÐþ"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "¿ÐÚÐ×ÒÐæì ÝÐ×Òë ÐÑ'ÕÚâÐþ"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "¿ÐÚÐ×ÒÐÕ ÝÐ×Òë ÐÑ'ÕÚâÐþ ßàë ÝÐÒïÔ×ÕÝÝö ÚãàáÞàÐ Üëèë"
+
+#: engines/teenagent/resources.cpp:94
+msgid ""
+"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+msgstr ""
+"à ÒÐá ÐÔáãâÝöçÐÕ äÐÙÛ 'teenagent.dat'. ·ÐßÐÜßãÙæÕ ïÓÞ × ÒíÑ-áÐÙâÐ 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 ""
+"ÄÐÙÛ teenagent.dat ×ÖÐâë, ÐÛÕ zlib ÝÕ þÚÛîçÐÝÐ þ Óíâã ßàÐÓàÐÜã. ºÐÛö ÛÐáÚÐ, "
+"àÐáßÐÚãÙæÕ ïÓÞ"
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"½Õ ÜÐÓã ×ÐåÐÒÐæì ÓãÛìÝî þ ßÐ×öæëî %i\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "·ÐÓàãÖÐî ÓãÛìÝî..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "·ÐåÞþÒÐî ÓãÛìÝî..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"ScummVM ×ÝÐÙèÞþ ã ÒÐá áâÐàëï ×ÐåÐÒÐÝÝö ÓãÛìÝö Nippon Safes, ïÚöï ÝÕÐÑåÞÔÝÐ "
+"ßÕàÐÝÐ×ÒÐæì. ÁâÐàëï ÝÐ×Òë ÑÞÛìè ÝÕ ßÐÔâàëÜÛöÒÐîææÐ, ö âÐÜã Òë ÝÕ ×ÜÞÖÐæÕ "
+"×ÐÓàã×öæì ×ÐåÐÒÐÝÝö, ÚÐÛö ÝÕ ßÕàÐÝÐ×ÐÒÕæÕ öå.\n"
+"\n"
+"½ÐæöáÝöæÕ ¾º, ÚÐÑ ßÕàÐÝÐ×ÒÐæì öå ×ÐàÐ×, ã ÐÔÒÐàÞâÝëÜ ÒëßÐÔÚã ÓíâÐ Ö "
+"ßÐÒÕÔÐÜÛÕÝÝÕ ×'ïÒöææÐ ßàë ÝÐáâãßÝëÜ ×ÐßãáÚã ÓãÛìÝö.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM ßÐáßïåÞÒÐ ßÕàÐþâÒÐàëþ ãáÕ ÒÐèë ×ÐåÐÒÐÝÝö ÓãÛìÝïþ."
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"ScummVM ÝÐßöáÐþ ÝÕÚÐÛìÚö ßÐßïàíÔÖÐÝÝïþ ã ÐÚÝÞ ÚÐÝáÞÛö ö ÝÕ ×ÜÞÓ ßÕàÐþâÒÐàëæì "
+"ãáÕ äÐÙÛë.\n"
+"\n"
+"ºÐÛö ÛÐáÚÐ, ßÐÒÕÔÐÜöæÕ ßàÐ ÓíâÐ ÚÐÜÐÝÔ×Õ ScummVM."
+
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "½ïßàÐÒöÛìÝÐÕ öÜï äÐÙÛÐ ×ÐåÐÒÐÝÝï"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "ÃÒÕàå/¼ÐèâÐÑ+/½ÐßÕàÐÔ/°ÔçëÝöæì Ô×ÒÕàë"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "ÃÝö×/¿ÐÜÕÝè. ÜÐèâÐÑ"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "¿ÐÚÐ×Ðæì/áåÐÒÐæì öÝÒÕÝâÐà"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "¿ÐÚÐ×Ðæì/áåÐÒÐæì Ñöïçëß"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "´×ÕïÝÝÕ/°ÑàÐæì"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "¿ÕàÐÚÛîçëæì"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "¿ÐÚÐ×Ðæì/áåÐÒÐæì öÝäÐàÜÐæëî"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "¿ÐÚÐ×Ðæì/áåÐÒÐæì ÜÕÝî ßÐþ×ë"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
+#: audio/fmopl.cpp:49
+msgid "MAME OPL emulator"
+msgstr "ÍÜãÛïâÐà MAME OPL"
+
+#: audio/fmopl.cpp:51
+msgid "DOSBox OPL emulator"
+msgstr "ÍÜãÛïâÐà DOSBox OPL"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"°ÑàÐÝÐï ÓãÚÐÒÐï ßàëÛÐÔÐ '%s' ÝÕ ÑëÛÐ ×ÝÞÙÔ×ÕÝÐ (ÜÐÓçëÜÐ, ïÝÐ ÒëÚÛîçÐÝÐ æö ÝÕ "
+"ßÐÔÚÛîçÐÝÐ)."
+
+#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
+#: audio/mididrv.cpp:272
+msgid "Attempting to fall back to the next available device..."
+msgstr "ÁßàÐÑãî ÒëÚÐàëáâÐæì öÝèãî ÔÐáâãßÝãî ßàëÛÐÔã..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"°ÑàÐÝÐï ÓãÚÐÒÐï ßàëÛÐÔÐ '%s' ÝÕ ÜÞÖÐ Ñëæì áÚÐàëáâÐÝÐ. ³ÛïÔ×öæÕ äÐÙÛ "
+"ßàÐâÐÚÞÛã ÔÛï ÑÞÛìè ßÐÔàÐÑï×ÝÐÙ öÝäÐàÜÐæëö."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"¿ÕàÐÒÐÖÝÐï ÓãÚÐÒÐï ßàëÛÐÔÐ '%s' ÝÕ ÑëÛÐ ×ÝÞÙÔ×ÕÝÐ (ÜÐÓçëÜÐ, ïÝÐ ÒëÚÛîçÐÝÐ æö "
+"ÝÕ ßÐÔÚÛîçÐÝÐ)."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"¿ÕàÐÒÐÖÝÐï ÓãÚÐÒÐï ßàëÛÐÔÐ '%s' ÝÕ ÜÞÖÐ Ñëæì áÚÐàëáâÐÝÐ. ³ÛïÔ×öæÕ äÐÙÛ "
+"ßàÐâÐÚÞÛã ÔÛï ÑÞÛìè ßÐÔàÐÑï×ÝÐÙ öÝäÐàÜÐæëö."
+
+#: audio/null.h:43
+msgid "No music"
+msgstr "±Õ× Üã×ëÚö"
+
+#: audio/mods/paula.cpp:189
+msgid "Amiga Audio Emulator"
+msgstr "ÍÜãÛïâÐà ÓãÚã Amiga"
+
+#: audio/softsynth/adlib.cpp:2284
+msgid "AdLib Emulator"
+msgstr "ÍÜãÛïâÐà AdLib"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "ÍÜãÛïâÐà Apple II GS (ÐÔáãâÝöçÐÕ)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "ÍÜãÛïâÐà ÓãÚã C64"
+
+#: audio/softsynth/mt32.cpp:205
+msgid "Initializing MT-32 Emulator"
+msgstr "½ÐÛÐÔÖÒÐî íÜãÛïâÐà MT-32"
+
+#: audio/softsynth/mt32.cpp:431
+msgid "MT-32 Emulator"
+msgstr "ÍÜãÛïâÐà MT-32"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "ÍÜãÛïâÐà PC áßöÚÕàÐ"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "ÍÜãÛïâÐà IBM PCjr"
+
+#: backends/keymapper/remap-dialog.cpp:47
+msgid "Keymap:"
+msgstr "ÂÐÑÛöæÐ ÚÛÐÒöè:"
+
+#: backends/keymapper/remap-dialog.cpp:66
+msgid " (Effective)"
+msgstr " (´×ÕÙáÝÐï)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Active)"
+msgstr " (°ÚâëþÝÐï)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Blocked)"
+msgstr " (·ÐÑÛÐÚÐÒÐÝÐ)"
+
+#: backends/keymapper/remap-dialog.cpp:119
+msgid " (Global)"
+msgstr " (³ÛÐÑÐÛìÝÐï)"
+
+#: backends/keymapper/remap-dialog.cpp:127
+msgid " (Game)"
+msgstr " (³ãÛìÝö)"
+
+#: backends/midi/windows.cpp:164
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "³ÐÛÞþÝÐÕ ÜÕÝî ScummVM"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "»ÕÒÐàãÚö àíÖëÜ"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "ºöàÐÒÐÝÝÕ ÑÐïÜö þ Indy"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "¿ÐÚÐ×ÒÐæì ÚãàáÞà Üëèë"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "¿àëÜÐæÐÒÐæì ÔÐ ÜÕÖ"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "·àãèíÝÝÕ ÔÞâëÚÐþ ßÐ ÒÞáö X"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "·àãèíÝÝÕ ÔÞâëÚÐþ ßÐ ÒÞáö Y"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "²ëÚÐàëáâÞþÒÐæì ÚöàÐÒÐÝÝÕ ÚãàáÞàÐÜ ïÚ ÝÐ âàíÚßÐÔ×Õ ÛíßâÞßÐþ"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr "ÂÐß ÔÛï ÛÕÒÐÙ ßáâàëçÚö, ßÐÔÒÞÙÝë âÐß ÔÛï ßàÐÒÐÙ ßáâàëçÚö"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "°ÔçãÒÐÛìÝÐáæì"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr "¿ÐçÐâÚÞÒë ÜÐèâÐÑ ÒÕàåÝïÓÐ íÚàÐÝÐ:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "¼ÐèâÐÑ ÓÐÛÞþÝÐÓÐ íÚàÐÝÐ:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "ÅÐàÔÒÐàÝÐÕ ÜÐèâÐÑÐÒÐÝÝÕ (åãâÚÐ, ÐÛÕ Ýö×ÚÐÙ ïÚÐáæö)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "¿àÐÓàÐÜÝÐÕ ÜÐèâÐÑÐÒÐÝÝÕ (ÔÞÑàÐï ïÚÐáæì, ÐÛÕ ÜÐàãÔÝÕÙ)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "±Õ× ÜÐèâÐÑÐÒÐÝÝï (âàíÑÐ ÑãÔ×Õ ßàÐÚàãçÒÐæì ÝÐÛÕÒÐ ö ÝÐßàÐÒÐ)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "ÏàÚÐáæì:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "²ëáÞÚÐï ïÚÐáæì ÓãÚã (ÜÐàãÔÝÕÙ) (àíÑãâ)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr "·ÐÑÐàÐÝöæì ÒëÚÛîçíÝÝÕ"
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "ÀíÖëÜ Üëèë ÝÐæöáÝãæì-ö-æïÓÝãæì ãÚÛîçÐÝë."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "ÀíÖëÜ Üëèë ÝÐæöáÝãæì-ö-æïÓÝãæì ÒëÚÛîçÐÝë."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "ÀíÖëÜ âÐçßÐÔÐ þÚÛîçÐÝë."
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "ÀíÖëÜ âÐçßÐÔÐ ÒëÚÛîçÐÝë."
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "ÀíÖëÜ ßáâàëçÚö"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/bada/form.cpp:281
+msgid "Left Click"
+msgstr "»ÕÒÐï ßáâàëçÚÐ"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "ÁïàíÔÝïï ßáâàëçÚÐ"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/bada/form.cpp:273
+msgid "Right Click"
+msgstr "¿àÐÒÐï ßáâàëçÚÐ"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
+msgid "Hide ScummVM"
+msgstr "ÁåÐÒÐæì ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
+msgid "Hide Others"
+msgstr "ÁåÐÒÐæì ÐáâÐâÝöï"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
+msgid "Show All"
+msgstr "¿ÐÚÐ×Ðæì ãáñ"
+
+#: 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:114
+msgid "Minimize"
+msgstr "¿àëÑàÐæì ã Dock"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
+msgid "Normal (no scaling)"
+msgstr "±Õ× ßÐÒÕÛöçíÝÝï"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "±Õ× ßÐÒÕÛöçíÝÝï"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
+msgid "Enabled aspect ratio correction"
+msgstr "ºÐàíÚæëï áãÐÔÝÞáöÝ ÑÐÚÞþ ãÚÛîçÐÝÐ"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+msgid "Disabled aspect ratio correction"
+msgstr "ºÐàíÚæëï áãÐÔÝÞáöÝ ÑÐÚÞþ ÒëÚÛîçÐÝÐ"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196
+msgid "Active graphics filter:"
+msgstr "°ÚâëþÝë ÓàÐäöçÝë äöÛìâà:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
+msgid "Windowed mode"
+msgstr "°ÚÞÝÝë àíÖëÜ"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:135
+msgid "OpenGL Normal"
+msgstr "OpenGL ÑÕ× ßÐÒÕÛöçíÝÝï"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:136
+msgid "OpenGL Conserve"
+msgstr "OpenGL × ×ÐåÐÒÐÝÝÕÜ"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:137
+msgid "OpenGL Original"
+msgstr "OpenGL ßÕàèÐßÐçÐâÚÞÒë"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415
+msgid "Current display mode"
+msgstr "±ïÓãçë ÒöÔíÐàíÖëÜ"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:428
+msgid "Current scale"
+msgstr "±ïÓãçë ÜÐèâÐÑ"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
+msgid "Active filter mode: Linear"
+msgstr "°ÚâëþÝë àíÖëÜ äöÛìâàÐ: »öÝÕÙÝë"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
+msgid "Active filter mode: Nearest"
+msgstr "°ÚâëþÝë àíÖëÜ äöÛìâàÐ: ½ÐÙÑÛö×Úö"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "ÃÒÕàå"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "ÃÝö×"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "½ÐÛÕÒÐ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "½ÐßàÐÒÐ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr "·ÞÝÐ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr "¼ãÛìâëäãÝÚæëï"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "·ÜïÝöæì ÓÕàÞï"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "¿àÐßãáæöæì âíÚáâ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "ÅãâÚö àíÖëÜ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "°ÔÛÐÔçëÚ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "³ÛÐÑÐÛìÝÐÕ ÜÕÝî"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "²öàâãÐÛìÝÐï ÚÛÐÒöïâãàÐ"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "¿àë×ÝÐçíÝÝÕ ÚÛÐÒöè"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ÒëÙáæö?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "²öÔíÐ"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "±ïÓãçë ÒöÔíÐàíÖëÜ:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr "´ÒÐÙÝë þÔÐà"
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "³Ðàë×ÐÝâÐÛìÝë underscan:"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "²ÕàâëÚÐÛìÝë underscan:"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "ÃÒÞÔ"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "°ÔçãÒÐÛìÝÐáæì GC ßÐÔÐ:"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "¿ÐáÚÐàíÝÝÕ GC ßÐÔÐ:"
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr "DVD"
+
+#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101
+msgid "Status:"
+msgstr "ÁâÐÝ:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "½ÕÒïÔÞÜÐ"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "¿ÐÔÚÛîçëæì DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "°ÔÚÛîçëæì DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "ÁÕàÒÕà:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "ÁÕâÚÐÒÐï âíçÚÐ:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "ºÐàëáâÐç:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "¿ÐàÞÛì:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "¦ÝöæëïÛö×Ðæëï áÕâÚö"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "¿ÐÔÚÛîçëæì SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "°ÔÚÛîçëæì SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD ßÐÔÚÛîçÐÝë ßÐáßïåÞÒÐ"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "¿ÐÜëÛÚÐ ßàë ßÐÔÚÛîçíÝÝö DVD"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD ÝÕ ßÐÔÚÛîçÐÝë"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "ÁÕâÚÐ ßàÐæãÕ, âíçÚÐ ßÐÔÚÛîçÐÝÐ"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "ÁÕâÚÐ ßàÐæãÕ"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", ßÐÜëÛÚÐ ßàë ßÐÔÚÛîçíÝÝö âíçÚö"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", âíçÚÐ ÝÕ ßÐÔÚÛîçÐÝÐ"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "ÁÕâÚÐ ÒëÚÛîçÐÝÐ"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "½ÐÛÐÔÖÒÐî áÕâÚã"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "ÇÐá ßÐÔÚÛîçíÝÝï ÔÐ áÕâÚö ÜöÝãþ"
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "ÁÕâÚÐ ÝÕ ÝÐÛÐÔ×öÛÐáï (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "ÁåÐÒÐæì ßÐÝíÛì öÝáâàãÜÕÝâÐþ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "¿ÐÚÐ×Ðæì ÚÛÐÒöïâãàã"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "³ãÚ ãÚÛ/ÒëÚÛ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "¿àÐÒÐï ßáâàëçÚÐ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "¿ÐÚÐ×Ðæì/¿àëÑàÐæì ÚãàáÞà"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "²ÞÛìÝë ÐÓÛïÔ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "¿ÐÒïÛ. ÜÐèâÐÑ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "¿ÐÜÕÝè. ÜÐèâÐÑ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "¿àë×ÝÐçëæì ÚÛÐÒöèë"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "ºãàáÞà ãÒÕàå"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "ºãàáÞà ãÝö×"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "ºãàáÞà ÝÐÛÕÒÐ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "ºãàáÞà ÝÐßàÐÒÐ"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "²ë ÖÐÔÐÕæÕ ×ÐÓàã×öæì ÐÑÞ ×ÐåÐÒÐæì ÓãÛìÝî?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr " ²ë þßíþÝÕÝë, èâÞ ÖÐÔÐÕæÕ ÒëÙáæö? "
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "ºÛÐÒöïâãàÐ"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "¿ÐÒïàÝãæì"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "²ëÚÐàëáâÞþÒÐî ÔàÐÙÒÕà SDL "
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "¿ÐÚÐ×Ðæì "
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "²ë ÖÐÔÐÕæÕ ×àÐÑöæì ÐþâÐÜÐâëçÝë ßÞèãÚ?"
+
+#: backends/platform/wince/wince-sdl.cpp:515
+msgid "Map right click action"
+msgstr "¿àë×ÝÐçëæì Ô×ÕïÝÝÕ ßÐ ßàÐÒÐÙ ßáâàëçæë"
+
+#: backends/platform/wince/wince-sdl.cpp:519
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"²ë ßÐÒöÝÝë ßàë×ÝÐçëæì ÚÛÐÒöèã ÝÐ Ô×ÕïÝÝÕ 'Right Click' ÔÛï ÓíâÐÙ ÓãÛìÝö"
+
+#: backends/platform/wince/wince-sdl.cpp:528
+msgid "Map hide toolbar action"
+msgstr "¿àë×ÝÐçëæì Ô×ÕïÝÝÕ 'áåÐÒÐæì ßÐÝíÛì öÝáâàãÜÕÝâÐþ'"
+
+#: backends/platform/wince/wince-sdl.cpp:532
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"²ë ßÐÒöÝÝë ßàë×ÝÐçëæì ÚÛÐÒöèã ÝÐ Ô×ÕïÝÝÕ 'Hide toolbar' ÔÛï ÓíâÐÙ ÓãÛìÝö"
+
+#: backends/platform/wince/wince-sdl.cpp:541
+msgid "Map Zoom Up action (optional)"
+msgstr "¿àë×ÝÐçëæì Ô×ÕïÝÝÕ ¿ÐÒïÛöçëæì ¼ÐèâÐÑ (ÝÕÐÑÐÒï×ÚÞÒÐ)"
+
+#: backends/platform/wince/wince-sdl.cpp:544
+msgid "Map Zoom Down action (optional)"
+msgstr "¿àë×ÝÐçëæì Ô×ÕïÝÝÕ ¿ÐÜÕÝèëæì ¼ÐèâÐÑ (ÝÕÐÑÐÒï×ÚÞÒÐ)"
+
+#: backends/platform/wince/wince-sdl.cpp:552
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"½Õ ×ÐÑãÔ×ìæÕáï ßàë×ÝÐçëæì ÚÛÐÒöèã ÔÛï Ô×ÕïÝÝï 'Hide Toolbar', ÚÐÑ ãÑÐçëæì "
+"ãÒÕáì öÝÒÕÝâÐà ã ÓãÛìÝö"
+
+#: backends/events/default/default-events.cpp:193
+msgid "Do you really want to return to the Launcher?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ÒïàÝãææÐ þ ÓÐÛÞþÝÐÕ ÜÕÝî?"
+
+#: backends/events/default/default-events.cpp:193
+msgid "Launcher"
+msgstr "³ÐÛÞþÝÐÕ ÜÕÝî"
+
+#: backends/events/default/default-events.cpp:215
+msgid "Do you really want to quit?"
+msgstr "²ë áÐßàÐþÔë ÖÐÔÐÕæÕ ÒëÙáæö?"
+
+#: backends/events/gph/gph-events.cpp:386
+#: backends/events/gph/gph-events.cpp:429
+#: backends/events/openpandora/op-events.cpp: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: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:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "ÀíÖëÜ 'ÔÞâëÚÐþ' âÐçáÚàëÝÐ - ¿àÐÛñâ (ÑÕ× ÚÛöÚã)"
+
+#: backends/events/gph/gph-events.cpp:410
+msgid "Maximum Volume"
+msgstr "¼ÐÚáöÜÐÛìÝÐï ÓãçÝÐáæì"
+
+#: backends/events/gph/gph-events.cpp:412
+msgid "Increasing Volume"
+msgstr "¿ÐÒÕÛöçíÝÝÕ ÓãçÝÐáæö"
+
+#: backends/events/gph/gph-events.cpp:418
+msgid "Minimal Volume"
+msgstr "¼öÝöÜÐÛìÝÐï ÓãçÝÐáæì"
+
+#: backends/events/gph/gph-events.cpp:420
+msgid "Decreasing Volume"
+msgstr "¿ÐÜïÝèíÝÝÕ ÓãçÝÐáæö"
+
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "ÀíÖëÜ 'ÔÞâëÚÐþ' âÐçáÚàëÝÐ - ¿àÐÛñâ (ÚÛöÚö ßÐ DPad)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
+msgid "Check for Updates..."
+msgstr "¿àÐÒïàÐî ÐÑÝÐþÛÕÝÝö..."
+
+#: backends/platform/bada/form.cpp:269
+msgid "Right Click Once"
+msgstr "°ÔÝÐ ßàÐÒÐï ßáâàëçÚÐ"
+
+#: backends/platform/bada/form.cpp:277
+msgid "Move Only"
+msgstr "ÂÞÛìÚö ßÕàÐÜïáæöæì"
+
+#: backends/platform/bada/form.cpp:291
+msgid "Escape Key"
+msgstr "ºÛÐÒöèÐ ESC"
+
+#: backends/platform/bada/form.cpp:296
+msgid "Game Menu"
+msgstr "¼ÕÝî ÓãÛìÝö"
+
+#: backends/platform/bada/form.cpp:301
+msgid "Show Keypad"
+msgstr "¿ÐÚÐ×Ðæì ÚÛÐÒöïâãàã"
+
+#: backends/platform/bada/form.cpp:309
+msgid "Control Mouse"
+msgstr "ºöàÐÒÐÝÝÕ Üëèèã"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Enabled"
+msgstr "¿áâàëçÚö þÚÛîçÐÝë"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Disabled"
+msgstr "¿áâàëçÚö ÒëÚÛîçÐÝë"
+
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "ÃÚÛîçëæì àíÖëÜ Roland GS"
+
+#~ msgid "Hercules Green"
+#~ msgstr "Hercules ·ÕÛñÝëÙ"
+
+#~ msgid "Hercules Amber"
+#~ msgstr "Hercules ÏÝâÐàÝëÙ"
+
+#~ msgctxt "lowres"
+#~ msgid "Hercules Green"
+#~ msgstr "Hercules ·ÕÛñÝëÙ"
+
+#~ msgctxt "lowres"
+#~ msgid "Hercules Amber"
+#~ msgstr "Hercules ÏÝâÐàÝëÙ"
+
+#~ msgid "Save game failed!"
+#~ msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã!"
+
+#~ msgctxt "lowres"
+#~ msgid "Add Game..."
+#~ msgstr "´ÞÑ. ØÓàã"
+
+#~ msgid "Add Game..."
+#~ msgstr "´ÞÑÐÒØâì ØÓàã..."
+
+#~ msgid "Discovered %d new games."
+#~ msgstr "½ÐÙÔÕÝÞ %d ÝÞÒëå ØÓà."
+
+#~ msgid "Command line argument not processed"
+#~ msgstr "¿ÐàÐÜÕâàë ÚÞÜÐÝÔÝÞÙ áâàÞÚØ ÝÕ ÞÑàÐÑÞâÐÝë"
+
+#~ msgid "FM Towns Emulator"
+#~ msgstr "ÍÜãÛïâÞà FM Towns"
+
+#~ msgid "Invalid Path"
+#~ msgstr "½ÕÒÕàÝëÙ ßãâì"
diff --git a/po/ca_ES.po b/po/ca_ES.po
index da2586a2af..f201be5cba 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,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-27 15:46+0200\n"
-"PO-Revision-Date: 2012-08-26 20:32+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-05 14:16+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
"Language: Catalan\n"
@@ -16,45 +16,54 @@ 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
+msgid "Show hidden files"
+msgstr "Mostra els fitxers ocults"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Mostra els fitxers marcats amb l'atribut d'ocultació"
+
+#: 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/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267
-#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:847
-#: gui/themebrowser.cpp:54 engines/engine.cpp:442
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:49
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -69,15 +78,15 @@ msgstr "Tanca"
msgid "Mouse click"
msgstr "Clic del ratolí"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostra el teclat"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Assigna les tecles"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Commuta la pantalla completa"
@@ -90,17 +99,19 @@ 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:848 engines/engine.cpp:361 engines/engine.cpp:372
-#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775
-#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420
-#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
-#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540
-#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557
-#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633
-#: engines/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 gui/fluidsynth-dialog.cpp:152
+#: engines/engine.cpp:366 engines/engine.cpp:377
+#: engines/drascula/saveload.cpp:49 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:865
+#: 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"
@@ -356,7 +367,7 @@ msgstr ""
msgid "~Q~uit"
msgstr "~T~anca"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Surt de ScummVM"
@@ -364,7 +375,7 @@ msgstr "Surt de ScummVM"
msgid "A~b~out..."
msgstr "~Q~uant a..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Quant a ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carrega"
@@ -461,7 +474,7 @@ msgstr ""
"Esteu segur que voleu executar el detector massiu de jocs? Això pot afegir "
"una gran quantitat de jocs."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -469,7 +482,7 @@ msgstr ""
msgid "Yes"
msgstr "Sí"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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 "Configuració de FluidSynth"
+
+#: 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,196 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Mode Roland GS (desactiva el mapeig 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -930,71 +947,71 @@ msgstr ""
"El tema que heu seleccionat no suporta l'idioma actual. Si voleu utilitzar "
"aquest tema primer haureu de canviar a un altre idioma."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Vista de llistat"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Vista de quadrícula"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "No hi ha data desada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "No hi ha hora desada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "No hi ha temps de joc desat"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Suprimeix"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Realment voleu suprimir aquesta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:800
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:806
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:814
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Temps de joc: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sense títol"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Següent"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Anterior"
-#: gui/saveload-dialog.cpp:688
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Nova partida desada"
-#: gui/saveload-dialog.cpp:688
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Crea una nova partida desada"
-#: gui/saveload-dialog.cpp:793
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nom: "
-#: gui/saveload-dialog.cpp:865
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Entreu la descripció per l'espai %d:"
@@ -1032,35 +1049,122 @@ msgstr "Amb antialias (16bpp)"
msgid "Clear value"
msgstr "Neteja el valor"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Reverberació"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Actiu"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Habitació:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Humitat:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Amplitud:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Nivell:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Cor"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Velocitat:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Profunditat:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Tipus:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triangle"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolació:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Cap (el més ràpid)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineal"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Quart ordre"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Setè ordre"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Reset"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Retorna tots els ajustos de FluidSynth als seus valors per defecte."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Realment voleu retorna tots els ajustos de FluidSynth als seus valors per "
+"defecte?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no suporta el nivell de depuració '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menú"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Salta la línia"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Error al executar el joc:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "No s'ha pogut trobar cap motor capaç d'executar el joc seleccionat"
@@ -1176,13 +1280,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:336 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:373
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:336 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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1210,12 +1317,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 +1330,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 +1360,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 +1374,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 +1383,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 +1393,51 @@ 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: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 "Utilitza les pantalles originals de desat/càrrega"
-#: engines/agi/detection.cpp:143 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 ""
"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:349
+#: engines/sci/engine/kfile.cpp:841 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:349
+#: engines/sci/engine/kfile.cpp:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Restaura"
+#: engines/drascula/saveload.cpp:47
+msgid ""
+"ScummVM found that you have old savefiles for Drascula that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"El ScummVM ha trobat que teniu partides desades antigues de Drascula 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"
@@ -1317,27 +1446,27 @@ msgstr "Utilitza el mode de paleta brillant"
msgid "Display graphics using the game's bright palette"
msgstr "Mostra els gràfics utilitzant la paleta brillant del joc"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Elimina el tramat d'EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activa l'eliminació del tramat en els jocs EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Prefereix efectes de so digitals"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Prefereix els efectes de so digitals en lloc dels sintetitzats"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Utilitza IMF/Yamaha FB-01 per la sortida MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1345,31 +1474,31 @@ msgstr ""
"Utilitza una tarja IBM Music Feature o un mòdul sintetitzador Yamaha FB-01 "
"FM per la sortida MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Utilitza l'àudio del CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Utilitza l'àudio del CD en lloc de l'àudio intern del joc, si està disponible"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Utilitza els cursors de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Utilitza els cursors de Windows (més petits i en blanc i negre) en lloc dels "
"de DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Utilitza cursors platejats"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1416,7 +1545,7 @@ msgstr "Jugar"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Surt"
@@ -2023,7 +2152,7 @@ msgstr "Vola a la dreta"
msgid "Fly to lower right"
msgstr "Vola avall i a la dreta"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2161,7 @@ msgstr ""
"El suport de MIDI natiu requereix l'actualització Roland de LucasArts,\n"
"però no s'ha trobat %s. S'utilitzarà AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2172,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"
@@ -2054,7 +2183,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"
@@ -2065,7 +2194,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' "
@@ -2076,7 +2205,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 +2226,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 +2248,14 @@ 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
+msgid "Fast movie speed"
+msgstr "Velocitat ràpida de les pel·lícules"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Reprodueix les pel·lícules a major velocitat"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "No s'ha pogut desar l'estat del joc"
@@ -2209,11 +2346,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:2447
msgid "Turn Left"
msgstr "Gira a l'esquerra"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Gira a la dreta"
@@ -2229,7 +2366,7 @@ msgstr "Opcions"
msgid "Choose Spell"
msgstr "Escull l'encanteri"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2350,12 +2487,12 @@ msgstr "Mostra les etiquetes dels objectes"
msgid "Show labels for objects on mouse hover"
msgstr "Mostra etiquetes al posar el ratolí sobre els objectes"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2413,6 +2550,46 @@ msgstr ""
"\n"
"Informeu-ne a l'equip."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Nom de partida desada incorrecte"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Amunt/Amplia el zoom/Mou endavant/Obre les portes"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Avall/Allunya el zoom"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Mostra/Oculta la safata d'inventari"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Mostra/Oculta la safata del Biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Acció/Selecció"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Conmuta la visualització de dades central"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Mostra/Oculta la pantalla d'informació"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Mostra/Oculta el menú de pausa"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador OPL de MAME"
@@ -2466,11 +2643,11 @@ msgstr ""
msgid "No music"
msgstr "Sense música"
-#: audio/mods/paula.cpp:189
+#: audio/mods/paula.cpp:196
msgid "Amiga Audio Emulator"
msgstr "Emulador d'àudio Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador d'AdLib"
@@ -2482,11 +2659,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:211
msgid "Initializing MT-32 Emulator"
msgstr "Iniciant l'Emulador de MT-32"
-#: audio/softsynth/mt32.cpp:512
+#: audio/softsynth/mt32.cpp:437
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -2637,24 +2814,24 @@ msgstr "Clic central"
msgid "Right Click"
msgstr "Clic dret"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Amaga ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Oculta els altres"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostra-ho tot"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Finestra"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimitza"
@@ -2668,12 +2845,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 +2859,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 +2883,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"
@@ -3022,33 +3199,33 @@ msgstr ""
"No us oblideu d'assignar una tecla a l'acció 'Ocultar la barra d'eines' per "
"veure l'inventari complet"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Realment voleu tornar al Llançador?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Llançador"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Estàs segur de voler sortir?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'Mode Toc' de pantalla tàctil - Clic esquerre"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'Mode Toc' de pantalla tàctil - Clic dret"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'Mode Toc' de pantalla tàctil - Flotant (sense clic)"
@@ -3068,7 +3245,11 @@ msgstr "Volum mínim"
msgid "Decreasing Volume"
msgstr "Baixant el volum"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Mode Toc' de pantalla tàctil - Flotant (Clics de DPad)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Comprova les actualitzacions..."
@@ -3103,3 +3284,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 107be45398..4b330af830 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -1,64 +1,73 @@
# 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-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-08 18:03+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-01 16:53+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"
+"X-Poedit-Basepath: ..\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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +82,15 @@ msgstr "Zavøít"
msgid "Mouse click"
msgstr "Kliknutí my¹í"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Zobrazit klávesnici"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Pøemapovat klávesy"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Pøepnout celou obrazovku"
@@ -94,17 +103,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -173,10 +184,10 @@ msgstr "Jazyk:"
msgid ""
"Language of the game. This will not turn your Spanish game version into "
"English"
-msgstr "Jazyk hry. Toto z Va¹í ©panìlské verze neudìlá Anglickou"
+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 +209,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 +226,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 +239,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 +257,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 +270,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 +283,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 +301,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 +309,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"
@@ -357,7 +368,7 @@ msgstr "Toto ID hry je u¾ zabrané. Vyberte si, prosím, jiné."
msgid "~Q~uit"
msgstr "~U~konèit"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Ukonèit ScummVM"
@@ -365,7 +376,7 @@ msgstr "Ukonèit ScummVM"
msgid "A~b~out..."
msgstr "~O~ Programu..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "O ScummVM"
@@ -442,12 +453,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Nahrát"
@@ -460,7 +473,7 @@ msgstr ""
"Opravdu chcete spustit hromadnou detekci her? Toto by mohlo potenciálnì "
"pøidat velkou spoustu her. "
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -468,7 +481,7 @@ msgstr ""
msgid "Yes"
msgstr "Ano"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -532,133 +545,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 +679,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 +746,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 gui/fluidsynth-dialog.cpp:137
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."
@@ -920,77 +937,74 @@ msgstr ""
"Vzhled, který jste zvolili, nepodporuje Vá¹ souèasný jazyk. Pokud chcete "
"tento vzhled pou¾ít, musíte nejdøíve pøepnout na jiný jazyk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Seznam"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Møí¾ka"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Neulo¾ena ¾ádná data"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "®ádný ulo¾ený èas"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "®ádná ulo¾ená doba hraní"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Smazat"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Opravdu chcete tuto ulo¾enou hru vymazat"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Èas:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Doba hraní:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Bezejmenný ulo¾ený stav"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Dal¹í"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Pøedchozí"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Ulo¾it"
+msgstr "Nová ulo¾ená pozice"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Nelze ulo¾it hru."
+msgstr "Vytvoøit novou ulo¾enou hru."
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "Jméno"
+msgstr "Název:"
-#: gui/saveload-dialog.cpp:861
+#: 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"
@@ -1025,35 +1039,122 @@ msgstr "S vyhlazenými hranami (16bpp)"
msgid "Clear value"
msgstr "Vyèistit hodnotu"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Dozvuk"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktivní"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Místnost:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Tlumení:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "©íøka:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Úroveò:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Sbor"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Rychlost:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Hloubka:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Typ:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Trojúhrlník"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolace:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "®ádná (Nejrychlej¹í)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineární"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Interpolace ètvrtého øádu"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Interpolace sedmého øádu"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Resetovat"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Resetovat ve¹kerá nastavení FludSynth n ajejich výchozí hodnoty."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Opravdu chcete resetovat ve¹kerá nastavení FluidSynth na jejich výchozí "
+"hodnoty?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Jádro nepodporuje úroveò ladìní '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pøeskoèit"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pauza"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pøeskoèit øádek"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Chyba pøi spu¹tìní hry:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nelze nalézt ¾ádné jádro schopné vybranou hru spustit"
@@ -1168,13 +1269,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1203,12 +1307,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 +1320,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 +1350,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 +1364,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 +1373,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 +1383,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: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 "Pou¾ít pùvodní obrazovky naètení/ulo¾ení"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 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"
@@ -1309,27 +1435,27 @@ msgstr "Pou¾ít re¾im jasné palety"
msgid "Display graphics using the game's bright palette"
msgstr "Zobrazit grafiku pomocí jasné palety hry"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Nerozkládání EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Povolit nerozkládání v EGA hrách"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Upøednostòovat digitální zvukové efekty"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Upøednostòovat digitální zvukové efekty pøed syntetizovanými"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Pou¾ít IMF/Yamaha FB-01 pro výstup MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1337,28 +1463,28 @@ msgstr ""
"Pou¾ít kartu IBM Music Feature nebo modul syntetizátoru Yamaha FB-01 FM pro "
"výstup MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Pou¾ít zvuky na CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Pou¾ít zvuky na CD místo ve høe, pokud je dostupné"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Pou¾ít kurzory Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Pou¾ít kurzory Windows (men¹í a èernobílé) místo kurzorù z DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Pou¾ít støíbrné kurzory"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "Pou¾ít alternativní sadu støíbrných kurzorù místo standardních zlatých"
@@ -1403,7 +1529,7 @@ msgstr "Hrát"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Ukonèit"
@@ -2010,7 +2136,7 @@ msgstr "Letìt doprava"
msgid "Fly to lower right"
msgstr "Letìt doprava dolù"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2145,7 @@ msgstr ""
"Pøirozená podpora MIDI vy¾aduje Aktualizaci Roland od LucasArts,\n"
"ale %s chybí. Místo toho je pou¾it AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2156,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"
@@ -2041,7 +2167,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"
@@ -2052,7 +2178,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' "
@@ -2063,7 +2189,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,11 +2210,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Soubor videa '%s' nenalezen'"
@@ -2106,6 +2232,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 +2330,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:2447
msgid "Turn Left"
msgstr "Otoèit se doleva"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Otoèit se doprava"
@@ -2216,7 +2350,7 @@ msgstr "Volby"
msgid "Choose Spell"
msgstr "Zvolit Kouzlo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2232,12 +2366,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 ""
@@ -2263,20 +2396,20 @@ msgstr "Úvod z diskety"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Pou¾ít verzi úvodu z diskety (Pouze verze CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Proud videa PSX '%s' nemù¾e být pøehrán v re¾imu palety"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "Videa DXA nalezena, ale ScummVM byl sestaven bez podpory zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Videa MPGE2 ji¾ nejsou podporována"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Video '%s' nenalezeno"
@@ -2320,7 +2453,7 @@ msgstr "Ponechat novou"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Toto je konec Dema Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "Videa PSX nalezena, ale ScummVM byl sestaven bez podpory barev RGB"
@@ -2333,16 +2466,18 @@ msgstr "Zobrazit jmenovky objektù"
msgid "Show labels for objects on mouse hover"
msgstr "Zobrazit jmenovky objektù pøi najetí my¹i"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Chybí vám soubor 'teenagent.dat'. Mù¾ete ho získat ze stránky ScummVM."
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"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 +2528,46 @@ msgstr ""
"\n"
"Prosím nahlaste to týmu"
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Neplatný název souboru"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Nahoru/Pøiblí¾it/Pohyb dopøedu/Otevøít dveøe"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Dolù/Oddálení"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Zobrazit/Skrýt podnos inventáøe"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Zobrazit/Skrýt podnos bioèipu"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Èinnost/Vybrat"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Pøepnout centrální datovou obrazovku"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Zobrazit/Skrýto obrazovku informací"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Zobrazit/Skrýt "
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL Emulátor"
@@ -2450,7 +2625,7 @@ msgstr "Bez hudby"
msgid "Amiga Audio Emulator"
msgstr "Emulátor zvuku Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulátor"
@@ -2462,11 +2637,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"
@@ -2617,24 +2792,24 @@ msgstr "Kliknutí prostøedním tlaèítkem"
msgid "Right Click"
msgstr "Pravé kliknutí"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skrýt ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skrýt Ostatní"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Zobrazit V¹e"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Okno"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimalizovat"
@@ -2648,12 +2823,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 +2837,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 +2861,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¾¹í"
@@ -3004,33 +3179,33 @@ msgstr ""
"Nezapomeòte namapovat klávesu k èinnosti 'Skrýt Panel Nástrojù, abyste "
"vidìli celý inventáø"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Opravdu se chcete vrátit tuto do Spou¹tìèe?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Spou¹tìè"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Opravdu chcete skonèit?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Levé Kliknutí"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Pravé Kliknutí"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Najetí (Bez Kliknutí)"
@@ -3050,7 +3225,11 @@ msgstr "Minimální Hlasitost"
msgid "Decreasing Volume"
msgstr "Sni¾uji Hlasitost"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Najetí (Dpad kliká)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Zkontrolovat Aktualizace..."
@@ -3086,6 +3265,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 b30ef1bf02..bb7ed32c83 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,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-09 20:27+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-17 14:24+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language: Dansk\n"
@@ -15,48 +16,56 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Poedit-Language: Danish\n"
-"X-Poedit-Country: DENMARK\n"
+"X-Generator: Poedit 1.5.5\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
+msgid "Show hidden files"
+msgstr "Vis skjulte filer"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Vis filer markeret med skjult attribut"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -71,15 +80,15 @@ msgstr "Luk"
msgid "Mouse click"
msgstr "Muse klik"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Kortlæg taster"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Skift fuldskærm"
@@ -92,17 +101,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 ""
"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 +209,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 +226,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 +239,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 +257,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 +270,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 +283,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 +301,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 +309,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"
@@ -357,7 +368,7 @@ msgstr "Dette spil ID er allerede i brug. Vælg venligst et andet."
msgid "~Q~uit"
msgstr "~A~fslut"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Slut ScummVM"
@@ -365,7 +376,7 @@ msgstr "Slut ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -442,12 +453,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Indlæs"
@@ -460,7 +473,7 @@ msgstr ""
"Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje "
"et stort antal spil."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -468,7 +481,7 @@ msgstr ""
msgid "Yes"
msgstr "Ja"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -533,133 +546,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 +680,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 "FluidSynth indstillinger"
+
+#: 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 +745,190 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland GS tilstand (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 gui/fluidsynth-dialog.cpp:137
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."
@@ -919,77 +936,74 @@ msgstr ""
"Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at "
"bruge dette tema, skal du skifte til et andet sprog først."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Liste visning"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Gitter visning"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato gemt"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Intet tidspunkt gemt"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen spilletid gemt"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slet"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du virkelig slette denne gemmer?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spilletid:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Unavngivet gemmetilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Næste"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Forrige"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Gem"
+msgstr "Ny Gemmer"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Mislykkedes at gemme spil"
+msgstr "Opret en ny gemmer"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Navn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Indtast en beskrivelse af plads %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1024,35 +1038,122 @@ msgstr "Antialias (16bpp)"
msgid "Clear value"
msgstr "Slet værdi"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Rumklang"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktiv"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Rum:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Dæmp:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Bredde:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Styrke:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Kor"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Hastighed:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Dybde:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Type:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triangulær"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolation:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Ingen (hurtigst)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineær"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Fjerde-orden"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Syvende-orden"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Nulstil"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Nulstil alle FluidSynth indstillinger til deres standard værdier."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Vil du virkelig nulstille alle FluidSynth indstillinger til deres standard "
+"værdier?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motor understøtter ikke fejlfindingsniveau '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Spring over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Spring linje over"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fejl ved kørsel af spil:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil"
@@ -1168,13 +1269,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1203,12 +1307,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 +1320,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 +1350,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 +1364,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 +1374,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 +1384,50 @@ 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: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 "Brug original gem/indlæs skærme"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Gendan"
+#: 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 har konstateret, at du har gamle gemmer for Drascula, 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"
@@ -1310,27 +1436,27 @@ msgstr "Brug lys palet tilstand"
msgid "Display graphics using the game's bright palette"
msgstr "Vis grafik ved hjælp af spillets lyse palette"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA farveforøgelse"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiver farveforøgelse i EGA spil"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Foretræk digitale lydeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Foretræk digitale lydeffekter i stedet for syntetiserede"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1338,28 +1464,28 @@ msgstr ""
"Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til "
"MIDI-udgang"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Brug CD lyd"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Brug cd-lyd i stedet for lyd fra spillet, hvis tilgængelige"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Brug Windows markør"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Brug Windows-markører (mindre og monokrome) i stedet for dem fra DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Brug sølv markør"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1405,7 +1531,7 @@ msgstr "Spil"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Afslut"
@@ -2012,7 +2138,7 @@ msgstr "Flyv til højre"
msgid "Fly to lower right"
msgstr "Flyv nederst til højre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2021,7 +2147,7 @@ msgstr ""
"Indbygget MIDI understøttelse kræver Roland opgradering fra LucasArts,\n"
"men %s mangler. Bruger AdLib i stedet."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2032,7 +2158,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"
@@ -2043,7 +2169,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"
@@ -2054,7 +2180,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' "
@@ -2065,7 +2191,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,11 +2212,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Filmsekvens fil '%s' ikke fundet!"
@@ -2108,6 +2234,14 @@ msgstr "Mislykkedes at gemme spil tilstand til fil."
msgid "Failed to delete file."
msgstr "Mislykkedes at slette fil."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Hurtig film hastighed"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Afspil film med forhøjet hastighed"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Mislykkedes at gemme spil"
@@ -2198,11 +2332,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:2447
msgid "Turn Left"
msgstr "Drej til venstre"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Drej til højre"
@@ -2218,7 +2352,7 @@ msgstr "Indstillinger"
msgid "Choose Spell"
msgstr "Vælg magi"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2234,12 +2368,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternativ intro"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Brug diskette versionens intro (kun CD version)"
+msgstr "Brug en alternativ spil intro (kun CD version)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2265,21 +2398,21 @@ msgstr "Diskette intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Brug diskette versionens intro (kun CD version)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 filmsekvenser understøttes ikke længere"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Filmsekvens '%s' ikke fundet"
@@ -2323,7 +2456,7 @@ msgstr "Behold den nye"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Dette er slutningen af Broken Sword 1 demoen"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2337,16 +2470,18 @@ msgstr "Vis labels på genstande"
msgid "Show labels for objects on mouse hover"
msgstr "Vis labels for genstande musen er henover"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Du mangler filen 'teenagent.dat'. Hent den på ScummVM hjemmesiden"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Teenagent.dat filen er komprimeret og zlib er ikke blevet inkluderet i dette "
+"program. Udpak den venligst"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2397,6 +2532,46 @@ msgstr ""
"\n"
"Venligst rapportér til holdet."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Ugyldigt navn for gemmer"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Op/Forstør/Flyt frem/Åben døre"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Ned/Forminsk"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Vis/Skjul Oversigtsbakke"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Vis/Skjul Biochip bakke"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Handling/Vælg"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Skift Center Data Display"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Vis/Skjul Info skærm"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Vis/Skjul Pause menu"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2453,7 +2628,7 @@ msgstr "Ingen musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga lyd emulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib emulator"
@@ -2465,11 +2640,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"
@@ -2620,24 +2795,24 @@ msgstr "Miderste klik"
msgid "Right Click"
msgstr "Højre klik"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skjul ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skjul andre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Vis alle"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Vindue"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimer"
@@ -2651,12 +2826,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 +2840,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 +2864,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"
@@ -3006,33 +3181,33 @@ msgstr ""
"Glem ikke at tildele en tast til 'Skjul værktøjslinje' handling for at se "
"hele oversigten"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Vil du virkelig gå tilbage til oversigten?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Oversigt"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Vil du virkelig afslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Venstre Klik"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Højre Klik"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Henover (Ingen Klik)"
@@ -3052,7 +3227,11 @@ msgstr "Minimal lydstyrke"
msgid "Decreasing Volume"
msgstr "Sænker lydstyrke"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Henover (DPad Klik)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Søg efter opdateringer..."
@@ -3088,6 +3267,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 a18bfb7ca6..fac3c1f103 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1,62 +1,71 @@
# 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.
+# Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-14 22:49+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-24 22:01+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
-"Language-Team: Simon Sawatzki <SimSaw@gmx.de> (Lead), Lothar Serra Mari "
-"(Contributor)\n"
+"Language-Team: Simon Sawatzki <SimSaw@gmx.de>, Lothar Serra Mari "
+"(retired)\n"
"Language: Deutsch\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: 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
+msgid "Show hidden files"
+msgstr "Versteckte Dateien anzeigen"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Dateien mit Versteckt-Attribut anzeigen"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -71,15 +80,15 @@ msgstr "Schließen"
msgid "Mouse click"
msgstr "Mausklick"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Tastatur anzeigen"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Tasten neu zuweisen"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Vollbild EIN/AUS"
@@ -92,17 +101,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -357,7 +368,7 @@ msgstr "Diese Spielkennung ist schon vergeben. Bitte eine andere wählen."
msgid "~Q~uit"
msgstr "~B~eenden"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "ScummVM beenden"
@@ -365,7 +376,7 @@ msgstr "ScummVM beenden"
msgid "A~b~out..."
msgstr "Übe~r~"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Über ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Laden"
@@ -462,7 +475,7 @@ msgstr ""
"Möchten Sie wirklich den PC nach Spielen durchsuchen? Möglicherweise wird "
"dabei eine größere Menge an Spielen hinzugefügt."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -470,7 +483,7 @@ msgstr ""
msgid "Yes"
msgstr "Ja"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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 "FluidSynth-Einstellungen"
+
+#: 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,197 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland-GS-Modus (GM-Zuweisung 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -936,77 +953,74 @@ msgstr ""
"dieses Thema benutzen wollen, müssen Sie erst zu einer anderen Sprache "
"wechseln."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Listenansicht"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Rasteransicht"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Kein Datum gespeichert"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Keine Zeit gespeichert"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Keine Spielzeit gespeichert"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Löschen"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Diesen Spielstand wirklich löschen?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Zeit: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spieldauer: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Unbenannt"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Vor"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Zurück"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Speichern"
+msgstr "Neuer Spielstand"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Konnte Spielstand nicht speichern."
+msgstr "Erstellt einen neuen Spielstand."
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "Name:"
+msgstr "Name: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Geben Sie eine Beschreibung für Speicherplatz %d ein:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1041,35 +1055,120 @@ msgstr "Kantenglättung (16bpp)"
msgid "Clear value"
msgstr "Wert löschen"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Hall"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktiv"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Raum:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Dämpfung:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Radius:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Intensität:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Chor"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "Stimmen:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Rate:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Trennzeit:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Typ:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Dreieck"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolation:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Keine (am schnellsten)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Linear"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Vierstufig"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Siebenstufig"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Rücksetzen"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Setzt alle FluidSynth-Einstellungen auf ihre Standard-Werte zurück."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Möchten Sie wirklich alle FluidSynth-Einstellungen auf ihre Standard-Werte zurücksetzen?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Engine unterstützt den Debug-Level \"%s\" nicht."
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menü"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Überspringen"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Zeile überspringen"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fehler beim Ausführen des Spiels:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Konnte keine Spiel-Engine finden, die dieses Spiel starten kann."
@@ -1188,13 +1287,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1222,12 +1324,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 +1337,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 +1369,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 +1384,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 +1393,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 +1404,51 @@ 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: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 "Originale Spielstand-Menüs"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Laden"
+#: 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 hat erkannt, dass Sie alte Spielstände von Drascula 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"
@@ -1333,27 +1457,27 @@ msgstr "Modus für helle Palette verwenden"
msgid "Display graphics using the game's bright palette"
msgstr "Zeigt Grafiken über helle Spielpalette an."
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Antifehlerdiffusion für EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen."
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Digitale Sound-Effekte bevorzugen"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Bevorzugt digitale Sound-Effekte statt synthethisierter."
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "IMF/Yamaha FB-01 für MIDI-Ausgabe verwenden"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1361,30 +1485,30 @@ msgstr ""
"Verwendet eine Music-Feature-Karte von IBM oder ein Yamaha-FB-01-FM-"
"Synthetisierungsmodul für die MIDI-Ausgabe."
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "CD-Ton verwenden"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Verwendet CD-Ton anstatt des Tons im Spiel, sofern verfügbar."
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Windows-Mauszeiger verwenden"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Verwendet die Windows-Mauszeiger (kleiner und schwarz-weiß) anstatt der von "
"DOS."
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Silberne Mauszeiger verwenden"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1431,7 +1555,7 @@ msgstr "Spielen"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Beenden"
@@ -1629,7 +1753,7 @@ msgstr "Sehr schneller Modus (*)"
#: engines/scumm/help.cpp:99
msgid "Toggle mouse capture"
-msgstr "Mauseingrenzung in Fenster an/aus"
+msgstr "Mauseingrenzung in Fenster EIN/AUS"
#: engines/scumm/help.cpp:100
msgid "Switch between graphics filters"
@@ -1641,7 +1765,7 @@ msgstr "Größenverhätlnis höher/niedriger"
#: engines/scumm/help.cpp:102
msgid "Toggle aspect-ratio correction"
-msgstr "Seitenverhältnis anpassen: an/aus"
+msgstr "Seitenverhältnis anpassen: EIN/AUS"
#: engines/scumm/help.cpp:107
msgid "* Note that using ctrl-f and"
@@ -2038,7 +2162,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2048,7 +2172,7 @@ msgstr ""
"Roland-Upgrade von LucasArts, aber %s\n"
"fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2059,7 +2183,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"
@@ -2070,7 +2194,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"
@@ -2081,7 +2205,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' "
@@ -2093,7 +2217,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,11 +2238,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Zwischensequenz \"%s\" nicht gefunden!"
@@ -2136,6 +2260,14 @@ msgstr "Konnte Spielstand nicht in Datei speichern."
msgid "Failed to delete file."
msgstr "Konnte Datei nicht löschen."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Schnelles Film-Tempo"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Spielt Filme mit erhöhter Geschwindigkeit ab."
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Konnte Spielstand nicht speichern."
@@ -2226,11 +2358,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:2447
msgid "Turn Left"
msgstr "Nach links drehen"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Nach rechts drehen"
@@ -2246,7 +2378,7 @@ msgstr "Optionen"
msgid "Choose Spell"
msgstr "Zauberspruch auswählen"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2264,12 +2396,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternativer Vorspann"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)."
+msgstr "Verwendet einen alternativen Vorspann (nur bei CD-Version)."
#: engines/sky/compact.cpp:130
msgid ""
@@ -2297,23 +2428,23 @@ msgstr "Disketten-Vorspann"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)."
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"PSX-Zwischensequenz \"%s\" kann in Palettenmodus nicht wiedergegeben werden."
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstützung "
"erstellt."
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2-Zwischensequenzen werden nicht mehr unterstützt."
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Zwischensequenz \"%s\" gefunden"
@@ -2357,7 +2488,7 @@ msgstr "Den neuen behalten"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Das ist das Ende der Demo von Broken Sword 1 (Baphomets Fluch 1)."
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2372,16 +2503,20 @@ msgstr "Objektnamen zeigen"
msgid "Show labels for objects on mouse hover"
msgstr "Zeigt Objektbeschriftungen bei Mausberührung an."
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
+"Ihnen fehlt die Datei teenagent.dat. Laden Sie sich diese von der "
+"ScummVM-Website unter http://www.scummvm.org herunter."
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Die Datei teenagent.dat ist gepackt und zlib zum Entpacken wurde in dieser "
+"ausführbaren Datei nicht miteingebunden. Bitte entpacken Sie die Datei."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2433,6 +2568,46 @@ msgstr ""
"\n"
"Bitte berichten Sie dies dem Team auf Englisch."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Ungültiger Spielstandname"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Hoch/Hineinzoomen/Nach vorn/Türen öffnen"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Runter/Hinauszoomen"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Inventarleiste anzeigen/verbergen"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Biochip-Leiste anzeigen/verbergen"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Aktion/Auswählen"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Mittige Datenanzeige wechseln"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Info-Bildschirm anzeigen/verbergen"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Pause-Menü anzeigen/verbergen"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME-OPL-Emulator"
@@ -2490,7 +2665,7 @@ msgstr "Keine Musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga-Audio-Emulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib-Emulator"
@@ -2502,11 +2677,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"
@@ -2657,24 +2832,24 @@ msgstr "Mittelklick"
msgid "Right Click"
msgstr "Rechtsklick"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM ausblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Andere ausblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Alle einblenden"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fenster"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Im Dock ablegen"
@@ -2688,12 +2863,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 +2877,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 +2901,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"
@@ -3044,33 +3219,33 @@ msgstr ""
"Vergessen Sie nicht, der Aktion \"Werkzeugleiste verbergen\" eine Taste "
"zuzuweisen, um das ganze Inventar sehen zu können."
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Möchten Sie wirklich zur Spieleliste zurückkehren?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Spieleliste"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Möchten Sie wirklich beenden?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Berührungsbildschirm-Tipp-Modus - Linksklick"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Berührungsbildschirm-Tipp-Modus - Rechtsklick"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Berührungsbildschirm-Tipp-Modus - schweben (kein Klick)"
@@ -3090,7 +3265,11 @@ msgstr "Niedrigste Lautstärke"
msgid "Decreasing Volume"
msgstr "Lautstärke niedriger"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Berührungsbildschirm-Tipp-Modus - schweben (DPad-Klicks)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Suche nach Aktualisierungen..."
@@ -3126,19 +3305,8 @@ msgstr "Klicken aktiviert"
msgid "Clicking Disabled"
msgstr "Klicken deaktiviert"
-#~ msgid "Hercules Green"
-#~ msgstr "Hercules-Grün"
-
-#~ msgid "Hercules Amber"
-#~ msgstr "Hercules-Bernsteingelb"
-
-#~ msgctxt "lowres"
-#~ msgid "Hercules Green"
-#~ msgstr "Hercules-Grün"
-
-#~ msgctxt "lowres"
-#~ msgid "Hercules Amber"
-#~ msgstr "Hercules-Gelb"
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Roland-GS-Modus"
#~ msgid "Save game failed!"
#~ msgstr "Konnte Spielstand nicht speichern!"
diff --git a/po/es_ES.po b/po/es_ES.po
index 9f767dacfa..6bc001682d 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,54 +7,64 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-08 18:19+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-28 16:31+0100\n"
"Last-Translator: Tomás Maidagan\n"
"Language-Team: \n"
"Language: Espanol\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.5\n"
-#: 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
+msgid "Show hidden files"
+msgstr "Mostrar archivos ocultos"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Muestra los archivos marcados como ocultos"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -69,17 +79,17 @@ msgstr "Cerrar"
msgid "Mouse click"
msgstr "Clic de ratón"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar el teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
-msgstr "Activar pantalla completa"
+msgstr "Activar/Desactivar pantalla completa"
#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
msgid "Choose an action to map"
@@ -90,24 +100,26 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
#: gui/KeysDialog.cpp:49
msgid "Select an action and click 'Map'"
-msgstr "Selecciona una acción y pulsa \"Asignar\""
+msgstr "Selecciona una acción y pulsa 'Asignar'"
#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
#, c-format
@@ -173,8 +185,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 +208,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 +225,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 +238,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 +256,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 +269,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 +282,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 +300,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 +308,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"
@@ -355,7 +367,7 @@ msgstr "Esta ID ya está siendo usada. Por favor, elige otra."
msgid "~Q~uit"
msgstr "~S~alir"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Salir de ScummVM"
@@ -363,7 +375,7 @@ msgstr "Salir de ScummVM"
msgid "A~b~out..."
msgstr "Acerca ~d~e"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Acerca de ScummVM"
@@ -440,12 +452,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Cargar"
@@ -458,7 +472,7 @@ msgstr ""
"¿Seguro que quieres ejecutar la detección masiva? Puede que se añada un gran "
"número de juegos."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -466,7 +480,7 @@ msgstr ""
msgid "Yes"
msgstr "Sí"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -531,136 +545,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 +682,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 "Opciones de FluidSynth"
+
+#: 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 +751,191 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Modo Roland GS (desactivar conversió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 gui/fluidsynth-dialog.cpp:137
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."
@@ -925,77 +943,74 @@ msgstr ""
"El tema seleccionado no es compatible con el idioma actual. Si quieres usar "
"este tema debes cambiar a otro idioma primero."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Modo lista"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Modo mosaico"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "No hay fecha guardada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "No hay hora guardada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "No hay tiempo guardado"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Borrar"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "¿Seguro que quieres borrar esta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Fecha: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tiempo: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sin nombre"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Siguiente"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Anterior"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Guardar"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Fallo al guardar la partida"
+msgstr "Guarda una nueva partida"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nombre:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Introduce una descripción para la ranura %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1030,35 +1045,122 @@ msgstr "Suavizado (16bpp)"
msgid "Clear value"
msgstr "Eliminar valor"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Reverberación"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Activa"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Sala:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Atenuación:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Amplitud"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Nivel:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Coro"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Velocidad:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Profundidad:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Tipo"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Seno"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triángulo"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolación:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Ninguna (la más rápida)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineal"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Cuarto grado"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Séptimo grado"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Vuelve a los valores por defecto de las opciones de FluidSynth"
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"¿Seguro que quieres volver a los valores por defecto de las opciones de "
+"FluidSynth?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no es compatible con el nivel de debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menú"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Saltar"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Saltar frase"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Error al ejecutar el juego:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "No se ha podido encontrar ningún motor capaz de ejecutar el juego"
@@ -1173,13 +1275,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1209,12 +1314,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 +1327,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 +1357,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 +1371,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 +1381,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 +1391,51 @@ 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: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 "Usar pantallas de guardar/cargar originales"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Cargar"
+#: 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 ha detectado que tienes partidas guardadas antiguas de Drascula, que "
+"deben ser actualizadas.\n"
+"El formato antiguo ya no es compatible, así que no podrás cargar tus "
+"partidos si no las actualizas.\n"
+"\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"
@@ -1317,27 +1444,27 @@ msgstr "Usar paleta original"
msgid "Display graphics using the game's bright palette"
msgstr "Utilizar los niveles de brillo originales del juego"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Difuminado EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activar difuminado en los juegos EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferir efectos de sonido digitales"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Preferir efectos de sonido digitales en vez de los sintetizados"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Usar IMF/Yamaha FB-01 para la salida MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1345,29 +1472,29 @@ msgstr ""
"Usa una tarjeta IBM Music o un módulo sintetizador Yamaha FB-01 FM para la "
"salida MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Usar CD audio"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Usa CD audio en vez del sonido interno del juego, si está disponible"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Usar cursores de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Usar los cursores de Windows (más pequeños y monocromos) en vez de los de DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Usar cursores plateados"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1413,7 +1540,7 @@ msgstr "Jugar"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Salir"
@@ -1563,7 +1690,7 @@ msgstr "Enter"
#: engines/scumm/help.cpp:86
msgid "Toggle fullscreen"
-msgstr "Activar pantalla completa"
+msgstr "Activar/Desactivar pantalla completa"
#: engines/scumm/help.cpp:87
msgid "Music volume up / down"
@@ -1611,7 +1738,7 @@ msgstr "Ejecutar en modo muy rápido (*)"
#: engines/scumm/help.cpp:99
msgid "Toggle mouse capture"
-msgstr "Captura de ratón"
+msgstr "Activar/Desactivar captura de ratón"
#: engines/scumm/help.cpp:100
msgid "Switch between graphics filters"
@@ -1623,7 +1750,7 @@ msgstr "Aumentar / Disminuir factor de escalado"
#: engines/scumm/help.cpp:102
msgid "Toggle aspect-ratio correction"
-msgstr "Corrección de aspecto"
+msgstr "Activar/Desactivar corrección de aspecto"
#: engines/scumm/help.cpp:107
msgid "* Note that using ctrl-f and"
@@ -2020,7 +2147,7 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2029,7 +2156,7 @@ msgstr ""
"El soporte MIDI nativo requiere la actualización Roland de LucasArts,\n"
"pero %s no está disponible. Se usará AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2040,7 +2167,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"
@@ -2051,7 +2178,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"
@@ -2062,7 +2189,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' "
@@ -2073,7 +2200,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,11 +2221,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "No se ha encontrado el vídeo '%s'"
@@ -2116,6 +2243,14 @@ 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
+msgid "Fast movie speed"
+msgstr "Velocidad rápida de vídeos"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Reproducir vídeos a mayor velocidad"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Fallo al guardar la partida"
@@ -2206,11 +2341,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:2447
msgid "Turn Left"
msgstr "Girar a la izquierda"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Girar a la derecha"
@@ -2226,7 +2361,7 @@ msgstr "Opciones"
msgid "Choose Spell"
msgstr "Elegir hechizo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2242,13 +2377,12 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Introducción alternativa"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
msgstr ""
-"Usa la introducción de la versión en disquete (solo para la versión CD)"
+"Usa una introducción alternativa para el juego (solo para la versión CD)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2275,21 +2409,21 @@ msgid "Use the floppy version's intro (CD version only)"
msgstr ""
"Usa la introducción de la versión en disquete (solo para la versión CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "El vídeo de PSX '%s' no se puede reproducir en modo paleta"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Se han encontrado vídeos DXA, pero se ha compilado ScummVM sin soporte zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Los vídeos MPEG2 ya no son compatibles"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "No se ha encontrado el vídeo '%s'"
@@ -2333,7 +2467,7 @@ msgstr "Conservar la nueva"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Este es el final de la demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2348,16 +2482,20 @@ msgstr "Mostrar etiquetas de objetos"
msgid "Show labels for objects on mouse hover"
msgstr "Muestra las etiquetas de los objetos al pasar el ratón"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
+"No se encuentra el archivo 'teenagent.dat'. Descárgalo de la página de "
+"ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"El archivo teenagent.dat está comprimido y este ejecutable no incluye zlib. "
+"Por favor, descomprímelo"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2409,6 +2547,46 @@ msgstr ""
"\n"
"Por favor, contacta con el equipo."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Nombre no válido para la partida"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Arriba/Zoom/Avanzar/Abrir puertas"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Abajo/Reducir zoom"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Mostrar/Ocultar inventario"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Mostrar/Ocultar biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Acción/Seleccionar"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Activar/Desactivar pantalla de datos"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Mostrar/Ocultar pantalla de información"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Mostrar/Ocultar menú de pausa"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador OPL de MAME"
@@ -2466,7 +2644,7 @@ msgstr "Sin música"
msgid "Amiga Audio Emulator"
msgstr "Emulador de Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador de AdLib"
@@ -2478,11 +2656,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"
@@ -2633,24 +2811,24 @@ msgstr "Clic central"
msgid "Right Click"
msgstr "Clic derecho"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar otros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar todo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ventana"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -2664,12 +2842,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 +2856,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,13 +2880,13 @@ 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"
+msgstr "Modo de filtro activo: más cercano"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -3019,33 +3197,33 @@ msgstr ""
"No olvides asignar una tecla a la acción 'Ocultar barra de tareas' para ver "
"todo el inventario"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "¿Seguro que quieres volver al Lanzador?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Lanzador"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "¿Realmente quieres salir?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "'Modo toque' de pantalla táctil - Clic izquierdo"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "'Modo toque' de pantalla táctil - Clic derecho"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "'Modo toque' de pantalla táctil - Flotante (sin clic)"
@@ -3065,7 +3243,11 @@ msgstr "Volumen mínimo"
msgid "Decreasing Volume"
msgstr "Bajando el volumen"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "'Modo toque' de pantalla táctil - Flotante (clic de cruceta)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Buscar actualizaciones..."
@@ -3101,6 +3283,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 b0fd177575..87a78ed044 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-08-12 14:57+0200\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -69,15 +79,15 @@ msgstr "Itxi"
msgid "Mouse click"
msgstr "Sagu-klika"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Teklatua erakutsi"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Teklak esleitu"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Txandakatu pantaila osoa"
@@ -90,17 +100,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +184,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 +208,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 +225,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 +238,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 +256,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 +269,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 +282,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 +300,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 +308,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"
@@ -355,7 +367,7 @@ msgstr "ID hau jada erabilia izaten ari da. Mesedez, aukeratu beste bat."
msgid "~Q~uit"
msgstr "~I~rten"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Irten ScummVM-tik"
@@ -363,7 +375,7 @@ msgstr "Irten ScummVM-tik"
msgid "A~b~out..."
msgstr "Ho~n~i buruz..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "ScummVM-i buruz"
@@ -440,12 +452,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Kargatu"
@@ -458,7 +472,7 @@ msgstr ""
"Joko detektatzaile masiboa exekutatu nahi al duzu? Honek joko kantitate "
"handia gehitu dezake."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -466,7 +480,7 @@ msgstr ""
msgid "Yes"
msgstr "Bai"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -534,133 +548,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 +682,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 +751,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 gui/fluidsynth-dialog.cpp:137
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."
@@ -926,74 +945,74 @@ msgstr ""
"Aukeraturiko gaia ez da zure hizkuntzarekin bateragarria. Gai hau erabili "
"nahi baduzu, aurretik beste hizkuntza batera pasa behar duzu."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ez dago datarik gordeta"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ez dago ordurik gordeta"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ez dago denborarik gordeta"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Ezabatu"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Ezabatu partida gorde hau?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Ordua"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Denbora:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Titulurik gabeko partida"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Gorde"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Ezin izan da jokoa gorde"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Izena:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1031,35 +1050,124 @@ msgstr "Lausotua (16bpp)"
msgid "Clear value"
msgstr "Balioa kendu:"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+#, fuzzy
+msgid "Reverb"
+msgstr "Inoiz ez"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr "(Aktiboa)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+#, fuzzy
+msgid "Speed:"
+msgstr "Ahotsa"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+#, fuzzy
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Ziur zaude abiarazlera itzuli nahi duzula?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoreak ez da '%s' debug mailarekin bateragarria"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menua"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Saltatu"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Gelditu"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Lerroa saltatu"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Jokoa exekutatzean errorea:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Ezin izan da aukeraturiko jokoa exekutatzeko gai den motorerik aurkitu"
@@ -1174,13 +1282,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1208,12 +1319,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 +1332,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 +1362,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 +1376,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 +1385,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 +1395,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: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 ""
-#: 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:841 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:841 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"
@@ -1315,57 +1449,57 @@ msgstr "Goiko eskuineko objektua"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA lausotzea"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
#, fuzzy
msgid "Enable undithering in EGA games"
msgstr "EGA lausotzea gaitu joko bateragarrietan"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
#, fuzzy
msgid "Prefer digital sound effects"
msgstr "Soinu efektu berezien bolumena"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Kurtsore normala"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1410,7 +1544,7 @@ msgstr "Jolastu"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Irten"
@@ -2017,7 +2151,7 @@ msgstr "Eskuinera hegan egin"
msgid "Fly to lower right"
msgstr "Behera eta eskuinera hegan egin"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2026,7 +2160,7 @@ msgstr ""
"MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n"
"baina %s ez dago eskuragarri. AdLib erabiliko da."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2037,7 +2171,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"
@@ -2048,7 +2182,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"
@@ -2059,7 +2193,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' "
@@ -2070,7 +2204,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,11 +2225,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "'%s' bideo fitxategia ez da aurkitu!"
@@ -2113,6 +2247,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 +2348,11 @@ msgstr "Ezkerrera irristatu"
msgid "Slide Right"
msgstr "Eskuinera irristatu"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
msgid "Turn Left"
msgstr "Ezkerrera biratu"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Eskuinera biratu"
@@ -2225,7 +2368,7 @@ msgstr "Aukerak"
msgid "Choose Spell"
msgstr "Sorginkeria aukeratu"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
#, fuzzy
msgid ""
"You appear to be using a General MIDI device,\n"
@@ -2272,21 +2415,21 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"DXA bideoak aurkitu dira, baina ScummVM zlib euskarri gabe konpilatu da"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 bideoak ez dira bateragarriak jada"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Ez da '%s' bideoa aurkitu"
@@ -2330,7 +2473,7 @@ msgstr "Berria mantendu"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Hau Broken Sword 1 Demoaren amaiera da"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2345,12 +2488,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2406,6 +2549,47 @@ msgstr ""
"\n"
"Mesedez, eman abisua taldeari."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2446
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom-a hurbildu"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emuladorea"
@@ -2463,7 +2647,7 @@ msgstr "Musikarik ez"
msgid "Amiga Audio Emulator"
msgstr "Amiga Audio emuladorea"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib emuladorea"
@@ -2475,11 +2659,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"
@@ -2630,24 +2814,24 @@ msgstr "Erdiko klika"
msgid "Right Click"
msgstr "Eskuin-klika"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM ezkutatu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Besteak ezkutatu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Denak erakutsi"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Leihoa"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizatu"
@@ -2661,12 +2845,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 +2859,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 +2883,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"
@@ -3016,33 +3200,33 @@ msgstr ""
"Ez ahaztu 'tresna-barra ezkutatu' ekintza tekla bati esleitzea inbentario "
"osoa ikusteko"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Ziur zaude abiarazlera itzuli nahi duzula?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Abiarazlea"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Benetan irten?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Ezker klika"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Eskuin klika"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)"
@@ -3062,7 +3246,12 @@ msgstr "Bolumen minimoa"
msgid "Decreasing Volume"
msgstr "Bolumena jaisten"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Eguneraketak bilatzen..."
@@ -3098,6 +3287,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
new file mode 100644
index 0000000000..5471e5db58
--- /dev/null
+++ b/po/fi_FI.po
@@ -0,0 +1,3281 @@
+# Finnish translation for ScummVM.
+# Copyright (c) 2012-2013 ScummVM Team
+# This file is distributed under the same license as the ScummVM package.
+# Toni Saarela <saarela@gmail.com>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ScummVM 1.6.0git\n"
+"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2012-12-01 19:37+0200\n"
+"Last-Translator: Toni Saarela <saarela@gmail.com>\n"
+"Language-Team: Finnish\n"
+"Language: Suomi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: gui/about.cpp:93
+#, c-format
+msgid "(built on %s)"
+msgstr "(käännöksen päiväys: %s)"
+
+#: gui/about.cpp:100
+msgid "Features compiled in:"
+msgstr "Tähän versioon käännetyt ominaisuudet:"
+
+#: gui/about.cpp:109
+msgid "Available engines:"
+msgstr "Tuetut pelimoottorit:"
+
+#: 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:71 gui/browser.cpp:73
+msgid "Go to previous directory level"
+msgstr "Palaa edelliselle hakemistotasolle"
+
+#: gui/browser.cpp:73
+msgctxt "lowres"
+msgid "Go up"
+msgstr "Siirry ylös"
+
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
+#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
+msgid "Cancel"
+msgstr "Peruuta"
+
+#: gui/browser.cpp:75 gui/chooser.cpp:46 gui/themebrowser.cpp:55
+msgid "Choose"
+msgstr "Valitse"
+
+#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125
+#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165
+#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209
+#: backends/keymapper/remap-dialog.cpp:52
+msgid "Close"
+msgstr "Sulje"
+
+#: gui/gui-manager.cpp:118
+msgid "Mouse click"
+msgstr "Hiiren klikkaus"
+
+#: gui/gui-manager.cpp:122 base/main.cpp:301
+msgid "Display keyboard"
+msgstr "Näytä näppäimistö"
+
+#: gui/gui-manager.cpp:126 base/main.cpp:305
+msgid "Remap keys"
+msgstr "Määritä näppäimet uudelleen"
+
+#: gui/gui-manager.cpp:129 base/main.cpp:308
+msgid "Toggle FullScreen"
+msgstr "Kokoruututilan vaihto"
+
+#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145
+msgid "Choose an action to map"
+msgstr "Valitse toiminto"
+
+#: gui/KeysDialog.cpp:41
+msgid "Map"
+msgstr "Näppäinkartta"
+
+#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001
+#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1239
+#: gui/saveload-dialog.cpp:920 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:419
+#: engines/sword2/animation.cpp:439 engines/sword2/animation.cpp:449
+#: engines/sword2/animation.cpp:458 engines/parallaction/saveload.cpp:274
+#: backends/platform/wii/options.cpp:47
+#: backends/platform/wince/CELauncherDialog.cpp:54
+msgid "OK"
+msgstr "Tallenna"
+
+#: gui/KeysDialog.cpp:49
+msgid "Select an action and click 'Map'"
+msgstr "Valitse toiminto ja klikkaa 'Map'"
+
+#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141
+#, c-format
+msgid "Associated key : %s"
+msgstr "Nykyinen näppäin : %s"
+
+#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143
+#, c-format
+msgid "Associated key : none"
+msgstr "Nykyinen näppäin : ei mikään"
+
+#: gui/KeysDialog.cpp:90
+msgid "Please select an action"
+msgstr "Valitse toiminto"
+
+#: gui/KeysDialog.cpp:106
+msgid "Press the key to associate"
+msgstr "Paina haluamaasi nappia"
+
+#: gui/launcher.cpp:187
+msgid "Game"
+msgstr "Peli"
+
+#: gui/launcher.cpp:191
+msgid "ID:"
+msgstr "Tunniste:"
+
+#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194
+msgid ""
+"Short game identifier used for referring to savegames and running the game "
+"from the command line"
+msgstr ""
+"Lyhyt pelitunniste, jota käytetään kun viitataan pelitallennuksiin ja kun "
+"peli käynnistetään komentoriviltä"
+
+#: gui/launcher.cpp:193
+msgctxt "lowres"
+msgid "ID:"
+msgstr "Tunniste:"
+
+#: gui/launcher.cpp:198
+msgid "Name:"
+msgstr "Nimi:"
+
+#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201
+msgid "Full title of the game"
+msgstr "Pelin koko nimi"
+
+#: gui/launcher.cpp:200
+msgctxt "lowres"
+msgid "Name:"
+msgstr "Nimi:"
+
+#: gui/launcher.cpp:204
+msgid "Language:"
+msgstr "Kieli:"
+
+#: gui/launcher.cpp:204 gui/launcher.cpp:205
+msgid ""
+"Language of the game. This will not turn your Spanish game version into "
+"English"
+msgstr ""
+"Pelin kieli. Tämä ei muuta esimerkiksi espanjankielistä versiota pelistä "
+"englanninkieliseksi."
+
+#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:86
+#: gui/options.cpp:736 gui/options.cpp:749 gui/options.cpp:1209
+#: audio/null.cpp:40
+msgid "<default>"
+msgstr "<oletus>"
+
+#: gui/launcher.cpp:216
+msgid "Platform:"
+msgstr "Alusta:"
+
+#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219
+msgid "Platform the game was originally designed for"
+msgstr "Alusta jolle peli alunperin suunniteltiin"
+
+#: gui/launcher.cpp:218
+msgctxt "lowres"
+msgid "Platform:"
+msgstr "Alusta:"
+
+#: gui/launcher.cpp:231
+msgid "Engine"
+msgstr "Moottori"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
+msgid "Graphics"
+msgstr "Grafiikka"
+
+#: gui/launcher.cpp:239 gui/options.cpp:1072 gui/options.cpp:1089
+msgid "GFX"
+msgstr "GFX"
+
+#: gui/launcher.cpp:242
+msgid "Override global graphic settings"
+msgstr "Ohita globaalit grafiikka-asetukset"
+
+#: gui/launcher.cpp:244
+msgctxt "lowres"
+msgid "Override global graphic settings"
+msgstr "Ohita globaalit grafiikka-asetukset"
+
+#: gui/launcher.cpp:251 gui/options.cpp:1095
+msgid "Audio"
+msgstr "Ääni"
+
+#: gui/launcher.cpp:254
+msgid "Override global audio settings"
+msgstr "Ohita globaalit ääniasetukset"
+
+#: gui/launcher.cpp:256
+msgctxt "lowres"
+msgid "Override global audio settings"
+msgstr "Ohita globaalit ääniasetukset"
+
+#: gui/launcher.cpp:265 gui/options.cpp:1100
+msgid "Volume"
+msgstr "Voimakkuus"
+
+#: gui/launcher.cpp:267 gui/options.cpp:1102
+msgctxt "lowres"
+msgid "Volume"
+msgstr "Voimakkuus"
+
+#: gui/launcher.cpp:270
+msgid "Override global volume settings"
+msgstr "Ohita globaalit äänenvoimakkuusasetukset"
+
+#: gui/launcher.cpp:272
+msgctxt "lowres"
+msgid "Override global volume settings"
+msgstr "Ohita globaalit äänenvoimakkuusasetukset"
+
+#: gui/launcher.cpp:280 gui/options.cpp:1110
+msgid "MIDI"
+msgstr "MIDI"
+
+#: gui/launcher.cpp:283
+msgid "Override global MIDI settings"
+msgstr "Ohita globaalit MIDI-asetukset"
+
+#: gui/launcher.cpp:285
+msgctxt "lowres"
+msgid "Override global MIDI settings"
+msgstr "Ohita globaalit MIDI-asetukset"
+
+#: gui/launcher.cpp:294 gui/options.cpp:1116
+msgid "MT-32"
+msgstr "MT-32"
+
+#: gui/launcher.cpp:297
+msgid "Override global MT-32 settings"
+msgstr "Ohita globaalit MT-32 asetukset"
+
+#: gui/launcher.cpp:299
+msgctxt "lowres"
+msgid "Override global MT-32 settings"
+msgstr "Ohita globaalit MT-32 asetukset"
+
+#: gui/launcher.cpp:308 gui/options.cpp:1123
+msgid "Paths"
+msgstr "Polut"
+
+#: gui/launcher.cpp:310 gui/options.cpp:1125
+msgctxt "lowres"
+msgid "Paths"
+msgstr "Polut"
+
+#: gui/launcher.cpp:317
+msgid "Game Path:"
+msgstr "Pelin polku:"
+
+#: gui/launcher.cpp:319
+msgctxt "lowres"
+msgid "Game Path:"
+msgstr "Pelin polku:"
+
+#: gui/launcher.cpp:324 gui/options.cpp:1149
+msgid "Extra Path:"
+msgstr "Lisäkansio:"
+
+#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327
+msgid "Specifies path to additional data used the game"
+msgstr "Määrittää polun lisätiedostoihin joita peli mahdollisesti käyttää"
+
+#: gui/launcher.cpp:326 gui/options.cpp:1151
+msgctxt "lowres"
+msgid "Extra Path:"
+msgstr "Lisäkansio:"
+
+#: 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: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: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: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: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:1435
+msgid "Select SoundFont"
+msgstr "Valitse äänifontti"
+
+#: gui/launcher.cpp:523 gui/launcher.cpp:677
+msgid "Select directory with game data"
+msgstr "Valitse pelin kansio"
+
+#: gui/launcher.cpp:541
+msgid "Select additional game directory"
+msgstr "Valitse lisäkansio pelille"
+
+#: gui/launcher.cpp:553
+msgid "Select directory for saved games"
+msgstr "Valitse kansio pelitallennuksille"
+
+#: gui/launcher.cpp:580
+msgid "This game ID is already taken. Please choose another one."
+msgstr "Pelin tunnus on jo käytössä. Valitse jokin muu."
+
+#: gui/launcher.cpp:621 engines/dialogs.cpp:110
+msgid "~Q~uit"
+msgstr "~L~opeta"
+
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
+msgid "Quit ScummVM"
+msgstr "Lopeta ScummVM"
+
+#: gui/launcher.cpp:622
+msgid "A~b~out..."
+msgstr "Tietoa..."
+
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
+msgid "About ScummVM"
+msgstr "Tietoa ScummVM:stä"
+
+#: gui/launcher.cpp:623
+msgid "~O~ptions..."
+msgstr "~A~setukset"
+
+#: gui/launcher.cpp:623
+msgid "Change global ScummVM options"
+msgstr "Muuta globaaleja ScummVM:n asetuksia"
+
+#: gui/launcher.cpp:625
+msgid "~S~tart"
+msgstr "~P~elaa"
+
+#: gui/launcher.cpp:625
+msgid "Start selected game"
+msgstr "Pelaa valittua peliä"
+
+#: gui/launcher.cpp:628
+msgid "~L~oad..."
+msgstr "~L~ataa..."
+
+#: gui/launcher.cpp:628
+msgid "Load savegame for selected game"
+msgstr "Lataa pelitallennus valitulle pelille"
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:1120
+msgid "~A~dd Game..."
+msgstr "~L~isää peli..."
+
+#: gui/launcher.cpp:633 gui/launcher.cpp:640
+msgid "Hold Shift for Mass Add"
+msgstr "Pidä Shift-näppäintä pohjassa lisätäksesi useita pelejä kerralla"
+
+#: gui/launcher.cpp:635
+msgid "~E~dit Game..."
+msgstr "Muokkaa peliä..."
+
+#: gui/launcher.cpp:635 gui/launcher.cpp:642
+msgid "Change game options"
+msgstr "Muuta pelin asetuksia"
+
+#: gui/launcher.cpp:637
+msgid "~R~emove Game"
+msgstr "Poista peli"
+
+#: gui/launcher.cpp:637 gui/launcher.cpp:644
+msgid "Remove game from the list. The game data files stay intact"
+msgstr "Poista peli listasta. Pelin tiedostoja ei poisteta levyltä"
+
+#: gui/launcher.cpp:640 gui/launcher.cpp:1120
+msgctxt "lowres"
+msgid "~A~dd Game..."
+msgstr "Lisää peli..."
+
+#: gui/launcher.cpp:642
+msgctxt "lowres"
+msgid "~E~dit Game..."
+msgstr "Muokkaa peliä..."
+
+#: gui/launcher.cpp:644
+msgctxt "lowres"
+msgid "~R~emove Game"
+msgstr "Poista peli..."
+
+#: gui/launcher.cpp:652
+msgid "Search in game list"
+msgstr "Etsi peliä listasta"
+
+#: gui/launcher.cpp:656 gui/launcher.cpp:1167
+msgid "Search:"
+msgstr "Etsi:"
+
+#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245
+#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214
+#: engines/pegasus/pegasus.cpp:349
+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 engines/pegasus/pegasus.cpp:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Load"
+msgstr "Lataa"
+
+#: gui/launcher.cpp:788
+msgid ""
+"Do you really want to run the mass game detector? This could potentially add "
+"a huge number of games."
+msgstr ""
+"Haluatko varmasti lisätä pelejä alihakemistoineen? Tämä voi lisätä suuren "
+"määrän pelejä."
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Yes"
+msgstr "Kyllä"
+
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "No"
+msgstr "Ei"
+
+#: gui/launcher.cpp:837
+msgid "ScummVM couldn't open the specified directory!"
+msgstr "ScummVM ei voi avata kyseistä hakemistoa!"
+
+#: gui/launcher.cpp:849
+msgid "ScummVM could not find any game in the specified directory!"
+msgstr "ScummVM ei löytänyt yhtään peliä kyseisestä hakemistosta!"
+
+#: gui/launcher.cpp:863
+msgid "Pick the game:"
+msgstr "Valitse peli:"
+
+#: gui/launcher.cpp:937
+msgid "Do you really want to remove this game configuration?"
+msgstr "Haluatko varmasti poistaa pelin asetuksineen listalta?"
+
+#: gui/launcher.cpp:1001
+msgid "This game does not support loading games from the launcher."
+msgstr "Tämä peli ei tue pelitallennuksien lataamista pelin ulkopuolelta."
+
+#: gui/launcher.cpp:1005
+msgid "ScummVM could not find any engine capable of running the selected game!"
+msgstr "ScummVM ei löytänyt pelimoottoria joka tukee valittua peliä!"
+
+#: gui/launcher.cpp:1119
+msgctxt "lowres"
+msgid "Mass Add..."
+msgstr "Lisää monta..."
+
+#: gui/launcher.cpp:1119
+msgid "Mass Add..."
+msgstr "Lisää monta..."
+
+#: gui/massadd.cpp:78 gui/massadd.cpp:81
+msgid "... progress ..."
+msgstr "... skannaa ..."
+
+#: gui/massadd.cpp:258
+msgid "Scan complete!"
+msgstr "Skannaus on valmis!"
+
+#: gui/massadd.cpp:261
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games."
+msgstr ""
+"%d uutta peliä löytyi, jätettiin %d peliä huomiotta, koska ne oli jo lisätty "
+"aiemmin."
+
+#: gui/massadd.cpp:265
+#, c-format
+msgid "Scanned %d directories ..."
+msgstr "Skannattiin %d hakemistoa ..."
+
+#: gui/massadd.cpp:268
+#, c-format
+msgid "Discovered %d new games, ignored %d previously added games ..."
+msgstr ""
+"%d uutta peliä löytyi, jätettiin %d peliä huomiotta, koska ne oli jo lisätty "
+"aiemmin."
+
+#: gui/options.cpp:84
+msgid "Never"
+msgstr "Ei koskaan"
+
+#: gui/options.cpp:84
+msgid "every 5 mins"
+msgstr "5 minuutin välein"
+
+#: gui/options.cpp:84
+msgid "every 10 mins"
+msgstr "10 minuutin välein"
+
+#: gui/options.cpp:84
+msgid "every 15 mins"
+msgstr "15 minuutin välein"
+
+#: gui/options.cpp:84
+msgid "every 30 mins"
+msgstr "30 minuutin välein"
+
+#: gui/options.cpp:86
+msgid "8 kHz"
+msgstr "8 kHz"
+
+#: gui/options.cpp:86
+msgid "11kHz"
+msgstr "11 kHz"
+
+#: gui/options.cpp:86
+msgid "22 kHz"
+msgstr "22 kHz"
+
+#: gui/options.cpp:86
+msgid "44 kHz"
+msgstr "44 kHz"
+
+#: gui/options.cpp:86
+msgid "48 kHz"
+msgstr "48 kHz"
+
+#: 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:388
+msgid "Failed to apply some of the graphic options changes:"
+msgstr "Joitain grafiikka-asetuksia ei saatu asetettua:"
+
+#: gui/options.cpp:400
+msgid "the video mode could not be changed."
+msgstr "videotilaa ei voitu vaihtaa."
+
+#: gui/options.cpp:406
+msgid "the fullscreen setting could not be changed"
+msgstr "kokoruututilaa ei voitu muuttaa"
+
+#: gui/options.cpp:412
+msgid "the aspect ratio setting could not be changed"
+msgstr "kuvasuhdekorjausasetusta ei voitu muuttaa"
+
+#: gui/options.cpp:733
+msgid "Graphics mode:"
+msgstr "Grafiikkatila:"
+
+#: gui/options.cpp:747
+msgid "Render mode:"
+msgstr "Renderöintitila:"
+
+#: 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:759
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:476
+msgid "Fullscreen mode"
+msgstr "Kokoruututila"
+
+#: gui/options.cpp:762
+msgid "Aspect ratio correction"
+msgstr "Kuvasuhteen korjaus"
+
+#: gui/options.cpp:762
+msgid "Correct aspect ratio for 320x200 games"
+msgstr "Oikea kuvasuhde 320x200 peleille"
+
+#: gui/options.cpp:770
+msgid "Preferred Device:"
+msgstr "Ensisijainen laite:"
+
+#: gui/options.cpp:770
+msgid "Music Device:"
+msgstr "Musiikkilaite:"
+
+#: 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: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:772
+msgctxt "lowres"
+msgid "Preferred Dev.:"
+msgstr "Ensisijainen:"
+
+#: gui/options.cpp:772
+msgctxt "lowres"
+msgid "Music Device:"
+msgstr "Musiikkilaite:"
+
+#: gui/options.cpp:799
+msgid "AdLib emulator:"
+msgstr "AdLib emulaattori:"
+
+#: 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:810
+msgid "Output rate:"
+msgstr "Taajuus:"
+
+#: gui/options.cpp:810 gui/options.cpp:811
+msgid ""
+"Higher value specifies better sound quality but may be not supported by your "
+"soundcard"
+msgstr ""
+"Isommat taajuudet merkitsevät parempaa äänenlaatua, mutta äänikorttisi ei "
+"ehkä tue niitä."
+
+#: gui/options.cpp:821
+msgid "GM Device:"
+msgstr "GM laite:"
+
+#: 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:832
+msgid "Don't use General MIDI music"
+msgstr "Älä käytä General MIDIä musiikissa"
+
+#: gui/options.cpp:843 gui/options.cpp:909
+msgid "Use first available device"
+msgstr "Käytä ensimmäistä laitetta"
+
+#: gui/options.cpp:855
+msgid "SoundFont:"
+msgstr "Äänifontti:"
+
+#: 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:857
+msgctxt "lowres"
+msgid "SoundFont:"
+msgstr "Äänifontti:"
+
+#: gui/options.cpp:863
+msgid "Mixed AdLib/MIDI mode"
+msgstr "Yhdistetty AdLib/MIDI tila"
+
+#: gui/options.cpp:863
+msgid "Use both MIDI and AdLib sound generation"
+msgstr "Käytä sekä MIDIä että Adlibiä äänentuotantoon"
+
+#: gui/options.cpp:866
+msgid "MIDI gain:"
+msgstr "MIDIn äänilisäys:"
+
+#: gui/options.cpp:873
+msgid "FluidSynth Settings"
+msgstr ""
+
+#: gui/options.cpp:880
+msgid "MT-32 Device:"
+msgstr "MT-32 laite:"
+
+#: 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:885
+msgid "True Roland MT-32 (disable GM emulation)"
+msgstr "Aito Roland MT-32 (ei GM emulointia)"
+
+#: 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 ""
+"Valitse jos haluat käyttää aitoa Roland-yhteensopivaa laittetta joka on "
+"kytketty tietokoneeseesi"
+
+#: 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:890
+#, fuzzy
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Aito Roland MT-32 (ei GM emulointia)"
+
+#: 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:899
+msgid "Don't use Roland MT-32 music"
+msgstr "Älä käytä Roland MT-32 musiikkia"
+
+#: gui/options.cpp:926
+msgid "Text and Speech:"
+msgstr "Tekstitys ja puhe:"
+
+#: gui/options.cpp:930 gui/options.cpp:940
+msgid "Speech"
+msgstr "Puhe"
+
+#: gui/options.cpp:931 gui/options.cpp:941
+msgid "Subtitles"
+msgstr "Tekstitys"
+
+#: gui/options.cpp:932
+msgid "Both"
+msgstr "Molemmat"
+
+#: gui/options.cpp:934
+msgid "Subtitle speed:"
+msgstr "Tekstin nopeus:"
+
+#: gui/options.cpp:936
+msgctxt "lowres"
+msgid "Text and Speech:"
+msgstr "Tekstitys ja puhe:"
+
+#: gui/options.cpp:940
+msgid "Spch"
+msgstr "Puhe"
+
+#: gui/options.cpp:941
+msgid "Subs"
+msgstr "Tekstit"
+
+#: gui/options.cpp:942
+msgctxt "lowres"
+msgid "Both"
+msgstr "Molemmat"
+
+#: gui/options.cpp:942
+msgid "Show subtitles and play speech"
+msgstr "Näytä tekstitys ja käytä puhetta"
+
+#: gui/options.cpp:944
+msgctxt "lowres"
+msgid "Subtitle speed:"
+msgstr "Tekstin nopeus:"
+
+#: gui/options.cpp:960
+msgid "Music volume:"
+msgstr "Musiikki:"
+
+#: gui/options.cpp:962
+msgctxt "lowres"
+msgid "Music volume:"
+msgstr "Musiikki:"
+
+#: gui/options.cpp:969
+msgid "Mute All"
+msgstr "Vaimenna"
+
+#: gui/options.cpp:972
+msgid "SFX volume:"
+msgstr "Ääniefektit:"
+
+#: gui/options.cpp:972 gui/options.cpp:974 gui/options.cpp:975
+msgid "Special sound effects volume"
+msgstr "Erikoisefektit"
+
+#: gui/options.cpp:974
+msgctxt "lowres"
+msgid "SFX volume:"
+msgstr "Ääniefektit:"
+
+#: gui/options.cpp:982
+msgid "Speech volume:"
+msgstr "Puhe:"
+
+#: gui/options.cpp:984
+msgctxt "lowres"
+msgid "Speech volume:"
+msgstr "Puhe:"
+
+#: gui/options.cpp:1141
+msgid "Theme Path:"
+msgstr "Teemojen polku:"
+
+#: gui/options.cpp:1143
+msgctxt "lowres"
+msgid "Theme Path:"
+msgstr "Teemojen polku:"
+
+#: 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:1158
+msgid "Plugins Path:"
+msgstr "Pluginien sijainti:"
+
+#: gui/options.cpp:1160
+msgctxt "lowres"
+msgid "Plugins Path:"
+msgstr "Pluginien sijainti:"
+
+#: gui/options.cpp:1169 gui/fluidsynth-dialog.cpp:137
+msgid "Misc"
+msgstr "Muut"
+
+#: gui/options.cpp:1171
+msgctxt "lowres"
+msgid "Misc"
+msgstr "Muut"
+
+#: gui/options.cpp:1173
+msgid "Theme:"
+msgstr "Teema"
+
+#: gui/options.cpp:1177
+msgid "GUI Renderer:"
+msgstr "GUI renderöijä:"
+
+#: gui/options.cpp:1189
+msgid "Autosave:"
+msgstr "Autom. tallennus:"
+
+#: gui/options.cpp:1191
+msgctxt "lowres"
+msgid "Autosave:"
+msgstr "Autom. tallennus:"
+
+#: gui/options.cpp:1199
+msgid "Keys"
+msgstr "Näppäimet"
+
+#: gui/options.cpp:1206
+msgid "GUI Language:"
+msgstr "ScummVM:n kieli:"
+
+#: gui/options.cpp:1206
+msgid "Language of ScummVM GUI"
+msgstr "ScummVM käyttöliittymän kieli"
+
+#: 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:1378
+msgid "Select directory for savegames"
+msgstr "Valitse hakemisto pelitallennuksille."
+
+#: 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:1394
+msgid "Select directory for GUI themes"
+msgstr "Valitse hakemisto käyttöliittymän teemoille"
+
+#: gui/options.cpp:1404
+msgid "Select directory for extra files"
+msgstr "Valitse hakemisto lisätiedostoille"
+
+#: gui/options.cpp:1415
+msgid "Select directory for plugins"
+msgstr "Valitse hakemisto plugineille"
+
+#: 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."
+msgstr ""
+"Valitsemasi teema ei tue nykyistä valitsemaasi kieltä. Vaihda kieli ensin, "
+"ja yritä sitten uudelleen."
+
+#: gui/saveload-dialog.cpp:166
+msgid "List view"
+msgstr "Listanäkymä"
+
+#: gui/saveload-dialog.cpp:167
+msgid "Grid view"
+msgstr "Ruudukkonäkymä"
+
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
+msgid "No date saved"
+msgstr "Päiväystä ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
+msgid "No time saved"
+msgstr "Aikaa ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
+msgid "No playtime saved"
+msgstr "Peliaikaa ei ole tallennettu"
+
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
+msgid "Delete"
+msgstr "Poista"
+
+#: gui/saveload-dialog.cpp:274
+msgid "Do you really want to delete this savegame?"
+msgstr "Haluatko varmasti poistaa tämän pelitallennuksen?"
+
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
+msgid "Date: "
+msgstr "Päiväys: "
+
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
+msgid "Time: "
+msgstr "Aika: "
+
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
+msgid "Playtime: "
+msgstr "Peliaika: "
+
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
+msgid "Untitled savestate"
+msgstr "Nimetön pelitallennus"
+
+#: gui/saveload-dialog.cpp:546
+msgid "Next"
+msgstr "Seuraava"
+
+#: gui/saveload-dialog.cpp:549
+msgid "Prev"
+msgstr "Edellinen"
+
+#: gui/saveload-dialog.cpp:736
+msgid "New Save"
+msgstr "Uusi pelitallennus"
+
+#: gui/saveload-dialog.cpp:736
+msgid "Create a new save game"
+msgstr "Luo uusi pelitallennus"
+
+#: gui/saveload-dialog.cpp:865
+msgid "Name: "
+msgstr "Nimi: "
+
+#: gui/saveload-dialog.cpp:937
+#, c-format
+msgid "Enter a description for slot %d:"
+msgstr "Anna kuvaus tallennukselle numero %d:"
+
+#: gui/themebrowser.cpp:44
+msgid "Select a Theme"
+msgstr "Valitse teema"
+
+#: gui/ThemeEngine.cpp:337
+msgid "Disabled GFX"
+msgstr "Disabloitu GFX"
+
+#: gui/ThemeEngine.cpp:337
+msgctxt "lowres"
+msgid "Disabled GFX"
+msgstr "Disabloitu GFX"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard Renderer (16bpp)"
+msgstr "Standardirenderöijä (16 bpp)"
+
+#: gui/ThemeEngine.cpp:338
+msgid "Standard (16bpp)"
+msgstr "Standardi (16 bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased Renderer (16bpp)"
+msgstr "Antialiasoitu renderöijä (16 bpp)"
+
+#: gui/ThemeEngine.cpp:340
+msgid "Antialiased (16bpp)"
+msgstr "Antialiasoitu (16 bpp)"
+
+#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332
+msgid "Clear value"
+msgstr "Tyhjennä arvo"
+
+#: gui/fluidsynth-dialog.cpp:67
+#, fuzzy
+msgid "Reverb"
+msgstr "Ei koskaan"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr " (Aktiivinen)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+#, fuzzy
+msgid "Speed:"
+msgstr "Puhe"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+#, fuzzy
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Haluatko varmasti palata pelivalitsimeen?"
+
+#: base/main.cpp:210
+#, c-format
+msgid "Engine does not support debug level '%s'"
+msgstr "Pelimoottori ei tue debug tasoa '%s'"
+
+#: base/main.cpp:288
+msgid "Menu"
+msgstr "Valikko"
+
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
+#: backends/platform/wince/CEActionsPocket.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:46
+msgid "Skip"
+msgstr "Ohita"
+
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
+#: backends/platform/wince/CEActionsPocket.cpp:42
+msgid "Pause"
+msgstr "Tauko"
+
+#: base/main.cpp:297
+msgid "Skip line"
+msgstr "Ohita rivi"
+
+#: base/main.cpp:468
+msgid "Error running game:"
+msgstr "Virhe ajettaessa peliä:"
+
+#: base/main.cpp:492
+msgid "Could not find any engine capable of running the selected game"
+msgstr "Pelimoottoria joka tukisi valittua peliä ei löytynyt"
+
+#: common/error.cpp:38
+msgid "No error"
+msgstr "Ei virhettä"
+
+#: common/error.cpp:40
+msgid "Game data not found"
+msgstr "Pelin tietoja ei löytynyt"
+
+#: common/error.cpp:42
+msgid "Game id not supported"
+msgstr "Pelin tunniste ei ole tuettu"
+
+#: common/error.cpp:44
+msgid "Unsupported color mode"
+msgstr "Väritilaa ei tueta"
+
+#: common/error.cpp:47
+msgid "Read permission denied"
+msgstr "Lukuoikeuksia ei saatu"
+
+#: common/error.cpp:49
+msgid "Write permission denied"
+msgstr "Kirjoitusoikeuksia ei saatu"
+
+#: common/error.cpp:52
+msgid "Path does not exist"
+msgstr "Polkua ei ole olemassa"
+
+#: common/error.cpp:54
+msgid "Path not a directory"
+msgstr "Polku ei ole hakemisto"
+
+#: common/error.cpp:56
+msgid "Path not a file"
+msgstr "Polku ei ole tiedosto"
+
+#: common/error.cpp:59
+msgid "Cannot create file"
+msgstr "Tiedoston luonti ei onnistu"
+
+#: common/error.cpp:61
+msgid "Reading data failed"
+msgstr "Tiedon lukeminen epäonnistui"
+
+#: common/error.cpp:63
+msgid "Writing data failed"
+msgstr "Tiedon kirjoittaminen epäonnistui"
+
+#: common/error.cpp:66
+msgid "Could not find suitable engine plugin"
+msgstr "Sopivaa pelimoottorin pluginia ei löytynyt"
+
+#: common/error.cpp:68
+msgid "Engine plugin does not support save states"
+msgstr "Pelimoottori ei tue tallennustiloja"
+
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Käyttäjä peruutti"
+
+#: common/error.cpp:75
+msgid "Unknown error"
+msgstr "Tuntematon virhe"
+
+#: engines/advancedDetector.cpp:316
+#, c-format
+msgid "The game in '%s' seems to be unknown."
+msgstr "Peli hakemistossa '%s' näyttäisi olevan tuntematon."
+
+#: engines/advancedDetector.cpp:317
+msgid "Please, report the following data to the ScummVM team along with name"
+msgstr ""
+"Ole hyvä ja ilmoita ScummVM:n kehittäjille seuraavat tiedot, lisäksi kerro"
+
+#: engines/advancedDetector.cpp:319
+msgid "of the game you tried to add and its version/language/etc.:"
+msgstr ""
+"mikä peli oli kyseessä, ja sen versio, kieli, ja muut vastaavat tiedot."
+
+#: engines/dialogs.cpp:84
+msgid "~R~esume"
+msgstr "~J~atka"
+
+#: engines/dialogs.cpp:86
+msgid "~L~oad"
+msgstr "~L~ataa"
+
+#: engines/dialogs.cpp:90
+msgid "~S~ave"
+msgstr "~T~allenna"
+
+#: engines/dialogs.cpp:94
+msgid "~O~ptions"
+msgstr "~A~setukset"
+
+#: engines/dialogs.cpp:99
+msgid "~H~elp"
+msgstr "~O~hje"
+
+#: engines/dialogs.cpp:101
+msgid "~A~bout"
+msgstr "~T~ietoa"
+
+#: engines/dialogs.cpp:104 engines/dialogs.cpp:180
+msgid "~R~eturn to Launcher"
+msgstr "Palaa p~e~livalitsimeen"
+
+#: engines/dialogs.cpp:106 engines/dialogs.cpp:182
+msgctxt "lowres"
+msgid "~R~eturn to Launcher"
+msgstr "Palaa p~e~livalitsimeen"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: engines/drascula/saveload.cpp:338 engines/cruise/menu.cpp:212
+#: engines/sci/engine/kfile.cpp:742 engines/toltecs/menu.cpp:284
+#: engines/pegasus/pegasus.cpp:373
+msgid "Save game:"
+msgstr "Tallenna peli:"
+
+#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803
+#: 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:373
+#: backends/platform/symbian/src/SymbianActions.cpp:44
+#: backends/platform/wince/CEActionsPocket.cpp:43
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:45
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Save"
+msgstr "Tallenna"
+
+#: engines/dialogs.cpp:144
+msgid ""
+"Sorry, this engine does not currently provide in-game help. Please consult "
+"the README for basic information, and for instructions on how to obtain "
+"further assistance."
+msgstr ""
+"Tämä pelimoottori ei toistaiseksi tue pelin sisäistä ohjetta. Avaa LUEMINUT "
+"tiedosto saadaksesi lisätietoa."
+
+#: engines/dialogs.cpp:228
+#, c-format
+msgid ""
+"Gamestate save failed (%s)! Please consult the README for basic information, "
+"and for instructions on how to obtain further assistance."
+msgstr ""
+"Pelitilan tallennus epäonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
+"lisätietoa."
+
+#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109
+#: engines/mohawk/dialogs.cpp:170
+msgid "~O~K"
+msgstr "~H~yväksy"
+
+#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110
+#: engines/mohawk/dialogs.cpp:171
+msgid "~C~ancel"
+msgstr "~P~eruuta"
+
+#: engines/dialogs.cpp:305
+msgid "~K~eys"
+msgstr "~N~äppäimet"
+
+#: engines/engine.cpp:240
+msgid "Could not initialize color format."
+msgstr "Väriformaattia ei voitu alustaa"
+
+#: engines/engine.cpp:248
+msgid "Could not switch to video mode: '"
+msgstr "Videotilan vaihto ei onnistunut:'"
+
+#: engines/engine.cpp:257
+msgid "Could not apply aspect ratio setting."
+msgstr "Kuvasuhdeasetusta ei voitu asettaa."
+
+#: engines/engine.cpp:262
+msgid "Could not apply fullscreen setting."
+msgstr "Kokoruututila-asetusta ei voi asettaa."
+
+#: engines/engine.cpp:362
+msgid ""
+"You appear to be playing this game directly\n"
+"from the CD. This is known to cause problems,\n"
+"and it is therefore recommended that you copy\n"
+"the data files to your hard disk instead.\n"
+"See the README file for details."
+msgstr ""
+"Pelaat suoraan CD-levyltä. Tämä aiheuttaa\n"
+"ongelmia, joten on suositeltavaa että kopioit\n"
+"pelin tiedostot kovalevyllesi. Avaa LUEMINUT\n"
+"tiedosto ohjeita varten."
+
+#: engines/engine.cpp:373
+msgid ""
+"This game has audio tracks in its disk. These\n"
+"tracks need to be ripped from the disk using\n"
+"an appropriate CD audio extracting tool in\n"
+"order to listen to the game's music.\n"
+"See the README file for details."
+msgstr ""
+"Pelin musiikki on CD-levyllä ääniraitoina.\n"
+"Raidat pitää ripata levyltä sopivaa\n"
+"ohjelmistoa käyttäen, jotta musiikit\n"
+"kuuluvat. Lue ohjeet LUEMINUT tiedostosta."
+
+#: engines/engine.cpp: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 ""
+"Pelitilan lataus epäonnistui (%s)! Avaa LUEMINUT tiedosto saadaksesi "
+"lisätietoa."
+
+#: 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 ""
+"VAROITUS: ScummVM ei vielä tue täysin valitsemaasi peliä. Peli saattaa olla "
+"epävakaa, eivätkä pelitallennukset välttämättä toimi tulevissa ScummVM:n "
+"versioissa."
+
+#: engines/engine.cpp:447
+msgid "Start anyway"
+msgstr "Pelaa silti"
+
+#: 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/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/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:841 engines/toltecs/menu.cpp:259
+msgid "Restore game:"
+msgstr "Lataa pelitallenne:"
+
+#: engines/agi/saveload.cpp:816 engines/drascula/saveload.cpp:351
+#: engines/sci/engine/kfile.cpp:841 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"
+
+#: engines/dreamweb/detection.cpp:58
+msgid "Display graphics using the game's bright palette"
+msgstr "Näytä grafiikat käyttäen pelin kirkasta palettia"
+
+#: engines/sci/detection.cpp:373
+msgid "EGA undithering"
+msgstr "EGA unditteröinti"
+
+#: engines/sci/detection.cpp:374
+msgid "Enable undithering in EGA games"
+msgstr "Käytä unditteröintiä EGA peleissä"
+
+#: engines/sci/detection.cpp:383
+msgid "Prefer digital sound effects"
+msgstr "Käytä mieluiten digitaalisia äänitehosteita."
+
+#: engines/sci/detection.cpp:384
+msgid "Prefer digital sound effects instead of synthesized ones"
+msgstr ""
+"Käytä mieluiten digitaalisia äänitehosteita synteettisten tehosteiden sijaan."
+
+#: engines/sci/detection.cpp:403
+msgid "Use IMF/Yamaha FB-01 for MIDI output"
+msgstr "Käytä IMF/Yamaha FB-01:stä MIDI-musiikille"
+
+#: engines/sci/detection.cpp:404
+msgid ""
+"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
+"output"
+msgstr ""
+"Käytä IBM:n Music Feature korttia, tai Yamaha FB-01 FM moduulia MIDIlle"
+
+#: engines/sci/detection.cpp:414
+msgid "Use CD audio"
+msgstr "Käytä CD:n ääntä"
+
+#: engines/sci/detection.cpp:415
+msgid "Use CD audio instead of in-game audio, if available"
+msgstr "Käytä CD:n audiota pelin audion sijaan, jos mahdollista."
+
+#: engines/sci/detection.cpp:425
+msgid "Use Windows cursors"
+msgstr "Käytä Windowsin kursoreita"
+
+#: engines/sci/detection.cpp:426
+msgid ""
+"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
+msgstr ""
+"Käytä Windowsin kursoreita (pienempiä ja harmaasävyisiä) DOS kursorien sijaan"
+
+#: engines/sci/detection.cpp:436
+msgid "Use silver cursors"
+msgstr "Käytä hopeisia kursoreita"
+
+#: engines/sci/detection.cpp:437
+msgid ""
+"Use the alternate set of silver cursors, instead of the normal golden ones"
+msgstr "Käytä vaihtoehtoisia hopeisia kursoreita normaalien kultaisten sijaan"
+
+#: engines/scumm/dialogs.cpp:175
+#, c-format
+msgid "Insert Disk %c and Press Button to Continue."
+msgstr "Lisää levyke %c ja paina jotain nappia jatkaaksesi."
+
+#: engines/scumm/dialogs.cpp:176
+#, c-format
+msgid "Unable to Find %s, (%c%d) Press Button."
+msgstr "Tiedosto %s, (%c%d) ei löydy. Paina nappia."
+
+#: engines/scumm/dialogs.cpp:177
+#, c-format
+msgid "Error reading disk %c, (%c%d) Press Button."
+msgstr "Virhe luettaessa levyä %c, (%c%d) Paina jotain nappia."
+
+#: engines/scumm/dialogs.cpp:178
+msgid "Game Paused. Press SPACE to Continue."
+msgstr "Pause. Paina välilyöntiä jatkaaksesi."
+
+#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
+#. "Moechten Sie wirklich neu starten? (J/N)J"
+#. Will react to J as 'Yes'
+#: engines/scumm/dialogs.cpp:182
+msgid "Are you sure you want to restart? (Y/N)"
+msgstr "Haluatko varmasti aloittaa pelin alusta? (K/E)K"
+
+#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
+#: engines/scumm/dialogs.cpp:184
+msgid "Are you sure you want to quit? (Y/N)"
+msgstr "Haluatko varmati lopettaa?"
+
+#: engines/scumm/dialogs.cpp:189
+msgid "Play"
+msgstr "Pelaa"
+
+#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82
+#: engines/scumm/help.cpp:84
+#: backends/platform/symbian/src/SymbianActions.cpp:52
+#: backends/platform/wince/CEActionsPocket.cpp:44
+#: backends/platform/wince/CEActionsSmartphone.cpp:52
+#: backends/events/default/default-events.cpp:215
+msgid "Quit"
+msgstr "Lopeta"
+
+#: engines/scumm/dialogs.cpp:193
+msgid "Insert save/load game disk"
+msgstr "Laita tallennus/lataus levy asemaan"
+
+#: engines/scumm/dialogs.cpp:194
+msgid "You must enter a name"
+msgstr "Nimi on pakko antaa"
+
+#: engines/scumm/dialogs.cpp:195
+msgid "The game was NOT saved (disk full?)"
+msgstr "Peliä EI tallennettu (onko levy täysi?)"
+
+#: engines/scumm/dialogs.cpp:196
+msgid "The game was NOT loaded"
+msgstr "Peliä EI ladattu"
+
+#: engines/scumm/dialogs.cpp:197
+#, c-format
+msgid "Saving '%s'"
+msgstr "Tallennetaan '%s'"
+
+#: engines/scumm/dialogs.cpp:198
+#, c-format
+msgid "Loading '%s'"
+msgstr "Ladataan '%s'"
+
+#: engines/scumm/dialogs.cpp:199
+msgid "Name your SAVE game"
+msgstr "Nimeä pelitallenteesi"
+
+#: engines/scumm/dialogs.cpp:200
+msgid "Select a game to LOAD"
+msgstr "Valitse ladattava peli"
+
+#: engines/scumm/dialogs.cpp:201
+msgid "Game title)"
+msgstr "Pelin nimi"
+
+#. I18N: Previous page button
+#: engines/scumm/dialogs.cpp:287
+msgid "~P~revious"
+msgstr "E~d~ellinen"
+
+#. I18N: Next page button
+#: engines/scumm/dialogs.cpp:289
+msgid "~N~ext"
+msgstr "Se~u~raava"
+
+#: engines/scumm/dialogs.cpp:290
+#: backends/platform/ds/arm9/source/dsoptions.cpp:56
+msgid "~C~lose"
+msgstr "~S~ulje"
+
+#: engines/scumm/dialogs.cpp:597
+msgid "Speech Only"
+msgstr "Vain puhe"
+
+#: engines/scumm/dialogs.cpp:598
+msgid "Speech and Subtitles"
+msgstr "Puhe ja Tekstitys"
+
+#: engines/scumm/dialogs.cpp:599
+msgid "Subtitles Only"
+msgstr "Vain tekstitys"
+
+#: engines/scumm/dialogs.cpp:607
+msgctxt "lowres"
+msgid "Speech & Subs"
+msgstr "Puhe & teksti"
+
+#: engines/scumm/dialogs.cpp:653
+msgid "Select a Proficiency Level."
+msgstr "Valitse taitotasosi."
+
+#: engines/scumm/dialogs.cpp:655
+msgid "Refer to your Loom(TM) manual for help."
+msgstr "Lue Loom(TM) ohjekirjaa saadaksesi ohjeita."
+
+#: engines/scumm/dialogs.cpp:658
+msgid "Standard"
+msgstr "Standardi"
+
+#: engines/scumm/dialogs.cpp:659
+msgid "Practice"
+msgstr "Harjoitus"
+
+#: engines/scumm/dialogs.cpp:660
+msgid "Expert"
+msgstr "Ekspertti"
+
+#: engines/scumm/help.cpp:73
+msgid "Common keyboard commands:"
+msgstr "Yleisiä näppäimistökomentoja:"
+
+#: engines/scumm/help.cpp:74
+msgid "Save / Load dialog"
+msgstr "Tallenna / Lataa peli"
+
+#: engines/scumm/help.cpp:76
+msgid "Skip line of text"
+msgstr "Ohita rivi tekstiä"
+
+#: engines/scumm/help.cpp:77
+msgid "Esc"
+msgstr "Esc"
+
+#: engines/scumm/help.cpp:77
+msgid "Skip cutscene"
+msgstr "Ohita video"
+
+#: engines/scumm/help.cpp:78
+msgid "Space"
+msgstr "Välilyönti"
+
+#: engines/scumm/help.cpp:78
+msgid "Pause game"
+msgstr "Pause"
+
+#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96
+#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98
+#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Ctrl"
+msgstr "Ctrl"
+
+#: engines/scumm/help.cpp:79
+msgid "Load game state 1-10"
+msgstr "Lataa pelitila 1-10"
+
+#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100
+#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102
+msgid "Alt"
+msgstr "Alt"
+
+#: engines/scumm/help.cpp:80
+msgid "Save game state 1-10"
+msgstr "Tallenna pelitila 1-10"
+
+#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89
+msgid "Enter"
+msgstr "Enter"
+
+#: engines/scumm/help.cpp:86
+msgid "Toggle fullscreen"
+msgstr "Kytke kokoruututila päälle tai pois"
+
+#: engines/scumm/help.cpp:87
+msgid "Music volume up / down"
+msgstr "Musiikin äänenvoimakkuus ylös / alas"
+
+#: engines/scumm/help.cpp:88
+msgid "Text speed slower / faster"
+msgstr "Hidasta/nopeuta tekstiä"
+
+#: engines/scumm/help.cpp:89
+msgid "Simulate left mouse button"
+msgstr "Simuloi hiiren vasenta näppäintä"
+
+#: engines/scumm/help.cpp:90
+msgid "Tab"
+msgstr "Sarkain"
+
+#: engines/scumm/help.cpp:90
+msgid "Simulate right mouse button"
+msgstr "Simuloi oikeaa hiiren nappia"
+
+#: engines/scumm/help.cpp:93
+msgid "Special keyboard commands:"
+msgstr "Erityiskomennot:"
+
+#: engines/scumm/help.cpp:94
+msgid "Show / Hide console"
+msgstr "Näytä / piilota konsoli"
+
+#: engines/scumm/help.cpp:95
+msgid "Start the debugger"
+msgstr "Käynnistä debuggeri"
+
+#: engines/scumm/help.cpp:96
+msgid "Show memory consumption"
+msgstr "Näytä muistinkulutus"
+
+#: engines/scumm/help.cpp:97
+msgid "Run in fast mode (*)"
+msgstr "Aja nopeassa tilassa (*)"
+
+#: engines/scumm/help.cpp:98
+msgid "Run in really fast mode (*)"
+msgstr "Aja erittäin nopeassa tilassa (*)"
+
+#: engines/scumm/help.cpp:99
+msgid "Toggle mouse capture"
+msgstr "Kytke hiiren kaappaus päälle tai pois"
+
+#: engines/scumm/help.cpp:100
+msgid "Switch between graphics filters"
+msgstr "Vaihda grafiikkafiltteriä"
+
+#: engines/scumm/help.cpp:101
+msgid "Increase / Decrease scale factor"
+msgstr "Kasvata / vähennä skaalakerrointa"
+
+#: engines/scumm/help.cpp:102
+msgid "Toggle aspect-ratio correction"
+msgstr "Kytke kuvasuhdekorjaus päälle tai pois"
+
+#: engines/scumm/help.cpp:107
+msgid "* Note that using ctrl-f and"
+msgstr "* Huomaa että ctrl-f ja"
+
+#: engines/scumm/help.cpp:108
+msgid " ctrl-g are not recommended"
+msgstr " ctrl-g ovat epävakaita eikä"
+
+#: engines/scumm/help.cpp:109
+msgid " since they may cause crashes"
+msgstr " niiden käyttöä suositella"
+
+#: engines/scumm/help.cpp:110
+msgid " or incorrect game behavior."
+msgstr " mahdollisten virheiden vuoksi."
+
+#: engines/scumm/help.cpp:114
+msgid "Spinning drafts on the keyboard:"
+msgstr ""
+
+#: engines/scumm/help.cpp:116
+msgid "Main game controls:"
+msgstr "Pelin tärkeimmät kontrollit:"
+
+#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136
+#: engines/scumm/help.cpp:161
+msgid "Push"
+msgstr "Paina"
+
+#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137
+#: engines/scumm/help.cpp:162
+msgid "Pull"
+msgstr "Vedä"
+
+#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138
+#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197
+#: engines/scumm/help.cpp:207
+msgid "Give"
+msgstr "Anna"
+
+#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
+#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190
+#: engines/scumm/help.cpp:208
+msgid "Open"
+msgstr "Avaa"
+
+#: engines/scumm/help.cpp:126
+msgid "Go to"
+msgstr "Mene"
+
+#: engines/scumm/help.cpp:127
+msgid "Get"
+msgstr "Ota"
+
+#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152
+#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198
+#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224
+#: engines/scumm/help.cpp:250
+msgid "Use"
+msgstr "Käytä"
+
+#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141
+msgid "Read"
+msgstr "Lue"
+
+#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147
+msgid "New kid"
+msgstr "Uusi lapsi"
+
+#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153
+#: engines/scumm/help.cpp:171
+msgid "Turn on"
+msgstr "Käynnistä"
+
+#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154
+#: engines/scumm/help.cpp:172
+msgid "Turn off"
+msgstr "Sammuta"
+
+#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167
+#: engines/scumm/help.cpp:194
+msgid "Walk to"
+msgstr "Kävele"
+
+#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168
+#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210
+#: engines/scumm/help.cpp:227
+msgid "Pick up"
+msgstr "Ota"
+
+#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169
+msgid "What is"
+msgstr "Mitä on"
+
+#: engines/scumm/help.cpp:146
+msgid "Unlock"
+msgstr "Avaa lukko"
+
+#: engines/scumm/help.cpp:149
+msgid "Put on"
+msgstr "Pue ylle"
+
+#: engines/scumm/help.cpp:150
+msgid "Take off"
+msgstr "Lähde matkaan"
+
+#: engines/scumm/help.cpp:156
+msgid "Fix"
+msgstr "Korjaa"
+
+#: engines/scumm/help.cpp:158
+msgid "Switch"
+msgstr "Vaihda"
+
+#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228
+msgid "Look"
+msgstr "Katso"
+
+#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223
+msgid "Talk"
+msgstr "Puhu"
+
+#: engines/scumm/help.cpp:174
+msgid "Travel"
+msgstr "Matkusta"
+
+#: engines/scumm/help.cpp:175
+msgid "To Henry / To Indy"
+msgstr "Henry / Indy"
+
+#. I18N: These are different musical notes
+#: engines/scumm/help.cpp:179
+msgid "play C minor on distaff"
+msgstr "soita C molli"
+
+#: engines/scumm/help.cpp:180
+msgid "play D on distaff"
+msgstr "soita D"
+
+#: engines/scumm/help.cpp:181
+msgid "play E on distaff"
+msgstr "soita E"
+
+#: engines/scumm/help.cpp:182
+msgid "play F on distaff"
+msgstr "soita F"
+
+#: engines/scumm/help.cpp:183
+msgid "play G on distaff"
+msgstr "soita G"
+
+#: engines/scumm/help.cpp:184
+msgid "play A on distaff"
+msgstr "soita A"
+
+#: engines/scumm/help.cpp:185
+msgid "play B on distaff"
+msgstr "soita B"
+
+#: engines/scumm/help.cpp:186
+msgid "play C major on distaff"
+msgstr "soita C duuri"
+
+#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214
+msgid "puSh"
+msgstr "Paina"
+
+#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215
+msgid "pull (Yank)"
+msgstr "Vedä"
+
+#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212
+#: engines/scumm/help.cpp:248
+msgid "Talk to"
+msgstr "Puhu"
+
+#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211
+msgid "Look at"
+msgstr "Katso"
+
+#: engines/scumm/help.cpp:200
+msgid "turn oN"
+msgstr "Kytke päälle"
+
+#: engines/scumm/help.cpp:201
+msgid "turn oFf"
+msgstr "Kytke pois päältä"
+
+#: engines/scumm/help.cpp:217
+msgid "KeyUp"
+msgstr "KeyUp"
+
+#: engines/scumm/help.cpp:217
+msgid "Highlight prev dialogue"
+msgstr "Korosta edellistä dialogia"
+
+#: engines/scumm/help.cpp:218
+msgid "KeyDown"
+msgstr "KeyDown"
+
+#: engines/scumm/help.cpp:218
+msgid "Highlight next dialogue"
+msgstr "Korosta seuraavaa dialogia"
+
+#: engines/scumm/help.cpp:222
+msgid "Walk"
+msgstr "Kävele"
+
+#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234
+#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249
+msgid "Inventory"
+msgstr "Tavarat"
+
+#: engines/scumm/help.cpp:226
+msgid "Object"
+msgstr "Esine"
+
+#: engines/scumm/help.cpp:229
+msgid "Black and White / Color"
+msgstr "Mustavalko / Väri"
+
+#: engines/scumm/help.cpp:232
+msgid "Eyes"
+msgstr "Silmät"
+
+#: engines/scumm/help.cpp:233
+msgid "Tongue"
+msgstr "Kieli"
+
+#: engines/scumm/help.cpp:235
+msgid "Punch"
+msgstr "Lyö"
+
+#: engines/scumm/help.cpp:236
+msgid "Kick"
+msgstr "Potkaise"
+
+#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247
+msgid "Examine"
+msgstr "Tutki"
+
+#: engines/scumm/help.cpp:240
+msgid "Regular cursor"
+msgstr "Tavallinen kursori"
+
+#. I18N: Comm is a communication device
+#: engines/scumm/help.cpp:243
+msgid "Comm"
+msgstr "Kommunikointilaite"
+
+#: engines/scumm/help.cpp:246
+msgid "Save / Load / Options"
+msgstr "Tallenna / Lataa / Asetukset"
+
+#: engines/scumm/help.cpp:255
+msgid "Other game controls:"
+msgstr "Muut pelin ohjaimet:"
+
+#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267
+msgid "Inventory:"
+msgstr "Tavarat:"
+
+#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274
+msgid "Scroll list up"
+msgstr "Vieritä listaa ylös"
+
+#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
+msgid "Scroll list down"
+msgstr "Vieritä listaa alas"
+
+#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268
+msgid "Upper left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270
+msgid "Lower left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
+msgid "Upper right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273
+msgid "Lower right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:269
+msgid "Middle left item"
+msgstr ""
+
+#: engines/scumm/help.cpp:272
+msgid "Middle right item"
+msgstr ""
+
+#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284
+msgid "Switching characters:"
+msgstr "Vaihda hahmoa:"
+
+#: engines/scumm/help.cpp:281
+msgid "Second kid"
+msgstr "Toinen lapsi"
+
+#: engines/scumm/help.cpp:282
+msgid "Third kid"
+msgstr "Kolmas lapsi"
+
+#: engines/scumm/help.cpp:294
+msgid "Fighting controls (numpad):"
+msgstr "Tappeluohjaimet (numpad)"
+
+#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296
+#: engines/scumm/help.cpp:297
+msgid "Step back"
+msgstr "Astu taakse"
+
+#: engines/scumm/help.cpp:298
+msgid "Block high"
+msgstr "Torju korkea"
+
+#: engines/scumm/help.cpp:299
+msgid "Block middle"
+msgstr "Torju keskeltä"
+
+#: engines/scumm/help.cpp:300
+msgid "Block low"
+msgstr "Torju alhaalta"
+
+#: engines/scumm/help.cpp:301
+msgid "Punch high"
+msgstr "Lyö ylös"
+
+#: engines/scumm/help.cpp:302
+msgid "Punch middle"
+msgstr "Lyö keskelle"
+
+#: engines/scumm/help.cpp:303
+msgid "Punch low"
+msgstr "Lyö alas"
+
+#: engines/scumm/help.cpp:306
+msgid "These are for Indy on left."
+msgstr "Nämä ovat Indylle vasemmalla."
+
+#: engines/scumm/help.cpp:307
+msgid "When Indy is on the right,"
+msgstr "Kun Indy on oikealla, "
+
+#: engines/scumm/help.cpp:308
+msgid "7, 4, and 1 are switched with"
+msgstr "7, 4 ja 1 vaihdetaan näppäinten"
+
+#: engines/scumm/help.cpp:309
+msgid "9, 6, and 3, respectively."
+msgstr "9, 6 ja 3 kanssa."
+
+#: engines/scumm/help.cpp:316
+msgid "Biplane controls (numpad):"
+msgstr "Koneen ohjaimet (numpad):"
+
+#: engines/scumm/help.cpp:317
+msgid "Fly to upper left"
+msgstr "Lennä ylös vasemmalle"
+
+#: engines/scumm/help.cpp:318
+msgid "Fly to left"
+msgstr "Lennä vasemmalle"
+
+#: engines/scumm/help.cpp:319
+msgid "Fly to lower left"
+msgstr "Lennä alas vasemmalle"
+
+#: engines/scumm/help.cpp:320
+msgid "Fly upwards"
+msgstr "Lennä ylöspäin"
+
+#: engines/scumm/help.cpp:321
+msgid "Fly straight"
+msgstr "Lennä suoraan"
+
+#: engines/scumm/help.cpp:322
+msgid "Fly down"
+msgstr "Lennä alas"
+
+#: engines/scumm/help.cpp:323
+msgid "Fly to upper right"
+msgstr "Lennä ylös oikealle"
+
+#: engines/scumm/help.cpp:324
+msgid "Fly to right"
+msgstr "Lennä oikealle"
+
+#: engines/scumm/help.cpp:325
+msgid "Fly to lower right"
+msgstr "Lennä alas oikealle"
+
+#: engines/scumm/scumm.cpp:1776
+#, c-format
+msgid ""
+"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
+"but %s is missing. Using AdLib instead."
+msgstr ""
+"Suora MIDI tuki vaatii Roland päivityksen LucasArtsilta, mutta\n"
+"%s puuttuu. Käytetään AdLibia sen sijaan."
+
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
+#, c-format
+msgid ""
+"Failed to save game state to file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan tallennus ei onnistunut tiedostoon:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2310 engines/agos/saveload.cpp:185
+#, c-format
+msgid ""
+"Failed to load game state from file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan lataus ei onnistunut tiedostosta:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp:2322 engines/agos/saveload.cpp:228
+#, c-format
+msgid ""
+"Successfully saved game state in file:\n"
+"\n"
+"%s"
+msgstr ""
+"Pelitilan tallennus onnistui tiedostoon:\n"
+"\n"
+"%s"
+
+#: engines/scumm/scumm.cpp: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' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Maniac Mansionin pitäisi nyt käynnistyä, mutta ScummVM ei tue sitä vielä. "
+"Pelataksesi Maniac Mansionia, mene ScummVM:n päävalikkoon ja paina 'Lisää "
+"peli'. Valitse 'Maniac' hakemisto Tentacle hakemiston sisältä."
+
+#. I18N: Option for fast scene switching
+#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:167
+msgid "~Z~ip Mode Activated"
+msgstr "~Z~ip moodi valittu"
+
+#: engines/mohawk/dialogs.cpp:93
+msgid "~T~ransitions Enabled"
+msgstr "Siirtymät päällä"
+
+#. I18N: Drop book page
+#: engines/mohawk/dialogs.cpp:95
+msgid "~D~rop Page"
+msgstr "Pudota sivu"
+
+#: engines/mohawk/dialogs.cpp:99
+msgid "~S~how Map"
+msgstr "Näytä kartta"
+
+#: engines/mohawk/dialogs.cpp:105
+msgid "~M~ain Menu"
+msgstr "Päävalikko"
+
+#: engines/mohawk/dialogs.cpp:168
+msgid "~W~ater Effect Enabled"
+msgstr "Vesiefekti päällä"
+
+#: engines/agos/animation.cpp:557
+#, c-format
+msgid "Cutscene file '%s' not found!"
+msgstr "Videotiedostoa '%s' ei löytynyt!"
+
+#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287
+#: engines/tinsel/saveload.cpp:532
+msgid "Failed to load game state from file."
+msgstr "Pelitallenteen lataaminen tiedostosta epäonnistui."
+
+#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545
+msgid "Failed to save game state to file."
+msgstr "Pelin tallentaminen tiedostoon epäonnistui."
+
+#: engines/gob/inter_v5.cpp:107
+msgid "Failed to delete file."
+msgstr "Tiedoston tuhoaminen ei onnistunut."
+
+#: engines/groovie/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."
+
+#. I18N: Studio audience adds an applause and cheering sounds whenever
+#. Malcolm makes a joke.
+#: engines/kyra/detection.cpp:62
+msgid "Studio audience"
+msgstr "Studioyleisö"
+
+#: engines/kyra/detection.cpp:63
+msgid "Enable studio audience"
+msgstr "Studioyleisö päälle"
+
+#. I18N: This option allows the user to skip text and cutscenes.
+#: engines/kyra/detection.cpp:73
+msgid "Skip support"
+msgstr "Ohita tuki"
+
+#: engines/kyra/detection.cpp:74
+msgid "Allow text and cutscenes to be skipped"
+msgstr "Salli tekstin ja videoiden ohittaminen"
+
+#. I18N: Helium mode makes people sound like they've inhaled Helium.
+#: engines/kyra/detection.cpp:84
+msgid "Helium mode"
+msgstr "Helium moodi"
+
+#: engines/kyra/detection.cpp:85
+msgid "Enable helium mode"
+msgstr "Käytä helium moodia"
+
+#. I18N: When enabled, this option makes scrolling smoother when
+#. changing from one screen to another.
+#: engines/kyra/detection.cpp:99
+msgid "Smooth scrolling"
+msgstr "Pehmeä vieritys"
+
+#: engines/kyra/detection.cpp:100
+msgid "Enable smooth scrolling when walking"
+msgstr "Käytä pehmeää vieritystä kävellessä"
+
+#. I18N: When enabled, this option changes the cursor when it floats to the
+#. edge of the screen to a directional arrow. The player can then click to
+#. walk towards that direction.
+#: engines/kyra/detection.cpp:112
+msgid "Floating cursors"
+msgstr "Leijuva kursori"
+
+#: engines/kyra/detection.cpp:113
+msgid "Enable floating cursors"
+msgstr "Käytä leijuvia kursoreita"
+
+#. I18N: HP stands for Hit Points
+#: engines/kyra/detection.cpp:127
+msgid "HP bar graphs"
+msgstr "Kestopisteet (HP) graafisina palkkeina"
+
+#: engines/kyra/detection.cpp:128
+msgid "Enable hit point bar graphs"
+msgstr "Käytä kestopisteissä värillisiä grafiikkapalkkeja numeroiden sijaan"
+
+#: engines/kyra/lol.cpp:478
+msgid "Attack 1"
+msgstr "Hyökkäys 1"
+
+#: engines/kyra/lol.cpp:479
+msgid "Attack 2"
+msgstr "Hyökkäys 2"
+
+#: engines/kyra/lol.cpp:480
+msgid "Attack 3"
+msgstr "Hyökkäys 3"
+
+#: engines/kyra/lol.cpp:481
+msgid "Move Forward"
+msgstr "Liiku eteenpäin"
+
+#: engines/kyra/lol.cpp:482
+msgid "Move Back"
+msgstr "Liiku taaksepäin"
+
+#: engines/kyra/lol.cpp:483
+msgid "Slide Left"
+msgstr "Liiku vasemmalle"
+
+#: engines/kyra/lol.cpp:484
+msgid "Slide Right"
+msgstr "Liiku oikealle"
+
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
+msgid "Turn Left"
+msgstr "Käänny vasemmalle"
+
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
+msgid "Turn Right"
+msgstr "Käänny oikealle"
+
+#: engines/kyra/lol.cpp:487
+msgid "Rest"
+msgstr "Lepää"
+
+#: engines/kyra/lol.cpp:488
+msgid "Options"
+msgstr "Asetukset"
+
+#: engines/kyra/lol.cpp:489
+msgid "Choose Spell"
+msgstr "Valitse loitsu"
+
+#: engines/kyra/sound_midi.cpp:477
+msgid ""
+"You appear to be using a General MIDI device,\n"
+"but your game only supports Roland MT32 MIDI.\n"
+"We try to map the Roland MT32 instruments to\n"
+"General MIDI ones. It is still possible that\n"
+"some tracks sound incorrect."
+msgstr ""
+"Käytät General MIDI-äänilaitetta, mutta peli\n"
+"tukee vain Roland MT-32:sta. Jotkut ääniraidat\n"
+"eivät ehkä kuulosta siltä miltä niiden pitäisi."
+
+#: engines/queen/queen.cpp:59
+msgid "Alternative intro"
+msgstr "Vaihtoehtoinen intro"
+
+#: engines/queen/queen.cpp:60
+msgid "Use an alternative game intro (CD version only)"
+msgstr "Käytä vaihtoehtoista pelin introa (vain CD versiossa)"
+
+#: engines/sky/compact.cpp:130
+msgid ""
+"Unable to find \"sky.cpt\" file!\n"
+"Please download it from www.scummvm.org"
+msgstr ""
+"Tiedostoa \"sky.cpt\" ei löydy!\n"
+"Hae se ScummVM:n verkkosivulta."
+
+#: engines/sky/compact.cpp:141
+msgid ""
+"The \"sky.cpt\" file has an incorrect size.\n"
+"Please (re)download it from www.scummvm.org"
+msgstr ""
+"Tiedosto \"sky.cpt\" on väärän kokoinen.\n"
+"Hae uusi versio ScummVM:n verkkosivuilta."
+
+#: engines/sky/detection.cpp:44
+msgid "Floppy intro"
+msgstr "Levykeversion intro"
+
+#: engines/sky/detection.cpp:45
+msgid "Use the floppy version's intro (CD version only)"
+msgstr "Käytä levykeversion introa (vain CD versiossa)"
+
+#: engines/sword1/animation.cpp:519
+#, c-format
+msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
+msgstr "PSX stream videota '%s' ei voi näyttää paletisoidussa tilassa"
+
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
+msgid "DXA cutscenes found but ScummVM has been built without zlib support"
+msgstr ""
+"DXA videotiedostoja löydettiin mutta ScummVM on käännetty ilman zlib-tukea"
+
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
+msgid "MPEG2 cutscenes are no longer supported"
+msgstr "MPEG2 videotiedostoja ei enää tueta"
+
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
+#, c-format
+msgid "Cutscene '%s' not found"
+msgstr "Videotiedosto '%s' ei löytynyt"
+
+#: engines/sword1/control.cpp:863
+msgid ""
+"ScummVM found that you have old savefiles for Broken Sword 1 that should be "
+"converted.\n"
+"The old save game format is no longer supported, so you will not be able to "
+"load your games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked again the next "
+"time you start the game.\n"
+msgstr ""
+"Broken Sword 1:n pelitallennukset ovat vanhassa formaatissa. Tallennukset "
+"tulee muuntaa,\n"
+"jotta niitä voi käyttää ScummVM:ssä. Paina 'Hyväksy' muuntaaksesi tiedostot. "
+"Mikäli et halua muuntaa tiedostoja nyt\n"
+"ScummVM kysyy asiaa seuraavan kerran kun käynnistät pelin.\n"
+
+#: engines/sword1/control.cpp:1232
+#, c-format
+msgid ""
+"Target new save game already exists!\n"
+"Would you like to keep the old save game (%s) or the new one (%s)?\n"
+msgstr ""
+"Kohdetiedosto on jo olemassa!\n"
+"Säilytetäänkö vanha pelitallennus (%s), vai uusi pelitallennus (%s)?\n"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the old one"
+msgstr "Säilytä vanha tallennus"
+
+#: engines/sword1/control.cpp:1235
+msgid "Keep the new one"
+msgstr "Säilytä uusi tallennus"
+
+#: engines/sword1/logic.cpp:1633
+msgid "This is the end of the Broken Sword 1 Demo"
+msgstr "Broken Sword 1:n demo päättyy tähän"
+
+#: engines/sword2/animation.cpp:419
+msgid ""
+"PSX cutscenes found but ScummVM has been built without RGB color support"
+msgstr "PSX videoita löydetty, mutta ScummVM on käännetty ilman RGB tukea"
+
+#: engines/sword2/sword2.cpp:79
+msgid "Show object labels"
+msgstr "Näytä esineiden tiedot"
+
+#: engines/sword2/sword2.cpp:80
+msgid "Show labels for objects on mouse hover"
+msgstr "Näytä esineiden kuvaus kohdistaessasi kursorin esineen ylle"
+
+#: engines/teenagent/resources.cpp:94
+msgid ""
+"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
+msgstr ""
+"Asennuksestasi puuttuu 'teenagent.dat' tiedosto. Hae se ScummVM:n "
+"nettisivuilta"
+
+#: engines/teenagent/resources.cpp:115
+msgid ""
+"The teenagent.dat file is compressed and zlib hasn't been included in this "
+"executable. Please decompress it"
+msgstr ""
+"Tiedosto teenagent.dat on pakattu, mutta zlib-kirjastoa ei ole käännetty "
+"ScummVM:ään. Pura teenagent.dat."
+
+#: engines/parallaction/saveload.cpp:133
+#, c-format
+msgid ""
+"Can't save game in slot %i\n"
+"\n"
+msgstr ""
+"Pelin tallennus kohtaan ei onnistunut kohtaan %i\n"
+"\n"
+
+#: engines/parallaction/saveload.cpp:204
+msgid "Loading game..."
+msgstr "Ladataan peliä..."
+
+#: engines/parallaction/saveload.cpp:219
+msgid "Saving game..."
+msgstr "Tallennetaan peliä..."
+
+#: engines/parallaction/saveload.cpp:272
+msgid ""
+"ScummVM found that you have old savefiles for Nippon Safes that should be "
+"renamed.\n"
+"The old names are no longer supported, so you will not be able to load your "
+"games if you don't convert them.\n"
+"\n"
+"Press OK to convert them now, otherwise you will be asked next time.\n"
+msgstr ""
+"Pelin Nippon Safes tallennukset ovat vanhassa muodossa, joita ei enää tueta. "
+"Tallennukset\n"
+"tulee nimetä uudelleen ennen kuin ScummVM voi käyttää niitä. Paina 'Hyväksy' "
+"muuntaaksesi tallennukset.\n"
+"Jos et tee muunnosta nyt, ScummVM kysyy sinulta uudelleen seuraavalla "
+"kerralla kun käynnistät pelin.\n"
+
+#: engines/parallaction/saveload.cpp:319
+msgid "ScummVM successfully converted all your savefiles."
+msgstr "ScummVM muunsi kaikki pelitallenteet onnistuneesti"
+
+#: engines/parallaction/saveload.cpp:321
+msgid ""
+"ScummVM printed some warnings in your console window and can't guarantee all "
+"your files have been converted.\n"
+"\n"
+"Please report to the team."
+msgstr ""
+"Osa tiedostoista ei ehkä muuntunut oikein. Varoitukset tulostettiin konsoli-"
+"ikkunaan. Pyydämme että ilmoittaisit\n"
+"niistä ScummVM:n kehittäjille."
+
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2446
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoomaa ylös"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr ""
+
+#: audio/fmopl.cpp:49
+msgid "MAME OPL emulator"
+msgstr "MAME OPL emulaattori"
+
+#: audio/fmopl.cpp:51
+msgid "DOSBox OPL emulator"
+msgstr "DOSBox OPL emulaattori"
+
+#: audio/mididrv.cpp:209
+#, c-format
+msgid ""
+"The selected audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Valittua äänilaitetta '%s' ei löytynyt. Se saattaa olla kytketty pois päältä "
+"tai irrotettuna tietokoneesta."
+
+#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
+#: audio/mididrv.cpp:272
+msgid "Attempting to fall back to the next available device..."
+msgstr "Yritetään käyttää seuraavaa saatavilla olevaa laitetta..."
+
+#: audio/mididrv.cpp:221
+#, c-format
+msgid ""
+"The selected audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Valitsemaasi äänilaitetta '%s' ei voida käyttää. Avaa lokitiedosto "
+"saadaksesi lisätietoja."
+
+#: audio/mididrv.cpp:257
+#, c-format
+msgid ""
+"The preferred audio device '%s' was not found (e.g. might be turned off or "
+"disconnected)."
+msgstr ""
+"Ensisijaista äänilaitetta '%s' ei löytynyt. Se saattaa olla kytketty pois "
+"päältä tai irrotettuna tietokoneesta."
+
+#: audio/mididrv.cpp:272
+#, c-format
+msgid ""
+"The preferred audio device '%s' cannot be used. See log file for more "
+"information."
+msgstr ""
+"Ensisijaista äänilaitetta '%s' ei voida käyttää. Avaa lokitiedosto "
+"saadaksesi lisätietoja."
+
+#: audio/null.h:43
+msgid "No music"
+msgstr "Ei musiikkia"
+
+#: audio/mods/paula.cpp:189
+msgid "Amiga Audio Emulator"
+msgstr "Amiga Audio emulaattori"
+
+#: audio/softsynth/adlib.cpp:2284
+msgid "AdLib Emulator"
+msgstr "AdLib emulaattori"
+
+#: audio/softsynth/appleiigs.cpp:33
+msgid "Apple II GS Emulator (NOT IMPLEMENTED)"
+msgstr "Apple II GS emulaattori (EI TOTEUTETTU)"
+
+#: audio/softsynth/sid.cpp:1430
+msgid "C64 Audio Emulator"
+msgstr "C64 Audio emulaattori"
+
+#: audio/softsynth/mt32.cpp:205
+msgid "Initializing MT-32 Emulator"
+msgstr "Alustetaan MT-32 emulaattoria"
+
+#: audio/softsynth/mt32.cpp:431
+msgid "MT-32 Emulator"
+msgstr "MT-32 emulaattori"
+
+#: audio/softsynth/pcspk.cpp:139
+msgid "PC Speaker Emulator"
+msgstr "PC kaiuttimen emulaattori"
+
+#: audio/softsynth/pcspk.cpp:158
+msgid "IBM PCjr Emulator"
+msgstr "IBM PCjr emulaattori"
+
+#: backends/keymapper/remap-dialog.cpp:47
+msgid "Keymap:"
+msgstr "Näppäinkartta:"
+
+#: backends/keymapper/remap-dialog.cpp:66
+msgid " (Effective)"
+msgstr ""
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Active)"
+msgstr " (Aktiivinen)"
+
+#: backends/keymapper/remap-dialog.cpp:106
+msgid " (Blocked)"
+msgstr " (Estetty)"
+
+#: backends/keymapper/remap-dialog.cpp:119
+msgid " (Global)"
+msgstr " (Globaali)"
+
+#: backends/keymapper/remap-dialog.cpp:127
+msgid " (Game)"
+msgstr " (Peli)"
+
+#: backends/midi/windows.cpp:164
+msgid "Windows MIDI"
+msgstr "Windows MIDI"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:57
+msgid "ScummVM Main Menu"
+msgstr "ScummVM päävalikko"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:63
+msgid "~L~eft handed mode"
+msgstr "~V~asenkätinen tila"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:64
+msgid "~I~ndy fight controls"
+msgstr "~I~ndyn tappelukontrollit"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:65
+msgid "Show mouse cursor"
+msgstr "Näytä hiiren kursori"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:66
+msgid "Snap to edges"
+msgstr "Tartu reunoihin"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:68
+msgid "Touch X Offset"
+msgstr "Kosketuksen X siirros"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:75
+msgid "Touch Y Offset"
+msgstr "Kosketuksen Y siirto"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:87
+msgid "Use laptop trackpad-style cursor control"
+msgstr "Käytä kannettavan trackpad-tyylistä kursorinhallintaa"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:88
+msgid "Tap for left click, double tap right click"
+msgstr ""
+"Napauta kerran vasen klikkausta varten, napauta kahdesti oikeaa klikkausta "
+"varten"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:90
+msgid "Sensitivity"
+msgstr "Herkkyys"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:99
+msgid "Initial top screen scale:"
+msgstr ""
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:105
+msgid "Main screen scaling:"
+msgstr "Pääruudun skaalaus"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:107
+msgid "Hardware scale (fast, but low quality)"
+msgstr "Laitteistoskaalaus (nopea, mutta huono laatu)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:108
+msgid "Software scale (good quality, but slower)"
+msgstr "Ohjelmistoskaalaus (hyvä laatu, mutta hitaampi)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:109
+msgid "Unscaled (you must scroll left and right)"
+msgstr "Ei skaalattu (vierittä vasemmalle ja oikealle itse)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:111
+msgid "Brightness:"
+msgstr "Kirkkaus:"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:121
+msgid "High quality audio (slower) (reboot)"
+msgstr "Korkealuokkainen ääni (hidas) (buuttaus)"
+
+#: backends/platform/ds/arm9/source/dsoptions.cpp:122
+msgid "Disable power off"
+msgstr ""
+
+#: backends/platform/iphone/osys_events.cpp:300
+msgid "Mouse-click-and-drag mode enabled."
+msgstr "Hiiren vedä-ja-pudota tila käytössä."
+
+#: backends/platform/iphone/osys_events.cpp:302
+msgid "Mouse-click-and-drag mode disabled."
+msgstr "Hiiren vedä-ja-pudota tila pois käytöstä."
+
+#: backends/platform/iphone/osys_events.cpp:313
+msgid "Touchpad mode enabled."
+msgstr "Touchad tila päällä"
+
+#: backends/platform/iphone/osys_events.cpp:315
+msgid "Touchpad mode disabled."
+msgstr "Touchpad tila pois päältä"
+
+#: backends/platform/maemo/maemo.cpp:209
+msgid "Click Mode"
+msgstr "Klikkaus moodi"
+
+#: backends/platform/maemo/maemo.cpp:215
+#: backends/platform/symbian/src/SymbianActions.cpp:42
+#: backends/platform/wince/CEActionsPocket.cpp:60
+#: backends/platform/wince/CEActionsSmartphone.cpp:43
+#: backends/platform/bada/form.cpp:281
+msgid "Left Click"
+msgstr "Vasen klikkaus"
+
+#: backends/platform/maemo/maemo.cpp:218
+msgid "Middle Click"
+msgstr "Keskiklikkaus"
+
+#: backends/platform/maemo/maemo.cpp:221
+#: backends/platform/symbian/src/SymbianActions.cpp:43
+#: backends/platform/wince/CEActionsSmartphone.cpp:44
+#: backends/platform/bada/form.cpp:273
+msgid "Right Click"
+msgstr "Oikea klikkaus"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
+msgid "Hide ScummVM"
+msgstr "Piilota ScummVM"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
+msgid "Hide Others"
+msgstr "Piilota muut"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
+msgid "Show All"
+msgstr "Näytä kaikki"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
+msgid "Window"
+msgstr "Ikkuna"
+
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
+msgid "Minimize"
+msgstr "Minimoi"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
+msgid "Normal (no scaling)"
+msgstr "Normaali (ei skaalausta)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
+msgctxt "lowres"
+msgid "Normal (no scaling)"
+msgstr "Normaali (ei skaalausta)"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:537
+msgid "Enabled aspect ratio correction"
+msgstr "Kuvasuhteen korjaus päällä"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+msgid "Disabled aspect ratio correction"
+msgstr "Kuvasuhteen korjaus pois päältä"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196
+msgid "Active graphics filter:"
+msgstr "Valittu grafiikkafiltteri:"
+
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:481
+msgid "Windowed mode"
+msgstr "Ikkunoitu tila"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:135
+msgid "OpenGL Normal"
+msgstr "OpenGL Normal"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:136
+msgid "OpenGL Conserve"
+msgstr "OpenGL Conserve"
+
+#: backends/graphics/opengl/opengl-graphics.cpp:137
+msgid "OpenGL Original"
+msgstr "OpenGL Original"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415
+msgid "Current display mode"
+msgstr "Nykyinen näyttötila"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:428
+msgid "Current scale"
+msgstr "Nykyinen skaalaus"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:562
+msgid "Active filter mode: Linear"
+msgstr "Valittu filtteritila: Linear"
+
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:564
+msgid "Active filter mode: Nearest"
+msgstr "Valittu filtteritila: Nearest"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:38
+#: backends/platform/wince/CEActionsSmartphone.cpp:39
+msgid "Up"
+msgstr "Ylös"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:39
+#: backends/platform/wince/CEActionsSmartphone.cpp:40
+msgid "Down"
+msgstr "Alas"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:40
+#: backends/platform/wince/CEActionsSmartphone.cpp:41
+msgid "Left"
+msgstr "Vasen"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:41
+#: backends/platform/wince/CEActionsSmartphone.cpp:42
+msgid "Right"
+msgstr "Oikea"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:46
+#: backends/platform/wince/CEActionsSmartphone.cpp:47
+msgid "Zone"
+msgstr ""
+
+#: backends/platform/symbian/src/SymbianActions.cpp:47
+#: backends/platform/wince/CEActionsPocket.cpp:54
+#: backends/platform/wince/CEActionsSmartphone.cpp:48
+msgid "Multi Function"
+msgstr ""
+
+#: backends/platform/symbian/src/SymbianActions.cpp:48
+msgid "Swap character"
+msgstr "Vaihda hahmoa"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:49
+msgid "Skip text"
+msgstr "Ohita teksti"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:51
+msgid "Fast mode"
+msgstr "Nopea moodi"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:53
+msgid "Debugger"
+msgstr "Debuggeri"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:54
+msgid "Global menu"
+msgstr "Päävalikko"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:55
+msgid "Virtual keyboard"
+msgstr "Virtuaalinen näppäimistö"
+
+#: backends/platform/symbian/src/SymbianActions.cpp:56
+msgid "Key mapper"
+msgstr "Näppäinmäärittelijä"
+
+#: backends/events/symbiansdl/symbiansdl-events.cpp:184
+msgid "Do you want to quit ?"
+msgstr "Haluatko lopettaa?"
+
+#: backends/platform/wii/options.cpp:51
+msgid "Video"
+msgstr "Video"
+
+#: backends/platform/wii/options.cpp:54
+msgid "Current video mode:"
+msgstr "Nykyinen videotila:"
+
+#: backends/platform/wii/options.cpp:56
+msgid "Double-strike"
+msgstr ""
+
+#: backends/platform/wii/options.cpp:60
+msgid "Horizontal underscan:"
+msgstr "Horisontaalinenunderscan"
+
+#: backends/platform/wii/options.cpp:66
+msgid "Vertical underscan:"
+msgstr "Vertikaalinen underscan"
+
+#: backends/platform/wii/options.cpp:71
+msgid "Input"
+msgstr "Syöte"
+
+#: backends/platform/wii/options.cpp:74
+msgid "GC Pad sensitivity:"
+msgstr "GC Padin herkkyys"
+
+#: backends/platform/wii/options.cpp:80
+msgid "GC Pad acceleration:"
+msgstr "GC PAdin kiihtyvyys"
+
+#: backends/platform/wii/options.cpp:86
+msgid "DVD"
+msgstr "DVD"
+
+#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101
+msgid "Status:"
+msgstr "Tila:"
+
+#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102
+msgid "Unknown"
+msgstr "Tuntematon"
+
+#: backends/platform/wii/options.cpp:93
+msgid "Mount DVD"
+msgstr "Liitä DVD"
+
+#: backends/platform/wii/options.cpp:94
+msgid "Unmount DVD"
+msgstr "Vapauta DVD"
+
+#: backends/platform/wii/options.cpp:98
+msgid "SMB"
+msgstr "SMB"
+
+#: backends/platform/wii/options.cpp:106
+msgid "Server:"
+msgstr "Palvelin:"
+
+#: backends/platform/wii/options.cpp:110
+msgid "Share:"
+msgstr "Jako:"
+
+#: backends/platform/wii/options.cpp:114
+msgid "Username:"
+msgstr "Käyttäjänimi:"
+
+#: backends/platform/wii/options.cpp:118
+msgid "Password:"
+msgstr "Salasana:"
+
+#: backends/platform/wii/options.cpp:121
+msgid "Init network"
+msgstr "Alusta verkko"
+
+#: backends/platform/wii/options.cpp:123
+msgid "Mount SMB"
+msgstr "Mounttaa SMB"
+
+#: backends/platform/wii/options.cpp:124
+msgid "Unmount SMB"
+msgstr "Vapauta SMB"
+
+#: backends/platform/wii/options.cpp:143
+msgid "DVD Mounted successfully"
+msgstr "DVD mountattu onnistuneesti"
+
+#: backends/platform/wii/options.cpp:146
+msgid "Error while mounting the DVD"
+msgstr "Virhe liitettäessä DVD:tä"
+
+#: backends/platform/wii/options.cpp:148
+msgid "DVD not mounted"
+msgstr "DVD ei ole liitetty"
+
+#: backends/platform/wii/options.cpp:161
+msgid "Network up, share mounted"
+msgstr "Verkko ylhäällä, jako liitetty"
+
+#: backends/platform/wii/options.cpp:163
+msgid "Network up"
+msgstr "Verkko ylhäällä"
+
+#: backends/platform/wii/options.cpp:166
+msgid ", error while mounting the share"
+msgstr ", virhe liitettäessä jakoa"
+
+#: backends/platform/wii/options.cpp:168
+msgid ", share not mounted"
+msgstr ", jakoa ei liitetty"
+
+#: backends/platform/wii/options.cpp:174
+msgid "Network down"
+msgstr "Verkko alhaalla"
+
+#: backends/platform/wii/options.cpp:178
+msgid "Initializing network"
+msgstr "Alustetaan verkkoa"
+
+#: backends/platform/wii/options.cpp:182
+msgid "Timeout while initializing network"
+msgstr "Aikakatkaisu kun verkkoa alustettiin"
+
+#: backends/platform/wii/options.cpp:186
+#, c-format
+msgid "Network not initialized (%d)"
+msgstr "Verkko ei ole alustettu (%d)"
+
+#: backends/platform/wince/CEActionsPocket.cpp:46
+msgid "Hide Toolbar"
+msgstr "Piilota työkalupalkki"
+
+#: backends/platform/wince/CEActionsPocket.cpp:47
+msgid "Show Keyboard"
+msgstr "Näytä näppäimistö"
+
+#: backends/platform/wince/CEActionsPocket.cpp:48
+msgid "Sound on/off"
+msgstr "Äänet päällä/pois"
+
+#: backends/platform/wince/CEActionsPocket.cpp:49
+msgid "Right click"
+msgstr "Oikea klikkaus"
+
+#: backends/platform/wince/CEActionsPocket.cpp:50
+msgid "Show/Hide Cursor"
+msgstr "Näytä/Piilota kursori"
+
+#: backends/platform/wince/CEActionsPocket.cpp:51
+msgid "Free look"
+msgstr "Vapaa katselu"
+
+#: backends/platform/wince/CEActionsPocket.cpp:52
+msgid "Zoom up"
+msgstr "Zoomaa ylös"
+
+#: backends/platform/wince/CEActionsPocket.cpp:53
+msgid "Zoom down"
+msgstr "Zoomaa alas"
+
+#: backends/platform/wince/CEActionsPocket.cpp:55
+#: backends/platform/wince/CEActionsSmartphone.cpp:49
+msgid "Bind Keys"
+msgstr "Määritä näppäimet"
+
+#: backends/platform/wince/CEActionsPocket.cpp:56
+msgid "Cursor Up"
+msgstr "Nuoli ylös"
+
+#: backends/platform/wince/CEActionsPocket.cpp:57
+msgid "Cursor Down"
+msgstr "Nuoli alas"
+
+#: backends/platform/wince/CEActionsPocket.cpp:58
+msgid "Cursor Left"
+msgstr "Nuoli vasemmalle"
+
+#: backends/platform/wince/CEActionsPocket.cpp:59
+msgid "Cursor Right"
+msgstr "Nuoli oikealle"
+
+#: backends/platform/wince/CEActionsPocket.cpp:267
+#: backends/platform/wince/CEActionsSmartphone.cpp:231
+msgid "Do you want to load or save the game?"
+msgstr "Haluatko tallentaa vai ladata pelin?"
+
+#: backends/platform/wince/CEActionsPocket.cpp:326
+#: backends/platform/wince/CEActionsSmartphone.cpp:287
+msgid " Are you sure you want to quit ? "
+msgstr " Haluatko varmasti lopettaa?"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:50
+msgid "Keyboard"
+msgstr "Näppäimistö"
+
+#: backends/platform/wince/CEActionsSmartphone.cpp:51
+msgid "Rotate"
+msgstr "Käännä"
+
+#: backends/platform/wince/CELauncherDialog.cpp:56
+msgid "Using SDL driver "
+msgstr "Käytetään SDL:n ajuria"
+
+#: backends/platform/wince/CELauncherDialog.cpp:60
+msgid "Display "
+msgstr "Näyttö"
+
+#: backends/platform/wince/CELauncherDialog.cpp:83
+msgid "Do you want to perform an automatic scan ?"
+msgstr "Haluatko suorittaa automaattisen skannauksen?"
+
+#: backends/platform/wince/wince-sdl.cpp:515
+msgid "Map right click action"
+msgstr "Määritä oikeaklikkauksen toiminto"
+
+#: backends/platform/wince/wince-sdl.cpp:519
+msgid "You must map a key to the 'Right Click' action to play this game"
+msgstr ""
+"Hiiren oikealle klikkaukselle on määriteltävä näppäin, ennen kuin tätä peliä "
+"voi pelata"
+
+#: backends/platform/wince/wince-sdl.cpp:528
+msgid "Map hide toolbar action"
+msgstr "Määritä näppäin työkalupalkin piilottamiselle"
+
+#: backends/platform/wince/wince-sdl.cpp:532
+msgid "You must map a key to the 'Hide toolbar' action to play this game"
+msgstr ""
+"Työkalupalkin piilottamiselle on määriteltävä näppäin, ennen kuin tätä peliä "
+"voi pelata"
+
+#: backends/platform/wince/wince-sdl.cpp:541
+msgid "Map Zoom Up action (optional)"
+msgstr "Zoomaa karttaa ylös (valinnainen)"
+
+#: backends/platform/wince/wince-sdl.cpp:544
+msgid "Map Zoom Down action (optional)"
+msgstr "Zoomaa karttaa alas (valinnainen)"
+
+#: backends/platform/wince/wince-sdl.cpp:552
+msgid ""
+"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
+msgstr ""
+"Muista määritellä näppäin työkalupalkin piilottamiselle, jotta voit nähdä "
+"koko tavaraluettelon"
+
+#: backends/events/default/default-events.cpp:193
+msgid "Do you really want to return to the Launcher?"
+msgstr "Haluatko varmasti palata pelivalitsimeen?"
+
+#: backends/events/default/default-events.cpp:193
+msgid "Launcher"
+msgstr "Pelivalitsin"
+
+#: backends/events/default/default-events.cpp:215
+msgid "Do you really want to quit?"
+msgstr "Haluatko varmasti lopettaa?"
+
+#: backends/events/gph/gph-events.cpp:386
+#: backends/events/gph/gph-events.cpp:429
+#: backends/events/openpandora/op-events.cpp:168
+msgid "Touchscreen 'Tap Mode' - Left Click"
+msgstr "Kosketusnäytön 'Tap moodi' - vasen klikkaus"
+
+#: backends/events/gph/gph-events.cpp:388
+#: backends/events/gph/gph-events.cpp:431
+#: backends/events/openpandora/op-events.cpp:170
+msgid "Touchscreen 'Tap Mode' - Right Click"
+msgstr "Kosketusnäytön 'Tap moodi' - oikea klikkaus"
+
+#: backends/events/gph/gph-events.cpp:390
+#: backends/events/gph/gph-events.cpp:433
+#: backends/events/openpandora/op-events.cpp:172
+msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
+msgstr "Kosketusnäytön 'Tap moodi' - ei klikkausta"
+
+#: backends/events/gph/gph-events.cpp:410
+msgid "Maximum Volume"
+msgstr "Maksimi äänenvoimakkuus"
+
+#: backends/events/gph/gph-events.cpp:412
+msgid "Increasing Volume"
+msgstr "Nostetaan äänenvoimakkuutta"
+
+#: backends/events/gph/gph-events.cpp:418
+msgid "Minimal Volume"
+msgstr "Minimi äänenvoimakkuus"
+
+#: backends/events/gph/gph-events.cpp:420
+msgid "Decreasing Volume"
+msgstr "Lasketaan äänenvoimakkuutta"
+
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Kosketusnäytön 'Tap moodi' - ei klikkausta"
+
+#: backends/updates/macosx/macosx-updates.mm:67
+msgid "Check for Updates..."
+msgstr "Tarkista päivitykset..."
+
+#: backends/platform/bada/form.cpp:269
+msgid "Right Click Once"
+msgstr "Klikkaa oikealla kerran"
+
+#: backends/platform/bada/form.cpp:277
+msgid "Move Only"
+msgstr ""
+
+#: backends/platform/bada/form.cpp:291
+msgid "Escape Key"
+msgstr "Esc näppäin"
+
+#: backends/platform/bada/form.cpp:296
+msgid "Game Menu"
+msgstr "Pelivalikko"
+
+#: backends/platform/bada/form.cpp:301
+msgid "Show Keypad"
+msgstr "Näytä keypad"
+
+#: backends/platform/bada/form.cpp:309
+msgid "Control Mouse"
+msgstr "Ohjaa hiirtä"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Enabled"
+msgstr "Klikkaus päällä"
+
+#: backends/events/maemosdl/maemosdl-events.cpp:192
+msgid "Clicking Disabled"
+msgstr "Klikkaus pois päältä"
+
+#~ msgid "Enable Roland GS Mode"
+#~ msgstr "Käytä Roland GS moodia"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index cd98af1bb7..a853d190aa 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,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-08 12:24+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-26 12:24+0100\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
"Language: Francais\n"
@@ -17,45 +17,54 @@ 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
+msgid "Show hidden files"
+msgstr "Afficher les fichiers cachés"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Affiche les fichiers marqués avec l'attribut invisible"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -70,15 +79,15 @@ msgstr "Fermer"
msgid "Mouse click"
msgstr "Clic de souris"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Afficher le clavier"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Changer l'affectation des touches"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Basculer en plein écran"
@@ -91,17 +100,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -356,7 +367,7 @@ msgstr "Cet ID est déjà utilisé par un autre jeu. Choisissez en un autre svp."
msgid "~Q~uit"
msgstr "~Q~uitter"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Quitter ScummVM"
@@ -364,7 +375,7 @@ msgstr "Quitter ScummVM"
msgid "A~b~out..."
msgstr "À ~P~ropos..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "À propos de ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Charger"
@@ -457,10 +470,10 @@ msgid ""
"Do you really want to run the mass game detector? This could potentially add "
"a huge number of games."
msgstr ""
-"Voulez-vous vraiment lancer la détection automatique des jeux? Cela peut "
+"Voulez-vous vraiment lancer la détection automatique des jeux ? Cela peut "
"potentiellement ajouter un grand nombre de jeux."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -468,7 +481,7 @@ msgstr ""
msgid "Yes"
msgstr "Oui"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -490,7 +503,7 @@ msgstr "Choisissez le jeu:"
#: gui/launcher.cpp:937
msgid "Do you really want to remove this game configuration?"
-msgstr "Voulez-vous vraiment supprimer ce jeu?"
+msgstr "Voulez-vous vraiment supprimer ce jeu ?"
#: gui/launcher.cpp:1001
msgid "This game does not support loading games from the launcher."
@@ -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 "Paramètres FluidSynth"
+
+#: 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,195 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland GS (désactive le mappage 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -931,77 +948,74 @@ msgstr ""
"Le thème que vous avez sélectioné ne support pas la langue française. Si "
"vous voulez l'utiliser vous devez d'abord changer de langue."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Vue en liste"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Vue en grille"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Date inconnue"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Heure inconnue"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Durée de jeu inconnue"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Supprimer"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
-msgstr "Voulez-vous vraiment supprimer cette sauvegarde?"
+msgstr "Voulez-vous vraiment supprimer cette sauvegarde ?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Date: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Heure: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Durée de jeu: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Sauvegarde sans nom"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Suivant"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Précédent"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Sauver"
+msgstr "Nouvelle Sauvegarde"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Échec de la sauvegarde."
+msgstr "Crée une nouvelle sauvegarde."
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "Nom:"
+msgstr "Nom: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Entrez une description pour l'emplacement %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1036,35 +1050,120 @@ msgstr "Anti-crénelé (16 bpp)"
msgid "Clear value"
msgstr "Effacer la valeur"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Réverb"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Actif"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Pièce:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Atténuation:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Largeur:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Niveau:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Chorus"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Vitesse:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Profondeur:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Type:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triangle"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolation:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Aucune (plus rapide)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Linéaire"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Quatrième degré"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Septième degré"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Réinitialiser"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Remet tous les réglages à leurs valeurs par défaut."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Voulez-vous vraiment remettre tous les réglages à leurs valeurs par défaut ?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Le niveau de debug '%s' n'est pas supporté par ce moteur de jeu"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Passer"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Mettre en pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Passer la phrase"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erreur lors de l'éxécution du jeu:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Impossible de trouver un moteur pour exécuter le jeu sélectionné"
@@ -1181,13 +1280,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1216,12 +1318,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 +1331,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 +1361,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 +1375,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 +1384,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 +1394,52 @@ 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: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 "Dialogues sauvegarde/chargement d'origine"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Charger"
+#: 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 a trouvé des anciens fichiers de sauvegarde pour Drascula 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"
@@ -1324,27 +1448,27 @@ msgstr "Utiliser le mode palette lumineuse"
msgid "Display graphics using the game's bright palette"
msgstr "Utiliser la palette lumineuse du jeu pour l'affichage"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Détramage EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activer le détramage dans les jeux EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Préférer les effets sonors digitals"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Préférer les effets sonores digitaux plutôt que ceux synthétisés"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Utiliser IMF/Yamaha FB-01 pour la sortie MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1352,32 +1476,32 @@ msgstr ""
"Utiliser une carte IBM Music Feature ou un module Yamaha FB-01 FM pour la "
"sortie MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Utiliser la musique du CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Utiliser la musique du CD quand elle est disponible au lieu de la musique du "
"jeu"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Utiliser les curseurs Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Utiliser les curseurs Windows (plus petits et monochromes) au lieu des "
"curseurs DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Utiliser les curseurs argentés"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "Utiliser les curseurs argentés au lieu des curseurs normaux dorés"
@@ -1406,12 +1530,12 @@ msgstr "Jeu en pause. Appuyer sur Espace pour Reprendre."
#. Will react to J as 'Yes'
#: engines/scumm/dialogs.cpp:182
msgid "Are you sure you want to restart? (Y/N)"
-msgstr "Voulez-vous vraiment recommencer? (O/N)O"
+msgstr "Voulez-vous vraiment recommencer ? (O/N)O"
#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment
#: engines/scumm/dialogs.cpp:184
msgid "Are you sure you want to quit? (Y/N)"
-msgstr "Voulez-vous vraiment quitter? (O/N)O"
+msgstr "Voulez-vous vraiment quitter ? (O/N)O"
#: engines/scumm/dialogs.cpp:189
msgid "Play"
@@ -1422,7 +1546,7 @@ msgstr "Jouer"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Quitter"
@@ -1436,7 +1560,7 @@ msgstr "Vous devez entrer un nom"
#: engines/scumm/dialogs.cpp:195
msgid "The game was NOT saved (disk full?)"
-msgstr "Le jeu n'a pu être sauvé (disque plein?)"
+msgstr "Le jeu n'a pu être sauvé (disque plein ?)"
#: engines/scumm/dialogs.cpp:196
msgid "The game was NOT loaded"
@@ -2029,7 +2153,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas à droite"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2038,7 +2162,7 @@ msgstr ""
"Support MIDI natif requière la mise à jour Roland de LucasArt,\n"
"mais %s manque. Utilise AdLib à la place."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2049,7 +2173,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"
@@ -2060,7 +2184,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"
@@ -2071,7 +2195,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' "
@@ -2083,7 +2207,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,11 +2228,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Fichier de séquence '%s' non trouvé!"
@@ -2126,6 +2250,14 @@ 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
+msgid "Fast movie speed"
+msgstr "Vidéo rapide"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Joue les vidéos plus rapidement"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Échec de la sauvegarde."
@@ -2216,11 +2348,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:2447
msgid "Turn Left"
msgstr "Tourner vers la Gauche"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Tourner vers la Droite"
@@ -2236,7 +2368,7 @@ msgstr "Options"
msgid "Choose Spell"
msgstr "Choisir un Sort"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2252,12 +2384,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Intro alternative"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Utiliser l'intro de la version disquette (version CD uniquement)"
+msgstr "Utiliser une intro alternative (version CD uniquement)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2283,23 +2414,23 @@ msgstr "Intro disquette"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Utiliser l'intro de la version disquette (version CD uniquement)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"La scène cinématique PSX '%s' ne peut pas être lu avec 256 couleurs ou moins"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Les séquences DXA sont présente mais ScummVM a été compilé sans le support "
"zlib."
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Les séquences MPEG2 ne sont plus supportées"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Séquence '%s' non trouvé"
@@ -2329,7 +2460,7 @@ msgid ""
"Would you like to keep the old save game (%s) or the new one (%s)?\n"
msgstr ""
"La sauvegarde cible existe déjà!\n"
-"Voulez-vous conserver l'ancienne sauvegarde (%s) ou la nouvelle (%s)?\n"
+"Voulez-vous conserver l'ancienne sauvegarde (%s) ou la nouvelle (%s) ?\n"
#: engines/sword1/control.cpp:1235
msgid "Keep the old one"
@@ -2343,7 +2474,7 @@ msgstr "Garder la nouvelle"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "C'est la fin de la démo des Chevaliers de Baphomet"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2358,16 +2489,18 @@ msgstr "Afficher la description des objets"
msgid "Show labels for objects on mouse hover"
msgstr "Afficher la description des objets lors de passage du pointeur"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Il vous manque le fichier 'teenagent.dat'. Téléchargez le depuis le "
+"site web de ScummVM."
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
-msgstr ""
+msgstr "Le fichier teenagent.dat est compressé et cet exécutable n'inclus "
+"pas zlib. Veuillez le décompresser."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2417,6 +2550,46 @@ 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:679
+msgid "Invalid save file name"
+msgstr "Nom de sauvegarde invalide"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Haut/Zoom/Avancer/Ouvrir Portes"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Bas/Dézoom"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Montrer/Cacher l'Inventaire"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Montrer/Cacher le Biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Action/Sélection"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Basculer l'Affichage Central"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Montrer/Cacher l'Écran d'Info"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Montrer/Cacher le Menu de Pause"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Émulateur MAME OPL"
@@ -2474,7 +2647,7 @@ msgstr "Pas de musique"
msgid "Amiga Audio Emulator"
msgstr "Émulateur Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Émulateur AdLib"
@@ -2486,11 +2659,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"
@@ -2641,24 +2814,24 @@ msgstr "Clic Milieu"
msgid "Right Click"
msgstr "Clic Droit"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Masquer ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Masquer les autres"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Tout afficher"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fenêtre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Placer dans le Dock"
@@ -2672,12 +2845,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 +2859,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 +2883,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"
@@ -2779,7 +2952,7 @@ msgstr "Affectation des touches"
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
msgid "Do you want to quit ?"
-msgstr "Voulez-vous quitter?"
+msgstr "Voulez-vous quitter ?"
#: backends/platform/wii/options.cpp:51
msgid "Video"
@@ -2966,12 +3139,12 @@ msgstr "Droit"
#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Do you want to load or save the game?"
-msgstr "Voulez-vous charger ou enregistrer le jeu?"
+msgstr "Voulez-vous charger ou enregistrer le jeu ?"
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
msgid " Are you sure you want to quit ? "
-msgstr "Voulez-vous vraiment quitter?"
+msgstr "Voulez-vous vraiment quitter ?"
#: backends/platform/wince/CEActionsSmartphone.cpp:50
msgid "Keyboard"
@@ -2991,7 +3164,7 @@ msgstr "Affichage"
#: backends/platform/wince/CELauncherDialog.cpp:83
msgid "Do you want to perform an automatic scan ?"
-msgstr "Voulez-vous exécuter une recherche automatique?"
+msgstr "Voulez-vous exécuter une recherche automatique ?"
#: backends/platform/wince/wince-sdl.cpp:515
msgid "Map right click action"
@@ -3028,33 +3201,33 @@ msgstr ""
"Noubliez pas d'affecter une touche à l'action 'Cacher Bar d'Outils' pour "
"pouvoir voir entièrement l'inventaire"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
-msgstr "Voulez-vous vraiment retourner au Lanceur?"
+msgstr "Voulez-vous vraiment retourner au Lanceur ?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Lanceur"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
-msgstr "Voulez-vous vraiment quitter?"
+msgstr "Voulez-vous vraiment quitter ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Clic Gauche"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Clic Droit"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Déplacer sans cliquer"
@@ -3074,7 +3247,11 @@ msgstr "Volume Minimum"
msgid "Decreasing Volume"
msgstr "Diminution Volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Déplacer sans cliquer"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Recherche des mises à jour..."
@@ -3110,6 +3287,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 d08867b717..cce9a5dfa7 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -1,60 +1,69 @@
-# LANGUAGE translation for ScummVM.
-# Copyright (C) YEAR ScummVM Team
+# Galician translation for ScummVM.
+# Copyright (C) 2010-2013 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# Santiago G. Sanz <s.sanz@uvigo.es>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-08-15 13:33+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-24 15:41+0100\n"
"Last-Translator: Santiago G. Sanz <s.sanz@uvigo.es>\n"
-"Language-Team: \n"
+"Language-Team: Santiago G. Sanz <s.sanz@uvigo.es>\n"
"Language: Galego\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: 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
+msgid "Show hidden files"
+msgstr "Mostrar ficheiros ocultos"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Mostra os ficheiros marcados co atributo Oculto."
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -69,15 +78,15 @@ msgstr "Pechar"
msgid "Mouse click"
msgstr "Premer co rato"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Asignar teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Activar/desactivar pantalla completa"
@@ -90,17 +99,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -353,7 +364,7 @@ msgstr "Este ID de xogo xa está en uso. Selecciona outro."
msgid "~Q~uit"
msgstr "~S~aír"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Saír de ScummVM"
@@ -361,7 +372,7 @@ msgstr "Saír de ScummVM"
msgid "A~b~out..."
msgstr "Ace~r~ca de..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Acerca de ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Cargar"
@@ -456,7 +469,7 @@ msgstr ""
"Queres executar o detector de xogos en masa? É posible que se engada un gran "
"número de xogos."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -464,7 +477,7 @@ msgstr ""
msgid "Yes"
msgstr "Si"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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,259 @@ 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 "Configuración de FluidSynth"
+
+#: 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Modo Roland GS (desactivar mapeamento 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -918,71 +935,71 @@ msgstr ""
"O tema seleccionado non é compatible co idioma actual. Para empregar o tema, "
"deberás cambiar antes o idioma da interfaz."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Lista"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Grade"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Non hai data gardada"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Non hai hora gardada"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Non hai tempo de xogo gardado"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Eliminar"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Seguro que queres eliminar esta partida?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo de xogo:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Partida sen título"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Seg."
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Ant."
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Novo ficheiro"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Crea un novo ficheiro de gardado"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Nome:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Introduce unha descrición para o espazo %d:"
@@ -1020,35 +1037,123 @@ msgstr "Antidistorsión (16 bpp)"
msgid "Clear value"
msgstr "Limpar valor"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Reverberación"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Activa"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Sala:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Humidade:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Largo:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Nivel:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Refrán"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Velocidade:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Profundidade:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Tipo:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Seno"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triángulo"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolación:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Ningunha (máis rápido)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineal"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Cuarta orde"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Séptima orde"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Restablecer"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+"Restablece a configuración de FluidSynth aos seus valores predefinidos."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Seguro que queres restablecer a configuración de FluidSynth aos seus valores "
+"predefinidos?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "O motor non é compatible co nivel de depuración %s"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menú"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Omitir"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Omitir liña"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erro de execución do xogo:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Non se puido atopar un motor para executar o xogo seleccionado"
@@ -1163,13 +1268,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1198,12 +1306,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 +1319,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 +1349,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 +1363,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 +1372,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 +1382,51 @@ 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: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 "Empregar pantallas orixinais de gardado e carga"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Restaurar"
+#: 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 atopou ficheiros de gardado vellos de Drascula 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"
@@ -1305,27 +1435,27 @@ msgstr "Empregar modo de paleta intensa"
msgid "Display graphics using the game's bright palette"
msgstr "Mostrar os gráficos coa paletta intensa do xogo"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Non interpolación EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Activar a non interpolación nos xogos en EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferir efectos de son dixitais"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Dar preferencia aos efectos de son dixitais no canto dos sintéticos"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Empregar IMF/Yamaha FB-01 para a saída de MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1333,30 +1463,30 @@ msgstr ""
"Empregar unha tarxeta IBM Music Feature ou un módulo de sintetizador Yamaha "
"FB-01 FM para a saída de MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Empregar son de CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Empregar son de CD no canto do do xogo, de ser o caso"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Empregar cursores de Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Empregar os cursores de Windows (máis pequenos e monocromos) no canto dos de "
"DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Empregar cursores prateados"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1403,7 +1533,7 @@ msgstr "Xogar"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Saír"
@@ -2010,7 +2140,7 @@ msgstr "Voar á dereita"
msgid "Fly to lower right"
msgstr "Voar á dereita abaixo"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2019,7 +2149,7 @@ msgstr ""
"A compatibilidade nativa con MIDI precisa a actualización de Roland\n"
"de LucasArts, mais falla %s. Empregarase AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2030,7 +2160,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"
@@ -2041,7 +2171,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"
@@ -2052,7 +2182,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' "
@@ -2063,7 +2193,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,11 +2214,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Non se atopou o ficheiro de secuencia %s!"
@@ -2106,6 +2236,14 @@ msgstr "Erro ao gardar a partida no ficheiro."
msgid "Failed to delete file."
msgstr "Erro ao eliminar o ficheiro."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Velocidade de vídeo rápida"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Reproducir vídeos a máis velocidade"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Erro ao gardar a partida"
@@ -2196,11 +2334,11 @@ msgstr "Esvarar á esquerda"
msgid "Slide Right"
msgstr "Esvarar á dereita"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
msgid "Turn Left"
msgstr "Xirar á esquerda"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Xirar á dereita"
@@ -2216,7 +2354,7 @@ msgstr "Opcións"
msgid "Choose Spell"
msgstr "Elixir feitizo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2262,22 +2400,22 @@ msgstr "Intro de disquete"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Empregar a introdución da versión en disquete (só versión en CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "Non se pode reproducir a secuencia %s de PSX neste modo gráfico"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Atopáronse secuencias de DXA. No entanto, esta versión de ScummVM non é "
"compatible con zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Xa non hai compatibilidade coas secuencias en MPEG2"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Non se atopou a secuencia %s"
@@ -2321,7 +2459,7 @@ msgstr "Conservar a nova"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Aquí remata a demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2336,13 +2474,13 @@ msgstr "Mostrar etiquetas"
msgid "Show labels for objects on mouse hover"
msgstr "Mostrar as etiquetas dos obxectos ao apuntar co rato"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
"Falta o ficheiro teenagent.dat. Descárgao dende o sitio web de ScummVM."
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2400,6 +2538,46 @@ msgstr ""
"\n"
"Contacta co equipo de ScummVM."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Nome de ficheiro non válido"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Arriba/Ampliar/Avanzar/Abrir portas"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Abaixo/Reducir"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Mostrar/Ocultar bandexa de inventario"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Mostrar/Ocultar bandexa de biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Acción/Seleccionar"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Activar/Desactivar pantalla de datos"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Mostrar/Ocultar pantalla de información"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Mostrar/Ocultar menú de pausa"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador de OPL de MAME"
@@ -2457,7 +2635,7 @@ msgstr "Sen música"
msgid "Amiga Audio Emulator"
msgstr "Emulador de Amiga Audio"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador de AdLib"
@@ -2469,11 +2647,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"
@@ -2624,24 +2802,24 @@ msgstr "Botón central"
msgid "Right Click"
msgstr "Botón secundario"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar outros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar todo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ventá"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -2655,12 +2833,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 +2847,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 +2871,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"
@@ -3009,35 +3187,35 @@ msgstr ""
"Non esquezas asignar unha tecla á acción Ocultar barra de ferramentas para "
"ver o inventario completo"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Seguro que queres volver ao Iniciador?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Iniciador"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Seguro que queres saír?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Modo pantalla táctil: premer botón primario"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Modo pantalla táctil: premer botón secundario"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
-msgstr "Modo pantalla táctil: apuntar co rato"
+msgstr "Modo pantalla táctil: apuntar co rato (sen premer)"
#: backends/events/gph/gph-events.cpp:410
msgid "Maximum Volume"
@@ -3055,7 +3233,11 @@ msgstr "Volume mínimo"
msgid "Decreasing Volume"
msgstr "Baixando volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Modo pantalla táctil: apuntar co rato (premer na cruceta)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Buscar actualizacións..."
@@ -3090,3 +3272,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 b263d2c539..89bfa80d56 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-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-08-14 07:29+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-25 06:38+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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +81,15 @@ msgstr "Bezár"
msgid "Mouse click"
msgstr "Egérkattintás"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Billentyûzet beállítások"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Billentyûk átállítása"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Teljesképernyõ kapcsoló"
@@ -94,17 +102,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +185,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 +208,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 +225,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 +238,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 +256,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 +269,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 +282,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 +300,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 +308,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"
@@ -357,7 +367,7 @@ msgstr "Ez a játékazonosító ID már foglalt, Válassz egy másikat."
msgid "~Q~uit"
msgstr "Kilépés"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "ScummVM bezárása"
@@ -365,7 +375,7 @@ msgstr "ScummVM bezárása"
msgid "A~b~out..."
msgstr "Névjegy"
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "ScummVM névjegy"
@@ -442,12 +452,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Betöltés"
@@ -460,7 +472,7 @@ msgstr ""
"Biztos hogy futtatod a Masszív játékdetektort? Ez potenciálisan sok játékot "
"hozzáad a listához."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -468,7 +480,7 @@ msgstr ""
msgid "Yes"
msgstr "Igen"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -533,194 +545,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 +744,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 gui/fluidsynth-dialog.cpp:137
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."
@@ -919,71 +935,71 @@ msgstr ""
"A kiválasztott téma nem támogatja a nyelvedet. Ha használni akarod ezt a "
"témát, elõszõr válts át egy másik nyelvre."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr "Lista nézet"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr "Rács nézet"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Dátum nincs mentve"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Idõ nincs mentve"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Játékidõ nincs mentve"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Töröl"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Biztos hogy törölni akarod ezt a játékállást?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dátum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Idõ:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Játékidõ:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Névtelen játékállás"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr "Következõ"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr "Elõzõ"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr "Új Mentés"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr "Új játékmentés készítése"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Név:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr "Adj meg egy leírást a %d slothoz:"
@@ -1021,35 +1037,121 @@ msgstr "Élsimított (16bpp)"
msgid "Clear value"
msgstr "Érték törlése"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Forgatás"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktív"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Szoba:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Csillapítás:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Szélesség:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Szint:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Kórus"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Sebesség:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Mélység:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Típus:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Színusz"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Háromszög"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpoláció:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Nincs (gyorsabb)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineáris"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Negyedrangú"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Hetedrangú"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Reset"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Minden FluidSynth beállítás alapértelmezett értékre."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Biztos visszaállítassz minden FluidSynth beállítást alapértelmezett értékre?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "A motor nem támogatja a '%s' debug szintet"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menü"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Tovább"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Szünet"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Sor átlépése"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Hiba a játék futtatásakor:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nem található olyan játékmotor ami a választott játékot támogatja"
@@ -1164,13 +1266,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1198,12 +1303,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 +1316,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 +1346,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 +1360,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 +1369,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 +1379,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: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 "Eredeti ment/tölt képernyõk használata"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 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"
@@ -1304,27 +1430,27 @@ msgstr "Fényes paletta mód használata"
msgid "Display graphics using the game's bright palette"
msgstr "Grafikus megjelenítésre használja a játék fényes palettáját"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA szinjavítás"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Undithering engedélyezése EGA játékokban"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Digitális hangeffektusok elõnyben"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Digitális hanghatások elõnyben a szintetizáltakkal szemben"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "IMF/Yamaha FB-01 használata MIDI kimentre"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1332,28 +1458,28 @@ msgstr ""
"IBM Music Feature kártya vagy Yamaha FB-01 FM szintetizátor modul használata "
"MIDI kimenetre"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "CD audió használata"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "CD audió használata a játékban lévõvel szemben, ha elérhetõ"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Windows kurzorok használata"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Windows kurzorok használata (kisebb és monokróm) a DOS-osok helyett "
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Ezüst kurzor használata"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr "Alternatív ezüst kurzorszett használata, a normál arany helyett"
@@ -1398,7 +1524,7 @@ msgstr "Játék"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Kilépés"
@@ -2005,7 +2131,7 @@ msgstr "Jobbra repülés"
msgid "Fly to lower right"
msgstr "Jobbra le repülés"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2014,7 +2140,7 @@ msgstr ""
"Native MIDI támogatáshoz kell a Roland Upgrade a LucasArts-tól,\n"
"a %s hiányzik. AdLib-ot használok helyette."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2025,7 +2151,7 @@ msgstr ""
"\n"
"%s fájlba nem sikerült"
-#: 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"
@@ -2036,7 +2162,7 @@ msgstr ""
"\n"
"%s fájlból nem sikerült"
-#: 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"
@@ -2047,7 +2173,7 @@ msgstr ""
"\n"
"%s fájlba elkészült"
-#: 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' "
@@ -2058,7 +2184,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,11 +2205,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "'%s' átvezetõ fájl nem található"
@@ -2101,6 +2227,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 +2325,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:2447
msgid "Turn Left"
msgstr "Balra fordul"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Jobbra fordul"
@@ -2211,7 +2345,7 @@ msgstr "Opciók"
msgid "Choose Spell"
msgstr "Válassz varázslatot"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2257,20 +2391,20 @@ msgstr "Floppy intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "A floppy verzió intro használata (csak CD verziónál)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "'%s' PSX stream átvezetõ nem játszható le paletta módban"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "DXA átvezetõ elérhetõ, de a ScummVM zlib támogatás nincs lefordítva"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 átvezetõk már nem támogatottak"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "'%s' átvezetõ nem található"
@@ -2314,7 +2448,7 @@ msgstr "Az újat megtartom"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Ez a Broken Sword 1 Demo vége"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2329,12 +2463,12 @@ msgstr "Tárgycimke látható"
msgid "Show labels for objects on mouse hover"
msgstr "Tárgycimke látható ha az egér felette van"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr "Hiányzik a 'teenagent.dat' fájl. Szerezd be a ScummVM website-ról"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2391,6 +2525,46 @@ msgstr ""
"\n"
"Légyszíves jelentsd a csapatnak."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Érvénytelen mentés fájlnév"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Fel/Nagyítás/Elõre mozgás/Ajtónyitás"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Le/Zoom Ki"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Tárgylista tálca Képre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Biochip tálca Képre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Akció/Választ"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Adatképernyõ kapcsoló"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Infóképernyõ Képre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Szünet menü Képre/Elrejt"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulátor"
@@ -2446,7 +2620,7 @@ msgstr "Nincs zene"
msgid "Amiga Audio Emulator"
msgstr "Amiga Audió Emulátor"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulátor"
@@ -2458,11 +2632,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"
@@ -2613,24 +2787,24 @@ msgstr "Középsõ katt"
msgid "Right Click"
msgstr "Jobb katt"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "ScummVM elrejtése"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Többi elrejtése"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mutasd mind"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Ablak"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Kis méret"
@@ -2644,12 +2818,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 +2832,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 +2856,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õ"
@@ -2996,33 +3170,33 @@ msgstr ""
"Ne felejts billentyût társítani az 'Eszköztár rejtés' mûvelethez, hogy lásd "
"a teljes listát"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Biztos hogy visszatérsz az indítópulthoz?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Indítópult"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Biztos hogy ki akarsz lépni ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Érintõképernyõ 'Tap Mód' - Bal katt"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Érintõképernyõ 'Tap Mód' - Jobb katt"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Érintõképernyõ 'Tap Mód' - Lebegõ (Nincs katt)"
@@ -3042,7 +3216,11 @@ msgstr "Minimum Hangerõ"
msgid "Decreasing Volume"
msgstr "Hangerõ csökkentése"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Érintõképernyõ 'Érintésmód' - Lebegõ (DPad katt)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Frissítések keresése..."
@@ -3078,6 +3256,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 7d4c11319d..cd449c269a 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,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-09 09:30+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-04-27 11:41+0100\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
"Language: Italiano\n"
@@ -16,45 +16,54 @@ 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
+msgid "Show hidden files"
+msgstr "Mostra file nascosti"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Mostra file contrassegnati come nascosti"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -69,15 +78,15 @@ msgstr "Chiudi"
msgid "Mouse click"
msgstr "Clic del mouse"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostra tastiera"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Riprogramma tasti"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Attiva / disattiva schermo intero"
@@ -90,17 +99,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -354,7 +365,7 @@ msgstr "Questo ID di gioco è già in uso. Si prega di sceglierne un'altro."
msgid "~Q~uit"
msgstr "C~h~iudi"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Esci da ScummVM"
@@ -362,7 +373,7 @@ msgstr "Esci da ScummVM"
msgid "A~b~out..."
msgstr "~I~nfo..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Informazioni su ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carica"
@@ -457,7 +470,7 @@ msgstr ""
"Vuoi davvero eseguire il rilevatore di giochi in massa? Potrebbe aggiungere "
"un numero enorme di giochi."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -465,7 +478,7 @@ msgstr ""
msgid "Yes"
msgstr "Sì"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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 "Impostazioni FluidSynth"
+
+#: 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,192 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Modalità Roland GS (disattiva mappatura 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -925,77 +942,74 @@ msgstr ""
"Il tema che hai selezionato non supporta la lingua attuale. Se vuoi "
"utilizzare questo tema devi prima cambiare la lingua."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Elenco"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Griglia"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Nessuna data salvata"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Nessun orario salvato"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Nessun tempo salvato"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Elimina"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Sei sicuro di voler eliminare questo salvataggio?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Ora: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo di gioco: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Salvataggio senza titolo"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Succ."
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Prec."
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Salva"
+msgstr "Nuovo salvataggio"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Impossibile salvare il gioco"
+msgstr "Crea un nuovo salvataggio"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "Nome:"
+msgstr "Nome: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Inserisci una descrizione per la posizione %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1030,35 +1044,123 @@ msgstr "Con antialiasing (16bpp)"
msgid "Clear value"
msgstr "Cancella"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Riverbero"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Attivo"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Stanza:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Smorzamento:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Larghezza:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Livello:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Chorus"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Velocità:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Profondità:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Tipo:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Seno"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triangolo"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolazione:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Nessuna (più veloce)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Lineare"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Quarto ordine"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Settimo ordine"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Ripristina"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+"Ripristina tutte le impostazioni di FluidSynth al loro valore predefinito."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Sei sicuro di voler ripristinare tutte le impostazioni di FluidSynth al loro "
+"valore predefinito?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Il motore non supporta il livello di debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Salta battuta"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Errore nell'esecuzione del gioco:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Impossibile trovare un motore in grado di eseguire il gioco selezionato"
@@ -1174,13 +1276,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1210,12 +1315,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 +1328,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 +1358,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 +1372,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 +1382,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 +1392,52 @@ 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: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 "Usa schermate di salvataggio originali"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Ripristina"
+#: 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 ha trovato vecchi salvataggi per Drascula 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"
@@ -1319,27 +1446,27 @@ msgstr "Usa modalità colori brillanti"
msgid "Display graphics using the game's bright palette"
msgstr "Visualizza la grafica con i colori brillanti del gioco"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Undithering EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Attiva undithering nei giochi EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Scegli effetti sonori digitali"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Scegli gli effetti sonori digitali al posto di quelli sintetizzati"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Usa IMF/Yamaha FB-01 per output MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1347,30 +1474,30 @@ msgstr ""
"Usa una scheda IBM Music Feature o un modulo synth Yamaha FB-01 FM per "
"l'output MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Usa audio da CD"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
"Usa l'audio da CD al posto di quello incorporato nel gioco, se disponibile"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Usa cursori di Windows"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Usa i cursori di Windows (più piccoli e monocromatici) al posto di quelli DOS"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Usa cursori d'argento"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1416,7 +1543,7 @@ msgstr "Gioca"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Esci"
@@ -2023,7 +2150,7 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2032,7 +2159,7 @@ msgstr ""
"Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n"
"ma %s non è presente. Verrà usato AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2043,7 +2170,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"
@@ -2054,7 +2181,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"
@@ -2065,7 +2192,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 +2204,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,11 +2225,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "File della scena di intermezzo '%s' non trovato!"
@@ -2120,6 +2247,14 @@ msgstr "Impossibile salvare il gioco nel file."
msgid "Failed to delete file."
msgstr "Impossibile eliminare il file."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Alta velocità filmati"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Aumenta la velocità di riproduzione dei filmati"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Impossibile salvare il gioco"
@@ -2210,11 +2345,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:2447
msgid "Turn Left"
msgstr "Gira a sinistra"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Gira a destra"
@@ -2230,7 +2365,7 @@ msgstr "Opzioni"
msgid "Choose Spell"
msgstr "Scegli incantesimo"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2246,12 +2381,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Intro alternativa"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Usa la versione floppy dell'intro (solo versione CD)"
+msgstr "Usa un'intro del gioco alternativa (solo versione CD)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2277,23 +2411,23 @@ msgstr "Intro floppy"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Usa la versione floppy dell'intro (solo versione CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"La scena PSX di intermezzo '%s' non può essere eseguita in modalità tavolozza"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Sono state trovare scene di intermezzo DXA ma ScummVM è stato compilato "
"senza il supporto zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Le scene di intermezzo MPEG2 non sono più supportate"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Scena di intermezzo '%s' non trovata"
@@ -2337,7 +2471,7 @@ msgstr "Mantieni quello nuovo"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Questa è la fine della demo di Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2352,16 +2486,18 @@ msgstr "Mostra etichette oggetti"
msgid "Show labels for objects on mouse hover"
msgstr "Mostra etichette per gli oggetti al passaggio del mouse"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Il file 'teenagent.dat' non è presente. Scaricarlo dal sito di ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Il file teenagent.dat è compresso e zlib non è stata inclusa in questo "
+"eseguibile. Si prega di decomprimerlo"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2413,6 +2549,46 @@ msgstr ""
"\n"
"Per favore, contatta il team."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Nome salvataggio non valido"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Su / Zoom + / Avanza / Apri porte"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Giù / Zoom -"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Mostra/nascondi pannello inventario"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Mostra/nascondi pannello Biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Azione/Seleziona"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Mostra/nascondi schermo centrale dati"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Mostra/nascondi schermana info"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Mostra/nascondi menu pausa"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulatore OPL MAME"
@@ -2470,7 +2646,7 @@ msgstr "Nessuna musica"
msgid "Amiga Audio Emulator"
msgstr "Emulatore audio Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulatore AdLib"
@@ -2482,11 +2658,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"
@@ -2637,24 +2813,24 @@ msgstr "Clic centrale"
msgid "Right Click"
msgstr "Clic destro"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Nascondi ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Nascondi altre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostra tutte"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Finestra"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Contrai"
@@ -2668,12 +2844,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 +2858,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 +2882,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"
@@ -3022,33 +3198,33 @@ msgstr ""
"Non dimenticare di mappare un tasto per l'azione \"Nascondi barra degli "
"strumenti\" per vedere l'intero inventario"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Sei sicuro di voler tornare all'elenco giochi?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Elenco giochi"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Sei sicuro di voler uscire?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Tap Mode' - Clic sinistro"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Tap Mode' - Clic destro"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Tap Mode' - Passaggio del cursore (nessun clic)"
@@ -3068,7 +3244,11 @@ msgstr "Volume minimo"
msgid "Decreasing Volume"
msgstr "Diminuzione volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap Mode' - Passaggio del cursore (clic DPad)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Cerca aggiornamenti..."
@@ -3104,6 +3284,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 b775d11dd2..f41e71f8ae 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,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-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-04 02:19+0100\n"
-"Last-Translator: Einar Johan Sømåen <einarjohants@gmail.com>\n"
+"POT-Creation-Date: 2013-04-24 11:51+0100\n"
+"PO-Revision-Date: 2013-04-24 14:05+0100\n"
+"Last-Translator: Einar Johan Trøan Sømåen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
"Language: Norsk (bokmaal)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"X-Poedit-Language: Norsk Bokmål\n"
-"X-Poedit-Country: NORWAY\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 "(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
+msgid "Show hidden files"
+msgstr "Vis skjulte filer"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Vis filer merket med «skjult»-attributten"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +81,15 @@ msgstr "Lukk"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Omkoble taster"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Veksle fullskjerm"
@@ -94,17 +102,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +187,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 +210,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 +227,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 +240,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 +258,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 +271,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 +284,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 +302,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 +310,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"
@@ -359,7 +369,7 @@ msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen."
msgid "~Q~uit"
msgstr "~A~vslutt"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avslutt ScummVM"
@@ -367,7 +377,7 @@ msgstr "Avslutt ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -444,12 +454,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Åpne"
@@ -462,7 +474,7 @@ msgstr ""
"Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et "
"stort antall spill."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -470,7 +482,7 @@ msgstr ""
msgid "Yes"
msgstr "Ja"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -537,133 +549,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 +683,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 "FluidSynth-instillinger"
+
+#: 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 +748,190 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland GS Modus (deaktiver GM-mapping)"
-#: 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -923,77 +939,74 @@ msgstr ""
"Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette "
"temaet, må du bytte til et annet språk først."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Listevisning"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Nettvisning"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato lagret"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ingen tid lagret"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen spilltid lagret"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slett"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du virkelig slette dette lagrede spillet?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Spilltid: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Ikke navngitt spilltilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Neste"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Forrige"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Lagre"
+msgstr "Nytt lagret spill"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Klarte ikke å lagre spill."
+msgstr "Opprett ett nytt lagret spill."
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Navn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Gi en beskrivelse for posisjon %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1028,35 +1041,124 @@ msgstr "Antialiased (16bpp)"
msgid "Clear value"
msgstr "Tøm verdi"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+#, fuzzy
+msgid "Reverb"
+msgstr "Aldri"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr " (Aktiv)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+#, fuzzy
+msgid "Speed:"
+msgstr "Tale"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+#, fuzzy
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Vil du virkelig returnere til oppstarteren?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren støtter ikke debug-nivå '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Problem ved kjøring av spill:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finne noen motor som kunne kjøre det valgte spillet"
@@ -1172,13 +1274,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1312,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 +1325,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 +1355,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"
@@ -1258,15 +1363,22 @@ msgid ""
"order to listen to the game's music.\n"
"See the README file for details."
msgstr ""
+"Dette spillet har lydspor på diskene sine. Disse\n"
+"sporene må rippes fra diskene ved å bruke\n"
+"dertil egnet CD-rippingsprogramvare for å\n"
+"kunne høre på spillets musikk.\n"
+"Se README-filen for detaljer."
-#: 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 ""
+"Klarte ikke laste spill (%s)! Vennligst se i README-fila for grunnleggende "
+"informasjon og instruksjoner om hvordan du kan få mer hjelp."
-#: engines/engine.cpp: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 +1388,50 @@ 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: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 "Bruk originale lagre/laste-skjermer"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 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 ""
+"ScummVM oppdaget at du har gamle lagrede spill for Drascula 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. \n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "Bruk lys palettmodus"
@@ -1306,54 +1440,56 @@ msgstr "Bruk lys palettmodus"
msgid "Display graphics using the game's bright palette"
msgstr "Vis grafikk med spillets lyse palett"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA av-dithering"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktiver av-dithering i EGA-spill"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Foretrekk digitale lydeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Foretrekk digitale lydeffekter fremfor syntetiske"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Bruk IMF/Yamaha-FB-01 for MIDI-output"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
+"Bruk et IBM Music Feature-kort eller en Yamaha FB-01 FM-synthmodul til MIDI "
+"output"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Bruk CD-lyd"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Bruk CD-lyd istedenfor spillets lyd, hvis tilgjengelig"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Bruk Windows-muspekere"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr "Bruk Windows-muspekerene (mindre, og monokrome) isteden"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Bruk sølvmuspekere"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1367,12 +1503,12 @@ msgstr "Sett inn disk %c, og trykk Tast for å fortsette."
#: engines/scumm/dialogs.cpp:176
#, c-format
msgid "Unable to Find %s, (%c%d) Press Button."
-msgstr ""
+msgstr "Fant ikke %s, (%c%d) Trykk Knapp."
#: engines/scumm/dialogs.cpp:177
#, c-format
msgid "Error reading disk %c, (%c%d) Press Button."
-msgstr ""
+msgstr "Feil ved lesing av disk %c, (%c%d) Trykk Knapp."
#: engines/scumm/dialogs.cpp:178
msgid "Game Paused. Press SPACE to Continue."
@@ -1399,13 +1535,13 @@ msgstr "Spill"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Avslutt"
#: engines/scumm/dialogs.cpp:193
msgid "Insert save/load game disk"
-msgstr ""
+msgstr "Sett inn disk for lagrede spill"
#: engines/scumm/dialogs.cpp:194
msgid "You must enter a name"
@@ -1475,7 +1611,7 @@ msgstr "Tekst & Tale"
#: engines/scumm/dialogs.cpp:653
msgid "Select a Proficiency Level."
-msgstr ""
+msgstr "Velg ferdighetsnivå"
#: engines/scumm/dialogs.cpp:655
msgid "Refer to your Loom(TM) manual for help."
@@ -2006,14 +2142,16 @@ msgstr "Fly til høyre"
msgid "Fly to lower right"
msgstr "Fly til nedre høyre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
+"Ekte MIDI-støtte krever «Roland Upgrade» fra LucasArts,\n"
+"men %s mangler. Bruker AdLib istedet."
-#: 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"
@@ -2024,7 +2162,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"
@@ -2035,7 +2173,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"
@@ -2046,7 +2184,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' "
@@ -2057,7 +2195,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,14 +2216,14 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr ""
+msgstr "Fant ikke cutscenefil '%s'!"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287
#: engines/tinsel/saveload.cpp:532
@@ -2100,6 +2238,14 @@ msgstr "Klarte ikke lagre spilltilstand fra fil."
msgid "Failed to delete file."
msgstr "Klarte ikke å slette fil."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Rask filmhastighet"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Spill filmer med økt hastighet"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Klarte ikke å lagre spill."
@@ -2156,11 +2302,11 @@ msgstr "Aktiver flytende muspekere"
#. I18N: HP stands for Hit Points
#: engines/kyra/detection.cpp:127
msgid "HP bar graphs"
-msgstr ""
+msgstr "HP bar grafer"
#: engines/kyra/detection.cpp:128
msgid "Enable hit point bar graphs"
-msgstr ""
+msgstr "Aktiver hit point-bar grafer"
#: engines/kyra/lol.cpp:478
msgid "Attack 1"
@@ -2190,11 +2336,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:2447
msgid "Turn Left"
msgstr "Svin til Venstre"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Sving til Høyre"
@@ -2207,12 +2353,10 @@ msgid "Options"
msgstr "Valg"
#: engines/kyra/lol.cpp:489
-#, fuzzy
msgid "Choose Spell"
-msgstr "Velg"
+msgstr "Velg Trolldom"
-#: engines/kyra/sound_midi.cpp:475
-#, fuzzy
+#: 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"
@@ -2228,12 +2372,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternativ intro"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)"
+msgstr "Bruk en alternativ intro (Kun for CD-versjon)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2248,6 +2391,8 @@ msgid ""
"The \"sky.cpt\" file has an incorrect size.\n"
"Please (re)download it from www.scummvm.org"
msgstr ""
+"\"sky.cpt\" filen har feil størrelse.\n"
+"Last den ned på nytt fra www.scummvm.org"
#: engines/sky/detection.cpp:44
msgid "Floppy intro"
@@ -2257,23 +2402,23 @@ msgstr "Diskett-intro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
-msgstr ""
+msgstr "PSX-strøm cutscene '%s' kan ikke spilles i pallettmodus"
-#: 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 ""
+msgstr "DXA-cutscener funnet men ScummVM er bygd uten zlib-støtte"
-#: 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 ""
+msgstr "MPEG2-cutscener støttes ikke lengre"
-#: 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 ""
+msgstr "Fant ikke cutscene '%s'"
#: engines/sword1/control.cpp:863
msgid ""
@@ -2291,7 +2436,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:1232
#, c-format
@@ -2299,6 +2444,8 @@ msgid ""
"Target new save game already exists!\n"
"Would you like to keep the old save game (%s) or the new one (%s)?\n"
msgstr ""
+"Valgt plass for lagret spill eksisterer allerede!\n"
+"Vil du ta vare på den gamle lagringen (%s) eller den nye (%s)?\n"
#: engines/sword1/control.cpp:1235
msgid "Keep the old one"
@@ -2312,29 +2459,31 @@ msgstr "Behold den nye"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Dette er slutten på Broken Sword 1-demoen"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
-msgstr ""
+msgstr "PSX-cutscener funnet, men ScummVM har blitt bygd uten RGB-fargestøtte"
#: engines/sword2/sword2.cpp:79
msgid "Show object labels"
-msgstr ""
+msgstr "Vis objektmerkelapper"
#: engines/sword2/sword2.cpp:80
msgid "Show labels for objects on mouse hover"
-msgstr ""
+msgstr "Vis merkelapper for objekter når musa står over dem"
-#: 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 ""
+msgstr "Du mangler 'teenagent.dat'-fila. Hent den ned fra ScummVM-hjemmesiden"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"teenagent.dat-fila er komprimert og zlib har ikke blitt inkludert i denne "
+"programfilen. Vennligst pakk den ut"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2342,6 +2491,8 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
+"Kan ikke lagre spilltilstand i posisjon %i\n"
+"\n"
#: engines/parallaction/saveload.cpp:204
msgid "Loading game..."
@@ -2366,7 +2517,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 +2535,46 @@ msgstr ""
"\n"
"Vennligst rapporter dette til teamet."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Ugyldig navn for lagret spill"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Opp/Zoom Inn/Beveg Forover/Åpne Dører"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Ned/Zoom Ut"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "VIs/Skjul Inventoryskuff"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Vis/Skjul Biochipskuff"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Handling/Velg"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Vis/Skjul Infoskjerm"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Vis/Skjul Pausemeny"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2441,7 +2632,7 @@ msgstr "Ingen musikk"
msgid "Amiga Audio Emulator"
msgstr "Amiga Lydemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulator"
@@ -2453,11 +2644,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"
@@ -2474,7 +2665,6 @@ msgid "Keymap:"
msgstr "Tastkobling:"
#: backends/keymapper/remap-dialog.cpp:66
-#, fuzzy
msgid " (Effective)"
msgstr " (Aktiv)"
@@ -2609,24 +2799,24 @@ msgstr "Midtklikk"
msgid "Right Click"
msgstr "Høyreklikk"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Skjul ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Skjul andre"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Vis alle"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Vindu"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimer"
@@ -2640,12 +2830,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 +2844,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 +2868,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"
@@ -2758,7 +2948,6 @@ msgid "Current video mode:"
msgstr "Nåværende videomodus:"
#: backends/platform/wii/options.cpp:56
-#, fuzzy
msgid "Double-strike"
msgstr "Doble linjer"
@@ -2996,33 +3185,33 @@ msgstr ""
"Ikke glem å koble en tast til handlingen 'Skjul verktøylinje' for å se hele "
"inventaret"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Vil du virkelig returnere til oppstarteren?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Oppstarter"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Vil du virkelig avslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchskjerm 'Tapmodus' - Venstreklikk"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchskjerm 'Tapmodus' - Høyreklikk"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)"
@@ -3042,7 +3231,11 @@ msgstr "Minimalt Volum"
msgid "Decreasing Volume"
msgstr "Senker volum"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchskjerm 'Tapmodus' - Sveve (DPad Klikk)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sjekk for oppdateringer..."
@@ -3068,7 +3261,7 @@ msgstr "Vis talltastatur"
#: backends/platform/bada/form.cpp:309
msgid "Control Mouse"
-msgstr ""
+msgstr "Styr Mus"
#: backends/events/maemosdl/maemosdl-events.cpp:192
msgid "Clicking Enabled"
@@ -3078,6 +3271,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 1b78932a46..2c09192d5c 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-08-12 14:57+0200\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +83,15 @@ msgstr "Steng"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Syn Tastatur"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Omkople tastar"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
#, fuzzy
msgid "Toggle FullScreen"
msgstr "Veksle fullskjerm"
@@ -95,17 +105,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +190,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 +214,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 +231,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 +244,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 +262,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 +275,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 +288,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 +306,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 +314,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"
@@ -361,7 +373,7 @@ msgstr ""
msgid "~Q~uit"
msgstr "~A~vslutt"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avslutt ScummVM"
@@ -369,7 +381,7 @@ msgstr "Avslutt ScummVM"
msgid "A~b~out..."
msgstr "~O~m..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -446,12 +458,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Åpne"
@@ -462,7 +476,7 @@ msgid ""
"a huge number of games."
msgstr ""
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -470,7 +484,7 @@ msgstr ""
msgid "Yes"
msgstr "Ja"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -536,133 +550,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 +684,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 gui/fluidsynth-dialog.cpp:137
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."
@@ -921,74 +940,74 @@ msgstr ""
"Temaet du har valt støttar ikkje det aktive språket. Om du vil nytte dette "
"temaet må du bytte til eit anna språk først."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Ingen dato lagra"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Inga tid lagra"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Inga speletid lagra"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Slett"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vil du verkeleg slette det lagra spelet?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Dato: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Speletid: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Ikkje navngjeven speltilstand"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Lagre"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Full speltittel:"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Namn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1026,35 +1045,124 @@ msgstr "Antialiased (16bpp)"
msgid "Clear value"
msgstr "Tøm verdi"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+#, fuzzy
+msgid "Reverb"
+msgstr "Aldri"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr " (Aktivt)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+#, fuzzy
+msgid "Speed:"
+msgstr "Tale"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+#, fuzzy
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Vil du verkeleg slette det lagra spelet?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren støttar ikkje debug-nivå '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Feil under køyring av spel:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikkje finne nokon motor som kunne køyre det velde spelet."
@@ -1172,13 +1280,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1202,12 +1313,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 +1326,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 +1353,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 +1362,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: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 ""
-#: 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:841 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:841 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"
@@ -1296,55 +1422,55 @@ msgstr "Øvre høgre gjenstand"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr ""
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr ""
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr ""
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Vanleg peikar"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1391,7 +1517,7 @@ msgstr ""
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Avslutt"
@@ -2005,14 +2131,14 @@ msgstr "Fly til høgre"
msgid "Fly to lower right"
msgstr "Fly til nedre høgre"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp: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: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"
@@ -2020,7 +2146,7 @@ msgid ""
"%s"
msgstr ""
-#: 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"
@@ -2028,7 +2154,7 @@ msgid ""
"%s"
msgstr ""
-#: 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"
@@ -2036,7 +2162,7 @@ msgid ""
"%s"
msgstr ""
-#: 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' "
@@ -2047,7 +2173,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,11 +2195,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr ""
@@ -2091,6 +2217,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 +2320,12 @@ msgstr ""
msgid "Slide Right"
msgstr "Høgre"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
#, fuzzy
msgid "Turn Left"
msgstr "Slå av"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
#, fuzzy
msgid "Turn Right"
msgstr "Peikar høgre"
@@ -2210,7 +2345,7 @@ msgstr "~V~al"
msgid "Choose Spell"
msgstr "Vel"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2247,20 +2382,20 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr ""
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr ""
@@ -2295,7 +2430,7 @@ msgstr ""
msgid "This is the end of the Broken Sword 1 Demo"
msgstr ""
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2308,12 +2443,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2358,6 +2493,47 @@ msgid ""
"Please report to the team."
msgstr ""
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2446
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom opp"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL emulator"
@@ -2407,7 +2583,7 @@ msgstr "Ingen musikk"
msgid "Amiga Audio Emulator"
msgstr "Amiga Lydemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib Emulator"
@@ -2419,12 +2595,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"
@@ -2577,25 +2753,25 @@ msgstr "Midtre venstre gjenstand"
msgid "Right Click"
msgstr "Høgreklikk"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
#, fuzzy
msgid "Hide ScummVM"
msgstr "Avslutt ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr ""
@@ -2609,13 +2785,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 +2802,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 +2828,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 ""
@@ -2969,36 +3145,36 @@ msgstr ""
"Ikkje gløym å kople ein tast til 'Skjul verktøylinje' for å se heile "
"inventaret"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
#, fuzzy
msgid "Do you really want to return to the Launcher?"
msgstr "Vil du verkeleg slette det lagra spelet?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
#, fuzzy
msgid "Launcher"
msgstr "Slå"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
#, fuzzy
msgid "Do you really want to quit?"
msgstr "Vil du avslutte?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr ""
@@ -3020,7 +3196,11 @@ msgstr "Volum"
msgid "Decreasing Volume"
msgstr ""
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr ""
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr ""
@@ -3060,6 +3240,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 1bf44d1a66..38cedb55d7 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -1,14 +1,14 @@
# 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-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-29 15:49+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-22 14:26+0100\n"
"Last-Translator: Micha³ Zi±bkowski <mziab@o2.pl>\n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
"Language: Polski\n"
@@ -20,45 +20,54 @@ 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
+msgid "Show hidden files"
+msgstr "Poka¿ ukryte pliki"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Poka¿ pliki oznaczone atrybutem ukryty"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +82,15 @@ msgstr "Zamknij"
msgid "Mouse click"
msgstr "Klikniêcie"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Wy¶wietl klawiaturê"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Dostosuj klawisze"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "W³±cz/wy³±cz pe³ny ekran"
@@ -94,17 +103,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -357,7 +368,7 @@ msgstr "Identyfikator jest ju¿ zajêty. Wybierz inny."
msgid "~Q~uit"
msgstr "~Z~akoñcz"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Zakoñcz ScummVM"
@@ -365,7 +376,7 @@ msgstr "Zakoñcz ScummVM"
msgid "A~b~out..."
msgstr "I~n~formacje..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Ksi±¿ka ScummVM"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Wczytaj"
@@ -459,7 +472,7 @@ msgid ""
msgstr ""
"Chcesz uruchomiæ masowy detektor gier? Mo¿e dodaæ wiele tytu³ów do listy"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -467,7 +480,7 @@ msgstr ""
msgid "Yes"
msgstr "Tak"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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 "Ustawienia FluidSynth"
+
+#: 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,191 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland w trybie GS (wy³±cz mapowanie 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -921,77 +938,74 @@ msgstr ""
"Wybrany styl nie obs³uguje obecnego jêzyka. Je¶li chcesz go u¿ywaæ, zmieñ "
"najpierw swój jêzyk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Widok listy"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Widok siatki"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Brak daty"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Brak godziny"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Brak czasu gry"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Skasuj"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Na pewno chcesz skasowaæ ten zapis?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data: "
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Czas: "
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Czas gry: "
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Zapis bez nazwy"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Nastêpny"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Poprzedni"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Zapisz"
+msgstr "Nowy zapis"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Nie uda³o siê zapisaæ stanu gry"
+msgstr "Stwórz nowy zapis"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "Nazwa:"
+msgstr "Nazwa: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Podaj opis dla slotu %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1026,35 +1040,121 @@ msgstr "Wyg³adzany (16bpp)"
msgid "Clear value"
msgstr "Wyczy¶æ"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Pog³os"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktywny"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Przestrzeñ:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "T³umienie:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Szeroko¶æ:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Poziom:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Chorus"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Szybko¶æ:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "G³êbia:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Typ:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Trójk±t"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolacja:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Brak (najszybsze)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Liniowa"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Czterostopniowa"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Siedmiostopniowa"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Reset"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "Przywróæ domy¶lne warto¶ci wszystkich ustawieñ FluidSynth."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Na pewno chcesz przywróciæ domy¶lne warto¶ci wszystkich ustawieñ FluidSynth?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Silnik nie wspiera poziomu debugowania '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pomiñ"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Wstrzymaj"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pomiñ liniê"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "B³±d podczas uruchamiania gry:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Nie uda³o siê znale¼æ silnika zdolnego do uruchomienia zaznaczonej gry"
@@ -1169,13 +1269,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1204,12 +1307,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 ""
+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~nuluj"
@@ -1217,23 +1320,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 +1348,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 +1360,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 +1369,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 +1379,49 @@ 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: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 "U¿yj oryginalnych ekranów odczytu/zapisu"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Wznów"
+#: 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 znalaz³ stare zapisy z Drascula, 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"
@@ -1306,27 +1430,27 @@ msgstr "U¿yj trybu jasnej palety"
msgid "Display graphics using the game's bright palette"
msgstr "Wy¶wietlaj grafikê za pomoc± jasnej palety gry"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "Anty-dithering EGA"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "W³±cz anty-dithering we wspieranych grach EGA"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Preferuj cyfrowe efekty d¼wiêkowe"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Preferuj cyfrowe efekty d¼wiêkowe zamiast syntezowanych"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "U¿yj IMF/Yamaha FB-01 dla wyj¶cia MIDI"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1334,29 +1458,29 @@ msgstr ""
"U¿yj karty IBM Music Feature lub modu³u syntezy FM Yamaha FB-01 dla wyj¶cia "
"MIDI"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "U¿yj CD audio"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "U¿yj CD audio zamiast muzyki w grze, je¶li jest dostêpne"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "U¿yj windowsowych kursorów"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"U¿yj windowsowych kursorów (mniejsze i monochromatyczne) zamiast DOS-owych"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "U¿yj srebrnych kursorów"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1402,7 +1526,7 @@ msgstr "Uruchom"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Zakoñcz"
@@ -1963,7 +2087,7 @@ msgstr "Kiedy Indy jest po prawej,"
#: engines/scumm/help.cpp:308
msgid "7, 4, and 1 are switched with"
-msgstr "7, 4, i 1 zostaj± zamienione"
+msgstr "7, 4 i 1 zostaj± zamienione"
#: engines/scumm/help.cpp:309
msgid "9, 6, and 3, respectively."
@@ -2009,7 +2133,7 @@ msgstr "Leæ w prawo"
msgid "Fly to lower right"
msgstr "Leæ w dó³, w prawo"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2018,7 +2142,7 @@ msgstr ""
"Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n"
"ale brakuje %s. Prze³±czam na tryb AdLib."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2029,7 +2153,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"
@@ -2040,7 +2164,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"
@@ -2051,7 +2175,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' "
@@ -2062,7 +2186,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,11 +2207,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Nie znaleziono pliku przerywnika '%s'!"
@@ -2105,6 +2229,14 @@ 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
+msgid "Fast movie speed"
+msgstr "Przy¶pieszone filmy"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Odtwarzaj filmy ze zwiêkszon± prêdko¶ci±"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Nie uda³o siê zapisaæ stanu gry"
@@ -2195,11 +2327,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:2447
msgid "Turn Left"
msgstr "Obrót w lewo"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Obrót w prawo"
@@ -2215,7 +2347,7 @@ msgstr "Opcje"
msgid "Choose Spell"
msgstr "Wybierz zaklêcie"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2230,12 +2362,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternatywne intro"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "U¿yj intra z wersji dyskietkowej (tylko dla wersji CD)"
+msgstr "U¿yj alternatywnego intra (tylko dla wersji CD)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2261,24 +2392,24 @@ msgstr "Intro z wersji dyskietkowej"
msgid "Use the floppy version's intro (CD version only)"
msgstr "U¿yj intra z wersji dyskietkowej (tylko dla wersji CD)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
"Przerywnik w formacie strumieniowym PSX '%s' nie mo¿e zostaæ odtworzony w "
"trybie indeksowanym"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez "
"obs³ugi zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Przerywniki w formacie MPEG2 nie s± ju¿ obs³ugiwane"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Nie znaleziono przerywnika '%s'"
@@ -2322,7 +2453,7 @@ msgstr "Zachowaj nowy"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "To koniec dema Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2337,16 +2468,18 @@ msgstr "Poka¿ etykiety obiektów"
msgid "Show labels for objects on mouse hover"
msgstr "Poka¿ etykiety obiektów przy najechaniu myszk±"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Nie masz pliku 'teenagent.dat'. Pobierz go ze strony ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Plik teenagent.dat jest skompresowany, a ScummVM nie zawiera obs³ugi zlib. "
+"Rozpakuj plik."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2397,6 +2530,46 @@ msgstr ""
"\n"
"Prosimy o zg³oszenie tego zespo³owi."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Nieprawid³owa nazwa pliku zapisu"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Góra/Przybli¿/Ruch naprzód/Otwórz drzwi"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Dó³/Oddal"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Poka¿/schowaj przedmioty"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Poka¿/schowaj biochipy"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Akcja/Wybór"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "W³±cz/wy³±cz widok danych"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Poka¿/schowaj ekran informacji"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Poka¿/schowaj menu pauzy"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulator OPL MAME"
@@ -2454,7 +2627,7 @@ msgstr "Brak muzyki"
msgid "Amiga Audio Emulator"
msgstr "Emulator d¼wiêku Amigi"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulator AdLib"
@@ -2466,11 +2639,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"
@@ -2621,24 +2794,24 @@ msgstr "¦rodkowy przycisk"
msgid "Right Click"
msgstr "Klikniêcie PPM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ukryj ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ukryj pozosta³e"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Poka¿ wszystkie"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Okno"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Miniaturka"
@@ -2652,12 +2825,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,21 +2839,21 @@ 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"
#: backends/graphics/opengl/opengl-graphics.cpp:135
msgid "OpenGL Normal"
-msgstr "OpenGL - normalny"
+msgstr "OpenGL (normalny)"
#: backends/graphics/opengl/opengl-graphics.cpp:136
msgid "OpenGL Conserve"
-msgstr "OpenGL - zachowanie proporcji"
+msgstr "OpenGL (zachowanie proporcji)"
#: backends/graphics/opengl/opengl-graphics.cpp:137
msgid "OpenGL Original"
-msgstr "OpenGL - oryginalny rozmiar"
+msgstr "OpenGL (oryginalny rozmiar)"
#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415
msgid "Current display mode"
@@ -2690,11 +2863,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"
@@ -3004,35 +3177,35 @@ msgstr ""
"Nie zapomnij przypisaæ klawisza 'Ukryj pasek narzêdzi', by widzieæ ca³y "
"ekwipunek"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Na pewno chcesz powróciæ do launchera?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
-msgstr ""
+msgstr "Launcher"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Na pewno chcesz wyj¶æ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Dotkniêcie ekranu - klikniêcie LPM"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Dotkniêcie ekranu - klikniêcie PPM"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
-msgstr "Dotkniêcie ekranu - brak klikniêcia"
+msgstr "Dotkniêcie ekranu - przytrzymanie (brak klikniêcia)"
#: backends/events/gph/gph-events.cpp:410
msgid "Maximum Volume"
@@ -3050,7 +3223,11 @@ msgstr "Minimalna g³o¶no¶æ"
msgid "Decreasing Volume"
msgstr "Zmniejszenie g³o¶no¶ci"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Dotkniêcie ekranu - przytrzymanie (krzy¿ak klika)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sprawd¼ aktualizacjê..."
@@ -3086,6 +3263,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 f41aa7d59f..a3a5c3935c 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-08-12 14:57+0200\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
"PO-Revision-Date: 2011-10-21 21:30-0300\n"
"Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n"
"Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n"
@@ -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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +83,15 @@ msgstr "Fechar"
msgid "Mouse click"
msgstr "Clique do mouse"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Mostrar teclado"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Remapear teclas"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
#, fuzzy
msgid "Toggle FullScreen"
msgstr "Habilita Tela Cheia"
@@ -95,17 +105,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +188,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 +212,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 +229,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 +242,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 +260,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 +273,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 +286,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 +304,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 +312,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"
@@ -359,7 +371,7 @@ msgstr "Este código já esta sendo utilizado. Por favor, escolha outro."
msgid "~Q~uit"
msgstr "~S~air"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Sair do ScummVM"
@@ -367,7 +379,7 @@ msgstr "Sair do ScummVM"
msgid "A~b~out..."
msgstr "So~b~re..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Sobre o ScumnmVM"
@@ -445,12 +457,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Carregar"
@@ -463,7 +477,7 @@ msgstr ""
"Você realmente deseja adicionar vários jogos ao mesmo tempo? Isso poderá "
"resultar em uma adição gigantesca de jogos."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -471,7 +485,7 @@ msgstr ""
msgid "Yes"
msgstr "Sim"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -541,133 +555,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 +689,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 +756,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 gui/fluidsynth-dialog.cpp:137
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."
@@ -932,74 +951,74 @@ msgstr ""
"O tema que você selecionou não suporta seu idioma atual. Se você quiser usar "
"este tema você precisa mudar para outro idioma."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Sem data salva"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Sem hora salva"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Sem tempo de jogo salvo"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Excluir"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Você realmente quer excluir este jogo salvo?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Data:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Hora:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Tempo de jogo:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Não-titulado arquivo de save"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "New Save"
msgstr "Salvar"
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
#, fuzzy
msgid "Create a new save game"
msgstr "Falha ao salvar o jogo"
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
#, fuzzy
msgid "Name: "
msgstr "Nome:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1037,35 +1056,124 @@ msgstr "Anti-Serrilhamento (16bpp)"
msgid "Clear value"
msgstr "Limpar valor"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+#, fuzzy
+msgid "Reverb"
+msgstr "Nunca"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr "(Ativo)"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+#, fuzzy
+msgid "Speed:"
+msgstr "Voz"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+#, fuzzy
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "Você realmente deseja voltar para o menu principal?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Esse programa não suporta o nível de debug '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Pular"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Pula linha"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Erro ao executar o jogo:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Não foi possível encontrar qualquer programa capaz de rodar o jogo "
@@ -1183,13 +1291,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1219,12 +1330,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 +1343,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 +1373,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 +1387,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 +1397,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 +1407,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: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 ""
-#: 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:841 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:841 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"
@@ -1327,57 +1461,57 @@ msgstr "Item da direita superior"
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA sem dithering"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
#, fuzzy
msgid "Enable undithering in EGA games"
msgstr "Habilita EGA sem dithering em jogos com suporte"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
#, fuzzy
msgid "Prefer digital sound effects"
msgstr "Volume dos efeitos sonoros especiais"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
#, fuzzy
msgid "Use silver cursors"
msgstr "Cursor normal"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1422,7 +1556,7 @@ msgstr "Jogar"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Sair"
@@ -2030,7 +2164,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2040,7 +2174,7 @@ msgstr ""
"LucasArts,\n"
"mas %s está faltando. Utilizando AdLib ao invés."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2051,7 +2185,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"
@@ -2062,7 +2196,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"
@@ -2073,7 +2207,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' "
@@ -2085,7 +2219,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,11 +2240,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Arquivo de vídeo '%s' não encontrado!"
@@ -2134,6 +2268,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 +2370,12 @@ msgstr ""
msgid "Slide Right"
msgstr "Direita"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
#, fuzzy
msgid "Turn Left"
msgstr "Desligar"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
#, fuzzy
msgid "Turn Right"
msgstr "Cursor para a direita"
@@ -2252,7 +2395,7 @@ msgstr "~O~pções"
msgid "Choose Spell"
msgstr "Escolher"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
#, fuzzy
msgid ""
"You appear to be using a General MIDI device,\n"
@@ -2299,22 +2442,22 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
"Vídeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem "
"suporte a zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "Vídeos em MPEG2 não são mais suportados"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Vídeo '%s' não encontrado"
@@ -2358,7 +2501,7 @@ msgstr "Mantenha o novo"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Este é o fim do demo de Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
#, fuzzy
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
@@ -2374,12 +2517,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2435,6 +2578,47 @@ msgstr ""
"\n"
"Por favor, reporte para a equipe."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2446
+#, fuzzy
+msgid "Down/Zoom Out"
+msgstr "Zoom para cima"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "Emulador MAME OPL"
@@ -2492,7 +2676,7 @@ msgstr "Sem música"
msgid "Amiga Audio Emulator"
msgstr "Emulador Som Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "Emulador AdLib"
@@ -2504,11 +2688,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"
@@ -2661,24 +2845,24 @@ msgstr "Item do meio na esquerda"
msgid "Right Click"
msgstr "Clique com o botão direito"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Ocultar ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Ocultar Outros"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Mostrar Tudo"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Janela"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimizar"
@@ -2692,12 +2876,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 +2890,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 +2914,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"
@@ -3047,33 +3231,33 @@ msgstr ""
"Não se esqueça de mapear uma tecla para \"Ocultar a barra de ferramentas\" "
"para ver todo o seu inventário"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Você realmente deseja voltar para o menu principal?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Menu principal"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Você realmente deseja sair?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen 'Modo Toque' - Clique Esquerdo"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscreen 'Modo Toque' - Clique Direito"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen 'Modo Toque' - Acima (Sem Clicar)"
@@ -3093,7 +3277,12 @@ msgstr "Volume mínimo"
msgid "Decreasing Volume"
msgstr "Diminuindo Volume"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+#, fuzzy
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Modo Toque' - Acima (Sem Clicar)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Procurar por Atualizações..."
@@ -3129,6 +3318,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 3a80d9fd7b..8e52f3f342 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -1,14 +1,14 @@
# 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.
+# Eugene Sandulenko <sev@scummvm.org>, 2010`
#
msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-08 22:00+0200+0200\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-08 22:24+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
"Language: Russian\n"
@@ -17,46 +17,56 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n"
"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Poedit 1.5.5\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 "²ÚÛîçÕÝÝëÕ Ò ÑØÛÔ ÞßæØØ:"
+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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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 "²ëÑàÐâì"
@@ -71,15 +81,15 @@ msgstr "·ÐÚàëâì"
msgid "Mouse click"
msgstr "ºÛØÚ Üëèìî"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "¿ÞÚÐ×Ðâì ÚÛÐÒØÐâãàã"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "¿ÕàÕÝÐ×ÝÐçØâì ÚÛÐÒØèØ"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "¿ÕàÕÚÛîçÕÝØÕ ÝÐ ÒÕáì íÚàÐÝ"
@@ -92,17 +102,19 @@ 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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -142,7 +154,7 @@ msgid ""
"Short game identifier used for referring to savegames and running the game "
"from the command line"
msgstr ""
-"ºÞàÞâÚØÙ ØÔÕÝâØäØÚÐâÞà, ØáßÞÛì×ãÕÜëÙ ÔÛï ØÜÕÝ áÞåàÐÝÕÝØÙ ØÓà Ø ÔÛï ×ÐßãáÚÐ "
+"ºÞàÞâÚØÙ ØÔÕÝâØäØÚÐâÞà, ØáßÞÛì×ãÕÜëÙ ÔÛï ØÜñÝ áÞåàÐÝÕÝØÙ ØÓà Ø ÔÛï ×ÐßãáÚÐ "
"Ø× ÚÞÜÐÝÔÝÞÙ áâàÞÚØ"
#: gui/launcher.cpp:193
@@ -174,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 "<ßÞ ãÜÞÛçÐÝØî>"
@@ -197,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 "³àä"
@@ -214,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 "°ãÔØÞ"
@@ -227,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 "³àÞÜÚ"
@@ -245,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"
@@ -258,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"
@@ -271,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 "¿ãâØ"
@@ -289,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 "´Þß. ßãâì:"
@@ -297,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"
@@ -356,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"
@@ -364,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"
@@ -441,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "·ÐÓàã×Øâì"
@@ -459,7 +473,7 @@ msgstr ""
"²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ×ÐßãáâØâì ÔÕâÕÚâÞà ÒáÕå ØÓà? ÍâÞ ßÞâÕÝæØÐÛìÝÞ ÜÞÖÕâ "
"ÔÞÑÐÒØâì ÑÞÛìèÞÕ ÚÞÛØçÕáâÒÞ ØÓà."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -467,7 +481,7 @@ msgstr ""
msgid "Yes"
msgstr "´Ð"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -531,134 +545,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 +680,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 "½ÐáâàÞÙÚØ FluidSynth"
+
+#: 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 +748,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)"
+msgstr "½ÐáâÞïéØÙ Roland MT-32 (ÑÕ× íÜãÛïæØØ GM)"
-#: gui/options.cpp:880
-msgid "Enable Roland GS Mode"
-msgstr "²ÚÛîçØâì àÕÖØÜ Roland GS"
+#: gui/options.cpp:890
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "ÀÕÖØÜ Roland GS (×ÐßàÕâØâì ÜÐßßØÝÓ 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 gui/fluidsynth-dialog.cpp:137
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 çâÞÑë ßàØÜÕÝØâì Ø×ÜÕÝÕÝØï."
+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."
@@ -925,77 +943,74 @@ msgstr ""
"ÂÕÜÐ, ÒëÑàÐÝÝÐï ÒÐÜØ, ÝÕ ßÞÔÔÕàÖØÒÐÕâ âÕÚãéØÙ ï×ëÚ. µáÛØ Òë åÞâØâÕ "
"ØáßÞÛì×ÞÒÐâì íâã âÕÜã, ÒÐÜ ÝÕÞÑåÞÔØÜÞ áÝÐçÐÛÐ ßÕàÕÚÛîçØâìáï ÝÐ ÔàãÓÞÙ ï×ëÚ."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "²ØÔ áßØáÚÐ"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+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 ""
+msgstr "ÁÛÕÔãîéØÙ"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "¿àÕÔëÔãéØÙ"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "ÁÞåàÐÝØâì"
+msgstr "½ÞÒÞÕ áÞåàÐÝÕÝØÕ"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã"
+msgstr "ÁÞ×ÔÐâì ÝÞÒãî ×ÐßØáì ØÓàë"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "½Ð×ÒÐÝØÕ:"
+msgstr "½Ð×ÒÐÝØÕ: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "²ÒÕÔØâÕ ÞßØáÐÝØÕ áÛÞâÐ %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1030,35 +1045,123 @@ msgstr "ÀÐáâÕàØ×ÐâÞà áÞ áÓÛÐÖØÒÐÝØÕÜ (16bpp)"
msgid "Clear value"
msgstr "¾çØáâØâì ×ÝÐçÕÝØÕ"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "ÀÕÒÕàÑÕàÐæØï"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+#, fuzzy
+msgid "Active"
+msgstr "°ÚâØÒÝÞ"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "ºÞÜÝÐâÐ:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "²ÛÐÖÝÞáâì:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "ÈØàØÝÐ:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "ÃàÞÒÕÝì:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "ÅÞà"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "¾×ÒãçÚÐ"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "³ÛãÑØÝÐ:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "ÂØß:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "ÁØÝãáÞØÔÐ"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "ÂàÕãÓÞÛìÝÐï"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "¸ÝâÕàßÞÛïæØï:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "½Õâ (ÑëáâàëÙ)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "»ØÝÕÙÝÐï"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "ÇÕâÒÕàâÞÓÞ ßÞàïÔÚÐ"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "ÁÕÔìÜÞÓÞ ßÞàïÔÚÐ"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "ÁÑàÞá"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "ÁÑàÞáØâì ÒáÕ ãáâÐÝÞÒÚØ FluidSynth Ò ×ÝÐçÕÝØï ßÞ ãÜÞÛçÐÝØî"
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ áÑàÞáØâì ÒáÕ ãáâÐÝÞÒÚØ FluidSynth Ò ×ÝÐçÕÝØï ßÞ "
+"ãÜÞÛçÐÝØî?"
+
+#: 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 "½Õ ÜÞÓã ÝÐÙâØ ÔÒØÖÞÚ ÔÛï ×ÐßãáÚÐ ÒëÑàÐÝÝÞÙ ØÓàë"
@@ -1174,13 +1277,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1210,12 +1316,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 "¾~â~ÜÕÝÐ"
@@ -1223,23 +1329,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"
@@ -1253,7 +1359,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"
@@ -1268,7 +1374,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, "
@@ -1278,40 +1384,62 @@ 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 "
"not work in future versions of ScummVM."
msgstr ""
-"¿Àµ´Ã¿Àµ¶´µ½¸µ: ¸ÓàÐ, ÚÞâÞàãî Òë áÞÑØàÐÕâÕáì ×ÐßãáâØâì Õéñ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï "
-"ScummVM ßÞÛÝÞáâìî. ¾ÝÐ áÚÞàÕÕ ÒáÕÓÞ ÝÕ ÑãÔÕâ àÐÑÞâÐâì áâÐÑØÛìÝÞ, Ø "
-"áÞåàÐÝÕÝØï ØÓà ÜÞÓãâ ÝÕ àÐÑÞâÐâì Ò ÑãÔãéØå ÒÕàáØïå ScummVM."
+"¿Àµ´Ã¿Àµ¶´µ½¸µ: ¸ÓàÐ, ÚÞâÞàãî Òë áÞÑØàÐÕâÕáì ×ÐßãáâØâì, Õéñ ÝÕ "
+"ßÞÔÔÕàÖØÒÐÕâáï 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:841 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:841 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 ÞÑÝÐàãÖØÛ ã ÒÐá áÞåàÐÝÕÝØï ØÓàë Drascula Ò áâÐàÞÜ äÞàÜÐâÕ.\n"
+"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø, çâÞÑë ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÞÝØ "
+"ÔÞÛÖÝë Ñëâì ßÕàÕÒÕÔÕÝë Ò ÝÞÒëÙ äÞàÜÐâ.\n"
+"\n"
+"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕÒÕáâØ Øå Ò ÝÞÒëÙ äÞàÜÐâ áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ "
+"áÞÞÑéÕÝØÕ ßÞïÒØâáï áÝÞÒÐ ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "¸áßÞÛì×ÞÒÐâì àÕÖØÜ ïàÚÞÙ ßÐÛØâàë"
@@ -1320,70 +1448,70 @@ 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"
msgstr ""
-"¸áßÞÛì×ÒÞÒÐâì ×ÒãÚÞÒãî ÚÐàâÚã IBM Music Feature ØÛØ ÜÞÔãÛì áØÝâÕ×Ð Yamaha "
+"¸áßÞÛì×ÞÒÐâì ×ÒãÚÞÒãî ÚÐàâã 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 "¸áßÞÛì×ÞÒÐâì áÕàÕÑàïÝÝëÕ ÚãàáÞàë"
+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 ""
-"¸áßÞÛì×ÞÒÐâì ÐÛìâÕàÝÐâØÒÝëÙ ÝÐÑÞà áÕàÕÑàïÝÝëå ÚãàáÞàÞÒ ÒÜÕáâÞ ÞÑëçÝëå ×ÞÛÞâëå"
+"¸áßÞÛì×ÞÒÐâì ÐÛìâÕàÝÐâØÒÝëÙ ÝÐÑÞà áÕàÕÑàïÝëå ÚãàáÞàÞÒ ÒÜÕáâÞ ÞÑëçÝëå ×ÞÛÞâëå"
#: engines/scumm/dialogs.cpp:175
#, c-format
msgid "Insert Disk %c and Press Button to Continue."
-msgstr "²áâÐÒìâÕ ÔØáÚ %c Ø ÝÐÖÜØâÕ ÚÛÐÒØèã çâÞÑë ßàÞÔÞÛÖØâì."
+msgstr "²áâÐÒìâÕ ÔØáÚ %c Ø ÝÐÖÜØâÕ ÚÛÐÒØèã, çâÞÑë ßàÞÔÞÛÖØâì."
#: engines/scumm/dialogs.cpp:176
#, c-format
@@ -1397,7 +1525,7 @@ msgstr "¾èØÑÚÐ çâÕÝØï ÔØáÚÐ %c, (%c%d) ½ÐÖÜØâÕ ÚÛÐÒØèã."
#: engines/scumm/dialogs.cpp:178
msgid "Game Paused. Press SPACE to Continue."
-msgstr "¸ÓàÐ ÞáâÐÝÞÒÛÕÝÐ. ½ÐÖÜØâÕ ßàÞÑÕÛ çâÞÑë ßàÞÔÞÛÖØâì."
+msgstr "¸ÓàÐ ÞáâÐÝÞÒÛÕÝÐ. ½ÐÖÜØâÕ ßàÞÑÕÛ, çâÞÑë ßàÞÔÞÛÖØâì."
#. I18N: You may specify 'Yes' symbol at the end of the line, like this:
#. "Moechten Sie wirklich neu starten? (J/N)J"
@@ -1420,7 +1548,7 @@ msgstr "¸ÓàÐâì"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "²ëåÞÔ"
@@ -1594,7 +1722,7 @@ msgstr "ÍÜãÛïæØï ßàÐÒÞÙ ÚÛÐÒØèØ ÜëèØ"
#: engines/scumm/help.cpp:93
msgid "Special keyboard commands:"
-msgstr "ÁßÕæØÐÛìÝÒÕ ÚÛÐÒØÐâãàÝëÕ ÚÞÜÐÝÔë:"
+msgstr "ÁßÕæØÐÛìÝëÕ ÚÛÐÒØÐâãàÝëÕ ÚÞÜÐÝÔë:"
#: engines/scumm/help.cpp:94
msgid "Show / Hide console"
@@ -1638,7 +1766,7 @@ msgstr "* ¸áßÞÛì×ÞÒÐÝØÕ ctrl-f Ø"
#: engines/scumm/help.cpp:108
msgid " ctrl-g are not recommended"
-msgstr " ctrl-g ÝÕ àÕÚÞÜÕÝÔãÕâáï"
+msgstr " ctrl-g ÝÕ àÕÚÞÜÕÝÔãÕâáï,"
#: engines/scumm/help.cpp:109
msgid " since they may cause crashes"
@@ -2027,7 +2155,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"
@@ -2036,7 +2164,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"
@@ -2047,7 +2175,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"
@@ -2058,7 +2186,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"
@@ -2069,7 +2197,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' "
@@ -2080,7 +2208,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 "ÀÕÖØÜ ÑëáâàÞÓÞ ßÕàÕåÞÔÐ ÐÚâØÒØàÞÒÐÝ"
@@ -2101,11 +2229,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' ÝÕ ÝÐÙÔÕÝ!"
@@ -2123,6 +2251,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 "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã"
@@ -2140,7 +2276,7 @@ msgstr "²ÚÛîçØâì ×ÒãÚØ ÐãÔØâÞàØØ Ò áâãÔØØ"
#. I18N: This option allows the user to skip text and cutscenes.
#: engines/kyra/detection.cpp:73
msgid "Skip support"
-msgstr "¿ÞÔÔàÕÖÚÐ ßàÞßãáÚÞÒ"
+msgstr "¿ÞÔÔÕàÖÚÐ ßàÞßãáÚÞÒ"
#: engines/kyra/detection.cpp:74
msgid "Allow text and cutscenes to be skipped"
@@ -2213,11 +2349,11 @@ msgstr "ÁÚÞÛì×Øâì ÒÛÕÒÞ"
msgid "Slide Right"
msgstr "ÁÚÞÛì×Øâì ÒßàÐÒÞ"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
msgid "Turn Left"
msgstr "¿ÞÒÞàÞâ ÝÐÛÕÒÞ"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "¿ÞÒÞàÞâ ÝÐßàÐÒÞ"
@@ -2233,7 +2369,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"
@@ -2250,12 +2386,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "°ÛìâÕàÝÐâØÒÝÞÕ ÒáâãßÛÕÝØÕ"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "¸áßÞÛì×ÞÒÐâì ÒáâãßÛÕÝØÕ á ÓØÑÚØå ÔØáÚÞÒ (âÞÛìÚÞ ÔÛï CD ÒÕàáØØ ØÓàë)"
+msgstr "¸áßÞÛì×ÞÒÐâì ÐÛìâÕàÝÐâØÒÝÞÕ ÒáâãßÛÕÝØÕ (âÞÛìÚÞ ÔÛï CD ÒÕàáØØ ØÓàë)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2281,21 +2416,21 @@ 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' ÝÕ ÝÐÙÔÕÝÐ"
@@ -2311,7 +2446,7 @@ msgid ""
"time you start the game.\n"
msgstr ""
"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áÞåàÐÝÕÝØï ØÓàë ÁÛÞÜÐÝÝëÙ ¼Õç Ò áâÐàÞÜ äÞàÜÐâÕ.\n"
-"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø çâÞÑë ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÞÝØ "
+"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø, çâÞÑë ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÞÝØ "
"ÔÞÛÖÝë Ñëâì ßÕàÕÒÕÔÕÝë Ò ÝÞÒëÙ äÞàÜÐâ.\n"
"\n"
"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕÒÕáâØ Øå Ò ÝÞÒëÙ äÞàÜÐâ áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ "
@@ -2338,7 +2473,7 @@ msgstr "ÁÔÕÛÐâì ÝÞÒÞÕ"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "ÍâÞ ×ÐÒÕàèÕÝØÕ ÔÕÜÞ ÁÛÞÜÐÝÝÞÓÞ ¼ÕçÐ 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2351,18 +2486,21 @@ msgstr "¿ÞÚÐ×ëÒÐâì ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ"
#: engines/sword2/sword2.cpp:80
msgid "Show labels for objects on mouse hover"
-msgstr "¿ÞÚÐ×ëÒÐÕâ ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ ßà ØÝÐÒÕÔÕÝØØ ÚãàáÞàÐ ÜëèØ"
+msgstr "¿ÞÚÐ×ëÒÐÕâ ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ ßàØ ÝÐÒÕÔÕÝØØ ÚãàáÞàÐ ÜëèØ"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
+"à ÒÐá ÞâáãâáâÒãÕâ äÐÙÛ 'teenagent.dat'. ÁÚÐçÐÙâÕ ÕÓÞ á ÒÕÑ-áÐÙâÐ ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"ÄÐÙÛ teenagent.dat áÖÐâ, ÝÞ zlib ÝÕ ÒÚÛîçÕÝÞ Ò íâã ßàÞÓàÐÜÜã. ¿ÞÖÐÛãÙáâÐ, "
+"àÐáßÐÚãÙâÕ ÕÓÞ"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2413,6 +2551,46 @@ msgstr ""
"\n"
"¿ÞÖÐÛãÙáâÐ, áÞÞÑéØâÕ ÞÑ íâÞÜ ÚÞÜÐÝÔÕ ScummVM."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "½ÕÒÕàÝÞÕ ØÜï äÐÙÛÐ áÞåàÐÝÕÝØï"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "²ÒÕàå/ÃÜÕÝìèØâì ÜÐáèâÐÑ/²ßÕàñÔ/¾âàëâì ÔÒÕàØ"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "²ÝØ×/ÃÒÕÛ. ÜÐáèâÐÑ"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "¿ÞÚÐ×Ðâì/ÁßàïâÐâì ØÝÒÕÝâÐàì"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "¿ÞÚÐ×Ðâì/ÁßàïâÐâì ÑØÞçØß"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "´ÕÙáâÒØÕ/²ëÑÞà"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "²ÚÛîçØâì ßÞÚÐ× ÔÐÝÝëå Ò æÕÝâàÕ íÚàÐÝÐ"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "¿ÞÚÐ×Ðâì/ÁßàïâÐâì ØÝäÞíÚàÐÝ"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "¿ÞÚÐ×Ðâì/ÁßàïâÐâì ÜÕÝî ßÐã×ë"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "ÍÜãÛïâÞà MAME OPL"
@@ -2427,7 +2605,7 @@ msgid ""
"The selected audio device '%s' was not found (e.g. might be turned off or "
"disconnected)."
msgstr ""
-"²ëÑàÐÝÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ ÞÝÞ ÒëÚÛîçÕÝÞ "
+"²ëÑàÐÝÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ, ÞÝÞ ÒëÚÛîçÕÝÞ "
"ØÛØ ÝÕ ßÞÔÚÛîçÕÝÞ)."
#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257
@@ -2450,7 +2628,7 @@ msgid ""
"The preferred audio device '%s' was not found (e.g. might be turned off or "
"disconnected)."
msgstr ""
-"¿àÕÔßÞçâØâÕÛìÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ ÞÝÞ "
+"¿àÕÔßÞçâØâÕÛìÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ, ÞÝÞ "
"ÒëÚÛîçÕÝÞ ØÛØ ÝÕ ßÞÔÚÛîçÕÝÞ)."
#: audio/mididrv.cpp:272
@@ -2470,7 +2648,7 @@ msgstr "±Õ× Üã×ëÚØ"
msgid "Amiga Audio Emulator"
msgstr "ÍÜãÛïâÞà ×ÒãÚÐ Amiga"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "ÍÜãÛïâÞà AdLib"
@@ -2482,11 +2660,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"
@@ -2600,7 +2778,7 @@ msgstr "·ÐßàÕâØâì ÒëÚÛîçÕÝØÕ"
#: backends/platform/iphone/osys_events.cpp:300
msgid "Mouse-click-and-drag mode enabled."
-msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒÚÛîçÕÝ."
+msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒÚÛîçñÝ."
#: backends/platform/iphone/osys_events.cpp:302
msgid "Mouse-click-and-drag mode disabled."
@@ -2608,7 +2786,7 @@ msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒëÚÛîçÕÝ."
#: backends/platform/iphone/osys_events.cpp:313
msgid "Touchpad mode enabled."
-msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒÚÛîçÕÝ."
+msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒÚÛîçñÝ."
#: backends/platform/iphone/osys_events.cpp:315
msgid "Touchpad mode disabled."
@@ -2637,24 +2815,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"
@@ -2668,12 +2846,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 "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒëÚÛîçÕÝÐ"
@@ -2682,7 +2860,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 "¾ÚÞÝÝëÙ àÕÖØÜ"
@@ -2706,11 +2884,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 "°ÚâØÒÝëÙ àÕÖØÜ äØÛìâàÐ: ±ÛØÖÐÙèØÙ"
@@ -3017,36 +3195,36 @@ msgstr "½Ð×ÝÐçØâì ÔÕÙáâÒØÕ ÃÜÕÝìèØâì ¼ÐáèâÐÑ (ÝÕÞÑï×ÐâÕÛìÝÞ)"
msgid ""
"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
msgstr ""
-"½Õ ×ÐÑãÔìâÕ ÝÐ×ÝÐçØâì ÚÛÐÒØèã ÔÛï ÔÕÙáâÒØï 'Hide Toolbar' çâÞÑë ãÒØÔÕâì ÒÕáì "
-"ØÝÒÕÝâÐàì Ò ØÓàÕ"
+"½Õ ×ÐÑãÔìâÕ ÝÐ×ÝÐçØâì ÚÛÐÒØèã ÔÛï ÔÕÙáâÒØï 'Hide Toolbar', çâÞÑë ãÒØÔÕâì "
+"ÒÕáì ØÝÒÕÝâÐàì Ò ØÓàÕ"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ÒÕàÝãâìáï Ò ÓÛÐÒÝÞÕ ÜÕÝî?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "³ÛÐÒÝÞÕ ÜÕÝî"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ÒëÙâØ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: 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 "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÞÛñâ (ÑÕ× ÚÛØÚÐ)"
@@ -3066,7 +3244,11 @@ msgstr "¼ØÝØÜÐÛìÝÐï ÓàÞÜÚÞáâì"
msgid "Decreasing Volume"
msgstr "ÃÜÕÝìèÕÝØÕ ÓàÞÜÚÞáâØ"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÞÛñâ (ÚÛØÚØ DPad)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "¿àÞÒÕàïî ÞÑÝÞÒÛÕÝØï..."
@@ -3102,6 +3284,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 de270cef27..d5e41ba0e5 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.6.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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 ""
@@ -70,15 +79,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 ""
@@ -91,17 +100,19 @@ 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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +181,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 +204,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 +221,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 +234,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 +252,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 +265,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 +278,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 +296,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 +304,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 ""
@@ -352,7 +363,7 @@ msgstr ""
msgid "~Q~uit"
msgstr ""
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr ""
@@ -360,7 +371,7 @@ msgstr ""
msgid "A~b~out..."
msgstr ""
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr ""
@@ -437,12 +448,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr ""
@@ -453,7 +466,7 @@ msgid ""
"a huge number of games."
msgstr ""
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -461,7 +474,7 @@ msgstr ""
msgid "Yes"
msgstr ""
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -525,451 +538,455 @@ 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 gui/fluidsynth-dialog.cpp:137
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."
msgstr ""
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
msgstr ""
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
msgstr ""
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr ""
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr ""
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr ""
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr ""
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr ""
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr ""
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr ""
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr ""
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr ""
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
msgstr ""
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
msgstr ""
-#: gui/saveload-dialog.cpp:684
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
msgstr ""
-#: gui/saveload-dialog.cpp:789
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr ""
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
msgstr ""
@@ -1007,35 +1024,120 @@ msgstr ""
msgid "Clear value"
msgstr ""
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr ""
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr ""
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr ""
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr ""
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr ""
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr ""
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr ""
@@ -1150,13 +1252,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1180,12 +1285,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 +1298,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 +1323,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 +1332,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: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 ""
-#: 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:841 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:841 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 ""
@@ -1271,54 +1391,54 @@ msgstr ""
msgid "Display graphics using the game's bright palette"
msgstr ""
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr ""
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr ""
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr ""
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr ""
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr ""
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr ""
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr ""
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr ""
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr ""
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1363,7 +1483,7 @@ msgstr ""
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr ""
@@ -1970,14 +2090,14 @@ 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"
"but %s is missing. Using AdLib instead."
msgstr ""
-#: 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"
@@ -1985,7 +2105,7 @@ msgid ""
"%s"
msgstr ""
-#: 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"
@@ -1993,7 +2113,7 @@ msgid ""
"%s"
msgstr ""
-#: 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"
@@ -2001,7 +2121,7 @@ msgid ""
"%s"
msgstr ""
-#: 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' "
@@ -2009,7 +2129,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,11 +2150,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 ""
@@ -2052,6 +2172,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 +2270,11 @@ msgstr ""
msgid "Slide Right"
msgstr ""
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
msgid "Turn Left"
msgstr ""
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr ""
@@ -2162,7 +2290,7 @@ msgstr ""
msgid "Choose Spell"
msgstr ""
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2199,20 +2327,20 @@ msgstr ""
msgid "Use the floppy version's intro (CD version only)"
msgstr ""
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr ""
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr ""
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr ""
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr ""
@@ -2247,7 +2375,7 @@ msgstr ""
msgid "This is the end of the Broken Sword 1 Demo"
msgstr ""
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr ""
@@ -2260,12 +2388,12 @@ msgstr ""
msgid "Show labels for objects on mouse hover"
msgstr ""
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
@@ -2308,6 +2436,46 @@ msgid ""
"Please report to the team."
msgstr ""
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr ""
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr ""
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr ""
@@ -2357,7 +2525,7 @@ msgstr ""
msgid "Amiga Audio Emulator"
msgstr ""
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr ""
@@ -2369,11 +2537,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 ""
@@ -2524,24 +2692,24 @@ msgstr ""
msgid "Right Click"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr ""
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr ""
@@ -2555,12 +2723,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 +2737,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 +2761,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 ""
@@ -2905,33 +3073,33 @@ msgid ""
"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
msgstr ""
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr ""
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr ""
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr ""
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr ""
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr ""
@@ -2951,7 +3119,11 @@ msgstr ""
msgid "Decreasing Volume"
msgstr ""
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr ""
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 02f2ab44f4..0031e2dc06 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,58 +7,66 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.5.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-07-08 18:03+0100\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-13 21:30+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
"Language: Svenska\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"X-Poedit-Language: Swedish\n"
-"X-Poedit-Country: SWEDEN\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 "(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
+msgid "Show hidden files"
+msgstr "Visa gömda filer"
+
+#: gui/browser.cpp:67
+msgid "Show files marked with the hidden attribute"
+msgstr "Visa dolda filer"
+
+#: 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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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"
@@ -73,15 +81,15 @@ msgstr "Stäng"
msgid "Mouse click"
msgstr "Musklick"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "Visa tangentbord"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "Ställ in tangenter"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "Fullskärmsläge"
@@ -94,17 +102,19 @@ 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: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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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 +187,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 +210,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 +227,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 +240,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 +258,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 +271,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 +284,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 +302,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 +310,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"
@@ -359,7 +369,7 @@ msgstr "Detta ID-namn är upptaget. Var god välj ett annat."
msgid "~Q~uit"
msgstr "~A~vsluta"
-#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96
+#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:95
msgid "Quit ScummVM"
msgstr "Avsluta ScummVM"
@@ -367,7 +377,7 @@ msgstr "Avsluta ScummVM"
msgid "A~b~out..."
msgstr "O~m~..."
-#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70
+#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:69
msgid "About ScummVM"
msgstr "Om ScummVM"
@@ -444,12 +454,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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "Ladda"
@@ -462,7 +474,7 @@ msgstr ""
"Vill du verkligen använda mass-speldetektorn? Processen kan potentiellt "
"lägga till ett enormt antal spel."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -470,7 +482,7 @@ msgstr ""
msgid "Yes"
msgstr "Ja"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -523,7 +535,7 @@ msgstr "Scanning färdig!"
#: gui/massadd.cpp:261
#, c-format
msgid "Discovered %d new games, ignored %d previously added games."
-msgstr "Upptäckte %n nya spel. Ignorerade %d tidigare tillagda spel."
+msgstr "Upptäckte %d nya spel. Ignorerade %d tidigare tillagda spel."
#: gui/massadd.cpp:265
#, c-format
@@ -535,133 +547,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 +681,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 "FluidSynth inställningar"
+
+#: 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 +747,193 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "Roland GS-läge (avaktivera GM-mapping)"
-#: 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -925,77 +941,74 @@ msgstr ""
"Temat du valde stöder inte ditt språk. Om du vill använda det här temat "
"måste först byta till ett annat språk."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "Visa som lista"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+msgstr "Visa som rutnät"
-#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350
+#: gui/saveload-dialog.cpp:210 gui/saveload-dialog.cpp:358
msgid "No date saved"
msgstr "Inget datum sparat"
-#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351
+#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:359
msgid "No time saved"
msgstr "Ingen tid sparad"
-#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352
+#: gui/saveload-dialog.cpp:212 gui/saveload-dialog.cpp:360
msgid "No playtime saved"
msgstr "Ingen speltid sparad"
-#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267
+#: gui/saveload-dialog.cpp:219 gui/saveload-dialog.cpp:275
msgid "Delete"
msgstr "Radera"
-#: gui/saveload-dialog.cpp:266
+#: gui/saveload-dialog.cpp:274
msgid "Do you really want to delete this savegame?"
msgstr "Vill du verkligen radera den här spardatan?"
-#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796
+#: gui/saveload-dialog.cpp:383 gui/saveload-dialog.cpp:872
msgid "Date: "
msgstr "Datum:"
-#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802
+#: gui/saveload-dialog.cpp:387 gui/saveload-dialog.cpp:878
msgid "Time: "
msgstr "Tid:"
-#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810
+#: gui/saveload-dialog.cpp:393 gui/saveload-dialog.cpp:886
msgid "Playtime: "
msgstr "Speltid:"
-#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465
+#: gui/saveload-dialog.cpp:406 gui/saveload-dialog.cpp:494
msgid "Untitled savestate"
msgstr "Namnlös spardata"
-#: gui/saveload-dialog.cpp:517
+#: gui/saveload-dialog.cpp:546
msgid "Next"
-msgstr ""
+msgstr "Nästa"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "Bakåt"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "Spara"
+msgstr "Ny sparning"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "Kunde inte spara spelet."
+msgstr "Skapa ett nytt sparat spel"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
msgstr "Namn:"
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "Ange en beskrivning för position %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1030,35 +1043,123 @@ msgstr "Antialiserad (16 bpp)"
msgid "Clear value"
msgstr "Töm sökfältet"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "Reverb"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "Aktiv"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "Rum:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "Dämpa:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "Bredd:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "Nivå:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "Chorus"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "Hastighet:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "Djup:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "Typ:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "Sinus"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "Triangel"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "Interpolering:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "Ingen (snabbast)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "Linjär"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "Fjärde ordningen"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "Sjunde ordningen"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "Återställ"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr ""
+"Återställ alla FluidSynth-inställningar till deras ursprungliga värden."
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr ""
+"Vill du verkligen återställa alla FluidSynth-inställningar till deras "
+"ursprungliga värden?"
+
+#: base/main.cpp:210
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motorn stöder inte debug-nivå '%s'"
-#: base/main.cpp:287
+#: base/main.cpp:288
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45
+#: base/main.cpp:291 backends/platform/symbian/src/SymbianActions.cpp:45
#: backends/platform/wince/CEActionsPocket.cpp:45
#: backends/platform/wince/CEActionsSmartphone.cpp:46
msgid "Skip"
msgstr "Skippa"
-#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50
+#: base/main.cpp:294 backends/platform/symbian/src/SymbianActions.cpp:50
#: backends/platform/wince/CEActionsPocket.cpp:42
msgid "Pause"
msgstr "Paus"
-#: base/main.cpp:296
+#: base/main.cpp:297
msgid "Skip line"
msgstr "Skippa rad"
-#: base/main.cpp:467
+#: base/main.cpp:468
msgid "Error running game:"
msgstr "Fel under körning av spel:"
-#: base/main.cpp:491
+#: base/main.cpp:492
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunde inte hitta en motor kapabel till att köra det valda spelet"
@@ -1174,13 +1275,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1204,15 +1308,17 @@ msgstr ""
msgid ""
"Gamestate save failed (%s)! Please consult the README for basic information, "
"and for instructions on how to obtain further assistance."
-msgstr "Spar"
+msgstr ""
+"Kunde inte spara data (%s)! Var god läs README-filen för grundläggande "
+"information och instruktioner för hur du kan få mer hjälp."
#: 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 +1326,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 +1356,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 +1370,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 +1379,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 +1389,50 @@ 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: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 "Använd originalskärmar för spara/ladda"
-#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48
-#: engines/sci/detection.cpp:391
+#: engines/agi/detection.cpp:143 engines/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:841 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:841 engines/toltecs/menu.cpp:259
msgid "Restore"
msgstr "Återställ"
+#: 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 upptäckte att du har gamla spardata för Drascula 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 på 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"
@@ -1313,27 +1441,27 @@ msgstr "Använd ljus palett-läge"
msgid "Display graphics using the game's bright palette"
msgstr "Visa grafik med spelets ljusa palett"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA anti-gitter"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "Aktivera anti-gitter i EGA-spel"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "Föredra digitala ljudeffekter"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "Föredra digitala ljudeffekter istället för syntetiserade"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "Använd IMF/Yamaha FB-01 för MIDI-uppspelning"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
@@ -1341,29 +1469,29 @@ msgstr ""
"Använd ett IMB Music Feature-kort eller en Yamaha FB-01 FM synthmodul för "
"MIDI-uppspelning"
-#: engines/sci/detection.cpp:411
+#: engines/sci/detection.cpp:414
msgid "Use CD audio"
msgstr "Använd CD-ljud"
-#: engines/sci/detection.cpp:412
+#: engines/sci/detection.cpp:415
msgid "Use CD audio instead of in-game audio, if available"
msgstr "Använd CD-ljud istället för spelets ljud, om tillgängligt"
-#: engines/sci/detection.cpp:422
+#: engines/sci/detection.cpp:425
msgid "Use Windows cursors"
msgstr "Använd Windows muspekare"
-#: engines/sci/detection.cpp:423
+#: engines/sci/detection.cpp:426
msgid ""
"Use the Windows cursors (smaller and monochrome) instead of the DOS ones"
msgstr ""
"Använd Windows muspekare (mindre och svartvit) istället för DOS-pekaren"
-#: engines/sci/detection.cpp:433
+#: engines/sci/detection.cpp:436
msgid "Use silver cursors"
msgstr "Använd silverpekare"
-#: engines/sci/detection.cpp:434
+#: engines/sci/detection.cpp:437
msgid ""
"Use the alternate set of silver cursors, instead of the normal golden ones"
msgstr ""
@@ -1409,7 +1537,7 @@ msgstr "Spela"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "Avsluta"
@@ -2016,7 +2144,7 @@ msgstr "Flyg åt höger"
msgid "Fly to lower right"
msgstr "Flyg åt nedre höger"
-#: engines/scumm/scumm.cpp:1773
+#: engines/scumm/scumm.cpp:1776
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -2025,7 +2153,7 @@ msgstr ""
"Stöd för Native MIDI kräver Roland-uppdateringen från LucasArts,\n"
"men %s saknas. Använder AdLib istället."
-#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220
+#: engines/scumm/scumm.cpp:2303 engines/agos/saveload.cpp:220
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -2036,7 +2164,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"
@@ -2047,7 +2175,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"
@@ -2058,7 +2186,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' "
@@ -2069,7 +2197,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,11 +2218,11 @@ 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"
-#: engines/agos/animation.cpp:560
+#: engines/agos/animation.cpp:557
#, c-format
msgid "Cutscene file '%s' not found!"
msgstr "Filmscensfilen '%s' hittades ej!"
@@ -2112,6 +2240,14 @@ msgstr "Kunde inte skriva spardata till filen."
msgid "Failed to delete file."
msgstr "Kunde inte radera filen."
+#: engines/groovie/detection.cpp:312
+msgid "Fast movie speed"
+msgstr "Snabb filmhastighet"
+
+#: engines/groovie/detection.cpp:313
+msgid "Play movies at an increased speed"
+msgstr "Spela filmer i högre hastighet"
+
#: engines/groovie/script.cpp:420
msgid "Failed to save game"
msgstr "Kunde inte spara spelet."
@@ -2202,11 +2338,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:2447
msgid "Turn Left"
msgstr "Sväng vänster"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "Sväng höger"
@@ -2222,7 +2358,7 @@ msgstr "Inställningar"
msgid "Choose Spell"
msgstr "Välj trollformel"
-#: engines/kyra/sound_midi.cpp:475
+#: engines/kyra/sound_midi.cpp:477
msgid ""
"You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
@@ -2238,12 +2374,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "Alternativt intro"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "Använd diskettversionens intro (endast CD-version)"
+msgstr "Använd alternativt spelintro (endast CD-version)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2269,20 +2404,20 @@ msgstr "Diskettintro"
msgid "Use the floppy version's intro (CD version only)"
msgstr "Använd diskettversionens intro (endast CD-version)"
-#: engines/sword1/animation.cpp:539
+#: engines/sword1/animation.cpp:519
#, c-format
msgid "PSX stream cutscene '%s' cannot be played in paletted mode"
msgstr "PSX-filmscenen '%s' kan inte visas i palettläget"
-#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455
+#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
msgstr "DXA filmscener hittades men ScummVM har byggts utan stöd för zlib"
-#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465
+#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449
msgid "MPEG2 cutscenes are no longer supported"
msgstr "MPEG2 filmscener stöds inte längre"
-#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473
+#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457
#, c-format
msgid "Cutscene '%s' not found"
msgstr "Filmscenen '%s' hittades ej"
@@ -2326,7 +2461,7 @@ msgstr "Behåll den nya"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "Här slutar Broken Sword 1 demon"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "PSX-filmscener hittades men ScummVM har byggts utan stöd för RGB-färg"
@@ -2339,16 +2474,18 @@ msgstr "Visa etiketter"
msgid "Show labels for objects on mouse hover"
msgstr "Visar etiketter för objekten som musen pekar på"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
-msgstr ""
+msgstr "Du har inte 'teenagent.dat'-filen. Hämta den från ScummVM:s webbsida"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"Teenagent.dat-filen är komprimerad och zlib har inte inkluderats i det här "
+"programmet. Var god dekomprimera den"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2400,6 +2537,46 @@ msgstr ""
"\n"
"Var god rapportera till teamet."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "Ogiltigt namn på sparfil"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "Upp/Zooma in/Gå framåt/Öppna dörrar"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "Ned/Zooma ut"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "Visa/dölj inventarium"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "Visa/dölj biochip"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "Handling/Välj"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "Aktivera centrerad dataskärm"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "Visa/dölj informationsskärm"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "Visa/dölj pausmeny"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
msgstr "MAME OPL-emulator"
@@ -2457,7 +2634,7 @@ msgstr "Ingen musik"
msgid "Amiga Audio Emulator"
msgstr "Amiga ljudemulator"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "AdLib-emulator"
@@ -2469,11 +2646,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"
@@ -2624,24 +2801,24 @@ msgstr "Mittenklick"
msgid "Right Click"
msgstr "Högerklick"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:78
+#: backends/platform/sdl/macosx/appmenu_osx.mm:77
msgid "Hide ScummVM"
msgstr "Göm ScummVM"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:83
+#: backends/platform/sdl/macosx/appmenu_osx.mm:82
msgid "Hide Others"
msgstr "Göm övriga"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:88
+#: backends/platform/sdl/macosx/appmenu_osx.mm:87
msgid "Show All"
msgstr "Visa alla"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:110
-#: backends/platform/sdl/macosx/appmenu_osx.mm:121
+#: backends/platform/sdl/macosx/appmenu_osx.mm:109
+#: backends/platform/sdl/macosx/appmenu_osx.mm:120
msgid "Window"
msgstr "Fönster"
-#: backends/platform/sdl/macosx/appmenu_osx.mm:115
+#: backends/platform/sdl/macosx/appmenu_osx.mm:114
msgid "Minimize"
msgstr "Minimera"
@@ -2655,12 +2832,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 +2846,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 +2870,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"
@@ -3010,33 +3187,33 @@ msgstr ""
"Glöm inte att välja en tangent för \"Göm verktygsrad\" för att se hela "
"inventariet"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "Vill du verkligen återgå till launchern?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "Launcher"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "Vill du verkligen avsluta?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: backends/events/openpandora/op-events.cpp:168
msgid "Touchscreen 'Tap Mode' - Left Click"
msgstr "Touchscreen \"Tap-läge\" - Vänsterklick"
#: backends/events/gph/gph-events.cpp:388
#: backends/events/gph/gph-events.cpp:431
-#: backends/events/openpandora/op-events.cpp:141
+#: backends/events/openpandora/op-events.cpp:170
msgid "Touchscreen 'Tap Mode' - Right Click"
msgstr "Touchscren \"Tap-läge\" - Högerklick"
#: backends/events/gph/gph-events.cpp:390
#: backends/events/gph/gph-events.cpp:433
-#: backends/events/openpandora/op-events.cpp:143
+#: backends/events/openpandora/op-events.cpp:172
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
msgstr "Touchscreen \"Tap-läge\" - Hover (utan klick)"
@@ -3056,7 +3233,11 @@ msgstr "Min. volym"
msgid "Decreasing Volume"
msgstr "Sänka volymen"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "Touchscreen 'Tap-läge' - Hover (DPad klick)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "Sök efter uppdateringar..."
@@ -3092,6 +3273,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 be7935518b..2a42ff47d9 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,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2012-08-12 14:57+0200\n"
-"PO-Revision-Date: 2012-06-29 20:19+0200\n"
-"Last-Translator: lubomyr <lubomyr31@gmail.com>\n"
+"POT-Creation-Date: 2013-04-24 13:35+0100\n"
+"PO-Revision-Date: 2013-05-05 23:26+0200\n"
+"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Ukrainian\n"
"Language: Ukrainian\n"
"MIME-Version: 1.0\n"
@@ -18,45 +18,54 @@ 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
+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/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
+#: 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 gui/fluidsynth-dialog.cpp:151
+#: engines/engine.cpp:447 engines/drascula/saveload.cpp:51
#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865
#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48
-#: backends/events/default/default-events.cpp:191
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:193
+#: backends/events/default/default-events.cpp:215
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 "²ØÑàÐâØ"
@@ -71,15 +80,15 @@ msgstr "·ÐÚàØâØ"
msgid "Mouse click"
msgstr "ºÛöÚ ÜØèÚÞî"
-#: gui/gui-manager.cpp:122 base/main.cpp:300
+#: gui/gui-manager.cpp:122 base/main.cpp:301
msgid "Display keyboard"
msgstr "¿ÞÚÐ×ÐâØ ÚÛÐÒöÐâãàã"
-#: gui/gui-manager.cpp:126 base/main.cpp:304
+#: gui/gui-manager.cpp:126 base/main.cpp:305
msgid "Remap keys"
msgstr "¿ÕàÕßàØ×ÝÐçØâØ ÚÛÐÒöèö"
-#: gui/gui-manager.cpp:129 base/main.cpp:307
+#: gui/gui-manager.cpp:129 base/main.cpp:308
msgid "Toggle FullScreen"
msgstr "¿ÕàÕÜÚÝãâØ ßÞÒÝÞÕÚàÐÝÝØÙ àÕÖØÜ"
@@ -92,17 +101,19 @@ 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 gui/fluidsynth-dialog.cpp:152
+#: 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:865
+#: 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"
@@ -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:349
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:349
+#: backends/platform/wince/CEActionsPocket.cpp:267
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
msgstr "·ÐÒÐÝâÐÖØâØ"
@@ -460,7 +473,7 @@ msgstr ""
"ÇØ ÒØ ÔöÙáÝÞ åÞçÕâÕ ×ÐßãáâØâØ ßÞèãÚ ãáöå öÓÞà? ÆÕ ßÞâÕÝæöÙÝÞ ÜÞÖÕ ÔÞÔÐâØ "
"ÒÕÛØÚã ÚöÛìÚöáâì öÓÞà."
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -468,7 +481,7 @@ msgstr ""
msgid "Yes"
msgstr "ÂÐÚ"
-#: gui/launcher.cpp:789 gui/launcher.cpp:937
+#: gui/launcher.cpp:789 gui/launcher.cpp:937 gui/fluidsynth-dialog.cpp:216
#: backends/events/symbiansdl/symbiansdl-events.cpp:184
#: backends/platform/wince/CEActionsPocket.cpp:326
#: backends/platform/wince/CEActionsSmartphone.cpp:287
@@ -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 "½ÐÛÐèâãÒÐÝÝï FluidSynth"
+
+#: 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,193 @@ 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
+msgid "Roland GS Mode (disable GM mapping)"
+msgstr "ÀÕÖØÜ Roland GS (ÒØÜÚÝãâØ ÜÐßÛÕÝÝï 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 gui/fluidsynth-dialog.cpp:137
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."
@@ -924,77 +941,74 @@ msgstr ""
"²ØÑàÐÝÐ âÕÜÐ ÝÕ ßöÔâàØÜãô ßÞâÞçÝã ÜÞÒã. ÏÚéÞ ÒØ åÞçÕâÕ ÒØÚÞàØáâÞÒãÒÐâØ æî "
"âÕÜã, ßÞâàöÑÝÞ Ò ßÕàèã çÕàÓã ×ÜöÝØâØ ÜÞÒã."
-#: gui/saveload-dialog.cpp:158
+#: gui/saveload-dialog.cpp:166
msgid "List view"
-msgstr ""
+msgstr "²ØÓÛïÔ áßØáÚã"
-#: gui/saveload-dialog.cpp:159
+#: gui/saveload-dialog.cpp:167
msgid "Grid view"
-msgstr ""
+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 ""
+msgstr "½ÐáãâßÝØÙ"
-#: gui/saveload-dialog.cpp:520
+#: gui/saveload-dialog.cpp:549
msgid "Prev"
-msgstr ""
+msgstr "¿ÞßÕàÕÔÝöÙ"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "New Save"
-msgstr "·ÐßØáÐâØ"
+msgstr "½ÞÒÕ ×ÑÕàÕÖÕÝÝï"
-#: gui/saveload-dialog.cpp:684
-#, fuzzy
+#: gui/saveload-dialog.cpp:736
msgid "Create a new save game"
-msgstr "½Õ ÒÔÐÛÞáï ×ÐßØáÐâØ Óàã"
+msgstr "ÁâÒÞàØâØ ÝÞÒØÙ ×ÐßØá ÓàØ"
-#: gui/saveload-dialog.cpp:789
-#, fuzzy
+#: gui/saveload-dialog.cpp:865
msgid "Name: "
-msgstr "½Ð×ÒÐ:"
+msgstr "½Ð×ÒÐ: "
-#: gui/saveload-dialog.cpp:861
+#: gui/saveload-dialog.cpp:937
#, c-format
msgid "Enter a description for slot %d:"
-msgstr ""
+msgstr "²ÒÕÔöâì ÞßØá ÔÛï áÛÞâã %d:"
#: gui/themebrowser.cpp:44
msgid "Select a Theme"
@@ -1029,35 +1043,120 @@ msgstr "ÀÐáâÕàØ×ÐâÞà ×ö ×ÓÛÐÔÖãÒÐÝÝïÜ (16bpp)"
msgid "Clear value"
msgstr "¾çØáâØâØ ×ÝÐçÕÝÝï"
-#: base/main.cpp:209
+#: gui/fluidsynth-dialog.cpp:67
+msgid "Reverb"
+msgstr "ÀÕÒÕàÑÕàÐæöï"
+
+#: gui/fluidsynth-dialog.cpp:69 gui/fluidsynth-dialog.cpp:101
+msgid "Active"
+msgstr "°ÚâØÒÝÕ"
+
+#: gui/fluidsynth-dialog.cpp:71
+msgid "Room:"
+msgstr "ºöÜÝÐâÐ:"
+
+#: gui/fluidsynth-dialog.cpp:78
+msgid "Damp:"
+msgstr "²ÞÛÞÓöáâì:"
+
+#: gui/fluidsynth-dialog.cpp:85
+msgid "Width:"
+msgstr "ÈØàØÝÐ:"
+
+#: gui/fluidsynth-dialog.cpp:92 gui/fluidsynth-dialog.cpp:110
+msgid "Level:"
+msgstr "ÀöÒÕÝì:"
+
+#: gui/fluidsynth-dialog.cpp:99
+msgid "Chorus"
+msgstr "ÅÞà"
+
+#: gui/fluidsynth-dialog.cpp:103
+msgid "N:"
+msgstr "N:"
+
+#: gui/fluidsynth-dialog.cpp:117
+msgid "Speed:"
+msgstr "ÈÒØÔÚöáâì:"
+
+#: gui/fluidsynth-dialog.cpp:124
+msgid "Depth:"
+msgstr "³ÛØÑØÝÐ:"
+
+#: gui/fluidsynth-dialog.cpp:131
+msgid "Type:"
+msgstr "ÂØß:"
+
+#: gui/fluidsynth-dialog.cpp:134
+msgid "Sine"
+msgstr "ÁØÝãáÞ÷ÔÐ"
+
+#: gui/fluidsynth-dialog.cpp:135
+msgid "Triangle"
+msgstr "ÂàØÚãâÝØÚ"
+
+#: gui/fluidsynth-dialog.cpp:139
+msgid "Interpolation:"
+msgstr "¦ÝâÕàßÞÛïæöï:"
+
+#: gui/fluidsynth-dialog.cpp:142
+msgid "None (fastest)"
+msgstr "½ÕÜÐ (ÝÐÙèÒØÔèÕ)"
+
+#: gui/fluidsynth-dialog.cpp:143
+msgid "Linear"
+msgstr "»öÝöÙÝÐ"
+
+#: gui/fluidsynth-dialog.cpp:144
+msgid "Fourth-order"
+msgstr "ÇÕâÒÕàâÞÓÞ ßÞàïÔÚã"
+
+#: gui/fluidsynth-dialog.cpp:145
+msgid "Seventh-order"
+msgstr "ÁìÞÜÞÓÞ ßÞàïÔÚã"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset"
+msgstr "ÁÚØÝãâØ"
+
+#: gui/fluidsynth-dialog.cpp:149
+msgid "Reset all FluidSynth settings to their default values."
+msgstr "ÁÚØÝãâØ Òáö ÝÐÛÐèâãÒÐÝÝï FluidSynth ÔÞ ÷å ×ÝÐçÕÝì ×Ð ×ÐÜÞÒçÕÝÝïÜ"
+
+#: gui/fluidsynth-dialog.cpp:216
+msgid ""
+"Do you really want to reset all FluidSynth settings to their default values?"
+msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ áÚØÝãâØ Òáö ÝÐÛÐèâãÒÐÝÝï FluidSynth ÔÞ ÷å ×ÝÐçÕÝì ×Ð ×ÐÜÞÒçÕÝÝïÜ?"
+
+#: 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 +1271,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:373
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:373
#: backends/platform/symbian/src/SymbianActions.cpp:44
#: backends/platform/wince/CEActionsPocket.cpp:43
#: backends/platform/wince/CEActionsPocket.cpp:267
@@ -1207,12 +1309,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 +1322,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 +1352,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"
@@ -1264,7 +1366,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, "
@@ -1273,7 +1375,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 "
@@ -1283,29 +1385,50 @@ 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:841 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:841 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 ""
+"ScummVM ×ÝÐÙèÞÒ, éÞ ²Ø ÜÐôâÕ áâÐàö ×ÑÕàÕÖÕÝÝï öÓÞà ÔÛï Drascula.\n"
+"·ÑÕàÕÖÕÝÝï ã áâÐàÞÜã äÞàÜÐâö ÝÕ ßöÔâàØÜãîâìáï, ö ²Ø ÝÕ ×ÜÞÖÕâÕ ÷å "
+"×ÐÒÐÝâÐÖØâØ, ïÚéÞ ÝÕ ßÕàÕÒÕÔÕâÕ ã ÝÞÒØÙ äÞàÜÐâ.\n"
+"\n"
+"½ÐâØáÝöâì ¾º, éÞÑ ßÕàÕÒÕáâØ ÷å ×ÐàÐ×, öÝÐÚèÕ ãÕ ßÞÒöÔÞÜÛÕÝÝï ×'ïÒØâìáï ßàØ "
+"ÝÐáâãßÝÞÜã ×ÐßãáÚã ÓàØ.\n"
+
#: engines/dreamweb/detection.cpp:57
msgid "Use bright palette mode"
msgstr "²ØÚÞàØáâÞÒãÒÐâØ ïáÚàÐÒØÙ àÕÖØÜ ßÐÛöâàØ"
@@ -1314,54 +1437,56 @@ msgstr "²ØÚÞàØáâÞÒãÒÐâØ ïáÚàÐÒØÙ àÕÖØÜ ßÐÛöâàØ"
msgid "Display graphics using the game's bright palette"
msgstr "²öÔÞÑàÐÖÕÝÝï ÓàÐäöÚØ × ÒØÚÞàØáâÐÝÝïÜ ïáÚàÐÒÞ÷ ßÐÛöâàØ öÓà"
-#: engines/sci/detection.cpp:370
+#: engines/sci/detection.cpp:373
msgid "EGA undithering"
msgstr "EGA ÑÕ× àÐáâàãÒÐÝÝï"
-#: engines/sci/detection.cpp:371
+#: engines/sci/detection.cpp:374
msgid "Enable undithering in EGA games"
msgstr "ÃÒöÜÚÝãâØ ÐÝâØ-×ÓÛÐÔÖãÒÐÝÝï Ò EGA öÓàÐå"
-#: engines/sci/detection.cpp:380
+#: engines/sci/detection.cpp:383
msgid "Prefer digital sound effects"
msgstr "½ÐÔÐÒÐâØ ßÕàÕÒÐÓã æØäàÞÒØÜ ×ÒãÚÞÒØÜ ÕäÕÚâÐÜ"
-#: engines/sci/detection.cpp:381
+#: engines/sci/detection.cpp:384
msgid "Prefer digital sound effects instead of synthesized ones"
msgstr "²öÔÔÐÒÐâØ ßÕàÕÒÐÓã æØäàÞÒØÜ ×ÒãÚÞÒØÜ ÕäÕÚâÐÜ, Ð ÝÕ áØÝâÕ×ÞÒÐÝØÜ"
-#: engines/sci/detection.cpp:400
+#: engines/sci/detection.cpp:403
msgid "Use IMF/Yamaha FB-01 for MIDI output"
msgstr "²ØÚÞàØáâÞÒãÒÐâØ IMF/Yahama FB-01 ÔÛï MIDI ÒØåÞÔã"
-#: engines/sci/detection.cpp:401
+#: engines/sci/detection.cpp:404
msgid ""
"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI "
"output"
msgstr ""
+"²ØÚÞàØáâÞÒãÒÐâØ ÔÛïÒ ÒØÒÞÔã MIDI àÕÖØÜ ÚÐàâØ IBM Feature ÐÑÞ FM áöÝâÕ× "
+"Yamaha FB-01"
-#: 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 ""
@@ -1408,7 +1533,7 @@ msgstr "³àÐâØ"
#: backends/platform/symbian/src/SymbianActions.cpp:52
#: backends/platform/wince/CEActionsPocket.cpp:44
#: backends/platform/wince/CEActionsSmartphone.cpp:52
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Quit"
msgstr "²ØåöÔ"
@@ -2015,7 +2140,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"
@@ -2024,7 +2149,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"
@@ -2035,7 +2160,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"
@@ -2046,7 +2171,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"
@@ -2057,7 +2182,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' "
@@ -2068,7 +2193,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 "ÀÕÖØÜ èÒØÔÚÞÓÞ ßÕàÕåÞÔã ÐÚâØÒÞÒÐÝÞ"
@@ -2089,11 +2214,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' ÝÕ ×ÝÐÙÔÕÝÞ!"
@@ -2111,6 +2236,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 "½Õ ÒÔÐÛÞáï ×ÐßØáÐâØ Óàã"
@@ -2167,11 +2300,11 @@ msgstr "ÃÒöÜÚÝãâØ ßÛÐÒÐîçö ÚãàáÞàØ"
#. I18N: HP stands for Hit Points
#: engines/kyra/detection.cpp:127
msgid "HP bar graphs"
-msgstr ""
+msgstr "ÁâÞÒßçØÚØ ×ÔÞàÞÒ'ï"
#: engines/kyra/detection.cpp:128
msgid "Enable hit point bar graphs"
-msgstr ""
+msgstr "ÃØöÜÚÝãâØ ÓàÐäöçÝö áâÞÒßØçÚØ ×ÔÞàÞÒ'ï"
#: engines/kyra/lol.cpp:478
msgid "Attack 1"
@@ -2201,11 +2334,11 @@ msgstr "ºÞÒ×ÐâØ ÝÐÛöÒÞ"
msgid "Slide Right"
msgstr "ºÞÒ×ÐâØ ÝÐßàÐÒÞ"
-#: engines/kyra/lol.cpp:485
+#: engines/kyra/lol.cpp:485 engines/pegasus/pegasus.cpp:2447
msgid "Turn Left"
msgstr "¿ÞÒÕàÝãâØáï ÝÐÛöÒÞ"
-#: engines/kyra/lol.cpp:486
+#: engines/kyra/lol.cpp:486 engines/pegasus/pegasus.cpp:2448
msgid "Turn Right"
msgstr "¿ÞÒÕàÝãâØáï ÝÐßàÐÒÞ"
@@ -2221,7 +2354,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"
@@ -2237,12 +2370,11 @@ msgstr ""
#: engines/queen/queen.cpp:59
msgid "Alternative intro"
-msgstr ""
+msgstr "°ÛâÕàÝÐâØÒÝØÙ Òáâãß"
#: engines/queen/queen.cpp:60
-#, fuzzy
msgid "Use an alternative game intro (CD version only)"
-msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÔØáÚÕâÝö ÒÕàáö÷ ÒÒÕÔÕÝÝï (âöÛìÚØ CD ÒÕàáöï)"
+msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÐÛìâÕàÝÐâØÒÝØÙ Òáâãß ÓàØ (âöÛìÚØ CD ÒÕàáöï)"
#: engines/sky/compact.cpp:130
msgid ""
@@ -2268,20 +2400,20 @@ 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' ÝÕ ×ÝÐÙÔÕÝÞ"
@@ -2324,7 +2456,7 @@ msgstr "²×ïâØ ÝÞÒÕ"
msgid "This is the end of the Broken Sword 1 Demo"
msgstr "½Ð æìÞÜã ×ÐÚöÝçãôâìáï ÔÕÜÞ Broken Sword 1"
-#: engines/sword2/animation.cpp:435
+#: engines/sword2/animation.cpp:419
msgid ""
"PSX cutscenes found but ScummVM has been built without RGB color support"
msgstr "·ÝÐÙÔÕÝö PSX àÞÛØÚØ, ÐÛÕ ScummVM ÑãÒ ×öÑàÐÝØÙ ÑÕ× ßöÔâàØÜÚØ RGB ÚÞÛöàã"
@@ -2337,16 +2469,19 @@ msgstr "¿ÞÚÐ×ãÒÐâØ ÜöâÚØ ÞÑ'ôÚâöÒ"
msgid "Show labels for objects on mouse hover"
msgstr "¿ÞÚÐ×ãÒÐâØ ÜöâÚØ ÔÛï ÞÑ'ôÚâöÒ ßàØ ÝÐÒÕÔÕÝÝö ÜØèö"
-#: engines/teenagent/resources.cpp:68
+#: engines/teenagent/resources.cpp:94
msgid ""
"You're missing the 'teenagent.dat' file. Get it from the ScummVM website"
msgstr ""
+"à ÒÐá ÒöÔáâãÝöÙ äÐÙÛ 'teenagent.dat'. ²ö×ìÜöâì ÙÞÓÞ ÝÐ ÒÕÑáÐÙâö ScummVM"
-#: engines/teenagent/resources.cpp:89
+#: engines/teenagent/resources.cpp:115
msgid ""
"The teenagent.dat file is compressed and zlib hasn't been included in this "
"executable. Please decompress it"
msgstr ""
+"ÄÐÙÛ teenagent.dat ×ÐßÐÚÞÒÐÝÞ, ÐÛÕ zlib ÝÕ ÑãÛÞ ÒÚÛîçÕÝÞ Ò æî ßàÞÓàÐÜÜã.±ãÔì-"
+"ÛÐáÚÐ àÞ×ßÐÚãÙâÕ ÙÞÓÞ"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -2397,9 +2532,49 @@ msgstr ""
"\n"
"±ãÔì ÛÐáÚÐ, ßÞÒöÔÞÜâÕ ßàÞ æÕ ÚÞÜÐÝÔö."
+#: engines/pegasus/pegasus.cpp:679
+msgid "Invalid save file name"
+msgstr "½ÕßàÐÒØÛìÝÐ ÝÐ×ÒÐ äÐÙÛã ×ÑÕàÕÖÕÝÝï"
+
+#: engines/pegasus/pegasus.cpp:2445
+msgid "Up/Zoom In/Move Forward/Open Doors"
+msgstr "´ÞÓÞàØ/·ÜÕÝèØâØ ÜÐáèâÐÑ/²ßÕàÕÔ/²öÔçØÝØâØ ÔÒÕàö"
+
+#: engines/pegasus/pegasus.cpp:2446
+msgid "Down/Zoom Out"
+msgstr "´ÞÝØ×ã/·ÑöÛ. ÜÐáèâÐÑ"
+
+#: engines/pegasus/pegasus.cpp:2449
+msgid "Display/Hide Inventory Tray"
+msgstr "¿ÞÚÐ×ÐâØ/ÁåÞÒÐâØ öÝÒÕÝâÐà"
+
+#: engines/pegasus/pegasus.cpp:2450
+msgid "Display/Hide Biochip Tray"
+msgstr "¿ÞÚÐ×ÐâØ/ÁåÞÒÐâØ ÑöÞçöß"
+
+#: engines/pegasus/pegasus.cpp:2451
+msgid "Action/Select"
+msgstr "´öï/²ØÑöà"
+
+#: engines/pegasus/pegasus.cpp:2452
+msgid "Toggle Center Data Display"
+msgstr "¿ÕàÕÜÚÝãâØ ßÞÚÐ×ãÒÐÝÝï Ò æÕÝâàö ÕÚàÐÝã"
+
+#: engines/pegasus/pegasus.cpp:2453
+msgid "Display/Hide Info Screen"
+msgstr "¿ÞÚÐ×ÐâØ/ÁåÞÒÐâØ öÝäÞÕÚàÐÝ"
+
+#: engines/pegasus/pegasus.cpp:2454
+msgid "Display/Hide Pause Menu"
+msgstr "¿ÞÚÐ×ãÒÐâØ/ÁåÞÒÐâØ ÜÕÝî ßÐã×Ø"
+
+#: engines/pegasus/pegasus.cpp:2455
+msgid "???"
+msgstr "???"
+
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
-msgstr "µÜãÛïâÞà MAME OPL:"
+msgstr "µÜãÛïâÞà MAME OPL"
#: audio/fmopl.cpp:51
msgid "DOSBox OPL emulator"
@@ -2454,7 +2629,7 @@ msgstr "±Õ× Üã×ØÚØ"
msgid "Amiga Audio Emulator"
msgstr "°ÜöÓÐ °ãÔöÞ µÜãÛïâÞà"
-#: audio/softsynth/adlib.cpp:1593
+#: audio/softsynth/adlib.cpp:2284
msgid "AdLib Emulator"
msgstr "µÜãÛïâÞà AdLib"
@@ -2466,11 +2641,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"
@@ -2621,24 +2796,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 "¼öÝöÜö×ãÒÐâØ"
@@ -2652,12 +2827,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 "ºÞàÕÚæöî áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ ÒØÜÚÝÕÝÞ"
@@ -2666,7 +2841,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 "²öÚÞÝÝØÙ àÕÖØÜ"
@@ -2690,11 +2865,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 "°ÚâØÒÝØÙ àÕÖØÜ äöÛìâàÐæö÷: ½ÐÙÑÛØÖçÕ"
@@ -3006,33 +3181,33 @@ msgstr ""
"½Õ ×ÐÑãÔìâÕ ßÕàÕßàØ×ÝÐçØâØ ÚÝÞßÚã ÔÛï Ôö÷ 'ÁåÞÒÐâØ ¿ÐÝÕÛì öÝáâà.' éÞÑ "
"ßÞÑÐçØâØ ÒÕáì öÝÒÕÝâÐà"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Do you really want to return to the Launcher?"
msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ßÞÒÕàÝãâØáï ÔÞ ÓÞÛÞÒÝÞÓÞ ÜÕÝî?"
-#: backends/events/default/default-events.cpp:191
+#: backends/events/default/default-events.cpp:193
msgid "Launcher"
msgstr "³ÞÛÞÒÝÕ ÜÕÝî"
-#: backends/events/default/default-events.cpp:213
+#: backends/events/default/default-events.cpp:215
msgid "Do you really want to quit?"
msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ÒØÙâØ?"
#: backends/events/gph/gph-events.cpp:386
#: backends/events/gph/gph-events.cpp:429
-#: backends/events/openpandora/op-events.cpp:139
+#: 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 "ÀÕÖØÜ ÔÞâØÚã ã âÐçáÚàöÝö - ¿àÞÛöâ (ÑÕ× ÚÛöÚã)"
@@ -3052,7 +3227,11 @@ msgstr "¼öÝöÜÐÛìÝÐ ³ãçÝöáâì"
msgid "Decreasing Volume"
msgstr "¿ÞÝØÖÕÝÝï ÓãçÝÞáâö"
-#: backends/updates/macosx/macosx-updates.mm:65
+#: backends/events/openpandora/op-events.cpp:174
+msgid "Touchscreen 'Tap Mode' - Hover (DPad Clicks)"
+msgstr "ÀÕÖØÜ ÔÞâØÚã ã âÐçáÚàöÝö - ¿àÞÛöâ (ÚÛöÚ DPad)"
+
+#: backends/updates/macosx/macosx-updates.mm:67
msgid "Check for Updates..."
msgstr "¿ÕàÕÒöàïî ÞÝÞÒÛÕÝÝï..."
@@ -3088,6 +3267,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 4d7d6f6e60..7a3bf0fabd 100644
--- a/ports.mk
+++ b/ports.mk
@@ -2,12 +2,27 @@
# included by the default (main) Makefile.
#
-
#
# POSIX specific
#
install:
$(INSTALL) -d "$(DESTDIR)$(bindir)"
+ $(INSTALL) -c -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(INSTALL) -d "$(DESTDIR)$(mandir)/man6/"
+ $(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
+ $(INSTALL) -d "$(DESTDIR)$(datarootdir)/pixmaps/"
+ $(INSTALL) -c -m 644 "$(srcdir)/icons/scummvm.xpm" "$(DESTDIR)$(datarootdir)/pixmaps/scummvm.xpm"
+ $(INSTALL) -d "$(DESTDIR)$(docdir)"
+ $(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
+ $(INSTALL) -d "$(DESTDIR)$(datadir)"
+ $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(datadir)/"
+ifdef DYNAMIC_MODULES
+ $(INSTALL) -d "$(DESTDIR)$(libdir)/scummvm/"
+ $(INSTALL) -c -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/scummvm/"
+endif
+
+install-strip:
+ $(INSTALL) -d "$(DESTDIR)$(bindir)"
$(INSTALL) -c -s -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
$(INSTALL) -d "$(DESTDIR)$(mandir)/man6/"
$(INSTALL) -c -m 644 "$(srcdir)/dists/scummvm.6" "$(DESTDIR)$(mandir)/man6/scummvm.6"
@@ -71,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)
@@ -310,8 +331,10 @@ endif
# Special target to create an AmigaOS snapshot installation
aos4dist: $(EXECUTABLE)
mkdir -p $(AOS4PATH)
+ mkdir -p $(AOS4PATH)/themes
+ mkdir -p $(AOS4PATH)/extras
$(STRIP) $(EXECUTABLE) -o $(AOS4PATH)/$(EXECUTABLE)
- cp icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
+ cp ${srcdir}/icons/scummvm.info $(AOS4PATH)/$(EXECUTABLE).info
cp $(DIST_FILES_THEMES) $(AOS4PATH)/themes/
ifdef DIST_FILES_ENGINEDATA
cp $(DIST_FILES_ENGINEDATA) $(AOS4PATH)/extras/
@@ -339,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)
@@ -348,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/bitstream.h b/test/common/bitstream.h
new file mode 100644
index 0000000000..3f6a15fcd8
--- /dev/null
+++ b/test/common/bitstream.h
@@ -0,0 +1,152 @@
+#include <cxxtest/TestSuite.h>
+
+#include "common/bitstream.h"
+#include "common/memstream.h"
+
+class BitStreamTestSuite : public CxxTest::TestSuite
+{
+ public:
+ void test_get_bit() {
+ byte contents[] = { 'a' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.getBit(), 0u);
+ TS_ASSERT_EQUALS(bs.getBit(), 1u);
+ TS_ASSERT_EQUALS(bs.getBit(), 1u);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_get_bits() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.getBits(3), 3u);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ TS_ASSERT_EQUALS(bs.getBits(8), 11u);
+ TS_ASSERT_EQUALS(bs.pos(), 11u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_skip() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ bs.skip(5);
+ TS_ASSERT_EQUALS(bs.pos(), 5u);
+ bs.skip(4);
+ TS_ASSERT_EQUALS(bs.pos(), 9u);
+ TS_ASSERT_EQUALS(bs.getBits(3), 6u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_rewind() {
+ byte contents[] = { 'a' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ bs.skip(5);
+ TS_ASSERT_EQUALS(bs.pos(), 5u);
+ bs.rewind();
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.getBits(3), 3u);
+ TS_ASSERT(!bs.eos());
+
+ TS_ASSERT_EQUALS(bs.size(), 8u);
+ }
+
+ void test_peek_bit() {
+ byte contents[] = { 'a' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.peekBit(), 0u);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.getBit(), 0u);
+ TS_ASSERT_EQUALS(bs.pos(), 1u);
+ TS_ASSERT_EQUALS(bs.peekBit(), 1u);
+ TS_ASSERT_EQUALS(bs.pos(), 1u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_peek_bits() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.peekBits(3), 3u);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ bs.skip(3);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ TS_ASSERT_EQUALS(bs.peekBits(8), 11u);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ bs.skip(8);
+ TS_ASSERT_EQUALS(bs.pos(), 11u);
+ TS_ASSERT_EQUALS(bs.peekBits(5), 2u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_eos() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8MSB bs(ms);
+ bs.skip(11);
+ TS_ASSERT_EQUALS(bs.pos(), 11u);
+ TS_ASSERT_EQUALS(bs.getBits(5), 2u);
+ TS_ASSERT(bs.eos());
+
+ bs.rewind();
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_get_bits_lsb() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8LSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.getBits(3), 1u);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ TS_ASSERT_EQUALS(bs.getBits(8), 76u);
+ TS_ASSERT_EQUALS(bs.pos(), 11u);
+ TS_ASSERT(!bs.eos());
+ }
+
+ void test_peek_bits_lsb() {
+ byte contents[] = { 'a', 'b' };
+
+ Common::MemoryReadStream ms(contents, sizeof(contents));
+
+ Common::BitStream8LSB bs(ms);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ TS_ASSERT_EQUALS(bs.peekBits(3), 1u);
+ TS_ASSERT_EQUALS(bs.pos(), 0u);
+ bs.skip(3);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ TS_ASSERT_EQUALS(bs.peekBits(8), 76u);
+ TS_ASSERT_EQUALS(bs.pos(), 3u);
+ bs.skip(8);
+ TS_ASSERT_EQUALS(bs.pos(), 11u);
+ TS_ASSERT_EQUALS(bs.peekBits(5), 12u);
+ TS_ASSERT(!bs.eos());
+ }
+};
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/bink_decoder.h b/video/bink_decoder.h
index 27d3aa3691..08800c2223 100644
--- a/video/bink_decoder.h
+++ b/video/bink_decoder.h
@@ -36,6 +36,8 @@
#include "video/video_decoder.h"
+#include "graphics/surface.h"
+
namespace Audio {
class AudioStream;
class QueuingAudioStream;
diff --git a/video/codecs/cdtoons.h b/video/codecs/cdtoons.h
index 8f6d3acb6e..74d30ce8ea 100644
--- a/video/codecs/cdtoons.h
+++ b/video/codecs/cdtoons.h
@@ -38,6 +38,12 @@ struct CDToonsBlock {
byte *data;
};
+/**
+ * Broderbund CDToons decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class CDToonsDecoder : public Codec {
public:
CDToonsDecoder(uint16 width, uint16 height);
@@ -55,7 +61,6 @@ private:
bool _dirtyPalette;
uint16 _currentPaletteId;
- uint16 _currentFrame;
Common::HashMap<uint16, CDToonsBlock> _blocks;
void renderBlock(byte *data, uint size, int x, int y, uint width, uint height);
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index c197e0cc35..bcf0cf1180 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -34,16 +34,12 @@
namespace Video {
-// Convert a color from YUV to RGB colorspace, Cinepak style.
-inline static void CPYUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
- r = CLIP<int>(y + 2 * (v - 128), 0, 255);
- g = CLIP<int>(y - (u - 128) / 2 - (v - 128), 0, 255);
- b = CLIP<int>(y + 2 * (u - 128), 0, 255);
-}
-
#define PUT_PIXEL(offset, lum, u, v) \
if (_pixelFormat.bytesPerPixel != 1) { \
- CPYUV2RGB(lum, u, v, r, g, b); \
+ byte r = _clipTable[lum + (v << 1)]; \
+ byte g = _clipTable[lum - (u >> 1) - v]; \
+ byte b = _clipTable[lum + (u << 1)]; \
+ \
if (_pixelFormat.bytesPerPixel == 2) \
*((uint16 *)_curFrame.surface->pixels + offset) = _pixelFormat.RGBToColor(r, g, b); \
else \
@@ -60,6 +56,21 @@ CinepakDecoder::CinepakDecoder(int bitsPerPixel) : Codec() {
_pixelFormat = Graphics::PixelFormat::createFormatCLUT8();
else
_pixelFormat = g_system->getScreenFormat();
+
+ // Create a lookup for the clip function
+ // This dramatically improves the performance of the color conversion
+ _clipTableBuf = new byte[1024];
+
+ for (uint i = 0; i < 1024; i++) {
+ if (i <= 512)
+ _clipTableBuf[i] = 0;
+ else if (i >= 768)
+ _clipTableBuf[i] = 255;
+ else
+ _clipTableBuf[i] = i - 512;
+ }
+
+ _clipTable = _clipTableBuf + 512;
}
CinepakDecoder::~CinepakDecoder() {
@@ -69,6 +80,7 @@ CinepakDecoder::~CinepakDecoder() {
}
delete[] _curFrame.strips;
+ delete[] _clipTableBuf;
}
const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream *stream) {
@@ -82,15 +94,14 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream
if (_curFrame.strips == NULL)
_curFrame.strips = new CinepakStrip[_curFrame.stripCount];
- debug (4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);
+ debug(4, "Cinepak Frame: Width = %d, Height = %d, Strip Count = %d", _curFrame.width, _curFrame.height, _curFrame.stripCount);
// Borrowed from FFMPEG. This should cut out the extra data Cinepak for Sega has (which is useless).
// The theory behind this is that this is here to confuse standard Cinepak decoders. But, we won't let that happen! ;)
if (_curFrame.length != (uint32)stream->size()) {
- uint16 temp = stream->readUint16BE();
- if (temp == 0xFE00)
+ if (stream->readUint16BE() == 0xFE00)
stream->readUint32BE();
- else if (temp != _curFrame.width)
+ else if ((stream->size() % _curFrame.length) == 0)
stream->seek(-2, SEEK_CUR);
}
@@ -191,14 +202,14 @@ void CinepakDecoder::loadCodebook(Common::SeekableReadStream *stream, uint16 str
codebook[i].y[j] = stream->readByte();
if (n == 6) {
- codebook[i].u = stream->readByte() + 128;
- codebook[i].v = stream->readByte() + 128;
+ codebook[i].u = stream->readSByte();
+ codebook[i].v = stream->readSByte();
} else {
// This codebook type indicates either greyscale or
// palettized video. For greyscale, default us to
- // 128 for both u and v.
- codebook[i].u = 128;
- codebook[i].v = 128;
+ // 0 for both u and v.
+ codebook[i].u = 0;
+ codebook[i].v = 0;
}
}
}
@@ -208,7 +219,6 @@ void CinepakDecoder::decodeVectors(Common::SeekableReadStream *stream, uint16 st
uint32 flag = 0, mask = 0;
uint32 iy[4];
int32 startPos = stream->pos();
- byte r = 0, g = 0, b = 0;
for (uint16 y = _curFrame.strips[strip].rect.top; y < _curFrame.strips[strip].rect.bottom; y += 4) {
iy[0] = _curFrame.strips[strip].rect.left + y * _curFrame.width;
diff --git a/video/codecs/cinepak.h b/video/codecs/cinepak.h
index ca4552fae6..f4adfd50fe 100644
--- a/video/codecs/cinepak.h
+++ b/video/codecs/cinepak.h
@@ -36,8 +36,9 @@ class SeekableReadStream;
namespace Video {
struct CinepakCodebook {
- byte y[4];
- byte u, v;
+ // These are not in the normal YUV colorspace, but in the Cinepak YUV colorspace instead.
+ byte y[4]; // [0, 255]
+ int8 u, v; // [-128, 127]
};
struct CinepakStrip {
@@ -58,6 +59,13 @@ struct CinepakFrame {
Graphics::Surface *surface;
};
+/**
+ * Cinepak decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - QuickTimeDecoder
+ */
class CinepakDecoder : public Codec {
public:
CinepakDecoder(int bitsPerPixel = 24);
@@ -70,6 +78,7 @@ private:
CinepakFrame _curFrame;
int32 _y;
Graphics::PixelFormat _pixelFormat;
+ byte *_clipTable, *_clipTableBuf;
void loadCodebook(Common::SeekableReadStream *stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize);
void decodeVectors(Common::SeekableReadStream *stream, uint16 strip, byte chunkID, uint32 chunkSize);
diff --git a/video/codecs/codec.h b/video/codecs/codec.h
index 8e4691ca3c..c1194e461b 100644
--- a/video/codecs/codec.h
+++ b/video/codecs/codec.h
@@ -32,16 +32,48 @@ class SeekableReadStream;
namespace Video {
+/**
+ * An abstract representation of a video codec used for decoding
+ * video frames.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - QuickTimeDecoder
+ * - VMDDecoder
+ */
class Codec {
public:
Codec() {}
virtual ~Codec() {}
+ /**
+ * Decode the frame for the given data and return a pointer to a surface
+ * containing the decoded frame.
+ *
+ * @return a pointer to the decoded frame
+ * @note stream is not deleted
+ */
virtual const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream) = 0;
+
+ /**
+ * Get the format that the surface returned from decodeImage() will
+ * be in.
+ */
virtual Graphics::PixelFormat getPixelFormat() const = 0;
+ /**
+ * Can this codec's frames contain a palette?
+ */
virtual bool containsPalette() const { return false; }
+
+ /**
+ * Get the palette last decoded from decodeImage
+ */
virtual const byte *getPalette() { return 0; }
+
+ /**
+ * Does the codec have a dirty palette?
+ */
virtual bool hasDirtyPalette() const { return false; }
};
diff --git a/video/codecs/indeo3.h b/video/codecs/indeo3.h
index a07d779dec..880901df13 100644
--- a/video/codecs/indeo3.h
+++ b/video/codecs/indeo3.h
@@ -36,6 +36,13 @@
namespace Video {
+/**
+ * Intel Indeo 3 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ * - VMDDecoder
+ */
class Indeo3Decoder : public Codec {
public:
Indeo3Decoder(uint16 width, uint16 height);
diff --git a/video/codecs/mjpeg.h b/video/codecs/mjpeg.h
index 0c3b668a74..d71454799c 100644
--- a/video/codecs/mjpeg.h
+++ b/video/codecs/mjpeg.h
@@ -36,10 +36,12 @@ struct Surface;
namespace Video {
-// Motion JPEG Decoder
-// Basically a wrapper around JPEG which converts to RGB and also functions
-// as a Codec.
-
+/**
+ * Motion JPEG decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class JPEGDecoder : public Codec {
public:
JPEGDecoder();
diff --git a/video/codecs/msrle.h b/video/codecs/msrle.h
index 2aea66d113..64ebaaee51 100644
--- a/video/codecs/msrle.h
+++ b/video/codecs/msrle.h
@@ -27,6 +27,12 @@
namespace Video {
+/**
+ * Microsoft Run-Length Encoding decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class MSRLEDecoder : public Codec {
public:
MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/msvideo1.h b/video/codecs/msvideo1.h
index 767eece580..047d542743 100644
--- a/video/codecs/msvideo1.h
+++ b/video/codecs/msvideo1.h
@@ -27,6 +27,12 @@
namespace Video {
+/**
+ * Microsoft Video 1 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class MSVideo1Decoder : public Codec {
public:
MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/qtrle.h b/video/codecs/qtrle.h
index d9db58ab23..a1dd9c9188 100644
--- a/video/codecs/qtrle.h
+++ b/video/codecs/qtrle.h
@@ -28,6 +28,12 @@
namespace Video {
+/**
+ * QuickTime Run-Length Encoding decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class QTRLEDecoder : public Codec {
public:
QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel);
diff --git a/video/codecs/rpza.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/codecs/rpza.h b/video/codecs/rpza.h
index f082d25549..67e0699692 100644
--- a/video/codecs/rpza.h
+++ b/video/codecs/rpza.h
@@ -28,6 +28,12 @@
namespace Video {
+/**
+ * Apple RPZA decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class RPZADecoder : public Codec {
public:
RPZADecoder(uint16 width, uint16 height);
diff --git a/video/codecs/smc.h b/video/codecs/smc.h
index f2caca977a..4b9f57410a 100644
--- a/video/codecs/smc.h
+++ b/video/codecs/smc.h
@@ -34,6 +34,12 @@ enum {
COLORS_PER_TABLE = 256
};
+/**
+ * Apple SMC decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class SMCDecoder : public Codec {
public:
SMCDecoder(uint16 width, uint16 height);
diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp
index 56b376f590..57e84968a3 100644
--- a/video/codecs/svq1.cpp
+++ b/video/codecs/svq1.cpp
@@ -223,9 +223,9 @@ const Graphics::Surface *SVQ1Decoder::decodeImage(Common::SeekableReadStream *st
// Prediction Motion Vector
Common::Point *pmv = new Common::Point[(width / 8) + 3];
- byte *previous;
+ byte *previous = 0;
if (frameType == 2) { // B Frame
- warning("B Frame not supported currently");
+ error("SVQ1 Video: B Frames not supported");
//previous = _next[i];
} else {
previous = _last[i];
diff --git a/video/codecs/svq1.h b/video/codecs/svq1.h
index e5066abfd4..6667fea344 100644
--- a/video/codecs/svq1.h
+++ b/video/codecs/svq1.h
@@ -33,6 +33,12 @@ struct Point;
namespace Video {
+/**
+ * Sorenson Vector Quantizer 1 decoder.
+ *
+ * Used in video:
+ * - QuickTimeDecoder
+ */
class SVQ1Decoder : public Codec {
public:
SVQ1Decoder(uint16 width, uint16 height);
diff --git a/video/codecs/truemotion1.h b/video/codecs/truemotion1.h
index 628cfa4584..b2a35cf873 100644
--- a/video/codecs/truemotion1.h
+++ b/video/codecs/truemotion1.h
@@ -32,6 +32,12 @@
namespace Video {
+/**
+ * Duck TrueMotion 1 decoder.
+ *
+ * Used in video:
+ * - AVIDecoder
+ */
class TrueMotion1Decoder : public Codec {
public:
TrueMotion1Decoder(uint16 width, uint16 height);
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 08340a19a6..d24a021f3b 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -2296,7 +2296,7 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
// Directly uncompress onto the video surface
const int offsetX = rect.left * _surface.format.bytesPerPixel;
const int offsetY = (_y + rect.top) * _surface.pitch;
- const int offset = offsetX - offsetY;
+ const int offset = offsetX + offsetY;
if (deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
_surface.w * _surface.h * _surface.format.bytesPerPixel - offset))
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/psx_decoder.cpp b/video/psx_decoder.cpp
index 57c8972ee5..fd45005770 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -151,6 +151,8 @@ static const uint32 s_huffmanACSymbols[AC_CODE_COUNT] = {
PSXStreamDecoder::PSXStreamDecoder(CDSpeed speed, uint32 frameCount) : _speed(speed), _frameCount(frameCount) {
_stream = 0;
+ _videoTrack = 0;
+ _audioTrack = 0;
}
PSXStreamDecoder::~PSXStreamDecoder() {
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index b4dab9ddfb..7539d4a1e2 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -110,7 +110,7 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() {
return frame;
}
-Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format) {
+Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize) {
if (track->codecType == CODEC_TYPE_VIDEO) {
debug(0, "Video Codec FourCC: \'%s\'", tag2str(format));
@@ -205,7 +205,7 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::Qu
}
// Pass it on up
- return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format);
+ return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format, descSize);
}
void QuickTimeDecoder::init() {
@@ -333,6 +333,7 @@ QuickTimeDecoder::VideoTrackHandler::VideoTrackHandler(QuickTimeDecoder *decoder
_scaledSurface = 0;
_curPalette = 0;
_dirtyPalette = false;
+ _reversed = false;
}
QuickTimeDecoder::VideoTrackHandler::~VideoTrackHandler() {
@@ -344,29 +345,39 @@ QuickTimeDecoder::VideoTrackHandler::~VideoTrackHandler() {
bool QuickTimeDecoder::VideoTrackHandler::endOfTrack() const {
// A track is over when we've finished going through all edits
- return _curEdit == _parent->editCount;
+ return _reversed ? (_curEdit == 0 && _curFrame < 0) : atLastEdit();
}
bool QuickTimeDecoder::VideoTrackHandler::seek(const Audio::Timestamp &requestedTime) {
- // First, figure out what edit we're in
- Audio::Timestamp time = requestedTime.convertToFramerate(_parent->timeScale);
-
- // Continue until we get to where we need to be
- for (_curEdit = 0; !endOfTrack(); _curEdit++)
- if ((uint32)time.totalNumberOfFrames() >= getCurEditTimeOffset() && (uint32)time.totalNumberOfFrames() < getCurEditTimeOffset() + getCurEditTrackDuration())
+ uint32 convertedFrames = requestedTime.convertToFramerate(_decoder->_timeScale).totalNumberOfFrames();
+ for (_curEdit = 0; !atLastEdit(); _curEdit++)
+ if (convertedFrames >= _parent->editList[_curEdit].timeOffset && convertedFrames < _parent->editList[_curEdit].timeOffset + _parent->editList[_curEdit].trackDuration)
break;
- // This track is done
- if (endOfTrack())
+ // If we did reach the end of the track, break out
+ if (atLastEdit())
+ return true;
+
+ // If this track is in an empty edit, position us at the next non-empty
+ // edit. There's nothing else to do after this.
+ if (_parent->editList[_curEdit].mediaTime == -1) {
+ while (!atLastEdit() && _parent->editList[_curEdit].mediaTime == -1)
+ _curEdit++;
+
+ if (!atLastEdit())
+ enterNewEditList(true);
+
return true;
+ }
enterNewEditList(false);
// One extra check for the end of a track
- if (endOfTrack())
+ if (atLastEdit())
return true;
// Now we're in the edit and need to figure out what frame we need
+ Audio::Timestamp time = requestedTime.convertToFramerate(_parent->timeScale);
while (getRateAdjustedFrameTime() < (uint32)time.totalNumberOfFrames()) {
_curFrame++;
if (_durationOverride >= 0) {
@@ -381,17 +392,24 @@ bool QuickTimeDecoder::VideoTrackHandler::seek(const Audio::Timestamp &requested
// Compare the starting point for the frame to where we need to be
_holdNextFrameStartTime = getRateAdjustedFrameTime() != (uint32)time.totalNumberOfFrames();
- // If we went past the time, go back a frame
+ // If we went past the time, go back a frame. _curFrame before this point is at the frame
+ // that should be displayed. This adjustment ensures it is on the frame before the one that
+ // should be displayed.
if (_holdNextFrameStartTime)
_curFrame--;
- // Handle the keyframe here
- int32 destinationFrame = _curFrame + 1;
+ if (_reversed) {
+ // Call setReverse again to update
+ setReverse(true);
+ } else {
+ // Handle the keyframe here
+ int32 destinationFrame = _curFrame + 1;
- assert(destinationFrame < (int32)_parent->frameCount);
- _curFrame = findKeyFrame(destinationFrame) - 1;
- while (_curFrame < destinationFrame - 1)
- bufferNextFrame();
+ assert(destinationFrame < (int32)_parent->frameCount);
+ _curFrame = findKeyFrame(destinationFrame) - 1;
+ while (_curFrame < destinationFrame - 1)
+ bufferNextFrame();
+ }
return true;
}
@@ -428,27 +446,54 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame()
if (endOfTrack())
return 0;
+ if (_reversed) {
+ // Subtract one to place us on the frame before the current displayed frame.
+ _curFrame--;
+
+ // We have one "dummy" frame at the end to so the last frame is displayed
+ // for the right amount of time.
+ if (_curFrame < 0)
+ return 0;
+
+ // Decode from the last key frame to the frame before the one we need.
+ // TODO: Probably would be wise to do some caching
+ int targetFrame = _curFrame;
+ _curFrame = findKeyFrame(targetFrame) - 1;
+ while (_curFrame != targetFrame - 1)
+ bufferNextFrame();
+ }
+
const Graphics::Surface *frame = bufferNextFrame();
- if (_holdNextFrameStartTime) {
- // Don't set the next frame start time here; we just did a seek
- _holdNextFrameStartTime = false;
- } else if (_durationOverride >= 0) {
- // Use our own duration from the edit list calculation
- _nextFrameStartTime += _durationOverride;
- _durationOverride = -1;
+ if (_reversed) {
+ if (_holdNextFrameStartTime) {
+ // Don't set the next frame start time here; we just did a seek
+ _holdNextFrameStartTime = false;
+ } else {
+ // Just need to subtract the time
+ _nextFrameStartTime -= getFrameDuration();
+ }
} else {
- _nextFrameStartTime += getFrameDuration();
- }
+ if (_holdNextFrameStartTime) {
+ // Don't set the next frame start time here; we just did a seek
+ _holdNextFrameStartTime = false;
+ } else if (_durationOverride >= 0) {
+ // Use our own duration from the edit list calculation
+ _nextFrameStartTime += _durationOverride;
+ _durationOverride = -1;
+ } else {
+ _nextFrameStartTime += getFrameDuration();
+ }
- // Update the edit list, if applicable
- // HACK: We're also accepting the time minus one because edit lists
- // aren't as accurate as one would hope.
- if (!endOfTrack() && getRateAdjustedFrameTime() >= getCurEditTimeOffset() + getCurEditTrackDuration() - 1) {
- _curEdit++;
+ // Update the edit list, if applicable
+ // HACK: We're also accepting the time minus one because edit lists
+ // aren't as accurate as one would hope.
+ if (!atLastEdit() && getRateAdjustedFrameTime() >= getCurEditTimeOffset() + getCurEditTrackDuration() - 1) {
+ _curEdit++;
- if (!endOfTrack())
- enterNewEditList(true);
+ if (!atLastEdit())
+ enterNewEditList(true);
+ }
}
if (frame && (_parent->scaleFactorX != 1 || _parent->scaleFactorY != 1)) {
@@ -464,6 +509,68 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame()
return frame;
}
+bool QuickTimeDecoder::VideoTrackHandler::setReverse(bool reverse) {
+ _reversed = reverse;
+
+ if (_reversed) {
+ if (_parent->editCount != 1) {
+ // TODO: Myst's holo.mov needs this :(
+ warning("Can only set reverse without edits");
+ return false;
+ }
+
+ if (atLastEdit()) {
+ // If we're at the end of the video, go to the penultimate edit.
+ // The current frame is set to one beyond the last frame here;
+ // one "past" the currently displayed frame.
+ _curEdit = _parent->editCount - 1;
+ _curFrame = _parent->frameCount;
+ _nextFrameStartTime = _parent->editList[_curEdit].trackDuration + _parent->editList[_curEdit].timeOffset;
+ } else if (_holdNextFrameStartTime) {
+ // We just seeked, so "pivot" around the frame that should be displayed
+ _curFrame++;
+ _nextFrameStartTime -= getFrameDuration();
+ _curFrame++;
+ } else {
+ // We need to put _curFrame to be the one after the one that should be displayed.
+ // Since we're on the frame that should be displaying right now, add one.
+ _curFrame++;
+ }
+ } else {
+ // Update the edit list, if applicable
+ // HACK: We're also accepting the time minus one because edit lists
+ // aren't as accurate as one would hope.
+ if (!atLastEdit() && getRateAdjustedFrameTime() >= getCurEditTimeOffset() + getCurEditTrackDuration() - 1) {
+ _curEdit++;
+
+ if (atLastEdit())
+ return true;
+ }
+
+ if (_holdNextFrameStartTime) {
+ // We just seeked, so "pivot" around the frame that should be displayed
+ _curFrame--;
+ _nextFrameStartTime += getFrameDuration();
+ }
+
+ // We need to put _curFrame to be the one before the one that should be displayed.
+ // Since we're on the frame that should be displaying right now, subtract one.
+ // (As long as the current frame isn't -1, of course)
+ if (_curFrame > 0) {
+ // We then need to handle the keyframe situation
+ int targetFrame = _curFrame - 1;
+ _curFrame = findKeyFrame(targetFrame) - 1;
+ while (_curFrame < targetFrame)
+ bufferNextFrame();
+ } else if (_curFrame == 0) {
+ // Make us start at the first frame (no keyframe needed)
+ _curFrame--;
+ }
+ }
+
+ return true;
+}
+
Common::Rational QuickTimeDecoder::VideoTrackHandler::getScaledWidth() const {
return Common::Rational(_parent->width) / _parent->scaleFactorX;
}
@@ -545,10 +652,10 @@ uint32 QuickTimeDecoder::VideoTrackHandler::findKeyFrame(uint32 frame) const {
void QuickTimeDecoder::VideoTrackHandler::enterNewEditList(bool bufferFrames) {
// Bypass all empty edit lists first
- while (!endOfTrack() && _parent->editList[_curEdit].mediaTime == -1)
+ while (!atLastEdit() && _parent->editList[_curEdit].mediaTime == -1)
_curEdit++;
- if (endOfTrack())
+ if (atLastEdit())
return;
uint32 frameNum = 0;
@@ -557,6 +664,8 @@ void QuickTimeDecoder::VideoTrackHandler::enterNewEditList(bool bufferFrames) {
uint32 prevDuration = 0;
// Track down where the mediaTime is in the media
+ // This is basically time -> frame mapping
+ // Note that this code uses first frame = 0
for (int32 i = 0; i < _parent->timeToSampleCount && !done; i++) {
for (int32 j = 0; j < _parent->timeToSample[i].count; j++) {
if (totalDuration == (uint32)_parent->editList[_curEdit].mediaTime) {
@@ -577,10 +686,13 @@ void QuickTimeDecoder::VideoTrackHandler::enterNewEditList(bool bufferFrames) {
if (bufferFrames) {
// Track down the keyframe
+ // Then decode until the frame before target
_curFrame = findKeyFrame(frameNum) - 1;
while (_curFrame < (int32)frameNum - 1)
bufferNextFrame();
} else {
+ // Since frameNum is the frame that needs to be displayed
+ // we'll set _curFrame to be the "last frame displayed"
_curFrame = frameNum - 1;
}
@@ -589,6 +701,8 @@ void QuickTimeDecoder::VideoTrackHandler::enterNewEditList(bool bufferFrames) {
// Set an override for the duration since we came up in-between two frames
if (prevDuration != totalDuration)
_durationOverride = totalDuration - prevDuration;
+ else
+ _durationOverride = -1;
}
const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::bufferNextFrame() {
@@ -598,14 +712,18 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::bufferNextFrame()
uint32 descId;
Common::SeekableReadStream *frameData = getNextFramePacket(descId);
- if (!frameData || !descId || descId > _parent->sampleDescs.size())
+ if (!frameData || !descId || descId > _parent->sampleDescs.size()) {
+ delete frameData;
return 0;
+ }
// Find which video description entry we want
VideoSampleDesc *entry = (VideoSampleDesc *)_parent->sampleDescs[descId - 1];
- if (!entry->_videoCodec)
+ if (!entry->_videoCodec) {
+ delete frameData;
return 0;
+ }
const Graphics::Surface *frame = entry->_videoCodec->decodeImage(frameData);
delete frameData;
@@ -638,7 +756,19 @@ uint32 QuickTimeDecoder::VideoTrackHandler::getRateAdjustedFrameTime() const {
uint32 QuickTimeDecoder::VideoTrackHandler::getCurEditTimeOffset() const {
// Need to convert to the track scale
- return _parent->editList[_curEdit].timeOffset * _parent->timeScale / _decoder->_timeScale;
+
+ // We have to round the time off to the nearest in the scale, otherwise
+ // bad things happen. QuickTime docs are pretty silent on all this stuff,
+ // so this was found from samples. It doesn't help that this is really
+ // the only open source implementation of QuickTime edits.
+
+ uint32 mult = _parent->editList[_curEdit].timeOffset * _parent->timeScale;
+ uint32 result = mult / _decoder->_timeScale;
+
+ if ((mult % _decoder->_timeScale) > (_decoder->_timeScale / 2))
+ result++;
+
+ return result;
}
uint32 QuickTimeDecoder::VideoTrackHandler::getCurEditTrackDuration() const {
@@ -646,4 +776,8 @@ uint32 QuickTimeDecoder::VideoTrackHandler::getCurEditTrackDuration() const {
return _parent->editList[_curEdit].trackDuration * _parent->timeScale / _decoder->_timeScale;
}
+bool QuickTimeDecoder::VideoTrackHandler::atLastEdit() const {
+ return _curEdit == _parent->editCount;
+}
+
} // End of namespace Video
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 45ab155c2c..28314f2e63 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -70,7 +70,7 @@ public:
Audio::Timestamp getDuration() const { return Audio::Timestamp(0, _duration, _timeScale); }
protected:
- Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format);
+ Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize);
private:
void init();
@@ -136,6 +136,8 @@ private:
const Graphics::Surface *decodeNextFrame();
const byte *getPalette() const { _dirtyPalette = false; return _curPalette; }
bool hasDirtyPalette() const { return _curPalette; }
+ bool setReverse(bool reverse);
+ bool isReversed() const { return _reversed; }
Common::Rational getScaledWidth() const;
Common::Rational getScaledHeight() const;
@@ -151,6 +153,7 @@ private:
int32 _durationOverride;
const byte *_curPalette;
mutable bool _dirtyPalette;
+ bool _reversed;
Common::SeekableReadStream *getNextFramePacket(uint32 &descId);
uint32 getFrameDuration();
@@ -160,6 +163,7 @@ private:
uint32 getRateAdjustedFrameTime() const;
uint32 getCurEditTimeOffset() const;
uint32 getCurEditTrackDuration() const;
+ bool atLastEdit() const;
};
};
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index c49791100d..b622a0ab61 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]);
@@ -821,8 +821,9 @@ void SmackerDecoder::SmackerAudioTrack::queueCompressedBuffer(byte *buffer, uint
// (the exact opposite to the base values)
if (!is16Bits) {
for (int k = 0; k < (isStereo ? 2 : 1); k++) {
- bases[k] += (int8) ((int16) audioTrees[k]->getCode(audioBS));
- *curPointer++ = CLIP<int>(bases[k], 0, 255) ^ 0x80;
+ int8 delta = (int8) ((int16) audioTrees[k]->getCode(audioBS));
+ bases[k] = (bases[k] + delta) & 0xFF;
+ *curPointer++ = bases[k] ^ 0x80;
curPos++;
}
} else {
diff --git a/video/smk_decoder.h b/video/smk_decoder.h
index 7227238373..e4bc9bab42 100644
--- a/video/smk_decoder.h
+++ b/video/smk_decoder.h
@@ -122,7 +122,6 @@ protected:
Common::SeekableReadStream *_fileStream;
-private:
enum AudioCompression {
kCompressionNone,
kCompressionDPCM,
@@ -151,6 +150,10 @@ private:
uint32 dummy;
} _header;
+ uint32 *_frameSizes;
+
+private:
+
class SmackerAudioTrack : public AudioTrack {
public:
SmackerAudioTrack(const AudioInfo &audioInfo, Audio::Mixer::SoundType soundType);
@@ -173,7 +176,6 @@ private:
AudioInfo _audioInfo;
};
- uint32 *_frameSizes;
// The FrameTypes section of a Smacker file contains an array of bytes, where
// the 8 bits of each byte describe the contents of the corresponding frame.
// The highest 7 bits correspond to audio frames (bit 7 is track 6, bit 6 track 5
diff --git a/video/theora_decoder.h b/video/theora_decoder.h
index 7e36d829e7..ac808cdfe6 100644
--- a/video/theora_decoder.h
+++ b/video/theora_decoder.h
@@ -51,6 +51,7 @@ namespace Video {
* Decoder for Theora videos.
* Video decoder used in engines:
* - sword25
+ * - wintermute
*/
class TheoraDecoder : public VideoDecoder {
public:
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 110afa7755..5df811008c 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -37,7 +37,7 @@ VideoDecoder::VideoDecoder() {
_startTime = 0;
_dirtyPalette = false;
_palette = 0;
- _isPlaying = false;
+ _playbackRate = 0;
_audioVolume = Audio::Mixer::kMaxChannelVolume;
_audioBalance = 0;
_pauseLevel = 0;
@@ -45,6 +45,7 @@ VideoDecoder::VideoDecoder() {
_lastTimeChange = 0;
_endTime = 0;
_endTimeSet = false;
+ _nextVideoTrack = 0;
// Find the best format for output
_defaultHighColorFormat = g_system->getScreenFormat();
@@ -71,6 +72,7 @@ void VideoDecoder::close() {
_lastTimeChange = 0;
_endTime = 0;
_endTimeSet = false;
+ _nextVideoTrack = 0;
}
bool VideoDecoder::loadFile(const Common::String &filename) {
@@ -167,21 +169,44 @@ const Graphics::Surface *VideoDecoder::decodeNextFrame() {
_needsUpdate = false;
readNextPacket();
- VideoTrack *track = findNextVideoTrack();
- if (!track)
+ // If we have no next video track at this point, there shouldn't be
+ // any frame available for us to display.
+ if (!_nextVideoTrack)
return 0;
- const Graphics::Surface *frame = track->decodeNextFrame();
+ const Graphics::Surface *frame = _nextVideoTrack->decodeNextFrame();
- if (track->hasDirtyPalette()) {
- _palette = track->getPalette();
+ if (_nextVideoTrack->hasDirtyPalette()) {
+ _palette = _nextVideoTrack->getPalette();
_dirtyPalette = true;
}
+ // Look for the next video track here for the next decode.
+ findNextVideoTrack();
+
return frame;
}
+bool VideoDecoder::setReverse(bool reverse) {
+ // Can only reverse video-only videos
+ if (reverse && hasAudio())
+ return false;
+
+ // Attempt to make sure all the tracks are in the requested direction
+ for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
+ if ((*it)->getTrackType() == Track::kTrackTypeVideo && ((VideoTrack *)*it)->isReversed() != reverse) {
+ if (!((VideoTrack *)*it)->setReverse(reverse))
+ return false;
+
+ _needsUpdate = true; // force an update
+ }
+ }
+
+ findNextVideoTrack();
+ return true;
+}
+
const byte *VideoDecoder::getPalette() {
_dirtyPalette = false;
return _palette;
@@ -212,7 +237,7 @@ uint32 VideoDecoder::getTime() const {
return _lastTimeChange.msecs();
if (isPaused())
- return _pauseStartTime - _startTime;
+ return MAX<int>((_playbackRate * (_pauseStartTime - _startTime)).toInt(), 0);
if (useAudioSync()) {
for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) {
@@ -225,25 +250,29 @@ uint32 VideoDecoder::getTime() const {
}
}
- return g_system->getMillis() - _startTime;
+ return MAX<int>((_playbackRate * (g_system->getMillis() - _startTime)).toInt(), 0);
}
uint32 VideoDecoder::getTimeToNextFrame() const {
- if (endOfVideo() || _needsUpdate)
+ if (endOfVideo() || _needsUpdate || !_nextVideoTrack)
return 0;
- const VideoTrack *track = findNextVideoTrack();
+ uint32 currentTime = getTime();
+ uint32 nextFrameStartTime = _nextVideoTrack->getNextFrameStartTime();
- if (!track)
- return 0;
+ if (_nextVideoTrack->isReversed()) {
+ // For reversed videos, we need to handle the time difference the opposite way.
+ if (nextFrameStartTime >= currentTime)
+ return 0;
- uint32 elapsedTime = getTime();
- uint32 nextFrameStartTime = track->getNextFrameStartTime();
+ return currentTime - nextFrameStartTime;
+ }
- if (nextFrameStartTime <= elapsedTime)
+ // Otherwise, handle it normally.
+ if (nextFrameStartTime <= currentTime)
return 0;
- return nextFrameStartTime - elapsedTime;
+ return nextFrameStartTime - currentTime;
}
bool VideoDecoder::endOfVideo() const {
@@ -284,6 +313,7 @@ bool VideoDecoder::rewind() {
_lastTimeChange = 0;
_startTime = g_system->getMillis();
resetPauseStartTime();
+ findNextVideoTrack();
return true;
}
@@ -316,26 +346,47 @@ bool VideoDecoder::seek(const Audio::Timestamp &time) {
// Also reset our start time
if (isPlaying()) {
startAudio();
- _startTime = g_system->getMillis() - time.msecs();
+ _startTime = g_system->getMillis() - (time.msecs() / _playbackRate).toInt();
}
resetPauseStartTime();
+ findNextVideoTrack();
_needsUpdate = true;
return true;
}
-void VideoDecoder::start() {
- if (isPlaying() || !isVideoLoaded())
- return;
+bool VideoDecoder::seekToFrame(uint frame) {
+ VideoTrack *track = 0;
- _isPlaying = true;
- _startTime = g_system->getMillis();
+ for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
+ if (!(*it)->isSeekable())
+ return false;
- // Adjust start time if we've seeked to something besides zero time
- if (_lastTimeChange.totalNumberOfFrames() != 0)
- _startTime -= _lastTimeChange.msecs();
+ if ((*it)->getTrackType() == Track::kTrackTypeVideo) {
+ // We only allow seeking by frame when one video track
+ // is present
+ if (track)
+ return false;
- startAudio();
+ track = (VideoTrack *)*it;
+ }
+ }
+
+ // If we didn't find a video track, we can't seek by frame (of course)
+ if (!track)
+ return false;
+
+ Audio::Timestamp time = track->getFrameTime(frame);
+
+ if (time < 0)
+ return false;
+
+ return seek(time);
+}
+
+void VideoDecoder::start() {
+ if (!isPlaying())
+ setRate(1);
}
void VideoDecoder::stop() {
@@ -346,12 +397,12 @@ void VideoDecoder::stop() {
stopAudio();
// Keep the time marked down in case we start up again
- // We do this before _isPlaying is set so we don't get
+ // We do this before _playbackRate is set so we don't get
// _lastTimeChange returned, but before _pauseLevel is
// reset.
_lastTimeChange = getTime();
- _isPlaying = false;
+ _playbackRate = 0;
_startTime = 0;
_palette = 0;
_dirtyPalette = false;
@@ -365,6 +416,48 @@ void VideoDecoder::stop() {
(*it)->pause(false);
}
+void VideoDecoder::setRate(const Common::Rational &rate) {
+ if (!isVideoLoaded() || _playbackRate == rate)
+ return;
+
+ if (rate == 0) {
+ stop();
+ return;
+ } else if (rate != 1 && hasAudio()) {
+ warning("Cannot set custom rate in videos with audio");
+ return;
+ }
+
+ Common::Rational targetRate = rate;
+
+ // Attempt to set the reverse
+ if (!setReverse(rate < 0)) {
+ assert(rate < 0); // We shouldn't fail for forward.
+ warning("Cannot set custom rate to backwards");
+ setReverse(false);
+ targetRate = 1;
+
+ if (_playbackRate == targetRate)
+ return;
+ }
+
+ if (_playbackRate != 0)
+ _lastTimeChange = getTime();
+
+ _playbackRate = targetRate;
+ _startTime = g_system->getMillis();
+
+ // Adjust start time if we've seeked to something besides zero time
+ if (_lastTimeChange != 0)
+ _startTime -= (_lastTimeChange.msecs() / _playbackRate).toInt();
+
+ startAudio();
+}
+
+bool VideoDecoder::isPlaying() const {
+ return _playbackRate != 0;
+}
+
Audio::Timestamp VideoDecoder::getDuration() const {
Audio::Timestamp maxDuration(0, 1000);
@@ -403,21 +496,45 @@ bool VideoDecoder::VideoTrack::endOfTrack() const {
return getCurFrame() >= (getFrameCount() - 1);
}
+Audio::Timestamp VideoDecoder::VideoTrack::getFrameTime(uint frame) const {
+ // Default implementation: Return an invalid (negative) number
+ return Audio::Timestamp().addFrames(-1);
+}
+
uint32 VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const {
if (endOfTrack() || getCurFrame() < 0)
return 0;
- Common::Rational time = (getCurFrame() + 1) * 1000;
- time /= getFrameRate();
- return time.toInt();
+ return getFrameTime(getCurFrame() + 1).msecs();
+}
+
+Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getFrameTime(uint frame) const {
+ // Try to get as accurate as possible, considering we have a fractional frame rate
+ // (which Audio::Timestamp doesn't support).
+ Common::Rational frameRate = getFrameRate();
+
+ if (frameRate == frameRate.toInt()) // The nice case (a whole number)
+ return Audio::Timestamp(0, frame, frameRate.toInt());
+
+ // Just convert to milliseconds.
+ Common::Rational time = frame * 1000;
+ time /= frameRate;
+ return Audio::Timestamp(time.toInt(), 1000);
+}
+
+uint VideoDecoder::FixedRateVideoTrack::getFrameAtTime(const Audio::Timestamp &time) const {
+ Common::Rational frameRate = getFrameRate();
+
+ // Easy conversion
+ if (frameRate == time.framerate())
+ return time.totalNumberOfFrames();
+
+ // Default case
+ return (time.totalNumberOfFrames() * frameRate / time.framerate()).toInt();
}
Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getDuration() const {
- // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently
- // just converting to milliseconds.
- Common::Rational time = getFrameCount() * 1000;
- time /= getFrameRate();
- return time.toInt();
+ return getFrameTime(getFrameCount());
}
bool VideoDecoder::AudioTrack::endOfTrack() const {
@@ -527,10 +644,14 @@ bool VideoDecoder::StreamFileAudioTrack::loadFromFile(const Common::String &base
void VideoDecoder::addTrack(Track *track) {
_tracks.push_back(track);
- // Update volume settings if it's an audio track
if (track->getTrackType() == Track::kTrackTypeAudio) {
+ // Update volume settings if it's an audio track
((AudioTrack *)track)->setVolume(_audioVolume);
((AudioTrack *)track)->setBalance(_audioBalance);
+ } else if (track->getTrackType() == Track::kTrackTypeVideo) {
+ // If this track has a better time, update _nextVideoTrack
+ if (!_nextVideoTrack || ((VideoTrack *)track)->getNextFrameStartTime() < _nextVideoTrack->getNextFrameStartTime())
+ _nextVideoTrack = (VideoTrack *)track;
}
// Keep the track paused if we're paused
@@ -553,6 +674,8 @@ bool VideoDecoder::addStreamFileTrack(const Common::String &baseName) {
if (result)
addTrack(track);
+ else
+ delete track;
return result;
}
@@ -603,7 +726,7 @@ bool VideoDecoder::endOfVideoTracks() const {
}
VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() {
- VideoTrack *bestTrack = 0;
+ _nextVideoTrack = 0;
uint32 bestTime = 0xFFFFFFFF;
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) {
@@ -613,31 +736,12 @@ VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() {
if (time < bestTime) {
bestTime = time;
- bestTrack = track;
- }
- }
- }
-
- return bestTrack;
-}
-
-const VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() const {
- const VideoTrack *bestTrack = 0;
- uint32 bestTime = 0xFFFFFFFF;
-
- for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) {
- if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) {
- const VideoTrack *track = (const VideoTrack *)*it;
- uint32 time = track->getNextFrameStartTime();
-
- if (time < bestTime) {
- bestTime = time;
- bestTrack = track;
+ _nextVideoTrack = track;
}
}
}
- return bestTrack;
+ return _nextVideoTrack;
}
void VideoDecoder::startAudio() {
@@ -676,4 +780,12 @@ bool VideoDecoder::hasFramesLeft() const {
return false;
}
+bool VideoDecoder::hasAudio() const {
+ for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++)
+ if ((*it)->getTrackType() == Track::kTrackTypeAudio)
+ return true;
+
+ return false;
+}
+
} // End of namespace Video
diff --git a/video/video_decoder.h b/video/video_decoder.h
index cc7d1df51b..d0a6e08005 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -26,6 +26,7 @@
#include "audio/mixer.h"
#include "audio/timestamp.h" // TODO: Move this to common/ ?
#include "common/array.h"
+#include "common/rational.h"
#include "common/str.h"
#include "graphics/pixelformat.h"
@@ -36,7 +37,6 @@ class SeekableAudioStream;
}
namespace Common {
-class Rational;
class SeekableReadStream;
}
@@ -100,7 +100,7 @@ public:
/////////////////////////////////////////
/**
- * Begin playback of the video.
+ * Begin playback of the video at normal speed.
*
* @note This has no effect if the video is already playing.
*/
@@ -114,6 +114,26 @@ public:
void stop();
/**
+ * Set the rate of playback.
+ *
+ * For instance, a rate of 0 would stop the video, while a rate of 1
+ * would play the video normally. Passing 2 to this function would
+ * play the video at twice the normal speed.
+ *
+ * @note This function does not work for non-0/1 rates on videos that
+ * have audio tracks.
+ *
+ * @todo This currently does not implement backwards playback, but will
+ * be implemented soon.
+ */
+ void setRate(const Common::Rational &rate);
+
+ /**
+ * Returns the rate at which the video is being played.
+ */
+ Common::Rational getRate() const { return _playbackRate; }
+
+ /**
* Returns if the video is currently playing or not.
*
* This is not equivalent to the inverse of endOfVideo(). A video keeps
@@ -121,7 +141,7 @@ public:
* return true after calling start() and will continue to return true
* until stop() (or close()) is called.
*/
- bool isPlaying() const { return _isPlaying; }
+ bool isPlaying() const;
/**
* Returns if a video is rewindable or not. The default implementation
@@ -158,6 +178,14 @@ public:
virtual bool seek(const Audio::Timestamp &time);
/**
+ * Seek to a given frame.
+ *
+ * This only works when one video track is present, and that track
+ * supports getFrameTime(). This calls seek() internally.
+ */
+ bool seekToFrame(uint frame);
+
+ /**
* Pause or resume the video. This should stop/resume any audio playback
* and other stuff. The initial pause time is kept so that any timing
* variables can be updated appropriately.
@@ -325,6 +353,17 @@ public:
*/
void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; }
+ /**
+ * Set the video to decode frames in reverse.
+ *
+ * By default, VideoDecoder will decode forward.
+ *
+ * @note This is used by setRate()
+ * @note This will not work if an audio track is present
+ * @param reverse true for reverse, false for forward
+ * @return true on success, false otherwise
+ */
+ bool setReverse(bool reverse);
/////////////////////////////////////////
// Audio Control
@@ -367,14 +406,10 @@ public:
*/
bool addStreamFileTrack(const Common::String &baseName);
-
- // Future API
- //void setRate(const Common::Rational &rate);
- //Common::Rational getRate() const;
-
protected:
/**
- * An abstract representation of a track in a movie.
+ * An abstract representation of a track in a movie. Since tracks here are designed
+ * to work independently, they should not reference any other track(s) in the video.
*/
class Track {
public:
@@ -519,6 +554,29 @@ protected:
* Does the palette currently in use by this track need to be updated?
*/
virtual bool hasDirtyPalette() const { return false; }
+
+ /**
+ * Get the time the given frame should be shown.
+ *
+ * By default, this returns a negative (invalid) value. This function
+ * should only be used by VideoDecoder::seekToFrame().
+ */
+ virtual Audio::Timestamp getFrameTime(uint frame) const;
+
+ /**
+ * Set the video track to play in reverse or forward.
+ *
+ * By default, a VideoTrack must decode forward.
+ *
+ * @param reverse true for reverse, false for forward
+ * @return true for success, false for failure
+ */
+ virtual bool setReverse(bool reverse) { return !reverse; }
+
+ /**
+ * Is the video track set to play in reverse?
+ */
+ virtual bool isReversed() const { return false; }
};
/**
@@ -533,12 +591,19 @@ protected:
uint32 getNextFrameStartTime() const;
virtual Audio::Timestamp getDuration() const;
+ Audio::Timestamp getFrameTime(uint frame) const;
protected:
/**
* Get the rate at which this track is played.
*/
virtual Common::Rational getFrameRate() const = 0;
+
+ /**
+ * Get the frame that should be displaying at the given time. This is
+ * helpful for someone implementing seek().
+ */
+ uint getFrameAtTime(const Audio::Timestamp &time) const;
};
/**
@@ -685,9 +750,9 @@ protected:
/**
* Decode enough data for the next frame and enough audio to last that long.
*
- * This function is used by the decodeNextFrame() function. A subclass
+ * This function is used by this class' decodeNextFrame() function. A subclass
* of a Track may decide to just have its decodeNextFrame() function read
- * and decode the frame.
+ * and decode the frame, but only if it is the only track in the video.
*/
virtual void readNextPacket() {}
@@ -733,16 +798,13 @@ protected:
Graphics::PixelFormat getDefaultHighColorFormat() const { return _defaultHighColorFormat; }
/**
- * Find the video track with the lowest start time for the next frame
+ * Set _nextVideoTrack to the video track with the lowest start time for the next frame.
+ *
+ * @return _nextVideoTrack
*/
VideoTrack *findNextVideoTrack();
/**
- * Find the video track with the lowest start time for the next frame
- */
- const VideoTrack *findNextVideoTrack() const;
-
- /**
* Typedef helpers for accessing tracks
*/
typedef Common::Array<Track *> TrackList;
@@ -763,9 +825,11 @@ private:
TrackList _tracks;
// Current playback status
- bool _isPlaying, _needsUpdate;
+ bool _needsUpdate;
Audio::Timestamp _lastTimeChange, _endTime;
bool _endTimeSet;
+ Common::Rational _playbackRate;
+ VideoTrack *_nextVideoTrack;
// Palette settings from individual tracks
mutable bool _dirtyPalette;
@@ -779,6 +843,7 @@ private:
void startAudio();
void startAudioLimit(const Audio::Timestamp &limit);
bool hasFramesLeft() const;
+ bool hasAudio() const;
int32 _startTime;
uint32 _pauseLevel;